/* ============================================================
   HEADER – BleuBlancDunk
   Nav sombre moderne 2026
   ============================================================ */

/* ---- TOPBAR ---- */
.topbar-v2 {
  position: relative;
  z-index: 100;
  background: #f1f5f9;
  padding-top: env(safe-area-inset-top, 0px);
}

/* ---- BANNIERE ---- */
.hv2-banner {
  width: 100%;
  background: #030d1a;
}

.hv2-banner-inner {
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 28px 24px 26px;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 70% 180% at 50% -20%, rgba(0,85,164,.32) 0%, transparent 65%),
    radial-gradient(ellipse 25% 80% at 8%  110%, rgba(239,65,53,.14) 0%, transparent 55%),
    radial-gradient(ellipse 25% 80% at 92% 110%, rgba(0,85,164,.14) 0%, transparent 55%),
    radial-gradient(ellipse 45% 50% at 50% 100%, rgba(15,30,60,.6) 0%, transparent 70%);
}

/* Filet tricolore en haut de la banniere */
.hv2-banner::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg,
    #0055A4 0% 33.33%,
    #ffffff 33.33% 66.66%,
    #EF4135 66.66% 100%
  );
}

/* Filet tricolore entre banniere et nav */
.hv2-banner::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg,
    #0055A4 0% 33.33%,
    rgba(255,255,255,.5) 33.33% 66.66%,
    #EF4135 66.66% 100%
  );
  opacity: .6;
}

.hv2-banner-link {
  display: block;
  width: 100%;
  text-align: center;
}

.hv2-banner-logo {
  display: block;
  margin: 0 auto;
  width: min(428px, 81%);
  height: auto;
  filter: drop-shadow(0 4px 28px rgba(0,85,164,.5)) drop-shadow(0 2px 12px rgba(0,0,0,.6));
  transition: filter .22s ease, transform .22s ease;
}

.hv2-banner-link:hover .hv2-banner-logo {
  filter: drop-shadow(0 8px 36px rgba(0,85,164,.65)) drop-shadow(0 2px 8px rgba(0,0,0,.55));
  transform: translateY(-3px) scale(1.01);
}

/* ---- NAV STICKY ---- */
.hv2-nav-sticky {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff;
  border-bottom: 1px solid #e8edf2;
  box-shadow:
    0 1px 0 rgba(0,0,0,.04),
    0 4px 20px rgba(0,0,0,.06);
}

/* ---- NAV WRAP + CARD ---- */
.hv2-nav-wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.hv2-nav-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  padding: 0 12px;
}

/* ---- ONGLETS ---- */
.hv2-tabs {
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow: visible;
}

/* Liens directs et boutons dropdown partagent le meme style */
.hv2-tabs > a,
.hv2-dropdown-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 52px;
  padding: 0 14px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: .015em;
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}

/* Indicateur actif — barre bleue en bas */
.hv2-tabs > a::after,
.hv2-dropdown-trigger::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8px; right: 8px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #2563eb;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .18s ease;
}

.hv2-tabs > a:hover,
.hv2-dropdown-trigger:hover {
  color: #111827;
  background: rgba(0,0,0,.04);
}

.hv2-tabs > a.active,
.hv2-dropdown.active .hv2-dropdown-trigger {
  color: #1d4ed8;
  background: rgba(29,78,216,.05);
}

.hv2-dropdown.is-open .hv2-dropdown-trigger {
  color: #1d4ed8;
  background: rgba(29,78,216,.05);
}

.hv2-tabs > a:hover::after,
.hv2-tabs > a.active::after,
.hv2-dropdown.active .hv2-dropdown-trigger::after,
.hv2-dropdown.is-open .hv2-dropdown-trigger::after {
  transform: scaleX(1);
}

/* ---- CHEVRON SVG ---- */
.hv2-chevron {
  width: 9px;
  height: 6px;
  flex-shrink: 0;
  opacity: .4;
  transition: transform .18s ease, opacity .15s ease;
}

.hv2-dropdown-trigger:hover .hv2-chevron,
.hv2-dropdown.active .hv2-chevron {
  opacity: .65;
}

.hv2-dropdown.is-open .hv2-chevron {
  transform: rotate(180deg);
  opacity: .9;
}

/* ---- DROPDOWN ---- */
.hv2-dropdown {
  position: relative;
  display: flex;
  align-items: stretch;
}

.hv2-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 210px;
  background: #fff;
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.06),
    0 8px 24px rgba(0,0,0,.18),
    0 24px 56px rgba(0,0,0,.22);
  padding: 6px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.hv2-dropdown.is-open .hv2-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Arrow pointer vers la nav */
.hv2-dropdown-panel::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 10px;
  background: #fff;
  border-radius: 2px;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  box-shadow: 0 -2px 4px rgba(0,0,0,.06);
}

.hv2-dropdown-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: #1e293b;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .1s ease;
}

.hv2-dropdown-panel a:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.hv2-dropdown-panel a.active {
  background: #eff6ff;
  color: #0055A4;
}

/* Separateur dans le dropdown */
.hv2-panel-sep {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 8px;
}

/* Badge "2026" */
.hv2-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0055A4 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .04em;
}

/* ---- DROITE : social + user ---- */
.hv2-right {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hv2-x-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8faff;
  color: #374151;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}

.hv2-x-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #111827;
}

