:root {
  --pitch-900: #0b3d22;
  --pitch-800: #0f5a30;
  --pitch-700: #167a42;
  --pitch-600: #1c9250;
  --pitch-500: #22a05a;
  --pitch-100: #e3f5e9;
  --pitch-050: #f1faf4;

  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-100: #fef3c7;

  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --white: #ffffff;

  --red-600: #dc2626;
  --red-100: #fee2e2;
  --green-600: #16a34a;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .08);
  --shadow: 0 6px 20px rgba(15, 23, 42, .10);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, .18);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Barlow Condensed", "Inter", system-ui, sans-serif;

  --nav-h: 66px;
  --header-h: 60px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink-900);
  background: var(--ink-100);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: .01em;
  margin: 0 0 .5rem;
  line-height: 1.15;
}

h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 4vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 .85rem; }
a { color: var(--pitch-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.page {
  padding-top: calc(var(--header-h) + var(--safe-top) + 14px);
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 26px);
  min-height: 100vh;
}

.public-page {
  padding-top: calc(var(--safe-top) + 0px);
}

/* ---------- En-tete ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(120deg, var(--pitch-900), var(--pitch-700));
  color: var(--white);
  padding-top: var(--safe-top);
  box-shadow: var(--shadow);
}

.app-header .header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1.28rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--white);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand small {
  display: block;
  font-family: var(--font);
  font-size: .62rem;
  letter-spacing: .12em;
  opacity: .75;
  text-transform: uppercase;
  font-weight: 500;
}

.header-spacer { flex: 1; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  color: var(--white);
  font-size: .85rem;
  font-weight: 600;
}
.user-chip img {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .5);
}
.user-chip:hover { text-decoration: none; background: rgba(255, 255, 255, .22); }

/* ---------- Barre de navigation basse ---------- */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  background: var(--white);
  border-top: 1px solid var(--ink-200);
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -6px 20px rgba(15, 23, 42, .08);
}
.bottom-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  max-width: 620px;
  margin: 0 auto;
}
.bottom-nav li { flex: 1; }
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: var(--nav-h);
  font-size: .68rem;
  font-weight: 600;
  color: var(--ink-500);
  letter-spacing: .02em;
}
.bottom-nav a:hover { text-decoration: none; color: var(--pitch-700); }
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav a.active { color: var(--pitch-700); }
.bottom-nav a.active svg { transform: translateY(-1px); }
.bottom-nav a.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 34px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--pitch-600);
}
.bottom-nav li { position: relative; display: flex; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-family: var(--font);
  font-size: .92rem;
  font-weight: 650;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--pitch-700); color: var(--white); box-shadow: 0 4px 14px rgba(22, 122, 66, .3); }
.btn-primary:hover { background: var(--pitch-800); }
.btn-amber { background: var(--amber-500); color: #422006; box-shadow: 0 4px 14px rgba(245, 158, 11, .32); }
.btn-amber:hover { background: var(--amber-600); color: var(--white); }
.btn-dark { background: var(--ink-800); color: var(--white); }
.btn-dark:hover { background: var(--ink-900); }
.btn-ghost { background: rgba(255, 255, 255, .16); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, .28); }
.btn-outline { background: transparent; color: var(--ink-700); border: 1.5px solid var(--ink-200); }
.btn-outline:hover { border-color: var(--pitch-600); color: var(--pitch-700); }
.btn-danger { background: var(--red-600); color: var(--white); }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 7px 12px; font-size: .8rem; }
.btn-lg { padding: 15px 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Cartes ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ink-200);
  padding: 18px;
}
.card + .card { margin-top: 14px; }
.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.card-title h3 { margin: 0; }
.card-title .muted { font-size: .8rem; }

.section { margin-bottom: 26px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }

/* ---------- Hero public ---------- */
.hero {
  position: relative;
  background: linear-gradient(150deg, var(--pitch-900) 0%, var(--pitch-700) 55%, var(--pitch-500) 100%);
  color: var(--white);
  padding: calc(var(--safe-top) + 26px) 0 44px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 18%, rgba(255, 255, 255, .16), transparent 55%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero h1 { color: var(--white); }
.hero p.lead {
  font-size: 1.02rem;
  color: rgba(255, 255, 255, .9);
  max-width: 60ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 26px;
}
.hero-stat {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.hero-stat b { display: block; font-family: var(--font-head); font-size: 1.7rem; line-height: 1.1; }
.hero-stat span { font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; opacity: .85; }

.pitch-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: radial-gradient(circle at 50% 120%, var(--pitch-500), var(--pitch-800));
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: var(--shadow-lg);
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 14px;
}

/* ---------- Grilles ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 14px; grid-template-columns: 1fr; }
/* Petites vignettes de chiffres : 2 colonnes sur mobile, jamais plus. */
.grid-stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }


