:root {
  color-scheme: dark;
  --bg: #12121a;
  --bg-2: #1c1c28;
  --bg-3: #262636;
  --fg: #f4f4f8;
  --fg-2: #a9a9bd;
  --fg-3: #6f6f86;
  --line: #34344a;
  --accent: #ff70a6;
  --accent-2: #ffd166;
  --ok: #06d6a0;
  --ko: #ef476f;
  --chart: #e8568f;  /* série principale des graphiques, validée sur le fond sombre */
  --chart-2: #3b9fd6;  /* seconde série (pronostic), validée avec la première */
  --radius: 16px;
  --radius-s: 10px;
  --pad: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f6f6fa;
    --bg-2: #ffffff;
    --bg-3: #ececf4;
    --fg: #16161f;
    --fg-2: #4d4d64;
    --fg-3: #8a8aa3;
    --line: #d9d9e6;
    --chart: #e0457f;
    --chart-2: #1f7fb8;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; color: var(--fg-2); text-transform: uppercase; letter-spacing: .04em; }
p { margin: 0; }
.muted { color: var(--fg-2); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.wrap { flex-wrap: wrap; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }
.hidden { display: none !important; }

/* Mise en page */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.screen {
  flex: 1; display: flex; flex-direction: column; gap: 14px;
  width: 100%; max-width: 520px; margin: 0 auto;
  padding: calc(var(--pad) + var(--safe-t)) var(--pad) calc(var(--pad) + var(--safe-b));
}
.screen-wide { max-width: 900px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-bottom: 4px;
}
.topbar .brand { font-weight: 800; letter-spacing: -.01em; }
.topbar .code { font-weight: 800; letter-spacing: .12em; color: var(--accent-2); }
.conn { width: 9px; height: 9px; border-radius: 50%; background: var(--fg-3); display: inline-block; }
.conn.online { background: var(--ok); }
.conn.reconnecting, .conn.connecting { background: var(--accent-2); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.card.flat { background: transparent; border-style: dashed; }
.stack-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 18px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--bg-3); color: var(--fg); font-weight: 700; cursor: pointer;
  width: 100%; text-decoration: none; transition: transform .06s ease, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #1a0a12; }
.btn-secondary { background: var(--accent-2); border-color: var(--accent-2); color: #241c00; }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; border-color: var(--ko); color: var(--ko); }
.btn-inline { width: auto; min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; border-radius: 10px; }

/* Champs */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--fg-2); font-weight: 600; }
.input, textarea.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-3); color: var(--fg); outline: none;
}
.input:focus { border-color: var(--accent); }
textarea.input { min-height: 120px; resize: vertical; }
.input.code-input { text-transform: uppercase; letter-spacing: .3em; font-weight: 800; font-size: 24px; text-align: center; }
.error { color: var(--ko); font-size: 14px; }
.notice { background: rgba(255, 209, 102, .12); border: 1px solid rgba(255, 209, 102, .5); border-radius: var(--radius-s); padding: 10px 12px; font-size: 14px; }

/* Avatars */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; color: #14141c; font-size: 16px; position: relative;
  text-transform: uppercase;
}
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.avatar.xl { width: 92px; height: 92px; font-size: 34px; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar .badge {
  position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--line); font-size: 11px;
  display: flex; align-items: center; justify-content: center; color: var(--fg);
}
.avatar.sm .badge { width: 14px; height: 14px; font-size: 8px; right: -3px; bottom: -3px; }
.avatar.xl .badge { width: 28px; height: 28px; font-size: 15px; }
.avatar.offline { opacity: .45; }
.player-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.player-row:last-child { border-bottom: none; }
.player-row .name { font-weight: 700; }
.player-row .state { font-size: 13px; color: var(--fg-2); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg-3); color: var(--fg-2); white-space: nowrap; }
.tag.ok { background: rgba(6, 214, 160, .18); color: var(--ok); }
.tag.warn { background: rgba(255, 209, 102, .18); color: var(--accent-2); }
.tag.ko { background: rgba(239, 71, 111, .18); color: var(--ko); }

.color-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.color-swatch {
  aspect-ratio: 1; border-radius: 50%; border: 3px solid transparent; cursor: pointer; padding: 0;
  background: none;
}
.color-swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; }
.color-swatch.selected { border-color: var(--fg); }

