/* L'écran télé web : la langue de l'affiche à trois mètres. Plaques blanches à filet noir et ombre franche,
   la fonte d'affichage, rien sur la diagonale. Tailles en pixels d'une scène de 1920 × 1080 (points de l'Apple TV). */

@font-face { font-family: "Protest Strike"; src: url("/fonts/ProtestStrike-Regular.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Barlow"; font-weight: 700; src: url("/fonts/Barlow-Bold.woff2") format("woff2"); font-display: block; }

:root {
  --red: #f0141f; --navy: #06174a; --paper: #fbfaf7; --ink: #0f0f12;
  --display: "Protest Strike", "Arial Narrow", Impact, sans-serif;
  --heavy: "Barlow", "Arial Narrow", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --slant: skewX(-8deg);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--red); color: #fff; }
body { font-family: var(--heavy); cursor: none; }
body:hover { cursor: default; }
button { font: inherit; }

/* ── Le fond : l'affiche, bleu en haut, rouge en bas, la diagonale à 6°, seize rayons qui tournent ── */
.backdrop { position: fixed; inset: 0; overflow: hidden; background: var(--red); }
.backdrop__upper {
  position: absolute; inset: 0; background: var(--navy); overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(39% - 5.255vw), 0 calc(39% + 5.255vw));
}
.rays {
  position: absolute; left: 50%; top: 39%; width: 320vmax; height: 320vmax; margin: -160vmax 0 0 -160vmax;
  background: repeating-conic-gradient(from 4deg, rgba(0,0,0,.12) 0 11.25deg, transparent 0 22.5deg);
  animation: spin 60s linear infinite;
}
.backdrop__upper .rays { background: repeating-conic-gradient(from 4deg, rgba(255,255,255,.1) 0 11.25deg, transparent 0 22.5deg); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rays { animation: none; } }

.stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }
.noscript { position: fixed; inset: 40px; font: 400 60px/1.1 var(--display); }

.screen { position: absolute; inset: 0; display: flex; padding: 80px; }
.screen.is-fresh { animation: appear .25s ease-out; }
@keyframes appear { from { opacity: 0; } }
.spacer { flex: 1 1 auto; }