.stat-card {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--pitch-100);
  color: var(--pitch-700);
  margin-bottom: 12px;
}
.stat-card .stat-icon svg { width: 21px; height: 21px; }
.stat-card .stat-value {
  font-family: var(--font-head);
  font-size: 1.95rem;
  font-weight: 700;
  line-height: 1.05;
  color: var(--ink-900);
}
.stat-card .stat-label {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-500);
  font-weight: 600;
}
.stat-card .stat-trend { font-size: .78rem; color: var(--green-600); font-weight: 600; margin-top: 4px; }

/* ---------- Tableaux ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  background: var(--white);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  min-width: 560px;
}
table.data th {
  text-align: left;
  padding: 12px 14px;
  background: var(--ink-100);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-500);
  font-weight: 700;
  white-space: nowrap;
}
table.data td {
  padding: 12px 14px;
  border-top: 1px solid var(--ink-200);
  vertical-align: middle;
}
table.data tbody tr:hover { background: var(--pitch-050); }
.cell-player { display: flex; align-items: center; gap: 10px; }
.cell-player img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.cell-player span { font-weight: 600; }

/* ---------- Formulaires ---------- */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: .8rem;
  font-weight: 650;
  color: var(--ink-700);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .95rem;
  color: var(--ink-900);
  background: var(--white);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--pitch-600);
  box-shadow: 0 0 0 3px rgba(28, 146, 80, .14);
}
.field .hint { font-size: .76rem; color: var(--ink-500); margin-top: 5px; }
.form-row { display: grid; gap: 14px; grid-template-columns: 1fr; }

/* ---------- Auth ---------- */
.auth-wrap {
  min-height: calc(100vh - var(--nav-h) - var(--safe-bottom));
  display: grid;
  place-items: center;
  padding: 22px 16px calc(var(--nav-h) + 26px);
  background:
    radial-gradient(circle at 15% 10%, rgba(34, 160, 90, .18), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(245, 158, 11, .14), transparent 45%),
    var(--ink-100);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px 22px;
  border: 1px solid var(--ink-200);
}
.auth-card .auth-head { text-align: center; margin-bottom: 20px; }
.auth-card .auth-emblem {
  width: 62px; height: 62px;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: linear-gradient(140deg, var(--pitch-700), var(--pitch-500));
  display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(22, 122, 66, .3);
}
.auth-card .auth-emblem svg { width: 34px; height: 34px; color: var(--white); }
.auth-alt { text-align: center; margin-top: 16px; font-size: .88rem; color: var(--ink-500); }

/* ---------- Badges / alertes ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.badge-green { background: var(--pitch-100); color: var(--pitch-800); }
.badge-amber { background: var(--amber-100); color: #92400e; }
.badge-red { background: var(--red-100); color: #991b1b; }
.badge-gray { background: var(--ink-100); color: var(--ink-500); }

.alert {
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: .87rem;
  font-weight: 600;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.alert-error { background: var(--red-100); color: #991b1b; border-color: #fecaca; }
.alert-success { background: var(--pitch-100); color: var(--pitch-800); border-color: #bbf7d0; }
.alert-info { background: #e0f2fe; color: #075985; border-color: #bae6fd; }

/* ---------- Toasts ---------- */
.toast-zone {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 14px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  background: var(--ink-900);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toast-in .22s ease;
}
.toast.success { background: var(--pitch-800); }
.toast.error { background: var(--red-600); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Jeu ---------- */
.game-shell {
  background: var(--ink-900);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--ink-800);
  box-shadow: var(--shadow);
}
.game-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: linear-gradient(90deg, var(--pitch-900), var(--ink-900));
  color: var(--white);
}
.hud-item {
  display: flex;
  flex-direction: column;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .08);
  min-width: 74px;
}
.hud-item span { font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; opacity: .7; }
.hud-item b { font-family: var(--font-head); font-size: 1.2rem; line-height: 1.1; }
.hud-spacer { flex: 1; }

.stage { position: relative; width: 100%; background: #0b1220; }
.stage canvas { display: block; width: 100%; height: auto; touch-action: none; }

.stage-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 15, 28, .86);
  color: var(--white);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}
.stage-overlay .overlay-inner { max-width: 420px; }
.stage-overlay h3 { color: var(--white); font-size: 1.5rem; }
.stage-overlay p { color: rgba(255, 255, 255, .82); font-size: .92rem; }
.stage-overlay .btn { margin: 6px 4px 0; }

