:root {
  --bg: #0a0b0f;
  --bg-alt: #101219;
  --surface: #161923;
  --border: #232735;
  --text: #e8eaf0;
  --muted: #9aa0b0;
  --accent: #ff5a1f;
  --accent-2: #22d3ee;
  --ok: #34d399;
  --bad: #f87171;
  --radius: 14px;
  --container: 1120px;
  /* Sans ça, les widgets natifs que le CSS ne peut pas styler directement (icône du
     sélecteur de date, popup ouverte d'un <select>, scrollbars) restent rendus en clair
     par défaut par le navigateur et jurent avec le thème — un simple <select> non stylé
     apparaît par exemple en blanc/noir plutôt qu'en sombre. */
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, .brand-name { font-family: "Oxanium", "Inter", sans-serif; letter-spacing: 0.01em; }
a { color: inherit; text-decoration: none; }
strong { color: var(--text); }

/* Anneau de focus clavier commun à tout le site : sans ça, chaque navigateur retombe
   sur son anneau bleu par défaut, qui jure avec le thème et n'apparaît nulle part ailleurs
   dans la palette. :focus-visible = uniquement au clavier, jamais au clic souris/tactile. */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

/* Lien d'évitement : invisible tant qu'il n'a pas le focus clavier, pour sauter la nav
   (8 liens + sous-menu) sans devoir la tabuler entièrement à chaque page. */
.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 300;
  background: var(--accent);
  color: #12060a;
  padding: 10px 18px;
  border-radius: 8px;
  font-family: "Oxanium", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: top 0.15s ease;
}
.skip-link:focus-visible {
  top: 12px;
  outline: 2px solid var(--bg);
  outline-offset: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-family: "Oxanium", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff8a3d);
  color: #12060a;
  box-shadow: 0 10px 30px -12px rgba(255, 90, 31, 0.6);
}
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }
.btn-twitch { background: #9146ff; color: #fff; box-shadow: 0 10px 30px -12px rgba(145, 70, 255, 0.6); }
.btn-twitch:hover { background: #7d34ea; }
.btn-twitch svg { width: 20px; height: 20px; fill: currentColor; }
.btn-sm { padding: 9px 18px; font-size: 0.8rem; }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 15, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 108px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-logo { height: 84px; width: auto; display: block; }
.site-footer .brand-logo { height: 56px; }
.brand-name { font-size: 1.05rem; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.live-badge {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content;
  font-family: "Inter", sans-serif; font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.08em; color: var(--accent);
}
.live-badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: sa-live-pulse 1.6s ease-in-out infinite;
}
@keyframes sa-live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(255, 90, 31, 0); }
}

/* Côté rouge / bleu d'une confrontation — simple trait de couleur devant le nom. */
.side-mark { display: inline-block; width: 4px; height: 13px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.side-mark.side-red { background: #f04438; }
.side-mark.side-blue { background: #3b82f6; }
.nav { display: flex; align-items: center; gap: 20px; margin-left: auto; font-weight: 500; color: var(--muted); }
.nav > a { transition: color 0.15s ease; padding: 4px 0; }
.nav > a:hover { color: var(--text); }
.nav > a.active { color: var(--accent); }
.header-inner > .btn-primary { margin-left: 8px; }

/* Groupe "Jeu" (sous-menu) */
.nav-group { position: relative; }
.nav-group-btn {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  color: var(--muted); font: inherit; font-weight: 500; display: inline-flex; align-items: center; gap: 4px;
  transition: color 0.15s ease;
}
.nav-group-btn:hover, .nav-group.open .nav-group-btn { color: var(--text); }
.nav-group-btn.active { color: var(--accent); }
.nav-group-btn .caret { font-size: 0.75em; transition: transform 0.15s ease; }
.nav-group.open .nav-group-btn .caret { transform: rotate(180deg); }
.nav-drop {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  display: none; flex-direction: column; min-width: 190px;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; box-shadow: 0 20px 40px -16px rgba(0,0,0,0.6); z-index: 60;
}
.nav-group.open .nav-drop { display: flex; }
.nav-drop a { padding: 10px 12px; border-radius: 8px; color: var(--muted); transition: background 0.12s ease, color 0.12s ease; }
.nav-drop a:hover { background: var(--surface); color: var(--text); }
.nav-drop a.active { color: var(--accent); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; margin-left: auto; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.15s ease; }
/* Le hamburger se transforme en croix quand le menu est ouvert */
.site-header.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Fond assombri derrière le menu mobile ouvert — cliquer dessus le referme (voir script.js) */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(5, 6, 10, 0.7);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
/* nav-backdrop est un frère du header (pas un enfant) : le header a backdrop-filter,
   qui créerait un nouveau bloc englobant et piégerait un enfant position:fixed dans
   sa propre hauteur au lieu de couvrir tout l'écran — d'où le sélecteur "+ " ici. */
.site-header.open + .nav-backdrop { opacity: 1; pointer-events: auto; }

/* Cloche de messagerie (header) : accès direct à la page Contact + non-lus */
.msg-bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}
.msg-bell:hover { color: var(--text); background: var(--surface); }
.msg-bell svg { width: 19px; height: 19px; fill: currentColor; }
.msg-bell-badge {
  position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px;
  display: inline-grid; place-items: center; border-radius: 999px; border: 2px solid var(--bg);
  background: var(--accent); color: #12060a;
  font-family: "Oxanium", sans-serif; font-size: 0.62rem; font-weight: 800; line-height: 1;
}

/* Hero (accueil) */
.hero { position: relative; overflow: hidden; padding: 96px 0 84px; border-bottom: 1px solid var(--border); }
.hero-glow {
  position: absolute;
  inset: -20% 25% auto -10%;
  height: 520px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 90, 31, 0.35), transparent 60%),
    radial-gradient(circle at 70% 40%, rgba(34, 211, 238, 0.2), transparent 55%);
  filter: blur(20px);
  pointer-events: none;
}
/* Grille tactique en fond du hero — clin d'œil viseur/plan de terrain, très discrète. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 234, 240, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 234, 240, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 30% 20%, #000 0%, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-kicker { text-transform: uppercase; letter-spacing: 0.35em; font-size: 0.78rem; color: var(--accent-2); font-weight: 600; }
.hero-title {
  font-size: clamp(3rem, 10vw, 6.5rem);
  font-weight: 800;
  line-height: 0.95;
  margin: 16px 0 20px;
  text-transform: uppercase;
}
.hero-title span { background: linear-gradient(135deg, var(--accent), #ffb066); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { max-width: 560px; color: var(--muted); font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 52px; }
.hero-stats > div {
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 18px 12px 14px;
}
.hero-stat-ic {
  grid-row: 1 / 3;
  width: 34px; height: 34px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 90, 31, 0.12); color: var(--accent);
}
.hero-stat-ic svg { width: 18px; height: 18px; }
.hero-stats dt { grid-column: 2; text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.68rem; color: var(--muted); }
.hero-stats dd { grid-column: 2; font-family: "Oxanium", sans-serif; font-weight: 800; font-size: 1.5rem; color: var(--text); line-height: 1.2; }

/* Page hero (sous-pages) */
.page-hero { position: relative; overflow: hidden; padding: 72px 0 44px; border-bottom: 1px solid var(--border); }
.page-hero .hero-glow { height: 320px; inset: -30% 40% auto -15%; }
.page-hero .inner { position: relative; }
.crumb { text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.72rem; color: var(--accent-2); font-weight: 600; }
.page-hero h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); text-transform: uppercase; margin: 14px 0 12px; }
.page-hero p { color: var(--muted); max-width: 640px; }

