/* ===== Thèmes ===== */
:root {
  --bg: #fff4e2;
  --bg-2: #fff9ef;
  --card: #ffffff;
  --line: #1b1530;
  --ink: #1b1530;
  --text: #1b1530;
  --muted: #6d6489;
  --like: #25d07a;
  --like-soft: #d4f7e4;
  --ignore: #ff4f7b;
  --ignore-soft: #ffdbe5;
  --accent: #7a5cff;
  --accent-soft: #e6defe;
  --yellow: #ffd23f;
  --orange: #ff8a3d;
  --blob-1: #ffd23f66;
  --blob-2: #ff4f7b44;
  --blob-3: #7a5cff33;
  --font-display: "Bagel Fat One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --radius: 22px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #170f2e;
  --bg-2: #211746;
  --card: #2a1f55;
  --line: #55468f;
  --ink: #0b0618;
  --text: #fff4e2;
  --muted: #b3a8d9;
  --like: #3ee58f;
  --like-soft: #14452c;
  --ignore: #ff6b8f;
  --ignore-soft: #4d1b32;
  --accent: #9a82ff;
  --accent-soft: #3a2c78;
  --yellow: #ffd23f;
  --blob-1: #ffd23f22;
  --blob-2: #ff4f7b2e;
  --blob-3: #7a5cff44;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html, body { min-height: 100%; }
body {
  background:
    radial-gradient(520px 420px at 95% 0%, var(--blob-1), transparent 70%),
    radial-gradient(480px 420px at -5% 35%, var(--blob-2), transparent 70%),
    radial-gradient(560px 460px at 100% 100%, var(--blob-3), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em; line-height: 1.05; }
h1 { font-size: clamp(46px, 14vw, 68px); }
h2 { font-size: 30px; }
h3 { font-size: 19px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }

/* ===== Bouton thème ===== */
#theme {
  position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 20;
  width: 46px; min-height: 46px; padding: 0; border-radius: 50%;
  background: var(--yellow); color: var(--ink); font-size: 22px;
  border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
}

/* ===== Accueil ===== */
.logo-tag {
  display: inline-block;
  font-family: var(--font-body); font-weight: 900; font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--ink); color: var(--yellow);
  padding: 6px 12px; border-radius: 999px; transform: rotate(-2deg);
}
:root[data-theme="dark"] .logo-tag { background: var(--yellow); color: var(--ink); }
.hero h1 { margin-top: 14px; text-shadow: 3px 3px 0 var(--yellow); }
.hero h1 s { color: var(--ignore); text-decoration-thickness: 6px; text-shadow: none; }
.hero p { font-size: 18px; }
.stickers { font-size: 30px; letter-spacing: 6px; margin-top: 14px; }
.stickers span { display: inline-block; animation: bounce 2.4s ease-in-out infinite; }
.stickers span:nth-child(2) { animation-delay: 0.2s; }
.stickers span:nth-child(3) { animation-delay: 0.4s; }
.stickers span:nth-child(4) { animation-delay: 0.6s; }
@keyframes bounce { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-8px) rotate(6deg); } }

/* ===== Cartes ===== */
.panel {
  background: var(--card);
  border: 2.5px solid var(--ink);
  box-shadow: 0 5px 0 var(--ink);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
:root[data-theme="dark"] .panel { border-color: var(--line); box-shadow: 0 5px 0 var(--ink); }

input[type="text"] {
  width: 100%; min-height: 54px; padding: 0 16px;
  background: var(--bg-2); color: var(--text);
  border: 2.5px solid var(--ink); border-radius: 16px;
  font: inherit; font-weight: 700; font-size: 18px;
}
:root[data-theme="dark"] input[type="text"] { border-color: var(--line); }
input[type="text"]::placeholder { color: var(--muted); opacity: 0.7; }
input[type="text"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input.code { text-transform: uppercase; letter-spacing: 0.4em; text-align: center; font-family: var(--font-display); font-weight: 400; font-size: 26px; }

/* ===== Boutons ===== */
button {
  font: inherit; font-weight: 800; font-size: 18px;
  cursor: pointer; min-height: 54px; padding: 0 22px;
  border-radius: 18px;
  color: #fff; background: var(--accent);
  border: 2.5px solid var(--ink);
  box-shadow: 0 5px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.15s ease, background-color 0.15s ease;
}
button:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
button:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: 0 2px 0 var(--ink); transform: translateY(3px); }
button:focus-visible, input:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
button.ghost { background: var(--card); color: var(--text); }
button.small-btn { min-height: 42px; font-size: 15px; padding: 0 14px; border-radius: 14px; box-shadow: 0 3px 0 var(--ink); }
#start, #again, #next, #send, #create {
  background: var(--orange); color: var(--ink);
  font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; font-size: 21px;
}
#create { background: var(--yellow); }

