/* Cacrew League — charte YaMatch (Studio High Five, asset_logo/) : site sombre, menthe #37E6AA
   pour les actions et les CD$, marine #001E5A pour l'encre sur menthe, orange pour le podium.
   Titres en Montserrat ExtraBold (italique pour la marque), texte en Hind.
   Mise en page : compétitions | cartes de match horizontales (façon appli de paris) | coupon
   sur grand écran (deux cartes par ligne au-delà de 100rem), une colonne sur téléphone. */

@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/montserrat-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/montserrat-latin-800-italic.woff2") format("woff2");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Hind";
  src: url("/static/fonts/hind-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Hind";
  src: url("/static/fonts/hind-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Hind";
  src: url("/static/fonts/hind-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Hind";
  src: url("/static/fonts/hind-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* Sombre par défaut, comme les maquettes YaMatch ; clair seulement via data-theme="light" */
:root {
  --bg: #12151b;
  --surface: #1a1e26;
  --surface-2: #232834;
  --ink: #ffffff;
  --muted: #8d95a5;
  --line: #2b313d;
  --pitch: #37e6aa;
  --pitch-ink: #001e5a;
  --pitch-soft: #173a33;
  --gold: #f5a524;
  --gold-ink: #2a1a00;
  --gold-soft: #3a2d17;
  --silver: #b9c0cc;
  --bronze: #e0743a;
  --danger: #ff6b6b;
  --navy: #001e5a;
  --odd-bg: #f4f6f9;
  --odd-ink: #001e5a;
  --odd-muted: #5b6478;
  --av-sat: 55%;
  --live: #ff4d5e;
  --live-soft: #3a1820;
  --gold-glow: rgb(245 165 36 / 0.14);
  --av-light: 40%;
  --band: #0d1015;
  --band-ink: #ffffff;
  --band-muted: #a3abba;
  --slip-error: #ff9b94;

  --f-display: "Montserrat", "Arial Black", system-ui, sans-serif;
  --f-body: "Hind", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 0.35rem;
  --shadow: none;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #e8ebf0;
  --ink: #0d1530;
  --muted: #5b6478;
  --line: #d6dbe4;
  --pitch: #0f9e72;
  --pitch-ink: #ffffff;
  --pitch-soft: #d5f5ea;
  --gold: #d98a06;
  --gold-ink: #ffffff;
  --gold-soft: #fbecd0;
  --silver: #8f98a8;
  --bronze: #c45a22;
  --danger: #c62828;
  --band: #001e5a;
  --band-ink: #ffffff;
  --band-muted: #aab6d4;
  --odd-bg: #e8ebf0;
  --live: #d6263a;
  --live-soft: #fde4e7;
  --gold-glow: rgb(217 138 6 / 0.12);
  --shadow: 0 1px 2px rgb(13 21 48 / 0.06), 0 4px 14px rgb(13 21 48 / 0.05);
  color-scheme: light;
}

/* --- Base --------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.5 var(--f-body);
  min-height: 100vh;
}
a {
  color: var(--pitch);
}
h1,
h2,
h3 {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}
h1 {
  font-size: 1.7rem;
  text-transform: uppercase;
}
h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
}
img {
  max-width: 100%;
}
:focus-visible {
  outline: 2px solid var(--pitch);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.wrap {
  max-width: 46rem;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.stack {
  display: grid;
  gap: 1rem;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.85rem;
}
.num {
  font-variant-numeric: tabular-nums;
}
.error {
  color: var(--danger);
}
.ok {
  color: var(--pitch);
  font-weight: 600;
}

/* --- Boutons et champs -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 0.2rem;
  padding: 0.6rem 1.2rem 0.5rem;
  font: 800 0.85rem/1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--pitch);
  color: var(--pitch-ink);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover {
  filter: brightness(1.08);
}
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn.sm {
  padding: 0.45rem 0.8rem 0.35rem;
  font-size: 0.75rem;
}
.btn.block {
  width: 100%;
}
label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
}
input[type="text"],
input[type="password"],
input[type="number"],
input:not([type]) {
  width: 100%;
  font: 400 1rem var(--f-body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.6rem 0.7rem;
}
input:focus {
  border-color: var(--pitch);
  outline: none;
  box-shadow: 0 0 0 3px var(--pitch-soft);
}

/* --- Onglets et puces --------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--pitch);
}
.chip[aria-current="page"] {
  background: var(--pitch);
  border-color: var(--pitch);
  color: var(--pitch-ink);
  font-weight: 700;
}
.chip.label {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
}
.tablabel {
  font: 600 0.75rem var(--f-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  align-self: center;
  margin-right: 0.2rem;
}

/* --- Bandeau collant : se cache en descendant, réapparaît dès qu'on remonte (app.js) ---- */
.band {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--band);
  color: var(--band-ink);
  box-shadow: 0 2px 0 rgb(0 0 0 / 0.35);
  transition: transform 0.25s ease;
}
.band.is-hidden {
  transform: translateY(-100%);
}
.band-inner {
  max-width: 76rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem 1.25rem;
  min-height: 4.25rem;
  padding: 0.4rem max(16px, env(safe-area-inset-right, 0px)) 0.4rem
    max(16px, env(safe-area-inset-left, 0px));
}
/* Logotype façon YaMatch : SVG en ligne dans base.html (police Montserrat ExtraBold Italic) */
.brand {
  display: block;
  flex: none;
  width: 14rem;
  line-height: 0;
}
.brand svg {
  width: 100%;
  height: auto;
}
.brand:hover {
  filter: brightness(1.08);
}
.nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 0.2rem;
  margin: -0.4rem 0 -0.4rem 1rem;
}
.nav a {
  display: flex;
  align-items: center;
  color: var(--band-ink);
  text-decoration: none;
  font: 800 0.95rem/1 var(--f-display);
  text-transform: uppercase;
  padding: 0 0.75rem;
  border-bottom: 3px solid transparent;
  border-top: 3px solid transparent;
}
.nav a:hover {
  color: var(--pitch);
}
.nav a[aria-current="page"] {
  border-bottom-color: var(--pitch);
}
.band-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.who-form {
  margin: 0;
}
.who {
  background: none;
  border: 0;
  color: var(--band-muted);
  padding: 0.4rem;
  font: 500 0.8rem var(--f-body);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.who:hover {
  color: var(--band-ink);
}
/* Mode démo : bandeau impossible à rater au-dessus de tout, bouton discret dans le bandeau */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.9rem;
  padding: 0.45rem max(16px, env(safe-area-inset-right, 0px));
  background: repeating-linear-gradient(-45deg, var(--gold), var(--gold) 14px, #e09310 14px, #e09310 28px);
  color: var(--gold-ink);
  font-size: 0.85rem;
  font-weight: 600;
}
.demo-banner strong {
  font: 800 0.85rem/1 var(--f-display);
  text-transform: uppercase;
  background: var(--gold-ink);
  color: var(--gold);
  padding: 0.3rem 0.5rem 0.25rem;
  border-radius: 0.2rem;
}
.demo-banner .btn.ghost {
  border-color: var(--gold-ink);
  color: var(--gold-ink);
}
.guest-banner {
  background: var(--surface-2);
  color: var(--ink);
  border-bottom: 2px solid var(--pitch);
}
.guest-banner strong {
  background: var(--pitch);
  color: var(--pitch-ink);
}
.guest-banner.demo-banner .btn.sm {
  background: var(--pitch);
  color: var(--pitch-ink);
}
.demo-banner .btn:not(.ghost) {
  background: var(--gold-ink);
  color: var(--gold);
}
body:has(.demo-banner) .band {
  top: 2.6rem;
}
.demo-switch {
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 999px;
  padding: 0.3rem 0.65rem 0.2rem;
  font: 800 0.7rem/1 var(--f-display);
  text-transform: uppercase;
  cursor: pointer;
}
.demo-switch:hover {
  background: var(--gold);
  color: var(--gold-ink);
}

/* Joueur : pseudo, solde en menthe avec les pièces, avatar rond (maquette YaMatch) */
.me-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--band-ink);
  text-decoration: none;
}
.player-text {
  display: grid;
  justify-items: end;
  line-height: 1.15;
}
.player-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.purse {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--pitch);
  font: 700 0.9rem/1 var(--f-body);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.purse svg {
  width: 0.9rem;
  height: 0.9rem;
}
/* Avatar à initiales : teinte dérivée du pseudo (--h, filtre |hue), saturation et
   luminosité fixes pour garder un contraste suffisant avec le texte blanc */
.av {
  --av-size: 1.75rem;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--av-size);
  height: var(--av-size);
  border-radius: 50%;
  background: hsl(var(--h) var(--av-sat) var(--av-light));
  color: #fff;
  font: 800 calc(var(--av-size) * 0.38) / 1 var(--f-display);
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.avatar {
  --av-size: 2.6rem;
  box-shadow: 0 0 0 2px var(--band), 0 0 0 4px var(--pitch);
}
.me-card:hover .player-name {
  color: var(--pitch);
}

main {
  padding-block: 1.25rem 3rem;
}

/* --- Barre d'onglets en bas (téléphone) ---------------------------------------------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--band);
  border-top: 1px solid rgb(255 255 255 / 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabbar a {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.5rem 0.1rem 0.45rem;
  color: var(--band-muted);
  text-decoration: none;
  font: 600 0.68rem/1.1 var(--f-body);
  text-align: center;
}
.tabbar svg {
  width: 1.45rem;
  height: 1.45rem;
}
.tabbar a[aria-current="page"] {
  color: var(--pitch);
}

/* --- Page Matchs : compétitions | matchs | coupon ------------------------------------ */
main.sportsbook {
  max-width: 76rem;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: start;
}
.board-col {
  min-width: 0;
}
.board-head {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.9rem;
}
.board-head p {
  margin: 0;
}
.board-head h1 .flag {
  width: 1.9rem;
  height: 1.27rem;
  vertical-align: 0.05em;
  margin-right: 0.2rem;
}

.leagues {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: -16px;
  padding-inline: 16px;
}
.leagues::-webkit-scrollbar {
  display: none;
}
.leagues-title {
  display: none;
}
.leagues.is-single {
  display: none;
}
.league {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font: 800 1rem/1 var(--f-display);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.league img {
  width: 1.2rem;
  height: 1.2rem;
  object-fit: contain;
}
.league.is-active {
  background: var(--pitch);
  border-color: var(--pitch);
  color: var(--pitch-ink);
}

.side-col {
  display: contents;
}
/* Recherche d'équipe (toutes tailles) */
.side-search {
  position: relative;
}
.side-search svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 1.1rem;
  height: 1.1rem;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.side-search input {
  width: 100%;
  font: 500 0.95rem var(--f-body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.65rem 1rem 0.55rem 2.5rem;
}
.side-search input:focus {
  border-color: var(--pitch);
  outline: none;
  box-shadow: 0 0 0 3px var(--pitch-soft);
}
.side-menu {
  display: none;
}
.flag {
  flex: none;
  width: 1.3rem;
  height: 0.87rem;
  border-radius: 2px;
}
.chev {
  display: none;
}
/* Podiums de la colonne de gauche (grand écran seulement) */
.mini-rank {
  display: none;
  background: var(--surface);
}
.mini-rank h2 {
  font-size: 0.72rem;
  text-align: center;
  padding: 0.8rem;
  background: var(--surface-2);
}
.mini-rank ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mini-rank li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}
.mini-rank li.me {
  background: var(--pitch-soft);
}
.mini-rank .rank {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.7rem;
}
.mini-rank .av {
  --av-size: 1.6rem;
}
.mini-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.mini-rank b {
  color: var(--pitch);
  font-size: 0.8rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mini-more {
  display: block;
  text-align: center;
  padding: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.mini-more:hover {
  color: var(--pitch);
}
.live-badge {
  display: block;
  width: 2.6rem;
  height: 2.6rem;
  margin: -0.4rem 0 -0.4rem -0.3rem;
}

/* Journée : un bloc par jour, en-tête avec la légende 1 N 2 au-dessus des cotes */
.day,
.match-hero {
  --odd-w: 3.9rem;
  --odd-gap: 0.35rem;
}
/* Journée : titre de jour, puis cartes de match (une colonne, deux sur très grand écran) */
.day {
  margin-bottom: 1.5rem;
}
.day-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.7rem;
  padding: 0.6rem 0.9rem 0.5rem;
  font: 800 0.85rem/1 var(--f-display);
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--navy), var(--surface) 75%);
  border-left: 4px solid var(--pitch);
  border-radius: 0.35rem;
}
.day-count {
  margin-left: auto;
  font: 500 0.78rem/1 var(--f-body);
  text-transform: none;
  color: var(--band-muted);
}
.day-head .date::first-letter {
  text-transform: uppercase;
}
.md {
  font: 800 0.7rem/1 var(--f-display);
  background: var(--pitch);
  color: var(--pitch-ink);
  padding: 0.3rem 0.4rem 0.25rem;
  border-radius: 0.25rem;
}
.event-grid {
  display: grid;
  gap: 0.9rem;
}
.event-odds {
  padding-top: 0.25rem;
}

/* Zone Live en tête de page */
.live-zone {
  padding: 0.7rem;
  margin-inline: -0.7rem;
  background: linear-gradient(180deg, var(--live-soft), transparent);
  border-radius: 0.8rem;
}
.live-zone .day-head {
  background: linear-gradient(90deg, var(--live), var(--live-soft) 80%);
  border-left-color: #fff;
}
.live-zone .day-head .live-badge {
  margin: -0.6rem 0;
}

/* Bonus de journée annoncé à l'avance */
.bonus-strip {
  margin: 0;
  display: block;
  justify-self: start;
  padding: 0.45rem 0.8rem 0.35rem;
  background: var(--gold-glow);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  border-radius: 0.5rem;
  font-size: 0.88rem;
  line-height: 1.35;
}
.bonus-strip b {
  color: var(--gold);
}

/* Bandeau d'accueil (joueur qui n'a jamais parié) */
.welcome {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
  padding: 1.1rem 1.2rem 1.2rem;
  border-radius: 0.8rem;
  background:
    radial-gradient(circle at 100% 0%, rgb(55 230 170 / 0.28), transparent 55%),
    linear-gradient(135deg, var(--navy), #0b3a6b);
  color: #fff;
  border: 1px solid rgb(55 230 170 / 0.35);
}
.welcome-head h2 {
  font-size: 1.2rem;
}
.welcome-head p {
  margin: 0.3rem 0 0;
  color: #d5e2f5;
}
.welcome-head b {
  color: var(--pitch);
}
.welcome-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.6rem;
}
.welcome-steps li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: rgb(255 255 255 / 0.08);
  border-radius: 0.55rem;
  padding: 0.65rem 0.7rem;
  font-size: 0.85rem;
  color: #d5e2f5;
}
.welcome-steps li > span {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--pitch);
  color: var(--pitch-ink);
  font: 800 0.85rem/1 var(--f-display);
}
.welcome-steps b {
  display: block;
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
}

