/* ══════════════════════════════════════════════════
   VAST Security — Header CSS
══════════════════════════════════════════════════ */

:root { --header-h: 64px; }


/* ════════════════════════════════════════════════
   RESET ULTRA-FORT pour le menu (anti-override)
   Force les styles même si un plugin/thème injecte des règles
════════════════════════════════════════════════ */
#vast-header .vast-primary-nav,
#vast-header .vast-primary-nav ul,
#vast-header .vast-dropdown {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
#vast-header .vast-primary-nav a,
#vast-header .vast-dropdown a,
#vast-header .vast-mobile-nav-list a,
#vast-header .vast-mobile-bottom a {
  text-decoration: none !important;
}
/* Couleur claire forcée sur les liens du menu mobile (visibilité) */
#vast-header .vast-mobile-nav-list a {
  color: rgba(255,255,255,.78) !important;
}
#vast-header .vast-mobile-nav-list a:hover,
#vast-header .vast-mobile-nav-list a:active {
  color: #fff !important;
}
#vast-header .vast-primary-nav > li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
#vast-header .vast-primary-nav > li::before,
#vast-header .vast-primary-nav > li::marker {
  content: none !important;
  display: none !important;
}

/* ── Wrapper ── */
#vast-header {
  position: sticky; top: 0; z-index: 9999;
  height: var(--header-h);
  background: var(--c-navy);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .3s, box-shadow .3s;
}
#vast-header.scrolled {
  background: rgba(8,15,30,.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 32px rgba(0,0,0,.3);
}
.vast-header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 0;
}

/* ── Logo ── */
.vast-header-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
  margin-right: 36px;
}
.vast-header-logo .vast-logo-img {
  height: 42px; width: auto;
  transition: opacity var(--ease);
}
.vast-header-logo:hover .vast-logo-img { opacity: .85; }
.vast-logo-text {
  display: flex; flex-direction: column;
  gap: 1px; line-height: 1;
}
.vast-logo-name {
  font-size: 16px; font-weight: 700; color: #fff;
  letter-spacing: -.3px;
}
.vast-logo-tagline {
  font-family: var(--f-mono);
  font-size: 8.5px; color: rgba(255,255,255,.35);
  letter-spacing: 1.5px; text-transform: uppercase;
}

/* ── Nav desktop ── */
.vast-primary-nav {
  display: flex; align-items: center;
  gap: 0; flex: 1;
}
.vast-primary-nav > li { position: relative; }
#vast-header .vast-primary-nav > li > a {
  display: flex !important; align-items: center; gap: 4px;
  height: var(--header-h); padding: 0 13px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.5) !important;
  text-decoration: none !important; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.vast-primary-nav > li > a svg {
  width: 11px; height: 11px; stroke: currentColor;
  stroke-width: 2; fill: none;
  transition: transform var(--ease);
}
#vast-header .vast-primary-nav > li > a:hover,
#vast-header .vast-primary-nav > li.current-menu-item > a,
#vast-header .vast-primary-nav > li.current-page-ancestor > a {
  color: #fff !important; border-bottom-color: var(--c-teal);
}
.vast-primary-nav > li:hover > a > svg,
.vast-primary-nav > li:focus-within > a > svg {
  transform: rotate(180deg);
}

/* ── Dropdown ── */
.vast-dropdown {
  position: absolute; top: 100%; left: -14px;
  background: #0D1829;
  border: 1px solid rgba(255,255,255,.08);
  border-top: 2px solid var(--c-teal);
  border-radius: 0 0 14px 14px;
  padding: 8px;
  min-width: 220px;
  opacity: 0; visibility: hidden;
  transform: translateY(6px); pointer-events: none;
  transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  z-index: 100;
}
.vast-primary-nav > li:hover .vast-dropdown,
.vast-primary-nav > li:focus-within .vast-dropdown {
  opacity: 1; visibility: visible;
  transform: translateY(0); pointer-events: auto;
}
#vast-header .vast-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13px; color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: background var(--ease), color var(--ease);
}
.vast-dropdown a:hover {
  background: rgba(255,255,255,.06); color: #fff;
}
.vast-dropdown a svg {
  width: 13px; height: 13px; stroke: currentColor;
  stroke-width: 1.5; fill: none; opacity: .45; flex-shrink: 0;
}
.vast-dropdown a:hover svg { opacity: 1; }