.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.spread { justify-content: space-between; }

/* ===== Salon ===== */
.room-code {
  font-family: var(--font-display); font-size: 76px; letter-spacing: 0.1em;
  color: var(--accent); text-align: center; line-height: 1; margin-top: 10px;
  text-shadow: 3px 3px 0 var(--yellow);
}
.players { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--text);
  border: 2px solid var(--ink); font-weight: 800;
}
:root[data-theme="dark"] .pill { border-color: var(--line); }
.pill.off { opacity: 0.4; }
.pill.done { background: var(--like); color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 46px; padding: 0 16px; border-radius: 999px;
  background: var(--card); color: var(--text); font-size: 15px; font-weight: 800;
  box-shadow: 0 3px 0 var(--ink);
}
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; }
.chip.adult[aria-pressed="true"] { background: var(--ignore); color: var(--ink); }
.chip .n { opacity: 0.65; margin-left: 6px; font-size: 13px; }

.stepper { display: flex; align-items: center; gap: 16px; }
.stepper button { width: 54px; padding: 0; background: var(--yellow); color: var(--ink); font-size: 26px; }
.stepper output { font-family: var(--font-display); font-size: 34px; min-width: 44px; text-align: center; }

/* ===== Jeu ===== */
.topbar { display: flex; justify-content: space-between; align-items: baseline; padding-right: 52px; }
.progress { height: 12px; border-radius: 99px; background: var(--card); border: 2.5px solid var(--ink); overflow: hidden; }
:root[data-theme="dark"] .progress { border-color: var(--line); }
.progress > i { display: block; height: 100%; background: repeating-linear-gradient(45deg, var(--orange) 0 10px, var(--yellow) 10px 20px); transition: width 0.4s ease; }

