/* ==========================================================================
   Le Conteur — site vitrine
   Monde visuel hérité de DESIGN.md (« Le chevalet du conteur »).
   Page engagée en Nuit d'Ardoise : la page EST un tableau de marque.
   ========================================================================== */

@font-face {
  font-family: 'Bebas Neue';
  src: url('fonts/bebas-neue-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Roboto';
  src: url('fonts/roboto-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

/* --- Tokens ---------------------------------------------------------------
   Valeurs reprises telles quelles de DESIGN.md (variante sombre).
   Aucune couleur n'est inventée ici.                                        */
:root {
  color-scheme: dark;

  --ground: #061226;          /* Nuit d'Ardoise */
  --surface: #0f2347;
  --surface-2: #0b1b39;
  --ink: #ffffff;
  --muted: #93a6c9;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);

  --accent: #4f7ce8;          /* Bleu Chevalet, variante sombre */
  --accent-press: #6f95ee;
  --accent-ink: #ffffff;
  --live: #e62249;            /* Braise — le direct, et rien d'autre */
  --live-ink: #ffffff;
  --energy: #f7aa12;          /* Or Terrain */
  --energy-ink: #1a1300;
  --win: #22c55e;
  --fault: #ef4444;
  --craie: #f3eee2;

  --display: 'Bebas Neue', 'Haettenschweiler', 'Arial Narrow', sans-serif;
  --body: 'Roboto', system-ui, -apple-system, sans-serif;

  --rail: 44px;               /* colonne « heure » du tableau */
  --gutter: 16px;
  --maxw: 1080px;

  --r-sm: 11px;
  --r-md: 14px;
  --r-lg: 16px;
  --r-xl: 18px;

  --shadow-board: 0 12px 28px -20px rgba(0, 0, 0, 0.45);
  --shadow-cta: 0 14px 30px -12px rgba(79, 124, 232, 0.5);
  --shadow-tile: 0 2px 6px rgba(0, 0, 0, 0.13);
}

@media (min-width: 860px) {
  :root {
    --rail: 132px;
    --gutter: 32px;
  }
}

/* --- Reset et surfaces du navigateur -------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

:where(a, button, input, summary):focus-visible {
  outline: 3px solid var(--energy);
  outline-offset: 3px;
  border-radius: 4px;
}

@supports (scrollbar-color: red blue) {
  html {
    scrollbar-color: #1d365f var(--ground);
    scrollbar-width: thin;
  }
}

img { max-width: 100%; display: block; }

h1, h2, h3, p, dl, dd, figure, table { margin: 0; }

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Typographie ---------------------------------------------------------- */
.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 0.92;
}

h1 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.5rem, 9.6vw, 5.75rem);
  line-height: 0.88;
  letter-spacing: 0.015em;
  text-wrap: balance;
}

h2 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.9rem, 5.4vw, 2.9rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

h3 {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

p { max-width: 64ch; }

.lead {
  font-size: clamp(1.0625rem, 2.6vw, 1.3125rem);
  line-height: 1.5;
  color: var(--muted);
}

.muted { color: var(--muted); }

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* --- Mise en page : le tableau -------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.masthead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 6px;
}

.masthead img.mark { width: 40px; height: 40px; }
.masthead img.word { width: 118px; height: auto; }

.masthead .spacer { flex: 1; }

.masthead .top-link {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}
.masthead .top-link:hover { color: var(--ink); border-color: var(--accent); }

/* Une rangée du tableau : colonne « heure » fixe + contenu. */
.row {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.row__time {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--muted);
  hyphens: none;
  overflow-wrap: normal;
  padding: 34px 12px 0 0;
  align-self: start;
  height: fit-content;
}

@media (min-width: 860px) {
  .row__time {
    font-size: 1.25rem;
    padding-top: 46px;
    position: sticky;
    top: 18px;
  }
}

.row__body {
  border-left: 1px solid var(--line);
  padding: 32px 0 46px 12px;
  min-width: 0;
}

@media (min-width: 860px) {
  .row__body { padding: 44px 0 66px 40px; }
}

.row__body > * + * { margin-top: 18px; }
.row__body > h2 + p { margin-top: 14px; }

.stack-tight > * + * { margin-top: 10px; }

/* --- Héros ---------------------------------------------------------------- */
.hero {
  padding: 4px 0 18px;
}

