/* ═══════════════════════════════════════════════════════════════
   LE MÉGAJEU DES PRONOS — thème « Fiesta »
   Troisième feuille complète. Mêmes classes, aucun HTML modifié.

   PARTI PRIS
   Une affiche de fête foraine plutôt qu'une interface : papier crème,
   encre aubergine, aplats francs, bordures de 2 px et ombres portées
   nettes (décalées, jamais floues). Tout se touche du doigt, tout claque.
   Le nom du jeu dit « MÉGA » : la typographie le dit aussi, en Anton.

   RÈGLES QUI TIENNENT L'ENSEMBLE
   1. Une seule épaisseur de bordure (2 px) et un seul décalage d'ombre
      (4 px, sans flou, toujours en encre). Rien d'autre ne crée du relief.
   2. Cinq couleurs, employées par rôle et jamais au hasard : jaune =
      action, vert = points gagnés, rouge = direct, bleu = information,
      rose = accent de classement.
   3. Le contraste prime sur l'éclat : tout texte se lit sur son fond
      (jaune et crème portent de l'encre, jamais du blanc).
   4. Les boutons s'enfoncent : l'ombre disparaît, l'élément descend.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Jetons ─────────────────────────────────────────────────── */
:root {
  --cream:     #fff5e4;
  --paper:     #ffffff;
  --paper-alt: #fffaf0;

  --ink:    #191333;
  --ink-2:  #4a4370;
  --ink-3:  #6e6795;
  --ink-4:  #9a94b8;

  /* Les cinq couleurs, chacune avec sa teinte de fond */
  --yellow:      #ffce2e;   --yellow-tint: #fff3c9;
  --red:         #ff4b3e;   --red-tint:    #ffe2df;
  --blue:        #2f6bff;   --blue-tint:   #dfe7ff;
  --green:       #0fa968;   --green-tint:  #d8f5e8;
  --pink:        #ff5fa2;   --pink-tint:   #ffe0ed;

  --border-w: 2px;
  --shadow:   4px 4px 0 var(--ink);
  --shadow-sm-hard: 3px 3px 0 var(--ink);
  --shadow-lg-hard: 8px 8px 0 var(--ink);

  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --ease: cubic-bezier(.2,.8,.3,1);
  --fast: 120ms;

  --nav-h: 70px;
  --max-w: 1160px;

  /* Alias : style.css expose ces noms, du HTML inline y renvoie */
  --gold: var(--yellow); --gold-border: var(--ink); --gold-glow: var(--yellow-tint);
  --bg-base: var(--cream); --bg-card: var(--paper); --bg-input: var(--paper);
  --border: var(--ink); --border-bright: var(--ink);
  --txt-primary: var(--ink); --txt-secondary: var(--ink-2); --txt-muted: var(--ink-3);
  --shadow-sm: var(--shadow-sm-hard); --shadow-md: var(--shadow); --shadow-lg: var(--shadow-lg-hard);
  --r-sm: var(--radius-sm); --r-md: var(--radius); --r-lg: var(--radius-lg); --r-xl: var(--radius-lg);
  --dur: var(--fast);
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream:     #1a1436;
    --paper:     #241c4a;
    --paper-alt: #2c2258;

    --ink:    #0e0a1f;          /* les bordures restent l'encre la plus sombre */
    --ink-2:  #cfc9ee;
    --ink-3:  #a49dd0;
    --ink-4:  #7a72ab;

    --yellow-tint: #3a2f10;
    --red-tint:    #3a1b19;
    --blue-tint:   #17224d;
    --green-tint:  #10321f;
    --pink-tint:   #3a1a2a;
  }
  /* En sombre, le texte courant ne peut plus être l'encre des bordures */
  body, h1, h2, h3, .rank-name, .lb-name, .mc-team-name, .gc-name,
  .stat-num, .page-title, .brand-name, .member-name, .tpr-name { color: #f4f1ff; }
}

/* ─── Socle ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
ul, ol { list-style: none; }

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px;
    text-underline-offset: 3px; text-decoration-color: var(--yellow); }
a:hover { text-decoration-color: var(--red); }

::selection { background: var(--yellow); color: var(--ink); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ─── Typographie ────────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.05; letter-spacing: -0.01em; }

/* Anton porte tout ce qui doit crier : titres, scores, compteurs. */
.page-title, .gd-title, .landing-title, .brand-name, .stat-num,
.mc-score-num, .landing-rules strong, .podium-pts {
  font-family: 'Anton', 'Plus Jakarta Sans', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.95;
}
.page-title    { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.gd-title      { font-size: clamp(2rem, 4.2vw, 3rem); }
.landing-title { font-size: clamp(2.8rem, 6.5vw, 4.6rem); }

h2 { font-size: 1.3rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 800; }

/* Micro-labels : capitales grasses, l'unité de rythme du thème */
.panel-title, .round-title, .lb-table th, .ranking-table th, .stat-lbl,
.pred-input-team, .mc-vs {
  font-size: 0.72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-2);
}

