/* site.css — écrit à la main. Aucune couleur littérale : uniquement var(--…).
 * ==========================================================================
 * Les couleurs viennent de `tokens.css` (généré depuis le thème de l'app), les
 * espacements et rayons de `site-scale.css` (décisions de mise en page).
 *
 * ⚠️ TROIS ÉCARTS ASSUMÉS PAR RAPPORT À LA MAQUETTE, tous mesurés :
 *
 *  1. **Une seule famille de police.** Manrope est VARIABLE (axe 200-800) : elle
 *     couvre 400/600/700 depuis un seul fichier de 24 Ko. Archivo aurait ajouté
 *     une seconde famille pour un contraste que la graisse et la taille donnent
 *     déjà. IBM Plex Mono ne servait qu'aux étiquettes des zones réservées —
 *     décoratif — donc mono système, 0 Ko.
 *
 *  2. **`.cta` n'écrit plus six couleurs en dur.** Elle porte la classe
 *     `.on-dark`, qui redéfinit les jetons vers la palette sombre. Mesuré :
 *     `--accent-ink` y passe de 3,39:1 (piégé) à 5,94:1.
 *
 *  3. **Les noms des jetons sont ceux du générateur**, pas ceux de la maquette :
 *     `--border` et non `--hairline`, `--accent` et non `--accent-fill`,
 *     `--r-full` et non `--r-pill`. Créer des alias aurait donné deux noms pour
 *     une valeur — et l'un des deux aurait fini par dériver.
 * ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

/* ⚠️ `overflow-x: clip` est un garde-fou, et sur la RACINE : l'overflow de <body>
   n'est pas propagé au viewport. Ce qui supprime réellement le défilement
   horizontal, c'est le dimensionnement du halo (bloc @media, plus bas). */
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-15);
  line-height: 1.5;
}

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }

/* ⚠️ Toutes les marges internes sont LOGIQUES (`margin-inline`, `inset-inline`) :
   le jour où le site passe en arabe, la mise en page se retourne sans une ligne
   de plus. Le coût est nul aujourd'hui ; le rattraper après coup ne l'est pas. */
.wrap {
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- typographie ---------- */
.t-eyebrow { font-size: var(--fs-11); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin: 0; }
.t-h1      { font-size: var(--fs-44); line-height: 1.02; letter-spacing: -.03em; font-weight: 800; margin: 0; text-wrap: pretty; }
.t-h2      { font-size: var(--fs-27); line-height: 1.14; letter-spacing: -.02em; font-weight: 700; margin: 0; text-wrap: pretty; }
.t-lead    { font-size: var(--fs-17); color: var(--text-2); margin: 0; text-wrap: pretty; }
.t-body    { font-size: var(--fs-15); color: var(--text-2); margin: 0; text-wrap: pretty; }
.t-meta    { font-size: var(--fs-13); color: var(--text-3); margin: 0; }
.t-quiet   { font-size: var(--fs-11); color: var(--text-quiet); margin: 0; }
.num       { font-size: var(--fs-13); font-weight: 800; color: var(--accent-ink); margin: 0; }

/* ---------- zones réservées ---------- */
/* À la livraison des assets : remplacer le contenu du .slot, supprimer la classe. */
.slot {
  border: 1px dashed var(--border);
  border-radius: var(--r-slot);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--text) 4%, transparent) 0 8px, transparent 8px 16px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  color: var(--text-3);
  text-align: center;
}
.slot span { color: var(--text-quiet); }
.slot--eyebrow  { height: 24px; max-width: 232px; align-items: flex-start; justify-content: center; padding-inline: 10px; border-radius: 7px; white-space: nowrap; }
.slot--badge    { flex: 1; min-width: 0; height: 52px; }
.slot--shot     { width: 280px; height: 568px; border-radius: var(--r-shot); margin-inline: auto; }
.slot--shot-sm  { width: 240px; height: 486px; border-radius: 30px; margin-inline: auto; }
.slot--publisher{ align-items: flex-start; padding: 16px 18px; font-style: normal; }

