/* Action ou Vérité : feuille commune (valeurs tirées de la maquette). */

@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('../fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('../fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('../fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('../fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 600; font-display: swap; src: url('../fonts/bricolage-600.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 800; font-display: swap; src: url('../fonts/bricolage-800.woff2') format('woff2'); }

:root {
  --bg: #0F0E17;
  --surface: #1B1A2B;
  --border: #2E2C45;
  --text: #FFFFFE;
  --text-2: #B8B6CC;
  --text-3: #8C8AA6;
  --on-color: #0F0E17;
  --qr-caption: #3A3850;

  --action: #FF8A3D;
  --verite: #4DA8FF;
  --everyone: #FFFFFE;
  --link: #FFB37A;
  --link-hover: #FFD2B0;

  --soft: #5BD69B;
  --fun: #FFD23F;
  --hard: #FF6B4A;
  --x18: #FF4FA3;

  --adult-bg: #2A1424;
  --adult-border: #5C2547;
  --adult-text: #FFC9E2;
  --adult-icon: #FF8CC4;
  --host-border: #5C3A1E;
  --ok: #5BD69B;

  --font-title: 'Bricolage Grotesque', system-ui, sans-serif;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
a { color: var(--link); }
a:hover { color: var(--link-hover); }
button { font-family: var(--font); cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; }
input, button { font-size: 16px; }
:focus-visible { outline: 3px solid var(--verite); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
svg { flex-shrink: 0; }

/* ---------- Mise en page des écrans ---------- */

#app { min-height: 100vh; min-height: 100dvh; }

.screen {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(28px + var(--safe-t)) calc(20px + var(--safe-r)) calc(32px + var(--safe-b)) calc(20px + var(--safe-l));
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.screen--home { padding: calc(56px + var(--safe-t)) calc(24px + var(--safe-r)) calc(32px + var(--safe-b)) calc(24px + var(--safe-l)); gap: 28px; overflow: hidden; }
.screen--invite { padding-top: calc(48px + var(--safe-t)); padding-left: calc(24px + var(--safe-l)); padding-right: calc(24px + var(--safe-r)); gap: 24px; overflow: hidden; }
.screen--card { gap: 22px; }
.screen--wheel { align-items: center; gap: 24px; }
.screen > * { position: relative; }
.push-bottom { margin-top: auto; }

/* Halos flous de fond */
.glow { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.16; pointer-events: none; }
.glow--orange { width: 320px; height: 320px; background: var(--action); top: -80px; left: -120px; }
.glow--blue { width: 300px; height: 300px; background: var(--verite); top: 120px; right: -140px; }
.glow--blue-top { width: 300px; height: 300px; background: var(--verite); top: -100px; right: -100px; opacity: 0.15; }
.screen > .glow { position: absolute; }

/* ---------- Typo ---------- */

.title-xl { margin: 12px 0 0; font-family: var(--font-title); font-weight: 800; font-size: 40px; line-height: 1; text-align: center; letter-spacing: -0.5px; }
.title-l { margin: 0; font-family: var(--font-title); font-weight: 800; font-size: 30px; line-height: 1.1; text-align: center; }
.h2 { margin: 0; font-size: 16px; font-weight: 700; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12px; }
.center { text-align: center; }
.code-big { font-family: var(--font-title); font-weight: 800; font-size: 44px; letter-spacing: 8px; line-height: 1; }
.code-m { font-family: var(--font-title); font-weight: 800; font-size: 34px; letter-spacing: 7px; line-height: 1.1; }
.note { margin: 0; text-align: center; color: var(--text-3); font-size: 12px; line-height: 1.5; }

/* ---------- Formulaires ---------- */

.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input {
  height: 52px;
  width: 100%;
  min-width: 0;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  padding: 0 16px;
  outline: none;
}
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--text-3); }
.input[aria-invalid="true"] { border-color: var(--hard); }
.input--code { height: 56px; font-size: 20px; letter-spacing: 4px; text-transform: uppercase; font-weight: 600; flex: 1; }
.input-row { display: flex; gap: 10px; }
.field-error { margin: 0; font-size: 13px; color: var(--hard); min-height: 0; }

/* ---------- Boutons ---------- */

.btn {
  min-height: 44px;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 0.08s ease, opacity 0.15s ease;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn--xl { height: 60px; border-radius: 16px; font-size: 18px; }
.btn--l { height: 56px; border-radius: 16px; font-size: 17px; }
.btn--m { height: 50px; font-size: 15px; font-weight: 600; gap: 8px; }
.btn--s { height: 46px; border-radius: 12px; font-size: 14px; font-weight: 600; flex: 1; }
.btn--orange { background: var(--action); color: var(--on-color); }
.btn--blue { background: var(--verite); color: var(--on-color); }
.btn--white { background: var(--text); color: var(--on-color); }
.btn--secondary { background: var(--border); color: var(--text); }
.btn--outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn--host { background: transparent; border: 1.5px solid var(--host-border); color: var(--link); }
.btn--join { height: 56px; padding: 0 20px; font-size: 16px; background: var(--verite); color: var(--on-color); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--border); color: var(--text-3); border-color: var(--border); }
.btn .dim { color: var(--text-2); font-weight: 500; }
.btn .tag { font-size: 11px; font-weight: 700; }

.icon-btn {
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
  padding: 0;
}
.icon-btn[aria-pressed="false"] { color: var(--text-3); }

.link-btn {
  background: none; border: none; padding: 10px; min-height: 44px;
  color: var(--text-3); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--text-2); }

/* ---------- Accueil ---------- */

.brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 24px; }
.brand-cards { display: flex; gap: 10px; }
.brand-card {
  width: 64px; height: 88px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-weight: 800; font-size: 34px; color: var(--on-color);
}
.brand-card--a { background: var(--action); transform: rotate(-10deg); }
.brand-card--v { background: var(--verite); transform: rotate(10deg); }
.tagline { margin: 0; color: var(--text-2); font-size: 15px; text-align: center; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.home-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.home-foot .note { margin: 0; }
.tv-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  background: none; border: none; color: var(--link); font-size: 14px; font-weight: 600; padding: 0 8px;
}
.tv-link:hover { color: var(--link-hover); }

/* ---------- Invitation reçue ---------- */

.invite-head { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.avatar-xl {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--action); color: var(--on-color);
  font-family: var(--font-title); font-weight: 800; font-size: 32px;
  display: flex; align-items: center; justify-content: center;
}
.panel { background: var(--surface); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.panel--14 { border-radius: 14px; gap: 6px; }
.panel-title { font-size: 13px; font-weight: 600; color: var(--text-2); }
.panel-title--strong { font-size: 13px; font-weight: 700; color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill { font-size: 12px; font-weight: 700; color: var(--on-color); background: var(--text); border-radius: 6px; padding: 5px 9px; }

.age-check {
  display: flex; gap: 12px; align-items: center;
  background: var(--adult-bg); border: 1px solid var(--adult-border); border-radius: 14px;
  padding: 14px; text-align: left; color: var(--adult-text); width: 100%;
}
.age-check .box {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--adult-icon);
}
.age-check[aria-checked="true"] .box { background: var(--x18); border-color: var(--x18); }
.age-check .box svg { visibility: hidden; }
.age-check[aria-checked="true"] .box svg { visibility: visible; }
.age-check span:last-child { font-size: 14px; line-height: 1.4; }

.message-box { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; margin: auto 0; }
.message-box .icon-circle {
  width: 72px; height: 72px; border-radius: 50%; background: var(--surface);
  display: flex; align-items: center; justify-content: center; color: var(--text-2);
}
.message-box p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.5; }

/* ---------- En-tête de salon ---------- */

.topbar { display: flex; align-items: center; justify-content: space-between; }
.topbar-title { display: flex; flex-direction: column; align-items: center; text-align: center; }
.topbar-title strong { font-size: 15px; font-weight: 600; }
.topbar-title span { font-size: 12px; color: var(--text-2); }
.spacer-44 { width: 44px; height: 44px; }

/* ---------- Onglets ---------- */

.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; background: var(--surface); border-radius: 14px; padding: 5px; }
.tab {
  height: 44px; border-radius: 10px; border: none; background: transparent; color: var(--text-2);
  font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.tab[aria-selected="true"] { background: var(--text); color: var(--on-color); }

/* ---------- Salon : joueurs ---------- */

.code-card { background: var(--surface); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.code-card .label-c { font-size: 13px; color: var(--text-2); font-weight: 600; }
.row { display: flex; gap: 10px; width: 100%; }
.list-head { display: flex; justify-content: space-between; align-items: baseline; }
.list-head span { font-size: 13px; color: var(--text-2); }
.player-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.player {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: 14px; padding: 10px 12px; min-height: 56px;
}
.player-name { flex: 1; font-size: 15px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player.is-off .player-name, .player.is-off .avatar { opacity: 0.45; }
.player .host-tag { font-size: 11px; font-weight: 700; color: var(--link); }
.player .state-tag { font-size: 11px; font-weight: 600; color: var(--text-3); }
.player .kick {
  width: 36px; height: 36px; border-radius: 10px; border: none; background: transparent;
  display: flex; align-items: center; justify-content: center; color: var(--text-3); padding: 0;
  position: relative;
}
.player .kick::after { content: ''; position: absolute; inset: -4px; } /* zone tactile 44px */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  color: var(--on-color); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--action);
}
.summary { font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* Couleurs d'avatar (emplacements 0 à 11) */
.c0 { background: #FF8A3D; } .c1 { background: #4DA8FF; } .c2 { background: #5BD69B; } .c3 { background: #FFD23F; }
.c4 { background: #FF4FA3; } .c5 { background: #B18CFF; } .c6 { background: #4FD1C5; } .c7 { background: #FF6B4A; }
.c8 { background: #A6E05A; } .c9 { background: #FFB37A; } .c10 { background: #7FA8FF; } .c11 { background: #F7A8D8; }

/* ---------- Salon : paramètres ---------- */

.settings { display: flex; flex-direction: column; gap: 22px; }
.setting { display: flex; flex-direction: column; gap: 10px; border: none; margin: 0; padding: 0; min-width: 0; }
.setting-head { display: flex; flex-direction: column; gap: 2px; padding: 0; }
.setting-head .hint { font-size: 12px; color: var(--text-3); }
.chips { display: grid; gap: 8px; }
.chips--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chips--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chips--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chip {
  height: 46px; border-radius: 12px; font-size: 14px; font-weight: 700; padding: 0 6px;
  border: 1.5px solid var(--border); background: transparent; color: var(--text-2);
}
.chip[aria-pressed="true"] { border-color: transparent; background: var(--verite); color: var(--on-color); }
.chip--white[aria-pressed="true"] { background: var(--text); }
.chip--orange[aria-pressed="true"] { background: var(--action); }
.chip--SOFT[aria-pressed="true"] { background: var(--soft); }
.chip--FUN[aria-pressed="true"] { background: var(--fun); }
.chip--HARD[aria-pressed="true"] { background: var(--hard); }
.chip--x18[aria-pressed="true"] { background: var(--x18); }

.warn {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--adult-bg); border: 1px solid var(--adult-border); border-radius: 12px; padding: 12px;
  color: var(--adult-text); font-size: 13px; line-height: 1.4;
}
.warn svg { color: var(--adult-icon); margin-top: 1px; }

.stepper { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-radius: 14px; padding: 8px; }
.stepper button {
  width: 48px; height: 48px; border-radius: 12px; border: none; background: var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text); padding: 0;
}
.stepper button:disabled { opacity: 0.4; }
.stepper output { font-family: var(--font-title); font-weight: 800; font-size: 28px; }

.switch {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--surface); border: none; border-radius: 14px; padding: 14px 16px; text-align: left; color: var(--text);
}
.switch-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.switch-text strong { font-size: 15px; font-weight: 600; }
.switch-text span { font-size: 12px; color: var(--text-3); }
.track {
  flex-shrink: 0; width: 50px; height: 30px; border-radius: 999px; padding: 3px;
  display: flex; justify-content: flex-start; background: var(--border); transition: background 0.15s;
}
.knob { width: 24px; height: 24px; border-radius: 50%; background: var(--text); display: block; transition: transform 0.15s; }
.switch[aria-checked="true"] .track { background: var(--soft); }
.switch[aria-checked="true"] .knob { transform: translateX(20px); }

/* ---------- Écran Inviter ---------- */

.qr-box {
  background: #FFFFFE; border-radius: 24px; padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; align-self: center;
}
.qr-wrap { position: relative; width: 200px; height: 200px; }
.qr-wrap canvas { width: 200px; height: 200px; display: block; image-rendering: pixelated; }
.qr-logo {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 12px; background: #FFFFFE;
  display: flex; align-items: center; justify-content: center;
}
.qr-logo span.inner {
  width: 38px; height: 38px; border-radius: 9px; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-weight: 800; font-size: 15px;
}
.qr-logo .a { color: var(--action); } .qr-logo .v { color: var(--verite); }
.qr-caption { font-size: 13px; color: var(--qr-caption); font-weight: 600; }
.code-block { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.code-block > span:first-child { font-size: 13px; color: var(--text-2); }
.link-field {
  display: flex; gap: 8px; align-items: center;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; padding: 6px 6px 6px 14px;
}
.link-field input { flex: 1; min-width: 0; border: none; background: transparent; color: var(--text); font-size: 16px; font-family: var(--font); outline: none; }
.copy-btn { height: 44px; padding: 0 16px; border-radius: 10px; border: none; font-size: 15px; font-weight: 700; background: var(--text); color: var(--on-color); }
.copy-btn.is-done { background: var(--ok); }

/* ---------- Partie : en-têtes ---------- */

.pill { font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--surface); border-radius: 999px; padding: 8px 14px; }
.pill--s { font-size: 12px; padding: 8px 12px; }
.level-badge { font-size: 11px; font-weight: 700; color: var(--on-color); border-radius: 6px; padding: 4px 8px; }
.level-badge--card { font-size: 12px; padding: 5px 10px; }
.lv-SOFT { background: var(--soft); } .lv-FUN { background: var(--fun); } .lv-HARD { background: var(--hard); } .lv-x18 { background: var(--x18); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who-text strong { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text span { font-size: 12px; color: var(--text-2); }
.stack { display: flex; }
.stack .avatar { width: 30px; height: 30px; font-size: 13px; border: 2px solid var(--bg); }
.stack .avatar + .avatar { margin-left: -8px; }

/* ---------- Roue ---------- */

.wheel-zone { position: relative; width: 290px; height: 290px; margin-top: 16px; flex-shrink: 0; }
.wheel-pointer {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 0; height: 0; z-index: 2;
  border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 28px solid var(--text);
}
.wheel {
  width: 290px; height: 290px; border-radius: 50%;
  background: var(--border);
  box-shadow: 0 0 0 8px var(--surface), 0 20px 60px rgba(77, 168, 255, 0.25);
  will-change: transform;
}
.wheel-center {
  position: absolute; inset: 85px; border-radius: 50%; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; padding: 0 8px;
}
.wheel-center span { font-size: 12px; color: var(--text-2); }
.wheel-center strong { font-family: var(--font-title); font-weight: 800; font-size: 32px; line-height: 1.05; max-width: 112px; overflow-wrap: break-word; }
.wheel-center strong.is-mid { font-size: 25px; }
.wheel-center strong.is-long { font-size: 19px; }
.wheel-center strong.is-count { font-size: 56px; }
.order-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; list-style: none; }
.order-row .avatar.is-passed { opacity: 0.35; }
.order-row .avatar.is-current { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text); }
.choose { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-top: auto; }
.choose-q { margin: 0 0 4px; text-align: center; font-size: 17px; font-weight: 600; }
.choose-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice {
  height: 120px; border-radius: 20px; border: none; color: var(--on-color);
  font-family: var(--font-title); font-weight: 800; font-size: 26px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.choice--action { background: var(--action); }
.choice--verite { background: var(--verite); }
.waiting { margin: 0; text-align: center; font-size: 17px; font-weight: 600; color: var(--text-2); }
.waiting .dots::after { content: '…'; }

/* ---------- Carte ---------- */

.play-card {
  flex: 1; min-height: 300px;
  border-radius: 28px; padding: 6px; display: flex; flex-direction: column;
  background: var(--action);
  box-shadow: 0 24px 60px rgba(255, 138, 61, 0.28);
  transform: rotate(-1.5deg);
}
.play-card--verite { background: var(--verite); box-shadow: 0 24px 60px rgba(77, 168, 255, 0.28); transform: rotate(1.5deg); }
.play-card--tous { background: var(--everyone); box-shadow: 0 24px 60px rgba(255, 255, 254, 0.14); transform: none; }
.play-card.is-flip { animation: flip-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.play-card--verite.is-flip { animation-name: flip-in-r; }
.play-card--tous.is-flip { animation-name: flip-in-0; }
.play-card-inner {
  flex: 1; border-radius: 23px; background: var(--surface); padding: 26px 24px;
  display: flex; flex-direction: column; gap: 18px;
}
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-kind { font-family: var(--font-title); font-weight: 800; font-size: 22px; display: flex; align-items: center; gap: 8px; color: var(--action); }
.play-card--verite .card-kind { color: var(--verite); }
.play-card--tous .card-kind { color: var(--text); }
.card-text { margin: auto 0; font-family: var(--font-title); font-weight: 600; font-size: 28px; line-height: 1.2; overflow-wrap: break-word; }
.card-text.is-long { font-size: 24px; }
.card-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.card-foot--wait { font-size: 13px; gap: 8px; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.4s ease-in-out infinite; }
.actions-col { display: flex; flex-direction: column; gap: 10px; }
.info-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; padding: 14px 16px; font-size: 13px; color: var(--text-2); line-height: 1.4; }

@keyframes flip-in { from { transform: perspective(900px) rotateY(90deg) rotate(-1.5deg); opacity: 0; } to { transform: perspective(900px) rotateY(0) rotate(-1.5deg); opacity: 1; } }
@keyframes flip-in-r { from { transform: perspective(900px) rotateY(90deg) rotate(1.5deg); opacity: 0; } to { transform: perspective(900px) rotateY(0) rotate(1.5deg); opacity: 1; } }
@keyframes flip-in-0 { from { transform: perspective(900px) rotateY(90deg); opacity: 0; } to { transform: perspective(900px) rotateY(0); opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- Minuteur ---------- */

.timer { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.timer-ring { width: 100%; height: 100%; border-radius: 50%; background: var(--border); }
.timer-value {
  position: absolute; inset: 6px; border-radius: 50%; background: var(--bg);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}
.timer.is-over .timer-ring { background: var(--x18); animation: pulse 0.8s ease-in-out 4; }
.timer.is-over .timer-value { color: var(--x18); }

/* ---------- Fin de partie ---------- */

.end-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 12px; text-align: center; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--surface); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-family: var(--font-title); font-weight: 800; font-size: 32px; line-height: 1; }
.stat span { font-size: 13px; color: var(--text-2); }

/* ---------- Fenêtre modale ---------- */

.modal-back {
  position: fixed; inset: 0; z-index: 50; background: rgba(15, 14, 23, 0.82);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
}
.modal {
  width: 100%; max-width: 448px; background: var(--surface); border-radius: 24px; padding: 24px 20px;
  display: flex; flex-direction: column; gap: 14px; animation: rise 0.25s ease-out;
}
.modal h2 { margin: 0; font-family: var(--font-title); font-weight: 800; font-size: 24px; }
.modal p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.5; }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Bannière de reconnexion et toasts ---------- */

.banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  padding: calc(10px + var(--safe-t)) 16px 10px; text-align: center;
  background: var(--fun); color: var(--on-color); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 70;
  max-width: calc(100% - 32px); background: var(--text); color: var(--on-color);
  padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); animation: rise 0.2s ease-out;
}
.toast.is-error { background: var(--hard); }

/* ---------- Grand écran (16:9) ---------- */

.tv {
  position: relative; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
}
.tv-stage {
  position: relative; width: 1280px; height: 720px; flex-shrink: 0;
  padding: 40px 48px; display: flex; gap: 40px; overflow: hidden;
  transform-origin: center center;
}
.tv-stage > .glow { width: 520px; height: 520px; background: var(--action); opacity: 0.12; filter: blur(90px); top: -160px; left: 120px; }
.tv-main { flex: 1; display: flex; flex-direction: column; gap: 24px; position: relative; min-width: 0; }
.tv-side { width: 300px; display: flex; flex-direction: column; gap: 20px; position: relative; }
.tv-head { display: flex; align-items: center; gap: 16px; }
.tv-head .avatar { width: 64px; height: 64px; font-size: 28px; font-weight: 800; font-family: var(--font-title); }
.tv-head-text { display: flex; flex-direction: column; min-width: 0; }
.tv-head-text strong { font-family: var(--font-title); font-weight: 800; font-size: 40px; line-height: 1.05; }
.tv-head-text span { font-size: 18px; color: var(--text-2); }
.tv-card { flex: 1; border-radius: 36px; padding: 8px; display: flex; background: var(--action); box-shadow: 0 30px 80px rgba(255, 138, 61, 0.3); min-height: 0; }
.tv-card--verite { background: var(--verite); box-shadow: 0 30px 80px rgba(77, 168, 255, 0.3); }
.tv-card--tous { background: var(--everyone); box-shadow: 0 30px 80px rgba(255, 255, 254, 0.14); }
.tv-card.is-flip { animation: flip-in-0 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.tv-card-inner { flex: 1; border-radius: 30px; background: var(--surface); padding: 40px 48px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.tv-card .card-kind { font-size: 30px; gap: 12px; }
.tv-card--verite .card-kind { color: var(--verite); }
.tv-card--tous .card-kind { color: var(--text); }
.tv-card .level-badge { font-size: 18px; border-radius: 8px; padding: 6px 14px; }
.tv-card .card-text { font-size: 52px; line-height: 1.15; }
.tv-card .card-text.is-long { font-size: 42px; }
.tv-box { background: var(--surface); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tv-timer { width: 150px; height: 150px; }
.tv-timer .timer-value { inset: 12px; background: var(--surface); font-family: var(--font-title); font-weight: 800; font-size: 44px; }
.tv-players { background: var(--surface); border-radius: 24px; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; overflow: hidden; }
.tv-players > span { font-size: 15px; font-weight: 700; color: var(--text-2); }
.tv-players ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tv-player { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 6px 8px; }
.tv-player .avatar { width: 32px; height: 32px; }
.tv-player span { font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-player.is-current { background: var(--border); }
.tv-player.is-passed { opacity: 0.4; }
.tv-player.is-off span { color: var(--text-3); }
.tv-join { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tv-join span { font-size: 14px; color: var(--text-2); }
.tv-join strong { font-family: var(--font-title); font-weight: 800; font-size: 30px; letter-spacing: 6px; }
.tv-fs { position: absolute; top: 16px; right: 16px; z-index: 5; opacity: 0.6; }
.tv-fs:hover, .tv-fs:focus-visible { opacity: 1; }
.tv .wheel-zone { width: 420px; height: 420px; margin: 0 auto; }
.tv .wheel { width: 420px; height: 420px; box-shadow: 0 0 0 10px var(--surface), 0 30px 80px rgba(77, 168, 255, 0.25); }
.tv .wheel-center { inset: 120px; }
.tv .wheel-center span { font-size: 18px; }
.tv .wheel-center strong { font-size: 48px; max-width: 170px; }
.tv .wheel-center strong.is-mid { font-size: 38px; }
.tv .wheel-center strong.is-long { font-size: 30px; }
.tv .wheel-center strong.is-count { font-size: 84px; }
.tv .wheel-pointer { top: -18px; border-left-width: 22px; border-right-width: 22px; border-top-width: 38px; }
.tv-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
.tv-big-msg { font-family: var(--font-title); font-weight: 800; font-size: 44px; text-align: center; margin: 0; }
.tv-lobby { flex: 1; display: flex; gap: 48px; align-items: center; }
.tv-lobby .qr-box { padding: 28px; border-radius: 32px; }
.tv-lobby .qr-wrap, .tv-lobby .qr-wrap canvas { width: 320px; height: 320px; }
.tv-lobby .qr-logo { width: 72px; height: 72px; border-radius: 16px; }
.tv-lobby .qr-logo span.inner { width: 58px; height: 58px; border-radius: 12px; font-size: 22px; }
.tv-lobby-text { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tv-lobby-text .kicker { font-size: 22px; color: var(--text-2); margin: 0; }
.tv-lobby-text .url { font-size: 30px; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.tv-lobby-text .code-huge { font-family: var(--font-title); font-weight: 800; font-size: 96px; letter-spacing: 14px; line-height: 1; }

/* ---------- Écrans larges : on centre le téléphone ---------- */


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.small-14 { font-size: 14px; }
.w-100 { width: 100%; }
.row-center { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.order-note { margin-top: -12px; }
.kicker { font-size: 22px; margin: 0; }
.tv-center .brand-card { width: 96px; height: 132px; font-size: 52px; border-radius: 20px; }
legend.setting-head { margin-bottom: 10px; }
