/* ============================================================
   CDM 2026 — Design System Modern
   Palette : Or · Noir profond · Blanc cassé
   ============================================================ */

/* ── POLICES LOCALES ────────────────────────────────────────── */
@font-face {
  font-family: 'NewTitle';
  src: url('../fonts/newtitle/NewTitle-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NewTitle';
  src: url('../fonts/newtitle/NewTitle-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NewTitle';
  src: url('../fonts/newtitle/NewTitle-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NewTitle';
  src: url('../fonts/newtitle/NewTitle-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NewTitle';
  src: url('../fonts/newtitle/NewTitle-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NewTitle';
  src: url('../fonts/newtitle/NewTitle-Extralight.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Urbanist';
  src: url('../fonts/urbanist/Urbanist-Regular.woff2') format('woff2'),
       url('../fonts/urbanist/Urbanist-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Urbanist';
  src: url('../fonts/urbanist/Urbanist-ThinItalic.woff2') format('woff2'),
       url('../fonts/urbanist/Urbanist-ThinItalic.woff') format('woff');
  font-weight: 100;
  font-style: italic;
  font-display: swap;
}

/* ── TOKENS ────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-base:       #f5f3ee;
  --bg-primary:    #ede9e2;
  --bg-secondary:  #e5e1da;
  --bg-card:       #ffffff;
  --bg-card-hover: #faf8f5;
  --bg-elevated:   #e8e4dc;
  --bg-glass:      rgba(255,255,255,0.85);

  /* Borders */
  --border:        rgba(0,0,0,0.07);
  --border-light:  rgba(0,0,0,0.13);
  --border-gold:   rgba(140,106,14,0.35);

  /* Text — légèrement warm */
  --text-primary:  #191817;
  --text-secondary:#5c5854;
  --text-muted:    #9a9690;

  /* Gold — premium, pas trop brillant */
  --gold:          #9a7010;
  --gold-light:    #b88a18;
  --gold-dark:     #5e4508;
  --gold-glow:     rgba(154,112,16,0.15);
  --gold-subtle:   rgba(154,112,16,0.08);

  /* Accents */
  --red:           #c43840;
  --red-subtle:    rgba(196,56,64,0.07);
  --green:         #25906a;
  --green-subtle:  rgba(37,144,106,0.08);
  --blue:          #2e5fb8;

  /* Gradients */
  --gradient-gold: linear-gradient(135deg, #f0c040 0%, #d4a020 60%, #a87818 100%);
  --gradient-dark: linear-gradient(135deg, #ede9e2 0%, #e5e1da 50%, #ede9e2 100%);
  --gradient-card: linear-gradient(135deg, rgba(0,0,0,0.015) 0%, rgba(0,0,0,0.005) 100%);
  --gradient-hero: radial-gradient(ellipse 160% 100% at 60% 0%, #ede4c0 0%, #ede9e2 50%, #f5f3ee 100%);

  /* Shape */
  --radius-xs: 0;
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;
  --radius-2xl: 0;

  /* Shadow */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.07);
  --shadow-md:   0 4px 24px rgba(0,0,0,0.09);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.11);
  --shadow-gold: 0 4px 24px rgba(154,112,16,0.1), 0 0 0 1px var(--border-gold);

  /* Fonts */
  --font-head: 'NewTitle', sans-serif;
  --font-body: 'Urbanist', sans-serif;

  /* Type scale */
  --type-h1:      6rem;
  --type-h2:      4.5rem;
  --type-h3:      3.5rem;
  --type-h4:      2.75rem;
  --type-h5:      2.25rem;
  --type-h6:      2rem;
  --type-body:    1rem;
  --type-small:   0.875rem;
  --type-caption: 0.75rem;
  --type-btn:     0.95rem;

  --nav-h: 68px;
}




/* Grille aperçu home (2 colonnes) */
.groups-layout--preview { grid-template-columns: repeat(2, 1fr); }

/* Sidebar — état vide (coming soon) */
.sidebar-empty {
  padding: 20px 0; text-align: center;
  font-size: 0.83rem; color: var(--text-muted);
}
.sidebar-empty__icon {
  font-size: 1.5rem; opacity: 0.28;
  display: block; margin-top: 8px;
}

/* Stats band — avec espacement haut */
.stats-band--mt { margin-top: 48px; }

/* Bouton toggle thème */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.35s, color 0.25s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-gold);
  color: var(--gold);
  transform: rotate(22deg) scale(1.1);
}
.theme-toggle:active { transform: rotate(22deg) scale(0.95); }

/* Transition douce lors du changement de thème */
body.theme-transitioning,
body.theme-transitioning * {
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease !important;
}

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
ul { list-style: none; }
input { font-family: inherit; }

/* ── ÉCHELLE TYPOGRAPHIQUE ─────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
h1 { font-size: var(--type-h1); }
h2 { font-size: var(--type-h2); }
h3 { font-size: var(--type-h3); }
h4 { font-size: var(--type-h4); }
h5 { font-size: var(--type-h5); }
h6 { font-size: var(--type-h6); }

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated);  }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── SÉLECTION ─────────────────────────────────────────────── */
::selection { background: rgba(201,162,39,0.25); color: var(--gold-light); }

/* ============================================================
   SCROLL REVEAL — injecté par effects.js
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }
[data-delay="5"] { transition-delay: 0.40s; }
[data-delay="6"] { transition-delay: 0.48s; }

/* ============================================================
   CURSOR GLOW (desktop uniquement, injecté par effects.js)
   ============================================================ */
.cursor-glow {
  pointer-events: none;
  position: fixed;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,39,0.055) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: opacity 0.4s;
  will-change: transform;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(10,8,2,0.96);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid rgba(201,162,39,0.25);
  box-shadow: 0 2px 24px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, background 0.35s, box-shadow 0.35s, border-color 0.35s;

  --text-primary:   #f0ece6;
  --text-secondary: rgba(240,236,230,0.68);
  --text-muted:     rgba(240,236,230,0.42);
  --border:         rgba(255,255,255,0.08);
  --gold:           #f0c040;
  --gold-light:     #f5d060;
}
.navbar--hidden { transform: translateY(-100%); }
.navbar.scrolled {
  background: rgba(8,6,2,0.92);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border-bottom-color: rgba(201,162,39,0.45);
  box-shadow: 0 4px 32px rgba(0,0,0,0.5);
}
.navbar__inner {
  max-width: 1400px; margin: 0 auto; width: 100%;
  padding: 0 28px;
  display: flex; align-items: center; gap: 28px; height: 100%;
}
.navbar__logo {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  font-family: var(--font-head); font-size: 2.5rem; font-weight: 700;
  letter-spacing: 0.5px; color: #f0c040;
}
.navbar__logo img { height: 52px; width: auto; transition: opacity 0.25s ease, transform 0.25s ease; }
.navbar.menu-open .navbar__logo img { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.navbar__logo-text { color: var(--text-muted); font-weight: 400; }
.navbar__logo-accent { color: var(--gold); }
.navbar__nav { display: flex; gap: 2px; flex: 1; position: relative; }
/* Indicateur actif */
.nav-indicator {
  position: absolute; bottom: -1px; height: 2px;
  background: var(--gradient-gold);
  border-radius: 2px 2px 0 0;
  transition: left 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 10px var(--gold-glow);
}
.navbar__nav a {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500; color: rgba(240,192,64,0.7);
  transition: color 0.2s, background 0.2s;
  position: relative; white-space: nowrap;
}
.navbar__nav a:hover { color: #f0c040; background: rgba(201,162,39,0.08); }
.navbar__nav a.active { color: #f0c040; }
.navbar__nav a .nav-icon { font-size: 0.9em; opacity: 0.8; }
.navbar__right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.badge-live {
  display: flex; align-items: center; gap: 6px;
  background: rgba(224,92,101,0.1);
  border: 1px solid rgba(224,92,101,0.2);
  color: var(--red); padding: 5px 12px; 
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px;
}
.badge-live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); flex-shrink: 0;
  animation: livePulse 1.8s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.7); }
}
.navbar__nav { display: none; }
.navbar__burger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  padding: 10px; height: 44px; width: 44px; cursor: pointer;
  background: none; border: none; color: inherit;
}
.navbar__burger span {
  width: 22px; height: 2px; background: #f0c040;
   display: block;
  transition: width 0.4s cubic-bezier(0.22,1,0.36,1),
              transform 0.4s cubic-bezier(0.22,1,0.36,1),
              opacity 0.3s;
}
.navbar__burger span:nth-child(2) { width: 14px; }
.navbar__burger:hover span:nth-child(2) { width: 22px; }
.navbar__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 22px; }
.navbar__burger.is-open span:nth-child(2) { opacity: 0; width: 0; }
.navbar__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 22px; }