/* Code géant + QR */
.big-code {
  font-size: 56px; font-weight: 900; letter-spacing: .25em; text-align: center; color: var(--accent-2);
  padding-left: .25em;
}
.qr { width: 100%; max-width: 220px; margin: 0 auto; border-radius: 12px; overflow: hidden; background: #fff; padding: 8px; }
.qr svg { display: block; width: 100%; height: auto; }
.url { text-align: center; font-size: 13px; color: var(--fg-2); word-break: break-all; }

/* Plateformes */
.platform-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.platform-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 84px;
  padding: 12px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--bg-2);
  text-align: left; cursor: pointer;
}
.platform-card .p-name { font-weight: 800; }
.platform-card .p-sub { font-size: 12px; color: var(--fg-2); }
.platform-card.selected { border-color: var(--accent); }

/* Titres */
.track-list { display: flex; flex-direction: column; gap: 8px; }
.track {
  display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line); text-align: left; width: 100%; cursor: pointer;
}
.track.static { cursor: default; }
.track.selected { border-color: var(--accent); background: rgba(255, 112, 166, .12); }
.track .cover { width: 48px; height: 48px; border-radius: 8px; background: var(--bg-3); flex: none; object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.track .t-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track .t-artist { font-size: 13px; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track .t-body { flex: 1; min-width: 0; }
.track .check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800;
}
.track.selected .check { background: var(--accent); border-color: var(--accent); color: #1a0a12; }
.counter { font-weight: 800; font-size: 18px; }

/* Manche */
.now-playing { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.now-playing .cover-lg {
  width: min(56vw, 240px); height: min(56vw, 240px); border-radius: 18px; background: var(--bg-3); object-fit: cover;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35); display: flex; align-items: center; justify-content: center; font-size: 64px;
}
.now-playing .title { font-size: 22px; font-weight: 800; }
.now-playing .artist { color: var(--fg-2); }
.round-label { font-size: 13px; color: var(--fg-2); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

.timer { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.timer .num { font-size: 40px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.timer .num.urgent { color: var(--ko); }
.timer .bar { width: 100%; height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; }
.timer .bar > div { height: 100%; background: var(--accent); transition: width .2s linear; }

.vote-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.vote-btn {
  min-height: 64px; display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: 14px; border: 2px solid var(--line); background: var(--bg-2); cursor: pointer; text-align: left;
}
.vote-btn .name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-btn.selected { border-color: var(--accent); background: rgba(255, 112, 166, .14); }
.vote-btn[disabled] { opacity: .55; cursor: default; }
.vote-btn.owner { border-color: var(--ok); background: rgba(6, 214, 160, .14); }

.reveal-owner { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; }
.reveal-owner .who { font-size: 22px; font-weight: 900; }
.result-banner { border-radius: var(--radius); padding: 14px; text-align: center; font-weight: 800; font-size: 18px; }
.result-banner.ok { background: rgba(6, 214, 160, .18); color: var(--ok); }
.result-banner.ko { background: rgba(239, 71, 111, .18); color: var(--ko); }
.result-banner.owner { background: rgba(255, 209, 102, .18); color: var(--accent-2); }
.vote-line { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.vote-line:last-child { border-bottom: none; }
.vote-line .arrow { color: var(--fg-3); }
.vote-line .pts { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.vote-line .pts.ok { color: var(--ok); }
.vote-line .pts.ko { color: var(--fg-3); }
.ranking { display: flex; flex-direction: column; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: none; }
.rank-row .pos { width: 24px; font-weight: 800; color: var(--fg-2); text-align: right; }
.rank-row .name { font-weight: 700; flex: 1; }
.rank-row .score { font-weight: 900; font-variant-numeric: tabular-nums; }
.rank-row.me .name { color: var(--accent); }

/* Fin */
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: end; padding: 10px 0; }
.podium .step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.podium .block { width: 100%; border-radius: 10px 10px 0 0; background: var(--bg-3); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; font-weight: 900; }
.podium .first .block { height: 84px; background: rgba(255, 209, 102, .35); }
.podium .second .block { height: 60px; background: rgba(169, 169, 189, .35); }
.podium .third .block { height: 44px; background: rgba(205, 127, 50, .35); }
.podium .name { font-weight: 800; font-size: 14px; text-align: center; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--bg-3); border-radius: var(--radius-s); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.stat .s-label { font-size: 12px; color: var(--fg-2); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.stat .s-value { font-weight: 800; display: flex; align-items: center; gap: 8px; }
.stat .s-sub { font-size: 12px; color: var(--fg-2); }

/* Options */
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.opt-row:last-child { border-bottom: none; }
.opt-row label { font-weight: 600; }
.opt-row .input { width: 90px; min-height: 40px; padding: 6px 10px; text-align: center; }
.opt-row .input.input-wide { width: auto; min-width: 150px; }
.switch { width: 50px; height: 30px; border-radius: 15px; background: var(--bg-3); border: 1px solid var(--line); position: relative; cursor: pointer; padding: 0; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--fg-3); transition: left .15s; }
.switch.on { background: var(--ok); border-color: var(--ok); }
.switch.on::after { left: 25px; background: #fff; }
details summary { cursor: pointer; font-weight: 700; color: var(--fg-2); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "▸ "; }
details[open] summary::before { content: "▾ "; }

/* Toasts */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(16px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 50; }
.toast { background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; max-width: 90vw; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); animation: pop .2s ease; }
.toast.error { background: var(--ko); color: #fff; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }

.hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 0 8px; text-align: center; }
.hero .logo { width: 84px; height: 84px; }
.hero h1 { font-size: 30px; }
.hero p { color: var(--fg-2); }

.steps { display: flex; flex-direction: column; gap: 8px; }
.step-item { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--fg-2); }
.step-item b { color: var(--fg); }
.step-item .n { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-3); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex: none; color: var(--fg); }

/* Mode un seul téléphone */
.handoff { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px 0; text-align: center; }
.handoff .who { font-size: 30px; font-weight: 900; }
.check-big { width: 84px; height: 84px; border-radius: 50%; background: rgba(6, 214, 160, .18); color: var(--ok); font-size: 44px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.add-player { display: flex; flex-direction: column; gap: 10px; }

.yt-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--fg-2); }

/* Début / Milieu du morceau (E5) */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex: none; }
.seg > span { padding: 4px 9px; font-size: 12px; font-weight: 600; color: var(--fg-2); cursor: pointer; user-select: none; }
.seg > span.on { background: var(--accent); color: #1a0a12; }

/* Mode « Le choix du groupe » : deux duels de deux titres */
.duels { display: flex; flex-direction: column; gap: 12px; }
.duel { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: stretch; }
.duel .vs { align-self: center; font-size: 12px; font-weight: 900; color: var(--fg-3); text-transform: uppercase; }
.choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; padding: 8px;
  border-radius: 12px; border: 2px solid var(--line); background: var(--bg-2); text-align: left; cursor: pointer;
}
.choice[disabled] { cursor: default; }
.choice.selected { border-color: var(--accent); background: rgba(255, 112, 166, .12); }
.choice.majority { border-color: var(--ok); background: rgba(6, 214, 160, .12); }
.choice.faded { opacity: .6; }
.choice .c-cover { width: 100%; aspect-ratio: 4 / 3; height: auto; border-radius: 8px; background: var(--bg-3); object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.choice .c-title { font-weight: 800; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.choice .c-artist { font-size: 12px; color: var(--fg-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice .c-result { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding-top: 4px; }
.choice .c-count { font-weight: 900; font-variant-numeric: tabular-nums; }
.choice .c-voters { display: flex; flex-wrap: wrap; gap: 2px; min-height: 30px; }
.choice { position: relative; }
.choice.previewing { border-color: var(--accent-2); }
.choice .c-preview { position: absolute; top: 12px; left: 12px; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, .65); color: #fff;
  font-size: 12px; font-weight: 800; cursor: pointer; user-select: none; }
.choice .c-preview.on { background: var(--accent-2); color: #241c00; }
/* Mode « Dans ta tête » : 3 titres en grandes lignes, faciles à toucher vite */
.mind-head { display: flex; flex-direction: column; gap: 8px; }
.mind-who { gap: 12px; }
.mind-name { font-size: 22px; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.mind-head .theme-tag { font-size: 13px; padding: 4px 10px; margin-top: 4px; }
.mind-question { margin: 4px 0 0; font-size: 21px; }
.picks { display: flex; flex-direction: column; gap: 10px; }
.pick {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 80px; padding: 8px 10px 8px 8px;
  border-radius: 14px; border: 2px solid var(--line); background: var(--bg-2); text-align: left; cursor: pointer; position: relative;
}
.pick[disabled] { cursor: default; }
.pick.selected { border-color: var(--accent); background: rgba(255, 112, 166, .12); }
.pick.answer { border-color: var(--ok); background: rgba(6, 214, 160, .12); }
.pick.faded { opacity: .6; }
.pick.previewing { border-color: var(--accent-2); }
.pick .p-num { position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff;
  font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; z-index: 1; }
.pick .p-cover { width: 64px; height: 64px; border-radius: 10px; background: var(--bg-3); flex: none; object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.pick .p-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick .p-title { font-weight: 800; font-size: 16px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pick .p-artist { font-size: 13px; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .p-result { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.pick .p-voters { display: flex; flex-wrap: wrap; gap: 2px; }
.pick .p-owner { font-size: 12px; color: var(--fg-2); }
.pick .c-preview { flex: none; padding: 6px 10px; border-radius: 999px; background: var(--bg-3); color: var(--fg);
  font-size: 12px; font-weight: 800; cursor: pointer; user-select: none; white-space: nowrap; }
.pick .c-preview.on { background: var(--accent-2); color: #241c00; }
.opt-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.opt-chip { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); font-size: 13px; font-weight: 600; color: var(--fg-2); cursor: pointer; }
.opt-chip.on { background: rgba(255, 112, 166, .16); border-color: var(--accent); color: var(--fg); }
.mode-grid.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 420px) {
  .mode-grid.three { grid-template-columns: 1fr; }
}
/* Gros affichage (malvoyants), réglé sur chaque téléphone : gros textes, fort contraste,
   et en jeu seulement les réponses, en très grands boutons qui se partagent l'écran */
.big-toggle { min-width: 40px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-3);
  color: var(--fg); font-weight: 900; font-size: 15px; cursor: pointer; }
.big-toggle.on { background: var(--accent-2); border-color: var(--accent-2); color: #241c00; }
.big-row { padding: 4px 2px; }
.big-row label { font-size: 14px; }
html.big { --fg-2: #e4e4f0; --fg-3: #c6c6d6; --line: #8a8aa8; }
@media (prefers-color-scheme: light) {
  html.big { --fg-2: #1e1e2a; --fg-3: #34344a; --line: #5d5d78; }
}
html.big body { font-size: 21px; }
html.big .small, html.big .opt-row label, html.big .big-row label, html.big .player-row .state, html.big .field label { font-size: 19px; }
html.big .tiny { font-size: 17px; }
html.big h1 { font-size: 32px; }
html.big h2 { font-size: 27px; }
html.big h3 { font-size: 19px; }
html.big .btn { min-height: 72px; font-size: 22px; border-width: 2px; }
html.big .btn-inline { min-height: 56px; font-size: 19px; }
html.big .tag, html.big .theme-tag { font-size: 17px; }
html.big .input { min-height: 60px; font-size: 21px; }
html.big .avatar.sm { width: 38px; height: 38px; font-size: 15px; }
html.big .rank-row { font-size: 21px; }
html.big .result-banner { font-size: 26px; padding: 20px; }
html.big .timer .num { font-size: 44px; }
html.big .mind-question { font-size: 28px; }
html.big .mind-name { font-size: 28px; }
html.big .round-label { font-size: 17px; }
.grow-col { flex: 1 1 auto; }
.answers-big { flex: 1 1 auto; display: flex; flex-direction: column; gap: 12px; }
.answers-big > * { flex: 1 1 0; }
.big-answer {
  width: 100%; display: flex; align-items: center; gap: 14px; min-height: 96px; padding: 14px 16px;
  border-radius: 18px; border: 3px solid var(--line); background: var(--bg-2); color: var(--fg); text-align: left; cursor: pointer;
}
.big-answer[disabled] { cursor: default; }
.big-answer .ba-lead { flex: none; min-width: 44px; display: flex; justify-content: center; font-size: 36px; font-weight: 900; }
.big-answer .ba-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.big-answer .ba-title { font-size: 27px; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.big-answer .ba-sub { font-size: 20px; color: var(--fg-2); overflow-wrap: anywhere; }
.big-answer.selected { border-color: var(--accent); background: rgba(255, 112, 166, .2); }
.big-answer.answer { border-color: var(--ok); background: rgba(6, 214, 160, .22); }
.big-answer.faded { opacity: .55; }
.big-answer .avatar { width: 52px; height: 52px; font-size: 20px; }
.answers-full {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; gap: 8px; overflow-y: auto;
  padding: calc(8px + var(--safe-t)) 8px calc(8px + var(--safe-b)); background: var(--bg);
}
.answers-full .af-time { flex: none; height: 8px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.answers-full .af-time span { display: block; height: 100%; background: var(--accent); transition: width .2s linear; }
.answers-full .answers-big { gap: 8px; }
.answers-full .big-answer { min-height: 110px; border-width: 4px; }
.answers-full .big-answer .ba-title { font-size: 32px; }
.answers-full .big-answer .ba-sub { font-size: 22px; }
.answers-full .big-answer .ba-lead { font-size: 42px; }
/* Fin de « Dans ta tête » : barres face au hasard, tableau qui lit qui */
.acc { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.acc-head { display: flex; justify-content: space-between; font-size: 14px; }
.acc-bar { position: relative; height: 12px; border-radius: 999px; background: var(--bg-3); }
.acc-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--chart); }
.acc-chance { position: absolute; top: -4px; bottom: -4px; border-left: 2px dashed var(--fg-2); }
.who-reads { display: grid; gap: 4px; align-items: center; margin-top: 6px; }
.who-reads .wr-head { display: flex; justify-content: center; }
.who-reads .wr-cell { text-align: center; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 6px 0;
  border-radius: 6px; background: var(--bg-3); color: var(--fg); }
.who-reads .wr-cell.self { background: transparent; }
/* Portrait à remplir : 5 réponses par dimension */
.dim { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dim-name { font-weight: 800; }
.dim-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.dim-step { padding: 8px 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); font-size: 11px; line-height: 1.2; font-weight: 600; color: var(--fg-2); cursor: pointer; }
.dim-step.on { background: var(--accent); border-color: var(--accent); color: #1a0a12; }
.theme-tag { display: inline-block; max-width: 100%; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--bg-3); color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-tag.theme-gauche { background: rgba(239, 71, 111, .2); color: #ff8fa8; }
.theme-tag.theme-droite { background: rgba(76, 141, 255, .22); color: #8fb4ff; }
@media (prefers-color-scheme: light) {
  .theme-tag.theme-gauche { color: #b3123a; }
  .theme-tag.theme-droite { color: #1d4fb8; }
}
.verdict { text-align: center; font-weight: 700; font-size: 17px; line-height: 1.35; }
.soundtrack { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.soundtrack.flat { padding: 0; background: transparent; border: 0; }
.soundtrack .cover { width: 44px; height: 44px; border-radius: 8px; background: var(--bg-3); flex: none; object-fit: cover; display: flex; align-items: center; justify-content: center; }
.soundtrack .t-body { flex: 1; min-width: 0; }
.soundtrack .t-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soundtrack .t-artist { font-size: 13px; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Portrait du groupe : radar, jauges, boisson, visions */
.radar-wrap { position: relative; width: 100%; max-width: 360px; margin: 0 auto; }
.radar { width: 100%; height: auto; display: block; overflow: visible; }
.radar-wrap .r-label { position: absolute; max-width: 23%; font-size: 12px; line-height: 1.2; font-weight: 700; color: var(--fg-2); }
.radar-wrap .r-label.right { transform: translate(0, -50%); text-align: left; }
.radar-wrap .r-label.left { transform: translate(-100%, -50%); text-align: right; }
.radar-wrap .r-label.top { transform: translate(-50%, -100%); text-align: center; max-width: 40%; }
.radar-wrap .r-label.bottom { transform: translate(-50%, 0); text-align: center; max-width: 40%; }
.radar-wrap .r-value { color: var(--fg); font-size: 14px; font-weight: 900; }
.radar .r-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.radar .r-chance { fill: none; stroke: var(--fg-3); stroke-width: 1; stroke-dasharray: 3 4; }
.radar .r-shape { fill: var(--chart); fill-opacity: .22; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; }
.radar .r-dot { fill: var(--chart); stroke: var(--bg-2); stroke-width: 2; }
.radar .r-hit { fill: transparent; }
.radar .r-guess { fill: none; stroke: var(--chart-2); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.radar .r-guess-dot { fill: var(--bg-2); stroke: var(--chart-2); stroke-width: 2; }
.radar-wrap .r-guess-value { font-size: 11px; font-weight: 600; color: var(--fg-2); }
.chart-legend { justify-content: center; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-line { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--chart); }
.lg-line.dashed { border-top: 2px dashed var(--chart-2); }
.portrait-sum { font-weight: 800; font-size: 17px; line-height: 1.35; }
.axis-bars { display: flex; flex-direction: column; gap: 8px; }
.axis-bar { display: grid; grid-template-columns: 7.5em 1fr 2.2em; align-items: center; gap: 8px; font-size: 13px; }
.axis-bar .a-label { font-weight: 700; color: var(--fg-2); }
.axis-bar .a-track { position: relative; height: 10px; border-radius: 5px; background: var(--bg-3); overflow: hidden; }
.axis-bar .a-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--chart); border-radius: 0 4px 4px 0; }
.axis-bar .a-chance { position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px dashed var(--fg-3); z-index: 1; }
.axis-bar .a-value { font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.gauge { display: flex; flex-direction: column; gap: 6px; }
.gauge .g-head { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.gauge .g-name { font-weight: 700; }
.gauge .g-val { font-weight: 900; }
.gauge .g-track { position: relative; height: 10px; border-radius: 5px; background: var(--bg-3); }
.gauge .g-mid { position: absolute; left: 50%; top: -3px; bottom: -3px; border-left: 1px dashed var(--fg-3); }
.gauge .g-guess { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--bg-2); border: 2px dashed var(--chart-2); }
.gauge .g-dot { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--chart); border: 2px solid var(--bg-2); }
.gauge .g-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--fg-2); }
.drink { display: flex; align-items: center; gap: 12px; }
.drink .d-emoji { font-size: 36px; line-height: 1; }
.recap { border-bottom: 1px solid var(--line); padding: 8px 0; }
.recap:last-of-type { border-bottom: none; }
.recap summary { font-weight: 400; color: var(--fg); line-height: 1.35; }
.recap summary b { color: var(--fg-2); }
.recap-votes { font-weight: 900; font-variant-numeric: tabular-nums; min-width: 2.2em; text-align: right; }
.save-playlist { border-top: 1px solid var(--line); padding-top: 10px; }
.save-row { display: flex; flex-wrap: wrap; gap: 8px; }
.save-row .btn { flex: 1 1 auto; }
.reading { display: flex; flex-direction: column; gap: 3px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.reading:last-child { border-bottom: none; }
.reading .rd-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.info-btn { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 1.5px solid var(--fg-3); background: transparent; color: var(--fg-2);
  font: italic 700 13px/1 Georgia, serif; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.info-btn.on { background: var(--fg-2); color: var(--bg-2); border-color: var(--fg-2); }
.info-text { margin: 4px 0 2px; padding: 8px 10px; border-radius: 8px; background: var(--bg-3); font-size: 13px; color: var(--fg); line-height: 1.4; }
.col-vision { flex-direction: column; align-items: stretch; gap: 0; }
.person { gap: 4px; }
/* 2e partie : les joueurs placés sur une jauge d'après leurs titres */
.people-map { margin: 10px 0 6px; }
.people-map .pm-track { position: relative; }
.people-map .pm-line { position: absolute; left: 15px; right: 15px; top: 13px; height: 4px; border-radius: 2px; background: var(--bg-3); }
.people-map .pm-group { position: absolute; top: 9px; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg); background: var(--chart); z-index: 0; }
.people-map .pm-dot { position: absolute; transform: translateX(-50%); z-index: 1; }
.vision { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.vision:last-child { border-bottom: none; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--bg-2); text-align: left; cursor: pointer; }
.mode-card .m-name { font-weight: 800; }
.mode-card .m-sub { font-size: 12px; color: var(--fg-2); }
.mode-card.selected { border-color: var(--accent); background: rgba(255, 112, 166, .1); }
.duel-opt { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.duel-opt .d-body { flex: 1; min-width: 0; }
.duel-opt .d-themes { font-size: 12px; color: var(--fg-2); }

/* Liste à cocher longue (playlist entière) : compteur et filtre qui restent visibles, lien « corriger » */
.sticky-bar { position: sticky; top: var(--safe-t); z-index: 2; background: var(--bg); padding: 6px 0; }
.fix-link { font-size: 12px; font-weight: 600; color: var(--accent-2); text-decoration: underline; cursor: pointer; white-space: nowrap; }
html.big .now-playing .cover-lg { width: 110px; height: 110px; font-size: 44px; }
html.big .now-playing .title { font-size: 26px; }
html.big .topbar .brand { display: none; }
html.big .mode-card .m-name { font-size: 22px; }
html.big .mode-card .m-sub { font-size: 17px; }
html.big .mind-who .avatar.lg { width: 48px; height: 48px; font-size: 18px; }
.answers-full .big-answer.selected { background: var(--accent); border-color: var(--fg); color: #1a0a12; }
.answers-full .big-answer.selected .ba-sub { color: #1a0a12; }