.hero__board { margin-bottom: 20px; }

.hero__title-block { margin-top: 16px; }

.hero h1 + p { margin-top: 14px; }

/* Au-delà de 1000 px, le tableau et l'appel à l'action tiennent côte à côte :
   le bouton cesse de tomber sous la ligne de flottaison sur un écran de 900. */
@media (min-width: 1000px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    grid-template-areas:
      'board title'
      'code  title';
    grid-template-rows: auto 1fr;
    gap: 28px 44px;
    align-items: start;
    padding-top: 10px;
  }

  .hero__board { grid-area: board; margin-bottom: 0; }
  .hero__title-block { grid-area: title; margin-top: 0; }

  /* Le champ « j'ai un code » passe sous le tableau : un match en direct
     appelle la porte qui mène à un match en direct. */
  .hero .code-form { grid-area: code; margin-top: 0; }
}

/* --- Le tableau de marque (objet signature) -------------------------------- */
.board {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-board);
  padding: 14px 14px 16px;
  container-type: inline-size;
}

@media (min-width: 620px) {
  .board { padding: 22px 26px 24px; }
}

.board__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.board__meta {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--live);
  color: var(--live-ink);
  border-radius: 999px;
  padding: 6px 12px 6px 10px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge-live .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.6); }
}

.board__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 10px;
}

.team { min-width: 0; }
.team--away { text-align: right; }

.team__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
}

.team--away .team__name { justify-content: flex-end; }

.chip-color {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex: none;
}

.team__sets {
  font-family: var(--display);
  font-size: clamp(2.5rem, 11cqi, 3.5rem);
  line-height: 0.85;
  margin-top: 4px;
  color: var(--ink);
}

.board__sep {
  font-family: var(--display);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-bottom: 12px;
  text-align: center;
  text-transform: uppercase;
}

/* La cellule de score : craie sur ardoise, comme les chiffres du chevalet. */
.score-cell {
  margin-top: 12px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 10px 14px 12px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(10px, 4cqi, 26px);
  color: var(--craie);
  font-family: var(--display);
  line-height: 0.82;
  font-size: clamp(3.5rem, 19cqi, 6rem);
}

.score-cell .dash {
  font-size: 0.55em;
  color: var(--energy);
  transform: translateY(-0.18em);
}

.score-digits { display: inline-block; }