/* ============================================================
   NAV OVERLAY — Panneau flottant style Sunday
   ============================================================ */

/* Backdrop sombre derrière le panneau */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 998;
  background: rgba(0,0,0,0.2);
  opacity: 0; pointer-events: none;
  transition: opacity 0.45s;
}
.nav-backdrop.is-open { opacity: 1; pointer-events: all; }

/* Panneau — même largeur que la navbar */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: rgba(10,8,2,0.96);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid rgba(201,162,39,0.25);
  overflow: hidden;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.65s cubic-bezier(0.76, 0, 0.24, 1);
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);

  /* Tokens adaptés au fond sombre */
  --text-primary:   #f0ece6;
  --text-secondary: rgba(240,236,230,0.68);
  --text-muted:     rgba(240,236,230,0.42);
  --border:         rgba(255,255,255,0.08);
  --gold:           #f0c040;
  --gold-light:     #f5d060;
}
.nav-overlay.is-open {
  pointer-events: all;
  clip-path: inset(0 0 0% 0);
}

/* Le haut du panneau = espace libre pour laisser la navbar visible */
.nav-overlay__body {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 40px;
  padding: calc(var(--nav-h) + 28px) clamp(24px,5vw,56px) clamp(32px,4vw,52px);
}
/* Colonne gauche : logo + liens */
.nav-overlay__left { display: flex; flex-direction: column; gap: 28px; }
.nav-overlay__logo {
  display: block;
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.35s 0.1s ease, transform 0.35s 0.1s ease;
}
.nav-overlay__logo img { height: 110px; width: auto; }
.nav-overlay.is-open .nav-overlay__logo {
  opacity: 1;
  transform: translateY(0);
}
.nav-overlay__links { display: flex; flex-direction: column; gap: 0; }
.nav-overlay__link {
  font-family: var(--font-head);
  font-size: clamp(2.2rem,4.5vw,4.2rem);
  font-weight: 700; line-height: 1.2;
  color: var(--text-primary); text-decoration: none;
  display: flex; align-items: center; gap: 14px;
  opacity: 0; transform: translateX(-28px);
  transition: color 0.2s, opacity 0.5s, transform 0.5s;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.nav-overlay__link:last-child { border-bottom: none; }
.nav-overlay__link-icon { font-size: 0.48em; opacity: 0.4; transition: opacity 0.2s, transform 0.2s; }
.nav-overlay__link:hover { color: var(--gold); }
.nav-overlay__link:hover .nav-overlay__link-icon { opacity: 1; transform: scale(1.2); }
.nav-overlay__link.active { color: var(--gold-light); }
.nav-overlay.is-open .nav-overlay__link:nth-child(1) { opacity:1; transform:translateX(0); transition-delay:0.16s; }
.nav-overlay.is-open .nav-overlay__link:nth-child(2) { opacity:1; transform:translateX(0); transition-delay:0.22s; }
.nav-overlay.is-open .nav-overlay__link:nth-child(3) { opacity:1; transform:translateX(0); transition-delay:0.28s; }
.nav-overlay.is-open .nav-overlay__link:nth-child(4) { opacity:1; transform:translateX(0); transition-delay:0.34s; }

/* Carte feature à droite */
.nav-overlay__feature { display: flex; align-items: center; justify-content: center; }
.nav-overlay__feature-card {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
   padding: 24px;
  width: 100%; max-width: 340px;
  opacity: 0; transform: translateY(20px) scale(0.96);
  transition: opacity 0.5s 0.2s, transform 0.5s 0.2s;
}
.nav-overlay.is-open .nav-overlay__feature-card { opacity: 1; transform: translateY(0) scale(1); }
.nav-overlay__feat-title {
  font-family: var(--font-head); font-size: 1.44rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
}
.nav-overlay__feat-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.nav-overlay__feat-row:last-child { border-bottom: none; }
.nav-overlay__feat-num { font-family: var(--font-head); font-size: 3.6rem; font-weight: 700; color: var(--text-primary); }
.nav-overlay__feat-label { font-size: 0.78rem; color: var(--text-muted); }

/* Footer du panneau */
.nav-overlay__footer {
  padding: 14px clamp(24px,5vw,56px);
  border-top: 1px solid var(--border);
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
  font-size: 0.76rem; color: var(--text-muted);
  opacity: 0; transition: opacity 0.5s 0.28s;
}
.nav-overlay.is-open .nav-overlay__footer { opacity: 1; }
.nav-overlay__footer a { color: var(--gold); text-decoration: none; }
.nav-overlay__footer a:hover { text-decoration: underline; }

/* Bouton fermer */
.nav-overlay__close {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: none;
  color: var(--text-secondary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s, border-color 0.2s, transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.nav-overlay__close:hover { color: var(--text-primary); border-color: var(--gold); transform: rotate(90deg); }

/* ============================================================
   SIDENAV — Menu latéral vertical (style EWC)
   ============================================================ */
:root { --sidenav-w: 88px; }

.sidenav {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidenav-w);
  height: 100vh;
  z-index: 1001;
  background: #0a0802;
  border-right: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 2px 0 24px rgba(0,0,0,0.35);
  overflow: hidden;
}

.sidenav__logo {
  padding: 18px 0 14px;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.sidenav__logo a { display: flex; align-items: center; justify-content: center; }
.sidenav__logo img { width: 46px; height: auto; }

.sidenav__nav {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 10px 0;
  gap: 2px;
  overflow-y: auto;
}

.sidenav__item {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 72px;
  padding: 11px 0 9px;
  gap: 5px;
  color: rgba(240,236,230,0.42);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.sidenav__item:hover {
  color: #f0c040;
  background: rgba(201,162,39,0.08);
}
.sidenav__item.active { color: #f0c040; }
.sidenav__item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 58%;
  background: var(--gradient-gold);
}

.sidenav__icon {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
}
.sidenav__icon svg {
  width: 22px; height: 22px;
  stroke: currentColor; fill: none;
  stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

.sidenav__label {
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
  font-family: var(--font-body);
  line-height: 1;
}

.sidenav__bottom {
  padding: 14px 0 18px;
  border-top: 1px solid rgba(255,255,255,0.07);
  width: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Masquer sidenav sur mobile, afficher top navbar */
@media (max-width: 767px) {
  .sidenav { display: none; }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.page-wrapper { padding-top: var(--nav-h); min-height: 100vh; }

/* Sur desktop : décaler le contenu pour la sidenav */
@media (min-width: 768px) {
  .navbar      { left: var(--sidenav-w); width: calc(100% - var(--sidenav-w)); display: none; }
  .nav-overlay { left: var(--sidenav-w); width: calc(100% - var(--sidenav-w)); }
  .page-wrapper { padding-top: 0; padding-left: var(--sidenav-w); }

  /* Supprimer les offsets calculés avec --nav-h (navbar cachée) */
  .page-header { padding-top: 40px; }
  .tabs-bar    { top: 0; }
}
.container { max-width: 1380px; margin: 0 auto; padding: 0 28px; }
.section { padding: 64px 0; }

/* ── PAGE HEADER ──────────────────────────────────────────── */
.page-header {
  padding: calc(var(--nav-h) + 40px) 0 48px; position: relative; overflow: hidden;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}
.page-header::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 120% at 80% 50%, rgba(201,162,39,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 30% 60% at 0% 100%, rgba(201,162,39,0.03) 0%, transparent 50%);
}
.page-header__label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 2.5px;
  color: var(--gold); text-transform: uppercase; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.page-header__label::before { content: ''; width: 24px; height: 1px; background: var(--gold); }
.page-header h1 {
  font-family: var(--font-head); font-size: var(--type-h1);
  font-weight: 700; line-height: 1.08; color: var(--text-primary);
  position: relative;
}
.page-header h1 span { color: var(--gold); }
.page-header p { color: var(--text-secondary); margin-top: 12px; max-width: 520px; font-size: 0.93rem; }

/* ============================================================
   HERO — Style EWC
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(6, 4, 0, 0.6);
  pointer-events: none; z-index: 1;
}
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}
.hero__center {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 60px 24px;
  width: 100%;
}

/* Badge date */
.hero__date-badge {
  color: rgba(255,255,255,0.55);
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 2.5px; text-transform: uppercase;
  margin-bottom: 32px;
}

/* Logo grand */
.hero__logo-wrap { margin-bottom: 28px; }
.hero__logo-big {
  height: clamp(110px, 18vw, 210px);
  width: auto;
  filter: drop-shadow(0 6px 40px rgba(240,192,64,0.35));
}

/* Bannière COUPE DU MONDE */
.hero__banner-wrap { display: flex; align-items: center; margin-bottom: 30px; }
.hero__banner {
  font-family: var(--font-head);
  font-size: clamp(var(--type-h1), 7vw, 5.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -1px;
  color: transparent;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  text-transform: uppercase;
}

/* Tagline */
.hero__tagline {
  font-size: clamp(0.62rem, 1.3vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 48px;
}

/* Countdown EWC */
.hero__countdown {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; justify-content: center;
}
.hero__cd-unit {
  background: rgba(10, 8, 2, 0.75);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 22px 32px 18px;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  min-width: 104px;
}
.hero__cd-num {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}
.hero__cd-label {
  font-size: 0.57rem; font-weight: 600;
  letter-spacing: 2.5px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}
.hero__cd-sep {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: rgba(255,255,255,0.25);
  font-weight: 700;
  line-height: 1;
  padding-bottom: 28px;
  flex-shrink: 0;
}

/* ── COUNTDOWN ─────────────────────────────────────────────── */
.countdown-card {
  background: rgba(255,255,255,0.8);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl); padding: 28px 28px 24px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative; overflow: hidden;
}
.countdown-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--gradient-gold); opacity: 0.6;
}
.countdown-card__label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 2px;
  color: var(--gold); text-transform: uppercase; margin-bottom: 4px;
}
.countdown-card__event {
  font-size: 0.95rem; font-weight: 600; color: var(--text-primary);
  margin-bottom: 22px; line-height: 1.4;
}
.countdown-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.countdown-unit {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 8px; text-align: center;
  position: relative; overflow: hidden;
}
.countdown-unit::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: var(--gradient-gold); opacity: 0.3;
}
.countdown-unit__num {
  font-family: var(--font-head); font-size: var(--type-h1); font-weight: 700;
  color: var(--gold-light); line-height: 1; display: block;
  text-shadow: 0 0 20px rgba(201,162,39,0.3);
}
.countdown-unit__label {
  font-size: 0.62rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1.5px; margin-top: 5px;
}
.countdown-card__date {
  font-size: 0.8rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px; margin-bottom: 14px;
}
.countdown-hosts { display: flex; gap: 8px; flex-wrap: wrap; }
.host-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 5px 10px;
  font-size: 0.75rem; color: var(--text-secondary);
  transition: border-color 0.2s;
}
.host-badge:hover { border-color: var(--border-gold); color: var(--text-primary); }
.host-badge img { width: 18px; height: 12px; object-fit: cover;  }

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius-md);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  border: none; font-family: var(--font-body);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  position: relative; overflow: hidden;
  letter-spacing: 0.2px;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s;
}
.btn:hover::after { background: rgba(0,0,0,0.04); }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--gradient-gold);
  color: #0a0a0b;
  box-shadow: 0 4px 20px rgba(201,162,39,0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,162,39,0.35);
}
.btn-outline {
  background: transparent; color: var(--gold);
  border: 1px solid var(--border-gold);
}
.btn-outline:hover {
  border-color: rgba(201,162,39,0.35);
  color: var(--gold-light);
  box-shadow: 0 0 0 1px rgba(201,162,39,0.1);
}
.btn-ghost { color: var(--text-secondary); padding: 10px 18px; }
.btn-ghost:hover { color: var(--gold); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; border-radius: var(--radius-sm); }

