/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}
.site-header.scrolled {
  background: rgba(8, 10, 13, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--c-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(20px, 4vw, 60px);
  max-width: var(--max-w);
  margin: 0 auto;
  height: 96px;
}

/* ============================================================
   LOGO — s'adapte automatiquement à la hauteur du menu
   ============================================================ */
.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100%;
  padding: 8px 0;
}

/* Logo X2 */
.nav-brand img,
.nav-brand a img,
.nav-brand .custom-logo-link img,
.nav-brand .custom-logo,
.site-header img.custom-logo {
  height: 80px !important;
  width: auto !important;
  max-width: 260px !important;
  max-height: 80px !important;
  min-height: unset !important;
  object-fit: contain !important;
  filter: brightness(1.05) !important;
  display: block !important;
}

/* Le lien wrapper WP */
.nav-brand a,
.nav-brand .custom-logo-link {
  display: flex !important;
  align-items: center !important;
  height: 80px !important;
  line-height: 0 !important;
}

/* Fallback texte */
.nav-brand-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  gap: 7px;
  align-items: baseline;
}
.nav-brand-first { color: var(--c-white); }
.nav-brand-last  { color: var(--c-blue); }

/* Fallback texte */
.nav-brand-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  gap: 7px;
  align-items: baseline;
}
.nav-brand-first { color: var(--c-white); }
.nav-brand-last  { color: var(--c-blue); }

/* ============================================================
   LIENS NAV
   ============================================================ */
.nav-menu { flex: 1; display: flex; justify-content: center; }
.nav-links { display: flex; gap: 6px; list-style: none; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgb(2, 104, 111);
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1.5px solid rgb(2, 104, 111);
  transition: background 0.25s ease,
              color 0.25s ease,
              border-color 0.25s ease,
              transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
/* Shimmer au hover */
.nav-links a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  transform: translateX(-100%);
  transition: transform 0.35s ease;
}
.nav-links a:hover::before { transform: translateX(0); }

.nav-links a:hover,
.nav-links a.active {
  background: #ffffff;
  color: #0a0a0a;
  border-color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(255,255,255,0.2);
}
.nav-links a::after { display: none; }
.nav-links .nav-emoji {
  font-size: 15px;
  line-height: 1;
  filter: brightness(0) invert(1);
  transition: filter 0.25s ease, transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.nav-links a:hover .nav-emoji {
  filter: none;
  transform: scale(1.3) rotate(-8deg);
}

/* ============================================================
   ZONE DROITE : COUNTDOWN + LANG + CTA
   ============================================================ */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* ---- Countdown dans la nav ---- */
.nav-countdown {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  border-left: 0.5px solid var(--c-border);
  padding-left: 14px;
}
.nav-countdown-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(58,143,255,0.65);
  white-space: nowrap;
}
.nav-countdown-digits {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-cd-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nav-cd-num {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  color: var(--c-white);
  line-height: 1;
  letter-spacing: -0.01em;
}
.nav-cd-unit {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: var(--c-muted-2);
  text-transform: uppercase;
  margin-top: 1px;
}
.nav-cd-sep {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: rgba(58,143,255,0.5);
  margin-bottom: 10px;
  line-height: 1;
}

/* ============================================================
   SÉLECTEUR DE LANGUE — piloté par JS (clic, pas hover)
   ============================================================ */
.lang-switcher {
  position: relative;
}
.lang-current {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #ffffff;
  background: rgb(2, 104, 111);
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(2,104,111,0);
}
.lang-current:hover {
  background: rgb(3, 126, 134);
  box-shadow: 0 0 12px rgba(2,104,111,0.4);
}
.lang-globe {
  font-size: 13px;
  line-height: 1;
  filter: brightness(10);  /* force blanc sur fond teal */
}
.lang-current-code { text-transform: uppercase; }
.lang-chevron {
  font-size: 9px;
  color: rgba(255,255,255,0.6);
  transition: transform 0.2s;
  display: inline-block;
}
.lang-switcher.open .lang-current {
  background: rgb(3, 126, 134);
  color: #ffffff;
}
.lang-switcher.open .lang-chevron { transform: rotate(180deg); }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(10, 14, 20, 0.99);
  border: 0.5px solid var(--c-border-2);
  border-radius: 4px;
  list-style: none;
  min-width: 148px;
  z-index: 500;
  overflow: hidden;
  /* Petit pont invisible entre le bouton et le dropdown */
  padding-top: 0;
}
/* Zone de sécurité — empêche le dropdown de se fermer entre bouton et liste */
.lang-dropdown::before {
  content: '';
  position: absolute;
  top: -8px; left: 0; right: 0;
  height: 8px;
}
.lang-switcher.open .lang-dropdown { display: block; }

