/**
 * Refonte menu style WOO — Big Neurons
 * Fond noir (sauf Big Flux), gauche: Expertises / Prods / Immersion — droite: Équipe / Ressources / Big Flux / CTA / Lang
 * Sticky partout sauf home ; home : transparent puis couleur au scroll.
 */

/* ---- Variables charte ---- */
:root {
  --bn-nav-bg: #0C0C14;
  --bn-nav-bg-solid: rgba(12, 12, 20, 0.98);
  --bn-nav-accent: #E63946;
  --bn-nav-lang-active: #8a00ff;
  --bn-nav-text: #fff;
  --bn-nav-hover-bg: rgba(255, 255, 255, 0.12);
  --bn-nav-pill-radius: 999px;
}

/* ---- Barre principale ---- */
.bn-header-bar.nav-refonte {
  transition: background-color 0.25s ease, backdrop-filter 0.25s ease;
  will-change: background-color;
}

/* Home : pas sticky au départ, fond transparent (priorité sur les anciennes règles) */
body.home .bn-header-bar.nav-refonte,
body.bn-home-en .bn-header-bar.nav-refonte {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%) !important;
  backdrop-filter: none;
}

/* Home + scroll : fixe + fond plein (classe bn-nav-scrolled ajoutée en JS) */
body.home .bn-header-bar.nav-refonte.bn-nav-scrolled,
body.bn-home-en .bn-header-bar.nav-refonte.bn-nav-scrolled {
  position: fixed !important;
  background: var(--bn-nav-bg-solid) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Toutes les autres pages : sticky (fixed) dès le chargement (basé sur data-is-home pour fiabilité) */
.bn-header-bar.nav-refonte[data-is-home="0"] {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 99999 !important;
  background: var(--bn-nav-bg-solid) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Éviter que le contenu passe sous la barre fixe sur les pages internes (priorité sur body { padding: 0 } du header) */
body.bn-has-sticky-nav {
  padding-top: 72px !important;
}

/* Big Flux : fond blanc + texte foncé (classe sur le header pour priorité sur [data-is-home="0"]) */
.bn-header-bar.nav-refonte.bn-header-big-flux,
body.big-flux .bn-header-bar.nav-refonte {
  background: rgba(252, 252, 253, 0.98) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.bn-header-bar.nav-refonte.bn-header-big-flux .menu-el,
.bn-header-bar.nav-refonte.bn-header-big-flux .bn-nav-left a,
.bn-header-bar.nav-refonte.bn-header-big-flux .bn-nav-right a,
.bn-header-bar.nav-refonte.bn-header-big-flux .home-logo-anchor,
.bn-header-bar.nav-refonte.bn-header-big-flux .bn-header-menu-trigger {
  color: #5F5F7A !important;
}
.bn-header-bar.nav-refonte.bn-header-big-flux .bn-header-logo img {
  filter: none !important;
}

/* ---- Conteneur interne ---- */
.bn-header-bar.nav-refonte .bn-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding: 0 clamp(1rem, 4vw, 2rem);
  max-width: 1440px;
  margin: 0 auto;
}

/* ---- Logo ---- */
.bn-header-bar.nav-refonte .bn-header-logo {
  flex-shrink: 0;
  order: 1;
}

.bn-header-bar.nav-refonte .bn-header-menu-trigger {
  order: 0;
  cursor: pointer;
  padding: 8px;
  font-family: 'Clash Display', sans-serif;
  color: inherit;
  background: none;
  border: none;
  font-size: 0.95rem;
}

/* ---- Nav desktop : gauche + droite ---- */
.bn-header-nav-refonte {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  margin: 0 2rem;
  order: 2;
}

.bn-nav-left,
.bn-nav-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.bn-nav-right {
  gap: 0.5rem;
}

/* Liens menu : style pill au hover (type WOO) */
.bn-header-bar.nav-refonte .bn-nav-left a,
.bn-header-bar.nav-refonte .bn-nav-right a.inherit-a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 8px 14px;
  border-radius: var(--bn-nav-pill-radius);
  color: inherit;
  text-decoration: none;
  font-family: 'Clash Display', sans-serif;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.bn-header-bar.nav-refonte .bn-nav-left .menu-el,
.bn-header-bar.nav-refonte .bn-nav-right .menu-el {
  color: inherit;
}

.bn-header-bar.nav-refonte .bn-nav-left a:hover,
.bn-header-bar.nav-refonte .bn-nav-right a:hover {
  background: var(--bn-nav-hover-bg);
  color: var(--bn-nav-text);
}

/* Lien actif / page courante (optionnel) */
.bn-header-bar.nav-refonte .bn-nav-right a.bn-nav-flux {
  font-weight: 600;
}

/* Badge "New" à côté de Big Flux */
.bn-nav-badge-new {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--bn-nav-pill-radius);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.2);
  color: var(--bn-nav-accent);
  margin-left: 4px;
  vertical-align: middle;
}