.stat-num, .mc-score, .score-field, .pts-num, .rank-pts, .rank-count, .rank-exact,
.col-pts, .col-preds, .col-stat, .tpr-stats, .rank-num, .rank-num-sm, .tpr-pos,
.match-date-txt, .member-pts {
  font-variant-numeric: tabular-nums;
}

.gold-text { color: var(--green); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(18px, 4vw, 32px); }

/* ══ BARRE DE NAVIGATION ══════════════════════════════════════ */
.topnav {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  background: var(--yellow);
  border-bottom: var(--border-w) solid var(--ink);
}

.topnav-inner {
  position: relative;
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 32px);
  height: 100%;
  display: flex; align-items: center; gap: 22px;
}

.topnav-brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; text-decoration: none; }
.topnav-brand:hover { text-decoration: none; }
.brand-ball {
  font-size: 1.2rem;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--paper); border: var(--border-w) solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  animation: fiesta-spin 9s linear infinite;
}
@keyframes fiesta-spin { to { transform: rotate(360deg); } }

.brand-name { font-size: 1.4rem; color: var(--ink); }
.brand-name em {
  display: block; font-style: normal;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.56rem; font-weight: 800;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--ink-2); margin-top: 2px;
}

.topnav-collapse { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.topnav-links { display: flex; align-items: center; gap: 4px; flex: 0 1 auto; min-width: 0; }

.nav-link {
  display: block; padding: 8px 13px;
  font-size: 0.86rem; font-weight: 800;
  color: var(--ink); white-space: nowrap;
  border: var(--border-w) solid transparent; border-radius: 999px;
  text-decoration: none;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.nav-link:hover { background: rgba(25,19,51,.09); text-decoration: none; }
.nav-link.is-active { background: var(--ink); color: var(--yellow); border-color: var(--ink); }

.comp-switch { display: flex; min-width: 0; }
.comp-switch select {
  min-width: 0; max-width: 210px;
  padding: 7px 30px 7px 12px;
  font-size: 0.8rem; font-weight: 700; color: var(--ink);
  background: var(--paper); border: var(--border-w) solid var(--ink);
  border-radius: 999px; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23191333' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.comp-single {
  max-width: 210px; padding: 6px 12px;
  font-size: 0.78rem; font-weight: 700; color: var(--ink);
  background: var(--paper); border: var(--border-w) solid var(--ink); border-radius: 999px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.topnav-user { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.user-avatar-placeholder, .user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--pink); border: var(--border-w) solid var(--ink);
  color: var(--ink); font-weight: 800; font-size: 0.82rem;
  display: flex; align-items: center; justify-content: center;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-display-name {
  font-size: 0.8rem; font-weight: 800; color: var(--ink);
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-pts-badge { font-size: 0.72rem; font-weight: 700; color: var(--ink-2); }
.pts-num { color: var(--ink); font-weight: 800; }

.btn-logout {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); border: var(--border-w) solid transparent;
}
.btn-logout:hover { background: var(--red); border-color: var(--ink); }
.btn-logout svg { width: 16px; height: 16px; }

.topnav-toggle {
  display: none; width: 44px; height: 44px; margin-left: auto;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--paper); border: var(--border-w) solid var(--ink); border-radius: var(--radius-sm);
}
.topnav-toggle span { width: 18px; height: 2.5px; background: var(--ink); border-radius: 2px; }

@media (max-width: 1080px) {
  .topnav-collapse { display: none; }
  .topnav-toggle { display: flex; }
  .topnav-inner.nav-open .topnav-collapse {
    display: flex; flex-direction: column; align-items: stretch; gap: 8px;
    position: absolute; top: calc(var(--nav-h) - 2px); left: 0; right: 0; z-index: 210;
    padding: 16px;
    background: var(--yellow); border-bottom: var(--border-w) solid var(--ink);
  }
  .topnav-inner.nav-open .topnav-links { flex-direction: column; align-items: stretch; }
  .topnav-inner.nav-open .nav-link { padding: 11px 14px; border-radius: var(--radius-sm); }
  .topnav-inner.nav-open .topnav-user { margin-left: 0; padding-top: 12px; border-top: var(--border-w) solid var(--ink); }
  .topnav-inner.nav-open .comp-switch select, .topnav-inner.nav-open .comp-single { max-width: none; width: 100%; }
}

/* ─── Page ───────────────────────────────────────────────────── */
.page-wrap { min-height: calc(100vh - var(--nav-h) - 90px); padding: 40px 0 72px; }

.page-hd { margin-bottom: 30px; }
.page-title { margin-bottom: 10px; }
.page-subtitle { font-size: 0.95rem; font-weight: 500; color: var(--ink-2); max-width: 58ch; }
.page-hd-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.site-footer { border-top: var(--border-w) solid var(--ink); background: var(--yellow); padding: 22px 0; margin-top: 48px; }
.footer-inner {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  font-size: 0.8rem; font-weight: 600; color: var(--ink);
}
.footer-sep { opacity: .45; }

/* ══ BOUTONS ══════════════════════════════════════════════════
   Ils s'enfoncent : l'ombre disparaît, l'élément descend de 4 px. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 10px 20px;
  font-size: 0.88rem; font-weight: 800; line-height: 1;
  color: var(--ink); background: var(--paper);
  border: var(--border-w) solid var(--ink); border-radius: 999px;
  box-shadow: var(--shadow-sm-hard);
  text-decoration: none !important; white-space: nowrap;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease),
              background var(--fast) var(--ease);
}
.btn:hover { text-decoration: none; transform: translate(-1px,-1px); box-shadow: var(--shadow); }
.btn:active { transform: translate(3px,3px); box-shadow: 0 0 0 var(--ink); }

.btn-gold { background: var(--yellow); }
.btn-gold:hover { background: #ffd84f; }
.btn-outline { background: var(--paper); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: rgba(25,19,51,.07); box-shadow: none; transform: none; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #ff6459; }

.btn-sm { min-height: 34px; padding: 8px 15px; font-size: 0.8rem; }
.btn-xs { min-height: 30px; padding: 6px 12px; font-size: 0.74rem; box-shadow: 2px 2px 0 var(--ink); }
.btn-xs:hover { box-shadow: var(--shadow-sm-hard); }
.btn-block { width: 100%; }
.btn-pred { width: 100%; margin-top: 12px; }

/* ══ FORMULAIRES ══════════════════════════════════════════════ */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; margin-bottom: 7px; font-size: 0.8rem; font-weight: 800; color: var(--ink); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 11px 14px;
  color: var(--ink); background: var(--paper);
  border: var(--border-w) solid var(--ink); border-radius: var(--radius-sm);
  font-weight: 600;
  transition: box-shadow var(--fast) var(--ease);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--ink-4); font-weight: 500; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; box-shadow: var(--shadow-sm-hard);
}
.form-field textarea { resize: vertical; line-height: 1.6; }
.optional { color: var(--ink-3); font-weight: 500; }