.hv2-discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background: #5865F2;
  border: none;
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  transition: background .12s ease, transform .12s ease;
}

.hv2-discord-btn:hover {
  background: #4752c4;
  transform: translateY(-1px);
}

.hv2-discord-icon {
  width: 16px;
  height: 16px;
  fill: #fff;
  flex-shrink: 0;
}

/* ---- USER MENU ---- */
.hv2-user-menu {
  position: relative;
}

.hv2-user-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8faff;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}

.hv2-user-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.hv2-user-icon {
  width: 20px;
  height: 20px;
  fill: #4b5563;
}

.hv2-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  padding: 6px;
  background: #fff;
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.06),
    0 8px 24px rgba(0,0,0,.18),
    0 24px 56px rgba(0,0,0,.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .14s ease, transform .14s ease;
  z-index: 300;
}

.hv2-user-menu.is-open .hv2-user-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hv2-dropdown-label {
  padding: 8px 12px 6px;
  font-size: 10px;
  font-weight: 900;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hv2-dropdown-link {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  color: #1e293b;
  transition: background .1s;
}

.hv2-dropdown-link:hover { background: #f1f5f9; }

/* ---- BURGER MOBILE ---- */
.hv2-burger {
  display: none;
}

/* ============================================================
   MOBILE (<= 768px)
   ============================================================ */
@media (max-width: 768px) {

  .hv2-banner-inner {
    min-height: 78px;
    padding: 8px 16px;
    justify-content: center;
  }

  .hv2-banner-logo {
    width: min(210px, 62%);
  }

  .hv2-nav-card {
    padding: 0 10px;
    min-height: 48px;
  }

  .hv2-tabs {
    display: none;
  }

  .hv2-discord-text {
    display: none;
  }

  .hv2-discord-btn {
    width: 34px;
    padding: 0;
    justify-content: center;
  }

  .hv2-burger {
    display: inline-flex;
    width: 36px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8faff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 0;
  }

  .hv2-burger span {
    display: block;
    width: 16px;
    height: 1.5px;
    border-radius: 999px;
    background: #374151;
    transition: transform .18s ease, opacity .18s ease;
  }

  /* ---- DRAWER MOBILE ---- */
  .hv2-mobile-menu {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease;
  }

  .hv2-mobile-menu.is-open {
    pointer-events: auto;
    opacity: 1;
  }

  .hv2-mobile-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(5,10,25,.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .hv2-mobile-panel {
    position: absolute;
    top: 0; left: 0;
    width: min(88vw, 310px);
    height: 100%;
    z-index: 2;
    background: #fff;
    box-shadow: 20px 0 60px rgba(0,0,0,.35);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .24s cubic-bezier(.25,.46,.45,.94);
    overflow-y: auto;
  }

  .hv2-mobile-menu.is-open .hv2-mobile-panel {
    transform: translateX(0);
  }

  .hv2-mobile-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #0b1628;
  }

  .hv2-mobile-head::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg,
      #0055A4 0% 33%,
      #f0f0f0 33% 67%,
      #EF4135 67% 100%
    );
  }

  .hv2-mobile-head img {
    height: 36px;
    width: auto;
  }

  .hv2-mobile-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.75);
    font-size: 17px;
    cursor: pointer;
    transition: background .12s;
  }

  .hv2-mobile-close:hover {
    background: rgba(255,255,255,.14);
    color: #fff;
  }

  .hv2-mobile-links {
    display: flex;
    flex-direction: column;
    padding: 10px;
    flex: 1;
  }

  /* En-tete de section (Francais, NBA, Outils...) */
  .hv2-mm-section {
    padding: 14px 10px 4px;
    font-size: 10px;
    font-weight: 900;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .08em;
  }

  .hv2-mm-section:first-child {
    padding-top: 6px;
  }

  .hv2-mm-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    transition: background .1s;
  }

  .hv2-mm-link:hover { background: #f1f5f9; }

  .hv2-mm-link--primary {
    background: #0055A4;
    color: #fff;
    margin-top: 4px;
  }

  .hv2-mm-link--primary:hover { background: #003f82; }

  .hv2-mm-link--danger { color: #dc2626; }

  .hv2-mm-sep {
    height: 1px;
    margin: 8px 2px;
    background: #e2e8f0;
  }

  .hv2-mm-user {
    padding: 10px 12px 4px;
    font-size: 13px;
    color: #64748b;
    font-weight: 700;
  }

  .hv2-user-dropdown {
    right: auto;
    left: 0;
  }
}

@media (min-width: 769px) {
  .hv2-mobile-menu { display: none !important; }
}

/* ============================================================
   PWA STANDALONE — banner plus compact
   ============================================================ */
@media (display-mode: standalone) {
  .hv2-banner-inner {
    min-height: 72px;
    padding: 10px 16px;
    justify-content: center;
    align-items: center;
  }
  .hv2-banner-link {
    width: 100%;
    justify-content: center;
  }
  .hv2-banner-logo {
    width: min(180px, 59%);
    margin: 0 auto;
  }
}

.hv2-wnba-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid rgba(255,105,0,.35);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #c25200;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.hv2-wnba-switch-btn:hover { background: rgba(255,105,0,.08); color: #a14300; }

/* Masquer la nav sticky sur mobile : la bottom nav la remplace */
@media (max-width: 800px) {
  .hv2-nav-sticky { display: none; }
}