.post {
  background: var(--card);
  border: 2.5px solid var(--ink); box-shadow: 0 5px 0 var(--ink);
  border-radius: var(--radius); overflow: hidden;
}
:root[data-theme="dark"] .post { border-color: var(--line); }
.post.embed { background: #fff; }
.post iframe { display: block; width: 100%; border: 0; }
.post iframe.instagram { height: 760px; max-width: 540px; margin: 0 auto; }
.post iframe.tiktok { height: 720px; max-width: 420px; margin: 0 auto; background: #000; }
.post iframe.youtube { aspect-ratio: 16 / 9; height: auto; }
.post iframe.youtube.short { aspect-ratio: 9 / 16; max-width: 400px; margin: 0 auto; }
.post .text-card {
  padding: 36px 24px; min-height: 240px;
  display: grid; place-items: center; text-align: center;
  background: var(--yellow); color: var(--ink);
  font-family: var(--font-display); font-size: 27px; line-height: 1.18;
}
.post .open-link { display: block; padding: 14px; text-align: center; font-size: 16px; font-weight: 800; text-decoration: none; color: var(--ink); background: var(--yellow); border-top: 2.5px solid var(--ink); }
.post .open-link:active { filter: brightness(0.95); }

.vote-grid { display: flex; flex-direction: column; gap: 14px; }
.action { display: flex; flex-direction: column; gap: 16px; }
.vote-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vote-bar button { min-height: 72px; font-family: var(--font-display); font-weight: 400; font-size: 23px; }
.btn-like { background: var(--like); color: var(--ink); }
.btn-ignore { background: var(--ignore); color: var(--ink); }
.vote-bar:has([aria-pressed="true"]) button:not([aria-pressed="true"]) { opacity: 0.4; }
.vote-bar button[aria-pressed="true"] { transform: translateY(3px) scale(1.03); box-shadow: 0 2px 0 var(--ink), 0 0 0 5px var(--yellow); }

.wait {
  text-align: center; padding: 18px; border-radius: var(--radius);
  background: var(--card); border: 2.5px dashed var(--ink);
}
:root[data-theme="dark"] .wait { border-color: var(--line); }
.wait strong { color: var(--accent); }

.guess-list { display: flex; flex-direction: column; gap: 10px; }
.guess-item {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; padding: 0 18px; width: 100%;
  background: var(--bg-2); color: var(--text); font-size: 18px; font-weight: 800;
  box-shadow: 0 4px 0 var(--ink);
}
.guess-item .tag { font-size: 14px; color: var(--muted); font-weight: 800; }
.guess-item[aria-pressed="true"] { background: var(--like); color: var(--ink); transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.guess-item[aria-pressed="true"] .tag { color: var(--ink); }

/* ===== Révélation ===== */
.reveal-list { display: flex; flex-direction: column; gap: 12px; }
.reveal-item {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: 18px;
  background: var(--card); border: 2.5px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  font-weight: 800; font-size: 18px;
  animation: pop 0.5s cubic-bezier(.2,1.5,.4,1) both;
}
.reveal-item.liked { background: var(--like-soft); }
.reveal-item.ignored { background: var(--ignore-soft); }
.reveal-item .verdict { font-family: var(--font-display); font-size: 19px; }
.reveal-item.liked .verdict { color: #0d8a4d; }
.reveal-item.ignored .verdict { color: #d61f54; }
:root[data-theme="dark"] .reveal-item { border-color: var(--line); }
:root[data-theme="dark"] .reveal-item.liked .verdict { color: var(--like); }
:root[data-theme="dark"] .reveal-item.ignored .verdict { color: var(--ignore); }
.gain { min-width: 44px; text-align: right; color: var(--muted); }
.gain.up { color: var(--ink); background: var(--yellow); border-radius: 999px; padding: 2px 10px; min-width: 0; font-family: var(--font-display); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.92); } to { opacity: 1; transform: none; } }

.board { display: flex; flex-direction: column; gap: 8px; }
.board-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 14px; background: var(--bg-2); font-weight: 800; }
.board-item b { font-family: var(--font-display); font-weight: 400; font-size: 22px; }
.board-item.me { background: var(--accent-soft); outline: 2.5px solid var(--accent); }

.podium .first {
  text-align: center; padding: 30px 16px; border-radius: var(--radius);
  background: var(--yellow); color: var(--ink);
  border: 2.5px solid var(--ink); box-shadow: 0 6px 0 var(--ink);
}
.podium .first .medal { font-size: 64px; animation: bounce 1.6s ease-in-out infinite; display: inline-block; }
.podium .first .name { font-family: var(--font-display); font-size: 40px; line-height: 1.05; }
.podium .first .muted { color: #5a4a10; }

.notice { font-size: 14px; color: var(--muted); }
.adult-warn { color: #d61f54; font-size: 14px; font-weight: 800; }
:root[data-theme="dark"] .adult-warn { color: var(--ignore); }
.leave-btn { margin-top: auto; align-self: center; color: var(--muted); box-shadow: 0 3px 0 var(--ink); }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px);
  background: var(--ink); color: var(--yellow); padding: 12px 20px; border-radius: 999px;
  font-weight: 800; opacity: 0; pointer-events: none; transition: all 0.25s ease; max-width: 90vw; text-align: center; z-index: 30;
  border: 2px solid var(--yellow);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Confettis ===== */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 15; }
.confetti i {
  position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ===== Desktop ===== */
@media (min-width: 900px) {
  #app:has(.vote-grid) { max-width: 1000px; }
  .vote-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
  .vote-grid .action { position: sticky; top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .confetti { display: none; }
}

.hl { color: #0d8a4d; }
:root[data-theme="dark"] .hl { color: var(--like); }
.hero .hl { background: var(--like); color: var(--ink); padding: 0 8px; border-radius: 8px; }

/* ===== Avatars, minuteur, réactions, trophées, TV ===== */
.avatars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 4px; }
.hero.small h1 { font-size: clamp(34px, 10vw, 46px); margin-top: 8px; }
.steps { display: flex; justify-content: center; gap: 8px; }
.steps i { width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2.5px solid var(--ink); }
:root[data-theme="dark"] .steps i { border-color: var(--line); }
.steps i.on { background: var(--orange); transform: scale(1.25); }
.steps i.done { background: var(--like); }
.who { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 24px; }
.who .avimg { width: 52px; height: 52px; }
.avatar { min-height: 0; aspect-ratio: 1; padding: 3px; border-radius: 50%; background: var(--card); box-shadow: 0 3px 0 var(--ink); }
.avatar .avimg { width: 100%; height: 100%; }
.avatar[aria-pressed="true"] { background: var(--yellow); transform: translateY(2px); box-shadow: 0 1px 0 var(--ink), 0 0 0 4px var(--accent); }
.av { line-height: 0; }
.avimg { width: 1.5em; height: 1.5em; border-radius: 50%; vertical-align: middle; display: inline-block; flex: none; }
.pill .avimg { width: 30px; height: 30px; margin-left: -6px; }
.pill { padding-left: 8px; }
.podium .first .avimg { width: 1.1em; height: 1.1em; }

.timer { position: relative; height: 26px; border-radius: 99px; background: var(--card); border: 2.5px solid var(--ink); overflow: hidden; }
:root[data-theme="dark"] .timer { border-color: var(--line); }
.timer i { position: absolute; inset: 0 auto 0 0; width: 100%; background: var(--like); transition: width 0.25s linear; }
.timer b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 400; font-size: 15px; color: var(--ink); }
.timer.urgent i { background: var(--ignore); }
.timer.urgent { animation: shake 0.4s ease-in-out infinite; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }

.reveal-item.pending { background: var(--card); opacity: 0.85; }
.reveal-item.pending .verdict { animation: bounce 0.8s ease-in-out infinite; display: inline-block; }
.after { display: flex; flex-direction: column; gap: 16px; }
.text-card.compact { min-height: 0; padding: 20px; font-size: 20px; }
.tv-note { font-size: 34px; line-height: 1.3; }

.reactions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.react { min-height: 52px; width: 52px; padding: 0; font-size: 26px; border-radius: 50%; background: var(--card); box-shadow: 0 3px 0 var(--ink); }
.float-emoji { position: fixed; bottom: 70px; z-index: 25; pointer-events: none; text-align: center; animation: floatup 2.4s ease-out forwards; }
.float-emoji span { display: block; font-size: 44px; }
.float-emoji small { display: inline-block; background: var(--ink); color: var(--yellow); border-radius: 99px; padding: 1px 8px; font-size: 11px; font-weight: 800; }
@keyframes floatup { from { opacity: 1; transform: translateY(0) scale(0.8); } to { opacity: 0; transform: translateY(-60vh) scale(1.3); } }

.awards { display: flex; flex-direction: column; gap: 10px; }
.award { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--bg-2); }
.award .ae { font-size: 32px; }
.panel.dare { background: var(--ignore-soft); }
.panel.dare p { font-weight: 800; font-size: 18px; }

body.tv #app { max-width: 1100px; font-size: 20px; }
body.tv .vote-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 28px; align-items: start; }
body.tv .wait .big { font-family: var(--font-display); font-size: 64px; font-weight: 400; color: var(--accent); }
body.tv .room-code { font-size: 140px; }
body.tv .post iframe.tiktok { height: 80vh; }
body.tv .post iframe.instagram { max-width: 600px; }
body.tv .timer { height: 34px; }
:root[data-theme="dark"] .hero .hl { color: var(--ink); }

/* ===== Cartes de jeu, options, QR, Imposteur ===== */
.game-cards { display: grid; gap: 10px; }
.game-card {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 0;
  text-align: left; min-height: 74px; padding: 10px 16px; border-radius: 20px;
  background: var(--card); color: var(--text); box-shadow: 0 4px 0 var(--ink);
}
.game-card .gi { grid-row: 1 / 3; font-size: 36px; align-self: center; }
.game-card b { font-family: var(--font-display); font-weight: 400; font-size: 21px; align-self: end; }
.game-card small { font-size: 14px; font-weight: 700; color: var(--muted); align-self: start; }
.game-card[aria-pressed="true"] { background: var(--accent); color: #fff; transform: translateY(2px); box-shadow: 0 2px 0 var(--ink), 0 0 0 4px var(--yellow); }
.game-card[aria-pressed="true"] small { color: #ece6ff; }

details.opts { background: var(--card); border: 2.5px solid var(--ink); box-shadow: 0 4px 0 var(--ink); border-radius: var(--radius); }
:root[data-theme="dark"] details.opts { border-color: var(--line); }
details.opts summary { cursor: pointer; list-style: none; padding: 16px; font-family: var(--font-display); font-size: 19px; }
details.opts summary::-webkit-details-marker { display: none; }
details.opts summary::after { content: "▾"; float: right; transition: transform 0.2s; }
details.opts[open] summary::after { transform: rotate(180deg); }
.opts-body { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; }

.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 12px; }
.qr { background: #fff; padding: 10px; border-radius: 18px; border: 2.5px solid var(--ink); box-shadow: 0 4px 0 var(--ink); line-height: 0; }
.qr img, .qr canvas { max-width: 100%; height: auto; }

.role-card {
  display: block; width: 100%; min-height: 220px; padding: 22px 18px; text-align: center; color: var(--ink);
  background: var(--accent-soft); border-radius: var(--radius); font-weight: 800;
}
.role-card .rc-word { font-family: var(--font-display); font-size: 44px; line-height: 1.05; margin: 8px 0; word-break: break-word; }
.role-card .rc-label { font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; }
.role-card small { opacity: 0.7; }
.role-card.good { background: var(--like); }
.role-card.bad { background: var(--ignore); }
.role-card.tv { cursor: default; }
.result-banner.caught { background: var(--like-soft); }
.result-banner.escaped { background: var(--ignore-soft); }
.result-banner h2 { font-size: 28px; }

/* ===== Icônes 2D ===== */
.ico { display: inline-block; vertical-align: middle; flex: none; filter: drop-shadow(0 2px 0 rgba(27, 21, 48, 0.85)); }
.ico .s { stroke: #1b1530; stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; }
button .ico { margin-right: 4px; }
.vote-bar button .ico { margin-right: 8px; }
.game-card .ico { grid-row: 1 / 3; align-self: center; }
#theme .ico { margin: 0; filter: none; }
.react .ico { margin: 0; }
.hero h1 .accent { color: var(--accent); }
.lineup { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lu { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--card); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-weight: 800; font-size: 15px; }
:root[data-theme="dark"] .lu { border-color: var(--line); }
.crown { display: inline-flex; }
.stickers span { line-height: 0; }
.float-emoji span { line-height: 0; }

/* ===== Rallonge de temps, liens de secours, plus susceptible ===== */
.timer-row { display: flex; gap: 10px; align-items: center; }
.timer-row .timer { flex: 1; }
.timer-row .small-btn { min-height: 34px; padding: 0 12px; background: var(--yellow); color: var(--ink); }
.open-box { border-top: 2.5px solid var(--ink); background: var(--card); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
:root[data-theme="dark"] .open-box { border-color: var(--line); }
.open-hint { font-size: 13px; font-weight: 800; color: var(--muted); text-align: center; }
.open-links { display: flex; flex-wrap: wrap; gap: 8px; }
.open-links .open-link { flex: 1 1 150px; border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 var(--ink); padding: 10px 8px; font-size: 15px; background: var(--yellow); color: var(--ink); }
.open-links .open-link.alt { background: var(--card); color: var(--text); }
.sus-card { font-size: 24px; }
.sus-card b { color: var(--accent); }
.sus-winner { align-items: center; text-align: center; background: var(--yellow); color: var(--ink); }
.sus-winner .muted, .sus-winner .notice { color: #5a4a10; }
.sw-faces { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.sw-faces > div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: var(--font-display); font-size: 24px; }
.sw-faces .avimg { width: 84px; height: 84px; }
.bar-row { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 10px; align-items: center; font-weight: 800; }
.bar { height: 16px; border-radius: 99px; background: var(--card); border: 2.5px solid var(--ink); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); transition: width 0.6s ease; }
.vote-line { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.vote-line .avimg { width: 26px; height: 26px; }

/* ===== Le Juste Chiffre ===== */
.num-in { text-align: center; font-family: var(--font-display) !important; font-weight: 400 !important; font-size: 40px !important; min-height: 76px !important; letter-spacing: 0.04em; }
.num-val { text-align: right; font-family: var(--font-display); font-size: 20px; }
.num-val small { font-family: var(--font-body); font-weight: 700; font-size: 12px; color: var(--muted); }
.sus-card small { font-family: var(--font-body); font-size: 15px; font-weight: 800; color: var(--ink); opacity: 0.7; }

/* ===== Moins de défilement ===== */
.big-num { font-size: 72px !important; line-height: 1; color: var(--accent); }
.lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.lh-left { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.lobby-head .room-code { font-size: 58px; text-align: left; margin-top: 0; }
.lobby-head .qr-wrap { margin-top: 0; flex: none; }
.lobby-head .qr { padding: 6px; border-radius: 14px; }

.game-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
.game-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 104px; padding: 10px 12px; }
.game-card .ico { width: 40px; height: 40px; grid-row: auto; margin-bottom: 2px; }
.game-card b { font-size: 18px; line-height: 1.1; }
.game-card small { font-size: 12px; line-height: 1.25; }
.game-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Les boutons d'action restent visibles en bas de l'écran */
#app > #start, #app > #next, #app > #again, #app > #send, #app > #tovote { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 6; }
#app > .guess-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#app > .guess-list .guess-item { min-height: 52px; font-size: 16px; padding: 0 12px; gap: 8px; }

@media (max-width: 899px) {
  .vote-grid .action {
    position: sticky; bottom: 0; z-index: 6; gap: 10px;
    margin: 0 -16px; padding: 10px 16px max(12px, env(safe-area-inset-bottom));
    background: var(--bg); box-shadow: 0 -14px 16px -6px var(--bg);
  }
  .vote-grid .action .panel { padding: 10px; gap: 8px; box-shadow: 0 3px 0 var(--ink); }
  .vote-grid .action .panel h3 { font-size: 16px; }
  .vote-grid .action .notice { display: none; }
  .vote-grid .action .vote-bar { gap: 10px; }
  .vote-grid .action .vote-bar button { min-height: 56px; font-size: 20px; }
  .vote-grid .action .guess-list { flex-direction: row; overflow-x: auto; gap: 8px; padding: 2px 2px 6px; scrollbar-width: none; }
  .vote-grid .action .guess-list::-webkit-scrollbar { display: none; }
  .vote-grid .action .guess-item { width: auto; flex: none; min-height: 46px; padding: 0 14px; font-size: 16px; gap: 8px; }
  .vote-grid .action .guess-item .tag { font-size: 12px; }
  .vote-grid .action #send { min-height: 52px; font-size: 18px; }
  .vote-grid .action .wait { padding: 12px; }
}
.lobby-head .qr-wrap { margin-top: 34px; }
.lobby-head .qr-wrap .notice { display: none; }
.reactions { gap: 6px; }
.react { width: 46px; min-height: 46px; }
.react .ico { width: 28px; height: 28px; }
