/* ============================================================
   TRAIN LUXE ESPAGNE - HEADER (mega menu) + FOOTER
   Prefixe classes : esp-
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --esp-terracotta: #4A2418;
  --esp-terracotta-fonce: #2b1812;
  --esp-or: #C08A3E;
  --esp-or-clair: #E0B876;
  --esp-or-pale: #F0D9A8;
  --esp-beige: #FAF3E9;
  --esp-beige-fonce: #EBDCC8;
  --esp-blanc: #FEFBF6;
  --esp-gris: #5C4A3D;
}

/* Masquer l'ancien header/topbar Elementor pour eviter tout conflit visuel */
.elementor-location-header,
[data-elementor-type="header"],
.site-header,
#masthead,
#header,
.top-bar,
#HeadTrain {
  display: none !important;
}

/* Masquer l'ancien footer natif du theme (Hello Elementor) */
.elementor-location-footer,
[data-elementor-type="footer"],
#site-footer,
.site-footer,
.dynamic-footer,
.footer-has-copyright,
#colophon {
  display: none !important;
}

/* Masquer le bandeau titre de page natif (cause de la barre blanche sous le menu) */
.page-header,
.entry-header,
#content > .page-header,
.site-main > .page-header {
  display: none !important;
}

/* Decaler tout le contenu de page sous notre header fixe (topbar + nav) */
body {
  padding-top: 116px !important;
}
@media (max-width: 1080px) {
  body { padding-top: 100px !important; }
}
@media (max-width: 640px) {
  body { padding-top: 92px !important; }
}

/* ============================================================
   HEADER WRAPPER (topbar + nav, un seul bloc fixe)
   ============================================================ */
.esp-header-wrap {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 999999 !important;
  font-family: 'Jost', sans-serif !important;
}
.esp-header-wrap * { box-sizing: border-box; }

/* TOP BAR - coordonnees agence */
.esp-topbar {
  background: var(--esp-terracotta) !important;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.esp-topbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.esp-topbar-left, .esp-topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.esp-topbar-item {
  font-size: 11px;
  color: rgba(255,255,255,0.85) !important;
  text-decoration: none !important;
  font-weight: 300;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}
.esp-topbar-item:hover { color: var(--esp-or-clair) !important; }
.esp-topbar-icon { color: var(--esp-or-clair); font-size: 11px; }
@media (max-width: 900px) {
  .esp-topbar-left { display: none; }
  .esp-topbar-inner { justify-content: center; }
}
@media (max-width: 480px) {
  .esp-topbar { display: none; }
  body { padding-top: 68px !important; }
}

/* ============================================================
   HEADER (nav principale)
   ============================================================ */
.esp-header {
  background: var(--esp-terracotta-fonce) !important;
  border-bottom: 3px solid var(--esp-or) !important;
}
.esp-header * { box-sizing: border-box; }
.esp-header-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 32px;
  gap: 24px;
}
.esp-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  white-space: nowrap;
}
.esp-logo img {
  height: 46px;
  width: auto;
  display: block;
}
.esp-logo-text {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  color: #fff !important;
  letter-spacing: 0.5px;
  line-height: 1.15;
}
.esp-logo-text em { font-style: italic; color: var(--esp-or-clair); display: block; font-size: 13px; }

.esp-nav { display: flex; align-items: center; gap: 6px; }
.esp-nav-item { position: relative; }
.esp-nav-link {
  display: inline-block;
  padding: 10px 14px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85) !important;
  text-decoration: none !important;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
}
.esp-nav-link:hover, .esp-nav-link.esp-active { color: var(--esp-or-clair) !important; }

.esp-header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.esp-header-tel {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 16px !important;
  color: var(--esp-or-clair) !important;
  text-decoration: none !important;
  white-space: nowrap;
}
.esp-header-cta {
  background: var(--esp-or) !important;
  color: var(--esp-terracotta-fonce) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  padding: 11px 20px !important;
  white-space: nowrap;
}
.esp-header-cta:hover { background: var(--esp-or-clair) !important; }

/* MEGA MENU PANEL - groupe par train, 4 colonnes de liens, 4 items max par colonne */
/* DROPDOWNS PAR ITEM DE NAV - positionne sous le lien concerne */
/* DROPDOWN SIMPLE (Blog uniquement) - positionne sous le lien */
.esp-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 320px;
  background: var(--esp-blanc);
  border: 1px solid var(--esp-beige-fonce);
  border-top: 3px solid var(--esp-or);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  padding: 18px 22px;
  display: none;
  z-index: 999998;
}
.esp-dropdown.esp-open { display: block; }
.esp-dropdown-inner { display: flex; flex-direction: column; gap: 2px; }
.esp-dropdown-link {
  font-size: 12px !important;
  color: var(--esp-gris) !important;
  text-decoration: none !important;
  padding: 8px 0;
  font-weight: 300;
  white-space: normal;
}
.esp-dropdown-link:hover { color: var(--esp-or) !important; }