.form-check { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.form-check input { width: 18px; height: 18px; accent-color: var(--ink); }

.hint-text { font-size: 0.82rem; font-weight: 500; color: var(--ink-2); line-height: 1.65; }

/* Le champ de score : gros, carré, jaune dès qu'on y touche */
.score-field {
  width: 58px; height: 56px; padding: 0;
  text-align: center;
  font-family: 'Anton', sans-serif; font-size: 1.7rem; font-weight: 400;
  color: var(--ink); background: var(--paper);
  border: var(--border-w) solid var(--ink); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm-hard);
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease);
}
.score-field:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow); }
.score-field:focus { outline: none; background: var(--yellow); transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.score-field:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.score-field::-webkit-outer-spin-button, .score-field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score-field[type=number] { -moz-appearance: textfield; }

/* ─── Alertes ────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px; margin-bottom: 22px;
  font-size: 0.88rem; font-weight: 600; color: var(--ink);
  background: var(--blue-tint);
  border: var(--border-w) solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow-sm-hard);
}
.alert-success { background: var(--green-tint); }
.alert-error   { background: var(--red-tint); }
.alert-info    { background: var(--blue-tint); }
.alert-banner  { text-align: center; }

/* ══ CARTES ═══════════════════════════════════════════════════ */
.dash-panel, .gd-panel, .stat-card, .match-card, .match-row, .group-card,
.team-card, .lb-table-wrap, .ranking-table-wrap, .legal-page .cgu, .modal-box {
  background: var(--paper);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius);
}
.dash-panel, .gd-panel { padding: 24px; box-shadow: var(--shadow); }
.panel-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

/* ─── Compteurs : quatre couleurs, quatre rôles ──────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 32px; }
.stat-card { padding: 20px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.stat-card:nth-child(1) { background: var(--yellow); }
.stat-card:nth-child(2) { background: var(--blue-tint); }
.stat-card:nth-child(3) { background: var(--pink-tint); }
.stat-card:nth-child(4) { background: var(--green-tint); }
.stat-num { font-size: 2.7rem; color: var(--ink); }
.stat-lbl { color: var(--ink-2); }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.dash-panel-groups { grid-column: 1 / -1; }

/* ─── États vides ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-2); }
.empty-state span { display: block; font-size: 2.2rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.92rem; font-weight: 600; line-height: 1.7; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state.large { padding: 68px 20px; }
.empty-state-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

/* ══ LIGNE DE MATCH ═══════════════════════════════════════════ */
.match-stack { display: flex; flex-direction: column; gap: 12px; }
.match-row { padding: 16px 18px; box-shadow: var(--shadow-sm-hard); transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.match-row:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow); }

.match-row-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.match-date-txt { margin-left: auto; font-size: 0.76rem; font-weight: 700; color: var(--ink-2); }
.match-date-txt strong { color: var(--ink); }
.match-date-txt em { font-style: normal; color: var(--ink-3); }

