/* Téléphones */
body.play { height: 100dvh; min-height: -webkit-fill-available; user-select: none; -webkit-user-select: none; }
body.play.ghost { --bg1: #4c4a6b; --bg2: #6d6a8f; --bg3: #9c94c9; }
.grow { flex: 1; }
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 12px 8px; }
.me { display: flex; align-items: center; gap: 6px; background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 2px 12px 2px 3px; font-weight: 700; font-size: 15px; box-shadow: 0 3px 0 var(--ink); max-width: 70vw; overflow: hidden; white-space: nowrap; }
.me .avatar { width: 30px; height: 30px; }
.tool { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; font-size: 18px; box-shadow: 0 3px 0 var(--ink); padding: 0; }
.tool.off { background: #adb5bd; }
.conn-lost { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--bad); color: #fff; font-family: var(--title); padding: 8px 18px; border-radius: 999px; border: 3px solid var(--ink); white-space: nowrap; }

.screen { padding: 64px 16px max(40px, calc(env(safe-area-inset-bottom) + 28px)); overflow-y: auto; }
.col { width: 100%; max-width: 440px; margin: auto; display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.col.center { align-items: center; text-align: center; }
.logo { font-size: clamp(42px, 13vw, 64px); text-align: center; margin: 0; }
.tag { color: #fff; font-weight: 600; text-align: center; margin: 0; font-size: 17px; text-shadow: 0 2px 0 var(--ink); }
.title { font-family: var(--title); font-weight: 400; font-size: 34px; margin: 0; color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 4px 0 var(--ink); line-height: 1.1; }
.sub { color: #fff; font-weight: 600; font-size: 18px; margin: 0; text-shadow: 0 2px 0 var(--ink); }
.btn { font-size: 22px; }
.btn.wide { width: 100%; }
.btn.small { font-size: 15px; }

.join-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.av-pick { position: relative; }
.big-av { width: 120px; height: 120px; animation: bounce 1.3s ease-in-out infinite; }
.dice { position: absolute; right: -14px; bottom: 0; width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--ink); background: var(--yellow); font-size: 24px; box-shadow: 0 3px 0 var(--ink); padding: 0; }
.dice:active { transform: rotate(90deg) scale(.9); }
#name { width: 100%; font: 700 22px var(--body); text-align: center; padding: 12px; border: 3px solid var(--ink); border-radius: 16px; outline: none; color: var(--ink); background: #fff; }
#name:focus { box-shadow: 0 0 0 4px var(--yellow); }
.err { color: var(--bad); font-weight: 700; min-height: 1.2em; font-size: 15px; }
.huge-av { width: 170px; height: 170px; }
.bouncy { animation: bounce 1.2s ease-in-out infinite; }
.mini-rules { padding: 12px 16px; font-weight: 600; font-size: 15px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.small-bomb { width: 170px; }

/* Question */
#s-question { padding-top: 60px; }
.q-wrap { width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; min-height: 100%; }
.fuse-bar { position: relative; height: 18px; background: rgba(27,18,64,.35); border: 3px solid var(--ink); border-radius: 999px; overflow: visible; }
.fuse-fill { height: 100%; width: 100%; background: repeating-linear-gradient(90deg, #c9a46a 0 10px, #8a6a3a 10px 14px); border-radius: 999px; transform-origin: left; }
.fuse-spark { position: absolute; top: 50%; left: 100%; transform: translate(-50%, -50%); font-size: 30px; color: #FFD43B; text-shadow: 0 0 6px #ff6b00, 0 0 2px var(--ink); animation: spark .12s linear infinite alternate; pointer-events: none; }
.fuse-bar.hurry { animation: shake .5s infinite; }
.ghost-banner { background: #e5dbff; border: 3px dashed var(--ink); border-radius: 14px; padding: 6px 10px; font-weight: 700; text-align: center; font-size: 15px; }
.q-text { background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); padding: 12px 14px; font-family: var(--title); font-size: 21px; line-height: 1.2; text-align: center; }
.p-answers { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(110px, 1fr); gap: 10px; }
.p-answers .ans { flex-direction: column; justify-content: center; text-align: center; gap: 6px; font-size: 19px; padding: 10px 8px; line-height: 1.15; animation: pop .4s cubic-bezier(.2,1.6,.4,1) both; }
.p-answers .ans:nth-child(2) { animation-delay: .05s; } .p-answers .ans:nth-child(3) { animation-delay: .1s; } .p-answers .ans:nth-child(4) { animation-delay: .15s; }
.p-answers .ans .shape { width: 38px; height: 38px; }
.p-answers .ans:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.p-answers.two { grid-template-columns: 1fr; }
.picked { padding: 14px 20px; font-size: 22px; min-width: 70%; justify-content: center; }
.picked .shape { width: 34px; height: 34px; }
.lock { font-size: 80px; line-height: 1; }

/* Résultats */
.res-emoji { font-size: 96px; line-height: 1; animation: pop .6s cubic-bezier(.2,1.8,.4,1) both; }
.res-card { padding: 14px 18px; font-weight: 600; font-size: 17px; }
.res-card b { font-family: var(--title); font-weight: 400; }
body.play.flash-good { background: linear-gradient(160deg, #2f9e44, #69db7c); }
body.play.flash-bad { background: linear-gradient(160deg, #c92a2a, #ff8787); }
body.play.flash-pschitt { background: linear-gradient(160deg, #1971c2, #74c0fc); }
.big-boom { width: min(90vw, 380px); animation: boomIn 1.8s cubic-bezier(.2,1.6,.4,1) both; }
.big-boom svg { width: 100%; }
.rank-big { font-family: var(--title); font-size: 72px; color: var(--yellow); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 4px 5px 0 var(--ink); line-height: 1; }
.big-boom { animation: boomStay .9s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes boomStay { 0% { transform: scale(.1) rotate(-20deg); opacity: 0; } 40% { transform: scale(1.12) rotate(3deg); opacity: 1; } 100% { transform: none; opacity: 1; } }
.big-boom .boom-svg { width: 100%; animation: none; }
.fuse-row { display: flex; align-items: center; gap: 10px; }
.fuse-row .fuse-bar { flex: 1; }
.fuse-num { font-family: var(--title); font-size: 22px; min-width: 58px; text-align: center; background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 1px 8px; box-shadow: 0 3px 0 var(--ink); }
.fuse-num.hurry { background: var(--bad); color: #fff; animation: pulse .5s infinite; }
