/* Page d'attente Scoringames : mobile d'abord, desktop à partir de 960px. Tokens dans tokens.css. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Cadre commun à toutes les pages publiques (même valeurs dans landing.css) : même largeur, mêmes marges latérales */
:root { --site-largeur: 1160px; --site-gouttiere: 20px; }
@media (min-width: 960px) { :root { --site-gouttiere: 40px; } }
/* La barre de défilement ne doit pas décaler le contenu entre une page courte et une page longue */
html { scrollbar-gutter: stable; }
body.landing { margin: 0; background: var(--fond); color: var(--encre); font-family: var(--font-texte); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
.landing button { font: inherit; cursor: pointer; }
.landing a { color: var(--rose); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Éléments partagés ---------- */
.marque { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--encre) !important; text-decoration: none; }
.marque img { width: 36px; height: 36px; border-radius: 8px; }
.titre { font-family: var(--font-display); font-weight: 800; letter-spacing: -1.5px; line-height: 0.95; margin: 0; position: relative; }
.titre .relance { display: block; color: var(--score); line-height: 1; }
.doux { color: var(--encre-douce); }
.chiffre { font-family: var(--font-chiffres); font-weight: 700; color: var(--score); }
.bouton { font-weight: 600; font-size: 17px; height: 52px; padding: 0 22px; border: 0; border-radius: var(--radius-sm); background: var(--accent); color: var(--nuit) !important; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; white-space: nowrap; }
.bouton:focus-visible, .champ:focus-visible { outline: 3px solid var(--encre); outline-offset: 2px; }
.bouton.fantome { background: transparent; color: var(--encre) !important; border: 2px solid oklch(0.45 0.02 285); }
.bouton[disabled] { opacity: .6; cursor: wait; }
.champ { font: inherit; font-size: 16px; height: 52px; padding: 0 16px; border-radius: var(--radius-sm); border: 2px solid oklch(0.35 0.02 285); background: var(--fond); color: var(--encre); min-width: 0; }
.champ::placeholder { color: oklch(0.6 0.02 285); }
.champ:focus { outline: none; border-color: var(--rose); }
.pastille { position: absolute; border-radius: 50%; }
.de { position: absolute; border-radius: var(--radius-de); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); }
.de i { width: 58%; height: 58%; border-radius: 50%; background: var(--nuit); place-self: center; visibility: hidden; }
.de i.p { visibility: visible; }

/* ---------- Inscription ---------- */
.insc { display: flex; flex-direction: column; gap: 10px; position: relative; }
.insc .rang { display: flex; flex-wrap: wrap; gap: 10px; }
.insc .rang .champ { flex: 1 1 220px; }
.insc .rang .bouton { flex: 1 0 auto; }
.insc small { font-size: 13px; color: var(--encre-douce); line-height: 18px; }
.insc small.erreur { color: var(--rose); font-weight: 600; }
.insc [data-etape] { display: none; flex-direction: column; gap: 12px; margin: 0; }
.insc[data-en="1"] [data-etape="1"], .insc[data-en="2"] [data-etape="2"], .insc[data-en="3"] [data-etape="3"] { display: flex; }
.insc .ok { font-weight: 600; color: var(--vert); }
.insc .question { font-size: 16px; line-height: 23px; margin: 0; }
.pot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 52px; padding: 8px; border-radius: var(--radius-sm); border: 2px solid oklch(0.35 0.02 285); background: var(--fond); }
.tags:focus-within { border-color: var(--rose); }
.tags input { flex: 1 1 120px; border: 0; background: transparent; color: var(--encre); font: inherit; font-size: 16px; height: 32px; padding: 0 6px; min-width: 0; }
.tags input:focus { outline: none; }
.tags input::placeholder { color: oklch(0.6 0.02 285); }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 12px; border-radius: var(--radius-pill); background: var(--ambre); color: var(--nuit); font-size: 14px; font-weight: 600; border: 0; }
.tag span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: oklch(0.15 0.015 285 / .15); font-size: 13px; }
.sugg { display: flex; flex-wrap: wrap; gap: 8px; }
.sugg button { height: 34px; padding: 0 12px; border-radius: var(--radius-pill); border: 2px solid oklch(0.35 0.02 285); background: transparent; color: var(--encre); font-size: 14px; font-weight: 500; }
.sugg button:hover { border-color: var(--ambre); }
.sugg-titre { font-size: 13px; color: var(--encre-douce); }