.board__sets-detail {
  margin-top: 10px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Le moment de mouvement de la page : le score qui monte à l'arrivée. */
.score-cell.is-bumping .score-digits--home { animation: bump 260ms ease-out; }

@keyframes bump {
  0% { transform: scale(1); }
  45% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.flap {
  display: inline-grid;
  overflow: hidden;
  vertical-align: baseline;
}

.flap > span {
  grid-area: 1 / 1;
}

.flap__in { opacity: 0; }

.flap.is-flipping .flap__out {
  animation: flap-out 260ms cubic-bezier(0.2, 0, 0, 1) forwards;
}

.flap.is-flipping .flap__in {
  animation: flap-in 260ms cubic-bezier(0.2, 0, 0, 1) forwards;
}

@keyframes flap-out {
  to { transform: translateY(-100%); opacity: 0; }
}

@keyframes flap-in {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --- Actions --------------------------------------------------------------- */
.cta-row {
  scroll-margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 26px;
  border-radius: var(--r-xl);
  border: 0;
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease-out, transform 140ms ease-out;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-cta);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px -12px rgba(79, 124, 232, 0.62);
}

.btn--primary:active {
  background: var(--accent-press);
  transform: translateY(1px);
  box-shadow: var(--shadow-cta);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn--ghost:hover { border-color: var(--accent); color: var(--accent-press); }

.btn svg { width: 22px; height: 22px; flex: none; }

.store-note {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.store-note a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.store-note a:hover { color: var(--ink); }

/* --- Le champ « j'ai un code » --------------------------------------------- */
.code-form {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  max-width: 460px;
}

.code-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.code-form__line { display: flex; gap: 10px; }

.code-form input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  caret-color: var(--accent);
  font-family: var(--display);
  font-size: 1.375rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code-form input::placeholder {
  color: #7f92b5;
  letter-spacing: 0.08em;
}

.code-form input:focus { border-color: var(--accent); outline-offset: 1px; }

.code-form button {
  min-height: 52px;
  padding: 0 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.code-form button:hover { border-color: var(--accent); color: var(--accent-press); }

.code-form .hint { margin-top: 10px; font-size: 0.8125rem; color: var(--muted); }
.code-form .hint[data-state='error'] { color: #ff8da4; }

/* --- Recréations de l'interface -------------------------------------------- */
.demo {
  max-width: 620px;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 16px;
  box-shadow: var(--shadow-board);
}

/* Les trois gestes de la création. */
.setup { display: grid; gap: 18px; }

@media (min-width: 640px) {
  .setup { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.chip {
  border-radius: var(--r-md);
  padding: 10px 16px;
  font-family: var(--display);
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  background: var(--surface-2);
  color: var(--ink);
}

.chip[aria-selected='true'] { background: var(--accent); color: var(--accent-ink); }

.field {
  margin-top: 10px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 11px 14px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.field + .field { margin-top: 8px; }

.swatches { display: flex; gap: 10px; margin-top: 10px; }

.swatch {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
}

.swatch[aria-selected='true'] {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink);
}

/* Le cockpit : deux colonnes miroir, une médiane, l'icône au centre. */
.cockpit {
  display: grid;
  grid-template-columns: 1fr 34px 1fr;
  gap: 8px 0;
  align-items: center;
}

.cockpit__head {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 4px;
}

.cockpit__head--away { text-align: right; }

.tile {
  border-radius: var(--r-lg);
  padding: 12px 10px;
  text-align: center;
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  line-height: 1;
  box-shadow: var(--shadow-tile);
}

/* DESIGN.md donne `gesture-positive.textColor = on-accent` (blanc) ; sur le
   Vert Point, le blanc tombe à 2,3:1. L'encre vert sombre du token `winInk`
   donne 6,5:1. Écart assumé, et local à cette page. */
.tile--win { background: var(--win); color: #052e16; }
.tile--fault { background: var(--fault); color: #ffffff; }

.tile small {
  display: block;
  font-family: var(--body);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  opacity: 0.72;
  margin-top: 4px;
}

.cockpit__median {
  display: grid;
  place-items: center;
  color: var(--muted);
  align-self: stretch;
  position: relative;
}

.cockpit__median::before {
  content: '';
  position: absolute;
  inset: -4px auto -4px 50%;
  width: 1px;
  background: var(--line);
}

.cockpit__median svg {
  width: 22px;
  height: 22px;
  position: relative;
  background: var(--surface);
  padding: 2px 0;
}

/* Trois artefacts de diffusion : le code, la notification, le widget. */
.relay {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .relay { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .relay > .relay__code { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 16px; }
}

.relay__code {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 16px 18px;
}

.pill-code {
  font-family: var(--display);
  font-size: clamp(1.5rem, 6vw, 2.125rem);
  letter-spacing: 0.1em;
  color: var(--craie);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 6px 18px;
  white-space: nowrap;
}

.notif {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.notif img { width: 28px; height: 28px; flex: none; }

.notif__title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.notif__body { font-size: 0.9375rem; font-weight: 700; margin-top: 2px; }

.widget {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 14px 16px;
}

.widget__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.widget__score {
  font-family: var(--display);
  font-size: 2rem;
  line-height: 0.85;
  color: var(--craie);
}

.widget__stamp {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.widget__stamp .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
}

/* La carte du match : un cadre de marque, une carte de contenu dedans. */
.matchcard-wrap {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.matchcard {
  width: 268px;
  flex: none;
  aspect-ratio: 9 / 16;
  background: #244cb2;
  border-radius: var(--r-md);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.5);
}

.matchcard__word {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.14em;
  color: #ffffff;
  text-transform: uppercase;
}

.matchcard__baseline {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

.matchcard__inner {
  background: #ffffff;
  color: #11151c;
  border-radius: var(--r-md);
  padding: 14px 14px 12px;
  width: 100%;
}

.matchcard__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.625rem;
  font-weight: 700;
  color: #61697b;
}

.matchcard__state {
  background: #eef1f6;
  border-radius: 999px;
  padding: 3px 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.5625rem;
  font-weight: 800;
}

.matchcard__score {
  font-family: var(--display);
  font-size: 2.875rem;
  line-height: 0.85;
  text-align: center;
  margin: 10px 0 2px;
  color: #244cb2;
}

.matchcard__score .dash { color: #61697b; }

.matchcard__names {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  font-weight: 700;
  gap: 8px;
}

.matchcard__stats {
  margin-top: 12px;
  border-top: 1px solid #e3e7ee;
  padding-top: 8px;
  font-size: 0.6875rem;
}

.matchcard__stats div {
  display: grid;
  grid-template-columns: 3ch 1fr 3ch;
  gap: 8px;
  padding: 2px 0;
  color: #61697b;
  font-weight: 500;
}

.matchcard__stats b { color: #244cb2; font-weight: 700; white-space: nowrap; }
.matchcard__stats i {
  color: #c62828;
  font-style: normal;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}
.matchcard__stats span { text-align: center; }

/* --- Le tableau des créneaux (les groupes) --------------------------------- */
.slots {
  width: 100%;
  min-width: 340px;      /* sans minimum, la table se comprime au lieu de
                            défiler, et .table-scroll ne sert à rien. 340 est
                            le point où les quatre colonnes tiennent encore
                            au repos sur un téléphone de 390, colonne ÉTAT
                            comprise : elle porte « EN DIRECT », qui est tout
                            le propos de la section. */
  border-collapse: collapse;
  font-size: 0.875rem;
}

.slots th {
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 10px 10px 0;
  border-bottom: 1px solid var(--line);
}

.slots td {
  padding: 12px 10px 12px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.slots .t-time {
  font-family: var(--display);
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  color: var(--craie);
  white-space: nowrap;
}

.slots .t-match { font-weight: 700; min-width: 0; }
.slots .t-score { font-family: var(--display); font-size: 1.125rem; color: var(--craie); white-space: nowrap; }

.slots tr[data-state='done'] .t-time,
.slots tr[data-state='done'] .t-score { color: var(--muted); }
.slots tr[data-state='done'] .t-match { font-weight: 500; color: var(--muted); }
.slots tr[data-state='soon'] { color: var(--muted); }
.slots tr[data-state='soon'] .t-time { color: var(--muted); }

.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.state--live { color: var(--live); }
.state--live .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 1.1s ease-in-out infinite;
}
.state--done { color: var(--muted); }
.state--soon { color: var(--muted); opacity: 0.75; }

.table-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

/* Ombres de bord, seulement là où le défilement peut arriver : sous 600 px.
   Au-dessus, la table tient au repos et les dégradés ne feraient que salir un
   bord qui n'a rien à annoncer. */
@media (max-width: 599px) {
  .table-scroll {
    background:
      linear-gradient(to right, var(--ground), rgba(6, 18, 38, 0)) left center /
        24px 100% no-repeat local,
      linear-gradient(to left, var(--ground), rgba(6, 18, 38, 0)) right center /
        24px 100% no-repeat local,
      linear-gradient(to right, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0))
        left center / 10px 100% no-repeat scroll,
      linear-gradient(to left, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0))
        right center / 10px 100% no-repeat scroll;
  }
}

/* Sur téléphone, les blocs lourds débordent le rail : sans ça, ils lisent sur
   272 px au lieu de 326. */
@media (max-width: 599px) {
  .table-scroll,
  .demo,
  .matchcard-wrap {
    margin-left: calc(-1 * (var(--rail) + 12px));
    width: calc(100% + var(--rail) + 12px);
  }
}

/* Le QR : sur un ordinateur, « installer » ne s'exécute pas sur l'appareil
   qui l'affiche. Le code ouvre cette page sur le téléphone. Masqué sur
   téléphone, où il n'a aucun sens. */
.qr { display: none; }

@media (min-width: 900px) {
  .qr {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 26px;
  }

  .qr img {
    width: 132px;
    height: 132px;
    border-radius: var(--r-md);
    flex: none;
  }

  .qr p { font-size: 0.875rem; color: var(--muted); max-width: 30ch; }
}

/* --- Cockpit : les états que la vraie table de marque affiche -------------- */
.tile--off {
  background: var(--surface-2);
  color: #7f92b5;
  box-shadow: none;
}

.cockpit-hint {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.cockpit-bar {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cockpit-bar span {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent-press);
}

.cockpit-bar svg { width: 18px; height: 18px; }

.last-action {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.last-action b {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.last-action .dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--energy);
  flex: none;
}

.last-action em { font-style: normal; color: var(--ink); font-weight: 700; }

/* --- Le Fil : la colonne vertébrale, telle que l'app la dessine ----------
   Ligne centrale continue, nœuds typés posés dessus, cartes alternées à
   gauche ou à droite selon l'équipe, pastilles de section pleine largeur.
   C'est `SpineTimeline` — le langage visuel du produit, pas une liste. */
.spine { position: relative; padding: 2px 0; }

.spine::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--line);
}

.spine__pill {
  position: relative;
  text-align: center;
  margin: 10px 0;
}

.spine__pill span {
  display: inline-block;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 5px 14px;
  font-family: var(--display);
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--energy);
}

.spine__row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 30px 1fr;
  align-items: center;
  margin: 8px 0;
}

.spine__card {
  /* La rangée est explicite des DEUX côtés : sans ça, une carte posée en
     colonne 3 pousse le nœud (colonne 2) à la rangée suivante — le placement
     automatique d'une grille ne revient jamais en arrière. */
  grid-row: 1;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 9px 11px;
  min-width: 0;
}

.spine__row--home .spine__card { grid-column: 1; text-align: right; }
.spine__row--away .spine__card { grid-column: 3; }

/* Une carte accentuée : ce qui compte (une série) se distingue de ce qui se
   contente d'exister. */
.spine__card--accent {
  background: rgba(79, 124, 232, 0.14);
  border-color: rgba(79, 124, 232, 0.45);
}

.spine__card--accent-away {
  background: rgba(198, 40, 40, 0.16);
  border-color: rgba(198, 40, 40, 0.5);
}

.spine__title {
  font-family: var(--display);
  font-size: 1.0625rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}

.spine__sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1px;
}

.spine__chip {
  display: inline-block;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 2px 9px;
  font-family: var(--display);
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

/* Chaque nombre porte la couleur de son équipe, et celui qui vient de bouger
   est appuyé : sans ça, « 18-15 » ne dit ni qui est qui, ni qui a marqué. */
.spine__chip b { font-weight: 400; color: var(--muted); }
.spine__chip b.is-home { color: #7fa2f0; }
.spine__chip b.is-away { color: #f08b8b; }
.spine__chip b.is-strong { color: var(--craie); }

.spine__node {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--muted);
}

.spine__node svg { width: 13px; height: 13px; }

.spine__node--home { border-color: #4f7ce8; color: #4f7ce8; }
.spine__node--away { border-color: #c62828; color: #e06a6a; }

.spine__node--filled.spine__node--home { background: #4f7ce8; color: #fff; }
.spine__node--filled.spine__node--away { background: #c62828; color: #fff; }

/* --- Trois sports, trois vrais tableaux/* --- Trois sports, trois vrais tableaux ----------------------------------- */
.boards {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 820px) {
  .boards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.mini {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 15px 16px 16px;
  box-shadow: var(--shadow-board);
  display: flex;
  flex-direction: column;
}

.mini__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mini__sport {
  font-family: var(--display);
  font-size: 1.375rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mini__clock {
  font-family: var(--display);
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  color: var(--energy);
  text-transform: uppercase;
  white-space: nowrap;
}

.mini__teams {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.mini__cell {
  margin-top: 8px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 8px 12px 10px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  color: var(--craie);
  font-family: var(--display);
  font-size: 2.5rem;
  line-height: 0.85;
}

.mini__cell .dash { font-size: 0.5em; color: var(--energy); transform: translateY(-0.2em); }

.mini__vocab {
  margin-top: 11px;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}

/* --- Les réglages du match ------------------------------------------------ */
.format {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.format__note {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* --- FAQ et pied ----------------------------------------------------------- */
.faq { margin-top: 12px; }

.row__body > .cta-row + .faq { margin-top: 34px; }

.faq dt {
  font-weight: 800;
  font-size: 0.9375rem;
  margin-top: 18px;
}

.faq dd { margin: 6px 0 0; color: var(--muted); font-size: 0.9375rem; max-width: 62ch; }

.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding: 28px 0 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

.site-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.site-foot a:hover { color: var(--ink); }

.site-foot img { width: 48px; height: 48px; }

/* --- Reduce motion --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .badge-live .dot,
  .state--live .dot { opacity: 1; transform: none; }
}