body.big-flux .bn-nav-badge-new {
  background: rgba(230, 57, 70, 0.15);
  color: #C62828;
}

/* Petite flèche dropdown Ressources (desktop) */
.bn-nav-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  transition: transform 0.2s ease;
}
.bn-header-dropdown:hover .bn-nav-chevron {
  transform: rotate(180deg);
}
.bn-nav-has-dropdown .menu-el {
  display: inline-flex;
  align-items: center;
}

/* Dropdown Ressources (inchangé visuellement, juste position) */
.bn-header-bar.nav-refonte .bn-header-dropdown {
  position: relative;
}

.bn-header-bar.nav-refonte .bn-header-dropdown-panel {
  right: 0;
  left: auto;
}

/* ---- CTA + Lang à droite ---- */
.bn-header-cta-lang-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  order: 3;
  flex-shrink: 0;
}

/* Bouton CTA (Brief / Démarrer Big Flux) */
.bn-header-bar.nav-refonte .brief-btn.bn-header-cta {
  padding: 10px 20px;
  border-radius: var(--bn-nav-pill-radius);
  font-family: 'Clash Display', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.bn-header-bar.nav-refonte .brief-btn.bn-header-cta:hover {
  transform: translateY(-1px);
}

/* Sélecteur de langue : pills (style WOO) */
.bn-lang-switcher-desktop {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bn-lang-switcher-desktop a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 6px 12px;
  border-radius: var(--bn-nav-pill-radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--bn-nav-text);
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.bn-lang-switcher-desktop a:hover {
  background: var(--bn-nav-hover-bg);
}

.bn-lang-switcher-desktop a.bn-lang-current {
  background: var(--bn-nav-lang-active);
  color: #fff;
}

/* Mobile / tablette : masquer nav desktop, afficher burger + CTA + lang (priorité sur style.css) */
@media (max-width: 1024px) {
  .bn-header-nav-refonte {
    display: none !important;
  }

  .bn-header-bar.nav-refonte .bn-header-menu-trigger {
    display: block !important;
  }

  .bn-header-bar.nav-refonte .bn-header-cta-lang-wrap {
    margin-left: auto;
  }

  .bn-lang-switcher-desktop {
    display: none !important;
  }

  .bn-header-bar.nav-refonte .bn-header-cta-wrap .bn-lang-switcher-mobile {
    display: inline-flex !important;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
  }
}

@media (min-width: 1025px) {
  .bn-header-bar.nav-refonte .bn-header-menu-trigger {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .bn-header-bar.nav-refonte .bn-header-inner {
    min-height: 64px;
    padding: 0 1rem;
  }

  .bn-header-bar.nav-refonte .brief-btn.bn-header-cta {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .bn-header-cta-wrap {
    min-width: 0;
    max-width: 50%;
  }
}

/* ---- Menu mobile (drawer) : ordre et Big Flux + New ---- */
.navbar-mobile .navbar-mobile-el a.bn-nav-flux-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.navbar-mobile .bn-nav-badge-new {
  font-size: 9px;
  padding: 2px 6px;
}

/* Menu mobile : Ressources fermé par défaut, s'ouvre au clic */
.navbar-mobile-ressources-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.navbar-mobile-ressources-toggle .bn-nav-chevron-mobile {
  display: inline-flex;
  transition: transform 0.2s ease;
}
.navbar-mobile-ressources.expanded .bn-nav-chevron-mobile {
  transform: rotate(180deg);
}
.navbar-mobile-ressources-sublinks {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
}
.navbar-mobile-ressources.expanded .navbar-mobile-ressources-sublinks {
  max-height: 320px;
  padding-bottom: 16px;
}
.navbar-mobile-ressources-sublinks a {
  font-size: 0.95rem;
  opacity: 0.9;
}
.navbar-mobile-ressources-sublinks a:hover {
  opacity: 1;
}