:root {
  --noir: #0b0b0d; --noir2: #16161a; --noir3: #26262c; --rouge: #e21b23; --rouge-fonce: #9e1117;
  --blanc: #ffffff; --craie: #c9c9cf; --gris: #8d8d95; --bois: #c98a3e; --parquet: #3c5f8f;
  --titre: 'Anton', Impact, sans-serif; --sans: 'Figtree', system-ui, sans-serif; --main: 'Permanent Marker', cursive;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--noir); color: var(--blanc); font: 400 16px/1.5 var(--sans); min-height: 100dvh; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--rouge); outline-offset: 2px; border-radius: 4px; }
h1, h2 { font-family: var(--titre); font-weight: 400; margin: 0; line-height: 1.05; letter-spacing: .005em; }
h1:focus { outline: none; }
p { margin: 0; }
#app { min-height: 100dvh; display: flex; flex-direction: column; }
.ecran { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 760px; margin: 0 auto; padding: 16px 16px 112px; }
.intro { color: var(--craie); margin-top: 8px; max-width: 60ch; }

/* Les quarts-temps : la progression */
.bande { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.retour { background: none; border: 0; width: 44px; height: 44px; margin-left: -10px; font-size: 22px; }
.quarts { display: flex; gap: 3px; padding: 4px; background: #000; border: 2px solid var(--noir3); border-radius: 6px; }
.quart { width: 38px; height: 26px; display: grid; place-items: center; font: 400 15px var(--titre); color: var(--gris); background: var(--noir2); border-radius: 2px; }
.quart.fait { background: var(--rouge-fonce); color: #fff; }
.quart.ici { background: var(--rouge); color: #fff; }
.bande small { margin-left: auto; color: var(--craie); font-size: 13px; }

/* La barre du bas : une seule action */
.levier { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--noir) 28%); display: flex; justify-content: center; }
.levier > div { width: 100%; max-width: 520px; display: flex; gap: 10px; }
.btn { flex: 1; min-height: 54px; border: 0; border-radius: 10px; background: var(--rouge); color: #fff; font: 400 20px/1 var(--titre); letter-spacing: .02em; padding: 0 22px; box-shadow: 0 4px 0 var(--rouge-fonce); transition: transform .08s, box-shadow .08s; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--rouge-fonce); }
.btn:disabled { background: var(--noir3); color: var(--gris); box-shadow: none; cursor: not-allowed; }
.btn.second { flex: 0 1 auto; background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px var(--gris); font: 600 15px var(--sans); }

/* Accueil */
.accueil { gap: 18px; padding-top: 18px; text-align: center; align-items: center; }
.ecusson { width: min(46vw, 190px); height: auto; filter: drop-shadow(0 10px 30px #e21b2340); }
.accueil h1 { font-size: clamp(36px, 10.5vw, 58px); text-wrap: balance; }
.accueil .sous { color: var(--craie); max-width: 40ch; }
.parquet { position: relative; width: 100%; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 8; border: 2px solid var(--noir3); }
.parquet img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) brightness(.75); }
.maillots { position: absolute; inset: auto 6% 10% 6%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px 10px; }
.maillots i { aspect-ratio: 1 / 1.1; background: var(--noir); border: 2px solid var(--rouge); border-radius: 10px 10px 4px 4px; display: grid; place-items: center; color: var(--rouge); font: 400 22px var(--titre); font-style: normal; }
.maillots i.toi { background: var(--rouge); color: #fff; }
.signature { color: var(--gris); font-size: 13px; }
.signature b { color: #fff; font-weight: 600; }

/* Q1 : l'effectif */
h1.titre { font-size: clamp(32px, 8.4vw, 46px); }
.banc { position: sticky; top: 0; z-index: 3; margin: 16px -16px 0; padding: 10px 16px; background: var(--noir); display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; border-bottom: 1px solid var(--noir3); }
.maillot { aspect-ratio: 1 / 1.1; border-radius: 8px 8px 3px 3px; border: 1.5px dashed var(--noir3); background: none; padding: 0; display: grid; place-items: center; font: 400 clamp(11px, 3.4vw, 16px) var(--titre); color: var(--noir3); min-width: 0; }
.maillot.pris { background: var(--rouge); border: 0; color: #fff; }
.recherche { position: relative; margin-top: 14px; }
.cote { font-size: 13px; color: var(--craie); }
.recherche input { width: 100%; min-height: 50px; margin-top: 6px; border-radius: 10px; border: 1.5px solid var(--noir3); background: var(--noir2); padding: 0 14px; }
.recherche input::placeholder { color: var(--gris); }
.onglets { display: flex; gap: 6px; overflow-x: auto; margin: 12px -16px 0; padding: 2px 16px 6px; scrollbar-width: none; }
.onglets::-webkit-scrollbar { display: none; }
.onglet { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--noir3); background: none; font-size: 14px; color: var(--craie); }
.onglet[aria-pressed=true] { background: #fff; color: var(--noir); border-color: #fff; font-weight: 600; }
.carte { list-style: none; margin: 8px 0 0; padding: 0; }
@media (min-width: 640px) { .carte { columns: 2; column-gap: 20px; } }
.carte li { break-inside: avoid; }
.mets { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 2px; background: none; border: 0; border-bottom: 1px solid #ffffff14; text-align: left; min-height: 62px; }
.mets .nom { font: 600 17px/1.2 var(--sans); display: block; }
.mets .ligne { font-size: 13.5px; color: var(--craie); display: block; margin-top: 2px; }
.mets .coche { margin-left: auto; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--noir3); display: grid; place-items: center; font-size: 15px; color: #fff; }
.mets[aria-pressed=true] .coche { background: var(--rouge); border-color: var(--rouge); }
.mets[aria-pressed=true] .nom { color: var(--rouge); }
.mets:disabled { opacity: .45; cursor: not-allowed; }
.camee { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--noir2); box-shadow: inset 0 0 0 1.5px var(--rouge); display: grid; place-items: center; font: 400 16px var(--titre); color: #fff; }
.hors { margin-top: 10px; padding: 14px; border-radius: 10px; background: var(--noir2); }
.hors button { display: block; width: 100%; margin-top: 10px; min-height: 48px; border-radius: 10px; border: 0; background: #fff; color: var(--noir); font-weight: 600; }
.refus { color: #ff9a9e; }
.hors .choix { min-height: 52px; padding: 10px 14px; border: 1.5px solid var(--noir3); background: var(--noir); color: #fff; text-align: left; font-weight: 400; font-size: 14px; }
.hors .choix b { font-weight: 700; color: #fff; }
.hors button.discret { background: none; color: var(--craie); box-shadow: inset 0 0 0 1.5px var(--noir3); font-weight: 500; font-size: 14px; }

/* Q2 : la composition, dessinée comme un tableau de coach */
.terrain { margin-top: 16px; padding: 14px 10px 16px; border-radius: 12px; background: linear-gradient(#2d4f7c, #233e63); border: 3px solid #f2f2f2; position: relative; }
.rang { display: block; font: 400 16px var(--main); color: #fff; margin: 4px 4px 8px; }
.rang + .ligne5 + .rang { margin-top: 16px; }
.ligne5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.place { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; min-height: 86px; padding: 8px 2px; background: var(--noir); border: 2px solid transparent; border-radius: 10px 10px 4px 4px; transition: transform .15s; }
.place .camee { width: 36px; height: 36px; font-size: 14px; }
.place span.n { font: 600 11px/1.15 var(--sans); text-align: center; overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
.place.choisie { border-color: #fff; transform: scale(1.05); background: var(--rouge-fonce); }
.place.toi { justify-content: center; background: var(--rouge); font: 400 20px var(--titre); cursor: default; }
.aide { margin-top: 12px; min-height: 24px; color: var(--craie); font-size: 14px; }
h2.objet-t { font-size: 28px; margin-top: 26px; }
.objets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.objet { min-height: 88px; padding: 10px 6px; border-radius: 10px; border: 1.5px solid var(--noir3); background: none; font-size: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.objet b { font-size: 26px; font-weight: 400; line-height: 1; }
.objet[aria-pressed=true] { background: #fff; color: var(--noir); border-color: #fff; font-weight: 600; }

/* Q3 : la photo */
.viseur { position: relative; width: min(100%, 420px); aspect-ratio: 1; margin: 16px auto 0; background: #000; border: 8px solid #fff; border-radius: 6px; overflow: hidden; display: grid; place-items: center; text-align: center; }
.viseur video, .viseur img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.viseur video { transform: scaleX(-1); }
.viseur p { padding: 24px; color: var(--craie); position: relative; }
.compte { position: absolute; inset: 0; display: grid; place-items: center; font: 400 140px/1 var(--titre); color: var(--rouge); text-shadow: 0 4px 18px #000; z-index: 2; }
.ovale { position: absolute; left: 22%; right: 22%; top: 12%; bottom: 14%; border: 2px dashed #ffffffaa; border-radius: 50%; z-index: 1; pointer-events: none; }
.actions-photo { display: flex; gap: 8px; width: min(100%, 420px); margin: 12px auto 0; }
.actions-photo .btn { font-size: 17px; min-height: 50px; padding: 0 10px; }
.accord { display: flex; gap: 12px; align-items: flex-start; width: min(100%, 420px); margin: 16px auto 0; font-size: 14px; color: var(--craie); cursor: pointer; }
.accord input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--rouge); }
.erreur { width: min(100%, 420px); margin: 12px auto 0; color: #ff9a9e; font-size: 14px; }

/* La prise de vue : le chrono des 24 secondes */
.dev { justify-content: center; align-items: center; gap: 26px; text-align: center; padding-bottom: 32px; }
.chrono { width: 220px; height: 160px; background: #000; border: 6px solid var(--noir3); border-radius: 14px; display: grid; place-items: center; box-shadow: 0 0 60px #e21b2333; }
.chrono span { font: 400 118px/1 var(--titre); color: var(--rouge); text-shadow: 0 0 18px #e21b23aa; font-variant-numeric: tabular-nums; }
.dev .replique { font: 500 20px/1.3 var(--sans); min-height: 2.6em; max-width: 30ch; }
#flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 20; }
#flash.pan { animation: pan .32s ease-out; }
@keyframes pan { 0% { opacity: .95; } 100% { opacity: 0; } }

/* La révélation */
.revele { padding-top: 14px; max-width: 1040px; }
.tirage { border: 6px solid #fff; border-radius: 4px; background: #fff; box-shadow: 0 20px 50px -20px #000; animation: poser 1.2s cubic-bezier(.3,.7,.25,1) both; }
.tirage img { display: block; width: 100%; height: auto; animation: developper 3s ease-out both; }
@keyframes poser { from { transform: translateY(24px) rotate(-2deg); opacity: 0; } to { transform: rotate(-.4deg); opacity: 1; } }
@keyframes developper { 0% { filter: brightness(2.4) contrast(.3); } 100% { filter: none; } }
.legende { color: var(--gris); font-size: 13px; margin-top: 8px; text-align: center; }
.apercu { color: #fff; background: var(--rouge-fonce); font-size: 13px; font-weight: 500; padding: 8px 12px; border-radius: 6px; margin-top: 10px; }
.verdict { margin-top: 26px; max-width: 62ch; animation: arrivee .6s 1.6s both; }
@keyframes arrivee { from { opacity: 0; transform: translateY(8px); } }
.verdict .tues { color: var(--rouge); font: 400 20px var(--main); }
.verdict h1 { font-size: clamp(40px, 10vw, 64px); margin-top: 4px; }
.verdict > p { margin-top: 12px; font: 400 18px/1.5 var(--sans); }
.obs { list-style: none; padding: 0; margin: 18px 0 0; }
.obs li { padding: 12px 0; border-top: 1px solid #ffffff1c; color: #e4e4e8; }
.partage { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.partage button { flex: 1 1 150px; min-height: 48px; border-radius: 10px; background: none; border: 1.5px solid var(--gris); font-weight: 600; }
.note { margin-top: 18px; font-size: 13px; color: var(--craie); }
.dialogues { margin-top: 26px; max-width: 62ch; animation: arrivee .6s 1.4s both; }
.dialogues h2 { font-size: 30px; }
.scene { margin-top: 14px; padding: 14px 16px; background: var(--noir2); border-left: 4px solid var(--rouge); border-radius: 0 10px 10px 0; }
.scene p { font: 400 16.5px/1.45 var(--sans); }
.scene p + p { margin-top: 8px; }
.scene b { font: 400 16px var(--titre); letter-spacing: .02em; color: var(--rouge); margin-right: 6px; }
.dialogues .legende { text-align: left; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