.badge-round, .badge-group, .badge-round-sm {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
  background: var(--blue-tint); border: var(--border-w) solid var(--ink); color: var(--ink);
  white-space: nowrap;
}
.badge-group { background: var(--pink-tint); }

.match-row-teams { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; row-gap: 8px; }
.match-team { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; font-size: 0.92rem; font-weight: 700; }
.match-team > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-team-right { flex-direction: row-reverse; }
.match-row-input { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.score-dash { font-weight: 800; color: var(--ink-3); }

.flag-xs { width: 16px; height: 16px; object-fit: contain; }
.flag-sm { width: 24px; height: 24px; object-fit: contain; }
.flag-md { width: 38px; height: 38px; object-fit: contain; }

.pred-status { display: block; margin-top: 10px; font-size: 0.78rem; font-weight: 700; min-height: 1.1em; }
.pred-status:empty { display: none; }
.pred-status[data-state="idle"]    { color: var(--ink-3); font-weight: 600; }
.pred-status[data-state="pending"] { color: var(--ink-2); }
.pred-status[data-state="ok"]      { color: var(--green); }
.pred-status[data-state="error"]   { color: var(--red); }
.match-row .pred-status { width: 100%; text-align: center; margin-top: 12px; padding-top: 10px; border-top: var(--border-w) dashed var(--ink-4); }
.pred-form .pred-status { text-align: center; }
.pred-closed { display: block; margin-top: 8px; font-size: 0.78rem; font-weight: 600; color: var(--ink-3); }

/* ─── Derniers pronostics ────────────────────────────────────── */
.pred-list { display: flex; flex-direction: column; gap: 10px; }
.pred-item { padding: 13px 15px; border-radius: var(--radius-sm); background: var(--paper-alt); border: var(--border-w) solid var(--ink); }
.pred-item.pred-done { background: var(--paper); }
.pred-match-name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 0.88rem; font-weight: 800; margin-bottom: 6px; }
.pred-sep { color: var(--ink-3); font-weight: 600; font-size: 0.76rem; }
.pred-scores { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.8rem; font-weight: 600; color: var(--ink-2); }
.pred-prono strong, .pred-real strong { color: var(--ink); font-weight: 800; }