/* Carte de match à l'horizontale */
.event {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  overflow: hidden;
  transition: border-color 0.15s;
}
/* Liseré du haut : moitié couleur du club à domicile, moitié celle du club à l'extérieur */
.event::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--home) 50%, var(--away) 50%);
}
/* Choc : fond teinté des couleurs des deux clubs, badge or */
.event.is-clash {
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--home) 28%, transparent), transparent 42%),
    linear-gradient(295deg, color-mix(in srgb, var(--away) 28%, transparent), transparent 42%),
    var(--surface);
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
}
.event.is-live {
  border-color: var(--live);
}
.badge-clash,
.badge-bet {
  display: inline-block;
  font: 800 0.62rem/1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.42rem 0.22rem;
  border-radius: 0.2rem;
  margin-right: 0.45rem;
  vertical-align: 0.08em;
}
.badge-clash {
  background: var(--gold);
  color: var(--gold-ink);
}
.badge-bet {
  margin: 0 0 0 auto;
  background: var(--pitch);
  color: var(--pitch-ink);
}
.countdown {
  font: 600 0.78rem/1 var(--f-body);
  color: var(--pitch);
  white-space: nowrap;
}
.countdown.is-soon {
  color: var(--gold);
}
.event:hover {
  border-color: rgb(55 230 170 / 0.35);
}
.event-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.event-more {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.event-more:hover {
  color: var(--pitch);
}
.event-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}
.event-side {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  min-width: 0;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
}
.event-side .team-name {
  max-width: 100%;
}
.event-main:hover .team-name {
  color: var(--pitch);
}
.event-side .crest {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--club, var(--surface-2));
  color: var(--club-ink, var(--ink));
  border: 2px solid var(--club-accent, transparent);
  box-shadow: 0 0 0 2px var(--surface);
}
.event-side .crest:has(img) {
  background: transparent;
  border: 0;
  box-shadow: none;
}
.event-side .crest img {
  width: 2.3rem;
  height: 2.3rem;
}
.event-center {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  min-width: 4.5rem;
}
.event-time {
  font: 700 1.25rem/1 var(--f-body);
  font-variant-numeric: tabular-nums;
}
.event-score {
  display: flex;
  gap: 0.35rem;
  font: 800 1.6rem/1 var(--f-display);
  color: var(--pitch);
  font-variant-numeric: tabular-nums;
}
.event-score span {
  color: var(--muted);
}
/* Trois gros boutons clairs, nommés : ce qu'on parie se lit sans légende */
.event-odds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
.event .odd {
  min-height: 3.1rem;
  background: var(--odd-bg);
  border-color: var(--odd-bg);
  color: var(--odd-ink);
  border-radius: 0.45rem;
}
.event .odd small {
  color: var(--odd-muted);
  font-size: 0.75rem;
  font-weight: 500;
}
.event .odd b {
  color: var(--odd-ink);
  font-size: 1.1rem;
}
.event .odd {
  position: relative;
}
.event .odd.is-fav {
  border-color: var(--gold);
  box-shadow: inset 0 -3px 0 var(--gold);
}
.fav-tag {
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  font: 800 0.55rem/1 var(--f-display);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--gold);
  color: var(--gold-ink);
  padding: 0.18rem 0.35rem 0.13rem;
  border-radius: 0.2rem;
  white-space: nowrap;
}
.event .odd[aria-pressed="true"] .fav-tag {
  background: var(--pitch-ink);
  color: var(--pitch);
}
.event .odd:hover {
  border-color: var(--pitch);
  box-shadow: 0 0 0 2px var(--pitch);
}
.event .odd[aria-pressed="true"] {
  background: var(--pitch);
  border-color: var(--pitch);
}
.event .odd[aria-pressed="true"] small,
.event .odd[aria-pressed="true"] b {
  color: var(--pitch-ink);
}
.event .odd:disabled {
  background: var(--surface-2);
  border-color: var(--surface-2);
}
.event .odd:disabled b,
.event .odd:disabled small {
  color: var(--muted);
}
/* Répartition des choix (après le coup d'envoi) : même grille que les cotes, en lecture seule */
.share {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  padding: 0.45rem 0.4rem 0.5rem;
  background: var(--surface-2);
  border-radius: 0.45rem;
  min-width: 0;
}
.share-label {
  font-size: 0.75rem;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share b {
  font: 700 1rem/1 var(--f-body);
  font-variant-numeric: tabular-nums;
}
.share-bar {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.share-bar span {
  display: block;
  height: 100%;
  background: var(--pitch);
}
.event-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.event-mine {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0.7rem;
  display: grid;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--pitch-soft);
  border-left: 3px solid var(--pitch);
  border-radius: 0.2rem;
}
.event-mine li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.event-mine strong {
  color: var(--ink);
}

/* Bouton de cote : cadre net sur fond plus sombre que la ligne ; sélectionné = menthe */
.odd {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.05rem;
  min-height: 2.75rem;
  padding: 0.25rem 0.2rem;
  border-radius: 0.25rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-width: 0;
}
.odd small {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.odd b {
  font: 700 1.05rem/1 var(--f-body);
  font-variant-numeric: tabular-nums;
  padding-top: 0.15rem;
}
.odd:hover {
  border-color: var(--pitch);
  color: var(--pitch);
}
.odd[aria-pressed="true"] {
  background: var(--pitch);
  border-color: var(--pitch);
  color: var(--pitch-ink);
}
.odd[aria-pressed="true"] small {
  color: var(--pitch-ink);
}
.odd:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.odd:disabled:hover {
  border-color: var(--line);
  color: var(--ink);
}
.odd[aria-pressed="true"]:hover {
  color: var(--pitch-ink);
}

.state {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  background: var(--surface-2);
  color: var(--muted);
}

.state.live {
  background: var(--danger);
  color: var(--surface);
}

.team-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crest {
  flex: none;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--line);
  font: 700 0.7rem var(--f-body);
  color: var(--muted);
  overflow: hidden;
}
.crest:has(img) {
  border: 0;
}

.crest img {
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
}


.pts {
  font: 800 1rem/1 var(--f-display);
  padding: 0.3rem 0.55rem;
  border-radius: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.pts.exact {
  background: var(--gold);
  color: var(--gold-ink);
}
.pts.good {
  background: var(--pitch-soft);
  color: var(--pitch);
}
.pts.wrong,
.pts.void {
  background: var(--surface-2);
  color: var(--muted);
}



/* --- Fiche de match ----------------------------------------------------------------- */
.match-hero {
  display: grid;
  gap: 0.8rem;
  background: var(--band);
  color: var(--band-ink);
  border-radius: var(--radius);
  border-bottom: 3px solid var(--pitch);
  padding: 1rem 1.1rem 1.2rem;
}
.hero-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--band-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.hero-meta::first-letter {
  text-transform: uppercase;
}
.hero-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.8rem;
}
.hero-team {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  text-align: center;
  font: 800 1.15rem/1.1 var(--f-display);
  text-transform: uppercase;
}
.hero-team .crest {
  width: 3rem;
  height: 3rem;
  font-size: 0.9rem;
}
.hero-team .crest img {
  width: 2.4rem;
  height: 2.4rem;
}
.hero-score {
  font: 800 2.6rem/1 var(--f-display);
  color: var(--pitch);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.hero-score small {
  display: block;
  font: 500 0.75rem var(--f-body);
  color: var(--band-muted);
}
.hero-score .vs {
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  color: var(--band-muted);
}
.market-title {
  margin: 0.4rem 0 0;
  font-size: 1.05rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.market-title .muted {
  color: var(--band-muted);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--f-body);
  font-weight: 400;
}
.match-hero .odd {
  background: rgb(255 255 255 / 0.08);
  color: var(--band-ink);
}
.match-hero .odd small {
  color: var(--band-muted);
}
.match-hero .odd[aria-pressed="true"] {
  background: var(--pitch);
  color: var(--pitch-ink);
}
.match-hero .odd[aria-pressed="true"] small {
  color: var(--pitch-ink);
}
.market-1n2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}
.odd.wide {
  min-height: 3.5rem;
}
/* Score exact : trois colonnes (victoire domicile, nul, victoire extérieur) ; les trois scores
   les plus probables sont signalés « Top » ; « ≈ » = cote estimée (aucun bookmaker) */
.score-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
.score-col {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}
.score-col h3 {
  font: 600 0.8rem/1.2 var(--f-body);
  text-transform: none;
  color: var(--band-muted);
  text-align: center;
  padding-bottom: 0.15rem;
}
.odd.score {
  position: relative;
  grid-template-columns: auto 1fr;
  justify-items: start;
  padding: 0.45rem 0.6rem;
  min-height: 2.6rem;
}
.odd.score b {
  justify-self: end;
}
.odd.score.is-top {
  border-color: var(--gold);
  background: rgb(245 165 36 / 0.12);
}
.top-tag {
  position: absolute;
  top: -0.45rem;
  right: 0.35rem;
  font: 800 0.55rem/1 var(--f-display);
  font-style: normal;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--gold-ink);
  padding: 0.18rem 0.3rem 0.12rem;
  border-radius: 0.2rem;
}
.est {
  color: var(--gold);
  margin-right: 0.1rem;
}
.odd.score small {
  font: 800 0.95rem/1 var(--f-display);
  color: var(--band-ink);
}
.odd.score b {
  font-size: 0.9rem;
}
.score-custom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.score-custom .muted {
  color: var(--band-muted);
}
.score-custom input {
  width: 3.4rem;
  text-align: center;
  font: 800 1.2rem var(--f-display);
  padding: 0.35rem;
  -moz-appearance: textfield;
}
.score-custom input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
.score-custom .dash {
  font: 800 1.2rem var(--f-display);
  color: var(--band-muted);
}
.match-hero .event-mine {
  grid-area: auto;
  background: rgb(255 255 255 / 0.06);
  color: var(--band-muted);
}
.match-hero .event-mine strong {
  color: var(--band-ink);
}