/* ---------- Feuille de score animée ---------- */
.feuille { background: var(--surface); border-radius: 20px; padding: 18px; position: relative; }
.feuille-tete { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.feuille-tete span:first-child { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.feuille-tete span:last-child { font-size: 12px; color: var(--encre-douce); }
.ligne, .total { display: grid; grid-template-columns: 1fr 56px 56px; gap: 8px; align-items: center; }
.ligne { padding: 7px 0; border-bottom: 1px dashed oklch(0.32 0.02 285); font-size: 14px; }
.ligne.entete { font-size: 12px; color: var(--encre-douce); border: 0; padding-top: 0; }
.ligne.entete span:not(:first-child), .ligne .v { text-align: right; }
.ligne .v { font-family: var(--font-chiffres); font-weight: 700; transition: opacity .25s; }
.feuille.anime .ligne .v { opacity: 0; }
.feuille.anime .ligne .v.on { opacity: 1; }
.total { padding-top: 12px; align-items: baseline; }
.total span:first-child { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.total .chiffre { font-size: 26px; text-align: right; }
.gagnant { position: absolute; top: -12px; right: 14px; background: var(--ambre); color: var(--nuit); font-weight: 600; font-size: 13px; padding: 5px 12px; border-radius: var(--radius-pill); transform: rotate(4deg); transition: opacity .3s, transform .3s; }
.feuille.anime .gagnant { opacity: 0; transform: rotate(4deg) scale(.8); }
.feuille.anime .gagnant.on { opacity: 1; transform: rotate(4deg) scale(1); }

/* ---------- Démo Pickomino ---------- */
.pk { background: var(--surface); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.pk-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pk-tete strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1; }
.pk-tete span { font-size: 13px; color: var(--encre-douce); }
.pk-tete button { height: 40px; padding: 0 14px; border-radius: var(--radius-sm); border: 2px solid oklch(0.45 0.02 285); background: transparent; color: var(--encre); font-size: 14px; font-weight: 600; }
.pk-joueurs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pk-joueurs button { height: 50px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); color: var(--nuit); display: flex; justify-content: space-between; align-items: center; gap: 6px; outline: 3px solid transparent; outline-offset: 3px; }
.pk-joueurs button[aria-pressed="true"] { outline-color: var(--encre); }
.pk-joueurs b { font-weight: 600; font-size: 15px; }
.pk-joueurs em { font-style: normal; font-family: var(--font-chiffres); font-weight: 700; font-size: 18px; }
.pk-aide { margin: 0; font-size: 14px; color: var(--encre-douce); line-height: 20px; }
.pk-aide strong { color: var(--encre); }
.pk-tuiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pk-tuiles button { position: relative; height: 66px; border-radius: var(--radius-sm); border: 2px solid oklch(0.45 0.02 285); background: var(--fond); color: var(--encre); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 0; }
.pk-tuiles .n { font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1; }
.pk-tuiles .vers { display: flex; gap: 3px; }
.pk-tuiles .vers i { width: 11px; height: 5px; border-radius: 9999px; background: currentColor; }
.pk-tuiles .qui { position: absolute; top: 4px; right: 6px; font-size: 11px; font-weight: 600; }
.pk-verdict { border-radius: 14px; border: 2px solid var(--ambre); padding: 12px 14px; font-size: 14px; line-height: 20px; }
.pk-verdict b { display: block; font-family: var(--font-display); font-size: 20px; margin-bottom: 2px; }
.pk-verdict .chiffre { font-size: 16px; }

/* ---------- Mise en page mobile ---------- */
.entete { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 20px var(--site-gouttiere) 0; }
.entete .lien { display: none; }
.entete-liens { display: flex; align-items: center; gap: 20px; }
.entete .lien-jeux { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: var(--radius-pill); background: var(--surface); color: var(--encre); font-weight: 600; text-decoration: none; }
.entete .lien-jeux:hover { background: oklch(0.27 0.02 285); }
.entete .lien-jeux:focus-visible { outline: 3px solid var(--encre); outline-offset: 2px; }
main { display: flex; flex-direction: column; gap: 56px; padding: 0 var(--site-gouttiere); }
/* Les dés décoratifs débordent à droite : on les coupe ici, car l'overflow du body ne suffit pas sur mobile (la page s'élargit) */
main { overflow-x: clip; }
.hero { position: relative; display: flex; flex-direction: column; gap: 32px; }
.hero-texte { display: flex; flex-direction: column; gap: 22px; }
.des-mobile { position: absolute; top: -56px; right: -20px; width: 220px; height: 220px; }
.des-desktop, .seul-desktop { display: none; }
.hero .titre { font-size: 58px; letter-spacing: -2.5px; margin-top: 140px; }
.hero .titre .relance { font-size: 34px; letter-spacing: -1px; margin-top: 10px; }
.chapo { margin: 0; font-size: 17px; line-height: 25px; }
.section > .titre, .demo .titre { font-size: 32px; margin-bottom: 20px; }
.etapes { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.etapes li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.etapes b { width: 44px; height: 44px; border-radius: var(--radius-de); display: grid; place-items: center; font-family: var(--font-chiffres); font-size: 18px; color: var(--nuit); }
.etapes strong { display: block; font-weight: 600; font-size: 17px; margin-bottom: 2px; }
.etapes p { margin: 0; font-size: 15px; line-height: 21px; color: var(--encre-douce); }
.demo { display: flex; flex-direction: column; gap: 20px; }
.demo p { margin: 0; font-size: 16px; line-height: 23px; }
.regles { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.regles li { display: flex; gap: 12px; align-items: baseline; color: var(--encre-douce); }
.regles li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ambre); flex-shrink: 0; transform: translateY(-1px); }
.modeles > p { margin: 0 0 24px; font-size: 16px; line-height: 23px; }
.videos { list-style: none; margin: 0 -20px; padding: 0 20px 8px; display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px; scrollbar-width: none; }
.videos::-webkit-scrollbar { display: none; }
.videos li { scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ecran { width: 100%; aspect-ratio: 9 / 16; border-radius: 28px; padding: 6px; background: var(--surface); margin-bottom: 8px; }
.ecran video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 22px; background: var(--fond); }
.niveau { font-size: 12px; font-weight: 600; color: var(--nuit); padding: 3px 10px; border-radius: var(--radius-pill); }
.videos strong { font-family: var(--font-display); font-size: 20px; }
.videos p { margin: 0; font-size: 15px; line-height: 21px; color: var(--encre-douce); }
.ludo { margin-top: -24px; }
.ludo-bloc { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px 20px; border-radius: 20px; background: var(--surface); color: var(--encre) !important; text-decoration: none; }
.ludo-bloc:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }
.ludo-pile { position: relative; height: 84px; width: calc(84px + (var(--n, 5) - 1) * 34px); }
.ludo-pile > * { position: absolute; top: 0; left: calc(var(--i) * 34px); width: 84px; height: 84px; border-radius: var(--radius-sm); object-fit: cover; outline: 3px solid var(--surface); transform: rotate(calc((var(--i) - 2) * 4deg)); transition: transform .25s; }
.ludo-bloc:hover .ludo-pile > * { transform: rotate(calc((var(--i) - 2) * 7deg)) translateY(-4px); }
.ludo-texte strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.5px; line-height: 1.05; }
.ludo-texte .chiffre { font-size: 1.1em; }
.ludo-texte p { margin: 8px 0 0; font-size: 15px; line-height: 21px; }
.ludo-bloc .bouton { align-self: stretch; }
.final { scroll-margin-top: 20px; }
.final-bloc { background: var(--surface); border-radius: 20px; padding: 24px 20px; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 16px; }
.final-bloc .pastille { display: none; }
.final .titre { font-size: 32px; }
.final .tags, .final .champ { background: var(--fond); }

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
    .entete { max-width: var(--site-largeur); margin: 0 auto; padding: 28px var(--site-gouttiere); }
    .entete .lien { display: inline; color: var(--encre-douce); text-decoration: none; font-weight: 500; }
    main { max-width: var(--site-largeur); margin: 0 auto; padding: 0 var(--site-gouttiere); gap: 110px; }
    .hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 72px; align-items: center; padding-top: 72px; }
    .des-mobile, .seul-mobile { display: none; }
    .des-desktop, .seul-desktop { display: block; }
    .hero-texte { gap: 0; }
    .hero .titre { font-size: clamp(80px, 8vw, 104px); letter-spacing: -4px; margin-top: 0; }
    .hero .titre .relance { font-size: clamp(40px, 4vw, 52px); letter-spacing: -1.5px; margin-top: 14px; }
    .hero .chapo { font-size: 20px; line-height: 30px; margin: 28px 0 32px; max-width: 36ch; }
    .hero .insc { max-width: 540px; }
    .scene { position: relative; padding: 30px 30px 30px 0; }
    .scene .de.devant { z-index: 3; }
    .scene .feuille { padding: 26px; transform: rotate(1.5deg); position: relative; z-index: 2; }
    .scene .ligne { font-size: 15px; padding: 9px 0; }
    .scene .ligne, .scene .total { grid-template-columns: 1fr 70px 70px; }
    .scene .total .chiffre { font-size: 32px; }
    .section > .titre { font-size: 52px; margin-bottom: 40px; }
    .etapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
    .etapes li { display: block; background: var(--surface); border-radius: 20px; padding: 28px; }
    .etapes b { width: 56px; height: 56px; font-size: 22px; margin-bottom: 20px; }
    .etapes strong { font-family: var(--font-display); font-size: 24px; margin-bottom: 8px; }
    .etapes p { font-size: 16px; line-height: 24px; }
    .ludo-bloc { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 40px; padding: 32px 40px; }
    .ludo { margin-top: -60px; }
    .ludo-pile { height: 104px; width: calc(104px + (var(--n, 5) - 1) * 44px); }
    .ludo-pile > * { width: 104px; height: 104px; left: calc(var(--i) * 44px); }
    .ludo-texte strong { font-size: 34px; }
    .ludo-texte p { font-size: 16px; line-height: 24px; }
    .ludo-bloc .bouton { align-self: center; }
    .modeles > p { font-size: 18px; line-height: 28px; max-width: 52ch; margin: -16px 0 40px; }
    .videos { margin: 0; padding: 0; grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); gap: 40px; overflow: visible; }
    .ecran { margin-bottom: 12px; }
    .videos strong { font-size: 24px; }
    .videos p { font-size: 16px; line-height: 24px; }
    .demo { display: grid; grid-template-columns: 1fr 520px; gap: 72px; align-items: center; }
    .demo .titre { font-size: 52px; }
    .demo p { font-size: 18px; line-height: 28px; max-width: 40ch; }
    .regles { margin-top: 24px; gap: 10px; font-size: 16px; }
    .demo .pk { padding: 24px; gap: 16px; }
    .demo .pk-tuiles button { height: 78px; }
    .final-bloc { border-radius: var(--radius-lg); padding: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
    .final-bloc .pastille { display: block; }
    .final .titre { font-size: 64px; letter-spacing: -2.5px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