/* ════════════════════════════════════════════════
   Support du menu WordPress natif (wp_nav_menu)
   Couvre toutes les variantes de structure générée
════════════════════════════════════════════════ */
/* Liste principale : pas de puces, pas de soulignement */
.vast-primary-nav,
.vast-primary-nav ul {
  list-style: none !important;
  margin: 0; padding: 0;
}
.vast-primary-nav a { text-decoration: none !important; }

/* Tout sous-menu (sub-menu OU children) : caché par défaut */
.vast-primary-nav .sub-menu,
.vast-primary-nav .children,
.vast-primary-nav li > ul {
  position: absolute;
  top: 100%; left: -14px;
  background: #0D1829;
  border: 1px solid rgba(255,255,255,.08);
  border-top: 2px solid var(--c-teal);
  border-radius: 0 0 14px 14px;
  padding: 8px;
  min-width: 220px;
  list-style: none !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  z-index: 100;
}
/* Position relative sur les parents qui ont un sous-menu */
.vast-primary-nav > li {
  position: relative;
}
/* Apparition au survol / focus */
.vast-primary-nav > li:hover > .sub-menu,
.vast-primary-nav > li:hover > .children,
.vast-primary-nav > li:hover > ul,
.vast-primary-nav > li:focus-within > .sub-menu,
.vast-primary-nav > li:focus-within > .children,
.vast-primary-nav > li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
/* Items du sous-menu */
.vast-primary-nav .sub-menu li,
.vast-primary-nav .children li,
.vast-primary-nav li > ul li {
  margin: 0;
}
.vast-primary-nav .sub-menu a,
.vast-primary-nav .children a,
.vast-primary-nav li > ul a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13px; color: rgba(255,255,255,.55);
  text-decoration: none !important; white-space: nowrap;
  border-bottom: 0 !important;
  height: auto !important;
  transition: background var(--ease), color var(--ease);
}
.vast-primary-nav .sub-menu a:hover,
.vast-primary-nav .children a:hover,
.vast-primary-nav li > ul a:hover {
  background: rgba(255,255,255,.06); color: #fff;
}

/* ════════════════════════════════════════════════
   HAMBURGER (bouton menu mobile)
════════════════════════════════════════════════ */
.vast-hamburger {
  display: none;               /* affiché en <= 960px via la media query */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto; min-width: 48px; height: 44px;
  padding: 6px 12px;
  background: transparent;
  border: none !important;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 10000;
  position: relative;
}
/* Label "MENU" au-dessus des traits */
.vast-hamburger-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
  text-align: center;
  min-width: 44px;
  transition: opacity .2s ease;
}
/* Conteneur des 2 traits */
.vast-hamburger-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 22px;
  height: 12px;
  position: relative;
}
.vast-hamburger-bars span {
  display: block;
  width: 100%; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
/* Animation en croix quand le menu est ouvert (2 traits) */
.vast-menu-open .vast-hamburger-bars span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.vast-menu-open .vast-hamburger-bars span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }
/* Bascule du label : MENU (fermé) → FERMER/CLOSE (ouvert) */
.vast-hamburger-label .vast-label-close { display: none; }
.vast-menu-open .vast-hamburger-label .vast-label-open { display: none; }
.vast-menu-open .vast-hamburger-label .vast-label-close { display: inline; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .vast-primary-nav, .vast-header-actions { display: none; }
  .vast-hamburger { display: flex; }
  .vast-header-logo { margin-right: auto; }
}
@media (max-width: 480px) {
  :root { --header-h: 56px; }
}


/* ── Header v2 — améliorations ── */

/* Indicateur page active plus visible */
.vast-primary-nav > li.current-menu-item > a {
  color: #fff;
  border-bottom-color: var(--c-teal);
  font-weight: 600;
}

/* Dropdown avec indicateur de sous-page active */
.vast-dropdown a.current { background: rgba(255,255,255,.08); color: #fff; }

/* Bouton CTA header : focus visible renforcé */
.vast-btn-primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(26,92,255,.4), 0 0 0 5px #fff;
}