/* --- Coupon -------------------------------------------------------------------------- */
.coupon {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.coupon-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--pitch);
  color: var(--pitch-ink);
  border: 0;
  padding: 0.85rem 1rem 0.75rem;
  font: 800 1.1rem/1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  cursor: pointer;
}
.coupon.is-empty .coupon-bar {
  background: var(--surface-2);
  color: var(--ink);
}
.coupon.is-empty .coupon-count {
  display: none;
}
.coupon-count {
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--pitch-ink);
  color: var(--pitch);
  font-size: 0.9rem;
  letter-spacing: 0;
}
.coupon-total {
  margin-left: auto;
  color: var(--pitch-ink);
  font-variant-numeric: tabular-nums;
}
.coupon-body {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem 1rem 1rem;
  overflow-y: auto;
}
.coupon-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 0.75rem 0.5rem;
  display: grid;
  gap: 0.4rem;
}
.coupon-empty strong {
  color: var(--ink);
  font: 800 1.05rem/1.2 var(--f-display);
}
.coupon-empty span {
  color: var(--ink);
}
.coupon-empty small {
  font-size: 0.78rem;
  margin-top: 0.3rem;
}
/* Illustration du coupon vide : couleurs des tokens, suit le thème */
.coupon-art {
  width: 9rem;
  height: auto;
  justify-self: center;
  margin-bottom: 0.4rem;
}
.art-shadow {
  fill: var(--bg);
}
.art-ticket {
  fill: var(--surface-2);
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linejoin: round;
}
.art-lines {
  stroke: var(--line);
  stroke-width: 4;
  stroke-linecap: round;
}
.art-cut {
  stroke: var(--muted);
  stroke-width: 2;
  stroke-dasharray: 3 4;
}
.art-ball {
  fill: #fff;
  stroke: var(--pitch);
  stroke-width: 3;
}
.art-patch {
  fill: var(--navy);
}
.art-seams {
  stroke: var(--navy);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.coupon.is-empty .coupon-body > :not(.coupon-empty) {
  display: none;
}
.coupon:not(.is-empty) .coupon-empty {
  display: none;
}
.coupon-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0.2rem;
}
.coupon-tabs button {
  border: 0;
  background: none;
  border-radius: 999px;
  padding: 0.45rem;
  font: 600 0.9rem var(--f-body);
  color: var(--muted);
  cursor: pointer;
}
.coupon-tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.coupon-legs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.coupon-legs li {
  display: grid;
  gap: 0.2rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--pitch);
  border-radius: 0.45rem;
  padding: 0.5rem 0.6rem;
}
.leg-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.leg-head strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leg-odds {
  font: 800 1.1rem var(--f-display);
  font-variant-numeric: tabular-nums;
}
.leg-remove {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}
.leg-label {
  font-size: 0.8rem;
  color: var(--muted);
}
.leg-stake {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.25rem;
}
.leg-stake input {
  width: 6rem;
  padding: 0.35rem 0.5rem;
}
.leg-gain {
  font-size: 0.85rem;
  color: var(--muted);
}
.coupon-stake {
  display: grid;
  gap: 0.4rem;
}
.stake-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stake-row input {
  font: 800 1.3rem var(--f-display);
}
.stake-unit {
  font: 800 1.1rem var(--f-display);
  color: var(--muted);
}
.quick-stakes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}
.quick-stakes button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 0.4rem;
  padding: 0.4rem 0;
  font: 600 0.85rem var(--f-body);
  cursor: pointer;
}
.quick-stakes button:hover {
  border-color: var(--pitch);
}
.coupon-hint {
  margin: 0;
  color: var(--danger);
}
.coupon-tip {
  margin: 0;
  padding: 0.5rem 0.65rem;
  border-radius: 0.4rem;
  background: var(--gold-glow);
  border-left: 3px solid var(--gold);
  color: var(--ink);
}
.coupon-sums {
  margin: 0;
  display: grid;
  gap: 0.3rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.6rem;
}
.coupon-sums div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.coupon-sums dt {
  font-size: 0.85rem;
  color: var(--muted);
}
.coupon-sums dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.coupon-sums .gain {
  background: var(--pitch-soft);
  margin: 0.2rem -0.5rem 0;
  padding: 0.55rem 0.5rem;
  border-radius: 0.4rem;
}
.coupon-sums .gain dt {
  color: var(--ink);
  font-weight: 600;
}
.coupon-sums .gain dd {
  font: 800 1.5rem var(--f-display);
  color: var(--pitch);
}
.coupon-balance,
.slip-error {
  margin: 0;
}
.bet-btn {
  font: 800 1.15rem/1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem;
  border-radius: 0.55rem;
}
.link-btn {
  justify-self: center;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}