/* Sections */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-title { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; }
.section-lead { color: var(--muted); margin-top: 10px; max-width: 640px; }
.section-note { color: var(--muted); font-size: 0.9rem; margin-top: 18px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 44px; counter-reset: sa-card; }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: transform 0.18s ease, border-color 0.18s ease; counter-increment: sa-card; overflow: hidden; }
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
/* Numéro d'ordre en filigrane, coin haut-droit — habillage "fiche technique" plutôt qu'un vrai repère fonctionnel. */
.card::after {
  content: "0" counter(sa-card);
  position: absolute; top: -6px; right: 10px;
  font-family: "Oxanium", sans-serif; font-weight: 800; font-size: 3.2rem;
  color: var(--bg-alt); line-height: 1; pointer-events: none; z-index: 0;
}
.card-ic {
  position: relative; z-index: 1;
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 90, 31, 0.12); color: var(--accent);
}
.card-ic svg { width: 21px; height: 21px; }
.card h3 { position: relative; z-index: 1; font-size: 1.2rem; margin-bottom: 10px; }
.card p { position: relative; z-index: 1; color: var(--muted); font-size: 0.95rem; }

/* Link cards (navigation par page) */
.linkcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 40px; }
.linkcard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.linkcard:hover { transform: translateY(-4px); border-color: var(--accent-2); }
.linkcard .ic { width: 30px; height: 30px; color: var(--accent); }
.linkcard h3 { font-size: 1.1rem; }
.linkcard p { color: var(--muted); font-size: 0.9rem; }
.linkcard .go { margin-top: auto; color: var(--accent-2); font-family: "Oxanium", sans-serif; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* Two-column grid + panels */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 24px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.panel + .panel-wide, .panel-wide { margin-top: 20px; }
.panel h3 { font-size: 1.12rem; margin-bottom: 14px; }
.panel-accent { border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(255, 90, 31, 0.15); }

/* Statistiques (espace organisation) */
.stats-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.kpi-card .kpi-value { font-family: "Oxanium", sans-serif; font-weight: 800; font-size: 1.7rem; color: var(--accent); line-height: 1.2; }
.kpi-card .kpi-label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
@media (max-width: 720px) { .stats-grid { grid-template-columns: 1fr; } }
.chart-svg { width: 100%; height: auto; overflow: visible; }

/* Sélecteur de période façon "TradingView", sous le graphe qu'il pilote */
.stats-range-row { display: flex; gap: 4px; margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; flex-wrap: wrap; }
.stats-range-row button {
  flex: 1; min-width: 84px; background: none; border: none; border-radius: 8px;
  padding: 8px 6px; cursor: pointer; text-align: center; color: var(--text);
  display: flex; flex-direction: column; gap: 3px; font: inherit;
}
.stats-range-row button:hover { background: var(--bg-alt); }
.stats-range-row button.active { background: var(--bg-alt); box-shadow: inset 0 0 0 1px var(--border); }
.stats-range-row .rr-label { font-size: 0.82rem; color: var(--muted); }
.stats-range-row button.active .rr-label { color: var(--text); font-weight: 600; }
.stats-range-row .rr-delta { font-family: "Oxanium", sans-serif; font-weight: 700; font-size: 0.86rem; color: var(--muted); }
.stats-range-row .rr-delta.rr-up { color: var(--ok); }
.stats-range-row .rr-delta.rr-down { color: var(--bad); }
@media (max-width: 560px) { .stats-range-row button { min-width: 30%; } }

.list-check, .list-cross, .list-dot { list-style: none; display: grid; gap: 10px; }
.list-check li, .list-cross li, .list-dot li { position: relative; padding-left: 26px; color: var(--muted); font-size: 0.95rem; }
.list-check li::before { content: "\2713"; color: var(--ok); position: absolute; left: 0; font-weight: 700; }
.list-cross li::before { content: "\2715"; color: var(--bad); position: absolute; left: 0; font-weight: 700; }
.list-dot li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Figures / visuels */
.figure { margin: 44px 0 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.figure img, .figure svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.figure figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 14px; text-align: center; }

/* Timeline */
.timeline { list-style: none; margin-top: 44px; display: grid; gap: 4px; border-left: 2px solid var(--border); padding-left: 26px; }
.timeline li { position: relative; padding: 14px 0; }
.timeline li::before { content: ""; position: absolute; left: -34px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.15); }
.timeline-tag { display: inline-block; font-family: "Oxanium", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--accent-2); margin-bottom: 4px; }
.timeline p { color: var(--muted); }