.pts-chip, .pts-chip-lg {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: 999px;
  font-size: 0.73rem; font-weight: 800; color: var(--ink);
  background: var(--paper-alt); border: var(--border-w) solid var(--ink);
}
.pts-chip-lg { font-size: 0.8rem; padding: 5px 13px; }
.pts-perfect { background: var(--green); color: #fff; }
.pts-good    { background: var(--green-tint); }
.pts-diff    { background: var(--blue-tint); }
.pts-result  { background: var(--yellow-tint); }
.pts-zero    { background: transparent; color: var(--ink-3); }

.live-badge, .badge-live {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
  background: var(--red); border: var(--border-w) solid var(--ink); color: var(--ink);
  animation: fiesta-pulse 1.6s ease-in-out infinite;
}
@keyframes fiesta-pulse { 50% { background: #ff7a70; } }
.badge-finished {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
  background: var(--paper-alt); border: var(--border-w) solid var(--ink); color: var(--ink-2);
}

/* ─── Groupes en raccourci ───────────────────────────────────── */
.group-cards-mini { display: flex; flex-direction: column; gap: 10px; }
.group-mini-card {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; color: inherit; text-decoration: none;
  background: var(--paper-alt);
  border: var(--border-w) solid var(--ink); border-radius: var(--radius-sm);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.group-mini-card:hover { text-decoration: none; transform: translate(-1px,-1px); box-shadow: var(--shadow-sm-hard); }
.group-mini-icon { font-size: 1.2rem; }
.group-mini-name { font-size: 0.92rem; font-weight: 800; }
.group-mini-meta { font-size: 0.76rem; font-weight: 600; color: var(--ink-2); }
.group-mini-arrow { width: 16px; height: 16px; margin-left: auto; }

/* ══ PAGE MATCHS ══════════════════════════════════════════════ */
.round-section { margin-bottom: 44px; }
.round-title {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 7px 16px; margin-bottom: 20px;
  background: var(--ink); color: var(--yellow);
  border-radius: 999px;
}
.round-title-line { display: none; }             /* la pastille remplace les filets */

.matches-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

.match-card {
  display: flex; flex-direction: column; padding: 18px;
  box-shadow: var(--shadow);
  transition: transform var(--fast) var(--ease);
}
.match-card:hover { transform: translate(-2px,-2px); }
.match-card.match-finished { background: var(--paper-alt); }
.match-card.match-live { background: var(--red-tint); }
.match-card.match-next { background: var(--yellow-tint); box-shadow: var(--shadow-lg-hard); }

.mc-header { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.mc-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mc-datetime, .mc-stadium { display: flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 600; color: var(--ink-2); }
.mc-datetime em, .mc-stadium em { font-style: normal; color: var(--ink-3); }

.mc-scoreboard { display: flex; align-items: center; gap: 10px; padding-bottom: 18px; }
.mc-team { display: flex; flex-direction: column; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.mc-team-name { font-size: 0.85rem; font-weight: 800; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-vs-block { flex-shrink: 0; min-width: 70px; text-align: center; }
.mc-score { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; background: var(--ink); border-radius: var(--radius-sm); }
.mc-score-num { font-size: 1.7rem; color: var(--yellow); }
.mc-score-sep { color: var(--ink-4); }
.mc-shootout { margin-top: 6px; font-size: 0.68rem; font-weight: 700; color: var(--ink-2); }

.mc-prediction { margin-top: auto; padding-top: 16px; border-top: var(--border-w) dashed var(--ink-4); }
.pred-result-display { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); }
.pred-prono-label strong { color: var(--ink); font-weight: 800; }
.pred-locked-display { display: flex; align-items: center; gap: 9px; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); }
.pred-no-prono { font-size: 0.82rem; font-weight: 600; color: var(--ink-3); }
.pred-edit-hint { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
.pred-edit-hint strong { color: var(--ink); font-weight: 800; }

.pred-inputs { display: flex; align-items: flex-end; justify-content: center; gap: 16px; }
.pred-input-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pred-input-team { max-width: 64px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pred-dash { font-weight: 800; color: var(--ink-3); padding-bottom: 17px; }

/* ══ GROUPES ══════════════════════════════════════════════════ */
.groups-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(276px, 1fr)); gap: 16px; }

/* Chaque carte prend une couleur de la série, en rotation */
.group-card {
  display: flex; flex-direction: column; gap: 9px;
  padding: 22px; color: inherit; text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.group-card:hover { text-decoration: none; transform: translate(-2px,-2px); box-shadow: var(--shadow-lg-hard); }
.groups-grid .group-card:nth-child(4n+1) { background: var(--yellow-tint); }
.groups-grid .group-card:nth-child(4n+2) { background: var(--blue-tint); }
.groups-grid .group-card:nth-child(4n+3) { background: var(--pink-tint); }
.groups-grid .group-card:nth-child(4n+4) { background: var(--green-tint); }

.gc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.gc-icon { font-size: 1.5rem; }
.gc-badge-role {
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
  background: var(--paper); border: var(--border-w) solid var(--ink); color: var(--ink);
}
.gc-name { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; }
.gc-desc { font-size: 0.83rem; font-weight: 500; color: var(--ink-2); line-height: 1.6; }
.gc-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; font-size: 0.78rem; font-weight: 700; color: var(--ink-2); }
.gc-arrow { font-size: 1rem; }

.gc-comps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.comp-chip {
  font-size: 0.7rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  background: var(--paper); border: var(--border-w) solid var(--ink); color: var(--ink);
}
.comp-chip-empty { background: transparent; border-style: dashed; color: var(--ink-3); }

.comp-checklist {
  display: flex; flex-direction: column;
  max-height: 240px; overflow-y: auto;
  border: var(--border-w) solid var(--ink); border-radius: var(--radius-sm);
}
.comp-check {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; font-size: 0.86rem; font-weight: 600; color: var(--ink); cursor: pointer;
  border-bottom: var(--border-w) solid var(--ink);
}
.comp-check:last-child { border-bottom: none; }
.comp-check:hover { background: var(--yellow-tint); }
.comp-check input { width: 18px; height: 18px; accent-color: var(--ink); flex-shrink: 0; }

/* ─── Détail d'un groupe ─────────────────────────────────────── */
.gd-header { display: flex; justify-content: space-between; gap: 22px; flex-wrap: wrap; margin-bottom: 32px; }
.back-link { display: inline-block; margin-bottom: 12px; font-size: 0.82rem; font-weight: 800; }
.gd-desc { margin-top: 10px; font-size: 0.93rem; font-weight: 500; color: var(--ink-2); max-width: 58ch; }
.gd-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 0.8rem; font-weight: 700; color: var(--ink-2); }
.invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em; color: var(--ink);
  background: var(--yellow); border: var(--border-w) solid var(--ink);
  padding: 2px 8px; border-radius: 6px;
}
.gd-header-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.gd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.gd-panel-teams { grid-column: 1 / -1; }

/* ══ CLASSEMENTS ══════════════════════════════════════════════ */
.ranking-table-wrap, .lb-table-wrap { overflow-x: auto; box-shadow: var(--shadow); }

/* border-collapse: separate — et non collapse. Avec collapse, un fond ou une
   ombre posés sur la ligne (le liseré du joueur consulté) empêchent certaines
   cellules de peindre leur bordure : le filet de séparation s'interrompait au
   milieu du tableau. En separate, chaque cellule dessine la sienne. */
.ranking-table, .lb-table {
  width: 100%; font-size: 0.88rem;
  border-collapse: separate; border-spacing: 0;
}
.ranking-table th, .lb-table th {
  padding: 13px 14px; white-space: nowrap;
  background: var(--ink); color: var(--yellow);
}
.ranking-table td, .lb-table td {
  padding: 13px 14px; font-weight: 600;
  border-bottom: var(--border-w) solid var(--ink);
}
.ranking-table tr:last-child td, .lb-table tr:last-child td { border-bottom: none; }

/* Chaque en-tête suit l'alignement de sa colonne : sans ça « PTS » restait à
   gauche au-dessus de nombres alignés à droite. */
.ranking-table th             { text-align: left; }
.ranking-table th:first-child { text-align: center; }
.ranking-table th:nth-child(3){ text-align: right; }
.ranking-table th:nth-child(n+4) { text-align: center; }

.lb-table th               { text-align: left; }
.lb-table th.col-rank      { text-align: center; }
.lb-table th.col-pts       { text-align: right; }
.lb-table th.col-preds,
.lb-table th.col-stat      { text-align: center; }
.ranking-table tbody tr:hover, .lb-table tbody tr:hover { background: var(--yellow-tint); }

/* Le podium se lit dans le tableau aussi : trois couleurs, trois places */
.ranking-table tbody tr:nth-child(1), .lb-table tbody tr:nth-child(1) { background: var(--yellow-tint); }
.ranking-table tbody tr:nth-child(2), .lb-table tbody tr:nth-child(2) { background: var(--blue-tint); }
.ranking-table tbody tr:nth-child(3), .lb-table tbody tr:nth-child(3) { background: var(--pink-tint); }
.rank-me, .lb-me { background: var(--green-tint) !important; box-shadow: inset 4px 0 0 var(--green); }

.rank-pos, .col-rank { width: 56px; text-align: center; }
.rank-num, .rank-num-sm { font-weight: 800; color: var(--ink-2); }
.medal, .medal-icon { font-size: 1.1rem; }

.rank-player, .lb-player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rank-avatar-ph, .lb-avatar-ph, .member-avatar-ph {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); border: var(--border-w) solid var(--ink);
  font-size: 0.76rem; font-weight: 800; color: var(--ink);
}
.rank-name, .lb-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-pts, .col-pts { text-align: right; }
.rank-pts strong, .lb-pts-cell strong { font-size: 1.05rem; font-weight: 800; }
.rank-count, .rank-exact, .col-preds, .col-stat { text-align: center; color: var(--ink-2); }
.col-stat.exact { color: var(--ink); font-weight: 800; }

.role-badge { font-size: 0.68rem; font-weight: 800; }
.you-badge {
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px;
  background: var(--green); color: #fff; border: var(--border-w) solid var(--ink);
}

/* ─── Membres ────────────────────────────────────────────────── */
.members-list { display: flex; flex-direction: column; gap: 10px; }
.member-item {
  display: flex; align-items: center; gap: 14px; padding: 13px 15px;
  background: var(--paper-alt); border: var(--border-w) solid var(--ink); border-radius: var(--radius-sm);
}
.member-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.member-name { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 0.89rem; font-weight: 800; line-height: 1.3; }
.member-pts { font-size: 0.76rem; font-weight: 700; color: var(--ink-2); line-height: 1.2; }
.member-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Le badge de rôle contient un émoji : en inline-flex il s'aligne sur la
   ligne du pseudo au lieu de la déséquilibrer. */
.role-badge { display: inline-flex; align-items: center; }

/* ─── Équipes ────────────────────────────────────────────────── */
.teams-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(296px, 1fr)); gap: 16px; }
.team-card { padding: 0; overflow: hidden; box-shadow: var(--shadow); }
.team-card-hd {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--team-color, var(--yellow));
  border-bottom: var(--border-w) solid var(--ink);
}
.team-color-dot { display: none; }
.ranking-table .team-color-dot {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: var(--border-w) solid var(--ink); flex-shrink: 0;
}
.team-card-name { font-size: 0.98rem; font-weight: 800; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.45); }
.team-count { margin-right: auto; font-size: 0.74rem; font-weight: 800; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.45); }
.team-empty { padding: 16px; font-size: 0.82rem; font-weight: 600; color: var(--ink-3); }