/* Téléphone et petite tablette : le coupon est un volet en bas, caché tant qu'il est vide */
@media (max-width: 55.99rem) {
  .coupon {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    max-width: 40rem;
    margin-inline: auto;
    border-radius: 1rem 1rem 0 0;
    border-bottom: 0;
    max-height: 78vh;
    box-shadow: 0 -8px 28px rgb(0 0 0 / 0.3);
  }
  .coupon.is-empty {
    display: none;
  }
  .coupon:not(.is-open) .coupon-body {
    display: none;
  }
  .coupon-toggle::before {
    content: "▲";
    font-size: 0.8rem;
    color: var(--pitch-ink);
  }
  .coupon.is-open .coupon-toggle::before {
    content: "▼";
  }
  body.coupon-filled main {
    padding-bottom: 5.5rem;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .coupon.bump .coupon-count {
    animation: bump 0.3s ease;
  }
  @keyframes bump {
    50% {
      transform: scale(1.35);
    }
  }
}

/* Écran moyen : matchs + coupon fixe à droite, compétitions en puces au-dessus */
@media (min-width: 56rem) {
  main.sportsbook {
    grid-template-columns: minmax(0, 1fr) 20rem;
  }
  .leagues {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0;
  }
  .coupon {
    position: sticky;
    top: 4.6rem;
    max-height: calc(100vh - 5.6rem);
  }
  .coupon-bar {
    cursor: default;
  }
}
/* Grand écran : trois colonnes, compétitions et coupon restent visibles */
@media (min-width: 80rem) {
  main.sportsbook {
    grid-template-columns: 13rem minmax(0, 1fr) 21rem;
  }
  main.sportsbook.detail {
    grid-template-columns: minmax(0, 1fr) 21rem;
  }
  /* Colonne de gauche façon appli de paris : recherche, raccourcis, compétitions, podiums */
  .side-col {
    display: grid;
    gap: 0.9rem;
    position: sticky;
    top: 4.9rem;
    align-content: start;
  }
  .side-menu,
  .leagues,
  .leagues.is-single {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: visible;
    margin: 0;
    padding: 0.3rem 0;
    background: var(--surface);
    border-radius: 0.6rem;
  }
  .side-link,
  .league {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.9rem;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--ink);
    text-decoration: none;
    font: 500 0.92rem/1.2 var(--f-body);
    letter-spacing: 0;
    white-space: normal;
  }
  .side-link + .side-link,
  .league + .league {
    border-top: 1px solid var(--line);
  }
  .side-link svg {
    width: 1.2rem;
    height: 1.2rem;
    color: var(--pitch);
    flex: none;
  }
  .side-link:hover,
  .league:hover {
    background: var(--surface-2);
  }
  .chev {
    display: block;
    margin-left: auto;
    color: var(--muted);
    font-size: 1.2rem;
    line-height: 1;
  }
  .leagues-title {
    display: block;
    font-size: 0.95rem;
    text-transform: none;
    padding: 0.6rem 0.9rem 0.5rem;
    margin: 0;
  }
  .league.is-active {
    background: var(--pitch-soft);
    color: var(--ink);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--pitch);
  }
  .mini-rank {
    display: block;
  }
}