/* Palmarès : frise chronologique des champions (variante de .timeline) */
.palmares-timeline { gap: 18px; }
.palmares-timeline li { padding: 0; }
.palmares-entry {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px;
}
.palmares-champion { display: flex; align-items: center; gap: 14px; }
.palmares-trophy-ic {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 90, 31, 0.12); color: var(--accent);
}
.palmares-trophy-ic svg { width: 23px; height: 23px; }
.palmares-champion h3 { font-size: 1.15rem; margin: 0; }
.palmares-meta { color: var(--muted); font-size: 0.85rem; margin-top: 3px; }
.palmares-score { font-family: "Oxanium", sans-serif; font-size: 0.95rem; white-space: nowrap; }

/* Callout */
.callout { margin-top: 32px; background: linear-gradient(135deg, rgba(255, 90, 31, 0.12), rgba(34, 211, 238, 0.08)); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; }
.callout h3 { font-size: 1.12rem; margin-bottom: 8px; }
.callout p { color: var(--muted); }

/* Compte à rebours de saison */
.season-callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.season-callout-copy { display: flex; align-items: center; gap: 14px; }
.season-ic {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(34, 211, 238, 0.14); color: var(--accent-2);
}
.season-ic svg { width: 20px; height: 20px; }
.season-countdown { font-family: "Oxanium", sans-serif; font-weight: 800; font-size: 1.7rem; color: var(--accent-2); white-space: nowrap; }
.season-countdown.is-over { color: var(--accent); }

/* Recherche de joueur (page Classement) */
.rank-search-panel { max-width: 520px; margin-bottom: 24px; }
.rank-search-panel h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rank-search-ic {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(34, 211, 238, 0.12); color: var(--accent-2);
}
.rank-search-ic svg { width: 16px; height: 16px; }
.rank-search-form { display: flex; gap: 10px; flex-wrap: wrap; }
.rank-search-form input { flex: 1; min-width: 180px; }

/* Auth / Compte */
.auth { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items: start; margin-top: 8px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.tabs { display: flex; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 5px; margin-bottom: 26px; }
.tab {
  flex: 1;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: "Oxanium", sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab.active { background: linear-gradient(135deg, var(--accent), #ff8a3d); color: #12060a; }

/* Barre à plus de 3 onglets (espace organisation) : au lieu d'écraser chaque onglet pour
   les faire tous tenir, on garde leur largeur naturelle et on défile horizontalement —
   sinon le texte devient illisible ou les derniers onglets sortent de l'écran sur mobile. */
.tabs-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabs-scroll .tab { flex: 0 0 auto; white-space: nowrap; }

.auth-form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; color: var(--muted); }
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
.field input:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.field input:invalid:not(:placeholder-shown) { border-color: var(--bad); }

/* Select / textarea utilisés sans le wrapper .field (tableaux de l'espace organisation,
   ex. les manches du round-robin) : sans ça ils gardent l'apparence native du système —
   color-scheme:dark (ci-dessus) corrige la popup ouverte d'un select, mais pas sa boîte
   fermée, qu'il faut styler explicitement comme le reste des champs du site. */
select, textarea {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  padding: 10px 12px;
  transition: border-color 0.15s ease;
}
select:hover, textarea:hover { border-color: var(--muted); }
select:focus, textarea:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
::placeholder { color: var(--muted); opacity: 1; }
::selection { background: var(--accent); color: #12060a; }
.field-check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 0.9rem; }
.field-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.auth-form .btn { width: 100%; margin-top: 4px; }
.form-msg { min-height: 1.2em; font-size: 0.9rem; margin-top: 2px; }
.link-btn {
  background: none; border: none; padding: 0; margin: 0; font: inherit;
  color: var(--accent-2); text-decoration: underline; cursor: pointer;
}

/* Modal (ex : choix de l'équipe adverse à inviter) */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200; padding: 20px;
  background: rgba(5, 6, 10, 0.72);
  display: flex; align-items: center; justify-content: center;
}
.modal {
  width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.modal .field { margin: 14px 0 8px; }
.modal-actions { display: flex; justify-content: flex-end; margin-top: 10px; }

.team-search-results { list-style: none; max-height: 220px; overflow-y: auto; }
.team-search-results:not(:empty) { border: 1px solid var(--border); border-radius: 10px; }
.team-search-results li button {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  background: none; border: none; border-bottom: 1px solid var(--border);
  color: var(--text); font: inherit; cursor: pointer;
}
.team-search-results li:last-child button { border-bottom: none; }
.team-search-results li button:hover { background: var(--bg-alt); color: var(--accent-2); }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--bad); }

.auth-side h3 { font-size: 1.15rem; margin-bottom: 12px; }
.auth-side .list-dot { margin-bottom: 22px; }
.notice { background: rgba(255, 90, 31, 0.08); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; color: var(--muted); font-size: 0.86rem; }
.notice strong { color: var(--accent); }

.logged-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logged-head h2 { font-size: 1.5rem; margin-top: 4px; }

/* En-tête de profil (page Compte, vue connectée) : avatar + pseudo + pastille de rang. */
.profile-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.profile-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-family: "Oxanium", sans-serif; font-weight: 800; font-size: 1.35rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #12060a;
}
.profile-head-text { display: flex; flex-direction: column; gap: 2px; }
.profile-head-text h2 { font-size: 1.3rem; margin: 0; }
.profile-email { color: var(--muted); font-size: 0.82rem; }
.profile-head-actions { display: flex; gap: 10px; margin-left: auto; }

/* Invitations (équipe + duel) : toujours visibles au-dessus des onglets, jamais cachées dedans */
.invites-zone {
  background: rgba(255, 90, 31, 0.06); border: 1px solid var(--accent);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 22px;
}