/* ---------- barre ---------- */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); padding-block: var(--gap-loose); }
.brand { font-size: var(--fs-17); font-weight: 800; letter-spacing: -.02em; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
/* 🔴 LE LOGO, AJOUTÉ LE 2026-08-30 — le site n'en portait aucun, nulle part.
   ⚠️ `alt=""` VOLONTAIREMENT VIDE : le mot « Scorro » suit immédiatement dans le même
   lien. Un `alt="Scorro"` ferait annoncer « Scorro Scorro » par un lecteur d'écran.
   L'image est décorative parce que le texte porte déjà l'information.
   ⚠️ `width`/`height` en dur dans le HTML : sans eux la ligne d'en-tête sursaute au
   chargement de l'image — le décalage de mise en page que personne ne signale mais
   que tout le monde voit. */
.brand-logo { width: 22px; height: 22px; border-radius: 5px; flex: none; }
.header-right { display: flex; align-items: center; gap: var(--gap-tight); }
.nav-desktop { display: none; }
.lang { display: flex; background: var(--surface); border-radius: var(--r-full); padding: 3px; }
.lang a { font-size: var(--fs-11); font-weight: 700; color: var(--text-3); padding: 5px 10px; border-radius: var(--r-full); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--text); color: var(--bg); font-weight: 800; }
.header-cta { font-size: var(--fs-13); font-weight: 700; color: var(--accent-ink); }

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; gap: var(--gap-loose); padding-top: var(--gutter); }
.store-row { display: flex; gap: var(--gap-tight); }
.hero-visual { position: relative; display: flex; justify-content: center; padding-top: 36px; }
.hero-visual::before {
  content: ''; position: absolute; inset-block-start: 70px; inset-inline-start: 50%;
  translate: -50% 0; width: 300px; height: 300px; border-radius: var(--r-full);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 70%);
  pointer-events: none;
}

/* ---------- sections ---------- */
section { margin-block-start: var(--section); }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.card { background: var(--surface); border-radius: var(--r-card); border: 0; }

/* ⚠️ L'ombre n'existe QU'EN CLAIR, et elle suit la préférence système comme la
   bascule explicite. En sombre, une ombre portée sur un fond presque noir ne se
   voit pas — elle ne fait qu'alourdir le rendu. */
@media (prefers-color-scheme: light) {
  .card { box-shadow: 0 1px 3px color-mix(in srgb, var(--text) 6%, transparent); }
}