/* ============================================================
   CARDS GÉNÉRIQUES (avec tilt JS + gradient border)
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s, border-color 0.3s;
  will-change: transform;
}
/* Gradient border au hover */
.card::before {
  content: ''; position: absolute; inset: -1px;
  border-radius: inherit; z-index: -1;
  background: linear-gradient(135deg,
    rgba(201,162,39,0.4) 0%,
    rgba(201,162,39,0.1) 40%,
    transparent 60%);
  opacity: 0; transition: opacity 0.35s;
}
.card:hover { border-color: transparent; box-shadow: var(--shadow-gold); }
.card:hover::before { opacity: 1; }
/* Reflet interne */
.card__shine {
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%);
  transform: skewX(-20deg); pointer-events: none;
  transition: left 0.6s ease;
}
.card:hover .card__shine { left: 150%; }

/* ── SECTION TITLES ────────────────────────────────────────── */
.section-title {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px; gap: 12px;
}
.section-title__text {
  font-family: var(--font-head); font-size: var(--type-h2); font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.02em;
}
.section-title__text span { color: var(--gold); }
.section-title a {
  font-size: 0.82rem; color: var(--text-secondary); white-space: nowrap;
  display: flex; align-items: center; gap: 4px; transition: color 0.2s;
}
.section-title a:hover { color: var(--gold); }