.mt-h { font-size: 1.05rem; margin: 22px 0 12px; }
.team-empty { color: var(--muted); font-size: 0.92rem; }
.team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  margin-bottom: 10px;
}
.team-sub { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.team-captain { color: var(--accent); font-weight: 600; }
.mini-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-block;
  font-family: "Oxanium", sans-serif;
  font-weight: 700;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 999px;
  vertical-align: middle;
}
.badge-ok { background: rgba(52, 211, 153, 0.15); color: var(--ok); }
.badge-wait { background: rgba(255, 90, 31, 0.15); color: var(--accent); }
.badge-closed { background: rgba(154, 160, 176, 0.15); color: var(--muted); }
.badge-open { background: rgba(52, 211, 153, 0.15); color: var(--ok); }
.badge-pending { background: rgba(242, 201, 76, 0.16); color: #f2c94c; }
.badge-booked { background: rgba(248, 113, 113, 0.15); color: var(--bad); }

.result-card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--rc, var(--border));
  border-radius: 12px;
  background: var(--bg);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.result-id { display: flex; align-items: center; gap: 10px; }
.result-avatar {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: "Oxanium", sans-serif; font-weight: 800; font-size: 0.85rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #12060a;
}
.result-head strong { font-size: 1.02rem; }
.result-stats { display: flex; flex-wrap: wrap; gap: 18px; margin: 12px 0 4px; color: var(--muted); font-size: 0.85rem; }
.result-stats b { font-family: "Oxanium", sans-serif; font-size: 1.05rem; color: var(--text); margin-right: 3px; }
.result-history { list-style: none; display: grid; gap: 6px; margin-top: 10px; }
.result-history li { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--muted); }
.rh-res {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-family: "Oxanium", sans-serif;
  font-weight: 800;
  font-size: 0.72rem;
  color: #12060a;
}
.result-history li.win .rh-res { background: var(--ok); }
.result-history li.loss .rh-res { background: var(--bad); }
.rh-date { margin-left: auto; font-size: 0.78rem; opacity: 0.8; }
.result-empty { color: var(--muted); font-size: 0.85rem; margin-top: 10px; }

/* Roue de déblocage des personnalisations de nom d'équipe (page Compte, capitaine
   uniquement) — bande horizontale qui défile (JS pilote uniquement "transform", tout le
   visuel des items vient du catalogue via account.js). Au repos, la bande tourne doucement
   en boucle CSS pure (.wheel-track--idle) pour ne jamais laisser un cadre vide — dès qu'un
   tour est lancé, account.js reprend la main sur "transform" et retire cette classe. */
.wheel-box {
  margin-top: 16px; padding: 18px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 90, 31, 0.08), transparent 60%), var(--surface);
  border: 1px solid var(--border);
}
.wheel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.wheel-head h4 { font-family: "Oxanium", sans-serif; font-size: 1rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.wheel-balance { display: inline-flex; align-items: baseline; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.wheel-balance b { font-family: "Oxanium", sans-serif; font-size: 1.15rem; color: var(--accent); }

.wheel-track-wrap {
  position: relative; height: 92px; overflow: hidden; border-radius: 12px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.05), var(--bg) 72%);
  border: 1px solid var(--border);
}
.wheel-track-wrap::before, .wheel-track-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 44px; z-index: 2; pointer-events: none;
}
.wheel-track-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.wheel-track-wrap::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.wheel-track { position: absolute; top: 0; left: 50%; display: flex; height: 100%; align-items: center; will-change: transform; }
.wheel-track--idle { animation: wheel-idle-scroll 26s linear infinite; }
@keyframes wheel-idle-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.wheel-item {
  flex: 0 0 80px; width: 80px; height: 80px; margin-right: 12px;
  display: grid; place-items: center; border-radius: 12px; position: relative;
  background: var(--surface); border: 1px solid var(--border);
}
.wheel-item--locked { opacity: 0.55; }
.wheel-item--locked::after {
  content: "🔒"; position: absolute; bottom: 5px; right: 5px; font-size: 0.65rem; line-height: 1;
  background: var(--bg); border: 1px solid var(--border); border-radius: 50%;
  width: 18px; height: 18px; display: grid; place-items: center;
}
.wheel-marker {
  position: absolute; top: -3px; bottom: -3px; left: 50%; transform: translateX(-50%);
  width: 3px; z-index: 3; pointer-events: none;
  background: linear-gradient(var(--accent), var(--accent-2)); box-shadow: 0 0 12px var(--accent);
}
.wheel-marker::before, .wheel-marker::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: 6px solid transparent;
}
.wheel-marker::before { top: -3px; border-top: 0; border-bottom-color: var(--accent); }
.wheel-marker::after { bottom: -3px; border-bottom: 0; border-top-color: var(--accent); }

.wheel-swatch { width: 34px; height: 34px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 2px 10px rgba(0, 0, 0, 0.35); }
.wheel-sample { font-family: "Oxanium", sans-serif; font-weight: 700; font-size: 1.5rem; }
.wheel-sample--badge svg { width: 28px; height: 28px; }

/* Badge d'équipe (icône devant le nom, débloquable à la roue) — dimensionné pour s'aligner sur
   le texte quelle que soit la police équipée, hérite de la couleur du span parent via currentColor. */
.team-badge-ic { display: inline-flex; vertical-align: -0.15em; margin-right: 0.28em; }
.team-badge-ic svg { width: 1em; height: 1em; }

.wheel-spin-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 16px 0 4px; }
.wheel-full-note { color: var(--muted); font-size: 0.85rem; }

.wheel-group { margin-top: 18px; }
.wheel-group-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.wheel-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.wheel-chip {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  width: 46px; height: 46px; border-radius: 12px; padding: 0;
  background: var(--bg); border: 1px solid var(--border); cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.wheel-chip:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.wheel-chip--equipped { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255, 90, 31, 0.25); }
.wheel-chip--equipped::after {
  content: "✓"; position: absolute; top: -6px; right: -6px; width: 18px; height: 18px;
  background: var(--accent); color: #12060a; border-radius: 50%; font-size: 0.65rem; font-weight: 800;
  display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface);
}
.wheel-chip--locked { opacity: 0.55; cursor: not-allowed; }
.wheel-chip--locked::after {
  content: "🔒"; position: absolute; bottom: -5px; right: -5px; font-size: 0.6rem; line-height: 1;
  background: var(--bg); border: 1px solid var(--border); border-radius: 50%;
  width: 16px; height: 16px; display: grid; place-items: center;
}