.lang-dropdown li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--c-border);
  transition: background 0.15s;
}
.lang-dropdown li:last-child a { border-bottom: none; }
.lang-dropdown li a:hover { background: rgba(58,143,255,0.1); }
.lang-dropdown li.lang-active a { background: rgba(58,143,255,0.12); }
.lang-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--c-blue);
  letter-spacing: 0.1em;
  min-width: 26px;
}
.lang-label { font-size: 12px; color: rgba(160,180,210,0.7); }

/* CTA */
.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--c-blue);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.nav-cta:hover { background: #5aa3ff; transform: translateY(-1px); }

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--c-white);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-burger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 20px clamp(20px, 4vw, 60px) 28px;
  background: rgba(8, 10, 13, 0.98);
  border-top: 0.5px solid var(--c-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.mobile-menu.open { max-height: 500px; display: flex; }
.mobile-links { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.mobile-links a {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--c-white);
  padding: 8px 0;
  border-bottom: 0.5px solid var(--c-border);
  letter-spacing: 0.04em;
}
.mobile-lang {
  display: flex;
  gap: 8px;
  padding: 20px 0 8px;
  border-top: 0.5px solid var(--c-border);
  margin-top: 16px;
}
.mobile-lang-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  border: 0.5px solid var(--c-border);
  border-radius: 3px;
  color: rgba(160,180,210,0.4);
  transition: color 0.2s, border-color 0.2s;
}
.mobile-lang-btn.active {
  color: var(--c-blue);
  border-color: var(--c-blue);
}

/* Responsive */
@media (max-width: 900px) {
  .nav-menu { display: none; }
  .nav-countdown { display: none; }
}
@media (max-width: 768px) {
  .nav-burger { display: flex; }
  .lang-label { display: none; }
}
@media (max-width: 480px) {
  .nav-cta span { display: none; }
  .nav-cta { padding: 8px 12px; }
}

/* Bouton Live tracker dans la nav */
.nav-tracker-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-white);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid rgba(2,104,111,0.4);
  border-radius: 4px;
  transition: background 0.2s, border-color 0.2s;
}
.nav-tracker-btn:hover {
  background: rgba(2,104,111,0.15);
  border-color: var(--c-teal);
}
.nav-tracker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(2,104,111);
  animation: cdBlink 1s ease-in-out infinite;
}

/* Animation d'entrée du menu — cascade */
.nav-links li {
  opacity: 0;
  transform: translateY(-8px);
  animation: navItemIn 0.4s ease forwards;
}
.nav-links li:nth-child(1) { animation-delay: 0.1s; }
.nav-links li:nth-child(2) { animation-delay: 0.18s; }
.nav-links li:nth-child(3) { animation-delay: 0.26s; }
.nav-links li:nth-child(4) { animation-delay: 0.34s; }
.nav-links li:nth-child(5) { animation-delay: 0.42s; }

@keyframes navItemIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Sélecteur de langue dans le footer — dropdown vers le haut */
.footer-bottom-lang .lang-switcher { position: relative; }
.footer-bottom-lang .lang-dropdown {
  top: auto;
  bottom: calc(100% + 8px);
  right: 0;
  z-index: 9999;
}
