:root { --pc: #9b5cff; --bg1: #1a0b3d; --bg2: #3b0d5c; --a: #9b5cff; --b: #ff3fa4; --ok: #2fe08b; --ko: #ff4d6d; --c0: #ff4d6d; --c1: #3fa9ff; --c2: #ffc93f; --c3: #2fd18b; --card: rgba(255,255,255,.12); }
body.th-brain   { --a:#3a86ff; --b:#00d4ff; --bg1:#06142e; --bg2:#0b2e5c; }
body.th-stade   { --a:#00c271; --b:#ffd60a; --bg1:#03210f; --bg2:#0a4a26; }
body.th-neon    { --a:#ff2bd6; --b:#00f0ff; --bg1:#0d021f; --bg2:#2a0845; }
body.th-disco   { --a:#ff7a00; --b:#ff2e63; --bg1:#1a0826; --bg2:#4a0d3a; }
body.th-cartoon { --a:#ff9f1c; --b:#ff5d8f; --bg1:#1c7ed6; --bg2:#4dabf7; }
body.th-mystere { --a:#e63946; --b:#8d0c1e; --bg1:#07070b; --bg2:#1c0b12; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif; color: #fff; -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--pc) 45%, var(--bg2)), var(--bg1) 70%); transition: background .6s; }
#bgfx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
#bgfx i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(70px); opacity: .35; mix-blend-mode: screen; }
#bgfx i:nth-child(1) { background: var(--a); top: -35vmax; left: -25vmax; animation: fl1 14s ease-in-out infinite alternate; }
#bgfx i:nth-child(2) { background: var(--b); bottom: -40vmax; right: -30vmax; animation: fl2 17s ease-in-out infinite alternate; }
#bgfx i:nth-child(3) { background: var(--pc); width: 35vmax; height: 35vmax; top: 40%; left: 30%; opacity: .18; animation: fl1 20s ease-in-out infinite alternate-reverse; }
@keyframes fl1 { to { transform: translate(20vmax, 18vmax) scale(1.2); } }
@keyframes fl2 { to { transform: translate(-20vmax, -15vmax) scale(.85); } }
button, input { font: inherit; color: inherit; border: 0; background: none; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hide { display: none !important; }
#app { position: relative; height: 100%; transition: transform .5s; }
body.mirror #app { transform: scaleX(-1); }
.scr { display: none; height: 100%; padding: max(16px, env(safe-area-inset-top)) 16px max(70px, calc(env(safe-area-inset-bottom) + 64px)); flex-direction: column; gap: 14px; overflow-y: auto; }
body.is-host .scr { padding-top: max(58px, calc(env(safe-area-inset-top) + 46px)); }
.scr.on { display: flex; animation: in .35s cubic-bezier(.2,1.3,.4,1); }
.scr.center { align-items: center; justify-content: center; text-align: center; }
@keyframes in { from { opacity: 0; transform: translateY(16px) scale(.97); } }

.brand { font-weight: 900; font-size: 34px; text-align: center; letter-spacing: -.02em; }
.brand span { color: #ffd23f; }
.brand.big { font-size: 52px; line-height: 1; animation: wob 3s ease-in-out infinite; }
@keyframes wob { 50% { transform: rotate(-3deg) scale(1.04); } }
.or { opacity: .6; font-weight: 800; }
.code-join { display: flex; gap: 8px; width: 100%; }
.code-join input, .code-in { flex: 1; min-width: 0; background: #fff; color: #222; border-radius: 16px; padding: 14px; font-size: 24px; font-weight: 900; text-align: center; letter-spacing: .3em; text-transform: uppercase; outline: none; user-select: text; -webkit-user-select: text; }
.code-join .big-btn { width: auto; padding: 14px 18px; }
.av { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; background: var(--pc); border: 3px solid #fff; overflow: hidden; flex: none; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.big { width: 112px; height: 112px; font-size: 64px; border-width: 5px; }
.av.sm { width: 40px; height: 40px; font-size: 22px; border-width: 2px; }
.avatar-pick { display: flex; align-items: center; justify-content: center; gap: 16px; }
.av-actions { display: flex; flex-direction: column; gap: 8px; }
.small-btn { display: inline-block; background: var(--card); padding: 10px 16px; border-radius: 999px; font-weight: 800; font-size: 15px; text-align: center; align-self: center; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.emoji-grid button { font-size: 26px; aspect-ratio: 1; border-radius: 12px; background: var(--card); }
.emoji-grid button.sel { background: #fff; transform: scale(1.12); }
.txt, #nameIn { width: 100%; background: #fff; color: #222; border-radius: 16px; padding: 15px 18px; font-size: 19px; font-weight: 800; outline: none; box-shadow: 0 4px 0 rgba(0,0,0,.2); user-select: text; -webkit-user-select: text; }
.big-btn { background: linear-gradient(135deg, #ffd23f, #ff9f1c); color: #2a1300; font-weight: 900; font-size: 21px; padding: 16px; border-radius: 18px; box-shadow: 0 5px 0 #b85c00; width: 100%; transition: transform .1s; }
.big-btn.alt { background: linear-gradient(135deg, #fff, #e5dcff); color: #2a1660; box-shadow: 0 5px 0 #8f7cc9; }
.big-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #b85c00; }
.big-btn:disabled { filter: grayscale(1) opacity(.6); }
.err { color: #ffb3c1; font-weight: 800; text-align: center; min-height: 1.2em; }
.hello { font-size: 25px; font-weight: 900; }
.sub { font-size: 16px; opacity: .85; font-weight: 700; }
.join-mode { text-align: center; font-weight: 800; background: var(--card); border-radius: 14px; padding: 8px; }
.card-box { background: rgba(0,0,0,.25); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.step { font-weight: 800; line-height: 1.4; }
.addr { margin-top: 6px; background: #fff; color: #2a1660; border-radius: 12px; padding: 10px; font-size: 20px; font-weight: 900; text-align: center; user-select: text; -webkit-user-select: text; }

/* Hôte */
#hostbar { position: fixed; top: 0; left: 0; right: 0; z-index: 25; display: none; align-items: center; gap: 6px; padding: max(8px, env(safe-area-inset-top)) 10px 8px; background: rgba(0,0,0,.35); backdrop-filter: blur(10px); }
body.is-host.in-game #hostbar { display: flex; }
#hostbar .hb-l { font-weight: 900; flex: 1; }
#hostbar button { width: 42px; height: 34px; border-radius: 10px; background: var(--card); font-size: 18px; }
.hl-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hl-top .small-btn { font-size: 13px; padding: 8px 12px; }
.quiz-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qc { background: var(--card); border: 2px solid rgba(255,255,255,.15); border-radius: 18px; padding: 10px; text-align: left; transition: transform .15s; }
.qc .e { font-size: 28px; } .qc .n { font-weight: 900; font-size: 16px; } .qc .d { font-size: 12px; opacity: .8; line-height: 1.25; margin-top: 2px; }
.qc.sel { background: linear-gradient(135deg, var(--a), var(--b)); border-color: #fff; transform: scale(1.03); }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--card); border-radius: 14px; padding: 6px 6px 6px 12px; font-weight: 800; font-size: 14px; }
.seg { display: flex; background: rgba(0,0,0,.25); border-radius: 999px; padding: 3px; flex-wrap: wrap; justify-content: flex-end; }
.seg button { padding: 6px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; color: rgba(255,255,255,.75); }
.seg button.sel { background: #fff; color: #222; }
.players-mini { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.players-mini .av { width: 40px; height: 40px; font-size: 22px; border-width: 2px; }
.invite { display: none; flex-direction: column; align-items: center; gap: 8px; background: #fff; color: #222; border-radius: 18px; padding: 14px; font-weight: 800; text-align: center; word-break: break-all; }
.invite.on { display: flex; }
.invite img { width: 200px; }

/* Joueur */
#waitAv .av { animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(4deg); } }
.teams { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.teams button { padding: 14px; border-radius: 16px; font-weight: 900; font-size: 19px; background: var(--tc); color: #111; opacity: .55; }
.teams button.sel { opacity: 1; box-shadow: 0 0 0 4px #fff; }
.look-emoji { font-size: 90px; line-height: 1; }
.pop { animation: pop .6s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(0) rotate(-30deg); } }
.hand-preview { display: flex; gap: 8px; margin-top: 10px; }
.hand-preview span { background: var(--card); padding: 6px 10px; border-radius: 10px; font-size: 22px; }
.qhead { display: flex; justify-content: space-between; font-weight: 800; font-size: 15px; opacity: .9; }
.tbar { height: 8px; background: rgba(255,255,255,.15); border-radius: 4px; overflow: hidden; flex: none; }
.tbar i { display: block; height: 100%; background: #ffd23f; border-radius: 4px; width: 100%; transition: background .3s; }
.tbar.hurry i { background: #ff4d6d; }
.qtxt { font-weight: 800; font-size: 18px; line-height: 1.25; text-align: center; }
.zone { flex: 1; display: flex; flex-direction: column; gap: 12px; justify-content: center; transition: filter .4s; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; max-height: 420px; }
.btns.one-col { grid-template-columns: 1fr; }
.btns.n3 { grid-template-columns: 1fr 1fr 1fr; }
.cb { background: var(--cc); border-radius: 20px; font-weight: 900; font-size: 19px; padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 6px 0 rgba(0,0,0,.25); transition: transform .1s, opacity .3s; min-height: 86px; text-shadow: 0 2px 4px rgba(0,0,0,.25); position: relative; line-height: 1.15; }
.cb:active { transform: translateY(5px) scale(.97); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.cb .sh { font-size: 26px; opacity: .85; }
.cb .ce { font-size: 38px; }
.cb.kid { font-size: 0; } .cb.kid .ce { font-size: 72px; }
.cb .col { width: 64px; height: 64px; border-radius: 50%; border: 4px solid #fff; }
.cb svg { width: 70%; max-width: 110px; }
.cb.gone { opacity: .12; pointer-events: none; }
.cb.crazy { animation: crazy .6s ease-in-out infinite alternate; }
@keyframes crazy { 0% { transform: translate(-14px, 8px) rotate(-6deg); } 100% { transform: translate(14px, -10px) rotate(6deg); } }
.free { display: flex; flex-direction: column; gap: 12px; }
.free label { font-weight: 800; font-size: 15px; opacity: .85; margin-bottom: -6px; }
.row2 { display: flex; gap: 8px; }
.row2 .txt { flex: 1; }
.mic { width: 58px; flex: none; border-radius: 16px; background: #fff; font-size: 26px; box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.mic.rec { background: #ff4d6d; }
@keyframes rec { 50% { transform: scale(1.08); } }
.tip { font-size: 13px; opacity: .75; text-align: center; font-weight: 700; }
.letters { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.letters span { background: #fff8e1; color: #3b2400; font-weight: 900; font-size: 22px; width: 32px; height: 38px; border-radius: 7px; display: grid; place-items: center; }
.rebus { font-size: 48px; text-align: center; letter-spacing: .1em; }
.numpad-val { font-size: 40px; font-weight: 900; text-align: center; background: rgba(0,0,0,.2); border-radius: 16px; padding: 8px; min-height: 64px; font-variant-numeric: tabular-nums; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.numpad button { background: var(--card); border-radius: 14px; font-size: 26px; font-weight: 900; padding: 12px; }
.numpad button:active { background: rgba(255,255,255,.3); }
.cards { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; flex: none; }
.card { background: linear-gradient(160deg, #fff, #e9e3ff); color: #2a1660; border-radius: 14px; padding: 7px 10px; display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 14px; box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.card .e { font-size: 22px; }
.card.malus { background: linear-gradient(160deg, #ffe0e6, #ffc2cf); color: #6a0f24; }
.card:disabled { opacity: .35; }
.shield-on { font-size: 13px; font-weight: 800; opacity: .9; text-align: center; width: 100%; }
.sent-val { font-size: 22px; font-weight: 900; background: var(--card); padding: 10px 18px; border-radius: 14px; max-width: 100%; overflow-wrap: anywhere; }
.zone.fog, .gzone.fog { filter: blur(9px) contrast(.6); }

/* Résultat */
#p-res.ok { background: radial-gradient(circle, #2fe08b, #0b7a45); }
#p-res.ko { background: radial-gradient(circle, #ff6b81, #8d0c2a); }
#p-res.none { background: radial-gradient(circle, #6c6c8a, #252538); }
#confetti, #confetti2 { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.res-emoji { font-size: 110px; animation: pop .6s cubic-bezier(.2,1.6,.4,1); }
.res-title { font-size: 34px; font-weight: 900; }
.res-gain { font-size: 46px; font-weight: 900; animation: pop .6s .2s both cubic-bezier(.2,1.6,.4,1); }
.res-ans { font-size: 18px; font-weight: 800; background: rgba(0,0,0,.2); padding: 10px 16px; border-radius: 14px; }
.res-rank { font-size: 19px; font-weight: 800; opacity: .95; }
.res-rank .up { color: #b9ffd9; } .res-rank .down { color: #ffd0d8; }

/* Mini-jeux */
.gzone { flex: 1; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.g-title { font-size: 22px; font-weight: 900; text-align: center; line-height: 1.25; }
.g-big { font-size: 80px; text-align: center; line-height: 1; }
.pick-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick-list button { background: var(--card); border-radius: 16px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 900; font-size: 16px; }
.pick-list button.sel { background: #fff; color: #222; }
.pick-list button:disabled:not(.sel) { opacity: .35; }
.opt-list { display: flex; flex-direction: column; gap: 10px; }
.opt-list button { background: var(--card); border-radius: 16px; padding: 14px; font-weight: 900; font-size: 18px; text-align: left; display: flex; gap: 10px; align-items: center; }
.opt-list button .k { background: rgba(255,255,255,.2); border-radius: 8px; width: 30px; text-align: center; flex: none; }
.opt-list button.sel { background: #fff; color: #222; }
.opt-list button:disabled:not(.sel) { opacity: .35; }
.stars-pick { display: flex; justify-content: center; gap: 6px; }
.stars-pick button { font-size: 48px; filter: grayscale(1) opacity(.5); transition: transform .15s; }
.stars-pick button.on { filter: none; transform: scale(1.15); }
.role-card { background: linear-gradient(160deg, #fff, #ece6ff); color: #2a1660; border-radius: 24px; padding: 24px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.role-card .e { font-size: 70px; } .role-card .l { font-size: 30px; font-weight: 900; } .role-card .r { font-size: 18px; font-weight: 800; opacity: .7; }
.role-card.hidden > * { visibility: hidden; } .role-card.hidden::after { content: '👆 Touche pour voir ton rôle (en secret !)'; font-weight: 900; font-size: 18px; }
.photo-prev { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; border: 4px solid #fff; }
.thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.thumbs button { position: relative; border-radius: 14px; overflow: hidden; border: 4px solid transparent; }
.thumbs button img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.thumbs button .k { position: absolute; top: 6px; left: 6px; background: #ffd23f; color: #222; font-weight: 900; border-radius: 6px; padding: 0 6px; }
.thumbs button.sel { border-color: #fff; }
.thumbs button:disabled:not(.sel) { opacity: .35; }

/* Défis */
.meter { position: relative; height: 46vh; width: 120px; align-self: center; background: rgba(255,255,255,.12); border-radius: 60px; overflow: hidden; border: 4px solid rgba(255,255,255,.3); }
.meter i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, #2fe08b, #ffd23f 60%, #ff4d6d); transition: height .08s linear; }
.meter b { position: absolute; left: -6px; right: -6px; height: 5px; background: #fff; }
.big-num { font-size: 56px; font-weight: 900; text-align: center; font-variant-numeric: tabular-nums; }
.tap-pad { flex: 1; min-height: 50vh; border-radius: 30px; background: linear-gradient(160deg, var(--a), var(--b)); display: grid; place-items: center; font-size: 60px; font-weight: 900; box-shadow: 0 8px 0 rgba(0,0,0,.3); touch-action: none; }
.tap-pad:active { transform: scale(.98); }
.reflex-pad { flex: 1; min-height: 60vh; border-radius: 30px; background: #c9184a; display: grid; place-items: center; font-size: 44px; font-weight: 900; text-align: center; touch-action: none; }
.reflex-pad.go { background: #2fe08b; color: #053; }
.reflex-pad.early { background: #444; }

/* Dessin */
#p-draw { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.draw-top { display: flex; justify-content: space-between; font-weight: 900; font-size: 20px; }
.draw-top span:first-child { color: #ffd23f; font-size: 24px; }
#pad { flex: 1; width: 100%; background: #fffdf6; border-radius: 18px; touch-action: none; box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.palette { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.palette button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.4); }
.palette button.sel { border-color: #fff; transform: scale(1.15); }
.palette .tool { background: var(--card); width: auto; padding: 0 12px; border-radius: 999px; font-weight: 900; font-size: 15px; }

/* Fin */
.awards { display: flex; flex-direction: column; gap: 8px; }
.awards div { background: var(--card); padding: 10px 14px; border-radius: 14px; font-weight: 800; }

/* Réactions */
#reacts { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; display: none; justify-content: center; gap: 4px; padding: 8px 8px max(8px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.35)); }
#reacts.on { display: flex; }
#reacts button { font-size: 26px; width: 40px; height: 44px; border-radius: 12px; transition: transform .1s; }
#reacts button:active { transform: scale(1.4) translateY(-8px); }

/* Calques */
#secret { position: fixed; inset: 0; background: rgba(5,0,10,.92); display: none; align-items: center; justify-content: center; z-index: 20; padding: 24px; text-align: center; }
#secret.on { display: flex; animation: in .4s; }
.s-in { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.s-t { font-size: 28px; font-weight: 900; color: #ff4d6d; }
.s-l { opacity: .7; font-weight: 800; }
.s-a { font-size: 36px; font-weight: 900; color: #ffd23f; background: rgba(255,255,255,.08); padding: 12px 20px; border-radius: 16px; overflow-wrap: anywhere; }
.s-h { font-size: 15px; opacity: .8; font-weight: 700; }
#freeze { position: fixed; inset: 0; background: rgba(165,243,252,.85); color: #063b4a; display: none; flex-direction: column; align-items: center; justify-content: center; z-index: 15; font-size: 30px; font-weight: 900; backdrop-filter: blur(4px); }
#freeze div { font-size: 120px; animation: pop .5s; }
#freeze.on { display: flex; }
#sheet { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: none; align-items: flex-end; z-index: 30; }
#sheet.on { display: flex; }
.sh-in { background: #2a1660; width: 100%; max-height: 85vh; overflow-y: auto; border-radius: 24px 24px 0 0; padding: 20px 16px max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; animation: up .3s; }
@keyframes up { from { transform: translateY(100%); } }
.sh-t { font-weight: 900; font-size: 20px; text-align: center; }
.sh-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sh-list button { background: var(--card); border-radius: 16px; padding: 10px; display: flex; align-items: center; gap: 8px; font-weight: 800; text-align: left; }
.sh-list button.ok { background: rgba(47,224,139,.35); } .sh-list button.ko { background: rgba(255,77,109,.3); }
.sh-list.one { grid-template-columns: 1fr; }
#toast { position: fixed; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -160%); background: #fff; color: #222; font-weight: 800; padding: 12px 18px; border-radius: 999px; z-index: 40; opacity: 0; transition: transform .35s cubic-bezier(.2,1.4,.4,1), opacity .3s; max-width: 92%; text-align: center; }
#toast.on { transform: translate(-50%, 0); opacity: 1; }
#conn { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%); background: #ff4d6d; padding: 8px 14px; border-radius: 16px; max-width: 92%; text-align: center; font-weight: 800; font-size: 14px; display: none; z-index: 40; }
#conn.on { display: block; }
#soundBtn { position: fixed; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 13; width: 40px; height: 40px; border-radius: 50%; background: var(--card); font-size: 18px; }
body.reacts-on #soundBtn { bottom: max(62px, calc(env(safe-area-inset-bottom) + 54px)); }
.shake { animation: shk .5s; }
@keyframes shk { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.age-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.age-pick .lbl { grid-column: 1 / -1; font-weight: 800; font-size: 14px; opacity: .85; text-align: center; }
.age-pick button { background: var(--card); border-radius: 14px; padding: 8px 4px; font-weight: 900; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.age-pick button span { font-size: 24px; }
.age-pick button.sel { background: #fff; color: #222; }
.qc .info { float: right; font-size: 16px; opacity: .8; }
.quiz-detail { background: rgba(0,0,0,.28); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.quiz-detail .t { font-size: 20px; font-weight: 900; }
.quiz-detail .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.quiz-detail .chips span { background: rgba(255,255,255,.15); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; }
.quiz-detail ol { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; line-height: 1.35; }
.joker-help { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 8px; text-align: left; }
.joker-help .h { font-weight: 900; text-align: center; opacity: .9; }
.joker-help div.j { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.12); border-radius: 14px; padding: 8px 12px; font-size: 14px; font-weight: 700; line-height: 1.3; }
.joker-help div.j b { display: block; font-size: 15px; }
.joker-help div.j .e { font-size: 28px; }
.joker-help div.j.malus { background: rgba(255,77,109,.18); }
.fam-tag { font-size: 13px; font-weight: 900; background: rgba(255,255,255,.18); border-radius: 999px; padding: 2px 10px; }
.cb.little .ce { font-size: 64px; }
.hand-preview:has(.joker-help) { display: block; width: 100%; }
.hand-preview .joker-help span { font-size: inherit; background: none; padding: 0; border-radius: 0; }
.hand-preview .joker-help span.e { font-size: 28px; }

/* ───────── Immersion téléphone ───────── */
#floaties { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
#floaties span { position: absolute; bottom: -60px; font-size: 26px; opacity: .22; animation: floatUp linear infinite; }
@keyframes floatUp { to { transform: translateY(-115vh) rotate(360deg); } }
#app { z-index: 1; }
#pchip { position: fixed; top: max(10px, env(safe-area-inset-top)); left: 10px; z-index: 11; display: none; align-items: center; gap: 8px; background: rgba(0,0,0,.35); backdrop-filter: blur(10px); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 900; font-size: 14px; }
#pchip .av { width: 32px; height: 32px; font-size: 18px; border-width: 2px; }
#pchip .sc { color: #ffd23f; font-variant-numeric: tabular-nums; }
#pchip .mv { font-size: 12px; } #pchip .mv.up { color: #8affc1; } #pchip .mv.down { color: #ffb3c1; }
body.chip-on #pchip { display: flex; }
body.is-host.in-game #pchip { top: max(54px, calc(env(safe-area-inset-top) + 46px)); }
.scr.on .look-emoji { animation: pop .6s cubic-bezier(.2,1.6,.4,1), bob 2.4s 0.6s ease-in-out infinite; }
.btns .cb { animation: cbIn .45s cubic-bezier(.2,1.5,.4,1) both; }
.btns .cb:nth-child(2) { animation-delay: .07s; } .btns .cb:nth-child(3) { animation-delay: .14s; } .btns .cb:nth-child(4) { animation-delay: .21s; }
@keyframes cbIn { from { transform: scale(.4) rotate(-8deg); opacity: 0; } }
.cb::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(160deg, rgba(255,255,255,.35), transparent 45%); pointer-events: none; }
.cb.chosen { transform: scale(1.06); box-shadow: 0 0 0 5px #fff, 0 0 40px #fff; }
body.hurry-p #app::before { content: ''; position: fixed; inset: 0; box-shadow: inset 0 0 50px 6px rgba(255,40,80,.45); pointer-events: none; z-index: 5; }
@keyframes breathe { 50% { opacity: .4; } }
.res-gain { background: linear-gradient(180deg, #fff, #ffe38a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 10px rgba(0,0,0,.3)); font-size: 58px; }
#p-res.ok .res-emoji { animation: pop .6s cubic-bezier(.2,1.6,.4,1), spin360 1.2s .6s; }
@keyframes spin360 { to { transform: rotate(360deg); } }
.poll { position: absolute; top: 6px; right: 8px; background: rgba(0,0,0,.45); border-radius: 999px; padding: 2px 8px; font-size: 13px; font-weight: 900; }
/* Réactions : sons et effets + émojis */
#reacts { flex-direction: column; gap: 6px; padding-top: 10px; }
#reacts .rx-em, #reacts .rx-sp { display: flex; justify-content: safe center; padding: 0 6px; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
#reacts .rx-sp button { font-size: 22px; width: auto; padding: 0 10px; height: 40px; border-radius: 999px; background: linear-gradient(135deg, var(--a), var(--b)); display: flex; align-items: center; gap: 4px; font-weight: 900; font-size: 13px; white-space: nowrap; flex: none; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
#reacts .rx-sp button span { font-size: 20px; }
#reacts .rx-sp button.cool { filter: grayscale(1) opacity(.5); }
#reacts .rx-em button { flex: none; }
.rx-fly { position: fixed; font-size: 40px; pointer-events: none; z-index: 50; animation: rxFly .9s ease-out forwards; }
@keyframes rxFly { to { transform: translateY(-260px) scale(1.6); opacity: 0; } }
.scr { padding-bottom: max(124px, calc(env(safe-area-inset-bottom) + 118px)) !important; }
body:not(.reacts-on) .scr { padding-bottom: max(16px, env(safe-area-inset-bottom)) !important; }
body.reacts-on #soundBtn { bottom: max(118px, calc(env(safe-area-inset-bottom) + 110px)); }
#sablier { position: fixed; top: 0; left: 0; right: 0; height: 100%; pointer-events: none; z-index: 14; display: none; }
#sablier.on { display: block; }
#sablier div { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); background: #ff9f1c; color: #2a1300; padding: 8px 16px; border-radius: 999px; font-weight: 900; font-size: 18px; animation: heartbeat .5s infinite; }
@keyframes heartbeat { 30% { transform: translateX(-50%) scale(1.1); } }
.wheel-btn { font-size: 30px !important; padding: 26px !important; animation: heartbeatB 1s infinite; }
@keyframes heartbeatB { 30% { transform: scale(1.05); } }
.mic-live { text-align: center; font-weight: 900; font-size: 15px; opacity: .85; }
.hold-pad { flex: 1; min-height: 45vh; border-radius: 30px; background: linear-gradient(160deg, var(--a), var(--b)); display: grid; place-items: center; font-size: 30px; font-weight: 900; text-align: center; touch-action: none; }
.hold-pad.on { box-shadow: 0 0 0 6px #fff, 0 0 60px #fff; }
body.chip-on .scr { padding-top: max(56px, calc(env(safe-area-inset-top) + 48px)); }
body.chip-on.is-host.in-game .scr { padding-top: max(100px, calc(env(safe-area-inset-top) + 92px)); }

/* Joker de la question */
.jbtn { width: 100%; display: flex; align-items: center; gap: 12px; background: linear-gradient(160deg, #fff, #e9e3ff); color: #2a1660; border-radius: 18px; padding: 10px 14px; text-align: left; box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.jbtn.malus { background: linear-gradient(160deg, #fff0f3, #ffc9d4); color: #6a0f24; }
.jbtn .e { font-size: 34px; }
.jbtn b { display: block; font-size: 16px; }
.jbtn span.d { font-size: 13px; font-weight: 700; opacity: .85; line-height: 1.25; }
.jbtn .go { margin-left: auto; background: #2a1660; color: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 900; font-size: 13px; white-space: nowrap; }
.jbtn.malus .go { background: #c9184a; }
.jbtn:disabled { opacity: .45; }
.jinfo { width: 100%; background: rgba(255,255,255,.14); border-radius: 16px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; text-align: left; font-weight: 700; font-size: 14px; margin-top: 10px; }
.jinfo .e { font-size: 30px; }
.nextup { width: 100%; background: linear-gradient(135deg, var(--a), var(--b)); border-radius: 16px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; text-align: left; font-weight: 800; font-size: 14px; margin-top: 10px; }
.nextup .e { font-size: 30px; }
.nextup b { display: block; font-size: 16px; }
/* Pari */
.bets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bets button { background: #ffd23f; color: #2a1300; border-radius: 16px; padding: 16px 8px; font-weight: 900; font-size: 20px; box-shadow: 0 5px 0 #b88a00; }
.bets button.zero { background: var(--card); color: #fff; box-shadow: none; }
/* Marathon */
.mar-top { display: flex; justify-content: space-between; font-weight: 900; font-size: 18px; }
.mar-q { font-size: 20px; font-weight: 900; text-align: center; line-height: 1.25; min-height: 52px; }
.mar-e { font-size: 56px; text-align: center; }
.mar-flash { text-align: center; font-size: 28px; height: 34px; }
/* Réactions : une seule rangée de 8 gros boutons */
#reacts .rx-em, #reacts .rx-sp { display: none; }
#reacts .rx-one { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; width: 100%; }
#reacts .rx-one button { height: 50px; border-radius: 14px; font-size: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
#reacts .rx-one button small { font-size: 9px; font-weight: 900; margin-top: 2px; opacity: .9; }
#reacts .rx-one button.sp { background: linear-gradient(135deg, var(--a), var(--b)); }
#reacts .rx-one button.cool { filter: grayscale(1) opacity(.45); }
.scr { padding-bottom: max(80px, calc(env(safe-area-inset-bottom) + 74px)) !important; }
body.reacts-on #soundBtn { bottom: max(76px, calc(env(safe-area-inset-bottom) + 68px)); }
.opt-help { font-size: 11px; font-weight: 700; opacity: .7; margin-top: 2px; line-height: 1.25; }
.opt .ol { display: flex; flex-direction: column; }
.hand-preview:has(.jinfo), .hand-preview:has(.nextup) { display: block; width: 100%; }
.hand-preview .jinfo span, .hand-preview .nextup span { background: none; padding: 0; border-radius: 0; font-size: inherit; }
.hand-preview .jinfo span.e, .hand-preview .nextup span.e { font-size: 30px; }

/* Main de jokers */
.hand-list { display: flex; flex-direction: column; gap: 10px; }
.hand-list .jbtn .go { flex: none; }
.hand-empty { text-align: center; font-weight: 800; opacity: .8; }
.hand-mini { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.hand-mini span { background: rgba(255,255,255,.15); border-radius: 10px; padding: 4px 8px; font-size: 13px; font-weight: 800; }
/* Nouveau joker reçu */
#gift { position: fixed; inset: 0; z-index: 35; display: none; align-items: center; justify-content: center; background: rgba(10,0,30,.75); padding: 24px; }
#gift.on { display: flex; }
#gift .gc { background: linear-gradient(160deg, #fff, #ece6ff); color: #2a1660; border-radius: 26px; padding: 22px; text-align: center; max-width: 340px; animation: giftIn .6s cubic-bezier(.2,1.6,.4,1); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
#gift .gc .w { font-weight: 900; font-size: 15px; opacity: .8; }
#gift .gc .e { font-size: 80px; margin: 6px 0; }
#gift .gc .n { font-size: 26px; font-weight: 900; }
#gift .gc .d { font-size: 15px; font-weight: 700; margin-top: 4px; }
#gift .gc .h { font-size: 13px; font-weight: 800; margin-top: 10px; color: #7b2ff7; }
@keyframes giftIn { from { transform: scale(.2) rotate(-20deg); opacity: 0; } }

/* ───────── Accueil ───────── */
#p-home { gap: 14px; justify-content: center; }
.home-hero { text-align: center; margin-bottom: 6px; }
.who-chip { align-self: center; display: none; align-items: center; gap: 8px; background: var(--card); border-radius: 999px; padding: 4px 14px 4px 4px; font-weight: 800; font-size: 14px; }
.who-chip.on { display: flex; }
.who-chip .av { width: 32px; height: 32px; font-size: 18px; border-width: 2px; }
.home-card { display: flex; align-items: center; gap: 14px; width: 100%; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.15); border-radius: 22px; padding: 16px; text-align: left; backdrop-filter: blur(8px); }
.home-card .e { font-size: 38px; flex: none; }
.home-card b { display: block; font-size: 19px; }
.home-card small { display: block; font-size: 13px; opacity: .8; font-weight: 700; margin-top: 2px; }
.home-card .arr { margin-left: auto; font-size: 34px; opacity: .6; }
.home-card.main { background: linear-gradient(135deg, #ffd23f, #ff9f1c); color: #2a1300; border-color: #fff; box-shadow: 0 6px 0 #b85c00; }
.home-card.small { padding: 12px 16px; } .home-card.small .e { font-size: 28px; } .home-card.small b { font-size: 15px; }
.home-card .code-join { margin-top: 10px; }
.home-card .code-join input { padding: 10px; font-size: 22px; }
/* ───────── Écran de l'hôte en onglets ───────── */
.host-scr { padding-bottom: 110px !important; }
.host-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.host-top .small-btn { font-size: 13px; padding: 8px 12px; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(0,0,0,.25); border-radius: 16px; padding: 4px; gap: 4px; position: sticky; top: 0; z-index: 3; backdrop-filter: blur(8px); }
.tabs button { padding: 10px 4px; border-radius: 12px; font-weight: 900; font-size: 14px; color: rgba(255,255,255,.8); }
.tabs button.sel { background: #fff; color: #2a1660; }
.tab-pane { display: flex; flex-direction: column; gap: 12px; }
.quiz-groups .grp { font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; opacity: .75; margin: 10px 0 6px; }
.quiz-groups .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qc { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 16px; }
.qc .e { font-size: 28px; flex: none; }
.qc .n { font-size: 14px; line-height: 1.15; }
.qc .d { display: none; }
.qc .info { display: none; }
.opts .grp { font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; opacity: .75; margin: 8px 0 0; }
.opt { flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 12px; }
.opt .seg { justify-content: flex-start; }
.players-list { display: flex; flex-direction: column; gap: 8px; }
.players-list .pl { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 8px 12px; font-weight: 800; }
.players-list .pl .av { width: 40px; height: 40px; font-size: 22px; border-width: 2px; }
.players-list .pl .k { margin-left: auto; font-size: 13px; opacity: .7; }
.start-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; display: flex; gap: 10px; align-items: center; padding: 10px 14px max(12px, env(safe-area-inset-bottom)); background: rgba(20,8,45,.9); backdrop-filter: blur(12px); }
.start-bar .sum { flex: 1; font-weight: 800; font-size: 13px; line-height: 1.3; }
.start-bar .sum b { font-size: 15px; display: block; }
.start-bar .big-btn { width: auto; padding: 14px 20px; font-size: 18px; }
.home-card > span { min-width: 0; } .home-card .code-join input { width: 100%; min-width: 0; } .home-card .code-join .big-btn { flex: none; padding: 10px 16px; }

/* ───────── Réglages : cartes, tuiles, interrupteurs ───────── */
.card2 { background: rgba(255,255,255,.1); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.card2.row-c { flex-direction: row; align-items: center; justify-content: space-between; }
.card2 .ct { font-weight: 900; font-size: 15px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tiles.four { grid-template-columns: repeat(4, 1fr); } .tiles.five { grid-template-columns: repeat(5, 1fr); } .tiles.three { grid-template-columns: repeat(3, 1fr); }
.tiles button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 2px; border-radius: 14px; background: rgba(0,0,0,.22); font-weight: 800; font-size: 12px; border: 2px solid transparent; }
.tiles button .te { font-size: 24px; }
.tiles button.sel { background: #fff; color: #2a1660; border-color: #ffd23f; }
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #2a1660; font-size: 26px; font-weight: 900; line-height: 1; }
.stepper b { font-size: 26px; min-width: 36px; text-align: center; }
.sw-list { gap: 0; padding: 4px 12px; }
.sw-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; text-align: left; border-bottom: 1px solid rgba(255,255,255,.1); }
.sw-row:last-child { border-bottom: 0; }
.sw-row .sl { flex: 1; } .sw-row b { display: block; font-size: 15px; } .sw-row small { display: block; font-size: 12px; opacity: .75; font-weight: 700; }
.sw { width: 50px; height: 30px; border-radius: 999px; background: rgba(0,0,0,.35); position: relative; flex: none; transition: background .2s; }
.sw i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; }
.sw.on { background: #2fe08b; } .sw.on i { left: 23px; }
details.more summary { font-weight: 900; font-size: 15px; cursor: pointer; list-style: none; }
details.more summary::after { content: ' ▾'; } details.more[open] summary::after { content: ' ▴'; }
details.more[open] { gap: 12px; }
#volIn { width: 55%; accent-color: #ffd23f; }
.hint-pill { display: inline-block; margin-top: 8px; background: #ffd23f; color: #2a1300; border-radius: 999px; padding: 6px 14px; font-size: 15px; font-weight: 900; }
#p-host.scr { padding-bottom: calc(130px + env(safe-area-inset-bottom)) !important; }
#p-host .tab-pane:last-of-type, #hostOpts { margin-bottom: 10px; }
.pred-row { display: flex; gap: 12px; margin-top: 18px; width: 100%; max-width: 420px; }
.pred-row .pred { flex: 1; padding: 20px 10px; border-radius: 18px; border: 0; font: 800 18px/1.2 inherit; color: #fff; background: #2fb36b; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.pred-row .pred.no { background: #e8455f; }
.pred-row .pred:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
/* À la voix : le premier qui dit la bonne réponse gagne */
.vr { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.vr-mic { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; font-size: 62px; background: rgba(255,255,255,.12); border: 4px solid rgba(255,255,255,.25); transition: all .2s; }
.vr-mic.on { background: #e8455f; border-color: #fff; box-shadow: 0 0 0 10px rgba(232,69,95,.25), 0 0 0 22px rgba(232,69,95,.12); }
.vr-t { font-size: 24px; font-weight: 900; }
.vr-s { font-size: 15px; opacity: .8; }
.vr-heard { min-height: 24px; font-size: 17px; font-style: italic; color: #ffe066; }
.vr-parts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.vr-parts span { background: rgba(255,255,255,.12); border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: 15px; }
.vr-parts span.ok { background: #2fb36b; }
.vr .row2 { width: 100%; margin-top: 6px; opacity: .85; }
.qc .n small.era { display: block; font-size: 11px; font-weight: 800; color: #ffe066; margin-top: 2px; }

.demo-left { color: #ffe066; font-weight: 800; font-size: 12px; }

/* Téléphone partagé */
.mate-form { display: flex; flex-direction: column; gap: 12px; }
.mate-btn { margin: 6px auto; display: block; }