/* Surbrillance "pulsée" débloquable — l'intensité du glow respire, la couleur vient de
   currentColor (voir lib/cosmetics.js), pas de duplication de valeur ici. */
@keyframes sa-name-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.5); }
}
.sa-name-pulse { animation: sa-name-pulse 1.8s ease-in-out infinite; }

.account-summary { display: grid; gap: 8px; margin: 4px 0 22px; }
.account-summary div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.account-summary div:first-child { border-top: 0; }
.account-summary dt { color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; }
.account-summary dd { font-family: "Oxanium", sans-serif; font-weight: 700; }

/* Statistiques de profil en tuiles (page Compte, vue connectée) — distinct de
   .account-summary (liste simple réutilisée telle quelle par mentions-legales.html). */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 4px 0 22px; }
.stat-tile { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; }
.stat-tile dt { color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.66rem; margin: 0 0 4px; }
.stat-tile dd { font-family: "Oxanium", sans-serif; font-weight: 700; font-size: 1rem; margin: 0; }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
}

/* Rangs / classement */
.tier-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 32px; }
.tier-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: color-mix(in srgb, var(--rc, var(--border)) 9%, var(--surface));
  border: 1px solid var(--border);
  border-left: 4px solid var(--rc, var(--accent));
  border-radius: 12px;
  padding: 16px 18px;
  transition: transform 0.18s ease;
}
.tier-card:hover { transform: translateY(-3px); }
/* Champion : palier ultime, mis en avant par un léger halo plutôt qu'une simple bordure. */
.tier-card--apex { box-shadow: 0 0 0 1px var(--rc, var(--accent)) inset, 0 0 26px -10px var(--rc, var(--accent)); }
.tier-ic {
  flex: none; width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--rc, var(--accent)) 22%, transparent);
  color: var(--rc, var(--accent));
}
.tier-ic svg { width: 22px; height: 22px; }
.tier-body { min-width: 0; }
.tier-card h3 { font-size: 1.05rem; color: var(--rc, var(--text)); margin: 0; }
.tier-range { font-family: "Oxanium", sans-serif; font-weight: 700; margin-top: 4px; }
.tier-divs { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }

.rank-pill {
  display: inline-block;
  font-family: "Oxanium", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  padding: 4px 12px 4px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--rc, var(--text));
  position: relative;
  white-space: nowrap;
}
.rank-pill::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rc, var(--accent));
}
.rank-pill-apex { border-color: var(--rc); box-shadow: 0 0 14px -2px var(--rc); }