/* Aria-current sur les liens nav */
[aria-current="page"] {
  color: #fff !important;
  border-bottom-color: var(--c-teal) !important;
  font-weight: 600 !important;
}

/* Skip link visible au focus */
.vast-skip-link:focus {
  top: 8px; left: 8px;
  z-index: 99999;
  box-shadow: var(--shadow-lg);
}

/* Indicateur scrolled plus subtil */
#vast-header.scrolled {
  border-bottom-color: rgba(255,255,255,.04);
}

/* Mobile menu — fermeture sur overlay */
.vast-mobile-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(8,15,30,.5);
  z-index: 9997;
  backdrop-filter: blur(2px);
}
.vast-menu-open .vast-mobile-overlay { display: block; }

/* Nav mobile — current page */
.vast-mobile-nav-list a[aria-current="page"] {
  background: rgba(0,194,184,.1);
  color: var(--c-teal);
}


/* ════════════════════════════════════════════════
   FIX : Switcher langue — ne pas déborder sur le contenu
════════════════════════════════════════════════ */

/* Sur mobile, le switcher ne doit PAS être en position fixed */
.vast-lang {
  position: relative !important;
  z-index: auto !important;
}

/* S'assurer que le header a un z-index correct */
#vast-header {
  z-index: 9999 !important;
  position: sticky !important;
  top: 0 !important;
}

/* Empêcher le contenu de passer sous le header */
#vast-page,
#vast-main {
  position: relative !important;
  z-index: 1 !important;
}

/* Mobile : actions header — taille réduite */
@media (max-width: 960px) {
  .vast-header-inner {
    padding: 0 16px !important;
    gap: 8px !important;
  }
  .vast-header-logo {
    margin-right: auto !important;
  }
  .vast-header-logo .vast-logo-img {
    height: 36px;
  }
  .vast-hamburger {
    margin-left: 8px !important;
    padding: 6px !important;
  }
}



/* ════════════════════════════════════════════════
   MENU MOBILE — panneau plein écran opaque
════════════════════════════════════════════════ */
.vast-mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: #0D1829;            /* fond opaque navy */
  z-index: 9998;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateX(8%);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
/* État ouvert (le JS ajoute .vast-menu-open sur le body) */
.vast-menu-open .vast-mobile-menu {
  display: flex;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
/* Espace réservé pour le header (le header reste visible au-dessus) */
.vast-mobile-menu::before {
  content: '';
  display: block;
  flex: 0 0 var(--header-h);
}
.admin-bar .vast-mobile-menu::before {
  flex-basis: calc(var(--header-h) + 46px);
}
/* Liste de navigation : prend l'espace et défile */
.vast-mobile-nav-list {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  list-style: none;
  margin: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}
.vast-mobile-nav-list a {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 14px; border-radius: 10px;
  font-size: 15px; font-weight: 500;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.vast-mobile-nav-list a:hover,
.vast-mobile-nav-list a:active {
  background: rgba(255,255,255,.06); color: #fff;
}
.vast-mobile-nav-list a svg,
.vast-mobile-nav-list a i[data-lucide] {
  width: 17px; height: 17px; stroke: currentColor;
  stroke-width: 1.5; fill: none; opacity: .5; flex-shrink: 0;
}
.vast-mobile-sep {
  height: 1px; background: rgba(255,255,255,.07);
  margin: 8px 14px;
}
/* Bloc bas : bouton démo + langue, fixe sous la liste */
.vast-mobile-bottom {
  flex: 0 0 auto;
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: #0D1829;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ════════════════════════════════════════════════
   FIX — Switcher langue dans le menu mobile
════════════════════════════════════════════════ */

/* Le switcher dans le menu mobile ne doit pas s'étirer */
.vast-mobile-bottom .vast-lang {
  display: inline-flex !important;
  width: auto !important;
  max-width: max-content !important;
  align-self: flex-start !important;
  margin-top: 4px;
}

/* Les boutons FR/EN gardent leur taille naturelle */
.vast-mobile-bottom .vast-lang-btn {
  flex: 0 0 auto !important;
  width: auto !important;
  padding: 6px 16px !important;
}

/* Le conteneur bottom du menu mobile */
.vast-mobile-bottom {
  align-items: stretch;
}
.vast-mobile-bottom .vast-btn {
  width: 100%;
}