.power-bar {
  padding: 12px;
  background: var(--ink-800);
  color: var(--white);
}
.power-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
  margin-top: 6px;
}
.power-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pitch-500), var(--amber-500), var(--red-600));
  transition: width .05s linear;
}
.power-legend {
  display: flex;
  justify-content: space-between;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .7;
}

.game-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
  background: var(--ink-800);
}
.aim-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.aim-pad .btn { padding: 10px; }
.aim-center {
  display: grid;
  place-items: center;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .6);
  border: 1px dashed rgba(255, 255, 255, .2);
  border-radius: var(--radius-sm);
}
.shoot-btn { min-height: 56px; font-size: 1.05rem; }

.level-card {
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.level-card h4 { margin: 0; font-family: var(--font-head); font-size: 1.15rem; }
.level-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.level-meta .badge { text-transform: none; letter-spacing: 0; }

/* ---------- Classement ---------- */
.podium {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.podium-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.podium-item .rank {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  background: var(--ink-400);
  flex: 0 0 auto;
}
.podium-item.rank-1 .rank { background: linear-gradient(140deg, #f59e0b, #d97706); }
.podium-item.rank-2 .rank { background: linear-gradient(140deg, #94a3b8, #64748b); }
.podium-item.rank-3 .rank { background: linear-gradient(140deg, #c2703d, #92400e); }
.podium-item .who { flex: 1; min-width: 0; }
.podium-item .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-item .who small { color: var(--ink-500); }
.podium-item .pts { font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; color: var(--pitch-700); }

/* ---------- Divers ---------- */
.muted { color: var(--ink-500); }
.small { font-size: .82rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 14px; }
.divider { height: 1px; background: var(--ink-200); margin: 16px 0; }

.empty {
  text-align: center;
  padding: 34px 18px;
  color: var(--ink-500);
}
.empty svg { width: 44px; height: 44px; color: var(--ink-400); margin-bottom: 10px; }

.footer {
  background: var(--ink-900);
  color: rgba(255, 255, 255, .72);
  padding: 30px 0 calc(var(--nav-h) + var(--safe-bottom) + 24px);
  font-size: .86rem;
}
.footer-inner { display: grid; gap: 20px; grid-template-columns: 1fr; }
.footer h4 { color: var(--white); font-size: .9rem; text-transform: uppercase; letter-spacing: .09em; }
.footer a { color: rgba(255, 255, 255, .78); }
.footer a:hover { color: var(--white); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.footer-bottom {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .78rem;
  text-align: center;
  color: rgba(255, 255, 255, .55);
}

.install-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.install-cta .os-logos { display: flex; gap: 10px; align-items: center; }
.install-cta .os-logos svg { width: 26px; height: 26px; }
.install-cta .cta-text { flex: 1; min-width: 180px; }

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .62);
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 460px;
  width: 100%;
  padding: 22px;
  box-shadow: var(--shadow-lg);
  max-height: 88vh;
  overflow-y: auto;
}
.modal-card h3 { margin-top: 0; }
.store-note { font-size: .8rem; color: var(--ink-500); }

/* ---------- Progression ---------- */
.progress {
  height: 9px;
  border-radius: 999px;
  background: var(--ink-200);
  overflow: hidden;
}
.progress > div {
  height: 100%;
  background: linear-gradient(90deg, var(--pitch-600), var(--pitch-500));
}

.chart-box { position: relative; height: 260px; }

/* ---------- Mentions legales ---------- */
.legal h2 { margin-top: 26px; }
.legal p, .legal li { color: var(--ink-700); }

/* ---------- Tablette / bureau ---------- */
@media (min-width: 768px) {
  .hero { padding: calc(var(--safe-top) + 44px) 0 64px; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-stats { grid-template-columns: repeat(4, 1fr); }
  .podium { grid-template-columns: repeat(3, 1fr); }
  .game-controls { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
  .page { padding-top: calc(var(--header-h) + var(--safe-top) + 22px); }
}


@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .layout-side { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: start; }
  .side-menu {
    position: sticky;
    top: calc(var(--header-h) + var(--safe-top) + 22px);
    background: var(--white);
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    padding: 10px;
  }
  .side-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-700);
    font-size: .88rem;
    font-weight: 600;
  }
  .side-menu a:hover { background: var(--pitch-050); text-decoration: none; color: var(--pitch-700); }
  .side-menu a.active { background: var(--pitch-100); color: var(--pitch-800); }
  .side-menu a svg { width: 18px; height: 18px; }
}

@media (max-width: 767px) {
  .hero-visual-col { order: -1; }
  .pitch-visual { min-height: 210px; }
  .card { padding: 15px; }
  .toast-zone { bottom: calc(var(--nav-h) + var(--safe-bottom) + 10px); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