.team-player-rank { display: flex; flex-direction: column; }
.team-player-rank li {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 16px; font-size: 0.85rem; font-weight: 600; color: var(--ink-2);
  border-bottom: 1px dashed var(--ink-4);
}
.team-player-rank li:last-child { border-bottom: none; }
.team-player-rank li:first-child { background: var(--yellow-tint); }
.team-player-rank li.is-me { background: var(--green-tint); }
.tpr-pos { width: 18px; flex-shrink: 0; font-weight: 800; color: var(--ink-3); }
.team-player-rank li:first-child .tpr-pos { color: var(--ink); }
.tpr-name { flex: 1; min-width: 0; font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpr-stats { flex-shrink: 0; font-size: 0.78rem; font-weight: 700; }
.tpr-stats strong { font-size: 0.92rem; font-weight: 800; color: var(--ink); }

.chip-remove {
  width: 24px; height: 24px; flex-shrink: 0;
  border: var(--border-w) solid transparent; background: transparent; color: var(--ink-3);
  border-radius: 50%; font-size: 0.7rem; line-height: 1;
}
.chip-remove:hover { background: var(--red); border-color: var(--ink); color: var(--ink); }

.invite-link-row { display: flex; gap: 8px; margin-top: 8px; }
.invite-link-row input {
  flex: 1; min-width: 0; padding: 10px 12px; font-size: 0.8rem; font-weight: 600;
  background: var(--paper-alt); border: var(--border-w) solid var(--ink); border-radius: var(--radius-sm);
}

/* ══ CLASSEMENT ═══════════════════════════════════════════════ */
.lb-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-pill {
  padding: 8px 16px; font-size: 0.84rem; font-weight: 800; color: var(--ink);
  background: var(--paper); border: var(--border-w) solid var(--ink); border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink); text-decoration: none;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.filter-pill:hover { text-decoration: none; transform: translate(-1px,-1px); box-shadow: var(--shadow-sm-hard); }
.filter-pill.active { background: var(--ink); color: var(--yellow); }

.podium { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin-bottom: 38px; }
.podium-slot { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 128px; }
.podium-avatar-wrap { position: relative; }
.podium-avatar-ph {
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); border: var(--border-w) solid var(--ink);
  font-size: 1.05rem; font-weight: 800; color: var(--ink);
}
.podium-avatar-lg { width: 66px; height: 66px; font-size: 1.5rem; background: var(--yellow); box-shadow: var(--shadow-sm-hard); }
.podium-medal { position: absolute; bottom: -6px; right: -8px; font-size: 1.2rem; }
.podium-name { font-size: 0.84rem; font-weight: 800; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-pts { font-size: 1.05rem; }
.podium-block { width: 100%; border: var(--border-w) solid var(--ink); border-bottom: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.podium-block-1 { height: 84px; background: var(--yellow); }
.podium-block-2 { height: 60px; background: var(--blue-tint); }
.podium-block-3 { height: 42px; background: var(--pink-tint); }

.lb-my-rank-banner {
  margin-top: 22px; padding: 16px 20px; text-align: center;
  font-size: 0.9rem; font-weight: 700; color: var(--ink);
  background: var(--green-tint); border: var(--border-w) solid var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow-sm-hard);
}

/* ══ MODALES ══════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(25,19,51,.55);
  opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease);
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }

.modal { position: fixed; inset: 0; z-index: 950; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-box {
  width: 100%; max-width: 540px; max-height: 88vh; overflow-y: auto;
  box-shadow: var(--shadow-lg-hard);
  animation: modalIn 200ms var(--ease);
}
.modal-box-sm { max-width: 420px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.modal-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; background: var(--yellow);
  border-bottom: var(--border-w) solid var(--ink);
  border-radius: 12px 12px 0 0;
}
.modal-hd h2 { font-size: 1.15rem; font-weight: 800; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%; font-size: 0.9rem; font-weight: 800;
  background: var(--paper); border: var(--border-w) solid var(--ink); color: var(--ink);
}
.modal-close:hover { background: var(--red); }
.modal-body { padding: 22px; }
.modal-ft { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 22px; }

.color-picker-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.color-picker-row input[type="color"] { width: 46px; height: 38px; padding: 2px; border: var(--border-w) solid var(--ink); border-radius: var(--radius-sm); background: var(--paper); }
.color-presets { display: flex; gap: 7px; flex-wrap: wrap; }
.color-preset { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: var(--border-w) solid var(--ink); }

/* ══ TOASTS ═══════════════════════════════════════════════════ */
#toast-container { position: fixed; bottom: 22px; right: 22px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  max-width: 340px; padding: 13px 16px;
  font-size: 0.86rem; font-weight: 700; color: var(--ink);
  background: var(--paper); border: var(--border-w) solid var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow);
  animation: toastIn 220ms var(--ease); cursor: pointer;
}
.toast-success { background: var(--green-tint); }
.toast-error   { background: var(--red-tint); }
.toast-info    { background: var(--blue-tint); }
@keyframes toastIn  { from { opacity: 0; transform: translate(10px,10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translate(10px,10px); } }

/* ══ ACCUEIL ══════════════════════════════════════════════════ */
.landing-body { background: var(--cream); min-height: 100vh; }
.landing-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
/* Rayons de fête foraine, très pâles */
.bg-layer { position: absolute; border-radius: 50%; }
.bg-layer-1 { width: 620px; height: 620px; top: -220px; right: -180px; background: var(--yellow-tint); }
.bg-layer-2 { width: 520px; height: 520px; bottom: -220px; left: -160px; background: var(--pink-tint); }
.bg-field-lines {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(25,19,51,.045) 0 14px, transparent 14px 28px);
}

