/* CamaGame — rose poudré, molette noire, pastilles de couleur */
:root {
  --pink: #f7c9ec;        /* fond de page */
  --shell: #f3d8ee;       /* façade de l'appareil */
  --well: #ebc4e3;        /* creux, champs */
  --line: #e2b3d8;
  --ink: #000;
  --soft: #c59bbd;        /* texte secondaire, comme « For Music » */
  --soft-ink: #6e4f68;
  --blue: #5a529c;
  --coral: #f2674a;
  --yellow: #f8d417;
  --green: #1fb362;
  --white: #fff;
  --font: 'Inter Tight', 'Inter Display', 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--pink);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3, p { margin: 0; }

/* --- Mise en page --------------------------------------------------------- */
#app { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column;
  padding: calc(14px + var(--safe-t)) 14px calc(18px + var(--safe-b)); max-width: 480px; margin: 0 auto; }
.screen { flex: 1; display: flex; flex-direction: column; gap: 14px; animation: enter .3s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }

/* --- Typo ----------------------------------------------------------------- */
.brand-head { display: flex; justify-content: space-between; align-items: flex-start; }
.home-brand { text-align: center; font-weight: 800; font-size: 2.6rem; letter-spacing: -0.05em; line-height: 1; padding: 10px 0 4px; }
.home-sub { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 -4px 4px; }
.brand { display: flex; flex-direction: column; font-weight: 800; font-size: 2.15rem; line-height: .95; letter-spacing: -0.045em; }
.soft { color: var(--soft); }
.headline { font-weight: 800; font-size: 2.6rem; line-height: .92; letter-spacing: -0.05em; }
.lede { font-size: 1rem; color: var(--soft-ink); max-width: 30ch; font-weight: 500; }
.section-title { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.section-title .count { min-width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--pink); display: inline-grid; place-items: center; font-size: .8rem; }
.small { font-size: .84rem; color: var(--soft-ink); }
.subtitle { color: var(--soft-ink); }
.label { font-size: .85rem; font-weight: 600; color: var(--soft-ink); }
.center-text { text-align: center; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; color: inherit; font-size: inherit; }

/* Pastilles de couleur (comme les ronds numérotés de l'affiche) */
.dots-row { display: flex; gap: 6px; }
.pill-dot { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.05rem; }
.pill-dot svg { width: 22px; height: 22px; }