/* aperçu en direct */
.match-list { padding-block: 6px; }
.match { display: grid; grid-template-columns: 1fr 66px 1fr; align-items: center; gap: var(--gap-tight); padding: 14px 18px; }
.match + .match { border-block-start: 1px solid var(--surface-2); }
.team { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: var(--fs-15); font-weight: 600; }
.team--away { justify-content: flex-end; }
.crest { width: 26px; height: 26px; border-radius: var(--r-full); background: var(--surface-2); flex: 0 0 auto; }
.score { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.score b { font-size: var(--fs-17); font-weight: 800; font-variant-numeric: tabular-nums; }
.score--pending b, .score--pending small { color: var(--text-3); }

/* ⚠️ DEUX jetons pour un seul rouge, et ce n'est pas un excès de zèle : le POINT
   est un objet graphique (seuil 3:1), la MINUTE est du texte (seuil 4,5:1). Le
   rouge du thème échoue à 2,95:1 sur le fond clair — les deux sont donc surchargés
   côté web, chacun selon son seuil. */
.live { display: flex; align-items: center; gap: 4px; font-size: var(--fs-11); font-weight: 800; color: var(--live-ink); }
.live i { width: 5px; height: 5px; border-radius: var(--r-full); background: var(--live-dot); animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }
@media (prefers-reduced-motion: reduce) { .live i { animation: none } }

/* fonctions */
.feature { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.feature h3 { font-size: var(--fs-17); font-weight: 700; margin: 0; color: var(--text); }

/* thèmes de club */
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-tight); }
.theme-chip { border-radius: var(--r-block); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.theme-chip .bars { display: flex; gap: 6px; }
.theme-chip .bars i { flex: 1; height: 24px; border-radius: 7px; }
.theme-chip b { font-size: var(--fs-13); font-weight: 700; }

/* appel à l'action — polarité inversée PAR PORTÉE (classe .on-dark, cf. tokens.css) */
.cta { background: var(--surface); border-radius: var(--r-card); padding: 30px var(--gutter) 32px; display: flex; flex-direction: column; gap: 18px; }

/* ---------- pages de contenu (mentions légales, suppression de compte) ----------
   ⚠️ On style les BALISES NUES à l'intérieur de `.prose`, au lieu de demander une
   classe par élément. Ces pages portent du texte juridique qui sera relu et corrigé
   à la main, souvent par quelqu'un qui n'écrit pas de CSS : exiger `class="t-body"`
   sur chaque paragraphe garantit qu'un paragraphe finira sans classe, et il sera le
   seul à ne pas ressembler aux autres. */
.prose { padding: 28px var(--gutter) 32px; display: flex; flex-direction: column; gap: var(--gap); }
.prose > * { margin: 0; }
.prose h1 { font-size: var(--fs-27); line-height: 1.14; letter-spacing: -.02em; font-weight: 800; }
.prose h2 { font-size: var(--fs-17); font-weight: 700; color: var(--text); margin-block-start: 10px; }
.prose p, .prose li { font-size: var(--fs-15); color: var(--text-2); }
.prose ul { padding-inline-start: 20px; display: flex; flex-direction: column; gap: 8px; }
/* ⚠️ `--accent-ink` et non `--accent` : un lien est du TEXTE. Le bleu de marque
   plafonne à 3,01:1 sur le fond clair — lisible comme aplat, pas comme texte. */
.prose a { color: var(--accent-ink); text-decoration: underline; }
@media (min-width: 900px) {
  .prose { padding: 40px; }
  .wrap--narrow { max-width: var(--content); }
}

/* pied de page */
.site-footer { margin-block-start: var(--section); padding-block-end: 32px; display: flex; flex-direction: column; gap: 22px; }
.rule { height: 1px; background: var(--surface-2); }
.legal-nav { display: flex; flex-direction: column; gap: var(--gap-tight); }
.legal-nav a { font-size: var(--fs-15); font-weight: 600; color: var(--text-2); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); }

/* ---------- >= 900px ---------- */
@media (min-width: 900px) {
  .wrap { max-width: var(--content-lg); padding-inline: 40px; }
  section { margin-block-start: var(--section-lg); }
  .site-header { padding-block: 26px; }
  .nav-desktop { display: flex; align-items: center; gap: 28px; }
  .nav-desktop a { font-size: var(--fs-15); font-weight: 600; color: var(--text-2); }
  .header-cta { background: var(--accent); color: var(--bg); font-size: var(--fs-13); font-weight: 800; border-radius: var(--r-full); padding: 10px 18px; }
  .hero-block { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: center; }
  .hero { max-width: 560px; }
  .hero-visual { padding-top: 0; }
  /* ⚠️ Le halo ne dépasse jamais sa colonne (340 px) : un pseudo-élément absolu en
     débordement crée un défilement horizontal que le clip de la racine ne rattrape
     pas partout. Ne PAS clipper `.hero-visual`, cela rognerait le dégradé. */
  .hero-visual::before { inset-block-start: 40px; width: 340px; height: 340px; }
  .store-row .slot--badge { flex: 0 0 164px; }
  .feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
  .feature { padding: 22px 20px 24px; }
  .theme-grid { grid-template-columns: repeat(4, 1fr); }
  .themes-block { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: center; }
  .legal-nav { flex-direction: row; gap: 28px; }
  .cta { padding: 40px; }
}