/* ============================================================
   MATCH CARDS
   ============================================================ */
.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 22px;
  display: flex; align-items: center; gap: 16px;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  cursor: pointer; position: relative; overflow: hidden;
}
.match-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-gold);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px var(--border-gold);
  transform: translateX(3px);
}

.match-card__group {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 1px;
  color: var(--gold); text-transform: uppercase;
  background: var(--gold-subtle);
  border: 1px solid rgba(201,162,39,0.15);
  border-radius: var(--radius-xs); padding: 3px 8px; white-space: nowrap;
}
.match-card__teams {
  flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px;
}
.match-team { display: flex; align-items: center; gap: 10px; }
.match-team--away { flex-direction: row-reverse; text-align: right; }
.match-team__flag-link {
  display: flex; flex-shrink: 0;
  transition: transform 0.2s;
}
.match-team__flag-link:hover { transform: scale(1.1); }
.match-team__flag {
  width: 48px; height: 48px; object-fit: contain;
  background: none; flex-shrink: 0;
  filter: drop-shadow(3px 3px 5px rgba(0,0,0,0.38));
}
.match-team__flag-placeholder {
  width: 48px; height: 48px; flex-shrink: 0;
}
.match-team__name { font-size: 0.9rem; font-weight: 600; }
.match-score {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-head); font-size: var(--type-h3); font-weight: 700;
  white-space: nowrap;
}
.match-score__num { color: var(--text-primary); min-width: 26px; text-align: center; }
.match-score__sep { color: var(--text-muted); font-weight: 300; }
.match-score__vs {
  font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
  padding: 6px 12px; background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  letter-spacing: 1px;
}
.match-card__info { text-align: right; min-width: 96px; }
.match-card__date { font-size: 0.75rem; color: var(--text-muted); }
.match-card__time { font-size: 0.88rem; font-weight: 600; color: var(--text-secondary); }
.match-card__venue { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.match-status {
  display: inline-block; padding: 3px 9px; 
  font-size: 0.7rem; font-weight: 600; margin-top: 4px;
}
.match-status--upcoming {
  background: rgba(107,157,245,0.1);
  border: 1px solid rgba(107,157,245,0.15);
  color: var(--blue);
}
.match-status--live {
  background: rgba(224,92,101,0.1);
  border: 1px solid rgba(224,92,101,0.2);
  color: var(--red); animation: livePulse 1.5s infinite;
}
.match-status--finished {
  background: var(--green-subtle);
  border: 1px solid rgba(82,201,138,0.15);
  color: var(--green);
}
.matches-grid { display: flex; flex-direction: column; gap: 8px; }
.matches-group-header {
  padding: 16px 0 8px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-muted);
  border-top: 1px solid var(--border); margin-top: 12px;
  display: flex; align-items: center; gap: 8px;
}
.matches-group-header::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.matches-group-header:first-child { border-top: none; margin-top: 0; }

/* ── FILTRES ───────────────────────────────────────────────── */
.filters {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 16px;
}
.filter-btn {
  padding: 6px 14px; 
  font-size: 0.8rem; font-weight: 500; color: var(--text-secondary);
  background: transparent; border: 1px solid var(--border); cursor: pointer;
  transition: all 0.2s; letter-spacing: 0.1px;
}
.filter-btn:hover { color: var(--text-primary); border-color: var(--border-light); }
.filter-btn.active {
  background: var(--gold-subtle);
  border-color: rgba(201,162,39,0.25);
  color: var(--gold);
}

/* ============================================================
   GROUPES & CLASSEMENTS
   ============================================================ */
.groups-layout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.group-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.group-card:hover {
  border-color: var(--border-gold);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), inset 0 0 0 1px var(--border-gold);
}
.group-card__header {
  padding: 14px 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(201,162,39,0.04) 0%, transparent 100%);
}
.groups-carousel { display: flex; flex-direction: column; gap: 16px; }
.groups-carousel__track {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  transition: opacity 0.18s ease;
}
.groups-carousel__nav {
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.groups-carousel__btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-gold); background: none;
  color: var(--gold); font-size: 1rem; cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.groups-carousel__btn:hover:not(:disabled) { background: var(--gold); color: #fff; }
.groups-carousel__btn:disabled { opacity: 0.3; cursor: default; }
.groups-carousel__indicator { font-size: 0.8rem; color: var(--text-muted); min-width: 40px; text-align: center; }
.group-card__name {
  font-family: var(--font-head); font-size: var(--type-h4); font-weight: 700; color: var(--text-primary);
}
.group-card__name span { color: var(--gold); }
.standings-table { width: 100%; border-collapse: collapse; }
.standings-table th {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-muted); padding: 10px 12px;
  border-bottom: 1px solid var(--border); text-align: center;
  background: rgba(0,0,0,0.015);
}
.standings-table th:first-child { text-align: left; padding-left: 20px; }
.standings-table td {
  padding: 10px 12px; text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem; transition: background 0.2s;
}
.standings-table td:first-child { text-align: left; padding-left: 20px; }
.standings-table tr:last-child td { border-bottom: none; }
.standings-table tbody tr:hover td { background: rgba(0,0,0,0.03); }
.standings-rank {
  font-weight: 700; color: var(--text-muted); font-size: 0.85rem;
  display: inline-block; width: 18px; text-align: center;
}
.standings-rank.qualified { color: var(--green); }
.standings-rank.potential { color: var(--gold); }
.standings-team { display: flex; align-items: center; gap: 10px; }
.standings-flag,
.grp-match-flag {
  width: 28px; height: 28px;
  object-fit: contain;
  background: none;
  filter: drop-shadow(3px 3px 5px rgba(0,0,0,0.38));
  flex-shrink: 0;
}
.standings-flag-placeholder { width: 28px; height: 28px; }
.standings-name { font-weight: 500; }
.standings-pts { font-weight: 700; color: var(--text-primary); }
.standings-diff.pos { color: var(--green); }
.standings-diff.neg { color: var(--red); }
.qualifier-legend {
  display: flex; gap: 16px; padding: 10px 20px;
  border-top: 1px solid var(--border);
  font-size: 0.7rem; color: var(--text-muted);
}
.qualifier-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.qualifier-dot.q { background: var(--green); }
.qualifier-dot.p { background: var(--gold); }