/* MEGA MENU PLEINE LARGEUR, CENTRE, AVEC CARTES-IMAGES */
.esp-megapanel {
  position: fixed;
  top: 116px;
  left: 0;
  right: 0;
  background: var(--esp-blanc);
  border-bottom: 3px solid var(--esp-or);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  padding: 32px;
  display: none;
  z-index: 999998;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.esp-megapanel.esp-open { display: block; }
.esp-megapanel-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.esp-megapanel-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--esp-terracotta);
  margin-bottom: 22px;
  display: block;
}
.esp-megagrid {
  display: grid;
  gap: 18px;
  justify-content: center;
}
.esp-megagrid--1 { grid-template-columns: minmax(260px, 340px); justify-content: center; margin: 0 auto; }
.esp-megagrid--3 { grid-template-columns: repeat(3, minmax(180px, 220px)); }
.esp-megagrid--4 { grid-template-columns: repeat(4, minmax(180px, 220px)); }
.esp-megacard {
  text-decoration: none !important;
  display: block;
  border: 1px solid var(--esp-beige-fonce);
  overflow: hidden;
  transition: box-shadow 0.15s;
  background: var(--esp-beige);
}
.esp-megacard:hover { box-shadow: 0 8px 20px rgba(74,36,24,0.18); }
.esp-megacard img { width: 100%; height: 110px; object-fit: cover; display: block; }
.esp-megacard-body { padding: 12px 14px; text-align: left; }
.esp-megacard-titre {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  color: var(--esp-terracotta) !important;
  line-height: 1.25;
  margin-bottom: 2px;
}
.esp-megacard-meta { font-size: 10px; color: var(--esp-gris) !important; text-transform: uppercase; letter-spacing: 0.5px; }
.esp-megapanel-links {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--esp-beige-fonce);
  flex-wrap: wrap;
}
.esp-megapanel-link {
  font-size: 11px !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--esp-terracotta) !important;
  text-decoration: none !important;
  border-bottom: 1px solid var(--esp-or);
  padding-bottom: 2px;
}
.esp-megapanel-link:hover { color: var(--esp-or) !important; }

@media (max-width: 1080px) {
  .esp-megagrid--3, .esp-megagrid--4 { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}
@media (max-width: 640px) {
  .esp-megagrid--3, .esp-megagrid--4, .esp-megagrid--1 { grid-template-columns: 1fr; }
}

/* MOBILE */
.esp-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.esp-burger span { width: 24px; height: 2px; background: #fff; display: block; }
.esp-mobile-panel {
  position: fixed;
  top: 92px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--esp-terracotta-fonce);
  z-index: 999997;
  overflow-y: auto;
  padding: 24px;
  display: none;
}
.esp-mobile-panel.esp-open { display: block; }
.esp-mobile-link {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.esp-mobile-sub-titre {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--esp-or);
  margin-top: 14px;
  padding-top: 8px;
}
.esp-mobile-sub { padding-left: 16px; }
.esp-mobile-sub .esp-mobile-link { font-size: 11px; color: rgba(255,255,255,0.7) !important; border-bottom: none; padding: 8px 0; }

@media (max-width: 1080px) {
  .esp-nav { display: none; }
  .esp-header-tel { display: none; }
  .esp-burger { display: flex; }
}
@media (max-width: 640px) {
  .esp-header-inner { padding: 12px 18px; }
  .esp-logo img { height: 34px; }
  .esp-logo-text { font-size: 15px !important; }
  .esp-header-cta { padding: 9px 14px !important; font-size: 9px !important; }
}
@media (max-width: 480px) {
  .esp-mobile-panel { top: 68px; }
}


/* ============================================================
   FOOTER
   ============================================================ */
.esp-footer {
  background: var(--esp-terracotta-fonce);
  font-family: 'Jost', sans-serif;
}
.esp-footer * { box-sizing: border-box; }

/* Bandeau logo + tagline, au-dessus des colonnes */
.esp-footer-topband {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px 28px;
  text-align: center;
}
.esp-footer-logo-link { display: inline-block; margin-bottom: 14px; }
.esp-footer-logo-img { height: 96px; width: auto; display: block; margin: 0 auto; }
.esp-footer-tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  font-weight: 300;
  max-width: 640px;
  margin: 0 auto;
}

/* Grille 6 colonnes de liens */
.esp-footer-inner--6col {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px 40px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.esp-footer-col-titre {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  color: var(--esp-or-clair);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.esp-footer-links { list-style: none; margin: 0; padding: 0; }
.esp-footer-links li { margin-bottom: 8px; }
.esp-footer-links a {
  color: rgba(255,255,255,0.72) !important;
  text-decoration: none !important;
  font-size: 11.5px;
  font-weight: 300;
  line-height: 1.4;
}
.esp-footer-links a:hover { color: var(--esp-or-clair) !important; }
.esp-footer-contact-text {
  font-size: 11.5px;
  color: rgba(255,255,255,0.72);
  line-height: 1.9;
  font-weight: 300;
  margin-top: 10px;
}
.esp-footer-contact-text a { color: rgba(255,255,255,0.9) !important; text-decoration: none !important; }
.esp-footer-contact-text a:hover { color: var(--esp-or-clair) !important; }

/* Bande garanties, fond blanc */
.esp-footer-garanties {
  background: var(--esp-blanc);
}
.esp-footer-garanties-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.esp-footer-garanties-titre {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--esp-terracotta) !important;
  width: 100%;
  text-align: center;
  margin-bottom: 4px;
}
.esp-garantie-logo { height: 36px; width: auto; opacity: 0.9; }

/* Bas de page : legal + copyright + reseau */
.esp-footer-brand-line {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-weight: 300;
  line-height: 1.6;
  max-width: 620px;
  margin-bottom: 4px;
}
.esp-footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.esp-footer-legal-links a {
  color: rgba(255,255,255,0.6) !important;
  text-decoration: none !important;
  font-size: 11px;
}
.esp-footer-legal-links a:hover { color: var(--esp-or-clair) !important; }
.esp-footer-siret {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  font-weight: 300;
}
.esp-footer-copy {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  font-weight: 300;
}
.esp-footer-reseau {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  font-weight: 300;
}
.esp-footer-reseau a {
  color: var(--esp-or-clair) !important;
  text-decoration: underline !important;
}

@media (max-width: 1080px) {
  .esp-footer-inner--6col { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .esp-footer-inner--6col { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 420px) {
  .esp-footer-inner--6col { grid-template-columns: 1fr; }
}
