/* TGO Bet — feuille de style unique.
   Mise en page inspirée de Betclic (bandeau sombre, fond clair, cartes blanches, gros boutons de cote),
   aux couleurs du Tournoi Grand Ouest : bleu nuit #0f1839 et bleu #60aff4. */

/* Polices hébergées sur le site (pas d'appel à Google Fonts : plus rapide et sans transfert d'IP vers Google).
   Inter (variable 400 à 700) et Barlow Condensed, licence SIL OFL 1.1 (voir fonts/). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/inter-latin.woff2?v=1dc044f482") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-condensed-600.woff2?v=4c3bf65b58") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/barlow-condensed-700.woff2?v=4cdd4b39be") format("woff2"); }

/* L'attribut hidden doit toujours masquer, même un .bouton ou un bloc en grid/flex. */
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ jetons */
:root {
  --bg: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --surface-3: #e8eef7;
  --border: #e2e8f1;
  --border-fort: #cdd6e4;
  --texte: #0f1839;
  --texte-2: #55617f;
  --texte-3: #8a94ad;
  --marine: #0f1839;
  --marine-2: #1c2a63;
  --accent: #60aff4;
  --accent-survol: #4aa2ef;
  --accent-fort: #1877cf;
  --accent-texte: #0f1839;
  --accent-doux: #e4f1fd;
  --live: #e90505;
  --gain: #15803d;
  --gain-vif: #22c55e;
  --gain-doux: #e6f6eb;
  --perte: #c62828;
  --perte-doux: #fdeceb;
  --or: #b7791f;
  --or-vif: #f5b400;
  --or-doux: #fff4d6;
  --argent: #8a94ad;
  --bronze: #b4652a;
  --rayon: 14px;
  --rayon-s: 10px;
  --ombre: 0 1px 2px rgba(15, 24, 57, 0.05), 0 4px 14px rgba(15, 24, 57, 0.06);
  --ombre-forte: 0 16px 48px rgba(15, 24, 57, 0.2);
  --police-titre: "Barlow Condensed", "Arial Narrow", sans-serif;
  --police: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --entete-h: 64px;
  --nav-h: 64px;
  --ticket-l: 340px;
  --gauche-l: 240px;
  color-scheme: light;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--texte);
  font-family: var(--police); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100dvh; overflow-x: hidden;
}
body.avec-nav-bas { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
h1, h2, h3, h4 { font-family: var(--police-titre); font-weight: 700; letter-spacing: 0.01em; margin: 0 0 0.6rem; line-height: 1.15; }
h1 { font-size: 2rem; text-transform: uppercase; }
h2 { font-size: 1.45rem; text-transform: uppercase; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 0.9rem; }
a { color: var(--accent-fort); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muet { color: var(--texte-2); }
.petit { font-size: 0.875rem; }
.centre { text-align: center; }
.ligne { display: flex; align-items: center; gap: 0.6rem; }
.ligne--entre { justify-content: space-between; }
.ligne--retour { flex-wrap: wrap; }
.chiffre { font-family: var(--police-titre); font-weight: 700; font-variant-numeric: tabular-nums; }
.gain { color: var(--gain); }
.perte { color: var(--perte); }
.accent { color: var(--accent-fort); }

/* ------------------------------------------------------------------ en-tête (bandeau bleu nuit) */
.entete {
  position: fixed; inset: 0 0 auto 0; height: var(--entete-h); z-index: 50;
  background: var(--marine); color: #fff;
  box-shadow: 0 2px 12px rgba(15, 24, 57, 0.25);
}
.entete__int { max-width: 1480px; margin: 0 auto; height: 100%; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.logo { font-family: var(--police-titre); font-weight: 700; font-size: 1.6rem; text-transform: uppercase; letter-spacing: 0.02em; color: #fff; display: inline-flex; align-items: center; gap: 0.45rem; }
.logo:hover { text-decoration: none; }
.logo__img { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; background: #fff; padding: 2px; }
.logo__marque { background: var(--accent); color: var(--marine); padding: 0 0.4rem; border-radius: 5px; }
.logo__demo { font-size: 0.6rem; margin-left: 0.3rem; vertical-align: middle; }
.nav-haut { display: none; gap: 0.25rem; margin-right: auto; margin-left: 1.5rem; }
.nav-haut a { padding: 0.5rem 0.95rem; border-radius: 8px; color: rgba(255, 255, 255, 0.78); font-weight: 600; font-size: 0.95rem; }
.nav-haut a:hover { color: #fff; background: rgba(255, 255, 255, 0.1); text-decoration: none; }
.nav-haut a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.16); }
.entete .bouton--primaire { background: #fff; border-color: #fff; color: var(--marine); }
.solde {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: #fff; border-radius: 999px; padding: 0.4rem 0.95rem 0.4rem 0.6rem;
  font-weight: 700; color: var(--marine);
}
.solde:hover { text-decoration: none; box-shadow: 0 0 0 3px rgba(96, 175, 244, 0.6); }
.solde__val { font-family: var(--police-titre); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.solde__pastille { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fde68a, var(--or-vif) 60%, #b45309); }
.solde--maj .solde__val { animation: pop 0.5s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.25); color: var(--gain); } 100% { transform: scale(1); } }

/* ------------------------------------------------------------------ nav basse (mobile) */
.nav-bas {
  position: fixed; inset: auto 0 0 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -2px 12px rgba(15, 24, 57, 0.06);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.nav-bas a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--texte-3); font-size: 0.72rem; font-weight: 600; text-decoration: none; }
.nav-bas a svg { width: 24px; height: 24px; }
.nav-bas a[aria-current="page"] { color: var(--accent-fort); }

/* ------------------------------------------------------------------ page */
.page { max-width: 1180px; margin: 0 auto; padding: calc(var(--entete-h) + 20px) 16px 40px; }
.page--etroite { max-width: 560px; }
.page--paris { max-width: 1480px; }
.page__titre { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.page__titre h1 { margin: 0; }
.bandeau {
  background: var(--accent-doux); border: 1px solid #b8dbfa; color: var(--texte);
  padding: 0.8rem 1.1rem; border-radius: var(--rayon); margin-bottom: 1.25rem; font-size: 0.92rem;
}
.bandeau--alerte { background: var(--perte-doux); border-color: #f5c2c0; }
.bandeau--demo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; background: var(--or-doux); border-color: #f1d58a; }
.bandeau--demo .bouton { margin-left: auto; }
.bandeau--demo .bouton + .bouton { margin-left: 0; }

/* Héros (page de connexion) */
.hero {
  background: linear-gradient(120deg, var(--marine) 0%, var(--marine-2) 100%); color: #fff;
  border-radius: var(--rayon); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.hero__sur { color: var(--accent); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.hero h1 { margin: 0.15rem 0 0; font-size: 1.8rem; }
.hero p { margin: 0.3rem 0 0; color: rgba(255, 255, 255, 0.78); }

/* ------------------------------------------------------------------ disposition 3 colonnes (accueil) */
.disposition { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.colonne-g { display: none; }
.colonne-c { min-width: 0; container-type: inline-size; }

.bloc { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1rem; margin-bottom: 1.25rem; }
.bloc__titre { font-size: 1.15rem; text-transform: none; margin-bottom: 0.6rem; }
.liste-sports { display: flex; flex-direction: column; }
.liste-sports button {
  display: flex; align-items: center; gap: 0.7rem; width: 100%; text-align: left;
  background: none; border: 0; border-radius: var(--rayon-s); padding: 0.7rem 0.75rem; font-weight: 600; color: var(--texte);
}
.liste-sports button:hover { background: var(--surface-2); }
.liste-sports button[aria-pressed="true"] { background: var(--accent-doux); color: var(--accent-fort); }
.liste-sports .icone { font-size: 1.15rem; width: 1.5rem; text-align: center; }
.liste-sports .nb { margin-left: auto; font-size: 0.8rem; color: var(--texte-3); font-weight: 600; }
.top-joueurs { list-style: none; margin: 0 0 0.6rem; padding: 0; }
.top-joueurs li { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.2rem; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.top-joueurs li:last-child { border-bottom: 0; }
.top-joueurs .rang { font-family: var(--police-titre); font-weight: 700; width: 1.2rem; color: var(--texte-3); }
.top-joueurs .pseudo { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-joueurs .pts { font-family: var(--police-titre); font-weight: 700; color: var(--accent-fort); }

/* ------------------------------------------------------------------ onglets et puces */
.onglets { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border-fort); margin-bottom: 1rem; }
.onglets::-webkit-scrollbar { display: none; }
.onglet {
  flex: 0 0 auto; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px;
  padding: 0.75rem 1rem; color: var(--texte-2); font-weight: 600; font-size: 0.98rem;
}
.onglet:hover { color: var(--texte); }
.onglet--actif { color: var(--texte); font-weight: 700; border-bottom-color: var(--marine); }
.puces { display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 0.25rem; margin-bottom: 1.25rem; }
.puces::-webkit-scrollbar { display: none; }
.puce {
  flex: 0 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--ombre);
  padding: 0.5rem 1rem; color: var(--texte); font-size: 0.92rem; font-weight: 600; white-space: nowrap;
}
.puce:hover { border-color: var(--border-fort); }
.puce--active { background: var(--marine); color: #fff; border-color: var(--marine); }

.section-titre { font-size: 1.3rem; text-transform: none; margin: 0.25rem 0 0.9rem; }

/* ------------------------------------------------------------------ À la une (grandes cartes) */
.une { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(min(290px, 100%), 88%); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-bottom: 1.75rem; padding-bottom: 2px; }
.une:has(> .carte-une:only-child) { grid-auto-columns: 100%; }
.une::-webkit-scrollbar { display: none; }
.une:empty { display: none; }
.carte-une {
  scroll-snap-align: start; position: relative; overflow: hidden; color: #fff;
  border-radius: var(--rayon); padding: 1.1rem 1.1rem 1.2rem; box-shadow: var(--ombre);
  background: radial-gradient(120% 140% at 0% 0%, var(--couleur-a, #60aff4) 0%, transparent 45%),
              radial-gradient(120% 140% at 100% 100%, var(--couleur-b, #60aff4) 0%, transparent 45%),
              linear-gradient(135deg, #0f1839, #1c2a63);
}
.carte-une::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,24,57,.15), rgba(15,24,57,.55)); pointer-events: none; }
.carte-une > * { position: relative; z-index: 1; }
.carte-une__meta { font-size: 0.85rem; font-weight: 600; opacity: 0.9; display: flex; gap: 0.5rem; align-items: center; margin-bottom: 1.1rem; }
.carte-une__equipes { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.75rem; margin-bottom: 1.2rem; }
.carte-une__equipe { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; font-weight: 700; font-size: 1.05rem; min-width: 0; }
.carte-une__equipe span { overflow-wrap: anywhere; }
.carte-une__equipe .logo-ecole { max-width: 100%; }
.carte-une__heure { font-family: var(--police-titre); font-size: 1.6rem; font-weight: 700; text-align: center; line-height: 1; }
.carte-une__heure small { display: block; font-family: var(--police); font-size: 0.75rem; font-weight: 600; opacity: 0.8; margin-top: 0.25rem; }

/* ------------------------------------------------------------------ liste des paris (lignes) */
.liste-paris { display: flex; flex-direction: column; gap: 14px; }
.ligne-pari { content-visibility: auto; contain-intrinsic-size: auto 190px; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1rem 1.1rem 1.1rem; min-width: 0; }
.ligne-pari--annule { opacity: 0.6; }
.ligne-pari__meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.84rem; color: var(--texte-2); margin-bottom: 0.8rem; }
.ligne-pari__sport { font-weight: 700; color: var(--texte); }
.ligne-pari__meta .badge { margin-left: auto; }
.ligne-pari__corps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.9rem; align-items: center; }
.ligne-pari__equipes { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.5rem; }
/* Logo au-dessus du nom à toutes les tailles : le nom n'est jamais tronqué, même quand la ligne est étroite
   (téléphone, ou colonne centrale de l'ordinateur à côté des cotes). */
.ligne-pari__equipe { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.35rem; min-width: 0; font-weight: 700; font-size: 0.95rem; }
.ligne-pari__equipe span { line-height: 1.15; overflow-wrap: anywhere; }
.ligne-pari__equipe .logo-ecole { max-width: 100%; }
.ligne-pari__equipe--gagnante { color: var(--gain); }
.ligne-pari__heure { text-align: center; font-size: 0.8rem; color: var(--texte-2); font-weight: 600; line-height: 1.2; min-width: 58px; }
.ligne-pari__heure strong { display: block; font-size: 1rem; color: var(--texte); }
.ligne-pari__score { font-family: var(--police-titre); font-size: 1.6rem; font-weight: 700; color: var(--texte); white-space: nowrap; }
.ligne-pari__titre { font-weight: 700; font-size: 1.05rem; }
.ligne-pari__titre small { display: block; font-weight: 500; font-size: 0.85rem; color: var(--texte-2); margin-top: 0.15rem; }

/* cotes */
.cotes { display: grid; gap: 10px; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.cotes--4 { --n: 2; }
.cote-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cote {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 100%; min-height: 58px; padding: 0.45rem 0.5rem;
  background: var(--accent); color: var(--accent-texte);
  border: 0; border-radius: var(--rayon-s); box-shadow: inset 0 -2px 0 rgba(15, 24, 57, 0.12);
  transition: background .15s, transform .1s, box-shadow .15s;
}
.cote:hover:not(:disabled) { background: var(--accent-survol); }
.cote:active:not(:disabled) { transform: scale(0.97); }
.cote:disabled { cursor: default; background: var(--surface-3); color: var(--texte-3); box-shadow: none; }
.cote__lib { font-size: 0.74rem; font-weight: 600; white-space: nowrap; max-width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.35rem; min-width: 0; }
.cote__nom { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cote__val { font-family: var(--police-titre); font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.05; }
.cote--active { background: var(--marine); color: #fff; box-shadow: 0 0 0 3px rgba(96, 175, 244, 0.55); }
.cote--active:hover:not(:disabled) { background: var(--marine-2); }
.cote--gagnante, .cote--gagnante:disabled { background: var(--gain-doux); color: var(--gain); box-shadow: inset 0 0 0 2px var(--gain-vif); }
.cote--hausse::after, .cote--baisse::after { content: ""; position: absolute; top: 7px; right: 8px; border: 5px solid transparent; }
.cote--hausse::after { border-bottom-color: var(--gain); border-top: 0; }
.cote--baisse::after { border-top-color: var(--perte); border-bottom: 0; }
.cote--flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(24, 119, 207, .55); } 100% { box-shadow: 0 0 0 10px rgba(24, 119, 207, 0); } }
/* Barre de répartition des mises sous chaque cote, comme sur Betclic */
.cote-barre { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.cote-barre i { display: block; height: 100%; background: var(--accent-fort); border-radius: inherit; }
.carte-une .cote-barre { background: rgba(255, 255, 255, 0.25); }
.carte-une .cote-barre i { background: #fff; }
.carte-une .cote:disabled { background: rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.75); }

/* logos d'écoles */
.logo-ecole {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--police-titre); font-weight: 700; font-size: 0.95rem; color: #fff; overflow: hidden; background: var(--marine-2);
}
.logo-ecole--s { width: 26px; height: 26px; font-size: 0.7rem; }
.logo-ecole--l { width: 56px; height: 56px; font-size: 1.3rem; }
.logo-ecole--img { position: relative; width: 72px; height: 38px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px var(--border); }
.logo-ecole--img.logo-ecole--s { width: 44px; height: 24px; border-radius: 6px; }
.logo-ecole--img.logo-ecole--l { width: 104px; height: 56px; border-radius: 12px; }
.logo-ecole__ini { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; color: #fff; }
/* Image calée sur la boîte (et non sur la grille) : un logo plus haut que large (Rennes SB) reste entier. */
.logo-ecole--img img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; max-width: none; object-fit: contain; padding: 5px; background: #fff; border-radius: inherit; }
.logo-ecole--img.logo-ecole--s img { padding: 3px; }
.cote .logo-ecole--img.logo-ecole--s { width: 36px; height: 20px; box-shadow: none; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 999px; padding: 0.2rem 0.6rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; background: var(--surface-3); color: var(--texte-2); white-space: nowrap; }
.badge--live { background: #fde8e8; color: var(--live); }
.badge--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.badge--termine, .badge--gagne { background: var(--gain-doux); color: var(--gain); }
.badge--annule, .badge--perdu { background: var(--perte-doux); color: var(--perte); }
.badge--ferme, .badge--admin { background: var(--or-doux); color: var(--or); }
.badge--avenir, .badge--en_cours { background: var(--accent-doux); color: var(--accent-fort); }
.badge--rembourse { background: var(--surface-3); color: var(--texte-2); }
.carte-une .badge { background: rgba(255, 255, 255, 0.18); color: #fff; }
.badge-ecole { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--texte-2); }
.badge-ecole i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ------------------------------------------------------------------ ticket de pari */
.voile { position: fixed; inset: 0; background: rgba(15, 24, 57, 0.45); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .25s; }
.voile--visible { opacity: 1; pointer-events: auto; }
.ticket {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--ombre-forte);
  padding: 0.6rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom));
  transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  max-height: 92dvh; overflow-y: auto; display: flex; flex-direction: column;
}
.ticket--ouvert { transform: translateY(0); }
.ticket__poignee { width: 44px; height: 5px; border-radius: 3px; background: var(--border-fort); margin: 0 auto 0.8rem; flex: 0 0 auto; }
.ticket__entete { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding-bottom: 0.8rem; margin-bottom: 0.9rem; border-bottom: 1px solid var(--border); }
.ticket__entete h2 { margin: 0; font-family: var(--police); font-size: 1.05rem; font-weight: 700; text-transform: none; }
.ticket__fermer { background: none; border: 0; color: var(--texte-2); font-size: 1.5rem; line-height: 1; padding: 0.2rem 0.5rem; border-radius: 8px; min-width: 44px; min-height: 44px; }
.ticket__fermer:hover { background: var(--surface-2); color: var(--texte); }
.ticket__vide { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2.5rem 0.5rem; }
.ticket__vide-icone { font-size: 3.4rem; line-height: 1; margin-bottom: 0.8rem; }
.ticket__vide strong { font-family: var(--police-titre); font-size: 1.45rem; text-transform: uppercase; margin-bottom: 0.3rem; }
.ticket__vide span { color: var(--texte-2); font-size: 0.92rem; }
.ticket__choix { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--rayon-s); padding: 0.85rem 0.9rem; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.ticket__choix small { display: block; color: var(--texte-2); font-size: 0.8rem; margin-bottom: 0.15rem; }
.ticket__choix strong { font-size: 1.02rem; }
.ticket__cote { font-family: var(--police-titre); font-size: 1.5rem; font-weight: 700; background: var(--accent); color: var(--accent-texte); border-radius: 8px; padding: 0.15rem 0.6rem; }
.ticket label { display: block; margin-bottom: 0.35rem; }
.ticket__mise { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.ticket__mise input { flex: 1; font-family: var(--police-titre); font-size: 1.6rem; font-weight: 700; text-align: right; padding: 0.45rem 0.8rem; }
.ticket__rapides { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.ticket__score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.6rem; margin-bottom: 0.3rem; }
.ticket__score input { text-align: center; font-family: var(--police-titre); font-size: 1.3rem; font-weight: 700; padding: 0.4rem; }
.ticket__score span { color: var(--texte-3); font-weight: 700; }
.ticket__aide { font-size: 0.82rem; color: var(--texte-2); margin-bottom: 0.9rem; min-height: 1.1em; }
.ticket__aide--erreur { color: var(--perte); }
.ticket__pied { margin-top: auto; padding-top: 0.9rem; border-top: 1px solid var(--border); }
.ticket__gain { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.9rem; font-weight: 600; }
.ticket__gain strong { font-family: var(--police-titre); font-size: 1.55rem; color: var(--texte); }
.ticket__gain small { display: block; color: var(--gain); font-size: 0.8rem; font-weight: 600; text-align: right; }
.ticket__erreur { color: var(--perte); font-size: 0.88rem; min-height: 1.2em; margin-bottom: 0.5rem; }

/* ------------------------------------------------------------------ boutons et formulaires */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  border-radius: var(--rayon-s); border: 1px solid var(--border-fort); background: var(--surface); color: var(--texte);
  padding: 0.65rem 1.1rem; font-weight: 600; transition: background .15s, border-color .15s, transform .1s; text-decoration: none;
}
.bouton:hover { background: var(--surface-2); text-decoration: none; }
.bouton:active { transform: scale(0.98); }
.bouton:disabled { opacity: 0.45; cursor: not-allowed; }
.bouton--primaire { background: var(--accent-fort); border-color: var(--accent-fort); color: #fff; }
.bouton--primaire:hover { background: #1366b3; }
.bouton--danger { background: var(--perte-doux); border-color: #f5c2c0; color: var(--perte); }
.bouton--danger:hover { background: #fbd9d7; }
.bouton--succes { background: var(--gain-doux); border-color: #b9e5c6; color: var(--gain); }
.bouton--fantome { background: transparent; }
.bouton--petit { padding: 0.4rem 0.7rem; font-size: 0.85rem; }
.bouton--large { width: 100%; padding: 0.9rem 1rem; font-size: 1.05rem; }
.bouton--grand { font-family: var(--police-titre); text-transform: uppercase; font-size: 1.25rem; letter-spacing: 0.03em; }

.champ { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.champ label { font-size: 0.88rem; font-weight: 600; color: var(--texte-2); }
.champ input, .champ select, .champ textarea, .ticket input,
.panneau .ligne > input, .panneau .ligne > select, .tableau select, .cotes-edit input {
  background: var(--surface); border: 1px solid var(--border-fort); border-radius: var(--rayon-s);
  padding: 0.7rem 0.85rem; color: var(--texte); width: 100%; min-height: 44px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.champ input:focus, .champ select:focus, .champ textarea:focus, .ticket input:focus,
.panneau .ligne > input:focus, .panneau .ligne > select:focus, .tableau select:focus, .cotes-edit input:focus { border-color: var(--accent-fort); box-shadow: 0 0 0 3px var(--accent-doux); }
.champ input[type="color"] { padding: 0.25rem; height: 44px; cursor: pointer; }
/* Rangées « champ + bouton » de l'admin (recherche, ajout de domaine, paramètres) : passent à la ligne. */
.panneau .ligne:has(> input, > select) { flex-wrap: wrap; }
.panneau .ligne > input, .panneau .ligne > select { flex: 1 1 10rem; width: auto; min-width: 0; }
.champ input[aria-invalid="true"] { border-color: var(--perte); }
.champ input:disabled { background: var(--surface-2); color: var(--texte-2); }
.champ__aide { font-size: 0.82rem; color: var(--texte-2); }
.champ__aide--erreur { color: var(--perte); }
.champ__aide--ok { color: var(--gain); }
.champ--ligne { flex-direction: row; align-items: center; gap: 0.6rem; }
.champ--ligne input[type="checkbox"] { width: 24px; height: 24px; flex: 0 0 auto; margin: 0; accent-color: var(--accent-fort); cursor: pointer; }
.champ--ligne label { padding: 0.65rem 0; cursor: pointer; }  /* l'étiquette fait toute la cible tactile */
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.formulaire__erreur { color: var(--perte); font-size: 0.92rem; min-height: 1.2em; margin-bottom: 0.8rem; }
.formulaire__succes { color: var(--gain); font-size: 0.92rem; margin-bottom: 0.8rem; }
.captcha { margin: 0.25rem 0 0.5rem; }
.captcha:empty { display: none; }

.panneau { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.25rem; margin-bottom: 1.25rem; }
.panneau h2, .panneau h3 { margin-top: 0; }
.onglets-auth { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-3); border-radius: var(--rayon-s); padding: 4px; margin-bottom: 1.25rem; }
.onglets-auth button { border: 0; background: none; padding: 0.65rem; border-radius: 8px; color: var(--texte-2); font-weight: 600; }
.onglets-auth button[aria-selected="true"] { background: var(--surface); color: var(--texte); box-shadow: var(--ombre); }

/* ------------------------------------------------------------------ mes paris */
.pari {
  background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1rem 1.1rem; margin-bottom: 0.8rem;
  display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 1rem; align-items: center;
}
.pari__evt { font-size: 0.84rem; color: var(--texte-2); }
.pari__choix { font-weight: 700; margin: 0.15rem 0; }
.pari__detail { font-size: 0.85rem; color: var(--texte-2); }
.pari__droite { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; }
.pari__gain { font-family: var(--police-titre); font-size: 1.35rem; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
.stat { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 0.9rem; text-align: center; }
.stat__val { font-family: var(--police-titre); font-size: 1.55rem; font-weight: 700; }
.stat__lib { font-size: 0.75rem; color: var(--texte-2); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }

/* ------------------------------------------------------------------ classement */
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; align-items: end; margin-bottom: 1.25rem; }
.podium__place { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1rem 0.6rem 0.8rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.podium__place--1 { order: 2; padding-top: 1.5rem; box-shadow: var(--ombre), inset 0 4px 0 var(--or-vif); }
.podium__place--2 { order: 1; box-shadow: var(--ombre), inset 0 4px 0 #c0c8d8; }
.podium__place--3 { order: 3; box-shadow: var(--ombre), inset 0 4px 0 #d69a6a; }
.podium__rang { font-family: var(--police-titre); font-size: 1.7rem; font-weight: 700; }
.podium__place--1 .podium__rang { color: var(--or); }
.podium__place--2 .podium__rang { color: var(--argent); }
.podium__place--3 .podium__rang { color: var(--bronze); }
.podium__pseudo { font-weight: 700; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium__solde { font-family: var(--police-titre); font-size: 1.25rem; color: var(--accent-fort); }
.tableau { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.tableau th, .tableau td { padding: 0.8rem 0.9rem; text-align: left; border-bottom: 1px solid var(--border); }
.tableau th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--texte-2); font-weight: 700; background: var(--surface-2); }
.tableau tr:last-child td { border-bottom: 0; }
.tableau td.num, .tableau th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tableau tr.moi td { background: var(--accent-doux); }
.tableau .rang { font-family: var(--police-titre); font-weight: 700; font-size: 1.1rem; color: var(--texte-2); width: 2.8rem; }
.tableau-def { display: block; overflow-x: auto; border-radius: var(--rayon); }
.tableau-def table { min-width: 680px; }

/* ------------------------------------------------------------------ admin */
.admin-onglets { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border-fort); }
.admin-onglets::-webkit-scrollbar { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.modale { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; padding: 1rem; background: rgba(15, 24, 57, 0.5); }
.modale--ouverte { display: grid; }
.modale__boite { background: var(--surface); border-radius: var(--rayon); padding: 1.4rem; width: min(540px, 100%); max-height: 90dvh; overflow-y: auto; box-shadow: var(--ombre-forte); }
.modale__boite h2 { margin-top: 0; }
.modale__boite--large { width: min(800px, 100%); }
.stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 560px) { .stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cotes-edit { display: grid; gap: 0.6rem; }
.cotes-edit__ligne { display: grid; grid-template-columns: 1fr 100px 110px; gap: 0.6rem; align-items: center; }
.cotes-edit__ligne input { text-align: right; }

/* ------------------------------------------------------------------ résultats */
.resultat { min-width: 0; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1rem 1.1rem; margin-bottom: 0.8rem; }
.resultat__entete { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.25rem; }
.resultat__match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.6rem; margin-top: 0.7rem; }
.resultat__score { font-family: var(--police-titre); font-weight: 700; font-size: 1.55rem; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; min-width: 70px; text-align: center; }
.resultat__classement { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.7rem; }
.carte__sport { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; color: var(--texte); }
.equipe { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.equipe--b { flex-direction: row-reverse; text-align: right; }
.equipe__nom { font-weight: 700; font-size: 0.95rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.equipe--gagnante .equipe__nom { color: var(--gain); }

/* ------------------------------------------------------------------ divers */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--marine); color: #fff; border-radius: 999px; padding: 0.7rem 1.2rem; font-weight: 600;
  box-shadow: var(--ombre-forte); z-index: 90; opacity: 0; transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px); text-align: center;
}
.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--succes { background: var(--gain); }
.toast--erreur { background: var(--perte); }
.vide { text-align: center; color: var(--texte-2); padding: 2.75rem 1rem; background: var(--surface); border: 1px dashed var(--border-fort); border-radius: var(--rayon); }
.vide strong { display: block; color: var(--texte); font-family: var(--police-titre); font-size: 1.35rem; margin-bottom: 0.3rem; }
.squelette { background: linear-gradient(90deg, #fff 25%, var(--surface-2) 50%, #fff 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--rayon); height: 130px; margin-bottom: 14px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.pied { text-align: center; color: var(--texte-3); font-size: 0.82rem; padding: 2rem 0 0.5rem; }
.pied a { color: var(--texte-2); }
.regle { display: grid; grid-template-columns: 38px 1fr; gap: 0.8rem; padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
.regle:last-child { border-bottom: 0; }
.regle__num { font-family: var(--police-titre); font-size: 1.55rem; font-weight: 700; color: var(--accent-fort); line-height: 1; }
.regle h3 { margin-bottom: 0.2rem; }
.regle p { margin: 0; color: var(--texte-2); font-size: 0.95rem; }

/* ------------------------------------------------------------------ largeur de la colonne centrale (requêtes de conteneur) */
@container (min-width: 620px) {
  .ligne-pari__corps { grid-template-columns: minmax(0, 1fr) minmax(300px, 46%); gap: 1.5rem; }
  .ligne-pari__corps--4 { grid-template-columns: minmax(0, 1fr) minmax(380px, 58%); }
  .cotes--4 { --n: 4; }
  /* 4 écoles en ligne : le logo (qui porte déjà le nom) suffit ; le nom reste dans aria-label.
     Si le logo ne charge pas, la classe logo-ecole--img disparaît et le nom réapparaît. */
  .cotes--4 .cote .logo-ecole--img.logo-ecole--s { width: 64px; max-width: 100%; height: 28px; }
  .cotes--4 .logo-ecole--img + .cote__nom { display: none; }
  .une { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; }
}

/* ------------------------------------------------------------------ ordinateur */
@media (min-width: 900px) {
  body.avec-nav-bas { padding-bottom: 0; }
  .nav-bas { display: none; }
  .nav-haut { display: flex; }
  .toast { bottom: 28px; }
  .voile { display: none; }
  .disposition { grid-template-columns: minmax(0, 1fr) var(--ticket-l); }
  /* Le ticket devient la colonne de droite, toujours visible (comme sur Betclic) */
  .ticket {
    position: sticky; top: calc(var(--entete-h) + 20px); left: auto; right: auto; bottom: auto; z-index: 1;
    transform: none; border-radius: var(--rayon); box-shadow: var(--ombre);
    min-height: 480px; max-height: calc(100dvh - var(--entete-h) - 40px); padding: 1.1rem;
  }
  .ticket__poignee { display: none; }
}
@media (min-width: 1200px) {
  .disposition { grid-template-columns: var(--gauche-l) minmax(0, 1fr) var(--ticket-l); }
  .colonne-g { display: block; position: sticky; top: calc(var(--entete-h) + 20px); }
  .colonne-c .puces { display: none; }
}

/* ------------------------------------------------------------------ petits écrans */
@media (max-width: 480px) {
  .entete__int { padding: 0 12px; gap: 0.5rem; }
  .logo { font-size: 1.35rem; gap: 0.3rem; }
  .logo__img { width: 30px; height: 30px; }
  .logo__demo { display: none; }
  .solde { padding: 0.35rem 0.7rem 0.35rem 0.5rem; }
  .solde__val { font-size: 1.08rem; }
  .bandeau--demo { font-size: 0.85rem; padding: 0.7rem 0.9rem; }
  .ligne-pari { padding: 0.9rem 0.95rem 1rem; }
  .ligne-pari__equipe .logo-ecole--img { width: 52px; height: 30px; }
  .cote__val { font-size: 1.35rem; }
  .modale { padding: 0.6rem; }
  .modale__boite { padding: 1.1rem; }
  /* Tableau des écoles (Résultats) : sans logo ni badge, les 5 colonnes tiennent dès 320 px. */
  #tableau-ecoles .tableau th, #tableau-ecoles .tableau td { padding: 0.7rem 0.4rem; }
  #tableau-ecoles .tableau th:first-child, #tableau-ecoles .tableau td:first-child { padding-left: 0.85rem; }
  #tableau-ecoles .logo-ecole, #tableau-ecoles .badge { display: none; }
  /* Cotes d'ouverture (admin) : la colonne « actuelle / mises » passe sous la ligne. */
  .cotes-edit__ligne { grid-template-columns: minmax(0, 1fr) 96px; }
  .cotes-edit__ligne > :nth-child(3) { grid-column: 1 / -1; margin-top: -0.35rem; }
  .cotes-edit__ligne.petit > :nth-child(3) { display: none; }
}
@media (max-width: 400px) {
  .carte-une { padding: 1rem 0.85rem 1.1rem; }
  .carte-une .logo-ecole--img.logo-ecole--l { width: 84px; height: 46px; }
  .carte-une__heure { font-size: 1.35rem; }
  .carte-une__equipe { font-size: 0.95rem; }
}
@media (max-width: 520px) {
  .grille-2 { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* Classement : sur téléphone, l'école passe sous le pseudo (une colonne de moins). */
.classement__ecole { display: none; }
@media (max-width: 560px) {
  .tableau .col-ecole { display: none; }
  .classement__ecole { display: block; margin-top: 0.15rem; }
  #tableau .tableau th, #tableau .tableau td { padding: 0.7rem 0.55rem; }
  #tableau .tableau td:nth-child(2) { overflow-wrap: anywhere; }
}

/* Tableaux de l'admin : une carte par ligne sur téléphone (bouton « Résultat » à portée de pouce,
   sans défilement horizontal). Chaque cellule porte son intitulé dans data-label. */
@media (max-width: 699px) {
  .tableau--cartes, .tableau--cartes > tbody, .tableau--cartes > tbody > tr, .tableau--cartes > tbody > tr > td { display: block; width: 100%; }
  .tableau-def .tableau--cartes { min-width: 0; }
  .tableau--cartes { background: none; box-shadow: none; border-radius: 0; overflow: visible; }
  .tableau--cartes > thead { display: none; }
  .tableau--cartes > tbody > tr { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); margin-bottom: 0.75rem; padding: 0.45rem 0; }
  .tableau--cartes > tbody > tr > td { position: relative; border: 0; padding: 0.4rem 1rem 0.4rem 6.6rem; min-height: 2.1rem; text-align: left; overflow-wrap: anywhere; }
  .tableau--cartes > tbody > tr > td::before { content: attr(data-label); position: absolute; left: 1rem; top: 0.62rem; width: 5.2rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--texte-2); }
  .tableau--cartes > tbody > tr > td[data-label=""] { padding-left: 1rem; }
  .tableau--cartes > tbody > tr > td[data-label=""]::before { display: none; }
  .tableau--cartes > tbody > tr > td.num { text-align: left; }
  .tableau--cartes .actions { padding-top: 0.2rem; }
}

/* Écrans tactiles : cibles d'au moins 40 px pour le pouce. */
@media (pointer: coarse) {
  .bouton--petit { min-height: 40px; }
  .onglet { min-height: 44px; }
}
@media (max-width: 599px) {
  .resultat__match { grid-template-columns: 1fr auto 1fr; }
  .equipe, .equipe--b { flex-direction: column; gap: 0.35rem; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 599px) {
  .ligne-pari__heure { min-width: 64px; }
}