.landing-wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 56px;
  min-height: 100vh; max-width: 1080px; margin: 0 auto;
  padding: 52px clamp(20px, 5vw, 40px);
}

.landing-visual { display: flex; align-items: center; justify-content: center; }
.trophy-scene {
  position: relative; width: 290px; height: 290px;
  display: flex; align-items: center; justify-content: center;
  background: var(--yellow); border: var(--border-w) solid var(--ink);
  border-radius: 50%; box-shadow: var(--shadow-lg-hard);
}
.trophy-glow { position: absolute; inset: 26px; border: var(--border-w) dashed var(--ink); border-radius: 50%; }
.trophy-cup { font-size: 5.5rem; position: relative; z-index: 1; }
.flags-orbit { position: absolute; inset: -22px; animation: orbit-ring 30s linear infinite; }
.flags-orbit span {
  position: absolute; top: 50%; left: 50%;
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  background: var(--paper); border: var(--border-w) solid var(--ink); border-radius: 50%;
  transform-origin: 20px 20px;
  transform: rotate(calc(var(--i) * 60deg)) translate(155px) rotate(calc(var(--i) * -60deg));
}
@keyframes orbit-ring { to { transform: rotate(360deg); } }

.landing-card {
  background: var(--paper);
  border: var(--border-w) solid var(--ink); border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 38px);
  box-shadow: var(--shadow-lg-hard);
}
.landing-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.landing-title { margin-bottom: 12px; }
.landing-lead { font-size: 0.98rem; font-weight: 600; color: var(--ink-2); line-height: 1.65; margin-bottom: 24px; }
.landing-lead strong { color: var(--ink); font-weight: 800; }
.landing-login { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.landing-login .btn { margin-top: 12px; }
.landing-note { font-size: 0.81rem; font-weight: 600; color: var(--ink-2); line-height: 1.7; border-top: var(--border-w) dashed var(--ink-4); padding-top: 16px; }
.landing-legal { margin-top: 10px; font-size: 0.77rem; }

/* Le barème en quatre pastilles colorées : la règle du jeu, en un coup d'œil */
.landing-rules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 22px; }
.landing-rules li {
  padding: 12px 8px; text-align: center;
  font-size: 0.68rem; font-weight: 700; color: var(--ink-2); line-height: 1.3;
  border: var(--border-w) solid var(--ink); border-radius: var(--radius-sm);
}
.landing-rules li:nth-child(1) { background: var(--green-tint); }
.landing-rules li:nth-child(2) { background: var(--yellow-tint); }
.landing-rules li:nth-child(3) { background: var(--blue-tint); }
.landing-rules li:nth-child(4) { background: var(--pink-tint); }
.landing-rules strong { display: block; margin-bottom: 3px; font-size: 1.5rem; color: var(--ink); }