/* ============================================================
   PAGE ÉQUIPES
   ============================================================ */
.teams-search { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.search-input {
  flex: 1; min-width: 200px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 18px;
  color: var(--text-primary); font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input:focus {
  outline: none;
  border-color: rgba(201,162,39,0.4);
  box-shadow: 0 0 0 3px rgba(201,162,39,0.06);
}
.search-input::placeholder { color: var(--text-muted); }
.conf-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.conf-tab {
  padding: 8px 16px;  font-size: 0.8rem; font-weight: 500;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s;
}
.conf-tab:hover { color: var(--text-primary); border-color: var(--border-light); }
.conf-tab.active {
  background: var(--gold-subtle);
  border-color: rgba(201,162,39,0.25); color: var(--gold);
}
.teams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }

/* TEAM CARD */
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer; display: block; position: relative;
  will-change: transform;
}
.team-card:hover {
  border-color: var(--border-gold);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), var(--shadow-gold);
  transform: translateY(-5px);
}
.team-card__flag-wrap {
  height: 108px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated); padding: 20px;
  position: relative; overflow: hidden;
  transition: background 0.3s;
}
.team-card__flag-wrap::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.35) 100%);
}
.team-card__flag {
  height: 68px; width: auto; max-width: 108px; object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  transition: transform 0.3s;
  position: relative; z-index: 1;
}
.team-card:hover .team-card__flag { transform: scale(1.08); }
.team-card__flag-placeholder { height: 68px; width: 108px; background: var(--bg-primary);  }
.team-card__body { padding: 13px 15px; }
.team-card__name { font-weight: 600; font-size: 0.88rem; margin-bottom: 5px; }
.team-card__meta { display: flex; align-items: center; justify-content: space-between; }
.team-card__conf { font-size: 0.7rem; color: var(--text-muted); }
.team-card__group {
  font-size: 0.7rem; font-weight: 700; color: var(--gold);
  background: var(--gold-subtle); padding: 2px 7px; border-radius: var(--radius-xs);
}
.team-card__host {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: var(--gradient-gold); color: #0a0a0b;
  font-size: 0.62rem; font-weight: 700; padding: 3px 7px;
  border-radius: var(--radius-xs); text-transform: uppercase; letter-spacing: 0.5px;
}

/* ============================================================
   PAGE ÉQUIPE DÉTAIL
   ============================================================ */
.team-hero {
  padding: 52px 0; position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.team-hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.18) 0%, transparent 60%);
  pointer-events: none;
}
.team-hero__inner { display: flex; flex-direction: row; gap: 36px; align-items: center; position: relative; z-index: 1; }
.team-hero__flag-frame {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.team-hero__info { flex: 1; min-width: 0; }
.team-hero__flag {
  height: 110px; width: auto; max-width: 150px;
  object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.45));
}
.team-hero__flag-placeholder { height: 90px; width: 130px; background: rgba(255,255,255,0.1); }
.team-hero__confederation {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--gold); margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.team-hero__confederation::before { content: ''; width: 20px; height: 1px; background: var(--gold); }
.team-hero__name {
  font-family: var(--font-head); font-size: clamp(var(--type-h1), 6vw, 5rem); font-weight: 700;
  color: var(--text-primary); line-height: 1;
}
.team-hero__coach { font-size: 0.88rem; color: var(--text-secondary); margin-top: 10px; }
.team-hero__coach span { color: var(--text-primary); font-weight: 500; }
.team-hero__tags { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.team-tag {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.78rem; color: var(--text-secondary); transition: all 0.2s;
}
.team-tag strong { color: var(--text-primary); }
.team-tag--host {
  border-color: rgba(201,162,39,0.25);
  color: var(--gold); background: var(--gold-subtle);
}
.team-detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; padding: 36px 0; }

/* Squad */
.squad-grid { display: flex; flex-direction: column; gap: 6px; }
.squad-section-title {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--text-muted);
  padding: 16px 0 6px; margin-top: 6px;
  border-top: 1px solid var(--border);
}
.squad-section-title:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.player-card {
  display: grid; grid-template-columns: 30px 1fr auto;
  gap: 12px; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 10px 14px;
  transition: all 0.2s; position: relative;
}
.player-card:hover {
  background: var(--bg-card-hover); border-color: var(--border-gold);
  transform: translateX(3px);
}
.player-num {
  font-family: var(--font-head); font-size: 1.9rem; font-weight: 700;
  color: var(--text-muted); text-align: center;
}
.player-info__name { font-weight: 600; font-size: 0.88rem; }
.captain-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  background: var(--gradient-gold); 
  font-size: 0.6rem; font-weight: 700; color: #0a0a0b;
  margin-left: 6px; vertical-align: middle;
}
.player-info__club { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }
.player-pos {
  font-size: 0.7rem; font-weight: 700; padding: 3px 8px;
  border-radius: var(--radius-xs); white-space: nowrap; letter-spacing: 0.5px;
}
.player-pos--gb  { background: rgba(107,157,245,0.1); color: var(--blue); border: 1px solid rgba(107,157,245,0.15); }
.player-pos--dd,
.player-pos--dg,
.player-pos--dc  { background: var(--green-subtle); color: var(--green); border: 1px solid rgba(82,201,138,0.15); }
.player-pos--mf  { background: var(--gold-subtle); color: var(--gold); border: 1px solid rgba(201,162,39,0.15); }
.player-pos--att { background: var(--red-subtle); color: var(--red); border: 1px solid rgba(224,92,101,0.15); }

/* Stats cards */
.team-stats-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.stat-row:last-child { border-bottom: none; }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); }
.stat-value { font-weight: 700; font-size: 0.88rem; color: var(--text-primary); }

/* ============================================================
   HOME — Sections
   ============================================================ */
.home-layout { display: grid; grid-template-columns: 1fr 340px; gap: 36px; padding: 56px 0; }

/* ── STATS BANDE ───────────────────────────────────────────── */
.stats-band {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 32px 0;
}
.stats-band__inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-item {
  text-align: center; padding: 0 24px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-item__num {
  font-family: var(--font-head); font-size: clamp(var(--type-h2), 4vw, 3.5rem); font-weight: 700;
  line-height: 1;
  background: var(--gradient-gold);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.stat-item__label { font-size: 0.75rem; color: var(--text-secondary); margin-top: 6px; letter-spacing: 0.2px; }

/* ── SIDEBAR ───────────────────────────────────────────────── */
.sidebar-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px;
}
.sidebar-card__header {
  padding: 15px 20px; border-bottom: 1px solid var(--border);
  font-family: var(--font-head); font-size: 1.76rem; font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, rgba(201,162,39,0.03) 0%, transparent 100%);
}
.sidebar-card__header span { color: var(--gold); }
.sidebar-card__body { padding: 16px 20px; }

