/* ── Header iRevenge ────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(8,8,8,0.96);
  border-bottom: 1px solid var(--border-sub);
  backdrop-filter: blur(8px);
  z-index: 500;
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 100%;
  padding: 0 16px;
  gap: 6px;
}

/* ── Logo ───────────────────────────────────────────────────── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-right: 6px;
}
.nav-logo a {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-logo img {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}
.nav-logo-text {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 3px;
  overflow: hidden;
  display: inline-block;
}
.nav-logo-text span { color: var(--accent); }
.nav-logo-text::after {
  content: '';
  position: absolute;
  bottom: 0; left: -40%;
  width: 40%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 2px;
  animation: navUnderline 2s ease-in-out infinite;
}
@keyframes navUnderline {
  0%   { left: -40%; }
  100% { left: 110%; }
}

/* ── Icone maison ───────────────────────────────────────────── */
.nav-home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--accent);
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(192,57,43,0.25);
  background: rgba(192,57,43,0.08);
  transition: color var(--t), background var(--t), border-color var(--t);
  flex-shrink: 0;
}
.nav-home-btn:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* ── Bouton Agenda (logo area) ──────────────────────────────── */
.nav-agenda-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 28px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(192,57,43,0.3);
  background: rgba(192,57,43,0.08);
  text-decoration: none;
  transition: color var(--t), background var(--t), border-color var(--t);
  flex-shrink: 0;
}
.nav-agenda-btn i { font-size: 0.8rem; }
.nav-agenda-btn:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
/* agenda-btn masqué sur mobile → voir mobile.css */

/* ── Nav principal (desktop) ────────────────────────────────── */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  align-self: stretch;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-item > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 9px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.nav-item > a::after {
  content: '';
  position: absolute;
  bottom: 2px; left: -40%;
  width: 40%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 2px;
  opacity: 0;
  transition: opacity .2s;
}
.nav-item:hover > a::after {
  opacity: 1;
  animation: navUnderline 1.2s ease-in-out infinite;
}
/* ── Entrée avec l'état "survolé" figé en permanence (Classement AoS) ── */
.nav-item > a.nav-always-hover {
  color: var(--text);
  background: var(--bg-2);
}
.nav-item > a.nav-always-hover::after {
  opacity: 1;
  animation: navUnderline 3s ease-in-out infinite;
}

/* ── Entrées "flashy" (Tournois / Node Wars / Ranked AoS 3v3) ─── */
.nav-flashy {
  animation: navFlashyPulse 3.2s ease-in-out infinite;
}
.nav-item:hover > .nav-flashy,
.mobile-section > .nav-flashy:hover {
  animation-play-state: paused;
  color: #fff !important;
}
@keyframes navFlashyPulse {
  0%, 100% {
    color: var(--text-muted);
    text-shadow: none;
  }
  50% {
    color: #ff8a7a;
    text-shadow: 0 0 6px rgba(255,138,122,0.85), 0 0 14px rgba(192,57,43,0.5);
  }
}

.nav-item > a .arrow {
  font-size: 1.05rem;
  color: #ff8a7a;
  display: inline-block;
  animation: navArrowBlink 1.6s ease-in-out infinite;
  transition: transform var(--t);
}
.nav-item:hover > a {
  color: var(--text);
  background: var(--bg-2);
}
.nav-item:hover > a .arrow { transform: rotate(180deg); }
@keyframes navArrowBlink {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

/* Actif (via bodyClass) */
.nav-item.active > a { color: var(--accent); }

/* ── Dropdown ───────────────────────────────────────────────── */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-sub);
  border-radius: var(--radius);
  padding: 14px 6px 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 100;
}
.nav-item:hover .dropdown-menu { display: flex; animation: fadeInFast 0.15s ease; }

.dropdown-menu a {
  display: block;
  padding: 9px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t);
  white-space: nowrap;
}
.dropdown-menu a:hover {
  color: var(--text);
  background: var(--bg-2);
}
.dropdown-menu a.active { color: var(--accent); }