.pacol { min-width: 150px; }
.pa-num { font-family: "Oxanium", sans-serif; font-weight: 700; font-size: 0.85rem; color: var(--text); }
.pa-bar { display: block; margin-top: 6px; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.pa-bar i { display: block; height: 100%; border-radius: 999px; }

.standings-table td.pos { font-family: "Oxanium", sans-serif; font-weight: 700; color: var(--accent); }
.standings-table td.tname { font-weight: 600; color: var(--text); }
.standings-table td:last-child { color: var(--muted); font-family: inherit; font-weight: 400; }
/* # (et Équipe, quand la table en a une) restent visibles pendant le défilement horizontal
   (tables larges sur mobile) — s'applique à toutes les tables .ladder, pas seulement au classement.
   :has() cible la 2e colonne uniquement sur les tables qui ont vraiment une colonne "équipe"
   (sinon un en-tête resterait figé au-dessus d'une colonne différente en dessous). */
.ladder td.pos, .ladder th:first-child { position: sticky; left: 0; z-index: 1; width: 40px; background: var(--bg); }
.ladder:has(td.tname) td.tname, .ladder:has(td.tname) th:nth-child(2) { position: sticky; left: 40px; z-index: 1; background: var(--bg); }
.ladder thead th:first-child, .ladder thead th:nth-child(2) { z-index: 2; background: var(--surface); }

/* Table */
.table-wrap { margin-top: 36px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.ladder { width: 100%; border-collapse: collapse; min-width: 420px; }
.ladder-compact { min-width: 0; }
.ladder-compact th:last-child, .ladder-compact td:last-child { width: 76px; white-space: nowrap; }
@media (max-width: 480px) {
  .ladder-compact th, .ladder-compact td { padding: 13px 14px; }
}
.ladder th, .ladder td { padding: 15px 20px; text-align: left; }
.ladder thead th { background: var(--surface); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; color: var(--muted); }
.ladder tbody tr { border-top: 1px solid var(--border); }
.ladder tbody tr:hover { background: rgba(255, 90, 31, 0.06); }
.ladder td:last-child { font-family: "Oxanium", sans-serif; font-weight: 700; color: var(--accent); }

/* CTA */
.cta { position: relative; overflow: hidden; padding: 90px 0; background: linear-gradient(180deg, var(--bg), var(--bg-alt)); border-top: 1px solid var(--border); }
.cta::before {
  content: "";
  position: absolute; inset: -40% 30% auto 30%; height: 420px;
  background: radial-gradient(circle, rgba(255, 90, 31, 0.22), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}
.cta-inner { position: relative; text-align: center; display: grid; gap: 18px; place-items: center; }
.cta h2 { font-size: clamp(1.8rem, 5vw, 3rem); }
.cta p { color: var(--muted); max-width: 460px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--text); }
.footer-nav a.active { color: var(--accent); }
.footer-legal { color: var(--muted); font-size: 0.85rem; margin-left: auto; }

.twitch-link { display: inline-flex; align-items: center; gap: 7px; color: #a970ff; font-size: 0.9rem; font-weight: 500; }
.twitch-link:hover { color: #c9a6ff; }
.twitch-link svg { width: 16px; height: 16px; fill: currentColor; }

/* Bandeau live (accueil) */
.live-band {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid #9146ff;
  border-radius: var(--radius);
  padding: 28px 30px;
}
.live-band::before {
  content: "";
  position: absolute; inset: -60% auto auto -10%; width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(145, 70, 255, 0.16), transparent 65%);
  pointer-events: none;
}
.live-band-copy { position: relative; max-width: 560px; display: flex; align-items: flex-start; gap: 16px; }
.live-band-text { min-width: 0; }
.live-band-ic {
  flex: none; width: 42px; height: 42px; border-radius: 11px; margin-top: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(145, 70, 255, 0.15); color: #a970ff;
}
.live-band-ic svg { width: 22px; height: 22px; fill: currentColor; }
.live-band-copy h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); margin: 8px 0 6px; }
.live-band-copy p { color: var(--muted); }
.live-band .btn-twitch { position: relative; flex: none; }

/* Responsive — burger dès 1100px car la navigation compte 8 entrées */
@media (max-width: 1100px) {
  .nav { display: none; }
  /* le bouton compte reste visible même en mode burger */
  .header-inner > .btn-primary { display: inline-flex; margin-left: auto; }
  /* la cloche de messagerie garde sa propre visibilité (attribut hidden posé par script.js) :
     on ne pousse que sa position, sans forcer son affichage. */
  .header-inner > .msg-bell:not([hidden]) { margin-left: auto; }
  .nav-toggle { display: flex; margin-left: 12px; }

  @keyframes sa-nav-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

  .site-header.open .nav {
    display: flex;
    position: absolute;
    z-index: 45;
    top: 100%;
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 10px;
    padding: 10px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 45px -12px rgba(0, 0, 0, 0.6);
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    animation: sa-nav-in 0.18s ease both;
  }
  .site-header.open .nav > a {
    padding: 14px 16px; border-radius: 10px; font-weight: 600; font-size: 0.98rem; text-align: left;
  }
  .site-header.open .nav > a:hover, .site-header.open .nav > a:active { background: var(--surface); color: var(--text); }
  .site-header.open .nav > a.active { background: rgba(255, 90, 31, 0.1); }

  /* Groupe "Jeu" en mode menu mobile : accordéon */
  .site-header.open .nav-group { width: 100%; }
  .site-header.open .nav-group-btn {
    width: 100%; padding: 14px 16px; border-radius: 10px;
    justify-content: space-between; font-weight: 600; font-size: 0.98rem;
  }
  .site-header.open .nav-group-btn:hover, .site-header.open .nav-group.open .nav-group-btn { background: var(--surface); }
  .site-header.open .nav-drop {
    position: static; transform: none; display: none; min-width: 0;
    background: none; border: 0; border-radius: 0; box-shadow: none;
    padding: 2px 0 6px 14px; margin: 2px 0 2px 18px;
    border-left: 2px solid var(--border);
  }
  .site-header.open .nav-group.open .nav-drop { display: flex; flex-direction: column; gap: 2px; }
  .site-header.open .nav-drop a { padding: 12px 14px; border-radius: 8px; font-size: 0.92rem; }
  .site-header.open .nav-drop a:hover { background: var(--surface); }

  .hero { padding: 64px 0; }
  .hero-stats { gap: 26px; }
  .footer-legal { margin-left: 0; width: 100%; }
}

/* Sur téléphone, logo + texte + bouton + burger ne tiennent plus sur une ligne :
   on resserre le header et on masque le nom écrit (le logo suffit à identifier la marque). */
@media (max-width: 600px) {
  .header-inner { height: 76px; gap: 10px; }
  .brand-logo { height: 46px; }
  .brand-text { display: none; }
  .header-inner > .btn-primary { padding: 8px 14px; font-size: 0.68rem; letter-spacing: 0.02em; }
  .nav-toggle { margin-left: 10px; }
}

/* ============ Réservation — grille hebdo ============ */
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 18px; }
.week-nav h2 { font-size: 1.15rem; }
.week-nav button {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 8px 14px; cursor: pointer; font-family: "Oxanium", sans-serif; font-weight: 700;
}
.week-nav button:hover { border-color: var(--accent); }

.slot-grid-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.slot-grid {
  display: grid;
  grid-template-columns: 76px repeat(7, minmax(124px, 1fr));
  grid-auto-rows: 1fr;
  min-width: 960px;
}
.slot-grid > div { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 5px; }
.slot-grid > div:nth-child(8n+1) { border-left: 0; }
.slot-grid .gh {
  background: var(--surface); font-family: "Oxanium", sans-serif; font-weight: 700; font-size: 0.78rem;
  text-align: center; text-transform: uppercase; letter-spacing: 0.04em; position: sticky; top: 0; z-index: 2;
  padding: 10px 5px;
}
.slot-grid .gh small { display: block; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-top: 2px; }
/* Colonne des heures fixe pendant le défilement horizontal (semaine large sur mobile) */
.slot-grid .rl { background: var(--surface); font-family: "Oxanium", sans-serif; font-weight: 700; font-size: 0.72rem; display: flex; align-items: center; justify-content: center; position: sticky; left: 0; z-index: 1; text-align: center; }
.slot-grid .gh:first-child { position: sticky; left: 0; z-index: 3; }

/* Cellule de créneau : hauteur uniforme (grid-auto-rows: 1fr ci-dessus égalise déjà toute la
   ligne), statut en en-tête, mini-grille des 4 places (camp A/B × position 1/2) calée en bas
   pour que "Fermé"/"Passé"/"Disponible" (sans mini-grille) gardent la même hauteur que les
   cellules avec un épisode en cours — jamais de grille en dents de scie. */
.slot {
  border: 1px solid transparent; width: 100%; height: 100%; box-sizing: border-box; min-height: 76px;
  text-align: left; border-radius: 8px; padding: 7px; font: inherit; font-size: 0.72rem; line-height: 1.2;
  background: var(--bg); color: var(--muted); display: flex; flex-direction: column; gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.slot-label { display: flex; align-items: center; gap: 6px; font-family: "Oxanium", sans-serif; font-weight: 700; color: var(--text); font-size: 0.72rem; }
.slot-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: var(--muted); }