/* ══ RÉGLAGES ET TEXTES ═══════════════════════════════════════ */
.setup-page .dash-panel { margin-bottom: 22px; }
.setup-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 18px 0; }
.setup-search .form-field { margin: 0; }
.setup-page code, .legal-page code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em;
  background: var(--yellow-tint); border: 1px solid var(--ink); padding: 1px 6px; border-radius: 5px;
}

.legal-page .cgu {
  max-width: 74ch; padding: clamp(24px, 4vw, 42px);
  font-size: 0.95rem; font-weight: 500; line-height: 1.8; color: var(--ink-2);
  box-shadow: var(--shadow);
}
.legal-page .cgu h2 {
  margin: 32px 0 12px; padding-top: 22px;
  font-size: 1.1rem; font-weight: 800; color: var(--ink);
  border-top: var(--border-w) dashed var(--ink-4);
}
.legal-page .cgu h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.legal-page .cgu p { margin-bottom: 13px; }
.legal-page .cgu ul { list-style: disc; margin: 0 0 15px 22px; }
.legal-page .cgu li { margin-bottom: 5px; }
.legal-page .cgu strong { color: var(--ink); font-weight: 800; }
.legal-updated { margin-top: 26px; font-size: 0.8rem; color: var(--ink-3); }

/* ══ RESPONSIVE ═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .dash-grid, .gd-grid { grid-template-columns: 1fr; }
  .dash-panel-groups, .gd-panel-teams { grid-column: auto; }
}

@media (max-width: 880px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .landing-wrap { grid-template-columns: 1fr; gap: 36px; min-height: auto; padding-top: 44px; }
  .landing-visual { order: -1; }
  .trophy-scene { width: 200px; height: 200px; }
  .trophy-cup { font-size: 3.6rem; }
  .flags-orbit span { transform: rotate(calc(var(--i)*60deg)) translate(108px) rotate(calc(var(--i)*-60deg)); }
}

@media (max-width: 620px) {
  .page-wrap { padding: 26px 0 52px; }
  .stat-num { font-size: 2rem; }
  .matches-grid, .teams-list, .groups-grid { grid-template-columns: 1fr; }
  .match-row-teams { flex-direction: column; align-items: stretch; }
  .match-team-right { flex-direction: row; justify-content: flex-end; }
  .match-row-input { justify-content: center; }
  .podium-slot { width: 98px; }
  .gd-header { flex-direction: column; }
  .landing-rules { grid-template-columns: 1fr 1fr; }
  #toast-container { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}