/* --- Appareil ------------------------------------------------------------- */
.device { position: relative; background: var(--shell); border-radius: 34px; padding: 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 24px 50px -24px rgba(120, 40, 100, .45); }
.ipod { border-radius: 42px; padding: 18px 16px 22px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  border: 7px solid #1b1b1d; box-shadow: 0 0 0 1px #3b3b40, 0 30px 60px -24px rgba(80, 20, 70, .55); }

/* --- Boutons -------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 22px;
  border-radius: 999px; border: 0; font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; transition: transform .12s ease, opacity .2s ease; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn-dark, .btn-primary { background: var(--ink); color: var(--shell); }
.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-block { width: 100%; }
.btn.big { min-height: 58px; font-size: 1.08rem; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--well); }
.icon-btn svg { width: 20px; height: 20px; }
.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 4px 0; font-weight: 600; }
.back svg { width: 18px; height: 18px; }

/* --- Champs (façon écran LCD) -------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: .86rem; font-weight: 600; color: var(--soft-ink); }
.lcd { width: 100%; min-height: 52px; padding: 0 18px; border-radius: 16px; border: 0; outline: none;
  background: var(--well); font-size: 1.05rem; font-weight: 500; box-shadow: inset 0 2px 6px rgba(120, 40, 100, .15); }
.lcd::placeholder { color: var(--soft); }
.lcd:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.code-input { text-align: center; font-weight: 800; font-size: 1.4rem; letter-spacing: .3em; padding-left: .3em; text-transform: uppercase; }

/* --- Accueil -------------------------------------------------------------- */
.home { position: relative; z-index: 2; }
.home-device { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 6px; z-index: 1;
  border: 7px solid #1b1b1d; border-radius: 42px; }
.join { display: flex; gap: 8px; width: 100%; }
.join .lcd { flex: 1; min-width: 0; }

/* --- Grille de haut-parleur + disque (élément signature) ---------------- */
.grille { --size: min(76vw, 300px); position: relative; width: var(--size); height: var(--size); border-radius: 50%;
  background: var(--well); box-shadow: inset 0 3px 10px rgba(120, 40, 100, .18); }
.grille.small { --size: min(62vw, 240px); }
.grille.small .disc { inset: 12%; }
.grille.small .cover { inset: 22%; }
.grille-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.grille-svg .ring circle { fill: rgba(0, 0, 0, .12); transition: fill .25s ease; }
.grille-svg .ring circle.on { fill: var(--blue); }
.grille.urgent .ring circle.on { fill: var(--coral); }
.grille.small .ring circle:nth-child(-n+38) { fill: var(--blue); }
.disc { position: absolute; inset: 9%; border-radius: 50%; overflow: hidden;
  background: repeating-radial-gradient(circle, #1c1c1f 0 1.5px, #0b0b0c 1.5px 4px);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .6); animation: spin 5s linear infinite; animation-play-state: paused; }
.disc.spinning { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.cover { position: absolute; inset: 5%; border-radius: 50%; overflow: hidden; background: var(--coral); }
.cover img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.3); filter: blur(var(--blur, 22px)) saturate(1.2);
  transition: filter 1s ease, transform 1s ease; }
.cover.clear img { filter: none; transform: scale(1); }
.cover::after { content: ''; position: absolute; left: 50%; top: 50%; width: 7%; height: 7%; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--shell); }
.grille.small .cover { background: var(--blue); }
.disc-center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.countdown-big { width: 84px; height: 84px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center;
  font-size: 2.8rem; font-weight: 800; animation: pop .9s ease both; }
@keyframes pop { from { transform: scale(1.4); opacity: 0; } 25% { transform: scale(1); opacity: 1; } }
.neck { width: 70px; height: 12px; margin: -12px 0 -4px; background: var(--well); border-radius: 0 0 20px 20px; }

/* --- Jeu ------------------------------------------------------------------ */
.players-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 0; flex: none; }
.players-strip::-webkit-scrollbar { display: none; }
.chip { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 44px; }
.chip .av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--shell); }
.chip.owner .av { opacity: .45; }
.chip.found .av { box-shadow: 0 0 0 2px var(--green); }
.chip .score-dot { position: absolute; top: -4px; left: -1px; width: 18px; height: 18px; font-size: .66rem; z-index: 1; }
.chip .flag { position: absolute; top: 18px; right: 0; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--shell); font-size: .56rem; }
.chip .flag.ok { background: var(--green); color: #fff; }
.chip .nm { font-size: .62rem; font-weight: 600; max-width: 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-dot { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: .92rem; flex: none; }

.ipod-top { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 0 4px; }
.round-num { display: flex; align-items: baseline; font-weight: 800; letter-spacing: -0.05em; }
.round-num b { font-size: 2.6rem; line-height: 1; }
.round-num span { font-size: 1.1rem; color: var(--soft); margin-left: 2px; }
.ipod-meta { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.ipod-meta .when { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.ipod-meta .small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ring-btn { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--ink); background: var(--shell); display: grid; place-items: center; }
.ring-btn svg { width: 20px; height: 20px; }

.screen-lcd { width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: center; }
.screen-lcd.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.answer-form { width: 100%; }
.answer-form .lcd { text-align: center; border-radius: 999px; }
.lcd-msg { width: 100%; min-height: 52px; border-radius: 999px; padding: 8px 16px; display: grid; place-items: center; text-align: center;
  font-weight: 600; font-size: .95rem; background: var(--well); color: var(--soft-ink); }
.lcd-msg.ok { background: var(--green); color: #fff; }
.reveal-title { text-align: center; display: flex; flex-direction: column; gap: 2px; padding: 2px 6px; }
.reveal-title b { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
.reveal-title span { color: var(--soft-ink); font-weight: 500; }
.hint { min-height: 18px; margin-top: -4px; font-size: .86rem; font-weight: 600; color: var(--coral); text-align: center; }

/* --- Molette -------------------------------------------------------------- */
.wheel-zone { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; }
.side-key { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--well); color: var(--soft-ink); justify-self: center; }
.side-key svg { width: 18px; height: 18px; }
.wheel { --w: min(58vw, 224px); position: relative; width: var(--w); height: var(--w); border-radius: 50%; background: var(--ink);
  box-shadow: 0 0 0 8px var(--well), 0 14px 30px -10px rgba(0, 0, 0, .5); margin: 8px 0; }
.wheel-btn { position: absolute; width: 30%; height: 30%; border: 0; background: transparent; color: var(--shell); display: grid; place-items: center; border-radius: 50%; }
.wheel-btn svg { width: calc(var(--w) * .11); height: calc(var(--w) * .11); max-width: 28px; max-height: 28px; }
.wheel-btn:active:not([disabled]) { background: rgba(255,255,255,.08); }
.wheel-btn[disabled] { opacity: .3; }
.wheel-btn.idle { pointer-events: none; }
.wheel-btn.top { top: 2%; left: 35%; }
.wheel-btn.bottom { bottom: 2%; left: 35%; }
.wheel-btn.left { left: 2%; top: 35%; }
.wheel-btn.right { right: 2%; top: 35%; }
.wheel-center { position: absolute; inset: 29%; border-radius: 50%; border: 0; background: var(--shell); color: var(--ink);
  font-weight: 800; font-size: calc(var(--w) * .12); letter-spacing: -0.02em; display: grid; place-items: center; transition: transform .1s ease;
  box-shadow: inset 0 -3px 0 rgba(120, 40, 100, .18); }
.wheel-center svg { width: 24px; height: 24px; }
.wheel-center:active { transform: scale(.94); }
.wheel-center[disabled] { color: var(--soft); }

/* --- Révélation ----------------------------------------------------------- */
.reveal-panel { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.finders { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.finder { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--well); font-size: .8rem; font-weight: 600; }
.finder b { color: var(--green); font-weight: 700; }
.fastest { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 999px; background: var(--c);
  color: #fff; animation: enter .4s .2s ease both; }
.fastest .lbl { font-size: .82rem; font-weight: 600; opacity: .85; }
.fastest .who { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }
.fastest .t { margin-left: auto; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.03em; }
.nobody { text-align: center; font-weight: 600; padding: 14px; border-radius: 999px; background: var(--well); }
.scores { display: flex; flex-direction: column; gap: 4px; padding: 10px; }
.score-row { display: flex; align-items: center; gap: 12px; padding: 6px 8px; }
.score-row .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.score-row .plus { font-size: .85rem; font-weight: 700; color: var(--green); }
.score-row .tag { font-size: .78rem; color: var(--soft-ink); }
.score-row .rank { width: 1.4em; font-weight: 700; color: var(--soft-ink); }
.next-zone { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.next-bar { height: 6px; border-radius: 3px; background: var(--well); overflow: hidden; }
.next-bar i { display: block; height: 100%; width: 0; background: var(--ink); }

/* --- Avatars -------------------------------------------------------------- */
.av-dot { flex: none; border-radius: 50%; padding: 3px; background: var(--c); display: inline-block; }
.av-dot img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-pick { position: relative; display: block; width: 130px; height: 130px; margin: 4px auto 6px; border-radius: 50%; border: 0; padding: 6px; background: var(--blue); }
.avatar-pick img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-pick .edit { position: absolute; right: 0; bottom: 4px; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--shell); display: grid; place-items: center; }
.avatar-pick .edit svg { width: 18px; height: 18px; }
.device > .field, .device > .btn { margin-top: 14px; }

/* --- Salon ---------------------------------------------------------------- */
.code-block { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 4px 0 6px; }
.room-code { font-weight: 800; font-size: min(14vw, 3.4rem); letter-spacing: .12em; padding-left: .12em; line-height: 1; }
.code-block .row { display: flex; gap: 8px; }
.player-list { display: flex; flex-direction: column; gap: 12px; }
.player-row { display: flex; align-items: center; gap: 12px; }
.player-row .meta { flex: 1; min-width: 0; }
.player-row .nm { font-weight: 700; }
.player-row .pl { font-size: .84rem; color: var(--soft-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-row .pl.ready { color: var(--ink); }
.player-row .pl.ready::before { content: '● '; color: var(--green); }
.player-row .host { font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--shell); }
.player-row.offline { opacity: .45; }
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.service { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 12px; border-radius: 18px; border: 0;
  background: var(--well); text-align: left; font-weight: 700; font-size: .95rem; }
.service .logo { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; }
.service .logo svg { width: 16px; height: 16px; }
.service small { display: block; font-size: .72rem; color: var(--soft-ink); font-weight: 500; }
.service[disabled] { opacity: .45; }
.my-playlist { display: flex; align-items: center; gap: 14px; }
.my-playlist img, .my-playlist .ph { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; background: var(--well); }
.my-playlist .meta { flex: 1; min-width: 0; }
.my-playlist .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 6px; border-radius: 3px; background: var(--well); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--ink); transition: width .4s ease; }
.footer-action { position: sticky; bottom: 0; margin: auto -14px calc(-18px - var(--safe-b)); padding: 22px 14px calc(14px + var(--safe-b));
  display: flex; flex-direction: column; gap: 8px; text-align: center; z-index: 3;
  background: linear-gradient(to top, var(--pink) 60%, rgba(247, 201, 236, 0)); }

.waiting-host { min-height: 58px; border-radius: 999px; background: var(--shell); display: flex; align-items: center; justify-content: center;
  gap: 10px; font-weight: 700; box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 10px 24px -14px rgba(120, 40, 100, .5); }

/* --- Fin de partie (tient dans l'écran) -------------------------------- */
.screen.end { gap: 12px; }
.end-title { font-weight: 800; font-size: 1.9rem; line-height: 1; letter-spacing: -0.045em; text-align: center; padding-top: 4px; }
.podium { display: grid; grid-template-columns: 1fr 1.2fr 1fr; align-items: end; gap: 6px; }
.podium .step { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; }
.podium .first { padding-bottom: 12px; }
.podium-av { position: relative; display: inline-block; }
.podium .medal { position: absolute; right: -6px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: .9rem; box-shadow: 0 0 0 3px var(--pink); }
.podium .first .medal { width: 32px; height: 32px; font-size: 1.05rem; }
.podium .nm { font-weight: 700; margin-top: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .pts { font-size: .8rem; color: var(--soft-ink); font-weight: 600; }
.rest { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.rest-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--shell); font-size: .82rem; font-weight: 600; }
.rest-item b { font-weight: 800; }
.rest-item span { color: var(--soft-ink); }
.recap-box { padding: 14px; }
.recap-box .section-title { margin-bottom: 10px; font-size: 1rem; }
.recap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px 8px; }
.recap figure { margin: 0; min-width: 0; }
.recap img { width: 100%; aspect-ratio: 1; height: auto; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--ink); }
.recap figcaption { font-size: .64rem; font-weight: 600; margin-top: 5px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.end-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.end-actions .row2 { display: flex; gap: 8px; }
.end-actions .row2 .btn { flex: 1; }
@media (max-height: 640px) {
  .screen.end { gap: 8px; }
  .end-title { font-size: 1.6rem; }
  .recap-box { padding: 10px 12px; }
  .recap-box .section-title { margin-bottom: 6px; }
  .recap { gap: 6px 8px; }
  .end-actions .btn.big { min-height: 50px; }
}

/* --- Feuille (bottom sheet) ---------------------------------------------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(40, 0, 30, .35); animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 520px; margin: 0 auto; max-height: 88dvh;
  display: flex; flex-direction: column; border-radius: 30px 30px 0 0; padding: 10px 16px calc(18px + var(--safe-b));
  background: var(--shell); animation: rise .28s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes rise { from { transform: translateY(100%); } }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-body { overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding-bottom: 6px; }
.pl-list { display: flex; flex-direction: column; gap: 2px; }
.pl-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 18px; border: 0; background: transparent; text-align: left; width: 100%; }
.pl-item:active, .pl-item:hover { background: var(--well); }
.pl-item img, .pl-item .ph { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; background: var(--well); display: grid; place-items: center; }
.pl-item .ph svg { width: 18px; height: 18px; }
.pl-item .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-item .meta { flex: 1; min-width: 0; }
.menu-list { display: flex; flex-direction: column; gap: 4px; }
.menu-list button { text-align: left; padding: 15px 14px; border-radius: 16px; border: 0; background: var(--well); font-size: 1rem; font-weight: 600; }
.menu-list .danger { background: var(--coral); color: #fff; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--well); border-top-color: var(--ink); animation: spin .8s linear infinite; }
.center { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; color: var(--soft-ink); }


/* ==========================================================================
   Accueil : choix du jeu
   ========================================================================== */
.modes { display: flex; flex-direction: column; gap: 12px; }
.mode-card { display: flex; align-items: center; gap: 16px; padding: 16px; border: 0; border-radius: 30px; text-align: left;
  background: var(--shell); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 20px 40px -24px rgba(120, 40, 100, .5);
  transition: transform .12s ease; }
.mode-card:active { transform: scale(.98); }
.mode-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mode-txt b { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
.mode-txt span { font-size: .88rem; color: var(--soft-ink); line-height: 1.3; }
.mode-icon { flex: none; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; }
/* Blind test : la molette */
.wheel-icon { background: #000; box-shadow: 0 0 0 5px var(--well); }
.wheel-icon i { width: 28px; height: 28px; border-radius: 50%; background: var(--shell); }
/* C'est à qui ? : un écran vertical avec lecture, sur fond rose/bleu en aplats */
.mode-icon.mode-reel { background: var(--blue); color: #fff; box-shadow: 0 0 0 5px var(--well); }
.mode-icon.mode-reel svg { width: 38px; height: 38px; }
.mode-tag { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; margin-top: -4px; }
.mode-tag .mode-icon { width: 34px; height: 34px; box-shadow: none; }
.mode-tag .mode-icon.mode-reel svg { width: 18px; height: 18px; }
.mode-tag .wheel-icon { box-shadow: 0 0 0 3px var(--well); }
.mode-tag .wheel-icon i { width: 12px; height: 12px; }
.join-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; }

/* ==========================================================================
   Salon : mes photos et vidéos
   ========================================================================== */
.media-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.media-tile { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--well); border: 0; padding: 0; }
.media-tile img { width: 100%; height: 100%; object-fit: cover; }
.media-tile img.broken { visibility: hidden; }
.media-tile.add { display: grid; place-items: center; color: var(--soft-ink); box-shadow: inset 0 0 0 2px var(--line); }
.media-tile.add svg { width: 22px; height: 22px; }
.media-tile .kind { position: absolute; left: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.media-tile .kind svg { width: 10px; height: 10px; }
.media-tile .rm { position: absolute; right: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; padding: 0; }
.media-tile .rm svg { width: 12px; height: 12px; }
.media-note { margin-top: 10px; }
.ok-dot { color: var(--green); }
.btn svg { width: 20px; height: 20px; }

.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.review-tile { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; border: 0; padding: 0; background: #000; opacity: .38;
  transition: opacity .15s ease, transform .12s ease; }
.review-tile.on { opacity: 1; box-shadow: 0 0 0 3px var(--ink); }
.review-tile:active { transform: scale(.97); }
.review-tile img, .review-tile video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.review-tile .tick { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.75); color: transparent; }
.review-tile.on .tick { background: var(--green); color: #fff; }
.review-tile .tick svg { width: 14px; height: 14px; }
.review-tile .kind { position: absolute; left: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.review-tile .kind svg { width: 11px; height: 11px; }
.review-tile .too-big { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px; background: var(--coral); color: #fff; font-size: .7rem; font-weight: 700; }
.recap img.broken { visibility: hidden; }
.suggest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.suggest-tile { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--well); animation: enter .25s ease both; }
.suggest-tile img { width: 100%; height: 100%; object-fit: cover; }
.suggest-tile .rm { position: absolute; right: 5px; top: 5px; width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.suggest-tile .rm svg { width: 14px; height: 14px; }
.suggest-actions { display: flex; gap: 8px; }
.suggest-actions .btn { flex: 1; }
.sheet-body #sendMedia { position: sticky; bottom: 0; flex: none; box-shadow: 0 -12px 16px 4px var(--shell); }

/* ==========================================================================
   Jeu « C'est à qui ? » : présentation d'un post Instagram
   ========================================================================== */
body.in-reel { background: #fff; }
body.in-reel #app { max-width: 520px; padding: 0; }
.post { position: fixed; inset: 0; max-width: 520px; margin: 0 auto; background: #fff; color: #000; display: flex; flex-direction: column;
  padding-top: var(--safe-t); padding-bottom: var(--safe-b); }
.post-top { flex: none; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 8px 0 14px; border-bottom: 1px solid #efefef; }
.post-brand { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.04em; margin-right: auto; }
.post-brand span { color: var(--soft); }
.post-time { font-weight: 700; font-size: .9rem; padding: 4px 10px; border-radius: 999px; background: #efefef; }
.post-time.urgent { background: var(--coral); color: #fff; }
.post-icon { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; color: #000; }
.post-icon svg { width: 22px; height: 22px; }
.post-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px; }
.post-head .who { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.post-head .who b { font-size: .95rem; font-weight: 700; }
.post-head .who span { font-size: .78rem; color: #737373; }
.post-head .mystery { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff;
  background: #c7c7c7; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--pink); }
.post-head .av-dot { animation: pop .5s ease both; }
.post-round { margin-left: auto; font-size: .78rem; font-weight: 600; color: #737373; }
.post-photo { position: relative; flex: 0 1 auto; min-height: 0; height: min(100vw, 46dvh); background: #fafafa; overflow: hidden; }
.post-photo img { width: 100%; height: 100%; object-fit: contain; display: block; transition: filter .3s ease; }
.post-photo.waiting img { filter: blur(26px); }
.post-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0,0,0,.08); }
.post-progress i { display: block; height: 100%; width: 100%; background: var(--blue); }
.post.revealed .post-progress { display: none; }
.post-center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.post-count-big { width: 90px; height: 90px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center;
  font-size: 2.8rem; font-weight: 800; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: pop .9s ease both; }
.post-actions { flex: none; display: flex; align-items: center; gap: 14px; padding: 8px 14px 2px; position: relative; }
.post-actions .act { width: 26px; height: 26px; color: #000; }
.post-actions .act svg { width: 26px; height: 26px; }
.post-actions .act.right { margin-left: auto; }
.post-actions .like-btn { border: 0; padding: 0; background: none; cursor: pointer; transition: transform .1s ease; }
.post-actions .like-btn:active { transform: scale(.85); }
.post-actions .act.liked { color: #ff3040; animation: pop .4s ease both; }
.like-count { flex: none; font-size: .9rem; font-weight: 700; padding: 2px 14px 0; min-height: 0; }
.like-count:empty { display: none; }
.post-photo { touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.like-burst { position: absolute; left: 50%; top: 50%; z-index: 3; width: 96px; height: 96px; margin: -48px 0 0 -48px; color: #fff; opacity: 0; pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }
.like-burst svg { width: 100%; height: 100%; fill: currentColor; }
.like-burst.show { animation: burst .8s ease both; }
@keyframes burst { 0% { opacity: 0; transform: scale(.3); } 20% { opacity: 1; transform: scale(1.15); } 40% { transform: scale(.95); } 75% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.05); } }
.post-photo.text .like-burst { display: none; }
.recap figure.has-likes { position: relative; }
.likes-badge { position: absolute; top: 2px; right: 0; padding: 2px 6px; border-radius: 999px; background: #ff3040; color: #fff; font-size: .62rem; font-weight: 800; }
.post-actions .act.liked svg { fill: currentColor; }
.post-dots { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -30%); display: flex; gap: 4px; }
.post-dots i { width: 6px; height: 6px; border-radius: 50%; background: #dbdbdb; }
.post-dots i.on { background: var(--blue); }
.post-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 6px 14px 12px; overflow-y: auto; }
.post-likes { font-size: .95rem; }
.post-caption { font-size: .92rem; line-height: 1.35; }
.post-caption b { margin-right: 4px; }
.vote-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 2px; }
.vote-row { display: flex; align-items: center; gap: 8px; min-height: 50px; padding: 6px 8px; border-radius: 14px; border: 0;
  background: #f3f3f3; text-align: left; color: #000; transition: transform .1s ease, opacity .2s ease, background .15s ease; }
.vote-row .nm { flex: 1; min-width: 0; font-weight: 700; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-row .pick { flex: none; font-size: .78rem; font-weight: 700; padding: 6px 10px; border-radius: 8px; background: var(--blue); color: #fff; }
.vote-row:active { transform: scale(.97); }
.vote-list.locked .vote-row { opacity: .4; }
.vote-list.locked .vote-row.picked { opacity: 1; background: #fff; box-shadow: inset 0 0 0 2px var(--blue); }
.vote-list.locked .vote-row.picked .pick { background: #efefef; color: #000; }
.vote-row[disabled] { pointer-events: none; }
.post-comments { display: flex; flex-direction: column; gap: 8px; }
.post-empty { font-size: .88rem; color: #737373; }
.post-comment { display: flex; align-items: center; gap: 8px; font-size: .9rem; animation: enter .25s ease both; }
.post-comment p { flex: 1; min-width: 0; }
.post-comment em { font-style: normal; font-weight: 700; color: var(--green); }
.post-comment em.no { color: #b0b0b0; }
.post-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.btn-ig { background: var(--blue); color: #fff; min-height: 46px; border-radius: 12px; }


/* ==========================================================================
   « Qui a écrit ça ? »
   ========================================================================== */
.mode-icon.mode-quote { background: var(--coral); color: #fff; box-shadow: 0 0 0 5px var(--well); }
.mode-icon.mode-quote svg { width: 36px; height: 36px; }
.mode-tag .mode-icon.mode-quote { box-shadow: none; background: var(--coral); color: #fff; }
.mode-tag .mode-icon.mode-quote svg { width: 18px; height: 18px; }
.how p { font-size: .92rem; color: var(--soft-ink); }
.how p + p { margin-top: 8px; }

.post-question { flex: none; padding: 0 14px 8px; font-weight: 700; font-size: 1rem; line-height: 1.25; }
.post-photo.text { background: var(--card, var(--blue)); display: grid; place-items: center; }
.post-photo.text { height: min(78vw, 34dvh); }
.post.revealed .post-photo.text { height: min(60vw, 26dvh); }
.post.revealed .post-photo.text .post-text p { font-size: clamp(1.15rem, 5vw, 1.7rem); }
.post-text { padding: 24px; max-width: 100%; }
.post-text p { color: #fff; font-weight: 800; font-size: clamp(1.4rem, 6.5vw, 2.2rem); line-height: 1.15; letter-spacing: -0.03em; text-align: center;
  overflow-wrap: anywhere; }
.post-photo.text.waiting .post-text { filter: blur(14px); }
.post-photo.text .post-progress { background: rgba(255,255,255,.25); }
.post-photo.text .post-progress i { background: #fff; }

.post.write .write-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 18px 16px 16px; overflow-y: auto; }
.write-step { font-size: .85rem; font-weight: 700; color: #737373; }
.write-q { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.12; }
.write-form { display: flex; flex-direction: column; gap: 8px; }
.write-input { width: 100%; border: 0; border-radius: 16px; padding: 14px 16px; background: #f3f3f3; font: inherit; font-size: 1.1rem; resize: none; outline: none; }
.write-input:focus { box-shadow: inset 0 0 0 2px var(--blue); }
.write-row { display: flex; align-items: center; justify-content: space-between; }
.write-row .btn { min-width: 120px; }
.write-sent { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; border-radius: 18px; background: #f3f3f3; text-align: center; }
.write-sent p { font-weight: 700; font-size: 1.1rem; }
.write-sent .tick { width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }
.write-sent .tick svg { width: 20px; height: 20px; }
.write-who { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: auto; }
.write-who span { opacity: .35; transition: opacity .2s ease; }
.write-who span.done { opacity: 1; }

.recap-answers { display: flex; flex-direction: column; gap: 10px; max-height: 30dvh; overflow-y: auto; padding-right: 4px; }
.service.off { opacity: .45; }
.recap-answers .ra { display: flex; flex-direction: column; gap: 2px; }
.recap-answers .q { font-size: .78rem; color: var(--soft-ink); font-weight: 600; }
.recap-answers .a { font-size: .9rem; font-weight: 600; }
.recap-answers .a b { color: var(--blue); }
.recap-answers .a.none { color: var(--soft-ink); font-weight: 500; }


/* --- « Qui a écrit ça ? » : écran questionnaire (même palette que le reste) --- */
.screen.quiz { gap: 12px; min-height: 0; }
.quiz-top { flex: none; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding-top: 2px; }
.quiz-time { font-weight: 800; font-size: .9rem; padding: 6px 10px; border-radius: 999px; background: var(--well); min-width: 52px; text-align: center; }
.quiz-time.urgent { background: var(--coral); color: #fff; }
.quiz-progress { position: relative; height: 6px; border-radius: 3px; background: var(--well); margin: 0 18px; }
.quiz-progress i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--blue); }
.quiz-pill { position: absolute; top: 50%; transform: translate(-50%, -50%); padding: 5px 12px; border-radius: 999px; background: #fff; color: #000;
  font-weight: 800; font-size: .82rem; box-shadow: 0 4px 12px rgba(90, 40, 80, .18); white-space: nowrap; }
.quiz-icon { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; }
.quiz-icon svg { width: 22px; height: 22px; }
.quiz-q { font-weight: 800; font-size: clamp(1.7rem, 8vw, 2.4rem); line-height: 1.02; letter-spacing: -0.045em; margin-top: 6px; }
.quiz-q.small-q { font-size: 1.35rem; margin-top: 2px; }
.quiz-ask { font-weight: 700; font-size: .95rem; color: var(--soft-ink); line-height: 1.25; }
.quiz-write { display: flex; flex-direction: column; gap: 6px; }
.quiz-input { width: 100%; border: 0; border-radius: 22px; padding: 16px 18px; background: var(--well); font: inherit; font-size: 1.1rem; font-weight: 600;
  resize: none; outline: none; box-shadow: inset 0 2px 6px rgba(120, 40, 100, .12); }
.quiz-input::placeholder { color: var(--soft); }
.quiz-input:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.quiz-count { align-self: flex-end; }
.quiz-options { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px; }
.quiz-option { flex: none; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 16px 8px 10px; border-radius: 22px; border: 0;
  background: var(--shell); color: var(--ink); text-align: left; font-weight: 600; font-size: 1.02rem;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 8px 20px -14px rgba(120, 40, 100, .5); transition: transform .1s ease, background .15s ease; }
.quiz-option:active:not([disabled]) { transform: scale(.98); }
.quiz-option .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiz-option .ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; flex: none; }
.quiz-option .ico svg { width: 18px; height: 18px; }
.quiz-option .chk { width: 22px; height: 22px; flex: none; }
.quiz-option .chk svg { width: 22px; height: 22px; }
.quiz-option.selected { background: var(--ink); color: #fff; }
.quiz-option.selected.static .txt { white-space: normal; }
.quiz-option.author { background: var(--green); color: #fff; }
.quiz-option[disabled] { cursor: default; }
.screen.quiz:not(.revealed) .quiz-options:has(.selected) .quiz-option:not(.selected)[disabled] { opacity: .45; }
.quiz-option .tag { flex: none; font-size: .8rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--well); color: var(--soft-ink); }
.quiz-option .tag.ok { background: var(--green); color: #fff; }
.quiz-option.author .tag { background: rgba(255,255,255,.25); color: #fff; }
.quiz-card { position: relative; flex: none; border-radius: 28px; background: var(--blue); color: #fff; padding: 22px 20px 26px; overflow: hidden;
  min-height: 110px; display: grid; place-items: center; }
.quiz-card p { font-weight: 800; font-size: clamp(1.2rem, 5.6vw, 1.7rem); line-height: 1.15; letter-spacing: -0.03em; text-align: center; overflow-wrap: anywhere; }
.quiz-card.waiting p { filter: blur(12px); }
.quiz-card-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,.2); }
.quiz-card-bar i { display: block; height: 100%; width: 100%; background: #fff; }
.screen.quiz.revealed .quiz-card-bar { display: none; }
.quiz-foot { flex: none; margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.quiz-note { font-weight: 600; font-size: .95rem; text-align: center; }
.screen.quiz .write-who { margin-top: 0; }
@media (max-height: 640px) {
  .screen.quiz { gap: 8px; }
  .quiz-option { min-height: 50px; }
  .quiz-card { min-height: 84px; padding: 16px 16px 20px; }
  .quiz-q { font-size: 1.6rem; }
}


/* ==========================================================================
   « Qui a écrit ça ? » : style propre (coucher de soleil, carte sombre)
   ========================================================================== */
body.in-game.in-quiz { background: linear-gradient(180deg, #9d8ba6 0%, #c2949c 30%, #e9a27d 62%, #f3874a 86%, #ee6a35 100%); background-attachment: fixed; }
body.in-quiz::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 45% at 62% 58%, rgba(28, 14, 10, .55), transparent 70%), radial-gradient(40% 30% at 20% 45%, rgba(60, 28, 22, .25), transparent 70%); }
body.in-quiz #app { padding: calc(10px + var(--safe-t)) 10px calc(12px + var(--safe-b)); }
body.in-quiz .screen.quiz { gap: 0; }
.quiz-card-shell { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 20px 18px 18px; border-radius: 44px;
  color: #f6efe6; background: linear-gradient(180deg, rgba(58, 36, 30, .62), rgba(26, 16, 13, .74));
  border: 1px solid rgba(255, 236, 220, .16); box-shadow: 0 40px 80px -30px rgba(40, 12, 4, .7), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(28px) saturate(1.25); -webkit-backdrop-filter: blur(28px) saturate(1.25); }
body.in-quiz .quiz-top { grid-template-columns: auto 1fr auto; gap: 10px; }
body.in-quiz .quiz-time { background: rgba(255,255,255,.1); color: #f6efe6; font-weight: 600; }
body.in-quiz .quiz-time.urgent { background: #ff6a3d; color: #fff; }
body.in-quiz .quiz-icon { color: #fff; }
body.in-quiz .quiz-icon svg { width: 24px; height: 24px; }
body.in-quiz .quiz-progress { height: 4px; background: rgba(255,255,255,.16); margin: 0 22px; }
body.in-quiz .quiz-progress i { background: linear-gradient(90deg, #f7d6b6, #f2a274); }
body.in-quiz .quiz-pill { background: #fff; color: #111; font-weight: 600; padding: 7px 14px; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
body.in-quiz .quiz-q { color: #f8f0c8; font-weight: 600; font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.04; letter-spacing: -0.035em; margin-top: 10px; }
body.in-quiz .quiz-q.small-q { font-size: clamp(1.5rem, 6.8vw, 1.9rem); margin-top: 0; }
body.in-quiz .quiz-ask { color: rgba(246, 239, 230, .7); font-weight: 500; }
/* Bulle brillante, comme le mot mis en avant sur la maquette */
.gloss { display: inline-block; position: relative; padding: .1em .55em .16em; margin: 0 .05em; border-radius: 999px; transform: rotate(-7deg);
  font-size: .62em; font-weight: 600; letter-spacing: 0; vertical-align: .22em; color: #fff;
  background: linear-gradient(180deg, rgba(120, 90, 80, .9), rgba(30, 20, 18, .95));
  box-shadow: inset 0 2px 3px rgba(255,255,255,.45), inset 0 -3px 6px rgba(0,0,0,.5), 0 8px 18px rgba(0,0,0,.4); }
.gloss::after { content: ''; position: absolute; left: 14%; right: 30%; top: 8%; height: 34%; border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0)); }
.gloss.float { position: absolute; top: -14px; left: 14px; z-index: 2; font-size: .85rem; }
body.in-quiz .quiz-write { position: relative; margin-top: 8px; }
body.in-quiz .quiz-input { background: rgba(20, 12, 10, .45); color: #f6efe6; border: 1px solid rgba(255,255,255,.1); border-radius: 26px; padding: 22px 20px 18px;
  box-shadow: none; font-weight: 500; }
body.in-quiz .quiz-input::placeholder { color: rgba(246, 239, 230, .45); }
body.in-quiz .quiz-input:focus { border-color: rgba(248, 240, 200, .5); box-shadow: none; }
body.in-quiz .quiz-count, body.in-quiz .small { color: rgba(246, 239, 230, .6); }
body.in-quiz .quiz-options { gap: 10px; }
body.in-quiz .quiz-option { min-height: 64px; border-radius: 28px; padding: 10px 20px 10px 14px; gap: 14px; color: #f6efe6; font-weight: 500; font-size: 1.05rem;
  background: rgba(24, 14, 11, .34); border: 1px solid rgba(255,255,255,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
body.in-quiz .quiz-option.selected { background: rgba(8, 5, 4, .82); border-color: rgba(255,255,255,.05); color: #fff; }
body.in-quiz .quiz-option .chk { color: #fff; }
body.in-quiz .quiz-option.author { background: rgba(248, 240, 200, .16); border-color: rgba(248, 240, 200, .55); color: #f8f0c8; }
body.in-quiz .quiz-option .tag { background: rgba(255,255,255,.1); color: rgba(246, 239, 230, .8); font-weight: 600; }
body.in-quiz .quiz-option .tag.ok { background: rgba(160, 230, 170, .2); color: #b9f0c0; }
body.in-quiz .quiz-option.author .tag { background: #f8f0c8; color: #2a1a14; }
body.in-quiz .quiz-option .ico { background: rgba(248, 240, 200, .16); color: #f8f0c8; }
body.in-quiz .quiz-option.decoy .txt { font-style: italic; }
body.in-quiz .quiz-option .av-dot { padding: 2px; }
body.in-quiz .screen.quiz:not(.revealed) .quiz-options:has(.selected) .quiz-option:not(.selected)[disabled] { opacity: .5; }
body.in-quiz .quiz-card { background: rgba(255, 245, 230, .1); border: 1px solid rgba(255, 236, 220, .18); border-radius: 30px; color: #f8f0c8; min-height: 100px; }
body.in-quiz .quiz-card p { font-weight: 600; letter-spacing: -0.02em; }
body.in-quiz .quiz-card-bar { background: rgba(255,255,255,.1); }
body.in-quiz .quiz-card-bar i { background: linear-gradient(90deg, #f7d6b6, #f2a274); }
body.in-quiz .post-count-big { background: #fff; color: #111; }
body.in-quiz .quiz-note { color: #f6efe6; font-weight: 500; }
body.in-quiz .next-bar { background: rgba(255,255,255,.14); }
body.in-quiz .next-bar i { background: #f8f0c8; }
body.in-quiz .btn-dark { background: #fff; color: #111; min-height: 64px; border-radius: 32px; font-weight: 500; font-size: 1.1rem; }
body.in-quiz .btn-dark[disabled] { opacity: .45; }
body.in-quiz .btn-outline { color: #f6efe6; box-shadow: inset 0 0 0 1.5px rgba(246, 239, 230, .55); min-height: 64px; border-radius: 32px; font-weight: 500; }
body.in-quiz .write-who .av-dot { padding: 2px; }
body.in-quiz .sheet .small { color: var(--soft-ink); }
@media (max-height: 640px) {
  .quiz-card-shell { padding: 14px 14px 14px; gap: 10px; border-radius: 34px; }
  body.in-quiz .quiz-option { min-height: 52px; }
  body.in-quiz .btn-dark, body.in-quiz .btn-outline { min-height: 54px; }
  body.in-quiz .quiz-q { font-size: 1.8rem; }
}


/* --- « Qui a écrit ça ? » : associer chaque réponse à la bonne personne --- */
.match-list { gap: 10px; }
.match-list.waiting .mcard p { filter: blur(10px); }
.mcard { flex: none; border-radius: 26px; padding: 14px 14px 12px; background: rgba(24, 14, 11, .34); border: 1px solid rgba(255,255,255,.08); }
.mcard p { color: #f8f0c8; font-weight: 600; font-size: 1.08rem; line-height: 1.25; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.mcard.mine { opacity: .45; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mcard.mine p { color: #f6efe6; font-weight: 500; }
.mtag { flex: none; font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.12); color: #f6efe6; }
.mcard.set { border-color: rgba(248, 240, 200, .35); }
.mrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.mpick { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 3px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06); color: #f6efe6; font: inherit; font-size: .88rem; font-weight: 500; transition: background .15s ease, transform .1s ease; }
.mpick:active:not([disabled]) { transform: scale(.95); }
.mpick.on { background: #f8f0c8; color: #2a1a14; border-color: #f8f0c8; font-weight: 700; }
.mpick.used { opacity: .4; }
.mpick[disabled] { cursor: default; }
.mcard.locked .mpick:not(.on) { opacity: .3; }
.mpick .av-dot, .mchip .av-dot { padding: 1px; }
.mchip-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(248, 240, 200, .18); color: #f8f0c8; flex: none; }
.mpick.on .mchip-ico { background: #2a1a14; color: #f8f0c8; }
.mchip-ico svg { width: 14px; height: 14px; }
.mchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 3px; border-radius: 999px; font-size: .9rem; font-weight: 700; }
.mchip.author { background: #f8f0c8; color: #2a1a14; }
.mverdict { font-size: .85rem; font-weight: 600; color: rgba(246, 239, 230, .8); }
.mcard.good { border-color: rgba(160, 230, 170, .6); background: rgba(90, 170, 110, .18); }
.mcard.good .mverdict { color: #b9f0c0; font-size: 1rem; }
.mcard.bad .mverdict { color: #ffb3a0; }
body.in-quiz .quiz-note b { color: #f8f0c8; }

/* Alerte : serveur pas à jour */
.stale-server { position: fixed; left: 10px; right: 10px; top: calc(10px + var(--safe-t)); z-index: 50; pointer-events: none; padding: 12px 16px; border-radius: 18px;
  background: var(--coral); color: #fff; font-weight: 700; font-size: .9rem; text-align: center; }

/* --- Toast & son ---------------------------------------------------------- */
#toast { position: fixed; left: 50%; top: calc(14px + var(--safe-t)); z-index: 40; transform: translate(-50%, -20px);
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--shell); font-weight: 600; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--coral); color: #fff; }
.sound-gate { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(247, 201, 236, .85); }
.sound-gate svg { width: 20px; height: 20px; }

/* --- Plein écran pendant une manche (aucun défilement) ------------------ */
body.in-game { overflow: hidden; overscroll-behavior: none; background: var(--shell); }
/* En partie, l'écran entier devient la façade de l'iPod : pas de cadre */
.screen.game .ipod { border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 4px 0 0 !important; }
body.in-game #app { height: 100dvh; min-height: 0; padding-top: calc(8px + var(--safe-t)); padding-bottom: calc(22px + var(--safe-b)); }
.screen.game { min-height: 0; gap: 8px; }
.screen.game .ipod { flex: 1; min-height: 0; justify-content: space-between; gap: 6px; padding: 12px 14px 14px; }
.screen.game .round-num b { font-size: 2rem; }
.screen.game .grille { --size: min(84vw, 36dvh, 320px); flex: none; }
.screen.game .wheel { --w: min(70vw, 29dvh, 280px); margin: 2px 0 6px; }
.screen.game .wheel-zone { grid-template-columns: 1fr; justify-items: center; }
.screen.game .side-key { display: none; }
/* Vue du propriétaire : disque réduit, propositions des autres en direct */
.screen.game.owner-view .grille { --size: min(78vw, 34dvh, 300px); }
.screen.game.owner-view .ipod { justify-content: flex-start; }
.mute-mini { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--well); color: var(--soft-ink); margin-top: 2px; }
.mute-mini svg { width: 18px; height: 18px; }
.owner-title { width: 100%; text-align: center; display: flex; flex-direction: column; gap: 1px; }
.owner-title span { font-size: .78rem; font-weight: 600; color: var(--soft-ink); }
.owner-title b { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.owner-title em { font-style: normal; font-size: .85rem; color: var(--soft-ink); }
.feed { width: 100%; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
  padding: 6px; border-radius: 20px; background: var(--well); box-shadow: inset 0 2px 6px rgba(120, 40, 100, .15); }
.feed-empty { margin: auto; text-align: center; font-size: .85rem; color: var(--soft-ink); padding: 10px; }
.feed-item { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--shell);
  font-size: .86rem; animation: enter .25s ease both; }
.feed-item .who { font-weight: 700; flex: none; }
.feed-item .what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft-ink); }
.feed-item.ok { background: var(--green); color: #fff; }
.feed-item.ok .what { color: rgba(255,255,255,.85); }
.feed-item b { font-weight: 800; flex: none; }
.screen.game .chip .av { box-shadow: 0 0 0 2px var(--pink); }
@media (max-height: 640px) {
  .screen.game { gap: 4px; }
  .screen.game .ipod { gap: 4px; }
  .screen.game .round-num b { font-size: 1.6rem; }
  .screen.game .ring-btn { width: 36px; height: 36px; border-width: 3px; }
  .screen.game .ipod-meta .when { font-size: 1rem; }
  .screen.game .grille { --size: min(80vw, 33dvh); }
  .screen.game .wheel { --w: min(60vw, 27dvh); box-shadow: 0 0 0 6px var(--well); }
  .screen.game.owner-view .grille { --size: min(70vw, 30dvh); }
  .screen.game .side-key { width: 34px; height: 34px; }
  .screen.game .lcd, .screen.game .lcd-msg { min-height: 40px; font-size: .95rem; }
  .screen.game .screen-lcd { min-height: 40px; }
  .screen.game .reveal-title b { font-size: 1.25rem; }
  .screen.game .fastest { padding: 5px 14px 5px 5px; }
  .chip .nm { display: none; }
  .chip .flag { top: 16px; }
}
.screen.game .wheel-zone { align-items: center; }
.screen.game .screen-lcd { min-height: 48px; }
.screen.game .lcd, .screen.game .lcd-msg { min-height: 46px; }
.screen.game .hint { min-height: 16px; margin-top: -2px; }
.screen.game .neck { display: none; }

@media (min-width: 760px) {
  #app { padding-top: 32px; }
  .grille { --size: 300px; }
  .wheel { --w: 224px; }
  body.in-game #app { max-height: 920px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .disc { animation: none; }
}