@media (min-width: 100rem) {
  main.sportsbook,
  .band-inner {
    max-width: 96rem;
  }
  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Tableaux ----------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody tr:last-child td {
  border-bottom: 0;
}
th {
  font: 600 0.72rem var(--f-body);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
td.n,
th.n {
  text-align: right;
}
th.sorted,
td.sorted {
  background: var(--surface-2);
}
td.sorted {
  font-weight: 700;
}
td.player {
  font-weight: 600;
  width: 100%;
}
.pl-avatar {
  --av-size: 1.7rem;
  margin-right: 0.55rem;
}
tr.me td {
  background: var(--pitch-soft);
}
tr.me td.player::after {
  content: " · toi";
  font-weight: 400;
  color: var(--muted);
}
tr.pending td {
  color: var(--muted);
}
.rank {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  font: 800 0.95rem var(--f-display);
}
.rank.r1 {
  background: var(--gold);
  color: var(--gold-ink);
}
.rank.r2 {
  background: var(--silver);
  color: var(--bg);
}
.rank.r3 {
  background: var(--bronze);
  color: var(--bg);
}
tbody code {
  font-size: 0.8rem;
  white-space: nowrap;
}

/* --- Page d'accueil auth ------------------------------------------------------------ */
.auth {
  max-width: 24rem;
  margin: 2rem auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}
.auth form {
  display: grid;
  gap: 0.9rem;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0 0.4rem;
}
.empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.inline {
  display: inline;
  margin: 0;
}

/* --- Utilitaires ajoutés avec les paris en CD$ --------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.center {
  text-align: center;
  margin: 0;
}
.money {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.money.up {
  color: var(--pitch);
}
.money.down {
  color: var(--danger);
}
.btn.gold {
  background: var(--gold);
  color: var(--gold-ink);
}
.btn.danger {
  color: var(--danger);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}
select {
  width: 100%;
  font: 400 1rem var(--f-body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.55rem 0.6rem;
}
.flash {
  margin: 0;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  background: var(--pitch-soft);
  color: var(--ink);
  font-weight: 600;
}
.flash.is-error {
  background: var(--surface-2);
  color: var(--danger);
}
.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}
.inline-form input[type="number"] {
  width: 6rem;
  padding: 0.35rem 0.5rem;
}
.or {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.or::before,
.or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}
.btn.google {
  color: var(--ink);
}

/* --- Mes paris : tickets ------------------------------------------------------------ */
.ticket {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.8rem 0.9rem;
  display: grid;
  gap: 0.6rem;
  margin-top: 0.7rem;
}
.ticket.is-won {
  border-left-color: var(--pitch);
}
.ticket.is-lost {
  border-left-color: var(--danger);
}
.ticket.is-open {
  border-left-color: var(--pitch);
}
.ticket-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.ticket-head .money {
  margin-left: auto;
  font: 700 1.1rem var(--f-body);
}
/* Pari en cours : pastille plutôt qu'un montant */
.ticket-head .money.muted {
  font: 600 0.75rem/1 var(--f-body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pitch);
  background: var(--pitch-soft);
  padding: 0.35rem 0.55rem 0.25rem;
  border-radius: 999px;
}
.ticket-kind {
  font: 800 0.9rem var(--f-display);
  text-transform: uppercase;
}
.ticket-legs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
}
.ticket-legs li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 0.6rem;
}
.ticket-legs a {
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-legs .num {
  font: 700 1rem var(--f-body);
}
.ticket-foot .gain b {
  color: var(--pitch);
}
.leg-pick {
  color: var(--muted);
  white-space: nowrap;
}
.ticket-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 0.5rem;
}
.ticket-foot b {
  color: var(--ink);
}
.ticket-edit {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* --- Portefeuille ------------------------------------------------------------------- */
.vault {
  background: var(--band);
  color: var(--band-ink);
  border-radius: var(--radius);
  border-bottom: 3px solid var(--pitch);
  padding: 1.2rem;
  display: grid;
  gap: 0.5rem;
  justify-items: start;
}
.vault .small {
  color: var(--band-muted);
}
.vault-label {
  font: 600 0.75rem var(--f-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--band-muted);
}
.vault-amount {
  font: 800 2.6rem/1 var(--f-display);
  color: var(--pitch);
  font-variant-numeric: tabular-nums;
}
.plain-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.25rem;
}
/* Règles et bonus : cartes courtes, montant en menthe en tête, faciles à parcourir */
.rules-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.rules-list li {
  background: var(--surface);
  border-left: 3px solid var(--line);
  padding: 0.55rem 0.8rem;
  line-height: 1.45;
}
.rules-list li:has(> b:first-child) {
  border-left-color: var(--pitch);
}
.rules-list li > b:first-child {
  color: var(--pitch);
  font-weight: 700;
}
.request {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  background: var(--gold-soft);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.5rem;
}
.transfer-forms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.8rem;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem;
  display: grid;
  gap: 0.6rem;
  align-content: start;
  justify-items: start;
}
.panel label {
  width: 100%;
}
.subhead {
  margin: 1.2rem 0 0.4rem;
}
td.wrap-cell {
  white-space: normal;
}