/* Trait coloré en haut du dropdown */
.dropdown-menu::before {
  content: '';
  display: block;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  margin: -6px -6px 6px -6px;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* ── Séparateur vertical animé ─────────────────────────────── */
.nav-sep {
  width: 2px;
  height: 22px;
  background: #1e1e1e;
  border-radius: 2px;
  flex-shrink: 0;
  margin: 0 6px;
  position: relative;
  overflow: hidden;
}
.nav-sep span {
  position: absolute;
  left: 0; top: -40%;
  width: 100%; height: 40%;
  background: linear-gradient(180deg, transparent, #e74c3c, transparent);
  animation: navSepSlide 2s ease-in-out infinite;
  border-radius: 2px;
}
@keyframes navSepSlide {
  0%   { top: -40%; }
  100% { top: 130%; }
}

/* ── Divider dans dropdown ──────────────────────────────────── */
.dropdown-divider {
  height: 1px;
  background: var(--border-sub);
  margin: 5px 6px;
  position: relative;
  overflow: hidden;
}
.dropdown-divider::after {
  content: '';
  position: absolute;
  top: 0; left: -30%;
  width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, #ff8a7a, transparent);
  animation: navUnderline 2s ease-in-out infinite;
}

/* ── Séparateur marqué (coupure plus nette entre deux groupes) ── */
.dropdown-divider--strong {
  height: 2px;
  margin: 9px 6px;
  background: linear-gradient(90deg, transparent, rgba(255,138,122,0.45), transparent);
}
.dropdown-divider--strong::after {
  width: 50%;
  left: -50%;
  background: linear-gradient(90deg, transparent, #ff8a7a, #fff, #ff8a7a, transparent);
  box-shadow: 0 0 6px rgba(255,138,122,0.7);
}

/* ── Sous-menu imbriqué (Arène of Arsha dans PVP) ──────────── */
.dropdown-sub {
  position: relative;
}
.dropdown-sub::after {
  content: '';
  position: absolute;
  top: 0;
  left: 100%;
  width: 12px;
  height: 100%;
}
.dropdown-sub-trigger {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t);
  white-space: nowrap;
  cursor: pointer;
  border-top: none;
  margin-top: 0;
}
.dropdown-sub-trigger:hover,
.dropdown-sub:hover > .dropdown-sub-trigger {
  color: var(--accent) !important;
  background: var(--bg-2);
}
.arrow-right {
  font-size: 1.1rem;
  color: var(--accent);
  margin-left: 8px;
  animation: arrowBlink 1.2s ease-in-out infinite;
}
@keyframes arrowBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}
.dropdown-sub-menu {
  display: none;
  position: absolute;
  top: -6px;
  left: calc(100% + 6px);
  min-width: 210px;
  background: var(--bg-card);
  border: 1px solid var(--border-sub);
  border-radius: var(--radius);
  padding: 6px;
  flex-direction: column;
  gap: 2px;
  box-shadow: 12px 12px 32px rgba(0,0,0,.6);
  z-index: 101;
}
.dropdown-sub-menu::before {
  content: '';
  display: block;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius) var(--radius) 0 0;
  margin: -6px -6px 6px -7px;
}
.dropdown-sub:hover .dropdown-sub-menu { display: flex; animation: fadeInFast 0.15s ease; }
.dropdown-sub-menu a {
  display: block;
  padding: 9px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t);
  white-space: nowrap;
}
.dropdown-sub-menu a:hover { color: var(--text); background: var(--bg-2); }

.mobile-sub-link { padding-left: 24px !important; }

/* ── Nav droite (auth + user) ───────────────────────────────── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-points {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-2);
  border: 1px solid var(--border-sub);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
}

.nav-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--border-sub);
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.nav-icon-btn:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--bg-card);
}

/* Admin badge */
.nav-admin-btn {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.nav-admin-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* Burger + mobile menu → voir mobile.css */