/* ── Morceaux ── */
.caption { margin: 0; font: 700 22px/1.2 var(--mono); letter-spacing: 3px; color: #fff; text-transform: uppercase; }
.plate {
  position: relative; background: #fff; color: var(--navy); border: 4px solid var(--ink);
  box-shadow: 12px 12px 0 var(--ink); transform: rotate(var(--tilt, 0deg)); width: fit-content; max-width: 100%;
}
.plate__text { margin: 0; font: 700 30px/1.25 var(--heavy); color: var(--navy); }
.plate__text--error { color: var(--red); }
.note { margin: 0; font: 700 26px/1.3 var(--heavy); color: rgba(255,255,255,.9); }

.title { margin: 0; display: grid; gap: 0; line-height: .92; }
.title span, .headline { font: 400 110px/1 var(--display); color: #fff; transform: var(--slant); text-transform: uppercase; white-space: nowrap; }
.headline { margin: 0; font-size: 104px; white-space: normal; }
.headline--huge { font-size: 140px; }

.slogan {
  margin: 0 0 0 6px; width: fit-content; max-width: 980px; padding: 7px 16px; background: #fff; color: var(--red);
  font: 400 34px/1.1 var(--display); text-transform: uppercase; transform: rotate(-3deg) var(--slant);
}

.tvbtn {
  display: inline-flex; align-items: center; gap: 18px; padding: 18px 34px; cursor: pointer;
  font: 400 40px/1 var(--display); text-transform: uppercase; white-space: nowrap;
  color: var(--fg); background: color-mix(in srgb, var(--bg) 86%, transparent); border: 3px solid var(--ink);
  box-shadow: 9px 9px 0 var(--ink); transition: transform .15s ease-out, border-color .15s, background .15s; outline: none;
}
.tvbtn:focus-visible, .tvbtn:focus { background: var(--bg); border: 5px solid var(--red); transform: scale(1.06); }
.tvbtn[style*="--bg:var(--red)"]:focus { border-color: #fff; }
.tvbtn:disabled { filter: saturate(.6); opacity: .7; cursor: default; }
.tvbtn:active { opacity: .85; }
.tvbtn .icon { flex: none; }

.code { display: block; font: 400 120px/1 var(--display); color: var(--red); letter-spacing: .02em; white-space: nowrap; font-variant-numeric: tabular-nums; }

.qr { width: 440px; height: 440px; transform: rotate(-2deg); box-shadow: 12px 12px 0 var(--ink); background: #fff; }
.qr svg { display: block; width: 100%; height: 100%; }

.stamp {
  display: inline-block; font: 400 26px/1 var(--display); text-transform: uppercase; white-space: nowrap;
  color: var(--red); background: #fff; padding: .12em .45em .06em;
  box-shadow: inset 0 0 0 .1em #fff, inset 0 0 0 .2em currentColor, 0 0 0 2px var(--ink), .12em .12em 0 2px var(--ink);
}
.stamp--small { font-size: 17px; color: var(--ink); transform: rotate(-3deg); }
.stamp--face { position: absolute; left: 50%; bottom: -8%; transform: translateX(-40%) rotate(-9deg); }
.stamp--face.is-fresh { animation: slam .32s cubic-bezier(.3, 1.6, .6, 1); }
@keyframes slam { from { transform: translateX(-40%) rotate(-9deg) scale(2.6); opacity: 0; } }

.tape {
  display: inline-block; justify-self: start; font: 400 22px/1 var(--display); padding: 3px 18px; background: rgba(255,255,255,.9);
  transform: rotate(var(--tilt)) var(--slant); clip-path: polygon(2% 0, 98% 0, 100% 30%, 97% 60%, 100% 100%, 1% 100%, 3% 65%, 0 35%);
}

/* ── Visages ── */
.face { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.face__square { position: relative; display: block; flex: none; border: 2px solid var(--ink); background: var(--ink); }
.face__square > img, .face__square > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.face__name { font: 400 26px/1 var(--display); text-transform: uppercase; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Accueil : ouvrir un salon ── */
.create { align-items: center; gap: 80px; padding: 60px 120px; }
.create__left { flex: 1 1 auto; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.create__right { flex: none; width: 760px; display: flex; flex-direction: column; gap: 40px; }
.group { display: flex; flex-direction: column; gap: 16px; }
.group--open { margin-top: 10px; }
.row { display: flex; gap: 26px; align-items: center; }
.row--captions { gap: 18px; }
.capacity { min-width: 110px; text-align: center; font: 400 72px/1 var(--display); font-variant-numeric: tabular-nums; }
.ownership { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; padding-top: 12px; }
.owner { display: flex; align-items: center; gap: 22px; }
.owner__name { margin: 6px 0 0; font: 400 56px/1 var(--display); text-transform: uppercase; }

.is-intro [data-intro] { animation: rise .45s ease-out both; animation-delay: 1.9s; }
.is-intro [data-intro="0"] { animation: fade .3s ease-out both; animation-delay: .5s; }
.is-intro [data-intro="1"] { animation: rush .6s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: .5s; }
.is-intro [data-intro="2"] { animation: rush .6s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: .92s; }
.is-intro [data-intro="3"] { animation: rush-strip .5s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: 1.44s; }
@keyframes rush { from { transform: translateX(-1400px) var(--slant); opacity: 0; } to { transform: var(--slant); } }
@keyframes rush-strip { from { transform: translateX(-1400px) rotate(-3deg) var(--slant); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .is-intro [data-intro] { animation: none !important; } }

/* ── Code et QR (salon, appairage) ── */
.split { gap: 70px; }
.split__left { flex: none; width: 720px; display: flex; flex-direction: column; gap: 30px; }
.split__right { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }
.split__right .headline { white-space: nowrap; max-width: 100%; overflow: hidden; padding-right: 20px; }
.couch { display: grid; grid-template-columns: repeat(4, 170px); gap: 26px 20px; }

/* ── Une manche ── */
.round { flex-direction: column; gap: 36px; }
.round__top { display: flex; justify-content: space-between; }
.round__middle { flex: 1 1 auto; display: flex; gap: 60px; align-items: flex-start; }
.round__couch { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 26px; }
.couch--round { display: flex; gap: 24px; }
.couch__column { display: flex; flex-direction: column; gap: 16px; }
.deck { position: relative; width: 1000px; aspect-ratio: 7 / 4; flex: none; }
.deck > .tvcard, .deck__top { position: absolute; inset: 0; }
.deck__top { box-shadow: 12px 12px 0 var(--ink); perspective: 2400px; }

.tvcard { position: absolute; inset: 0; padding: 25px; background: #fff; border: 5px solid var(--ink); }
.tvcard__art {
  position: relative; height: 100%; overflow: hidden; color: #fff;
  background: linear-gradient(174deg, var(--navy) 0 49.8%, var(--red) 50.2% 100%);
  display: grid; place-items: center;
}
.tvcard__art::before {
  content: ""; position: absolute; left: 50%; top: 86%; width: 300%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 4deg, rgba(255,255,255,.09) 0 11.25deg, transparent 0 22.5deg);
}
.tvcard--back .tvcard__art::before { top: 50%; }
.tvcard__art > * { position: relative; }
.tvcard__poster { display: grid; justify-items: center; gap: 10px; font: 400 150px/.85 var(--display); text-transform: uppercase; transform: rotate(-4deg); }
.tvcard__poster i { font-style: normal; font-size: 64px; background: #fff; color: var(--navy); padding: 6px 22px 0; transform: rotate(-3deg); }
.tvcard__tag {
  position: absolute; top: 8.5%; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font: 700 27px/1 var(--mono); letter-spacing: 2.5px; padding-bottom: 12px;
}
.tvcard__tag::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 90px; height: 5px; margin-left: -45px; background: #fff; }
.tvcard__title {
  width: calc(100% - 90px); max-height: 56%; text-align: center; text-wrap: balance; overflow: hidden;
  font: 400 115px/.95 var(--display); text-transform: uppercase;
}
.tvcard__title--quote { font-size: 65px; line-height: 1; }
.tvcard__foot {
  position: absolute; bottom: 7.5%; left: 50%; transform: translateX(-50%) rotate(-3deg) var(--slant);
  background: #fff; color: var(--red); padding: 5px 20px; font: 400 37px/1 var(--display); white-space: nowrap;
}
.tvcard--face.is-flipping { animation: turn .5s ease-in-out .15s both; backface-visibility: hidden; }
@keyframes turn { from { transform: rotateY(-180deg); } 50% { transform: rotateY(-90deg); } }
@media (prefers-reduced-motion: reduce) { .tvcard--face.is-flipping { animation: none; } }

.countdown { position: relative; height: 64px; background: #fff; border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); transition: opacity .25s; }
.countdown.is-dim { opacity: .35; }
.countdown__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--red); transition: width .1s linear; }
.countdown__seconds { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); font: 400 44px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }

/* ── Le bilan ── */
.summary__left { width: 680px; }
.duo { margin: 6px 0; font: 400 44px/1 var(--display); color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board { display: flex; flex-direction: column; gap: 12px; width: 100%; overflow: hidden; }
.board__line { display: flex; align-items: center; gap: 16px; }
.board__rank { width: 50px; font: 400 34px/1 var(--display); color: rgba(255,255,255,.7); }
.board__name { width: 250px; font: 400 36px/1 var(--display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board__verdict { flex: none; padding: 4px 14px; background: #fff; border: 3px solid var(--ink); font: 400 32px/1 var(--display); text-transform: uppercase; white-space: nowrap; }
.tally { display: grid; grid-template-columns: auto auto; gap: 5px 16px; align-items: center; flex: none; }
.tally__count { font: 700 22px/1 var(--mono); letter-spacing: 1px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── Messages ── */
.message { flex-direction: column; justify-content: center; gap: 34px; padding: 90px; }
.message .tvbtn { align-self: flex-start; margin-top: 10px; }
.busy { width: 64px; height: 64px; border: 8px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .9s linear infinite; }
.lost { position: absolute; right: 40px; bottom: 40px; padding: 14px; background: var(--ink); }
.lost[hidden] { display: none; }