/* --- Écran de pub ------------------------------------------------------------------- */
.adscreen {
  max-width: 26rem;
  margin: 1rem auto;
  display: grid;
  gap: 0.9rem;
}
.adscreen-tag {
  margin: 0;
  font: 600 0.7rem var(--f-body);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.adscreen-box {
  background: var(--band);
  color: var(--band-ink);
  border-radius: var(--radius);
  border-bottom: 3px solid var(--pitch);
  padding: 2rem 1.2rem;
  text-align: center;
  display: grid;
  gap: 0.6rem;
}
.adscreen-brand {
  font: 800 2rem/1 var(--f-display);
  text-transform: uppercase;
  color: var(--pitch);
}
.adscreen-count {
  margin: 0;
  font: 800 2.4rem/1 var(--f-display);
  font-variant-numeric: tabular-nums;
}

/* --- Crews -------------------------------------------------------------------------- */
.crew-card {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.9rem 1rem;
  margin-top: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}
.crew-card:hover {
  border-color: var(--pitch);
}
.crew-name {
  font: 800 1.3rem/1.1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.crew-card .small {
  margin-left: auto;
}
.crew-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
/* Badge du crew de la journée : jaune projecteur, comme le podium */
.badge-day {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--gold);
  color: var(--gold-ink);
  font: 800 0.85rem/1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.55rem;
  border-radius: 0.3rem;
  white-space: nowrap;
}
.badge-day::before {
  content: "★";
}
.create-crew {
  margin-top: 1.4rem;
}
.copy-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}
.copy-row input {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
}
.members {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.members li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 0.8rem;
}
.members li .inline-form {
  margin-left: auto;
}
.tag {
  font: 600 0.7rem var(--f-body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--pitch-soft);
  color: var(--pitch);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
}
.leave {
  margin-top: 2rem;
}