.slot--open { background: rgba(52, 211, 153, 0.07); border-color: rgba(52, 211, 153, 0.3); }
.slot--open .slot-dot { background: #34d399; box-shadow: 0 0 6px #34d399; }
.slot--filling { background: rgba(242, 201, 76, 0.07); border-color: rgba(242, 201, 76, 0.35); }
.slot--filling .slot-dot, .slot--awaiting_admin .slot-dot { background: #f2c94c; box-shadow: 0 0 6px #f2c94c; }
.slot--awaiting_admin { background: rgba(242, 201, 76, 0.12); border-color: rgba(242, 201, 76, 0.45); }
.slot--confirmed { background: rgba(248, 113, 113, 0.09); border-color: rgba(248, 113, 113, 0.35); }
.slot--confirmed .slot-dot { background: #f87171; box-shadow: 0 0 6px #f87171; }
.slot--mine { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.slot--closed, .slot--past { background: transparent; border-color: transparent; opacity: 0.45; }
.slot--tournament { background: rgba(255, 90, 31, 0.06); border-color: rgba(255, 90, 31, 0.3); opacity: 0.85; }

.slot-positions { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-top: auto; }
.slot-side { display: flex; gap: 3px; }
.slot-pos-box {
  flex: 1; height: 19px; border-radius: 5px; display: grid; place-items: center;
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.01em; overflow: hidden; white-space: nowrap;
  border: 1px dashed var(--border); color: var(--muted); background: var(--bg); cursor: default;
}
.slot-pos-box--free::after { content: "+"; opacity: 0.6; }
.slot-pos-box--accepted { border-style: solid; border-color: var(--border); background: var(--surface); color: var(--text); }
.slot-pos-box--pending { border-style: dashed; border-color: #f2c94c; color: #f2c94c; }
.slot-pos-box--mine { border-style: solid; border-color: var(--accent); background: rgba(255, 90, 31, 0.16); color: var(--accent); }
.slot-pos-box--joinable { cursor: pointer; border-color: var(--accent-2); color: var(--accent-2); }
.slot-pos-box--joinable:hover { background: rgba(58, 210, 255, 0.12); }

.slot-actions { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.slot-mini-btn {
  display: block; width: 100%; box-sizing: border-box; padding: 4px 6px; font: inherit;
  font-size: 0.64rem; font-weight: 700; border-radius: 6px; text-align: center;
  border: 1px solid var(--accent-2); background: transparent; color: var(--accent-2); cursor: pointer;
}
.slot-mini-btn:hover { background: var(--accent-2); color: #0a0b0f; }
.slot-mini-btn--ghost { border-color: var(--border); color: var(--muted); }
.slot-mini-btn--ghost:hover { background: transparent; border-color: var(--bad); color: var(--bad); }

.res-list { list-style: none; display: grid; gap: 10px; margin-top: 18px; }
.res-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; font-size: 0.9rem;
}
.res-list li > span { flex: 1; min-width: 0; }

/* Point d'entrée "Réserver une session" / "Parties ouvertes" en haut de la page Réservation,
   au-dessus de la grille (qui reste utilisable directement en dessous). */
.res-entry { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 22px 0; }
.res-entry-card {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  padding: 18px 20px; border-radius: 14px; cursor: pointer; font: inherit;
  background: linear-gradient(135deg, rgba(255, 90, 31, 0.1), transparent 65%), var(--surface);
  border: 1px solid var(--border); color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.res-entry-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.res-entry-card--ghost { background: var(--surface); }
.res-entry-card--ghost:hover { border-color: var(--accent-2); }
.res-entry-ic {
  flex: none; width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; background: rgba(255, 90, 31, 0.16); color: var(--accent);
}
.res-entry-card--ghost .res-entry-ic { background: rgba(34, 211, 238, 0.14); color: var(--accent-2); }
.res-entry-ic svg { width: 23px; height: 23px; }
.res-entry-text { min-width: 0; }
.res-entry-text strong { display: block; font-family: "Oxanium", sans-serif; font-size: 1rem; }
.res-entry-desc { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 2px; }

/* Assistant de réservation (mode/type/défi) — liste de choix cliquables pleine largeur. */
.wizard-choices { display: grid; gap: 10px; margin: 4px 0 14px; }
.wizard-choice {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); font: inherit; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease;
}
.wizard-choice:hover:not(:disabled) { border-color: var(--accent-2); background: var(--bg-alt); }
.wizard-choice:disabled { opacity: 0.5; cursor: not-allowed; }
.wizard-choice-ic {
  flex: none; width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; background: rgba(255, 90, 31, 0.12); color: var(--accent);
}
.wizard-choice-ic svg { width: 20px; height: 20px; }
.wizard-choice-text { min-width: 0; }
.wizard-choice-text strong { display: block; font-family: "Oxanium", sans-serif; font-size: 0.98rem; margin-bottom: 3px; }
.wizard-choice-text span { color: var(--muted); font-size: 0.85rem; }

/* Bandeau "clique un créneau disponible" au-dessus de la grille, le temps de finir une
   invitation ou un défi préparé dans l'assistant. */
.slot-hint {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: rgba(34, 211, 238, 0.08); border: 1px solid var(--accent-2); border-radius: 12px;
  padding: 14px 18px; margin: 18px 0;
}
.slot-hint-ic {
  flex: none; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; background: rgba(34, 211, 238, 0.16); color: var(--accent-2);
}
.slot-hint-ic svg { width: 18px; height: 18px; }
.slot-hint-body { flex: 1; min-width: 200px; }
.slot-hint p { margin: 0; font-size: 0.92rem; }

/* Liste des parties ouvertes disponibles (modale "Parties ouvertes") */
.open-game-list { list-style: none; display: grid; gap: 10px; max-height: 360px; overflow-y: auto; }
.open-game-item {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.open-game-item strong { display: block; font-family: "Oxanium", sans-serif; font-size: 0.9rem; }
.open-game-item span { color: var(--muted); font-size: 0.82rem; }

/* Icône devant le titre d'une modale (ex : "Parties ouvertes", "Défier une équipe") */
.modal h3 { display: flex; align-items: center; gap: 10px; }
.modal-title-ic {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; background: rgba(34, 211, 238, 0.14); color: var(--accent-2);
}
.modal-title-ic svg { width: 16px; height: 16px; }

/* Légende de la grille de créneaux — pastilles de couleur au lieu d'emojis, cohérent avec
   .slot-dot utilisé sur chaque cellule de la grille elle-même. */
.grid-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; }
.grid-legend-item { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 0.82rem; }
.grid-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ============ Messagerie ============ */
.msg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.msg-list { list-style: none; display: grid; gap: 12px; }
.msg-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.msg-item .meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--muted); font-size: 0.8rem; margin-bottom: 6px; }
.msg-item h4 { font-size: 1rem; margin-bottom: 6px; }
.msg-item p { color: var(--muted); font-size: 0.9rem; white-space: pre-wrap; }
.msg-item .reply { margin-top: 10px; border-left: 3px solid var(--accent); padding-left: 12px; }
.msg-item .reply span { display: block; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.68rem; color: var(--accent); margin-bottom: 3px; }
.msg-badge { font-family: "Oxanium", sans-serif; font-weight: 700; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 999px; }
.msg-badge.nouveau { background: rgba(255, 90, 31, 0.16); color: var(--accent); }
.msg-badge.lu { background: rgba(34, 211, 238, 0.16); color: var(--accent-2); }
.msg-badge.traite { background: rgba(52, 211, 153, 0.16); color: var(--ok); }
.msg-item--unread { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.msg-item--unread h4::after { content: " ●"; color: var(--accent); font-size: 0.7em; vertical-align: middle; }

.tab-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #12060a;
  font-size: 0.68rem; font-weight: 800; margin-left: 4px; vertical-align: middle;
}

.admin-gate { max-width: 460px; }

/* Équipes du tournoi : puces compactes plutôt qu'une liste plein-largeur (jusqu'à 10+ équipes) */
.team-chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; }
.team-chip-list li {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 8px 6px 14px; font-size: 0.85rem;
}
.team-chip-list button {
  display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0;
  border-radius: 50%; border: 1px solid var(--border); background: var(--bg);
  color: var(--muted); font-size: 1rem; line-height: 1; cursor: pointer;
}
.team-chip-list button:hover { color: var(--bad); border-color: var(--bad); }

/* Grille des confrontations : distinguer d'un coup d'œil les matchs déjà joués */
.ladder tr.match-played { background: rgba(52, 211, 153, 0.05); }
.ladder tr.match-played td.pos { color: var(--ok); }

/* Réservations admin : un jour = un bloc repliable (replié par défaut si tout est fermé) */
.day-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.day-block > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 20px; font-family: "Oxanium", sans-serif; font-weight: 700;
}
.day-block > summary::-webkit-details-marker { display: none; }
.day-block > summary::after { content: "▾"; color: var(--muted); font-weight: 400; transition: transform 0.15s ease; }
.day-block[open] > summary::after { transform: rotate(180deg); }
.day-summary-sub { font-family: "Inter", sans-serif; font-weight: 500; font-size: 0.82rem; color: var(--muted); text-align: right; }
.day-bulk-actions { display: flex; gap: 8px; padding: 0 20px 14px; }
.day-block .table-wrap { border: 0; border-top: 1px solid var(--border); border-radius: 0; margin-top: 0; }
.slot-row-muted { opacity: 0.45; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.admin-actions select, .admin-actions textarea {
  background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; font: inherit;
}
.admin-actions textarea { width: 100%; min-height: 60px; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.filter-row button { background: var(--surface); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-family: "Oxanium", sans-serif; font-weight: 700; font-size: 0.78rem; }
.filter-row button.active { background: linear-gradient(135deg, var(--accent), #ff8a3d); color: #12060a; }

@media (max-width: 760px) {
  .msg-cols { grid-template-columns: 1fr; }
}

/* ============ Animations : transition de page + apparition au chargement ============
   100 % CSS. Sur `animation … both`, si le navigateur ne sait pas animer, la règle
   est simplement ignorée -> l'élément reste visible. Rien ne peut disparaître. */

/* Transition douce entre pages (navigateurs compatibles View Transitions ; sinon inerte) */
@view-transition { navigation: auto; }

@keyframes sa-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes sa-in-soft {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* le contenu se met en place section par section, du haut vers le bas */
.sa-anim .hero-inner,
.sa-anim .page-hero .inner { animation: sa-in-soft 0.55s ease both; }

.sa-anim main > section { animation: sa-in 0.6s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
.sa-anim main > section:nth-of-type(2) { animation-delay: 0.08s; }
.sa-anim main > section:nth-of-type(3) { animation-delay: 0.16s; }
.sa-anim main > section:nth-of-type(4) { animation-delay: 0.24s; }
.sa-anim main > section:nth-of-type(5) { animation-delay: 0.32s; }
.sa-anim main > section:nth-of-type(n+6) { animation-delay: 0.4s; }

/* cascade des cartes dans leur grille */
.sa-anim .cards > .card,
.sa-anim .linkcards > .linkcard,
.sa-anim .tier-cards > .tier-card,
.sa-anim .grid-2 > .panel { animation: sa-in-soft 0.5s ease both; }
.sa-anim .cards > .card:nth-child(2),
.sa-anim .linkcards > .linkcard:nth-child(2),
.sa-anim .tier-cards > .tier-card:nth-child(2),
.sa-anim .grid-2 > .panel:nth-child(2) { animation-delay: 0.07s; }
.sa-anim .cards > .card:nth-child(3),
.sa-anim .linkcards > .linkcard:nth-child(3),
.sa-anim .tier-cards > .tier-card:nth-child(3) { animation-delay: 0.14s; }
.sa-anim .cards > .card:nth-child(4),
.sa-anim .linkcards > .linkcard:nth-child(4),
.sa-anim .tier-cards > .tier-card:nth-child(4) { animation-delay: 0.21s; }
.sa-anim .cards > .card:nth-child(n+5),
.sa-anim .tier-cards > .tier-card:nth-child(n+5) { animation-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none !important; }
  @view-transition { navigation: none; }
}