/* ── CONF GRID ─────────────────────────────────────────────── */
.conf-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 20px; }
.conf-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 10px; text-align: center;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1); cursor: pointer;
}
.conf-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px var(--border-gold);
}
.conf-card__logo { font-size: 1.8rem; margin-bottom: 8px; }
.conf-card__name { font-weight: 700; font-size: 0.85rem; color: var(--text-primary); }
.conf-card__teams { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   PHASE TABS
   ============================================================ */
.phase-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.phase-tab {
  padding: 10px 24px;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.phase-tab:hover { color: var(--text-primary); }
.phase-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ============================================================
   BRACKET PHASE FINALE
   ============================================================ */
.bracket-wrap {
  padding-bottom: 16px;
}

.bracket {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 780px;
}

.bracket__half {
  display: flex;
  flex: 1;
}
.bracket__half--l { flex-direction: row; }
/* right half: R32 en premier DOM = à droite visuellement */
.bracket__half--r { flex-direction: row-reverse; }

/* Colonnes de rounds */
.bracol {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  position: relative;
}
.bracol__lbl {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-align: center;
  padding: 6px 4px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.bracol__body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Paires de matchs */
.bpair {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-around;
  padding: 2px 6px;
  position: relative;
}

/* Match unique (demi-finale) */
.bsingle {
  display: flex;
  flex: 1;
  align-items: center;
  padding: 2px 6px;
  position: relative;
}
.bsingle .bmatch { width: 100%; }

/* ── Connecteurs CSS ─────────────────────────────────────── */

/* Bracket "]" côté droit (gauche du bracket) */
.bracket__half--l .bpair::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  bottom: 25%;
  width: 6px;
  border-right: 1px solid rgba(201,162,39,0.4);
  border-top: 1px solid rgba(201,162,39,0.4);
  border-bottom: 1px solid rgba(201,162,39,0.4);
}

/* Bracket "[" côté gauche (droite du bracket) */
.bracket__half--r .bpair::after {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 6px;
  border-left: 1px solid rgba(201,162,39,0.4);
  border-top: 1px solid rgba(201,162,39,0.4);
  border-bottom: 1px solid rgba(201,162,39,0.4);
}

/* Trait horizontal entrant sur les matchs (toutes colonnes sauf la 1ère) */
.bracket__half--l .bracol:not(:first-child) .bmatch,
.bracket__half--r .bracol:not(:first-child) .bmatch { position: relative; }

.bracket__half--l .bracol:not(:first-child) .bmatch::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  width: 6px;
  border-top: 1px solid rgba(201,162,39,0.4);
}
.bracket__half--r .bracol:not(:first-child) .bmatch::before {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  width: 6px;
  border-top: 1px solid rgba(201,162,39,0.4);
}

/* Trait SF → Finale */
.bracket__half--l .bracol:last-child .bmatch::after {
  content: '';
  position: absolute;
  right: -14px;
  top: 50%;
  width: 14px;
  border-top: 1px solid rgba(201,162,39,0.4);
}
.bracket__half--r .bracol:last-child .bmatch::after {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  width: 14px;
  border-top: 1px solid rgba(201,162,39,0.4);
}

/* ── Carte match bracket ─────────────────────────────────── */
.bmatch {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,162,39,0.18);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.85rem;
  transition: border-color 0.2s;
}
.bmatch:hover { border-color: rgba(201,162,39,0.38); }
.bmatch[data-status="finished"] { border-left: 2px solid rgba(201,162,39,0.55); }
.bmatch[data-status="live"]     { border-left: 2px solid #e03030; }
.bmatch--final {
  border-color: rgba(201,162,39,0.5);
  background: rgba(201,162,39,0.07);
}

.bmeta {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bteam {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.bteam:last-of-type { border-bottom: none; }
.bteam--w .bname { color: var(--gold); font-weight: 700; }

.bflag {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.4));
  flex-shrink: 0;
}
.bflag-ph {
  width: 20px;
  height: 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  flex-shrink: 0;
}

.bname {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(0.72rem, 1vw, 0.88rem);
  font-weight: 600;
  color: var(--text-secondary, #c8bfad);
}

.bsc {
  font-family: var(--font-head);
  font-size: clamp(0.8rem, 1.1vw, 0.95rem);
  font-weight: 700;
  color: var(--text-primary);
  min-width: 12px;
  text-align: right;
}

/* ── Centre (Finale + 3e place) ─────────────────────────── */
.bracket__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 13%;
  flex-shrink: 0;
  padding: 4px 6px;
}

.bcenter__block {
  width: 100%;
  text-align: center;
}

.bcenter__lbl {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 8px;
}

.bcenter__block--third { opacity: 0.75; }
.bcenter__block--third .bcenter__lbl { color: var(--text-muted); }

/* Liste matchs sous le bracket */
.knockout-list { margin-top: 48px; }
.knockout-phase-header {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 20px 0 10px;
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 12px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-primary); border-top: 1px solid var(--border); padding: 52px 0 28px;
}
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 44px; }
.footer__logo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-family: var(--font-head); font-size: 2.2rem; font-weight: 700;
}
.footer__logo img { height: 30px; }
.footer__desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.8; }
.footer__col h4 {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--text-muted); margin-bottom: 16px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col ul li a {
  font-size: 0.84rem; color: var(--text-secondary);
  transition: color 0.2s; display: flex; align-items: center; gap: 6px;
}
.footer__col ul li a:hover { color: var(--gold); }
.footer__divider { height: 1px; background: var(--border); margin-bottom: 24px; }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.76rem; color: var(--text-muted); gap: 16px;
}
.footer__bottom a { color: var(--text-muted); transition: color 0.2s; }
.footer__bottom a:hover { color: var(--gold); }

/* ── Dot séparateur ────────────────────────────────────────── */
.dot-sep { color: var(--text-muted); }

