/* ==========================================================================
   Le Village des Blackops — direction artistique « bande dessinée » 2D
   Plateau = décor fixe ; interface = encadrés BD discrets autour du plateau.
   ========================================================================== */
/* Polices auto-hébergées (licence SIL OFL) */
@font-face { font-family: 'Bangers'; src: url('/fonts/bangers-latin.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/fonts/nunito-latin.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }
:root {
  --ink: #1b130e;
  --paper: #f7ecd2;
  --paper-2: #efdfba;
  --gold: #ffd552;
  --gold-2: #f2b632;
  --red: #e0533d;
  --green: #5fb84a;
  --blue: #3f78b8;
  --muted: #6e5a45;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --font-title: 'Bangers', Impact, 'Arial Black', sans-serif;
  --font-ui: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: #1b130e; color: var(--ink); font: 600 15px/1.4 var(--font-ui); -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }
code { background: rgba(0, 0, 0, 0.08); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); font-weight: 600; }
.hint { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }

/* ---------- éléments BD ---------- */
.panel { background: var(--paper); border: 3px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; }
.panel h2, .drawer h3, .sheet h3 { font: 400 26px/1 var(--font-title); letter-spacing: 1px; margin: 0 0 12px; }
.btn { border: 3px solid var(--ink); background: #fff; color: var(--ink); border-radius: 12px; padding: 9px 16px; font-weight: 900; box-shadow: var(--shadow-sm); transition: transform 0.08s, box-shadow 0.08s; }
.btn:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.big { font: 400 24px/1 var(--font-title); letter-spacing: 1.5px; padding: 12px 22px; width: 100%; }
.btn.small { padding: 5px 10px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); }
.btn-gold { background: var(--gold); }
.btn-red { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.on { background: var(--gold); }
.icon-btn { border: 2.5px solid var(--ink); background: var(--paper); border-radius: 10px; width: 38px; height: 38px; font-size: 18px; box-shadow: 2px 2px 0 var(--ink); }
.chip { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 10px; padding: 4px 10px; font-weight: 900; box-shadow: 2px 2px 0 var(--ink); }
.chip.dot { color: var(--green); padding: 4px 8px; }
.chip.dot.bad { color: var(--red); }
.field { display: block; margin: 10px 0 6px; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.field input, .lobby select { width: 100%; margin-top: 4px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 10px; background: #fff; font-weight: 800; }
.code-input { text-transform: uppercase; letter-spacing: 6px; font-size: 20px; text-align: center; }

/* Couleurs du ciel (fond du plateau sur téléphone) : non héritées → les changer ne recalcule
   que le plateau, pas toute la page. */
@property --sky-top { syntax: '<color>'; inherits: false; initial-value: #1b2450; }
@property --sky-mid { syntax: '<color>'; inherits: false; initial-value: #1b2450; }

/* ==========================================================================
   PLATEAU
   ========================================================================== */
.board { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #3a2a1c, #120c08 75%); }
.stage { position: absolute; left: 0; top: 0; width: 1536px; height: 1024px; transform-origin: 0 0; --s: 1; --night: 0; }
.stage > *, .scenery > * { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Décor fixe (ciel, image, nuit, lumières et leurs modes de fusion) regroupé : PAS de calque
   graphique séparé (sur téléphone, des calques de la taille du plateau saturent la mémoire de
   la carte graphique et l'écran clignote). */
.scenery { isolation: isolate; pointer-events: none; }
.sky { overflow: hidden; }
.stars i { position: absolute; background: #fff; border-radius: 50%; box-shadow: 0 0 4px #fff; }
.sun, .moon { position: absolute; left: 0; top: 0; }
.moonlight { pointer-events: none; }
.sun { width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: radial-gradient(circle, #fff6c8 0 35%, #ffd552 36% 62%, transparent 63%); }
.sun::before { content: ''; position: absolute; inset: -40px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 120, 0.75), rgba(255, 170, 60, 0.25) 45%, transparent 70%); }
.sun::after { content: ''; position: absolute; inset: 22px; border-radius: 50%; border: 4px solid var(--ink); }
.moon { width: 150px; height: 150px; margin: -75px 0 0 -75px; }
.moon::before { content: ''; position: absolute; inset: -70px; border-radius: 50%; background: radial-gradient(circle, rgba(220, 230, 255, 0.55), rgba(160, 180, 255, 0.15) 45%, transparent 70%); }
.moon::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 4px solid var(--ink); background: radial-gradient(circle at 34% 38%, #e9dca6 0 9%, transparent 10%), radial-gradient(circle at 62% 64%, #e9dca6 0 7%, transparent 8%), radial-gradient(circle at 66% 30%, #e9dca6 0 5%, transparent 6%), radial-gradient(circle at 40% 40%, #fffbe6, #fff0b8 70%); }
.village, .lights { object-fit: fill; user-select: none; pointer-events: none; }
.tint { background: linear-gradient(180deg, rgba(255, 110, 70, 0.75), rgba(255, 150, 80, 0.55) 40%, rgba(255, 190, 110, 0.45)); mix-blend-mode: multiply; pointer-events: none; }
.night { background: linear-gradient(180deg, #0a0f2e, #18245a 60%, #121a40); mix-blend-mode: multiply; pointer-events: none; }
.glows { mix-blend-mode: screen; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255, 205, 100, 0.55), rgba(255, 150, 50, 0.16) 42%, transparent 70%); }
.glow.window { background: radial-gradient(circle, rgba(255, 200, 90, 0.45), rgba(255, 150, 50, 0.1) 45%, transparent 70%); }
.glow.sign { display: none; }
.glow.fire { background: radial-gradient(circle, rgba(255, 220, 120, 0.85), rgba(255, 130, 40, 0.35) 35%, rgba(255, 90, 20, 0.08) 60%, transparent 72%); }
.fx { pointer-events: none; }
.pions { pointer-events: none; }

/* ---------- pions ---------- */
.pion { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: auto; transition: transform 0.6s ease; }
.pion .figure { position: absolute; left: -50px; top: -166px; width: 100px; height: 166px; transition: transform 0.25s, filter 0.4s; transform-origin: 50% 100%; }
.pion .figure svg { width: 100%; height: 100%; overflow: visible; filter: brightness(calc(1 - var(--night, 0) * 0.5)) saturate(calc(1 - var(--night, 0) * 0.35)); }
.pion.floor .figure svg, .pion.talking .figure svg { filter: none; }
.pion .halo { position: absolute; left: -58px; top: -26px; width: 116px; height: 46px; border-radius: 50%; transition: box-shadow 0.3s, background 0.3s; }
.pion .plate { position: absolute; left: 50%; bottom: 170px; transform: translateX(-50%) scale(calc(max(1, 0.62 / var(--s)))); transform-origin: 50% 100%; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 4px; white-space: nowrap; width: max-content; max-width: 230px; background: #fff; border: 3px solid var(--ink); border-radius: 10px; padding: 3px 9px 3px 5px; box-shadow: 2px 2px 0 var(--ink); font: 800 16px/1.1 var(--font-ui); }
.pion.me .plate { background: var(--gold); }
.pion .badges b { font-size: 14px; font-weight: 400; }
.pion .mic { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink); }
.pion .mic svg { width: 13px; height: 13px; fill: var(--ink); stroke: var(--ink); }
.pion .mic.on { background: #8fe07a; }
.pion .mic.off { background: #d6d0c6; opacity: 0.8; }
.pion .wave { position: absolute; left: 50%; top: -232px; transform: translateX(-50%); display: none; gap: 3px; align-items: flex-end; height: 22px; }
.pion .wave i { width: 5px; background: var(--green); border: 1.5px solid var(--ink); border-radius: 3px; animation: wave 0.6s ease-in-out infinite; }
.pion .wave i:nth-child(2) { animation-delay: 0.15s; }
.pion .wave i:nth-child(3) { animation-delay: 0.3s; }
.pion .wave i:nth-child(4) { animation-delay: 0.45s; }
@keyframes wave { 0%, 100% { height: 6px; } 50% { height: 20px; } }
.pion .tomb { position: absolute; left: 10px; top: -60px; width: 34px; height: 44px; display: none; background: #b9b6ae; border: 3px solid var(--ink); border-radius: 16px 16px 4px 4px; box-shadow: 2px 2px 0 var(--ink); }
.pion .tomb::after { content: 'RIP'; position: absolute; inset: 9px 0 0; text-align: center; font: 400 12px var(--font-title); }
.pion .mark { position: absolute; left: 30px; top: -170px; display: none; background: var(--gold); border: 3px solid var(--ink); border-radius: 50%; width: 34px; height: 34px; font: 900 18px/28px var(--font-ui); text-align: center; box-shadow: 2px 2px 0 var(--ink); }
.pion .mark::after { content: '✔'; }

/* a la parole */
.pion.floor .halo { left: -80px; top: -36px; width: 160px; height: 66px; background: radial-gradient(ellipse, #fff3b0, rgba(255, 213, 82, 0.9) 45%, rgba(255, 180, 40, 0.35) 70%); box-shadow: 0 0 0 4px var(--ink), 0 0 30px 12px rgba(255, 213, 82, 0.8); animation: floor 1.4s ease-in-out infinite; }
.pion.floor .figure { filter: drop-shadow(0 0 2px #ffd552) drop-shadow(0 0 3px #ffd552) drop-shadow(0 0 14px rgba(255, 213, 82, 0.95)); }
.pion.floor .plate { background: #ff9f3c; animation: plate 1.4s ease-in-out infinite; }
@keyframes plate { 50% { box-shadow: 2px 2px 0 var(--ink), 0 0 16px 4px rgba(255, 213, 82, 0.9); } }
@keyframes floor { 50% { box-shadow: 0 0 0 4px var(--ink), 0 0 46px 20px rgba(255, 213, 82, 0.95); } }
/* parle réellement (micro) */
.pion.talking .wave { display: flex; }
.pion.talking .halo { box-shadow: 0 0 0 4px var(--ink), 0 0 28px 10px rgba(95, 184, 74, 0.9); }
.pion.talking .figure { filter: drop-shadow(0 0 8px rgba(120, 230, 100, 0.95)); }
/* cible possible */
.pion.targetable { cursor: pointer; }
.pion.targetable .halo { border: 4px dashed var(--gold); animation: target 1.2s linear infinite; }
.pion.targetable:hover .figure { transform: translateY(-8px) scale(1.04); }
@keyframes target { 50% { border-color: #fff; } }
.pion.selected .halo, .pion.voted .halo { border: 5px solid var(--gold); background: rgba(255, 213, 82, 0.45); box-shadow: 0 0 0 3px var(--ink); animation: none; }
.pion.selected .figure, .pion.voted .figure { filter: drop-shadow(0 0 6px var(--gold)) drop-shadow(0 0 2px var(--ink)); }
.pion.voted .mark { display: block; }
.pion.subject .halo { box-shadow: 0 0 0 4px var(--ink), 0 0 32px 12px rgba(224, 83, 61, 0.85); }
.pion.offline .figure { opacity: 0.55; }
/* mort */
.pion.dead .figure { transform: translate(18px, 6px) rotate(-82deg); filter: grayscale(1) brightness(0.75); opacity: 0.8; }
.pion.dead .tomb { display: block; }
.pion.dead .plate { background: #cfc8bb; color: #5a5048; top: -96px; }
.pion.dead .mark { top: -70px; }
.pion.dead .halo { background: radial-gradient(ellipse, rgba(0, 0, 0, 0.35), transparent 70%); box-shadow: none; border: 0; }
.pion.dying .figure { animation: fall 1.5s cubic-bezier(.5, 0, .7, 1) both; }
.pion.dying .tomb { animation: tomb 0.5s 1.1s both; }
@keyframes fall {
  0% { transform: none; filter: none; opacity: 1; }
  20% { transform: translateY(-14px) rotate(6deg); filter: brightness(1.6) drop-shadow(0 0 16px #fff); }
  60% { transform: translate(10px, 0) rotate(-40deg); filter: grayscale(0.6) brightness(0.9); }
  100% { transform: translate(18px, 6px) rotate(-82deg); filter: grayscale(1) brightness(0.75); opacity: 0.8; }
}
@keyframes tomb { from { transform: translateY(30px) scaleY(0); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- effets (Chasseur) ---------- */
.bullet { position: absolute; left: 0; top: 0; width: 34px; height: 8px; margin: -4px 0 0 -17px; border-radius: 4px; background: linear-gradient(90deg, transparent, #fff3b0 40%, #ffd552); box-shadow: 0 0 10px #ffd552; }
.muzzle { position: absolute; left: 0; top: 0; width: 60px; height: 60px; margin: -30px; border-radius: 50%; background: radial-gradient(circle, #fff, #ffd552 40%, transparent 70%); animation: pop 0.35s ease-out both; }
.boom { position: absolute; width: 150px; height: 150px; margin: -75px; display: grid; place-items: center; animation: boom 1.2s ease-out both; }
.boom svg { position: absolute; inset: 0; }
.boom span { position: relative; font: 400 34px var(--font-title); color: var(--red); -webkit-text-stroke: 2px var(--ink); letter-spacing: 1px; transform: rotate(-8deg); }
@keyframes pop { from { transform: scale(0.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
@keyframes boom { 0% { transform: scale(0.2) rotate(-20deg); opacity: 0; } 15% { transform: scale(1.15) rotate(4deg); opacity: 1; } 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.1); opacity: 0; } }

/* ---------- narrateur ---------- */
.narrator { position: fixed; left: 50%; top: 96px; transform: translateX(-50%); z-index: 30; pointer-events: none; display: grid; justify-items: center; width: min(92vw, 820px); }
.narration { grid-area: 1 / 1; background: var(--gold); border: 4px solid var(--ink); box-shadow: var(--shadow); padding: 10px 26px; font: 400 clamp(22px, 3.2vw, 38px)/1.1 var(--font-title); letter-spacing: 1.5px; text-transform: uppercase; text-align: center; transform: translateY(-14px) rotate(-1.5deg) scale(0.92); opacity: 0; transition: transform 0.45s cubic-bezier(.2, 1.4, .4, 1), opacity 0.35s; }
.narration.in { transform: rotate(-1.5deg); opacity: 1; }
.narration.out { transform: translateY(-10px) rotate(-1.5deg); opacity: 0; }
.narration.night { background: #2a3366; color: #ffe8a0; }
.narration.death { background: #fff; color: var(--ink); }
.narration.vote { background: #ffe0d6; }
.narration.victory { background: var(--gold); font-size: clamp(28px, 4vw, 52px); }

/* ==========================================================================
   ÉCRANS (accueil, lobby)
   ========================================================================== */
.screen { position: fixed; inset: 0; display: none; z-index: 10; }
.screen.active { display: block; }
#screen-home, #screen-lobby { overflow-y: auto; background: rgba(20, 12, 6, 0.28); }
.home-panel { width: min(420px, 92vw); margin: max(4vh, 20px) auto; }
.logo { font: 400 clamp(40px, 7vw, 58px)/0.95 var(--font-title); letter-spacing: 2px; text-align: center; margin: 4px 0 6px; color: var(--gold); -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); }
.tagline { text-align: center; margin: 0 0 10px; font-weight: 800; }
.or { text-align: center; margin: 14px 0 4px; font-weight: 900; color: var(--muted); }
.lobby { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.3fr) minmax(280px, 1.1fr); gap: 16px; padding: 18px; max-width: 1400px; margin: 0 auto; align-items: start; }
.code-chip { display: inline-block; background: var(--gold); border: 3px solid var(--ink); border-radius: 10px; padding: 4px 12px; font-weight: 900; box-shadow: 2px 2px 0 var(--ink); margin-bottom: 10px; }
.code-chip b { font: 400 22px var(--font-title); letter-spacing: 4px; }
.plist { list-style: none; padding: 0; margin: 0; max-height: 55vh; overflow-y: auto; }
.plist li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 2px dashed rgba(27, 19, 14, 0.2); font-weight: 800; }
.plist .head { width: 38px; height: 38px; border: 2.5px solid var(--ink); border-radius: 50%; overflow: hidden; background: #cfe3b0; flex: none; }
.plist .head svg { width: 76px; height: 127px; margin: -6px 0 0 -19px; }
.plist .grow { flex: 1; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.avatar { position: relative; border: 3px solid var(--ink); border-radius: 12px; background: linear-gradient(#bfe0f5, #d9efc0); padding: 4px 4px 0; box-shadow: 2px 2px 0 var(--ink); text-align: center; }
.avatar svg { width: 100%; height: 108px; display: block; }
.avatar span { display: block; font-weight: 900; font-size: 12px; background: #fff; border-top: 2.5px solid var(--ink); margin: 0 -4px; padding: 2px 0; border-radius: 0 0 9px 9px; }
.avatar.on { background: linear-gradient(#ffe08a, #ffd552); transform: translateY(-3px); box-shadow: 4px 4px 0 var(--ink); }
.avatar.on::after { content: '✔'; position: absolute; top: -10px; right: -10px; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; border: 3px solid var(--ink); font-weight: 900; line-height: 22px; }
.avatar.taken { opacity: 0.55; }
#settings .settings-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; font-weight: 800; }
#settings .settings-row select { width: auto; max-width: 60%; margin: 0; padding: 4px 6px; border-width: 2.5px; }
#settings hr { border: 0; border-top: 2px dashed rgba(27, 19, 14, 0.25); margin: 10px 0; }
.counter { display: flex; align-items: center; gap: 6px; }
.counter span { min-width: 20px; text-align: center; font: 400 22px var(--font-title); }
input[type='checkbox'] { width: 20px; height: 20px; accent-color: var(--gold-2); }

/* ==========================================================================
   HUD DE PARTIE
   ========================================================================== */
.hud { pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top { position: absolute; left: 0; right: 0; top: 10px; display: flex; justify-content: center; pointer-events: none; }
.phase-box { pointer-events: auto; display: flex; align-items: center; gap: 12px; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; box-shadow: var(--shadow); padding: 6px 8px 6px 18px; max-width: min(640px, 70vw); }
.phase-label { font: 400 clamp(20px, 2.4vw, 28px)/1 var(--font-title); letter-spacing: 1px; }
.phase-sub { font-size: 13px; font-weight: 800; color: var(--muted); }
.timer { position: relative; width: 54px; height: 54px; flex: none; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 5; }
.timer .track { stroke: rgba(27, 19, 14, 0.15); fill: #fff; }
.timer .ring { stroke: var(--gold-2); stroke-linecap: round; stroke-dasharray: 119.4; transition: stroke-dashoffset 0.25s linear; }
.timer span { position: absolute; inset: 0; display: grid; place-items: center; font: 400 21px var(--font-title); }
.timer.low .ring { stroke: var(--red); }
.timer.low span { color: var(--red); animation: beat 1s infinite; }
@keyframes beat { 50% { transform: scale(1.15); } }
.timer.hidden { visibility: hidden; }
.phase-box.night { background: #2a3366; color: #ffe8a0; }
.phase-box.night .phase-sub { color: #c9c3e8; }
.hud-corner { position: absolute; right: 12px; top: 0; display: flex; gap: 6px; align-items: center; pointer-events: auto; }

.hud-me { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: flex-end; gap: 10px; }
.my-card { width: 96px; height: 144px; padding: 0; border: 0; background: none; filter: drop-shadow(3px 3px 0 var(--ink)); transition: transform 0.2s; }
.my-card:hover { transform: translateY(-6px) rotate(-2deg); }
.my-card svg { width: 100%; height: 100%; }
.my-card:empty { display: none; }
.me-info { background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; box-shadow: var(--shadow-sm); padding: 8px 10px; max-width: 280px; }
.me-name { font: 400 20px/1 var(--font-title); letter-spacing: 1px; }
.me-status { font-size: 13px; font-weight: 800; margin: 4px 0 6px; display: grid; gap: 2px; }
.mic-btn { display: flex; align-items: center; gap: 6px; border: 2.5px solid var(--ink); border-radius: 999px; padding: 4px 12px 4px 6px; font-weight: 900; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); background: #fff; }
.mic-btn i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font-style: normal; }
.mic-btn.live i { background: #8fe07a; animation: micpulse 1.2s infinite; }
.mic-btn.muted i { background: #d6d0c6; }
@keyframes micpulse { 50% { box-shadow: 0 0 0 6px rgba(95, 184, 74, 0.35); } }

.action { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(560px, calc(100vw - 440px)); background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 16px; max-height: 42vh; overflow-y: auto; }
.action:empty { display: none; }
.action h3 { font: 400 24px/1 var(--font-title); letter-spacing: 1px; margin: 0 0 6px; }
.action p { margin: 4px 0; }
.action .options { display: grid; gap: 6px; margin: 8px 0; }
.action .options .btn { text-align: left; }
.action .confirm { color: #2c7a2a; font-weight: 900; }
.action .quiet { margin: 0; color: var(--muted); font-weight: 800; text-align: center; }
.btn-finish { font: 400 30px/1 var(--font-title) !important; letter-spacing: 3px; background: var(--red); color: #fff; padding: 10px 40px; }
.wolf-votes { font-size: 13px; font-weight: 800; margin-top: 6px; display: grid; gap: 2px; }

.fab { position: absolute; right: 14px; width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--ink); background: var(--paper); box-shadow: var(--shadow-sm); font-size: 24px; }
.chat-fab { bottom: 14px; }
.dead-fab { bottom: 80px; background: #3a3646; display: none; }
.dead-fab.show { display: block; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--red); color: #fff; border: 2.5px solid var(--ink); font: 900 12px/17px var(--font-ui); padding: 0 4px; display: none; }
.badge.show { display: block; }

.drawer { position: absolute; right: 14px; bottom: 80px; width: min(380px, calc(100vw - 28px)); height: min(62vh, 560px); background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; padding: 10px; transform: translateX(calc(100% + 30px)); transition: transform 0.35s cubic-bezier(.3, 1.2, .4, 1); }
.drawer.open { transform: none; }
.sheet { position: absolute; left: 50%; bottom: 0; width: min(640px, 96vw); height: min(36vh, 330px); transform: translate(-50%, 110%); transition: transform 0.4s cubic-bezier(.3, 1.1, .4, 1); background: #2d2a38; color: #e9e4f4; border: 3px solid var(--ink); border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -4px 0 var(--ink); display: flex; flex-direction: column; padding: 10px 12px; z-index: 5; }
.sheet.open { transform: translate(-50%, 0); }
.sheet .tab-body .item { background: rgba(255, 255, 255, 0.07); color: #e9e4f4; }
.sheet .icon-btn { background: #47435a; color: #fff; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.drawer-head h3 { margin: 0; color: #d9d2f0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { border: 2.5px solid var(--ink); background: #fff; border-radius: 9px; padding: 3px 8px; font-weight: 900; font-size: 12px; }
.tabs button.on { background: var(--gold); }
.tab-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.tab-body .item { background: rgba(27, 19, 14, 0.06); border-radius: 8px; padding: 4px 8px; }
.tab-body .who { font-weight: 900; }
.tab-body .at { color: var(--muted); font-size: 11px; margin-right: 4px; }
.chat-form { display: flex; gap: 6px; margin-top: 8px; }
.chat-form input { flex: 1; min-width: 0; border: 2.5px solid var(--ink); border-radius: 10px; padding: 8px 10px; font-weight: 700; }
.chat-form.hidden { display: none; }

.gameover { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(720px, 94vw); max-height: 80vh; overflow-y: auto; background: var(--paper); border: 4px solid var(--ink); border-radius: 18px; box-shadow: 8px 8px 0 var(--ink); padding: 18px; z-index: 6; }
.gameover:empty { display: none; }
.gameover h2 { font: 400 clamp(32px, 5vw, 52px)/1 var(--font-title); text-align: center; margin: 0 0 12px; letter-spacing: 2px; }
.final-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.final-item { text-align: center; font-weight: 900; font-size: 13px; }
.final-item .mini { width: 100%; aspect-ratio: 2/3; }
.final-item .mini svg { width: 100%; height: 100%; }
.final-item.win .mini { filter: drop-shadow(0 0 8px var(--gold)); }
.final-item.dead .mini { filter: grayscale(0.7); }

.menu { position: absolute; right: 12px; top: 56px; display: none; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; box-shadow: var(--shadow-sm); padding: 8px; }
.menu.open { display: block; }

/* ---------- cartes ---------- */
.card-layer { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; }
.card-layer.show { display: grid; }
.reveal-backdrop { position: absolute; inset: 0; background: rgba(10, 6, 3, 0.6); transition: opacity 0.6s; }
.reveal-card { position: relative; width: min(300px, 62vw, calc(60vh * 0.667)); transform: scale(0.3) rotate(-12deg); opacity: 0; transition: transform 0.6s cubic-bezier(.2, 1.4, .4, 1), opacity 0.4s; }
.reveal-card.in { transform: none; opacity: 1; }
.reveal-card .flip { position: relative; aspect-ratio: 2/3; filter: drop-shadow(8px 8px 0 var(--ink)); }
.reveal-card .face { position: absolute; inset: 0; }
.reveal-card .face svg { width: 100%; height: 100%; }
.reveal-card .front { opacity: 0; }
.reveal-card .flip.flipped { animation: flip2d 0.6s ease-in-out both; }
.reveal-card .flip.flipped .back { animation: hide-half 0.6s steps(1) both; }
.reveal-card .flip.flipped .front { animation: show-half 0.6s steps(1) both; }
@keyframes flip2d { 0% { transform: scaleX(1); } 50% { transform: scaleX(0.02) scaleY(1.06); } 100% { transform: scaleX(1); } }
@keyframes hide-half { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes show-half { 0%, 49% { opacity: 0; } 50%, 100% { opacity: 1; } }
.reveal-caption { text-align: center; color: #fff; font: 400 26px var(--font-title); letter-spacing: 2px; text-shadow: 2px 2px 0 var(--ink); margin: 14px 0 0; }
.card-zoom { position: fixed; inset: 0; z-index: 45; display: none; place-items: center; background: rgba(10, 6, 3, 0.55); }
.card-zoom.show { display: grid; }
.card-zoom > div { width: min(300px, 70vw, calc(70vh * 0.667)); filter: drop-shadow(8px 8px 0 var(--ink)); animation: zoomin 0.35s cubic-bezier(.2, 1.4, .4, 1); }
.card-zoom p { color: #fff; text-align: center; max-width: 300px; font-weight: 800; text-shadow: 1px 1px 0 var(--ink); }
@keyframes zoomin { from { transform: scale(0.5); opacity: 0; } }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; border: 3px solid var(--ink); box-shadow: var(--shadow-sm); border-radius: 12px; padding: 10px 16px; font-weight: 900; display: none; z-index: 60; max-width: 90vw; }
.toast.show { display: block; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .lobby { grid-template-columns: 1fr 1fr; }
  .lobby-settings { grid-column: 1 / -1; }
  .action { width: min(560px, calc(100vw - 260px)); }
  .my-card { width: 70px; height: 105px; }
}
/* Tablette / mobile en portrait : plateau en haut, interface en dessous */
@media (orientation: portrait) and (max-width: 900px) {
  body.in-game .board { bottom: 104px; }
  body.in-game::after { content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: 104px; background: linear-gradient(#2a1d12, #1b130e); border-top: 3px solid var(--ink); z-index: 1; }
  .narrator { top: auto; bottom: 118px; }
  .phase-box { max-width: calc(100vw - 110px); padding: 4px 6px 4px 12px; }
  .hud-top { justify-content: flex-start; padding-left: 8px; }
  .timer { width: 46px; height: 46px; }
  .hud-corner { top: 4px; }
  .hud-corner #code { display: none; }
  /* Panneau d'action dans la marge du haut : il ne recouvre jamais le cercle des joueurs. */
  .action { left: 8px; right: 8px; transform: none; width: auto; top: 76px; bottom: auto; max-height: max(150px, calc(var(--board-top, 300px) + 110px - 76px)); padding: 8px 12px; }
  .action h3 { font-size: 20px; }
  .hud-me { left: 8px; right: 70px; bottom: 8px; height: 84px; align-items: stretch; }
  .my-card { width: 56px; height: 84px; flex: none; }
  .me-info { flex: 1; max-width: none; padding: 5px 8px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
  .me-name { font-size: 17px; }
  .me-status { font-size: 12px; margin: 0; max-height: 32px; overflow: hidden; }
  .mic-btn { align-self: flex-start; padding: 2px 10px 2px 4px; }
  .mic-btn i { width: 20px; height: 20px; }
  .btn-finish { font-size: 24px !important; padding: 8px 30px; }
  .fab { width: 50px; height: 50px; right: 10px; }
  .chat-fab { bottom: 10px; }
  .dead-fab { bottom: 68px; }
  .drawer { right: 6px; left: 6px; width: auto; bottom: 0; height: 60vh; border-radius: 18px 18px 0 0; transform: translateY(110%); }
  .drawer.open { transform: none; }
}
@media (max-width: 760px) {
  .lobby { grid-template-columns: 1fr; padding: 10px; }
  .panel { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Voyante : résultat sur le personnage ---------- */
.seer-badge { border-radius: 6px; padding: 0 3px; }
.seer-badge.wolf { background: #ffd0c8; }
.seer-badge.civil { background: #d6f5cf; }
.seer-reveal { position: absolute; transform: translate(-50%, -50%); z-index: 2000; animation: seerIn 0.7s cubic-bezier(.2, 1.4, .4, 1) both; }
.seer-reveal.out { animation: seerOut 0.5s ease-in both; }
.seer-card { width: 150px; padding: 14px 10px 10px; text-align: center; border: 5px solid var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--ink); background: #fff; }
.seer-reveal.wolf .seer-card { background: linear-gradient(#ff8a7a, #e0533d); }
.seer-reveal.civil .seer-card { background: linear-gradient(#b8ee9f, #5fb84a); }
.seer-icon { display: block; font-size: 56px; line-height: 1; }
.seer-card b { display: block; font: 400 44px/1 var(--font-title); letter-spacing: 3px; color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; margin-top: 6px; }
@keyframes seerIn { 0% { transform: translate(-50%, -30%) scale(0.2) rotate(-25deg); opacity: 0; } 60% { transform: translate(-50%, -50%) scaleX(0.05); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); } }
@keyframes seerOut { to { transform: translate(-50%, -80%) scale(0.6); opacity: 0; } }

/* ---------- Loups : choix de la meute sur les personnages ---------- */
.pion .paw { position: absolute; left: -46px; top: -150px; display: none; background: #2a3366; color: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 1px 7px; font: 900 16px/1.4 var(--font-ui); box-shadow: 2px 2px 0 var(--ink); }
.pion.wolf-pick .paw { display: block; }
.pion.wolf-pick .halo { border: 5px solid #e0533d; background: rgba(224, 83, 61, 0.35); box-shadow: 0 0 0 3px var(--ink); animation: none; }

/* ---------- Son bloqué par le téléphone ---------- */
.audio-unlock { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 70; display: none; background: var(--gold); border: 4px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 22px; font: 400 26px/1.1 var(--font-title); letter-spacing: 1px; text-align: center; cursor: pointer; animation: beat 1.2s infinite; }
.audio-unlock.show { display: block; }
.action p.wolf-votes { display: block; }

/* ---------- Révélation des votes ---------- */
.vote-arrows { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 1500; }
.vote-line, .vote-line-ink { fill: none; stroke-linecap: round; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 0.9s ease-out forwards; }
.vote-line-ink { stroke: var(--ink); stroke-width: 11; }
.vote-line { stroke: #e0533d; stroke-width: 6; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.vote-count { position: absolute; transform: translate(-50%, -50%); z-index: 1600; background: #fff; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); padding: 2px 10px; font: 400 26px/1.1 var(--font-title); letter-spacing: 1px; animation: zoomin 0.5s 0.6s both; }
.vote-list { display: grid; gap: 4px; margin-top: 6px; font-weight: 800; }
.vote-list .target { background: rgba(224, 83, 61, 0.12); border-radius: 8px; padding: 4px 8px; }
.vote-list .target b { color: #b0301f; }

/* ---------- Voyante : grande carte au centre ---------- */
.seer-big { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; background: rgba(10, 6, 3, 0.55); pointer-events: none; animation: fadein 0.25s both; }
.seer-big.out { animation: fadeout 0.35s both; }
.seer-flip { display: flex; flex-direction: column; align-items: center; gap: 14px; animation: seerPop 0.45s cubic-bezier(.2, 1.4, .4, 1) both; }
.seer-flip .sf-card { position: relative; width: min(300px, 70vw, 42vh); aspect-ratio: 2 / 3; perspective: 1200px; }
.seer-flip .sf-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform 0.7s cubic-bezier(.3, .1, .2, 1); filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.75)); }
.seer-flip .sf-face svg { width: 100%; height: 100%; display: block; }
.seer-flip .sf-face.front { transform: rotateY(180deg); }
.seer-big.flipped .sf-face.back { transform: rotateY(-180deg); }
.seer-big.flipped .sf-face.front { transform: rotateY(0deg); }
.seer-big.wolf.flipped .sf-face.front { filter: drop-shadow(0 0 28px rgba(220, 30, 30, 0.75)); }
.seer-big.civil.flipped .sf-face.front { filter: drop-shadow(0 0 28px rgba(226, 180, 80, 0.7)); }
.seer-big .big-name { background: #fff; border: 3px solid var(--ink); border-radius: 10px; padding: 3px 12px; font: 900 18px var(--font-ui); max-width: 90%; text-align: center; }
@keyframes seerPop { 0% { transform: scaleX(0.05) scaleY(0.8); } 100% { transform: none; } }
@keyframes fadein { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }

/* ---------- Test du son (salle d'attente) ---------- */
.sound-test { background: #fff7e0; border: 3px solid var(--ink); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.sound-test h2 { font-size: 22px; margin-bottom: 2px; }
.st-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-weight: 900; }
.st-label { width: 70px; flex: none; }
.meter { flex: 1; height: 16px; border: 3px solid var(--ink); border-radius: 9px; background: #e9e1cc; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #5fb84a, #ffd552 70%, #e0533d); transition: width 0.1s linear; }
.st-state { font-size: 13px; min-width: 90px; text-align: right; }
.st-state.ok { color: #2c7a2a; }
.st-state.ko { color: #b0301f; }
.st-confirm { display: none; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 800; }
.st-confirm.show { display: flex; }
.st-help { display: none; font-size: 13px; font-weight: 700; color: #7a3020; margin: 6px 0 0; }
.st-help.show { display: block; }
.plist .aud { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 8px; flex: none; }
.plist .aud svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.plist .aud.ok { background: #c9f0bd; color: #1f7a1f; }
.plist .aud.off { background: #f6d6d0; color: #8a7c6c; }
.plist .aud .slash { stroke: #d62020; stroke-width: 3; }
.plist li.talking .head { box-shadow: 0 0 0 3px #5fb84a, 0 0 12px 4px rgba(95, 184, 74, 0.8); }
.st-warning { font-weight: 800; color: #9a5a00; margin: 8px 0 0; }
.st-warning:empty { display: none; }

.voice-hint { background: #d9f5cf; border: 3px solid var(--ink); border-radius: 12px; padding: 8px 12px; font-weight: 900; margin: 0 0 12px; box-shadow: 2px 2px 0 var(--ink); }

.my-voice { border: 3px solid var(--ink); border-radius: 12px; padding: 8px 12px; font-weight: 800; margin: 0 0 12px; box-shadow: 2px 2px 0 var(--ink); }
.my-voice.ok { background: #e6f7df; }
.my-voice.ko { background: #fff0d6; }
.my-voice:empty { display: none; }
.my-voice .btn { margin-left: 6px; }
.my-voice .lvl { display: inline-block; vertical-align: middle; width: 80px; height: 10px; border: 2px solid var(--ink); border-radius: 6px; background: #fff; overflow: hidden; }
.my-voice .lvl i { display: block; height: 100%; width: 0; background: #3fbf3f; transition: width 0.1s; }
.plist .aud + .aud { margin-left: 3px; }
.plist .diag { display: block; font-size: 10px; line-height: 1.25; font-weight: 600; color: #6b5d4d; word-break: break-word; }
.gameover .back-lobby { text-align: center; font-weight: 900; font-size: 18px; margin: 12px 0 4px; }
.gameover .back-lobby b { display: inline-block; min-width: 2.6ch; padding: 0 6px; background: var(--gold); border: 3px solid var(--ink); border-radius: 8px; }
/* Étiquette personnelle : petite icône à côté du pseudo, texte juste en dessous une fois remplie (visible par soi seul) */
.pion .tagbox { flex-basis: 100%; order: 10; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 1px 0 0; padding: 0 6px; border: 2px solid var(--ink); border-radius: 6px; background: #fff3c2; color: var(--ink); font: 800 12px/1.4 var(--font-ui); cursor: pointer; }
.pion .tagbox.empty { flex-basis: auto; order: 0; margin: 0 0 0 1px; padding: 0 2px; border: 1.5px dashed rgba(27, 19, 14, 0.55); background: transparent; font-size: 10px; line-height: 1.3; opacity: 0.75; }
.pion .tagbox:hover { opacity: 1; }
.tag-editor { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(27, 19, 14, 0.45); padding: 16px; }
.tag-editor .panel { width: min(380px, 100%); }
.tag-editor h3 { margin: 0 0 4px; font: 400 26px/1.1 var(--font-title); letter-spacing: 1px; }
.tag-editor .private { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #6b5d4d; }
.tag-editor .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag-editor .chips button { border: 2px solid var(--ink); border-radius: 999px; background: #fff; padding: 4px 10px; font: 800 14px var(--font-ui); cursor: pointer; box-shadow: 1.5px 1.5px 0 var(--ink); }
.tag-editor .chips button.on { background: var(--gold); }
.tag-editor input { width: 100%; box-sizing: border-box; border: 3px solid var(--ink); border-radius: 10px; padding: 8px 10px; font: 800 16px var(--font-ui); margin-bottom: 10px; }
.tag-editor .row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
/* Jauge du nombre de loups (lobby) */
.wolf-gauge { border: 3px solid var(--ink); border-radius: 12px; background: #fff; box-shadow: 2px 2px 0 var(--ink); padding: 8px 10px; margin-bottom: 10px; }
.wolf-gauge .g-row { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.wolf-gauge .g-label { flex: none; width: 128px; font-weight: 900; white-space: nowrap; }
.wolf-gauge .g-label b { display: inline-block; min-width: 22px; text-align: center; background: var(--gold); border: 2px solid var(--ink); border-radius: 6px; margin-left: 2px; }
.wolf-gauge .g-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.wolf-gauge .g-dots i { width: 11px; height: 11px; border-radius: 50%; background: #5fb84a; border: 2px solid var(--ink); }
.wolf-gauge .g-wolves { font-size: 22px; letter-spacing: 2px; }
.wolf-gauge .g-scale { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; font-size: 12px; font-weight: 800; }
.wolf-gauge .g-scale span { padding: 2px 7px; border: 2px solid rgba(27, 19, 14, 0.25); border-radius: 999px; color: #6b5d4d; }
.wolf-gauge .g-scale span.on { border-color: var(--ink); background: #ffe9a6; color: var(--ink); }
.wolf-gauge .g-auto { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; }
/* Numéro du joueur à côté de son nom */
.pion .pnum { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 3px; box-sizing: border-box; border-radius: 6px; background: var(--ink); color: #ffe08a; font: 900 13px/1 var(--font-ui); }
.plist .num { flex: none; display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: #ffe08a; font: 900 15px/1 var(--font-ui); }
/* Amoureux : coup de foudre (visible par les deux amoureux seulement) */
.lovers-big { position: fixed; inset: 0; z-index: 56; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 50% 45%, rgba(255, 120, 160, 0.55), rgba(40, 6, 18, 0.75)); animation: fadein 0.3s both; cursor: pointer; overflow: hidden; }
.lovers-big.out { animation: fadeout 0.45s both; }
.lovers-big .hearts i { position: absolute; bottom: -60px; font-style: normal; animation: heartUp 3.2s ease-in infinite; opacity: 0; }
.lovers-big .lovers-card { position: relative; width: min(380px, 92vw); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 16px 16px; background: #fff0f3; border: 6px solid var(--ink); border-radius: 24px; box-shadow: 10px 10px 0 var(--ink); text-align: center; animation: seerPop 0.5s cubic-bezier(.2, 1.4, .4, 1) both; }
.lovers-big .lv-title { font: 400 clamp(34px, 9vw, 48px)/1 var(--font-title); letter-spacing: 2px; color: #d6264f; -webkit-text-stroke: 1.5px var(--ink); }
.lovers-big .lv-pair { display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.lovers-big .lv-fig { width: 86px; height: 143px; }
.lovers-big .lv-fig svg { width: 100%; height: 100%; overflow: visible; }
.lovers-big .lv-fig.flip { transform: scaleX(-1); }
.lovers-big .lv-heart { font-size: 54px; margin-bottom: 46px; animation: beat 0.9s ease-in-out infinite; }
.lovers-big .lv-text { font: 800 20px/1.25 var(--font-ui); }
.lovers-big .lv-text b { color: #d6264f; }
.lovers-big .lv-rule { font: 700 14px/1.3 var(--font-ui); color: #6b3a48; }
@keyframes heartUp { 0% { transform: translateY(0) scale(0.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-110vh) scale(1.2) rotate(20deg); opacity: 0; } }
/* Décor fourni (photo / rendu déjà sombre) : nuit plus douce, lampes du décor bien visibles */
.custom-decor .night { background: linear-gradient(180deg, #2b3670, #3b4c8f 60%, #33427e); }
.custom-decor .lights { filter: brightness(1.3) saturate(1.15) drop-shadow(0 0 5px rgba(255, 196, 90, 0.9)) drop-shadow(0 0 14px rgba(255, 160, 60, 0.55)); }
/* Rôles de la partie (composition, pour information) */
.roles-chip { cursor: pointer; font: 900 14px var(--font-ui); }
.roles-panel { position: absolute; right: 12px; top: 64px; z-index: 30; width: min(420px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; display: none; background: var(--paper); border: 4px solid var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--ink); padding: 12px; pointer-events: auto; }
.roles-panel.open { display: block; }
.roles-panel .rp-head { display: flex; align-items: center; justify-content: space-between; }
.roles-panel h3 { margin: 0; font: 400 24px/1 var(--font-title); letter-spacing: 1px; }
.roles-panel .rp-sub { margin: 4px 0 10px; font-size: 13px; font-weight: 700; color: #6b5d4d; }
.roles-panel .rp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.roles-panel .rp-item { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font: 800 12px/1.2 var(--font-ui); }
.roles-panel .rp-card { position: relative; width: 72px; }
.roles-panel .rp-card svg { width: 100%; height: auto; display: block; }
.roles-panel .rp-count { position: absolute; right: -6px; top: -6px; background: var(--gold); border: 2.5px solid var(--ink); border-radius: 999px; padding: 1px 7px; font: 900 14px var(--font-ui); box-shadow: 1.5px 1.5px 0 var(--ink); }
@media (max-width: 600px) { .hud-corner .roles-chip { display: none !important; } .roles-panel { top: 120px; } }

/* Téléphone : la marge au-dessus du plateau prolonge le ciel (jour, coucher, nuit) au lieu d'une bande vide. */
@media (orientation: portrait) and (max-width: 900px) {
  .board { background: linear-gradient(180deg, var(--sky-top, #1b2450) 0, var(--sky-top, #1b2450) calc(var(--board-top, 0px) * 0.45), var(--sky-mid, #1b2450) calc(var(--board-top, 0px) + 2px), #120c08 calc(var(--board-top, 0px) + 2px)); }
  /* Narrateur juste au-dessus du village (il ne cache plus les joueurs en bas). */
  .narrator { top: max(168px, calc(var(--board-top, 300px) - 74px)); bottom: auto; }
  .narration { font-size: clamp(20px, 6vw, 30px); padding: 8px 18px; }
}

/* Distribution du rôle avec suspense */
.reveal-card .flip { will-change: transform; }
.reveal-card .face { position: absolute; inset: 0; }
.reveal-glow { position: absolute; inset: -18px; border-radius: 28px; background: radial-gradient(closest-side, rgba(255, 200, 80, 0.55), transparent); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.reveal-card.spinning .reveal-glow { opacity: 0.6; animation: glowPulse 0.5s ease-in-out infinite alternate; }
.reveal-card.revealed .reveal-glow { opacity: 1; inset: -40px; background: radial-gradient(closest-side, rgba(255, 215, 110, 0.9), rgba(255, 170, 40, 0.25) 60%, transparent); }
.reveal-flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(255, 245, 210, 0.95), rgba(255, 210, 120, 0.4) 30%, transparent 60%); pointer-events: none; animation: revealFlash 0.9s ease-out both; }
.reveal-caption b { color: #ffd552; font-size: 1.25em; }
@keyframes glowPulse { from { transform: scale(0.96); } to { transform: scale(1.06); } }
@keyframes revealFlash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }

/* ============ Accueil « noir et or » ============ */
.home { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 18px 16px 24px; box-sizing: border-box; }
.home-logo { width: min(560px, 92vw); height: auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 22px rgba(255, 190, 70, 0.25)); margin-bottom: -6px; pointer-events: none; user-select: none; }
.lux { position: relative; width: min(440px, 92vw); padding: 26px 30px 24px; border-radius: 10px; background: linear-gradient(180deg, rgba(22, 20, 26, 0.96), rgba(9, 8, 11, 0.97)); border: 2px solid #b8893a; box-shadow: 0 0 0 1px #3d2c10, inset 0 0 0 4px rgba(10, 9, 12, 0.9), inset 0 0 0 5px rgba(201, 154, 59, 0.55), 0 18px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 180, 60, 0.12); }
.lux::before, .lux::after { content: ''; position: absolute; left: 50%; width: 64px; height: 10px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, #e2b450, transparent); }
.lux::before { top: -6px; }
.lux::after { bottom: -6px; }
.lux-field { display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 14px; margin: 0 0 14px; border-radius: 6px; background: #08070a; border: 1.5px solid #6e5524; box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8); }
.lux-field:focus-within { border-color: #e2b450; box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 0 3px rgba(226, 180, 80, 0.18); }
.lux-field svg { width: 22px; height: 22px; flex: none; fill: #b9b2a6; stroke: #b9b2a6; }
.lux-field input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #f3ead6; font: 700 16px/1 var(--font-ui); letter-spacing: 0.5px; }
.lux-field input::placeholder { color: #8f887c; font-weight: 600; letter-spacing: 0.6px; }
.lux-field .code-input { letter-spacing: 4px; text-align: left; font-size: 17px; text-transform: uppercase; }
.lux-btn { width: 100%; height: 54px; display: flex; align-items: center; justify-content: center; gap: 12px; border-radius: 6px; font: 900 18px/1 var(--font-ui); letter-spacing: 0.6px; text-transform: uppercase; cursor: pointer; transition: transform 0.08s, filter 0.15s; }
.lux-btn svg { width: 22px; height: 22px; }
.lux-btn:active { transform: translateY(1px) scale(0.99); }
.lux-btn.gold { color: #1a1206; border: 1.5px solid #7a5718; background: linear-gradient(180deg, #ffe79a 0%, #f2c75c 38%, #d39b34 70%, #b07a22 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 4px 14px rgba(230, 170, 60, 0.35); }
.lux-btn.gold svg { fill: #1a1206; }
.lux-btn.gold:hover { filter: brightness(1.06); }
.lux-btn.dark { color: #f3ead6; border: 1.5px solid #6e5524; background: linear-gradient(180deg, #3a3a3f 0%, #232327 55%, #151518 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 12px rgba(0, 0, 0, 0.5); }
.lux-btn.dark svg { fill: #f3ead6; }
.lux-btn.dark:hover { filter: brightness(1.15); }
.lux-or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: #c9c1b2; font: 700 13px var(--font-ui); text-transform: lowercase; }
.lux-or::before, .lux-or::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #8a6a2a); }
.lux-or::after { background: linear-gradient(90deg, #8a6a2a, transparent); }
.home-tag { margin: 14px 0 0; color: #d8c9a6; font: 700 13px var(--font-ui); letter-spacing: 0.6px; text-shadow: 0 1px 4px #000; }

/* Accueil : le décor passe en arrière-plan (flou + assombri) pour laisser briller le logo. */
body.at-home .board .stage { filter: blur(3px) brightness(0.62) saturate(1.1); transition: filter 0.6s; }
body.at-home .board::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 32%, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.25) 55%, rgba(0, 0, 0, 0.6)); }

/* ==========================================================================
   THÈME « NOIR ET OR » (même esprit que l'accueil) — appliqué à toute l'interface
   ========================================================================== */
:root {
  --lux-bg: linear-gradient(180deg, rgba(24, 22, 28, 0.96), rgba(9, 8, 11, 0.97));
  --lux-line: #b8893a;
  --lux-line-soft: #6e5524;
  --lux-text: #f3ead6;
  --lux-muted: #a89e8c;
  --lux-gold-grad: linear-gradient(180deg, #ffe79a 0%, #f2c75c 38%, #d39b34 70%, #b07a22 100%);
  --lux-dark-grad: linear-gradient(180deg, #3a3a3f 0%, #232327 55%, #151518 100%);
  --lux-shadow: inset 0 0 0 1px rgba(10, 9, 12, 0.9), inset 0 0 0 2px rgba(201, 154, 59, 0.28), 0 12px 34px rgba(0, 0, 0, 0.6);
  --muted: var(--lux-muted);
}
body { color: var(--lux-text); }
.hint { color: var(--lux-muted); }

/* Titres : capitales grasses, dorées (plus de lettrage BD) */
.panel h2, .drawer h3, .sheet h3, .phase-label, .me-name, .action h3, .narration, .gameover h2, .reveal-caption,
.timer span, .code-chip b, .counter span, .btn.big, .roles-panel h3, .tag-editor h3, .audio-unlock, .btn-finish, .vote-count {
  font-family: var(--font-ui) !important; font-weight: 900 !important; text-transform: uppercase; letter-spacing: 0.06em;
}
.panel h2, .drawer h3, .roles-panel h3, .tag-editor h3, .gameover h2 { color: #f2c75c; text-shadow: 0 1px 0 #000, 0 0 14px rgba(242, 199, 92, 0.25); }
.panel h2 { font-size: 20px; }
.gameover h2 { font-size: clamp(24px, 4vw, 38px); }

/* Encadrés */
.panel, .phase-box, .me-info, .action, .drawer, .gameover, .menu, .roles-panel, .tag-editor .panel {
  background: var(--lux-bg); color: var(--lux-text); border: 1.5px solid var(--lux-line); border-radius: 10px; box-shadow: var(--lux-shadow);
}
.phase-box.night { background: linear-gradient(180deg, rgba(26, 32, 72, 0.96), rgba(12, 15, 40, 0.97)); color: #ffe8a0; }
.phase-sub, .phase-box.night .phase-sub { color: var(--lux-muted); }

/* Boutons */
.btn { background: var(--lux-dark-grad); color: var(--lux-text); border: 1.5px solid var(--lux-line-soft); border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 3px 10px rgba(0, 0, 0, 0.45); }
.btn:hover:not(:disabled) { transform: none; filter: brightness(1.15); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 3px 10px rgba(0, 0, 0, 0.45); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.btn.small { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.btn-gold, .btn.on { background: var(--lux-gold-grad); color: #1a1206; border-color: #7a5718; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 14px rgba(230, 170, 60, 0.3); }
.btn-red, .btn-finish { background: linear-gradient(180deg, #d24a3a, #a3271c 60%, #7a1a12); color: #fff3e6; border-color: #e2b450; }
.btn.ghost { background: transparent; border-color: var(--lux-line-soft); box-shadow: none; }
.icon-btn, .chip { background: var(--lux-bg); color: var(--lux-text); border: 1.5px solid var(--lux-line); border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); }
.chip.dot { color: #6fdc6a; }
.fab { background: var(--lux-bg); border: 1.5px solid var(--lux-line); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 14px rgba(242, 199, 92, 0.18); }
.dead-fab { background: linear-gradient(180deg, #2c2838, #16141c); }
.badge { border: 1.5px solid #2a0d08; }

/* Champs */
.field input, .lobby select, #settings .settings-row select, .chat-form input, .tag-editor input {
  background: #08070a; color: var(--lux-text); border: 1.5px solid var(--lux-line-soft); border-radius: 6px; box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
}
.field input:focus, .chat-form input:focus, .tag-editor input:focus { outline: none; border-color: #e2b450; }
input[type='checkbox'] { accent-color: #e2b450; }

/* Lobby */
#screen-lobby { background: rgba(5, 4, 7, 0.55); }
.code-chip { background: #08070a; color: var(--lux-text); border: 1.5px solid var(--lux-line); border-radius: 8px; box-shadow: none; }
.code-chip b { color: #f2c75c; letter-spacing: 0.3em; }
.plist li { border-bottom: 1px solid rgba(184, 137, 58, 0.22); }
.plist .head { border: 1.5px solid var(--lux-line); background: #1d1a22; }
.plist .num, .pion .pnum { background: var(--lux-gold-grad); color: #1a1206; }
.plist .diag { color: var(--lux-muted); }
/* Rôle à la partie précédente, sous le nom */
.plist .prev-role { display: block; margin-top: 1px; font-size: 11.5px; line-height: 1.25; font-weight: 700; color: var(--lux-muted); }
.plist .prev-role b { color: #f2c75c; font-weight: 800; }
.plist .aud { border: 1.5px solid var(--lux-line-soft); }
.plist .aud.ok { background: rgba(80, 180, 90, 0.18); color: #7fe07a; border-color: #3f7a45; }
.plist .aud.off { background: rgba(214, 60, 50, 0.14); color: #a89e8c; border-color: #7a2e26; }
.avatar { background: linear-gradient(180deg, #1d1a22, #0e0d11); border: 1.5px solid var(--lux-line-soft); border-radius: 8px; box-shadow: none; }
.avatar span { background: #08070a; color: var(--lux-text); border-top: 1px solid var(--lux-line-soft); border-radius: 0 0 7px 7px; }
.avatar.on { background: linear-gradient(180deg, #3a2e14, #15110a); border-color: #f2c75c; box-shadow: 0 0 0 1px #f2c75c, 0 0 16px rgba(242, 199, 92, 0.35); transform: translateY(-2px); }
.avatar.on::after { background: var(--lux-gold-grad); color: #1a1206; border: 1.5px solid #7a5718; }
#settings hr { border-top: 1px solid rgba(184, 137, 58, 0.25); }
.counter span { color: #f2c75c; }
.voice-hint { background: rgba(70, 160, 80, 0.14); color: var(--lux-text); border: 1.5px solid #3f7a45; border-radius: 8px; box-shadow: none; }
.my-voice { color: var(--lux-text); border: 1.5px solid var(--lux-line-soft); border-radius: 8px; box-shadow: none; }
.my-voice.ok { background: rgba(70, 160, 80, 0.12); border-color: #3f7a45; }
.my-voice.ko { background: rgba(220, 150, 40, 0.12); border-color: #8a6a2a; }
.my-voice .lvl { background: #08070a; border: 1px solid var(--lux-line-soft); }
.wolf-gauge { background: #0c0b0f; border: 1.5px solid var(--lux-line-soft); border-radius: 8px; box-shadow: none; }
.wolf-gauge .g-label b { background: var(--lux-gold-grad); color: #1a1206; border: 0; }
.wolf-gauge .g-dots i { background: #f2c75c; border: 1px solid #7a5718; }
.wolf-gauge .g-scale span { border: 1px solid rgba(184, 137, 58, 0.3); color: var(--lux-muted); }
.wolf-gauge .g-scale span.on { background: rgba(242, 199, 92, 0.18); border-color: #f2c75c; color: #f2c75c; }

/* Partie */
.timer .track { stroke: rgba(255, 255, 255, 0.1); fill: #08070a; }
.timer .ring { stroke: #f2c75c; }
.timer span { color: #f2c75c; }
.me-name { color: #f2c75c; }
.mic-btn { background: #08070a; color: var(--lux-text); border: 1.5px solid var(--lux-line-soft); box-shadow: none; }
.mic-btn i { border: 0; }
.mic-btn.muted i { background: #2a272f; }
.my-card { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.7)); }
.action .confirm { color: #7fe07a; }
.vote-list .target { background: rgba(224, 83, 61, 0.14); border: 1px solid rgba(224, 83, 61, 0.3); }
.vote-list .target b { color: #ff9a85; }
.tabs button { background: #08070a; color: var(--lux-text); border: 1.5px solid var(--lux-line-soft); border-radius: 6px; }
.tabs button.on { background: var(--lux-gold-grad); color: #1a1206; border-color: #7a5718; }
.tab-body .item { background: rgba(255, 255, 255, 0.05); }
.tab-body .at { color: var(--lux-muted); }
.drawer-head h3 { color: #f2c75c; }
.sheet { border: 1.5px solid var(--lux-line); border-bottom: 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6); }
.gameover .back-lobby b { background: var(--lux-gold-grad); color: #1a1206; border: 0; }
.toast { background: linear-gradient(180deg, #a3271c, #6e140c); border: 1.5px solid #e2b450; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); }
.audio-unlock { background: var(--lux-gold-grad); color: #1a1206; border: 1.5px solid #7a5718; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(242, 199, 92, 0.4); }
.reveal-caption { color: #f3ead6; text-shadow: 0 2px 6px #000; }
.reveal-card .flip { filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.75)); }
.card-zoom > div { filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.75)); }

/* Narrateur : bandeaux sombres liserés d'or */
.narration { background: var(--lux-bg); color: #f2c75c; border: 1.5px solid var(--lux-line); border-radius: 8px; box-shadow: var(--lux-shadow); font-size: clamp(18px, 2.4vw, 30px) !important; }
.narration.night { background: linear-gradient(180deg, rgba(26, 32, 72, 0.97), rgba(12, 15, 40, 0.98)); color: #ffe8a0; }
.narration.death { background: linear-gradient(180deg, rgba(40, 10, 10, 0.97), rgba(16, 6, 6, 0.98)); color: #ffd9d0; border-color: #a3271c; }
.narration.vote { background: linear-gradient(180deg, rgba(48, 22, 14, 0.97), rgba(20, 10, 6, 0.98)); color: #ffd2a8; }
.narration.victory { background: var(--lux-gold-grad); color: #1a1206; border-color: #7a5718; }

/* Noms des joueurs sur le plateau */
.pion .plate { background: rgba(10, 9, 12, 0.9); color: var(--lux-text); border: 1.5px solid var(--lux-line); border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6); }
.pion.me .plate { background: var(--lux-gold-grad); color: #1a1206; border-color: #7a5718; }
.pion .mic { border: 0; }
.pion .mic.off { background: #2a272f; opacity: 1; }
.pion .mic.off svg { fill: #a89e8c; stroke: #a89e8c; }
.pion .tagbox { background: #08070a; color: #f2c75c; border: 1px solid var(--lux-line-soft); }
.pion .tagbox.empty { border: 1px dashed rgba(184, 137, 58, 0.6); color: inherit; }
.pion.me .tagbox.empty { border-color: rgba(26, 18, 6, 0.5); }

/* Fenêtres */
.tag-editor { background: rgba(4, 3, 6, 0.6); }
.tag-editor .private { color: var(--lux-muted); }
.tag-editor .chips button { background: #08070a; color: var(--lux-text); border: 1px solid var(--lux-line-soft); box-shadow: none; }
.tag-editor .chips button.on { background: var(--lux-gold-grad); color: #1a1206; }
.roles-panel .rp-sub { color: var(--lux-muted); }
.roles-panel .rp-count { background: var(--lux-gold-grad); color: #1a1206; border: 1px solid #7a5718; box-shadow: none; }
.lovers-big .lovers-card { background: linear-gradient(180deg, #24141b, #0e090c); color: var(--lux-text); border: 1.5px solid #d6527a; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(214, 82, 122, 0.35); }
.lovers-big .lv-title { -webkit-text-stroke: 0; font-family: var(--font-ui); font-weight: 900; text-transform: uppercase; color: #ff7aa2; }
.lovers-big .lv-rule { color: #d8b3c0; }
.seer-big .big-name { background: #08070a; color: var(--lux-text); border: 1px solid var(--lux-line); }

/* Téléphone : barre du bas */
@media (orientation: portrait) and (max-width: 900px) {
  body.in-game::after { background: linear-gradient(180deg, #121015, #060508); border-top: 1.5px solid var(--lux-line); }
}
/* Tailles adaptées aux capitales du thème noir et or */
.phase-label { font-size: clamp(15px, 1.7vw, 22px) !important; line-height: 1.15; }
.action h3 { font-size: clamp(15px, 1.6vw, 20px) !important; }
.reveal-caption { font-size: clamp(17px, 2.2vw, 24px) !important; }
.reveal-caption b { font-size: 1.15em; }
.me-name { font-size: 16px !important; }
@media (orientation: portrait) and (max-width: 900px) {
  .phase-label { font-size: 15px !important; }
  .action h3 { font-size: 15px !important; }
  .narration { font-size: 17px !important; }
}
/* Choix de la map (lobby) */
.map-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.map-opt { display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: 8px; background: #08070a; border: 1.5px solid var(--lux-line-soft); color: var(--lux-text); font: 800 12px var(--font-ui); text-transform: uppercase; cursor: pointer; }
.map-opt .map-img { display: block; aspect-ratio: 16 / 8; border-radius: 5px; background-size: cover; background-position: center 60%; }
.map-opt.on { border-color: #f2c75c; box-shadow: 0 0 0 1px #f2c75c, 0 0 14px rgba(242, 199, 92, 0.35); color: #f2c75c; }
.map-opt:disabled { cursor: default; }
.mic-btn.self { border-color: #a3271c; color: #ffb4a6; }
.mic-btn.self i { background: #5a1a14; }
/* Téléphone plein écran : narrateur sous le panneau d'action, au-dessus du rond des joueurs */
@media (orientation: portrait) and (max-width: 900px) {
  .narrator { top: 37vh !important; }
}
/* Voleur : écran privé, deux cartes face cachée, échange animé */
.thief-stage { position: fixed; inset: 0; z-index: 58; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 50% 40%, rgba(40, 30, 10, 0.85), rgba(3, 2, 5, 0.94)); opacity: 0; transition: opacity 0.35s; }
.thief-stage.in { opacity: 1; }
.thief-stage.busy .ts-take { pointer-events: none; opacity: 0.5; }
.ts-box { width: min(560px, 100%); text-align: center; }
.ts-box h2 { margin: 0; color: #f2c75c; font: 900 clamp(24px, 6vw, 34px)/1.1 var(--font-ui); letter-spacing: 0.08em; text-shadow: 0 0 18px rgba(242, 199, 92, 0.35); }
.ts-sub { margin: 4px 0 16px; color: var(--lux-text); font: italic 700 18px var(--font-ui); }
.ts-cards { display: flex; justify-content: center; gap: clamp(12px, 4vw, 28px); }
.ts-slot { width: min(200px, 40vw); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.ts-card { position: relative; width: 100%; aspect-ratio: 2 / 3; cursor: pointer; filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.7)); transition: transform 0.25s; }
.ts-card:hover { transform: translateY(-4px); }
.ts-face { position: absolute; inset: 0; transition: transform 0.28s ease-in; }
.ts-face svg { width: 100%; height: 100%; display: block; }
.ts-face.front { transform: scaleX(0); }
.ts-slot.shown .ts-face.back { transform: scaleX(0); }
.ts-slot.shown .ts-face.front { transform: scaleX(1); transition: transform 0.28s 0.28s ease-out; }
.ts-take { visibility: hidden; width: 100%; }
.ts-slot.shown .ts-take { visibility: visible; }
.ts-hint { margin: 14px 0 6px; color: var(--lux-muted); font-weight: 700; }
.ts-mine { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; color: var(--lux-muted); font-weight: 800; }
.ts-mine .mini { width: 64px; aspect-ratio: 2 / 3; }
.ts-mine .mini svg { width: 100%; height: 100%; display: block; }
.ts-secret { color: var(--lux-text); font: 800 20px var(--font-ui); margin-top: 12px; }
.black-wolf { justify-content: center; }

/* ===================================================== Accueil : profils de la plateforme */
.hv[hidden], .guest-box[hidden], .stats-modal[hidden], .lux-link[hidden] { display: none !important; }
.hv-title { margin: 0 0 6px; text-align: center; font: 400 clamp(26px, 7vw, 32px)/1.1 var(--font-title); letter-spacing: 1.5px; color: transparent; background: var(--lux-gold-grad); -webkit-background-clip: text; background-clip: text; }
.hv-sub { margin: 0 0 14px; text-align: center; color: var(--lux-text); font: 700 16px var(--font-ui); }
.hv-form { margin: 0; }
.hv-note { margin: 12px 0 0; text-align: center; color: var(--lux-muted); font: 500 12.5px/1.4 var(--font-ui); }
.lux-link { display: block; width: 100%; margin: 12px 0 0; padding: 6px; background: none; border: 0; color: #e2b450; font: 700 14px var(--font-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lux-link:hover { color: #ffe08a; }
.who-list { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 8px; max-height: 46vh; overflow-y: auto; }
.who-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 6px; border: 1.5px solid var(--lux-line-soft); background: #0c0b0e; color: var(--lux-text); cursor: pointer; text-align: left; transition: border-color 0.15s, transform 0.08s; }
.who-item:hover { border-color: var(--lux-line); }
.who-item:active { transform: scale(0.99); }
.who-ico { font-size: 22px; }
.who-name { flex: 1; font: 800 17px var(--font-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-games { color: var(--lux-muted); font: 600 13px var(--font-ui); white-space: nowrap; }
.hello { margin-bottom: 14px; }
.hello-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 4px; }
.hello-stats > div { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border: 1px solid var(--lux-line-soft); border-radius: 6px; background: #0c0b0e; }
.hello-stats b { font: 900 22px/1.1 var(--font-ui); color: #ffe08a; }
.hello-stats span { font: 600 12px var(--font-ui); color: var(--lux-muted); }
.hello-stats > .hv-note { grid-column: 1 / -1; margin: 0; }
.hello-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 14px; }
.hello-links .lux-link { width: auto; margin-top: 6px; font-size: 13px; }
.stats-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.7); }
.stats-card { position: relative; width: min(440px, 100%); max-height: 88vh; overflow-y: auto; padding: 22px 18px 18px; border-radius: 10px; border: 1.5px solid var(--lux-line); background: var(--lux-bg); color: var(--lux-text); }
.stats-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--lux-line-soft); background: #0c0b0e; color: var(--lux-text); font-size: 18px; cursor: pointer; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.stats-grid > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--lux-line-soft); border-radius: 6px; background: #0c0b0e; }
.stats-grid span { font: 600 12px var(--font-ui); color: var(--lux-muted); }
.stats-grid b { font: 900 18px var(--font-ui); color: #ffe08a; }
.stats-h { margin: 14px 0 6px; font: 800 14px var(--font-ui); color: #e2b450; text-transform: uppercase; letter-spacing: 1px; }
.stats-roles { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.stats-roles li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 2px; border-bottom: 1px solid rgba(110, 85, 36, 0.4); font: 600 14px var(--font-ui); }
.stats-roles li span:last-child { color: var(--lux-muted); font-size: 13px; white-space: nowrap; }
.night-log { margin: 12px 0 4px; text-align: left; }
.night-log summary { cursor: pointer; font: 800 14px var(--font-ui); color: #e2b450; }
.night-log ul { margin: 8px 0 0; padding-left: 18px; max-height: 32vh; overflow-y: auto; font: 600 13px/1.45 var(--font-ui); }
.btn.btn-danger { background: linear-gradient(180deg, #7a1f1f, #4a0f0f); color: #ffe9e0; border-color: #b8893a; }
.infect-lock { margin: 8px 0 2px; padding: 10px 12px; border: 1px solid #b8893a; border-radius: 8px; background: linear-gradient(180deg, #1a0f1f, #0b070d); text-align: center; font: 700 14px/1.4 var(--font-ui); animation: infectPulse 1s ease-in-out infinite alternate; }
@keyframes infectPulse { from { box-shadow: 0 0 0 rgba(160, 60, 200, 0); } to { box-shadow: 0 0 18px rgba(160, 60, 200, 0.55); } }

/* ---------- Retours visuels (juice.js) : voile bref, jamais bloquant ---------- */
.juice-veil { position: fixed; inset: 0; z-index: 45; pointer-events: none; opacity: 0; }
.juice-veil.on { animation: veil 0.9s ease-out both; }
.juice-veil.death { background: radial-gradient(ellipse at center, rgba(120, 0, 0, 0) 35%, rgba(90, 0, 0, 0.55) 100%); }
.juice-veil.shot { background: radial-gradient(ellipse at center, rgba(255, 240, 210, 0.35) 0%, rgba(110, 0, 0, 0.5) 100%); animation-duration: 0.6s; }
.juice-veil.gold { background: radial-gradient(ellipse at center, rgba(242, 199, 92, 0.28) 0%, rgba(242, 199, 92, 0) 70%); animation-duration: 1.4s; }
.juice-veil.soft { animation-duration: 0.6s; }
.juice-veil.soft.on { animation-name: veilSoft; }
@keyframes veil { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
@keyframes veilSoft { 0% { opacity: 0; } 30% { opacity: 0.45; } 100% { opacity: 0; } }
/* Bouton micro : toujours sur une ligne (petits téléphones), texte raccourci si besoin. */
.mic-btn { white-space: nowrap; max-width: 100%; min-width: 0; }
.mic-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .mic-btn { font-size: 12px; } }

/* Bouton micro : l'anneau vert suit ma voix (--lvl de 0 à 1) ; mort = gris discret. */
.mic-btn.live { border-color: rgba(127, 224, 122, 0.55); color: #c9f5bf; }
.mic-btn.live i { animation: none; box-shadow: 0 0 0 calc(2px + 7px * var(--lvl, 0)) rgba(95, 184, 74, calc(0.25 + 0.35 * var(--lvl, 0))); transition: box-shadow 0.12s ease-out; }
.reduce-motion .mic-btn.live i { transition: none; }
.mic-btn.dead { color: var(--lux-muted); border-style: dashed; }
/* Téléphone : infos du joueur en pastilles qui passent à la ligne (rien n'est coupé en plein mot). */
@media (orientation: portrait) and (max-width: 900px) {
  .me-status { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 11.5px; line-height: 15px; max-height: 30px; }
  .me-status > span { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}
/* Résultat du vote : barre proportionnelle aux voix derrière chaque nom, la tête du vote en avant. */
.vote-list .target { position: relative; overflow: hidden; isolation: isolate; }
.vote-list .target::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: linear-gradient(90deg, rgba(224, 83, 61, 0.28), rgba(224, 83, 61, 0.1)); z-index: -1; }
.vote-list .target .n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: rgba(224, 83, 61, 0.25); color: #ffd2c8; font-size: 12px; }
.vote-list .target.lead { border-color: rgba(242, 199, 92, 0.6); }
.vote-list .target.lead .n { background: #f2c75c; color: #1a1206; }
/* Nouvelle action à faire : un seul éclat doré autour du panneau. */
.action.fresh { animation: action-fresh 1.1s ease-out 1; }
@keyframes action-fresh { 0% { box-shadow: 0 0 0 0 rgba(242, 199, 92, 0.85), var(--lux-shadow, 0 10px 30px rgba(0, 0, 0, 0.5)); } 100% { box-shadow: 0 0 0 14px rgba(242, 199, 92, 0), var(--lux-shadow, 0 10px 30px rgba(0, 0, 0, 0.5)); } }
.reduce-motion .action.fresh { animation: none; }
.mic-btn small { font: inherit; opacity: 0.75; }
/* Téléphone : les libellés longs perdent leur précision plutôt que d'être coupés par « … ». */
@media (orientation: portrait) and (max-width: 900px) {
  .mic-btn.live small, .mic-btn.self small, .mic-btn.dead small { display: none; }
}

/* ================= Réactions 🍅 / 🌸 (sociales, sans effet sur le vote) ================= */
.react-bar { position: absolute; right: 14px; bottom: 80px; display: flex; flex-direction: column; gap: 8px; z-index: 30; }
.react-bar[hidden] { display: none; }
.react-btn { position: relative; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; padding: 0; cursor: pointer; background: var(--lux-bg, #0d0b10); border: 1.5px solid var(--lux-line, #c99a3b); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6); font-size: 25px; line-height: 1; transition: transform 0.12s ease, opacity 0.2s; -webkit-tap-highlight-color: transparent; }
.react-btn span { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.react-btn b { position: absolute; right: -4px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font: 900 12px/1 var(--font-ui); color: #1a1206; background: #f2c75c; border: 1.5px solid #08070a; }
.react-btn.tomato { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 12px rgba(224, 83, 61, 0.3); }
.react-btn.flower { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 12px rgba(255, 158, 205, 0.3); }
.react-btn:active:not(:disabled) { transform: scale(0.88); }
.react-btn:disabled { opacity: 0.38; cursor: default; filter: grayscale(0.7); }
.react-btn:disabled b { background: #4a4552; color: #cfc8d6; }
@media (orientation: portrait) and (max-width: 900px) {
  .react-bar { right: 10px; bottom: 68px; gap: 6px; }
  .react-btn { width: 46px; height: 46px; font-size: 22px; }
}

/* Projectile (coordonnées du plateau : grandit avec lui) */
.react-item { position: absolute; left: 0; top: 0; width: 80px; height: 80px; margin: -40px; display: grid; place-items: center; font-size: 62px; line-height: 1; pointer-events: none; z-index: 1700; will-change: transform; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.55)); }
.react-hit { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 1700; }
.react-hit b { position: absolute; left: -70px; top: -70px; width: 140px; height: 140px; border-radius: 50%; animation: react-flash 0.6s ease-out both; }
.react-hit.tomato b { background: radial-gradient(circle, rgba(255, 120, 90, 0.75), rgba(200, 30, 20, 0.35) 45%, transparent 70%); }
.react-hit.flower b { background: radial-gradient(circle, rgba(255, 220, 240, 0.8), rgba(255, 150, 200, 0.3) 45%, transparent 70%); }
/* Tomate : gouttes rouges projetées en étoile */
.react-hit.tomato i { position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; border-radius: 50% 50% 50% 10%; background: radial-gradient(circle at 35% 35%, #ff7a5c, #c41e12 70%); box-shadow: 0 0 0 2px rgba(60, 0, 0, 0.35); animation: react-drop 0.75s cubic-bezier(.2,.8,.3,1) both; }
.react-hit.tomato i:nth-child(1) { --dx: -70px; --dy: -50px; }
.react-hit.tomato i:nth-child(2) { --dx: 65px; --dy: -60px; width: 16px; height: 16px; }
.react-hit.tomato i:nth-child(3) { --dx: -80px; --dy: 30px; width: 14px; height: 14px; }
.react-hit.tomato i:nth-child(4) { --dx: 75px; --dy: 35px; }
.react-hit.tomato i:nth-child(5) { --dx: -10px; --dy: -85px; width: 15px; height: 15px; }
.react-hit.tomato i:nth-child(6) { --dx: 10px; --dy: 70px; width: 18px; height: 18px; }
/* Fleur : pétales qui s'ouvrent puis retombent doucement */
.react-hit.flower i { position: absolute; left: -16px; top: -16px; font-size: 32px; font-style: normal; line-height: 1; animation: react-petal 1s cubic-bezier(.2,.7,.3,1) both; }
.react-hit.flower i:nth-child(1) { --dx: -60px; --dy: -40px; --r: -40deg; }
.react-hit.flower i:nth-child(2) { --dx: 55px; --dy: -50px; --r: 35deg; }
.react-hit.flower i:nth-child(3) { --dx: 0px; --dy: -75px; --r: 10deg; }
.react-hit.flower i:nth-child(4) { --dx: -45px; --dy: 30px; --r: -70deg; }
.react-hit.flower i:nth-child(5) { --dx: 50px; --dy: 25px; --r: 80deg; }
@keyframes react-flash { 0% { transform: scale(0.2); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes react-drop { 0% { transform: translate(0, 0) scale(0.4); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 30px)) scale(1); opacity: 0; } }
@keyframes react-petal { 0% { transform: translate(0, 0) scale(0.3) rotate(0); opacity: 0; } 25% { opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 40px)) scale(0.9) rotate(var(--r)); opacity: 0; } }
/* « 🍅 Sarah » au-dessus de celui qui parle : public, bref */
.react-tag { position: absolute; transform: translate(-50%, -50%); z-index: 1750; pointer-events: none; white-space: nowrap; padding: 4px 14px; border-radius: 999px; font: 800 26px/1.2 var(--font-ui); color: #f6ecd6; background: rgba(8, 7, 10, 0.88); border: 1.5px solid rgba(201, 154, 59, 0.7); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55); animation: react-tag 2.2s ease-out both; }
.react-tag.tomato { border-color: rgba(224, 83, 61, 0.8); }
.react-tag.flower { border-color: rgba(255, 158, 205, 0.8); }
@keyframes react-tag { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.8); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -110%); } }
.reduce-motion .react-hit i { animation-duration: 0.01s; }
/* Fil des réactions : phrases lisibles par tous, au-dessus de la barre du joueur. */
.react-feed { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); width: min(460px, calc(100vw - 150px)); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; z-index: 29; }
.react-line { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 14px 7px 8px; border-radius: 999px; background: rgba(8, 7, 10, 0.9); border: 1.5px solid rgba(201, 154, 59, 0.7); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6); color: var(--lux-text, #f3ead6); font: 700 15px/1.25 var(--font-ui); animation: react-line-in 0.35s cubic-bezier(.2,1.3,.4,1) both; transition: opacity 0.45s, transform 0.45s; }
.react-line b { color: #f2c75c; font-weight: 900; }
.react-line .ico { font-size: 22px; line-height: 1; flex: none; }
.react-line.tomato { border-color: rgba(224, 83, 61, 0.85); }
.react-line.flower { border-color: rgba(255, 158, 205, 0.85); }
.react-line.out { opacity: 0; transform: translateY(-8px); }
@keyframes react-line-in { from { opacity: 0; transform: translateY(12px) scale(0.9); } to { opacity: 1; transform: none; } }
@media (orientation: portrait) and (max-width: 900px) {
  .react-feed { left: 8px; right: 66px; bottom: 100px; width: auto; transform: none; align-items: flex-start; }
  .react-line { font-size: 13.5px; padding: 6px 12px 6px 7px; }
  .react-line .ico { font-size: 19px; }
}
.react-line.mine { border-width: 2px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 14px rgba(242, 199, 92, 0.35); }

/* ================= Coup de griffe à la mort d'un joueur (l'écran ne bouge pas) ================= */
.claw-slash { position: fixed; left: 50%; top: 44%; width: min(70vw, 340px); aspect-ratio: 300 / 320; transform: translate(-50%, -50%) rotate(-8deg); z-index: 9000; pointer-events: none; animation: claw-out 1.95s ease-in both; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.7)); }
.claw-slash svg { width: 100%; height: 100%; overflow: visible; }
/* Chaque griffure se « déchire » du haut vers le bas */
.claw-slash .cm { clip-path: inset(0 0 100% 0); animation: claw-tear 0.22s cubic-bezier(.2,.9,.3,1) var(--d) forwards; }
.claw-slash .cd { transform: scaleY(0); animation: claw-drip 0.9s ease-in var(--d) forwards; }
.claw-slash .cm.in { fill: #4a0000; stroke: none; opacity: .55; }
.claw-slash .cs { opacity: 0; animation: claw-splat 0.3s ease-out 0.18s forwards; }
@keyframes claw-tear { to { clip-path: inset(0 0 0 0); } }
@keyframes claw-drip { to { transform: scaleY(1); } }
@keyframes claw-splat { from { opacity: 0; transform: scale(0.4); transform-origin: 150px 150px; } to { opacity: 1; transform: scale(1); transform-origin: 150px 150px; } }
@keyframes claw-out { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.claw-slash.soft { animation-duration: 1.2s; }
.claw-slash.soft .cm, .claw-slash.soft .cd, .claw-slash.soft .cs { animation: none; clip-path: none; transform: none; opacity: 1; }

/* ================= Halloween 🎃 (décor seulement) ================= */
.hw-stage { pointer-events: none; }
/* Brume au sol : légère et grise le jour, épaisse et violette la nuit (--night : 0 → 1) */
.hw-fog { position: absolute; left: -12%; right: -12%; bottom: 0; height: 52%; background:
  radial-gradient(ellipse 28% 38% at 12% 78%, rgba(232, 228, 245, 0.95), transparent 70%),
  radial-gradient(ellipse 34% 34% at 42% 88%, rgba(225, 220, 242, 0.92), transparent 70%),
  radial-gradient(ellipse 30% 40% at 70% 80%, rgba(235, 230, 248, 0.92), transparent 70%),
  radial-gradient(ellipse 26% 36% at 95% 72%, rgba(228, 224, 244, 0.9), transparent 70%);
  opacity: calc(0.55 + 0.35 * var(--night, 0)); }
.hw-fog.b { height: 36%; bottom: -4%; background:
  radial-gradient(ellipse 32% 45% at 25% 70%, rgba(150, 110, 210, 0.75), transparent 70%),
  radial-gradient(ellipse 36% 40% at 62% 76%, rgba(125, 95, 200, 0.7), transparent 70%),
  radial-gradient(ellipse 30% 45% at 90% 70%, rgba(160, 120, 220, 0.65), transparent 70%);
  opacity: calc(0.12 + 0.75 * var(--night, 0)); }
/* Écran : toiles d'araignée, chauves-souris, fantôme — sous l'interface */
.hw-screen { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.hw-web { position: absolute; top: 0; width: clamp(80px, 16vw, 150px); opacity: 0.8; }
.hw-web.l { left: 0; }
.hw-web.r { right: 0; transform: scaleX(-1); }
.hw-bat { position: absolute; width: var(--sz, 34px); left: 0; animation: hw-bat-ltr var(--dur, 5s) linear var(--delay, 0s) both; }
.hw-bat.rtl { animation-name: hw-bat-rtl; }
.hw-bat svg { width: 100%; animation: hw-flap 0.22s ease-in-out infinite alternate; transform-origin: 50% 40%; }
@keyframes hw-flap { from { transform: scaleY(1); } to { transform: scaleY(0.45); } }
@keyframes hw-bat-ltr { 0% { transform: translate(-10vw, 0); } 25% { transform: translate(25vw, -3vh); } 50% { transform: translate(55vw, 2vh); } 75% { transform: translate(85vw, -2vh); } 100% { transform: translate(115vw, 1vh); } }
@keyframes hw-bat-rtl { 0% { transform: translate(110vw, 0); } 25% { transform: translate(75vw, 3vh); } 50% { transform: translate(45vw, -2vh); } 75% { transform: translate(15vw, 2vh); } 100% { transform: translate(-15vw, -1vh); } }
.hw-ghost { position: absolute; left: 0; top: 0; margin: -30px 0 0 -25px; opacity: 0; filter: drop-shadow(0 0 10px rgba(200, 200, 255, 0.6)); will-change: transform, opacity; }
.hw-ghost-bob { animation: hw-bob 2.4s ease-in-out infinite alternate; }
.hw-ghost svg { width: 100%; display: block; }
@keyframes hw-bob { from { transform: translateY(-6px) rotate(-4deg); } to { transform: translateY(6px) rotate(4deg); } }
/* Fine couche de brume DEVANT les pieds des personnages (léger, ne cache pas les noms) */
.hw-front { pointer-events: none; }
.hw-front .hw-fog { height: 22%; bottom: -3%; opacity: calc(0.28 + 0.25 * var(--night, 0)); }
/* Pleine lune : halo lumineux la nuit (orangé pendant Halloween) */
.moon::before { background: radial-gradient(circle, rgba(235, 240, 255, 0.75), rgba(170, 190, 255, 0.22) 45%, transparent 70%); }
.halloween .moon::before { background: radial-gradient(circle, rgba(255, 214, 150, 0.8), rgba(255, 140, 60, 0.25) 45%, transparent 70%); }
.halloween .moon::after { background: radial-gradient(circle at 34% 38%, #e9c98a 0 9%, transparent 10%), radial-gradient(circle at 62% 64%, #e9c98a 0 7%, transparent 8%), radial-gradient(circle at 66% 30%, #e9c98a 0 5%, transparent 6%), radial-gradient(circle at 40% 40%, #fff6dc, #ffd98f 70%); }

/* ================= Performance (téléphones) =================
   Les animations n'utilisent plus que transform / opacity (gérés par la carte graphique,
   sans redessiner l'écran à chaque image), sur de PETITS éléments uniquement. */
.pion .wave i { height: 20px; transform-origin: 50% 100%; animation-name: wave-fast; will-change: transform; }
@keyframes wave-fast { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.pion.floor .halo { animation: none; }
.pion.floor .halo::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 46px 20px rgba(255, 213, 82, 0.95); opacity: 0; animation: glow-fast 1.4s ease-in-out infinite; will-change: opacity; pointer-events: none; }
.pion.floor .plate { animation: none; }
.pion.floor .plate::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 16px 4px rgba(255, 213, 82, 0.9); opacity: 0; animation: glow-fast 1.4s ease-in-out infinite; will-change: opacity; pointer-events: none; }
@keyframes glow-fast { 50% { opacity: 1; } }
.pion.targetable .halo { animation: target-fast 1.2s ease-in-out infinite; will-change: opacity; }
@keyframes target-fast { 50% { opacity: 0.45; } }
/* Cible déjà choisie (sélection, vote, choix de la meute) : halo fixe, il ne clignote pas. */
.pion.targetable.selected .halo, .pion.targetable.voted .halo, .pion.targetable.wolf-pick .halo { animation: none; }
.mic-btn.live i { position: relative; isolation: isolate; box-shadow: none; transition: none; }
.mic-btn.live i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: rgba(95, 184, 74, 0.4); transform: scale(calc(1.15 + 0.6 * var(--lvl, 0))); transition: transform 0.12s ease-out; z-index: -1; will-change: transform; }
.reduce-motion .pion.floor .halo::after, .reduce-motion .pion.floor .plate::after { animation: none; opacity: 0.6; }
/* Nouvelle version disponible (en pleine partie) */
.update-banner { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 76px); transform: translateX(-50%); z-index: 80; max-width: calc(100vw - 24px); padding: 9px 16px; border-radius: 999px; border: 1.5px solid #f2c75c; background: rgba(8, 7, 10, 0.95); color: #f2c75c; font: 800 14px var(--font-ui); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6); cursor: pointer; }
.update-banner[hidden] { display: none; }
/* Fin de partie sur téléphone : 5 petites cartes par ligne → les rôles de tout le monde d'un
   coup d'œil, sans faire défiler. */
@media (orientation: portrait) and (max-width: 900px) {
  .gameover { width: 96vw; padding: 12px 10px; max-height: calc(100vh - 150px); top: calc(50% - 40px); }
  .final-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 6px; }
  .final-grid.many { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px 4px; } /* 16 à 18 joueurs : 3 lignes */
  .final-grid.many .final-item { font-size: 9.5px; }
  .final-item { font-size: 10.5px; line-height: 1.2; min-width: 0; }
  .final-item .mini { margin-bottom: 2px; }
  .final-item > :not(.mini), .final-item { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gameover .back-lobby { font-size: 15px; margin-top: 10px; }
}