/* --- Téléphone : barre d'onglets en bas, bandeau réduit ------------------------------- */
@media (max-width: 47.99rem) {
  .nav {
    display: none;
  }
  body.with-tabbar main {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }
  body.with-tabbar.coupon-filled main {
    padding-bottom: calc(10rem + env(safe-area-inset-bottom, 0px));
  }
  /* le coupon se pose au-dessus de la barre d'onglets */
  body.with-tabbar .coupon {
    bottom: calc(3.55rem + env(safe-area-inset-bottom, 0px));
  }
}
@media (min-width: 48rem) {
  .tabbar {
    display: none;
  }
}
@media (max-width: 30rem) {
  h1 {
    font-size: 1.7rem;
  }
  .brand {
    width: 9.5rem;
  }
  .hide-sm {
    display: none;
  }
  .event {
    padding: 0.6rem 0.7rem 0.75rem;
    gap: 0.6rem;
  }
  .event-main {
    gap: 0.5rem;
  }
  .event-side {
    font-size: 0.92rem;
  }
  .event-side .crest {
    width: 2.4rem;
    height: 2.4rem;
  }
  .event-odds {
    gap: 0.4rem;
  }
  .odd {
    min-height: 2.75rem;
  }
  .odd b {
    font-size: 0.92rem;
    letter-spacing: -0.02em;
  }
  .band-inner {
    gap: 0.5rem;
  }
  .player-name {
    display: none;
  }
  .avatar {
    --av-size: 2.2rem;
  }
  .who {
    padding-inline: 0.45rem;
  }
  .ticket-legs li {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .ticket-legs .leg-pick {
    grid-column: 1;
    grid-row: 2;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .odd,
  .chip,
  .league,
  .btn {
    transition:
      background-color 0.15s,
      border-color 0.15s,
      color 0.15s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .band {
    transition: none;
  }
}