/* ============================================================
   UTILITAIRES
   ============================================================ */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-xs);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.3px;
}
.tag-gold { background: var(--gold-subtle); color: var(--gold); border: 1px solid rgba(201,162,39,0.15); }
.tag-red  { background: var(--red-subtle);  color: var(--red);  border: 1px solid rgba(224,92,101,0.15); }
.tag-green{ background: var(--green-subtle);color: var(--green);border: 1px solid rgba(82,201,138,0.15); }
.tag-blue { background: rgba(107,157,245,0.1); color: var(--blue); border: 1px solid rgba(107,157,245,0.15); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 0.88rem; }
.empty-state__icon { font-size: 2.8rem; opacity: 0.25; margin-bottom: 12px; display: block; }
.text-muted   { color: var(--text-muted); }
.text-gold    { color: var(--gold); }
.text-primary { color: var(--text-primary); }
.divider { height: 1px; background: var(--border); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex-center { display: flex; align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }

/* ============================================================
   ANIMATIONS GLOBALES
   ============================================================ */
@keyframes fadeIn   { from{opacity:0} to{opacity:1} }
@keyframes slideUp  { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }
@keyframes shimmer  {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes goldPulse {
  0%,100%{ box-shadow: 0 0 0 0 rgba(201,162,39,0.0); }
  50%    { box-shadow: 0 0 0 6px rgba(201,162,39,0.0); }
}
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-elevated) 25%, var(--bg-card-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================================
   ONGLETS (équipe.html)
   ============================================================ */
.tabs-bar {
  background: var(--bg-secondary); border-bottom: 1px solid var(--border);
  position: sticky; top: var(--nav-h); z-index: 100;
}
.tab-btn {
  padding: 14px 20px; background: transparent; border: none;
  border-bottom: 2px solid transparent; color: var(--text-secondary);
  font-size: 0.86rem; font-weight: 500; cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  font-family: var(--font-body); margin-bottom: -1px; gap: 6px;
  display: inline-flex; align-items: center;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--gold-light); border-bottom-color: var(--gold); }
.tab-content { animation: fadeIn 0.3s ease; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── ≤ 1200px ─────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .groups-layout { grid-template-columns: repeat(2, 1fr); }
  .home-layout { grid-template-columns: 1fr; }
  .team-detail-layout { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .conf-grid { grid-template-columns: repeat(3, 1fr); }
  .hero__countdown { gap: 6px; }
}

/* ── ≤ 1024px : bracket scrollable sur tablette ───────────── */
@media (max-width: 1024px) {
  .bracket-wrap { overflow-x: auto; }
  .bracket { min-width: 900px; }
}

/* ── ≤ 900px ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .groups-layout { grid-template-columns: 1fr; }
  .stats-band__inner { grid-template-columns: repeat(2, 1fr); }
  .stats-band__inner .stat-item:nth-child(2) { border-right: none; }
  .conf-grid { grid-template-columns: repeat(3, 1fr); }
  .groups-carousel__track { grid-template-columns: 1fr; }
}

/* ── ≤ 768px : mobile ─────────────────────────────────────── */
@media (max-width: 768px) {
  /* ── Échelle typographique réduite ─── */
  :root {
    --nav-h: 56px;
    --type-h1: 2.8rem;
    --type-h2: 2.2rem;
    --type-h3: 1.6rem;
    --type-h4: 1.4rem;
    --type-h5: 1.2rem;
    --type-h6: 1.05rem;
  }

  /* ── Layout de base ─── */
  .navbar__inner  { padding: 0 16px; }
  .container      { padding: 0 16px; }
  .section        { padding: 40px 0; }
  .page-wrapper   { padding-top: var(--nav-h); }

  /* ── Nav overlay ─── */
  .nav-overlay__body {
    grid-template-columns: 1fr;
    padding: calc(var(--nav-h) + 20px) 20px 28px;
    gap: 0;
  }
  .nav-overlay__feature { display: none; }
  .nav-overlay__link    { font-size: clamp(1.8rem, 8vw, 2.8rem); }

  /* ── Hero ─── */
  .hero__center     { padding: 40px 16px; }
  .hero__cd-unit    { padding: 16px 20px 12px; min-width: 76px; }
  .hero__cd-sep     { padding-bottom: 20px; }

  /* ── Page header ─── */
  .page-header    { padding: calc(var(--nav-h) + 24px) 0 28px; }
  .page-header h1 { font-size: var(--type-h2); }
  .page-header p  { font-size: 0.85rem; }

  /* ── Section titles ─── */
  .section-title        { margin-bottom: 18px; }
  .section-title__text  { font-size: var(--type-h3); }

  /* ── Phase tabs ─── */
  .phase-tabs { gap: 4px; margin-bottom: 16px; }
  .phase-tab  { font-size: 1rem; padding: 8px 14px; letter-spacing: 0.02em; }

  /* ── Filtres ─── */
  .filters      { padding: 10px 12px; gap: 5px; }
  .filter-btn   { padding: 5px 10px; font-size: 0.74rem; }

  /* ── Match cards ─── */
  .match-card         { flex-wrap: wrap; padding: 12px 14px; gap: 10px; }
  .match-card__group  { font-size: 0.65rem; padding: 2px 6px; }
  .match-card__teams  { gap: 6px; }
  .match-team__flag   { width: 34px; height: 34px; }
  .match-team__flag-placeholder { width: 34px; height: 34px; }
  .match-team__name   { font-size: 0.78rem; }
  .match-score        { font-size: 1.5rem; gap: 4px; }
  .match-score__num   { min-width: 18px; }
  .match-score__vs    { font-size: 0.7rem; padding: 5px 8px; }
  /* Info réaffichée en ligne compacte en bas de la carte */
  .match-card__info {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    min-width: unset;
    flex-direction: row;
    flex-wrap: wrap;
    padding-top: 4px;
    border-top: 1px solid var(--border);
  }
  .match-card__date, .match-card__time, .match-card__venue { font-size: 0.68rem; margin-top: 0; }

  /* ── Bracket — masqué, liste seule visible ─── */
  .bracket-wrap           { display: none; }
  .knockout-list          { margin-top: 16px; }
  .knockout-phase-header  { font-size: 1.1rem; padding: 14px 0 8px; }

  /* ── Groupes ─── */
  .groups-layout          { grid-template-columns: 1fr; }
  .groups-layout--preview { grid-template-columns: 1fr; }
  .groups-legend          { gap: 12px; margin-bottom: 20px; }
  .group-card             { overflow: visible; }
  .standings-table        { font-size: 0.74rem; }
  .standings-table th,
  .standings-table td     { padding: 8px 5px; }
  .standings-table th:first-child,
  .standings-table td:first-child { padding-left: 10px; }
  .standings-name         { font-size: 0.78rem; }
  .standings-flag,
  .grp-match-flag         { width: 22px; height: 22px; }
  .standings-flag-placeholder { width: 22px; height: 22px; }

  /* ── Équipes (grille) ─── */
  .teams-grid           { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .teams-search         { flex-direction: column; gap: 10px; }
  .search-input         { min-width: unset; }
  .conf-tabs            { flex-wrap: wrap; gap: 5px; }
  .conf-tab             { font-size: 0.74rem; padding: 6px 10px; }
  .teams-toolbar        { flex-direction: column; align-items: flex-start; gap: 8px; }
  .teams-toolbar__actions { flex-wrap: wrap; gap: 6px; }

  /* ── Équipe détail ─── */
  .team-hero              { padding: 28px 0; }
  .team-hero__inner       { gap: 20px; flex-wrap: wrap; }
  .team-hero__flag        { height: 80px; }
  .team-hero__name        { font-size: clamp(2rem, 8vw, 2.8rem); }
  .team-detail-layout     { grid-template-columns: 1fr; gap: 20px; padding: 24px 0; }
  .tabs-bar__inner        { overflow-x: auto; padding-bottom: 0; }
  .tab-btn                { font-size: 0.8rem; padding: 12px 14px; white-space: nowrap; flex-shrink: 0; }
  .tab-header             { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tab-header__title      { font-size: var(--type-h3); }
  .tab-sub-title          { font-size: var(--type-h3); margin-bottom: 14px; }
  .tab-group-section__title { font-size: 1.3rem; }
  .player-num             { font-size: 1.4rem; }
  .player-card            { padding: 9px 12px; gap: 8px; }

  /* ── Stats band ─── */
  .stat-item      { padding: 0 12px; }
  .stat-item__num { font-size: 2rem; }

  /* ── Conf grid ─── */
  .conf-grid { grid-template-columns: repeat(2, 1fr); }

  /* ── Sidebar ─── */
  .sidebar-card__header { font-size: 1.3rem; }
  .sidebar-label        { font-size: 1.2rem; }

  /* ── Footer ─── */
  .footer          { padding: 36px 0 20px; }
  .footer__inner   { grid-template-columns: 1fr; gap: 24px; }
  .footer__bottom  { flex-direction: column; gap: 6px; text-align: center; }
}

/* ── ≤ 480px : petits mobiles ─────────────────────────────── */
@media (max-width: 480px) {
  :root {
    --type-h1: 2.2rem;
    --type-h2: 1.8rem;
    --type-h3: 1.35rem;
    --type-h4: 1.15rem;
  }

  .section    { padding: 30px 0; }
  .page-header { padding: calc(var(--nav-h) + 16px) 0 22px; }

  /* Hero */
  .hero__cd-unit    { padding: 12px 14px 10px; min-width: 64px; }

  /* Match cards */
  .match-card         { padding: 10px 12px; gap: 8px; }
  .match-card__teams  { gap: 4px; }
  .match-team__flag   { width: 28px; height: 28px; }
  .match-team__flag-placeholder { width: 28px; height: 28px; }
  .match-team__name   { font-size: 0.68rem; }
  .match-score        { font-size: 1.25rem; }

  /* Phase tabs */
  .phase-tab { font-size: 0.82rem; padding: 7px 10px; }

  /* Filtres */
  .filter-btn { padding: 4px 8px; font-size: 0.7rem; }

  /* Teams */
  .teams-grid     { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .team-card__flag-wrap { height: 90px; }
  .team-card__flag      { height: 56px; }

  /* Team hero */
  .team-hero__inner { flex-direction: column; align-items: flex-start; }
  .team-hero__flag  { height: 64px; }
}

/* ── ≤ 380px : très petits écrans ─────────────────────────── */
@media (max-width: 380px) {
  :root {
    --type-h1: 2rem;
    --type-h2: 1.6rem;
    --type-h3: 1.2rem;
  }

  .container  { padding: 0 12px; }
  .section    { padding: 24px 0; }
  .hero       { padding: 28px 0; }

  .countdown-grid    { grid-template-columns: repeat(2, 1fr); }
  .countdown-unit__num { font-size: 1.6rem; }
  .stats-band__inner { gap: 0; }

  .match-card__group  { display: none; }
  .match-team__name   { font-size: 0.62rem; }
  .match-score        { font-size: 1.1rem; }

  .phase-tab          { font-size: 0.72rem; padding: 6px 8px; }
  .knockout-phase-header { font-size: 0.95rem; }

  .conf-grid          { grid-template-columns: repeat(2, 1fr); }
  .teams-grid         { grid-template-columns: repeat(2, 1fr); }

  .team-hero__inner   { flex-direction: column !important; align-items: flex-start; }
  .team-hero__flag    { height: 60px; }
}

/* ============================================================
   CLASSES UTILITAIRES — pages spécifiques
   ============================================================ */

/* groupes.html — légende */
.groups-legend {
  display: flex; gap: 20px; align-items: center;
  margin-bottom: 28px; flex-wrap: wrap;
}
.groups-legend__title { font-size: 0.82rem; color: var(--text-secondary); }
.groups-legend__item {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem; color: var(--text-muted);
}
.legend-dot {
  width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.legend-dot--green { background: var(--green); }
.legend-dot--gold  { background: var(--gold); }

/* Filters label */
.filters__label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
  width: 100%; margin-bottom: -2px;
}
/* Filters stacked (matchs) */
.filters + .filters { margin-top: -8px; border-top: none; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.filters:first-of-type { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

/* matchs.html — count */
.match-count-bar {
  margin-bottom: 16px; font-size: 0.82rem; color: var(--text-secondary);
}

/* equipes.html — toolbar tri */
.teams-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.teams-toolbar__count { font-size: 0.82rem; color: var(--text-secondary); }
.teams-toolbar__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* equipe.html — barre onglets */
.tabs-bar { background: var(--bg-secondary); border-bottom: 1px solid var(--border); position: sticky; top: var(--nav-h); z-index: 100; }
.tabs-bar__inner { display: flex; gap: 0; padding-top: 4px; }

/* Contenu detail */
.detail-container { padding-top: 32px; padding-bottom: 60px; }

/* Tab headers */
.tab-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.tab-header__title {
  font-family: var(--font-head); font-size: var(--type-h2); font-weight: 700;
  color: var(--text-primary);
}
.tab-header__title span { color: var(--gold); }
.tab-header__filters { display: flex; gap: 6px; flex-wrap: wrap; }
.tab-sub-title {
  font-family: var(--font-head); font-size: var(--type-h3); font-weight: 700;
  color: var(--text-primary); margin-bottom: 20px;
}
.tab-sub-title span { color: var(--gold); }
.tab-group-section { margin-top: 28px; }
.tab-group-section__title {
  font-family: var(--font-head); font-size: 2.1rem; font-weight: 700;
  color: var(--text-secondary); margin-bottom: 16px;
}

/* Sidebar labels */
.sidebar-label {
  font-family: var(--font-head); font-size: 1.64rem; font-weight: 700;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 16px;
}
.sidebar-label span { color: var(--gold); }
.sidebar-group-link {
  display: block; text-align: center; margin-top: 14px;
  font-size: 0.8rem; color: var(--text-muted); transition: color 0.2s;
}
.sidebar-group-link:hover { color: var(--gold); }

/* Sidebar card spacing */
.sidebar-card--mb { margin-bottom: 20px; }

/* ── Glow médaille ─────────────────────────────────────────── */
.rank-1 { color: #ffd700; text-shadow: 0 0 8px rgba(255,215,0,0.4); }
.rank-2 { color: #b8c4d0; text-shadow: 0 0 8px rgba(184,196,208,0.3); }
.rank-3 { color: #cd7f32; text-shadow: 0 0 8px rgba(205,127,50,0.3); }
