/* =========================================================
   KIWI · style console douce (verre dépoli, coins ronds, rebonds)
   ========================================================= */
:root {
  --bg: #DDF6E6;
  --ink: #1E3A2F;
  --ink2: #44615A;
  --kiwi: #5CB83F;
  --kiwi-d: #2F7D25;
  --kiwi-l: #E3F8D6;
  --mint: #5EEAD4;
  --glass: rgba(255, 255, 255, .74);
  --line: #fff;
  --shadow: 0 10px 30px rgba(30, 80, 50, .12);
  --shadow-lg: 0 20px 50px rgba(30, 80, 50, .18);
  --r: 28px;
  --r-xl: 40px;
  --spring: cubic-bezier(.2, .9, .3, 1.25);
  --ease: cubic-bezier(.25, .8, .25, 1);
  --font-d: 'Fredoka', system-ui, sans-serif;
  --font: 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-weight: 700; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow: hidden;
}
h1, h2, h3 { font-family: var(--font-d); font-weight: 700; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--kiwi-d); }
button { font: inherit; color: inherit; }
input, textarea { font: inherit; color: inherit; }
kbd { font-family: var(--font-d); font-weight: 600; background: #fff; border: 2px solid var(--ink); border-bottom-width: 3px; border-radius: 8px; padding: 0 6px; font-size: .85em; }
::selection { background: var(--kiwi); color: #fff; }
.muted { color: var(--ink2); }
.small { font-size: .88rem; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; }
.row.wrap, .wrap { flex-wrap: wrap; }
.row.center { justify-content: center; }
.row.between { justify-content: space-between; }
.gap { gap: 14px; } .gap-s { gap: 8px; }
.glass { background: var(--glass); border: 3px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.eyebrow { font: 800 .78rem var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.eyebrow.light { color: rgba(255, 255, 255, .85); }

/* ---------- Fond animé ---------- */
#bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background-image: radial-gradient(rgba(47, 125, 37, .14) 1.7px, transparent 1.8px); background-size: 24px 24px;
  animation: drift 60s linear infinite; }
@keyframes drift { to { background-position: 240px 240px; } }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 22s ease-in-out infinite alternate; }
.b1 { width: 520px; height: 520px; background: #BDF0A3; top: -160px; left: -120px; }
.b2 { width: 460px; height: 460px; background: #A7F0E4; bottom: -180px; right: -80px; animation-duration: 27s; }
.b3 { width: 340px; height: 340px; background: #FFE6A8; top: 40%; left: 55%; animation-duration: 33s; opacity: .4; }
@keyframes float { to { transform: translate(80px, 60px) scale(1.15); } }

.boot { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.boot-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--kiwi); animation: hop .9s var(--ease) infinite; }
.boot-dot:nth-child(2) { animation-delay: .12s; } .boot-dot:nth-child(3) { animation-delay: .24s; }

/* ---------- Coque (menu + scène) ---------- */
.shell { height: 100dvh; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; padding: 22px; }
.side { border-radius: var(--r-xl); padding: 22px 12px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.logo { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; }
.logo-art { width: 62px; height: 62px; display: block; filter: drop-shadow(0 5px 8px rgba(60, 40, 10, .25)); }
.logo-art svg { width: 100%; height: 100%; }
.logo-txt { font: 700 2.2rem var(--font-d); color: var(--kiwi-d); letter-spacing: -.03em; line-height: 1; }
.side-items { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.side-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 13px 0; border-radius: 24px; text-decoration: none; color: var(--ink2);
  font: 600 1.15rem var(--font-d); transition: background .2s, color .2s, transform .25s var(--spring), box-shadow .2s; }
.side-item .ico { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; }
.side-item .ico svg { width: 36px; height: 36px; }
.side-item:hover { background: rgba(255, 255, 255, .7); color: var(--ink); transform: translateY(-2px); }
.side-item.active { background: #fff; color: var(--kiwi-d); box-shadow: 0 0 0 4px var(--kiwi); }
.side-item.active .ico { animation: wiggle .6s var(--spring); }
.av-ico .avatar { width: 34px !important; height: 34px !important; }

.stage { min-width: 0; display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.topbar { display: flex; gap: 14px; align-items: center; }
.tb-title, .tb-hints, .tb-status { height: 64px; border-radius: 32px; display: flex; align-items: center; padding: 0 24px; gap: 12px; font: 600 1.35rem var(--font-d); }
.tb-title { padding-left: 12px; }
.tb-ico { width: 44px; height: 44px; border-radius: 16px; background: var(--kiwi); color: #fff; display: flex; align-items: center; justify-content: center; }
.tb-ico svg { width: 26px; height: 26px; }
.tb-hints { flex: 1; justify-content: center; gap: 22px; font-size: 1.05rem; }
.hint { display: inline-flex; align-items: center; gap: 8px; }
.tb-status { font-size: 1.3rem; }
.net-dot { width: 12px; height: 12px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); animation: pulse-dot 2s infinite; }
.net-dot.off { background: #F0466A; box-shadow: 0 0 0 4px rgba(240, 70, 106, .2); }
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, .08); } }

.view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; border-radius: var(--r-xl); padding: 6px 6px 28px; scroll-behavior: smooth; outline: none; }
.view::-webkit-scrollbar { width: 10px; } .view::-webkit-scrollbar-thumb { background: rgba(47, 125, 37, .25); border-radius: 10px; }
.page { animation: pageIn .5s var(--spring) both; }
.view.leaving .page { animation: pageOut .16s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(26px) scale(.985); } }
@keyframes pageOut { to { opacity: 0; transform: translateY(-14px) scale(.99); } }
.stagger > * { animation: popIn .55s var(--spring) both; animation-delay: calc(var(--i, 0) * 60ms + 80ms); }
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(.94); } }
.pop { animation: pop .45s var(--spring) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }

/* ---------- Curseur de navigation (clavier / manette) ---------- */
#glider { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; opacity: 0; border-radius: 30px;
  box-shadow: 0 0 0 4px #fff, 0 0 0 9px var(--kiwi), 0 0 30px 8px rgba(92, 184, 63, .45);
  transition: transform .22s var(--spring), width .22s var(--spring), height .22s var(--spring), opacity .15s, border-radius .2s; }
#glider.on { opacity: 1; animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px #fff, 0 0 0 9px #8BD96B, 0 0 40px 12px rgba(92, 184, 63, .3); } }
body[data-input="key"] :focus, body[data-input="pad"] :focus { outline: none; }
body[data-input="pointer"] :focus-visible, body[data-input="touch"] :focus-visible { outline: 4px solid var(--kiwi); outline-offset: 3px; }
input:focus-visible { outline: none !important; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 26px; border: 0; cursor: pointer;
  font: 600 1.2rem var(--font-d); background: #fff; color: var(--ink); box-shadow: 0 5px 0 #BFE3CC;
  transition: transform .18s var(--spring), box-shadow .15s, background .2s; }
.btn .ico { width: 24px; height: 24px; display: inline-flex; } .btn .ico svg { width: 100%; height: 100%; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #BFE3CC; }
.btn.primary { background: var(--kiwi); color: #fff; box-shadow: 0 6px 0 var(--kiwi-d); }
.btn.primary:active { box-shadow: 0 2px 0 var(--kiwi-d); }
.btn.ghost { background: rgba(255, 255, 255, .8); border: 3px solid #fff; }
.btn.danger { background: #F0466A; color: #fff; box-shadow: 0 6px 0 #A8213F; }
.btn.big { min-height: 64px; font-size: 1.4rem; padding: 0 34px; border-radius: 32px; }
.btn.huge { min-height: 76px; font-size: 1.7rem; border-radius: 38px; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
  box-shadow: 0 4px 0 #BFE3CC; transition: transform .2s var(--spring); flex-shrink: 0; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:hover { transform: translateY(-2px) rotate(-6deg); }
.icon-btn.danger { color: #C2264A; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 19px; background: #fff; font: 600 1.02rem var(--font-d); white-space: nowrap; }
.pill.dark { background: var(--ink); color: #fff; }
.pill.ok { background: var(--kiwi); color: #fff; }
.pill.light { background: rgba(255, 255, 255, .25); color: #fff; }
.pill .avatar { flex-shrink: 0; }
.pill .ico svg { width: 20px; height: 20px; display: block; }

/* ---------- Avatars ---------- */
.avatar { display: inline-block; border-radius: 50%; flex-shrink: 0; filter: drop-shadow(0 4px 6px rgba(30, 60, 40, .18)); }
.avatar svg { width: 100%; height: 100%; display: block; border-radius: 50%; box-shadow: inset 0 0 0 3px #fff; }
.avatar svg circle:first-child { stroke: #fff; stroke-width: 3; }
.bob { display: inline-block; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-7px) rotate(-3deg); } }
.spin-slow { animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wiggle { 30% { transform: rotate(-12deg) scale(1.1); } 60% { transform: rotate(8deg); } }
@keyframes hop { 50% { transform: translateY(-10px); } }

/* ---------- Accueil ---------- */
.home { display: flex; flex-direction: column; gap: 26px; }
.hero { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 22px; align-items: stretch; }
.hello { display: flex; align-items: center; gap: 18px; padding: 10px; }
.hello h1 { font-size: 2.6rem; line-height: 1.05; }
.hello p { font-size: 1.2rem; margin-top: 4px; }
.hero-cards { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.hero-card { position: relative; border: 3px solid #fff; border-radius: var(--r-xl); padding: 22px 26px; display: flex; align-items: center; gap: 18px; cursor: pointer; text-align: left;
  background: var(--glass); box-shadow: var(--shadow); min-height: 150px; }
.hero-card b { display: block; font: 700 1.9rem var(--font-d); line-height: 1.05; }
.hero-card small { display: block; font-size: 1rem; color: var(--ink2); margin-top: 6px; }
.hero-card.create { background: var(--kiwi); color: #fff; box-shadow: 0 8px 0 var(--kiwi-d), var(--shadow); }
.hero-card.create small { color: #EAFBE0; }
.hero-art { width: 104px; height: 104px; flex-shrink: 0; filter: drop-shadow(0 8px 10px rgba(30, 60, 10, .3)); }
.hero-art svg { width: 100%; height: 100%; }
.hero-card.joinc { flex-direction: column; align-items: stretch; justify-content: center; cursor: default; gap: 12px; }
.hero-card.joinc label { cursor: pointer; }
.code-input { width: 100%; min-width: 0; height: 58px; border: 0; border-radius: 22px; background: var(--ink); color: #A8E063; text-align: center; text-transform: uppercase;
  font: 700 2rem var(--font-d); letter-spacing: .45em; padding-left: .45em; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .25); transition: box-shadow .2s; }
.code-input::placeholder { color: rgba(168, 224, 99, .3); }
.code-input:focus { outline: none; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .25), 0 0 0 5px var(--kiwi); }
.code-input.xl { height: 96px; font-size: 3.4rem; border-radius: 30px; }
.section-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 2rem; }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.tile { position: relative; aspect-ratio: .92; border: 0; border-radius: 32px; padding: 0; cursor: pointer; overflow: hidden; display: flex; flex-direction: column;
  background-color: var(--c); background-image: radial-gradient(rgba(255, 255, 255, .22) 2px, transparent 2.2px); background-size: 18px 18px;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 70%, #000), var(--shadow);
  transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(var(--ty, 0)) scale(var(--sc, 1));
  transition: transform .35s var(--spring), box-shadow .2s; }
.tile::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, .45), transparent 55%); }
.tile:hover, .tile:focus { --ty: -6px; --sc: 1.03; }
.tile:hover::after, .tile.tilting::after, .tile:focus::after { opacity: 1; }
.tile.tilting { transition: transform .08s linear; }
.tile-art { flex: 1; display: flex; align-items: center; justify-content: center; padding: 18px; }
.tile-art svg { width: 62%; max-width: 130px; height: auto; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .18)); transition: transform .4s var(--spring); }
.tile:hover .tile-art svg, .tile:focus .tile-art svg { transform: scale(1.1) rotate(-6deg); }
.tile-label { margin: 0 12px 12px; background: #fff; border-radius: 20px; padding: 10px 12px; text-align: center; }
.tile-label b { display: block; font: 600 1.35rem var(--font-d); }
.tile-label small { display: block; font-size: .82rem; color: var(--ink2); margin-top: 2px; }
.tile.soon { filter: saturate(.35) brightness(1.08); }
.tile.soon .tile-art { opacity: .7; }
.tile-lock { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .9); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.tile-lock svg { width: 22px; height: 22px; }

.salon-banner { border-radius: var(--r); padding: 18px 24px; display: flex; align-items: center; gap: 18px; }
.salon-banner b { font: 600 1.3rem var(--font-d); }
.salon-ico svg { width: 64px; height: 40px; display: block; }

/* ---------- Pages simples ---------- */
.narrow { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; padding-top: 6px; }
.page-title { font-size: 2.6rem; }
.small-title { font-size: 1.5rem; margin-top: 8px; }
.join-big { border-radius: var(--r-xl); padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.code-chip { font-family: var(--font-d); letter-spacing: .2em; }
.profile-card { border-radius: var(--r-xl); padding: 28px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.profile-card .preview { align-self: center; margin-bottom: 6px; }
.profile-card input#pseudo, .clue-form input, .guess-form input { height: 60px; border: 3px solid #CDEFDA; border-radius: 20px; background: #fff; padding: 0 18px; font: 600 1.35rem var(--font-d); width: 100%; min-width: 0; transition: border-color .2s, box-shadow .2s; }
.profile-card input#pseudo:focus, .clue-form input:focus, .guess-form input:focus { outline: none; border-color: var(--kiwi); box-shadow: 0 0 0 5px rgba(92, 184, 63, .25); }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 4px solid #fff; cursor: pointer; box-shadow: 0 3px 8px rgba(30, 60, 40, .2); transition: transform .2s var(--spring), box-shadow .2s; }
.swatch.big { width: 50px; height: 50px; }
.swatch:hover { transform: scale(1.12); }
.swatch.on { box-shadow: 0 0 0 4px var(--ink); transform: scale(1.12); }
.faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 10px; }
.face-btn { border: 3px solid transparent; background: rgba(255, 255, 255, .7); border-radius: 22px; padding: 6px; cursor: pointer; display: flex; justify-content: center; transition: transform .2s var(--spring), border-color .2s; }
.face-btn:hover { transform: translateY(-3px); }
.face-btn.on { border-color: var(--kiwi); background: #fff; }
.settings-card { border-radius: var(--r); padding: 8px; display: flex; flex-direction: column; }
.setting-row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 0; border-radius: 20px; background: transparent; text-align: left; cursor: pointer; width: 100%; }
.setting-row:hover { background: rgba(255, 255, 255, .7); }
.setting-row b { display: block; font: 600 1.2rem var(--font-d); }
.setting-row small { display: block; color: var(--ink2); }
.setting-row input[type=range] { accent-color: var(--kiwi); width: 180px; }
.switch { width: 62px; height: 36px; border-radius: 18px; background: #C9D9D0; position: relative; transition: background .25s; flex-shrink: 0; }
.switch i { position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .3s var(--spring); }
.setting-row.on .switch { background: var(--kiwi); }
.setting-row.on .switch i { transform: translateX(26px); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat { border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 2px; border-top: 6px solid var(--c, var(--kiwi)); }
.stat b { font: 700 2rem var(--font-d); }
.help-card { border-radius: var(--r); padding: 18px 22px; display: flex; flex-direction: column; gap: 8px; line-height: 1.8; }

/* ---------- Salon ---------- */
.room { display: flex; flex-direction: column; gap: 18px; min-height: 100%; }
.room-bar { border-radius: 34px; padding: 8px 10px 8px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.code-block { display: flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; border-radius: 26px; padding: 6px 6px 6px 18px; }
.code-label { font: 800 .75rem var(--font); letter-spacing: .14em; opacity: .75; }
.code-letters { display: flex; gap: 4px; }
.code-l { font: 700 1.7rem var(--font-d); color: #A8E063; min-width: 1ch; text-align: center; display: inline-block; animation: flipIn .6s var(--spring) both; animation-delay: calc(var(--i) * 80ms + 150ms); }
@keyframes flipIn { from { transform: rotateX(90deg); opacity: 0; } }
.code-block .icon-btn { width: 40px; height: 40px; background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
.code-block.big { padding: 14px 14px 14px 24px; border-radius: 30px; gap: 12px; align-self: flex-start; }
.code-block.big .code-l { font-size: 3.4rem; width: 58px; height: 74px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .08); border-radius: 16px; }
.bar-players { display: flex; align-items: center; }
.bar-av { position: relative; margin-left: -8px; transition: transform .3s var(--spring); animation: pop .45s var(--spring) both; }
.bar-av:first-child { margin-left: 0; }
.bar-av.away { opacity: .4; filter: grayscale(1); }
.bar-av:hover { transform: translateY(-4px); z-index: 2; }
.crown { position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-8deg); width: 24px; height: 24px; animation: crown 2.4s ease-in-out infinite; }
.crown svg { width: 100%; height: 100%; }
.crown.big { width: 40px; height: 40px; top: -26px; }
@keyframes crown { 50% { transform: translateX(-50%) rotate(8deg) translateY(-2px); } }
.emotes { display: flex; gap: 6px; flex-wrap: wrap; }
.emote { height: 40px; padding: 0 14px; border-radius: 20px; border: 0; background: #fff; cursor: pointer; font: 600 1rem var(--font-d); box-shadow: 0 3px 0 #BFE3CC; transition: transform .2s var(--spring); }
.emote:hover { transform: translateY(-3px) rotate(-3deg); }
.emote:active { transform: scale(.9); }
.float-bubble { position: fixed; z-index: 60; transform: translate(-50%, -100%); background: #fff; color: var(--ink); font: 700 1.05rem var(--font-d); padding: 8px 14px; border-radius: 18px;
  box-shadow: 0 8px 20px rgba(30, 60, 40, .2); pointer-events: none; animation: bubble 2.2s var(--spring) both; white-space: nowrap; }
.float-bubble::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
@keyframes bubble { 0% { opacity: 0; transform: translate(-50%, -60%) scale(.5); } 15% { opacity: 1; transform: translate(-50%, -100%) scale(1); } 80% { opacity: 1; transform: translate(-50%, -110%); } 100% { opacity: 0; transform: translate(-50%, -150%); } }

.room-body { flex: 1; display: flex; flex-direction: column; }
.lobby { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.lobby-left, .lobby-right { display: flex; flex-direction: column; gap: 20px; }
.invite, .players-card, .host-panel, .waiting { border-radius: var(--r-xl); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.invite h2, .players-card h2 { font-size: 1.7rem; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.pchip { display: flex; flex-direction: column; align-items: center; gap: 6px; background: #fff; border-radius: 24px; padding: 14px 8px 10px; animation: pop .5s var(--spring) both; }
.pchip-av { position: relative; display: inline-flex; }
.pchip-name { font: 600 1.1rem var(--font-d); text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchip-name em { font-style: normal; color: var(--ink2); font-size: .85em; }
.pchip.empty { background: transparent; border: 3px dashed #9ED9B5; animation: none; }
.empty-av { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 600 2rem var(--font-d); color: #5EB880; animation: breathe 2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.12); } }
.emotes.wide .emote { flex: 1; min-width: 70px; }
.game-banner { border-radius: var(--r-xl); padding: 26px; display: flex; gap: 22px; align-items: center; color: #fff; border: 3px solid #fff;
  background-color: var(--c); background-image: radial-gradient(rgba(255, 255, 255, .2) 2px, transparent 2.2px); background-size: 18px 18px; box-shadow: var(--shadow-lg); }
.game-banner h2 { font-size: 2.8rem; line-height: 1; margin: 4px 0 8px; text-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.game-banner p { font-size: 1.08rem; margin-bottom: 12px; color: rgba(255, 255, 255, .95); }
.banner-art { width: 130px; height: 130px; flex-shrink: 0; animation: bob 3s ease-in-out infinite; }
.banner-art svg { width: 100%; height: 100%; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .2)); }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 20px; border: 3px solid transparent; background: #fff; cursor: pointer; font: 600 1.02rem var(--font-d); text-align: left; transition: transform .2s var(--spring), border-color .2s; }
.pick:hover { transform: translateY(-3px); }
.pick.on { border-color: var(--c); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--c); }
.pick-art { width: 40px; height: 40px; border-radius: 13px; background: var(--c); display: flex; padding: 5px; flex-shrink: 0; }
.pick-art svg { width: 100%; height: 100%; }
.setting-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; background: #E8F4EC; border-radius: 20px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; border-radius: 16px; padding: 8px 16px; font: 600 1.05rem var(--font-d); cursor: pointer; transition: background .2s, color .2s; }
.seg button.on { background: var(--ink); color: #fff; }
.start-btn { margin-top: 6px; }
.start-btn:not(:disabled) { animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 85%, 100% { transform: none; } 90% { transform: scale(1.03) rotate(-1deg); } 95% { transform: scale(1.03) rotate(1deg); } }
.waiting { align-items: center; text-align: center; }
.waiting b { font: 600 1.5rem var(--font-d); }
.typing { display: inline-flex; gap: 5px; align-items: center; margin-left: 6px; vertical-align: middle; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .5; animation: hop 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.typing.big i { width: 14px; height: 14px; color: var(--kiwi); opacity: 1; }

.center-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 30px 10px; min-height: 360px; }
.stage-title { font-size: 2.4rem; }
.stage-title.left { text-align: left; }
.loader { width: 110px; height: 110px; animation: spin 1.6s var(--ease) infinite; }
.loader svg { width: 100%; height: 100%; }

/* ---------- Minuteur ---------- */
.timer { --p: 1; width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--c, var(--kiwi)) calc(var(--p) * 360deg), rgba(255, 255, 255, .7) 0); transition: transform .2s; }
.timer .t { width: 50px; height: 50px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font: 700 1.4rem var(--font-d); }
.timer.urgent { animation: urgent .5s ease-in-out infinite alternate; --c: #F0466A; }
@keyframes urgent { to { transform: scale(1.1); } }
.timer.big { width: 170px; height: 170px; }
.timer.big .t { width: 140px; height: 140px; font-size: 4.4rem; }

/* ---------- Jeux : commun ---------- */
.game-wrap { flex: 1; display: flex; flex-direction: column; }
.quiz-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.word-pill { border: 0; cursor: pointer; }
.word-pill .ico { display: inline-flex; }

/* Quiz */
.quiz { display: flex; flex-direction: column; flex: 1; }
.question { border-radius: var(--r-xl); padding: 34px 30px; text-align: center; margin-bottom: 18px; animation: qIn .55s var(--spring) both; }
.question h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.15; }
@keyframes qIn { from { opacity: 0; transform: translateY(-20px) scale(.96) rotate(-1deg); } }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.answer { position: relative; min-height: 110px; border: 0; border-radius: 30px; background: var(--c); color: #fff; display: flex; align-items: center; gap: 18px; padding: 14px 24px; cursor: pointer; text-align: left;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 65%, #000); font: 700 1.6rem var(--font-d);
  transition: transform .2s var(--spring), opacity .3s, box-shadow .2s, filter .3s; animation: popIn .5s var(--spring) both; animation-delay: calc(var(--i) * 70ms + 150ms); }
.answer:hover:not(:disabled) { transform: translateY(-4px) scale(1.01); }
.answer:active:not(:disabled) { transform: translateY(6px); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 65%, #000); }
.answer:disabled { cursor: default; }
.answer-shape { width: 54px; height: 54px; flex-shrink: 0; border-radius: 16px; background: rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; }
.answer-shape svg { width: 34px; height: 34px; }
.answer-text { flex: 1; min-width: 0; line-height: 1.1; }
.answer.dim { opacity: .35; filter: saturate(.6); }
.answer.picked { box-shadow: 0 0 0 6px #fff, 0 0 0 11px var(--ink); transform: scale(1.02); }
.answer.right { box-shadow: 0 0 0 6px #fff, 0 0 0 11px var(--kiwi), 0 0 40px rgba(92, 184, 63, .6); transform: scale(1.03); animation: rightPulse .8s var(--spring); }
.answer.wrongpick { opacity: .7; filter: grayscale(.4); }
@keyframes rightPulse { 40% { transform: scale(1.08); } }
.answer-check { width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--kiwi-d); display: flex; align-items: center; justify-content: center; animation: pop .4s var(--spring); }
.answer-check svg { width: 30px; height: 30px; }
.quiz-foot { margin-top: 20px; }
.who-answered { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 1.1rem; }
.mini { position: relative; display: inline-flex; transition: transform .3s var(--spring), opacity .3s; opacity: .45; }
.mini.done { opacity: 1; transform: translateY(-4px); }
.mini-check { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--kiwi); color: #fff; display: flex; align-items: center; justify-content: center; animation: pop .35s var(--spring); }
.mini-check svg { width: 13px; height: 13px; }
.gains { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.gain { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fff; border-radius: 22px; padding: 12px 16px; min-width: 96px; animation: popIn .5s var(--spring) both; }
.gain b { font: 700 1.4rem var(--font-d); color: var(--ink2); }
.gain.up b { color: var(--kiwi-d); animation: scoreUp .7s var(--spring); }
.gain span { font-size: .9rem; color: var(--ink2); }
@keyframes scoreUp { from { transform: translateY(14px) scale(.5); opacity: 0; } }
.big-count { margin-bottom: 6px; }

/* Undercover */
.uc { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.flip { width: min(420px, 90vw); height: 300px; border: 0; background: transparent; perspective: 1200px; cursor: pointer; padding: 0; border-radius: 36px; }
.flip-in { position: relative; display: block; width: 100%; height: 100%; transition: transform .7s var(--spring); transform-style: preserve-3d; }
.flip.on .flip-in { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; border-radius: 36px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 4px solid #fff; box-shadow: var(--shadow-lg); }
.flip-face.front { background: #33466B; color: #fff; background-image: radial-gradient(rgba(255, 255, 255, .1) 2px, transparent 2.2px); background-size: 18px 18px; }
.flip-face.front b { font: 700 1.8rem var(--font-d); }
.flip-face.back { background: #fff; transform: rotateY(180deg); }
.flip-face small { font-size: .95rem; opacity: .8; }
.uc-mask { width: 110px; height: 110px; } .uc-mask svg { width: 100%; height: 100%; }
.uc-word { font: 700 3.2rem var(--font-d); color: var(--ink); line-height: 1; }
.clue-form { border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; border-color: var(--kiwi); }
.clue-form label { font: 600 1.3rem var(--font-d); }
.turn-banner { border-radius: var(--r); padding: 14px 18px; display: flex; align-items: center; gap: 14px; font: 600 1.3rem var(--font-d); }
.clue-board { display: flex; flex-direction: column; gap: 8px; }
.clue-row { display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .8); border-radius: 22px; padding: 8px 14px 8px 8px; transition: transform .3s var(--spring), background .3s; }
.clue-row.current { background: #fff; box-shadow: 0 0 0 4px var(--kiwi); transform: scale(1.01); }
.clue-row.dead { opacity: .45; filter: grayscale(1); }
.clue-name { font: 600 1.15rem var(--font-d); width: 130px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clue-name em { font-style: normal; color: var(--ink2); }
.clue-words { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.clue-word { background: var(--kiwi-l); color: var(--kiwi-d); border-radius: 14px; padding: 6px 14px; font: 600 1.1rem var(--font-d); }
.vote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.vote-card { position: relative; border: 0; background: #fff; border-radius: 28px; padding: 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer;
  box-shadow: 0 6px 0 #BFE3CC; transition: transform .25s var(--spring), box-shadow .2s; animation: popIn .5s var(--spring) both; animation-delay: calc(var(--i) * 60ms); }
.vote-card b { font: 600 1.3rem var(--font-d); }
.vote-card small { color: var(--ink2); text-align: center; }
.vote-card:hover:not(:disabled) { transform: translateY(-4px) rotate(-1deg); }
.vote-card.picked { box-shadow: 0 0 0 5px #fff, 0 0 0 10px #F0466A; transform: scale(1.03); }
.vote-card:disabled { cursor: default; opacity: .75; }
.voted-badge { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--kiwi); color: #fff; display: flex; align-items: center; justify-content: center; animation: pop .35s var(--spring); }
.voted-badge svg { width: 18px; height: 18px; }
.uc-out .out-avatar { animation: dropIn .8s var(--spring) both; }
@keyframes dropIn { from { transform: translateY(-80px) scale(.4) rotate(-30deg); opacity: 0; } }
.role-card { font: 700 3rem var(--font-d); padding: 16px 36px; border-radius: 28px; color: #fff; animation: reveal 1s var(--spring) .9s both; }
.role-card.und { background: #F0466A; box-shadow: 0 8px 0 #A8213F; }
.role-card.civ { background: #4C8DFF; box-shadow: 0 8px 0 #1E56C2; }
@keyframes reveal { from { transform: rotateX(90deg) scale(.6); opacity: 0; } }

/* Gribouille */
.draw { display: flex; flex-direction: column; flex: 1; }
.draw-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.board-col { display: flex; flex-direction: column; gap: 12px; }
.hint-row { min-height: 56px; display: flex; align-items: center; justify-content: center; font: 600 1.5rem var(--font-d); }
.hint-label b { color: var(--kiwi-d); font-size: 1.8rem; }
.hint-letters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hint-letters span { width: 34px; height: 46px; display: inline-flex; align-items: flex-end; justify-content: center; font: 700 2rem var(--font-d); }
.hint-letters .blank { border-bottom: 5px solid var(--ink); }
.hint-letters .letter { color: var(--kiwi-d); border-bottom: 5px solid var(--kiwi); animation: pop .4s var(--spring); }
.hint-letters .space { width: 18px; }
.canvas-slot { position: relative; border-radius: 30px; overflow: hidden; background: #fff; box-shadow: 0 0 0 4px #fff, 0 0 0 7px #4C8DFF, var(--shadow); aspect-ratio: 4 / 3; }
.canvas-slot.can-draw { cursor: crosshair; box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--kiwi), 0 0 30px rgba(92, 184, 63, .35); }
.draw-canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.tools { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; background: rgba(255, 255, 255, .8); border-radius: 24px; padding: 10px 14px; }
.tool-btn { width: 48px; height: 48px; border-radius: 16px; border: 3px solid transparent; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform .2s var(--spring); }
.tool-btn svg { width: 24px; height: 24px; }
.tool-btn:hover { transform: translateY(-2px); }
.tool-btn.on { border-color: var(--ink); }
.tool-btn .dot { border-radius: 50%; background: var(--ink); display: block; }
.end-banner { align-self: center; background: var(--ink); color: #fff; border-radius: 22px; padding: 12px 22px; font: 600 1.2rem var(--font-d); }
.side-col { border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100dvh - 260px); min-height: 420px; }
.scores { display: flex; flex-direction: column; gap: 6px; }
.score-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 18px; background: rgba(255, 255, 255, .7); font: 600 1.02rem var(--font-d); transition: background .3s; }
.score-row.found { background: var(--kiwi-l); }
.score-row.drawer { box-shadow: inset 0 0 0 3px #4C8DFF; }
.ok-ico { width: 22px; height: 22px; border-radius: 50%; background: var(--kiwi); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.ok-ico svg { width: 14px; height: 14px; }
.chat { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 120px; padding-right: 4px; }
.msg { background: #fff; border-radius: 14px; padding: 7px 12px; font-size: .98rem; animation: popIn .3s var(--spring) both; word-break: break-word; }
.msg.ok { background: var(--kiwi); color: #fff; }
.msg.close { background: #FFE6A8; }
.guess-form { display: flex; gap: 8px; }
.guess-form input { height: 54px; font-size: 1.15rem; }
.guess-form .btn { min-height: 54px; padding: 0 16px; }
.found-msg { background: var(--kiwi); color: #fff; border-radius: 18px; padding: 14px; text-align: center; font: 600 1.2rem var(--font-d); display: flex; align-items: center; justify-content: center; gap: 6px; }
.found-msg .ico svg { width: 22px; height: 22px; display: block; }
.word-choice { min-height: 80px; font-size: 1.6rem; padding: 0 34px; border-radius: 30px; }

/* 4 à la suite */
.c4 { display: flex; flex-direction: column; flex: 1; }
.c4-layout { display: grid; grid-template-columns: 200px minmax(0, 560px) 200px; gap: 20px; justify-content: center; align-items: center; }
.duelist { border-radius: var(--r); padding: 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; transition: transform .3s var(--spring), box-shadow .3s; }
.duelist b { font: 600 1.25rem var(--font-d); }
.duelist.active { transform: scale(1.05); box-shadow: 0 0 0 4px #fff, 0 0 0 9px var(--tok), var(--shadow-lg); }
.tok-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--tok); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2); }
.wins { display: flex; gap: 6px; }
.wins i { width: 16px; height: 16px; border-radius: 50%; background: #D5E6DC; }
.wins i.on { background: var(--tok); animation: pop .4s var(--spring); }
.c4-board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; background: #3D6BE0; padding: 12px; border-radius: 30px; box-shadow: 0 10px 0 #23459E, var(--shadow-lg); }
.c4-col { position: relative; border: 0; background: transparent; padding: 0; display: flex; flex-direction: column; gap: 6px; cursor: pointer; border-radius: 18px; transition: background .2s; }
.c4-col:disabled { cursor: default; }
.c4-board.mine .c4-col:not(:disabled):hover, .c4-board.mine .c4-col:not(:disabled):focus { background: rgba(255, 255, 255, .18); }
.ghost-tok { position: absolute; top: -52px; left: 50%; width: 70%; aspect-ratio: 1; transform: translateX(-50%) scale(.5); border-radius: 50%; background: var(--tok); opacity: 0; transition: opacity .2s, transform .25s var(--spring); pointer-events: none; }
.c4-board.mine .c4-col:not(:disabled):hover .ghost-tok, .c4-board.mine .c4-col:not(:disabled):focus .ghost-tok { opacity: .9; transform: translateX(-50%) scale(1); animation: hop 1s ease-in-out infinite; }
.cell { aspect-ratio: 1; border-radius: 50%; background: #DDE8FF; box-shadow: inset 0 5px 0 rgba(0, 0, 0, .15); position: relative; overflow: visible; }
.tok { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .2), inset 0 4px 0 rgba(255, 255, 255, .35); animation: fall .55s cubic-bezier(.4, 0, .6, 1.25) both; }
@keyframes fall { from { transform: translateY(calc(var(--fall) * 1.1)); } }
.cell.win .tok { animation: fall .55s cubic-bezier(.4, 0, .6, 1.25) both, winTok .7s ease-in-out .5s infinite alternate; }
@keyframes winTok { to { box-shadow: 0 0 0 5px #fff, 0 0 20px 6px rgba(255, 255, 255, .8); transform: scale(1.06); } }

/* Résultats */
.results { display: flex; flex-direction: column; gap: 22px; align-items: center; padding: 10px 0 30px; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 14px; width: 100%; max-width: 680px; min-height: 340px; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; animation: rise .9s var(--spring) both; animation-delay: calc(var(--i) * 250ms + 200ms); }
.step b { font: 600 1.3rem var(--font-d); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-av { position: relative; display: inline-flex; }
.step.winner .step-av { animation: bob 2s ease-in-out infinite; }
.step-score { font-size: 1rem; color: var(--ink2); }
.step-block { width: 100%; border-radius: 24px 24px 12px 12px; display: flex; align-items: flex-start; justify-content: center; padding-top: 12px; font: 700 2.6rem var(--font-d); color: #fff; box-shadow: var(--shadow); }
.step-1 .step-block { height: 170px; background: #FFB020; }
.step-2 .step-block { height: 120px; background: #9FB6C9; }
.step-3 .step-block { height: 90px; background: #D08A4E; }
.step.empty { visibility: hidden; }
@keyframes rise { from { transform: translateY(80px); opacity: 0; } }
.rest { border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 520px; }

/* Modales & toasts */
.modal-root { position: fixed; inset: 0; z-index: 72; background: rgba(30, 58, 47, .35); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .2s both; }
.modal-root.out { animation: fadeOut .2s both; }
.modal { border-radius: var(--r-xl); padding: 30px; max-width: 440px; width: 100%; display: flex; flex-direction: column; gap: 14px; text-align: center; background: #fff; }
.modal h2 { font-size: 2rem; }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
#toasts { position: fixed; z-index: 75; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; font: 600 1.05rem var(--font-d); padding: 12px 22px; border-radius: 22px; box-shadow: var(--shadow-lg); animation: toastIn .4s var(--spring) both; }
.toast-warn { background: #F0466A; }
.toast.out { animation: toastOut .3s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.8); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.9); } }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }
.shake { animation: shake .45s ease both !important; }
@keyframes shake { 20% { transform: translateX(-10px) rotate(-1deg); } 40% { transform: translateX(9px) rotate(1deg); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }

/* ---------- Mouvements réduits ---------- */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
@media (prefers-reduced-motion: reduce) { #bg, .blob, .spin-slow { animation: none !important; } }

/* ---------- Tablettes ---------- */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .lobby { grid-template-columns: 1fr; }
  .draw-layout { grid-template-columns: 1fr; }
  .side-col { max-height: none; min-height: 0; }
  .chat { max-height: 220px; }
  .c4-layout { grid-template-columns: 1fr 1fr; }
  .c4-board { grid-column: 1 / -1; order: -1; max-width: 560px; width: 100%; justify-self: center; }
}

/* ---------- Téléphones ---------- */
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; padding: 10px 10px 0; gap: 10px; }
  .side { position: fixed; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 30; flex-direction: row; padding: 6px; border-radius: 28px; gap: 0; }
  .logo { display: none; }
  .side-items { flex-direction: row; justify-content: space-around; }
  .side-item { flex: 1; padding: 6px 0; font-size: .85rem; border-radius: 20px; }
  .side-item .ico, .side-item .ico svg { width: 28px; height: 28px; }
  .av-ico .avatar { width: 28px !important; height: 28px !important; }
  .side-item.active { box-shadow: 0 0 0 3px var(--kiwi); }
  .topbar { gap: 8px; }
  .tb-hints { display: none; }
  .tb-title, .tb-status { height: 52px; font-size: 1.1rem; padding: 0 16px; }
  .tb-title { flex: 1; padding-left: 8px; min-width: 0; }
  .tb-ico { width: 38px; height: 38px; border-radius: 14px; }
  .view { padding-bottom: 110px; border-radius: 24px; }
  .hello h1 { font-size: 2rem; }
  .hero-cards { grid-template-columns: 1fr; }
  .hero-card { min-height: 120px; }
  .hero-art { width: 80px; height: 80px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile { border-radius: 26px; }
  .tile-label b { font-size: 1.1rem; }
  .salon-banner { flex-wrap: wrap; }
  .page-title { font-size: 2rem; }
  .room-bar { border-radius: 26px; gap: 8px; padding: 6px 8px 6px 10px; }
  .room-bar .emotes { display: none; }
  .room-bar .code-l { font-size: 1.3rem; }
  .code-block.big .code-l { font-size: 2.4rem; width: 46px; height: 58px; }
  .game-banner { flex-direction: column; text-align: center; padding: 20px; }
  .game-banner h2 { font-size: 2.2rem; }
  .banner-art { width: 96px; height: 96px; }
  .answers { grid-template-columns: 1fr; gap: 10px; }
  .answer { min-height: 76px; font-size: 1.3rem; border-radius: 24px; }
  .answer-shape { width: 44px; height: 44px; }
  .question { padding: 22px 18px; }
  .stage-title { font-size: 1.8rem; }
  .timer { width: 56px; height: 56px; } .timer .t { width: 44px; height: 44px; font-size: 1.2rem; }
  .timer.big { width: 140px; height: 140px; } .timer.big .t { width: 114px; height: 114px; font-size: 3.4rem; }
  .flip { height: 250px; }
  .uc-word { font-size: 2.5rem; }
  .clue-name { width: 90px; font-size: 1rem; }
  .c4-layout { gap: 10px; }
  .duelist { padding: 10px 8px; } .duelist .avatar { width: 44px !important; height: 44px !important; }
  .c4-board { padding: 8px; gap: 4px; border-radius: 22px; }
  .podium { min-height: 280px; gap: 8px; }
  .step-1 .step-block { height: 130px; } .step-2 .step-block { height: 95px; } .step-3 .step-block { height: 70px; }
  #toasts { bottom: 100px; }
}

/* ---------- Retouches ---------- */
.quiz { padding: 0 10px; }
.picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.emote { white-space: nowrap; }
.canvas-slot { width: min(100%, calc((100dvh - 330px) * 4 / 3)); align-self: center; }
.msg.sys { background: transparent; color: var(--ink2); font-style: italic; padding: 2px 4px; }
.c4-layout { padding-top: 44px; }
@media (max-width: 820px) {
  body.in-room .side { display: none; }
  body.in-room .view { padding-bottom: 24px; }
  .room-bar { flex-wrap: nowrap; position: static; }
  .room-bar .code-block { padding: 6px 12px; }
  .room-bar .code-block .icon-btn, .room-bar .code-label, .room-bar .game-pill { display: none; }
  .room-bar .bar-players { flex: 1; min-width: 0; overflow: hidden; padding: 14px 0 2px; margin: -12px 0 0; }
  .room-bar .grow { display: none; }
  .room-bar .bar-av .avatar { width: 34px !important; height: 34px !important; }
  .room-bar .icon-btn { width: 42px; height: 42px; }
  .code-block.big { padding: 10px 12px; gap: 6px; }
  .code-block.big .code-label { display: none; }
  .code-block.big .code-l { font-size: 2.2rem; width: 42px; height: 54px; }
  .invite, .players-card, .host-panel, .waiting { padding: 18px; }
  .player-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .pchip { padding: 10px 4px 8px; border-radius: 20px; }
  .pchip .avatar { width: 46px !important; height: 46px !important; }
  .pchip-name { font-size: .95rem; }
  .question h2 { font-size: 1.45rem; }
  .answer { min-height: 64px; padding: 10px 16px; }
  .canvas-slot { width: 100%; }
  .tools { padding: 8px; }
  .swatch { width: 34px; height: 34px; border-width: 3px; }
  .tool-btn { width: 42px; height: 42px; }
  .c4-layout { grid-template-columns: 1fr 1fr; padding-top: 40px; }
  .duelist { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 10px; }
  .duelist .avatar { width: 36px !important; height: 36px !important; }
  .duelist b { font-size: 1rem; }
  .duelist .timer { width: 44px; height: 44px; } .duelist .timer .t { width: 34px; height: 34px; font-size: 1rem; }
  .duelist.active { transform: none; }
}

/* Installation de l'appli */
.install-slot:empty { display: none; }
.install-banner { border-radius: var(--r); padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
.install-banner b { font: 600 1.2rem var(--font-d); }
.install-ico { width: 52px; height: 52px; flex-shrink: 0; } .install-ico svg { width: 100%; height: 100%; }
@media (display-mode: standalone) { .shell { padding-top: max(22px, env(safe-area-inset-top)); } }

/* ---------- Annonces entre les phases ---------- */
.splash { position: fixed; inset: 0; z-index: 65; pointer-events: none; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.splash::before { content: ''; position: absolute; inset: 0; background: rgba(30, 58, 47, .18); animation: splashDim var(--ms) ease both; }
.splash-band { position: relative; width: 140%; padding: 26px 0 30px; transform: rotate(-4deg); text-align: center; color: #fff;
  background-color: var(--c); background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .12) 0 18px, transparent 18px 46px);
  box-shadow: 0 0 0 8px #fff, 0 24px 60px rgba(0, 0, 0, .25); animation: bandIn var(--ms) cubic-bezier(.2, .9, .3, 1.1) both; }
.splash-title { font: 700 clamp(2.4rem, 7vw, 5.2rem) var(--font-d); line-height: 1; text-shadow: 0 6px 0 rgba(0, 0, 0, .18); animation: titleIn var(--ms) var(--spring) both; }
.splash-sub { font: 600 clamp(1.05rem, 2.4vw, 1.6rem) var(--font-d); margin-top: 10px; opacity: .95; animation: titleIn var(--ms) var(--spring) both; animation-delay: 60ms; }
@keyframes bandIn { 0% { transform: rotate(-4deg) translateX(-110%); } 18%, 78% { transform: rotate(-4deg) translateX(0); } 100% { transform: rotate(-4deg) translateX(110%); } }
@keyframes titleIn { 0% { transform: scale(.4); opacity: 0; } 22% { transform: scale(1.12); opacity: 1; } 32%, 78% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes splashDim { 0%, 100% { opacity: 0; } 15%, 80% { opacity: 1; } }
.splash.calm .splash-band, .splash.calm .splash-title, .splash.calm .splash-sub { animation: calmIn var(--ms) ease both !important; transform: none; }
.splash.calm .splash-band { transform: rotate(0); }
@keyframes calmIn { 0%, 100% { opacity: 0; } 10%, 85% { opacity: 1; } }

/* ---------- Compte à rebours de lancement ---------- */
.countdown { flex: 1; min-height: 520px; border-radius: var(--r-xl); border: 4px solid #fff; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 30px 20px; overflow: hidden; position: relative;
  background-color: var(--c); background-image: radial-gradient(rgba(255, 255, 255, .2) 2px, transparent 2.2px); background-size: 20px 20px; box-shadow: var(--shadow-lg); animation: pop .5s var(--spring) both; }
.countdown::after { content: ''; position: absolute; inset: -50%; background: conic-gradient(from 0deg, transparent 0 20deg, rgba(255, 255, 255, .08) 20deg 40deg); background-size: 100% 100%; animation: spin 14s linear infinite; pointer-events: none; }
.cd-art { width: 120px; height: 120px; position: relative; z-index: 1; animation: bob 2s ease-in-out infinite; }
.cd-art svg { width: 100%; height: 100%; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .2)); }
.cd-title { font-size: clamp(2.4rem, 6vw, 4rem); text-shadow: 0 5px 0 rgba(0, 0, 0, .15); position: relative; z-index: 1; }
.cd-desc { max-width: 560px; font-size: 1.15rem; opacity: .95; position: relative; z-index: 1; }
.cd-nums { position: relative; z-index: 1; width: 220px; height: 200px; margin: 6px 0; }
.cd-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 9rem var(--font-d); line-height: 1; color: #fff; text-shadow: 0 8px 0 rgba(0, 0, 0, .2); opacity: 0;
  animation: cdNum .9s cubic-bezier(.2, .9, .3, 1.2) both; }
.cd-num.go { font-size: 6rem; white-space: nowrap; animation-duration: 1.4s; }
@keyframes cdNum { 0% { transform: scale(2.4); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 75% { transform: scale(1); opacity: 1; } 100% { transform: scale(.5); opacity: 0; } }
.cd-players { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; position: relative; z-index: 1; }
.cd-av { animation: hop .7s ease-in-out infinite; animation-delay: calc(var(--i) * 90ms); }

/* ---------- Championnat de la soirée ---------- */
.champ { border-radius: var(--r-xl); padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.champ-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.champ-head h2 { font-size: 1.55rem; flex: 1; min-width: 0; }
.champ-ico { width: 36px; height: 36px; display: inline-flex; animation: wiggle 2.4s ease-in-out infinite; }
.champ-ico svg { width: 100%; height: 100%; }
.champ-list { display: flex; flex-direction: column; gap: 6px; }
.champ-row { display: grid; grid-template-columns: 30px 36px minmax(70px, 1fr) minmax(40px, 1.2fr) auto auto; align-items: center; gap: 10px; background: rgba(255, 255, 255, .8); border-radius: 18px; padding: 6px 12px 6px 8px;
  animation: popIn .5s var(--spring) both; animation-delay: calc(var(--i) * 70ms); }
.champ-row.lead { background: #FFF6DD; box-shadow: inset 0 0 0 3px #FFB020; }
.champ-row.me .champ-name { color: var(--kiwi-d); }
.champ-pos { font: 700 1.2rem var(--font-d); text-align: center; color: var(--ink2); display: flex; justify-content: center; }
.champ-crown { width: 26px; height: 26px; display: inline-flex; } .champ-crown svg { width: 100%; height: 100%; }
.champ-name { font: 600 1.08rem var(--font-d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champ-name em { font-style: normal; color: var(--ink2); font-size: .85em; }
.champ-bar { height: 12px; border-radius: 6px; background: #E3EFE7; overflow: hidden; }
.champ-bar i { display: block; height: 100%; width: var(--w); border-radius: 6px; background: linear-gradient(90deg, var(--kiwi), #A8E063); transition: width .8s var(--spring); animation: grow 1s var(--spring) both; animation-delay: calc(var(--i) * 70ms + 200ms); }
.champ-row.lead .champ-bar i { background: linear-gradient(90deg, #FFB020, #FFD66B); }
@keyframes grow { from { width: 0; } }
.champ-gain { font: 700 .95rem var(--font-d); color: #fff; background: var(--kiwi); border-radius: 12px; padding: 3px 9px; animation: scoreUp .7s var(--spring) both; animation-delay: calc(var(--i) * 70ms + 1500ms); }
.champ-pts { font: 700 1.1rem var(--font-d); white-space: nowrap; }
.link-btn { align-self: flex-start; border: 0; background: none; color: var(--ink2); font: 700 .95rem var(--font); text-decoration: underline; cursor: pointer; padding: 4px; }
.link-btn:hover { color: #C2264A; }
.results-champ { width: 100%; max-width: 620px; }
.results .step { animation-delay: calc(var(--i) * 250ms + 1200ms); }
.results > .stage-title { animation-delay: 1s; }
@media (max-width: 820px) {
  .champ { padding: 16px; }
  .champ-row { grid-template-columns: 24px 32px minmax(60px, 1fr) auto auto; gap: 8px; }
  .champ-row .champ-bar { display: none; }
  .champ-row .avatar { width: 32px !important; height: 32px !important; }
  .cd-num { font-size: 7rem; } .cd-num.go { font-size: 4.4rem; }
  .countdown { min-height: 440px; }
}

/* =========================================================
   MODE SALON
   ========================================================= */
.pill.tv-pill { background: var(--ink); color: #A8E063; }
.pill.tv-pill .ico, .pill.vip-pill .ico { width: 20px; height: 20px; display: inline-flex; }
.pill.tv-pill svg, .pill.vip-pill svg { width: 100%; height: 100%; }
.pill.vip-pill { background: #FFF6DD; color: #7A5200; white-space: normal; height: auto; min-height: 38px; padding: 6px 14px; text-align: left; }

/* Écran TV : plein écran, sans menu */
body.tv-page .side, body.tv-page .topbar { display: none !important; }
body.tv-page .shell { grid-template-columns: 1fr; padding: 18px; }
body.tv-page .view { padding-bottom: 10px; }
body.tv-page .room-bar { position: static; }
.tv-bar { gap: 16px; padding: 8px 12px 8px 14px; }
.tv-logo { width: 46px; height: 46px; flex-shrink: 0; animation: spin 24s linear infinite; }
.tv-logo svg { width: 100%; height: 100%; }
.tv-bar-txt { font: 600 1.15rem var(--font-d); }
.tv-bar-txt b { color: var(--kiwi-d); }
.tv-lobby { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 22px; align-items: start; }
.tv-join { border-radius: var(--r-xl); padding: 26px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; position: sticky; top: 0; }
.tv-join .eyebrow { font-size: 1rem; }
.tv-qr { width: 100%; max-width: 300px; aspect-ratio: 1; background: #fff; border-radius: 26px; padding: 14px; box-shadow: 0 0 0 6px var(--kiwi); display: flex; align-items: center; justify-content: center; animation: pop .6s var(--spring) both; }
.tv-qr svg { width: 100%; height: 100%; display: block; }
.tv-qr:empty::after { content: ''; width: 56px; height: 56px; border-radius: 50%; border: 6px solid #DDEEE3; border-top-color: var(--kiwi); animation: spin 1s linear infinite; }
.tv-qr-fallback { font: 700 3rem var(--font-d); letter-spacing: .2em; }
.tv-join-txt { font: 600 1.25rem var(--font-d); line-height: 1.4; }
.tv-join-txt b { color: var(--kiwi-d); font-size: 1.1em; word-break: break-all; }
.tv-code { gap: 8px; }
.tv-code .code-l { font-size: 3.6rem; width: 66px; height: 84px; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: #A8E063; border-radius: 18px; box-shadow: 0 6px 0 #0F2A1F; }
.tv-main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.tv-main > .players-card { grid-column: 1 / -1; }
.tv-main .player-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.tv-empty { font: 600 1.6rem var(--font-d); color: var(--ink2); padding: 30px 0; text-align: center; display: flex; align-items: center; justify-content: center; gap: 12px; }
/* jeu affiché sur la TV : plus grand, rien à cliquer */
.game-wrap.tv .answer, .game-wrap.tv .vote-card, .game-wrap.tv .c4-col { pointer-events: none; }
.game-wrap.tv .answer:disabled { opacity: 1; }
.game-wrap.tv .answer.dim { opacity: .3; }
.game-wrap.tv .question h2 { font-size: clamp(2rem, 3.6vw, 3.4rem); }
.game-wrap.tv .answer { min-height: 130px; font-size: clamp(1.6rem, 2.4vw, 2.3rem); }
.game-wrap.tv .canvas-slot { width: min(100%, calc((100dvh - 340px) * 4 / 3)); }
body.tv-page .podium { min-height: 300px; }
.game-wrap.tv .hint-letters span { width: 46px; height: 60px; font-size: 2.6rem; }
.uc-mask.big { width: 150px; height: 150px; display: block; } .uc-mask.big svg { width: 100%; height: 100%; }
body.tv-page { --tvz: 1; }
body.tv-page .view { zoom: var(--tvz); }
@media (min-width: 1700px) { body.tv-page { --tvz: 1.2; } }
@media (min-width: 2200px) { body.tv-page { --tvz: 1.5; } }
@media (min-width: 3000px) { body.tv-page { --tvz: 2; } }
@media (max-width: 1100px) { .tv-lobby { grid-template-columns: 1fr; } .tv-join { position: static; } .tv-main { grid-template-columns: 1fr; } }

/* Téléphone-manette */
.pad-lobby { display: flex; flex-direction: column; gap: 16px; max-width: 640px; margin: 0 auto; width: 100%; }
.pad-hello { border-radius: var(--r-xl); padding: 26px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pad-hello h2 { font-size: 2rem; }
.pad-emotes { border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.pad-hint { border-radius: var(--r); padding: 18px; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; gap: 12px; font: 600 1.3rem var(--font-d); color: var(--ink2); }
.pad-hint .ico { width: 30px; height: 30px; display: inline-flex; } .pad-hint svg { width: 100%; height: 100%; }
.game-wrap.pad .answers { gap: 12px; }
.game-wrap.pad .answer { min-height: 92px; }
.game-wrap.pad .draw:not(.is-drawer) .canvas-slot { display: none; }
.game-wrap.pad .draw:not(.is-drawer) .hint-row { min-height: 90px; }

/* =========================================================
   CONFORT MOBILE
   ========================================================= */
button, a, input, .tile, .answer { touch-action: manipulation; }
.view { overscroll-behavior: contain; }
body { overscroll-behavior: none; }
.mobile-cta { display: none; }
.guess-form { margin-top: 2px; }
@media (max-width: 820px) {
  .shell { padding-top: max(10px, env(safe-area-inset-top)); padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  /* dans un salon : pas de barre du haut, toute la place pour le jeu */
  body.in-room .topbar { display: none; }
  body.in-room .stage { gap: 0; }
  body.in-room .view { padding: 2px 2px calc(24px + env(safe-area-inset-bottom)); }
  body.in-room #toasts { top: calc(10px + env(safe-area-inset-top)); bottom: auto; }
  .room { gap: 12px; }
  /* bouton Lancer toujours à portée de pouce */
  .mobile-cta { display: block; position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 6; margin-top: 14px; padding: 8px; border-radius: 44px; background: rgba(221, 246, 230, .85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .mobile-cta .btn { width: 100%; }
  .lobby .host-panel .start-btn, .pad-lobby .host-panel .start-btn { display: none; }
  .results-cta { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 6; padding: 8px; border-radius: 44px; background: rgba(221, 246, 230, .85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .results-cta .btn { flex: 1; }
  /* salle d'attente : inviter, puis le jeu, puis les joueurs */
  .lobby { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
  .lobby-left, .lobby-right { display: contents; }
  .lobby .invite { order: 1; } .lobby .game-banner { order: 2; } .lobby .host-panel, .lobby .waiting { order: 3; }
  .lobby .players-card { order: 4; } .lobby .champ { order: 5; }
  .invite { gap: 10px; }
  .invite p { display: none; }
  .game-banner { flex-direction: row; text-align: left; gap: 14px; padding: 16px 18px; }
  .game-banner p { display: none; }
  .game-banner h2 { font-size: 1.8rem; margin: 2px 0 6px; }
  .banner-art { width: 70px; height: 70px; }
  .host-panel .picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pick { padding: 6px 8px 6px 6px; font-size: .95rem; }
  .pick-art { width: 34px; height: 34px; }
  .seg button { padding: 8px 12px; }
  /* Gribouille : la réponse juste sous le dessin */
  .guess-form { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 4; background: rgba(221, 246, 230, .9); padding: 6px; border-radius: 24px; }
  .draw-layout { gap: 12px; }
  .side-col { padding: 10px; }
  .chat { max-height: 150px; min-height: 60px; }
  .hint-row { min-height: 44px; }
  .hint-letters span { width: 24px; height: 36px; font-size: 1.5rem; }
  .hint-letters { gap: 5px; }
  /* Quiz : tout tient sur un écran */
  .quiz-head { margin-bottom: 10px; }
  .question { margin-bottom: 12px; }
  .game-wrap.pad .answer { min-height: 84px; }
  /* Undercover */
  .clue-form { padding: 14px; }
  .vote-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .vote-card { padding: 14px 8px; }
  .vote-card .avatar { width: 52px !important; height: 52px !important; }
  /* modales en bas de l'écran, faciles à toucher */
  .modal-root { align-items: flex-end; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
  .modal { padding: 22px 18px; }
  .modal .row { flex-direction: column-reverse; align-items: stretch; }
  .modal .btn { width: 100%; }
}
/* téléphone à l'horizontale */
@media (max-height: 500px) and (orientation: landscape) {
  body.in-room .topbar { display: none; }
  .room-bar { padding: 4px 8px; }
  .c4-layout { grid-template-columns: 140px minmax(0, 360px) 140px; padding-top: 34px; }
  .c4-board { order: 0; grid-column: auto; }
  .countdown { min-height: 300px; }
  .cd-art { width: 70px; height: 70px; } .cd-nums { height: 120px; } .cd-num { font-size: 5rem; }
}

/* Undercover lisible sur la TV */
.game-wrap.tv .clue-row { padding: 12px 18px 12px 12px; }
.game-wrap.tv .clue-name { font-size: 1.5rem; width: 200px; }
.game-wrap.tv .clue-word { font-size: 1.6rem; padding: 8px 18px; }
.game-wrap.tv .turn-banner { font-size: 1.7rem; }
.game-wrap.tv .vote-card b { font-size: 1.6rem; }

/* ---------- Pile Poil ---------- */
.pp { display: flex; flex-direction: column; flex: 1; gap: 0; }
.pp-q { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pp-unit { font: 700 .95rem var(--font); color: var(--ink2); background: #fff; border-radius: 14px; padding: 4px 12px; }
.pp-form { border-radius: var(--r-xl); padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 560px; width: 100%; margin: 0 auto 16px; }
.pp-field { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--ink); border-radius: 26px; padding: 6px 20px 6px 6px; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .25); }
.pp-field input { flex: 1; min-width: 0; height: 74px; border: 0; background: transparent; color: #A8E063; font: 700 2.6rem var(--font-d); text-align: center; outline: none; }
.pp-field input::placeholder { color: rgba(168, 224, 99, .3); }
.pp-field:focus-within { box-shadow: inset 0 3px 0 rgba(0, 0, 0, .25), 0 0 0 5px var(--kiwi); }
.pp-field-unit { color: #fff; font: 600 1.3rem var(--font-d); opacity: .85; white-space: nowrap; }
.pp-form .btn { width: 100%; }
.pp-sent { border-radius: var(--r-xl); padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 560px; width: 100%; margin: 0 auto 16px; }
.pp-sent b { font: 700 2.4rem var(--font-d); color: var(--kiwi-d); }
.pp-wait { padding: 20px; font-size: 1.2rem; }
.pp-reveal { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.pp-truth { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--ink); color: #fff; border-radius: 28px; padding: 14px 30px; box-shadow: 0 8px 0 #0F2A1F; }
.pp-truth .eyebrow { color: #A8E063; }
.pp-truth b { font: 700 clamp(2rem, 5vw, 3.2rem) var(--font-d); }
.pp-line { position: relative; width: 100%; height: 170px; border-radius: var(--r); padding: 0 30px; }
.pp-track { position: absolute; left: 30px; right: 30px; top: 108px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #C9E9D4, #8FD3A6); }
.pp-line > .pp-flag, .pp-line > .pp-mark { margin-left: 30px; }
.pp-flag { position: absolute; top: 88px; width: 4px; height: 50px; background: var(--ink); transform: translateX(-2px); border-radius: 2px; left: 0; animation: pop .5s var(--spring) both; }
.pp-flag span { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #A8E063; font: 700 .95rem var(--font-d); padding: 3px 10px; border-radius: 10px; white-space: nowrap; }
.pp-mark { position: absolute; top: calc(10px + var(--row) * 26px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0; animation: dropIn .7s var(--spring) both; animation-delay: calc(var(--i) * 120ms + 300ms); z-index: 1; }
.pp-mark::after { content: ''; width: 2px; height: calc(52px - var(--row) * 26px); background: rgba(30, 58, 47, .35); }
.pp-mark-val { font: 700 .8rem var(--font-d); background: #fff; border-radius: 8px; padding: 1px 6px; margin-top: -4px; white-space: nowrap; }
.pp-mark.exact .avatar { box-shadow: 0 0 0 4px #FFB020; border-radius: 50%; }
.pp-line { width: calc(100% - 0px); }
.pp-rank { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 620px; }
.pp-rank .score-row { animation: popIn .45s var(--spring) both; animation-delay: calc(var(--i) * 80ms + 600ms); }
.pp-gain { color: var(--kiwi-d); font-family: var(--font-d); min-width: 52px; text-align: right; }
.pp-exact { color: #C27A00; }

/* ---------- Même Onde ---------- */
.onde { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.onde-clue { border-radius: var(--r); padding: 16px 22px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.onde-clue b { font: 700 clamp(1.6rem, 4vw, 2.6rem) var(--font-d); color: var(--ink); }
.onde-bar { position: relative; border-radius: var(--r-xl); padding: 18px 20px 26px; background: #fff; box-shadow: var(--shadow); }
.onde-ends { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.onde-end { font: 700 clamp(1.1rem, 2.6vw, 1.7rem) var(--font-d); padding: 6px 14px; border-radius: 16px; color: #fff; max-width: 48%; }
.onde-end.left { background: #4C8DFF; } .onde-end.right { background: #F0466A; text-align: right; }
.onde-track { position: relative; height: 70px; border-radius: 35px; background: linear-gradient(90deg, #4C8DFF, #A78BFA 50%, #F0466A); margin: 54px 22px 0; }
.onde-clip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.onde-band { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; animation: bandShow .7s var(--spring) both; }
.onde-band.ob0 { background: rgba(255, 255, 255, .35); }
.onde-band.ob1 { background: rgba(255, 226, 122, .75); }
.onde-band.ob2 { background: #FFB020; box-shadow: 0 0 20px rgba(255, 176, 32, .8); }
.onde-band span { font: 700 .8rem var(--font-d); color: #5A3A00; }
@keyframes bandShow { from { transform: scaleX(0); opacity: 0; } }
.onde-target { position: absolute; top: -10px; bottom: -10px; width: 6px; margin-left: -3px; background: var(--ink); border-radius: 3px; animation: pop .5s var(--spring) .3s both; }
.onde-mark, .onde-me { position: absolute; top: -48px; transform: translateX(-50%); transition: left .15s linear; display: flex; flex-direction: column; align-items: center; z-index: 2; }
.onde-mark::after, .onde-me::after { content: ''; width: 3px; height: 30px; background: var(--ink); border-radius: 2px; margin-top: -2px; }
.onde-mark.locked .avatar { box-shadow: 0 0 0 3px var(--kiwi); border-radius: 50%; }
.onde-me { z-index: 3; transition: none; }
.onde-me .avatar { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--ink); border-radius: 50%; }
.onde-range { -webkit-appearance: none; appearance: none; position: absolute; left: 42px; right: 42px; bottom: 26px; height: 70px; background: transparent; margin: 0; width: calc(100% - 84px); cursor: grab; touch-action: none; }
.onde-range::-webkit-slider-thumb { -webkit-appearance: none; width: 54px; height: 70px; background: transparent; border: 0; }
.onde-range::-moz-range-thumb { width: 54px; height: 70px; background: transparent; border: 0; }
.onde-range:focus { outline: none; }
.onde-result { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.game-wrap.tv .onde-end { font-size: 2.2rem; }
.game-wrap.tv .onde-track { height: 110px; border-radius: 55px; }
.game-wrap.tv .onde-mark .avatar { width: 52px !important; height: 52px !important; }
@media (max-width: 820px) {
  .pp-line { height: 160px; padding: 0 16px; }
  .pp-track { left: 16px; right: 16px; }
  .pp-line > .pp-flag, .pp-line > .pp-mark { margin-left: 16px; }
  .pp-field input { height: 64px; font-size: 2.2rem; }
  .onde-bar { padding: 14px 10px 22px; }
  .onde-track { margin: 54px 14px 0; height: 64px; }
  .onde-range { left: 24px; right: 24px; width: calc(100% - 48px); bottom: 22px; height: 64px; }
}

/* ---------- QR codes ---------- */
.invite-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.invite-qr { width: 150px; height: 150px; flex-shrink: 0; border: 0; padding: 8px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 4px var(--kiwi); cursor: zoom-in; display: flex; align-items: center; justify-content: center; transition: transform .25s var(--spring); }
.invite-qr:hover { transform: scale(1.04) rotate(-2deg); }
.invite-qr svg { width: 100%; height: 100%; display: block; }
.invite-qr:empty::after { content: ''; width: 34px; height: 34px; border-radius: 50%; border: 5px solid #DDEEE3; border-top-color: var(--kiwi); animation: spin 1s linear infinite; }
.qr-btn { display: none; }
.qr-modal { align-items: center; max-width: 480px; }
.qr-big { width: min(78vw, 380px); aspect-ratio: 1; background: #fff; border-radius: 26px; padding: 12px; box-shadow: 0 0 0 6px var(--kiwi); display: flex; align-items: center; justify-content: center; }
.qr-big svg { width: 100%; height: 100%; display: block; }
.qr-modal .tv-code .code-l { font-size: 2.6rem; width: 52px; height: 64px; }
.scan-modal { align-items: center; }
.scan-frame { position: relative; width: min(80vw, 360px); aspect-ratio: 1; border-radius: 26px; overflow: hidden; background: #000; box-shadow: 0 0 0 5px var(--kiwi); }
.scan-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-line { position: absolute; left: 8%; right: 8%; height: 4px; border-radius: 2px; background: #A8E063; box-shadow: 0 0 16px #A8E063; animation: scanMove 1.8s ease-in-out infinite alternate; }
@keyframes scanMove { from { top: 10%; } to { top: 88%; } }
.scan-cta { display: flex; align-items: center; gap: 18px; padding: 20px 24px; border: 3px solid #fff; border-radius: var(--r-xl); background: var(--ink); color: #fff; cursor: pointer; text-align: left; box-shadow: 0 8px 0 #0F2A1F, var(--shadow); }
.scan-cta b { display: block; font: 700 1.6rem var(--font-d); color: #A8E063; }
.scan-cta small { display: block; font-size: 1rem; opacity: .85; margin-top: 2px; }
.scan-ico { width: 56px; height: 56px; flex-shrink: 0; display: inline-flex; } .scan-ico svg { width: 100%; height: 100%; }
.or-sep { display: flex; align-items: center; gap: 12px; color: var(--ink2); font-weight: 800; }
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 3px; border-radius: 2px; background: rgba(30, 58, 47, .12); }
.scan-mini { flex-shrink: 0; }
@media (max-width: 820px) {
  .invite-qr { display: none; }
  .qr-btn { display: inline-flex; }
}

/* ---------- Même Onde : le cadran ---------- */
.onde-bar { padding: 18px 18px 54px; }
.dial { position: relative; width: min(100%, 720px, calc((100dvh - 430px) * 400 / 232)); min-width: min(100%, 300px); margin: 34px auto 0; aspect-ratio: 400 / 232; user-select: none; -webkit-user-select: none; }
.dial.can-move { cursor: grab; touch-action: none; }
.dial.can-move:active { cursor: grabbing; }
.dial.can-move:focus-visible { outline: none; }
.dial-svg, .dial-svg svg { width: 100%; height: 100%; display: block; overflow: visible; }
.dial-svg svg { filter: drop-shadow(0 10px 18px rgba(30, 58, 47, .25)); }
.dial-bands { transform-box: view-box; transform-origin: 200px 214px; }
.dial-bands.reveal { animation: fanOpen .9s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes fanOpen { from { transform: scale(.2) rotate(-90deg); opacity: 0; } }
.dial-needle { transition: none; }
.dial-av { position: absolute; transform: translate(-50%, -50%); z-index: 2; animation: pop .4s var(--spring) both; }
.dial-av.locked .avatar { box-shadow: 0 0 0 3px var(--kiwi); border-radius: 50%; }
.dial-end { position: absolute; top: 100%; margin-top: 10px; font: 700 clamp(1.05rem, 2.4vw, 1.6rem) var(--font-d); padding: 6px 14px; border-radius: 16px; color: #fff; max-width: 46%; line-height: 1.15; }
.dial-end.left { left: 0; background: #4C8DFF; }
.dial-end.right { right: 0; background: #F0466A; text-align: right; }
.dial.can-move::after { content: 'Glisse l\'aiguille'; position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); font: 700 .85rem var(--font); color: #fff; background: rgba(30, 58, 47, .6); padding: 4px 10px; border-radius: 10px; pointer-events: none; animation: fadeOut .4s ease 3s both; }
.game-wrap.tv .dial { width: min(100%, 1100px, calc((100dvh / var(--tvz, 1) - 540px) * 400 / 232)); }
.game-wrap.tv .dial-end { font-size: 2.2rem; }
.game-wrap.tv .dial-av .avatar { width: 50px !important; height: 50px !important; }
@media (max-width: 820px) {
  .onde-bar { padding: 12px 8px 50px; }
  .dial { margin-top: 26px; width: 100%; }
  .dial-av .avatar { width: 28px !important; height: 28px !important; }
}

/* =========================================================
   LOUP-GAROU · nuit étoilée / jour doré
   ========================================================= */
#bg { transition: background-color 1.6s var(--ease); }
#bg::before, #bg::after { content: ''; position: absolute; pointer-events: none; opacity: 0; transition: opacity 1.6s var(--ease), transform 2s var(--ease); }
/* étoiles */
#bg::before { inset: 0; background-image:
  radial-gradient(1.6px 1.6px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 28% 62%, #fff 50%, transparent 51%),
  radial-gradient(2px 2px at 44% 30%, #FFF4C2 50%, transparent 51%), radial-gradient(1.3px 1.3px at 63% 12%, #fff 50%, transparent 51%),
  radial-gradient(1.8px 1.8px at 77% 48%, #fff 50%, transparent 51%), radial-gradient(1.1px 1.1px at 88% 80%, #fff 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 8% 86%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 52% 88%, #fff 50%, transparent 51%),
  radial-gradient(1.7px 1.7px at 93% 22%, #FFF4C2 50%, transparent 51%), radial-gradient(1px 1px at 36% 8%, #fff 50%, transparent 51%);
  background-size: 420px 420px; animation: twinkle 4s ease-in-out infinite alternate; }
@keyframes twinkle { from { filter: brightness(.6); } to { filter: brightness(1.3); } }
/* lune / soleil */
#bg::after { width: 150px; height: 150px; border-radius: 50%; top: 7%; right: 8%; transform: translateY(40px) scale(.8); }
body.wolf-night #bg { background-color: #17143A; background-image: radial-gradient(rgba(167, 139, 250, .12) 1.7px, transparent 1.8px); }
body.wolf-night #bg::before { opacity: .9; }
body.wolf-night #bg::after { opacity: 1; transform: none; background: radial-gradient(circle at 38% 36%, #FFFBE6, #FFE27A 60%, #F2C14E); box-shadow: 0 0 60px 20px rgba(255, 226, 122, .35), 0 0 160px 60px rgba(255, 226, 122, .12); }
body.wolf-night .blob { opacity: .25; }
body.wolf-night .b1 { background: #4C3AA8; } body.wolf-night .b2 { background: #1D5B8C; } body.wolf-night .b3 { background: #6C2E6E; }
body.wolf-day #bg { background-color: #FFF1CF; }
body.wolf-day #bg::after { opacity: 1; transform: none; background: radial-gradient(circle, #FFF6B8, #FFC531 65%); box-shadow: 0 0 80px 30px rgba(255, 197, 49, .35); }
body.wolf-day .b1 { background: #FFD98A; } body.wolf-day .b3 { background: #FFB9A0; }

.wolf { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.wolf.night { color: #EDEBFF; }
.wolf.night .stage-title, .wolf.night .wf-narr { color: #fff; text-shadow: 0 2px 18px rgba(10, 8, 40, .6); }
.wolf .glass { color: var(--ink); }
.wf-head { margin-bottom: 0; }
.wf-peek-btn, .wf-rules-btn { border: 0; cursor: pointer; }
.wf-rules-btn { font-weight: 700; }
.wf-peek-btn.on { background: #6C4CE0; color: #fff; }
.wf-narr { font: 600 1.25rem var(--font-d); }
.wf-narr.big { font-size: clamp(1.8rem, 4vw, 2.8rem); }

/* Distribution */
.wf-reveal { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.wf-flip { height: 380px; width: min(340px, 88vw); }
.wf-back { background: linear-gradient(160deg, #2B2361, #17143A) !important; color: #fff; }
.wf-moon-mini { width: 90px; height: 90px; border-radius: 50%; box-shadow: inset -22px -6px 0 0 #FFE27A; transform: rotate(-20deg); filter: drop-shadow(0 0 18px rgba(255, 226, 122, .6)); }
.wf-face { background: #fff; border-color: var(--rc) !important; padding: 20px; gap: 8px !important; }
.wf-face::before { content: ''; position: absolute; inset: 0 0 55% 0; background: var(--rc); border-radius: 32px 32px 50% 50% / 32px 32px 30px 30px; opacity: .95; }
.wf-art { position: relative; width: 130px; height: 130px; display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.wf-art svg, .wf-mini-art svg, .wf-chip-art svg, .wf-panel-art svg, .wf-mate svg, .wf-scope svg { width: 100%; height: 100%; display: block; }
.wf-art.sm { width: 34px; height: 34px; display: inline-block; vertical-align: middle; filter: none; }
.flip.on .wf-art { animation: wolfArt .9s var(--spring) .35s both; }
@keyframes wolfArt { from { transform: scale(.3) rotate(-25deg); opacity: 0; } }
.wf-role-name { font: 700 2.2rem var(--font-d); color: var(--rc); position: relative; }
.wf-role-team { font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem !important; color: var(--ink2); }
.wf-role-desc { font-size: 1.02rem; color: var(--ink); line-height: 1.35; }
.wf-pack { background: #C2304F; color: #fff; padding: 10px 18px; border-radius: 18px; font-size: 1.1rem; }
.wf-ready { color: inherit; opacity: .85; font-size: 1.1rem; }
.wf-intro { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; padding: 10px; }
.wf-moon-big { width: 140px; height: 140px; border-radius: 50%; box-shadow: inset -34px -10px 0 0 #FFE27A; transform: rotate(-20deg); filter: drop-shadow(0 0 30px rgba(255, 226, 122, .6)); animation: bob 5s ease-in-out infinite; }
.wf-comp { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.wf-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px 6px 6px; border-radius: 30px; background: #fff; color: var(--ink); font: 600 1.1rem var(--font-d); box-shadow: 0 0 0 3px var(--rc); animation: popIn .5s var(--spring) both; animation-delay: calc(var(--i) * 90ms); }
.wf-chip-art { width: 40px; height: 40px; border-radius: 50%; background: var(--rc); padding: 4px; }

/* Règles */
.wf-steps { border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; text-align: left; max-width: 760px; width: 100%; margin: 0 auto; }
.wf-goal { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.wf-goal p { background: rgba(255, 255, 255, .8); border-radius: 14px; padding: 8px 12px; }
.wf-step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: st; }
.wf-step-list li { counter-increment: st; display: grid; grid-template-columns: 38px 90px 1fr; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 8px 12px 8px 8px; animation: popIn .45s var(--spring) both; animation-delay: calc(var(--i) * 80ms); }
.wf-step-list li::before { content: counter(st); width: 34px; height: 34px; border-radius: 50%; background: #6C4CE0; color: #fff; display: flex; align-items: center; justify-content: center; font: 700 1.1rem var(--font-d); }
.wf-step-list b { font: 700 1.1rem var(--font-d); }
.wf-step-list span { font-weight: 600; line-height: 1.3; }
.wf-rules { max-width: 680px; text-align: left; max-height: calc(100dvh - 40px); overflow-y: auto; }
.wf-rules h2 { text-align: center; }
.wf-rules .wf-steps { padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
.wf-role-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wf-mini { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 16px; padding: 8px; box-shadow: inset 0 0 0 3px var(--rc); text-align: left; }
.wf-mini-art { width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px; background: var(--rc); padding: 5px; }
.wf-mini b { font: 700 1.1rem var(--font-d); color: var(--rc); display: block; }
.wf-mini small { font-size: .85rem; color: var(--ink2); line-height: 1.25; display: block; }
.wf-peek { position: fixed; right: 18px; bottom: 18px; z-index: 30; border-radius: 22px; padding: 12px; width: min(360px, calc(100vw - 36px)); display: flex; flex-direction: column; gap: 8px; }
.wf-visions { display: flex; flex-direction: column; gap: 4px; }
.wf-vision { background: #fff; border-left: 6px solid var(--rc); border-radius: 10px; padding: 4px 10px; font-size: .92rem; }
.wf-potions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.wf-pot { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 20px; background: #fff; font-size: .9rem; }
.wf-pot i { width: 22px; height: 28px; border-radius: 6px 6px 10px 10px; background: #5CB83F; box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .15); }
.wf-pot.death i { background: #7C2D8A; }
.wf-pot.used { opacity: .45; text-decoration: line-through; }

/* Scènes crépuscule / aube / verdict */
.wf-scene { position: relative; flex: 1; min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; overflow: hidden; border-radius: var(--r-xl); padding: 30px 14px 120px; }
.wf-scene.dusk { background: linear-gradient(#2B2361 0%, #7A3E8C 55%, #F28A5B 100%); animation: duskSky 4.5s ease-in both; }
@keyframes duskSky { from { filter: brightness(1.5) saturate(.8); } }
.wf-scene.dawn { background: linear-gradient(#5B8DEF 0%, #FFC48A 70%, #FFE6A8 100%); animation: dawnSky 3s ease-out both; color: var(--ink); }
@keyframes dawnSky { from { filter: brightness(.35) saturate(.6); } }
.wf-scene.dawn .wf-narr { color: #fff; text-shadow: 0 2px 14px rgba(60, 30, 0, .4); }
.wf-scene.night { background: linear-gradient(transparent 40%, rgba(76, 58, 168, .35)); justify-content: flex-start; padding-top: 10px; gap: 40px; }
.wf-scene.night .wf-hills { opacity: .9; }
.wf-scene.verdict { background: radial-gradient(circle at 50% 40%, #FFF6DC, #F7D9A6); color: var(--ink); }
.wf-scene.verdict .wf-narr.big { animation: popIn .6s var(--spring) both; }
.wf-scene > * { position: relative; z-index: 2; }
.wf-sun { position: absolute !important; z-index: 1 !important; width: 170px; height: 170px; border-radius: 50%; left: 50%; margin-left: -85px; background: radial-gradient(circle, #FFF6B8, #FFB020 70%); box-shadow: 0 0 80px 30px rgba(255, 176, 32, .5); }
.wf-sun.set { animation: sunSet 4.5s ease-in both; }
.wf-sun.rise { animation: sunRise 3.2s ease-out both; }
@keyframes sunSet { from { bottom: 55%; } to { bottom: -40px; filter: hue-rotate(-20deg); } }
@keyframes sunRise { from { bottom: -120px; } to { bottom: 58%; } }
.wf-hills { position: absolute !important; z-index: 1 !important; left: -5%; right: -5%; bottom: 0; height: 120px; background:
  radial-gradient(60% 120px at 20% 120px, #1E2A4A 98%, transparent 100%), radial-gradient(55% 110px at 75% 120px, #263459 98%, transparent 100%); }
.wf-scene.dawn .wf-hills { background: radial-gradient(60% 120px at 20% 120px, #3E8E4E 98%, transparent 100%), radial-gradient(55% 110px at 75% 120px, #4FA35E 98%, transparent 100%); }
.wf-village { position: absolute; left: 18%; bottom: 46px; width: min(300px, 46%); --hs: #10182F; --win: #FFD23F; }
.wf-village svg { width: 100%; display: block; }
.wf-village .hs { fill: var(--hs); }
.wf-village .win { fill: var(--win); }
.wf-scene.dusk .wf-village .win { animation: lightsOn 4.5s ease-in both; }
@keyframes lightsOn { 0%, 55% { opacity: 0; } 100% { opacity: 1; } }
.wf-scene.dawn .wf-village { --hs: #7A4E33; --win: #BDE4FF; }
.wf-deaths { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.wf-deaths > .wf-narr { font-size: 1.2rem; }
.wf-deaths { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.wf-deaths > .wf-narr { flex-basis: 100%; }
.wf-death { background: #fff; color: var(--ink); border-radius: 28px; padding: 18px 26px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 0 0 5px var(--rc), var(--shadow-lg);
  animation: deathIn .8s var(--spring) both; animation-delay: calc(1.6s + var(--i) * 1.4s); }
@keyframes deathIn { from { transform: translateY(40px) scale(.6) rotate(-6deg); opacity: 0; } }
.wf-death-av { position: relative; filter: grayscale(.85); }
.wf-death-name { font: 700 1.8rem var(--font-d); }
.wf-death small { color: var(--ink2); }
.wf-death-role { display: inline-flex; align-items: center; gap: 8px; background: var(--rc); color: #fff; font: 700 1.3rem var(--font-d); padding: 6px 16px 6px 8px; border-radius: 18px;
  animation: reveal .9s var(--spring) both; animation-delay: calc(2.6s + var(--i) * 1.4s); }
.wf-x { position: absolute; inset: 8%; pointer-events: none; }
.wf-x::before, .wf-x::after { content: ''; position: absolute; left: 50%; top: 50%; width: 120%; height: 8px; border-radius: 4px; background: #C2304F; box-shadow: 0 0 0 2px #fff; transform: translate(-50%, -50%) rotate(45deg); }
.wf-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.wf-death .wf-x::before, .wf-death .wf-x::after { animation: grow .4s ease-out both; animation-delay: calc(2.2s + var(--i) * 1.4s); }
.wf-nobody { background: #fff; color: var(--ink); border-radius: 26px; padding: 20px 30px; display: flex; flex-direction: column; gap: 4px; animation-delay: 1.4s; }
.wf-nobody.late { animation-delay: 1.8s; }
.wf-nobody b { font: 700 1.8rem var(--font-d); }
.wf-flash { position: absolute !important; inset: 0; background: #fff; animation: flash .7s ease-out both; z-index: 3 !important; pointer-events: none; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }

/* Nuit */
.wf-night-stage { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.wf-narration { animation: fadeIn 1.2s both; display: flex; flex-direction: column; gap: 6px; }
.wf-panel { width: 100%; max-width: 860px; border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.wf-panel-head { display: flex; gap: 12px; align-items: center; }
.wf-panel-head b { font: 700 1.35rem var(--font-d); display: block; }
.wf-panel-head small { color: var(--ink2); }
.wf-panel-art { width: 58px; height: 58px; flex-shrink: 0; border-radius: 16px; padding: 5px; background: var(--rc, #6C4CE0); }
.wolfp { --rc: #C2304F; box-shadow: 0 0 0 4px #C2304F, 0 0 40px rgba(194, 48, 79, .5); }
.seerp { --rc: #7C5CE0; box-shadow: 0 0 0 4px #7C5CE0, 0 0 40px rgba(124, 92, 224, .5); align-items: center; text-align: center; }
.seerp .wf-panel-head { align-self: stretch; text-align: left; }
.witchp { --rc: #1FA774; box-shadow: 0 0 0 4px #1FA774, 0 0 40px rgba(31, 167, 116, .5); }
.wf-vision-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 30px; }
.wf-vision-card b { font: 700 1.6rem var(--font-d); }
.wf-vision-role { display: inline-flex; align-items: center; gap: 10px; background: var(--rc); color: #fff; font: 700 1.6rem var(--font-d); padding: 8px 20px 8px 10px; border-radius: 20px; animation: reveal 1s var(--spring) .3s both; }
.btn.wf-life { background: #1FA774; box-shadow: 0 6px 0 #11734E; }
.btn.wf-death { color: #7C2D8A; }
.sleepp { align-items: center; text-align: center; color: #EDEBFF; }
.sleepp small { opacity: .85; font-size: .95rem; }
.wf-sky { position: relative; width: 100%; height: 220px; border-radius: 26px; border: 2px solid rgba(255, 255, 255, .18); background: radial-gradient(circle at 70% 20%, rgba(124, 92, 224, .35), transparent 60%), rgba(10, 8, 40, .35); overflow: hidden; cursor: pointer; }
.wf-stars { position: absolute; inset: 0; }
.wf-stars i { position: absolute; border-radius: 50%; background: #fff; animation: twinkleStar 2.6s ease-in-out infinite alternate; }
@keyframes twinkleStar { from { opacity: .25; transform: scale(.7); } to { opacity: 1; transform: scale(1.2); } }
.wf-shoot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #FFF4C2; box-shadow: 0 0 12px 4px #FFE27A; animation: shoot 1.1s ease-out both; }
.wf-shoot::after { content: ''; position: absolute; right: 3px; top: 2px; width: 80px; height: 2px; background: linear-gradient(90deg, transparent, #FFE27A); transform-origin: right; }
@keyframes shoot { to { transform: translate(120px, 70px); opacity: 0; } }
.wf-zzz { position: absolute; right: 22px; bottom: 16px; font: 700 2rem var(--font-d); color: #CFC8FF; }
.wf-zzz i { font-style: normal; display: inline-block; animation: zz 2.4s ease-in-out infinite; font-size: .7em; }
.wf-zzz i:last-child { animation-delay: .6s; font-size: .5em; }
@keyframes zz { 50% { transform: translateY(-10px); opacity: .4; } }
.ghostp { background: rgba(255, 255, 255, .85); }
.wf-ghost-list { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-ghost { display: inline-flex; align-items: center; gap: 6px; background: #fff; border-radius: 16px; padding: 3px 10px 3px 3px; box-shadow: inset 0 0 0 2px var(--rc); font-size: .9rem; }
.wf-ghost em { color: var(--rc); font-style: normal; }
.wf-ghost.dead { opacity: .5; }
.wf-sleepers { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.wf-sleeper { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 1.3rem; animation: bob 4s ease-in-out infinite; animation-delay: calc(var(--i) * -.6s); color: #EDEBFF; }
.wf-sleeper-av { position: relative; filter: brightness(.7) saturate(.6); }
.wf-sleeper.dead { animation: none; opacity: .45; }
.wf-z { position: absolute; right: -8px; top: -12px; font: 700 1.4rem var(--font-d); color: #CFC8FF; animation: zz 2.4s ease-in-out infinite; }

/* Plateau du village */
.wf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.wf-p { position: relative; border: 0; background: #fff; color: var(--ink); border-radius: 22px; padding: 12px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; box-shadow: var(--shadow);
  animation: popIn .45s var(--spring) both; animation-delay: calc(var(--i) * 40ms); transition: transform .2s var(--spring), box-shadow .2s; }
.wf-p.can { cursor: pointer; }
.wf-p.can:hover, .wf-p.can:focus-visible { transform: translateY(-4px) rotate(-1deg); }
.wf-p-av { position: relative; }
.wf-p-name { font: 600 1.05rem var(--font-d); line-height: 1.15; word-break: break-word; }
.wf-p-name em { font-style: normal; color: var(--ink2); font-size: .85em; }
.wf-p.dead { opacity: .7; background: #E9E6F2; }
.wf-p.dead .wf-p-av { filter: grayscale(1); }
.wf-tag { font-size: .8rem; background: var(--rc); color: #fff; padding: 2px 10px; border-radius: 10px; }
.wf-p.picked { box-shadow: 0 0 0 4px #fff, 0 0 0 8px var(--pc, #C2304F); transform: scale(1.04); }
.wf-grid.hunt .wf-p.can:hover { box-shadow: 0 0 0 4px #C2304F; }
.wf-grid.see { --pc: #7C5CE0; } .wf-grid.see .wf-p.can:hover { box-shadow: 0 0 0 4px #7C5CE0; }
.wf-grid.poison { --pc: #7C2D8A; } .wf-grid.poison .wf-p.can:hover { box-shadow: 0 0 0 4px #7C2D8A; }
.wf-grid.shoot .wf-p.can:hover { box-shadow: 0 0 0 4px #D97A1E; }
.wf-grid.vote { --pc: #C2304F; }
.wf-mate { position: absolute; right: -10px; bottom: -6px; width: 30px; height: 30px; border-radius: 50%; background: #C2304F; padding: 2px; box-shadow: 0 0 0 2px #fff; }
.wf-marks, .wf-voters { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.wf-claw, .wf-voter { animation: pop .35s var(--spring) both; display: inline-flex; }
.wf-claw .avatar { box-shadow: 0 0 0 2px #C2304F; border-radius: 50%; }
.wf-day-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.wf-count { text-align: center; color: var(--ink2); }
.wf-history { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wf-hist { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .85); border-radius: 16px; padding: 3px 12px 3px 3px; font-size: .88rem; box-shadow: inset 0 0 0 2px var(--rc); }
.wf-hunter { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.wf-hunter .wf-grid { width: 100%; max-width: 860px; }
.wf-scope { width: 120px; height: 120px; border-radius: 50%; background: #D97A1E; padding: 10px; animation: scope 1.8s ease-in-out infinite; }
@keyframes scope { 25% { transform: translate(14px, -6px); } 50% { transform: translate(-10px, 8px); } 75% { transform: translate(6px, 10px); } }

.game-wrap.tv .wf-p, .game-wrap.tv .wf-sky { pointer-events: none; }
.game-wrap.tv .wf-p-name { font-size: 1.4rem; }
.game-wrap.tv .wf-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.game-wrap.tv .wf-narr.big { font-size: 3.4rem; }
@media (max-width: 820px) {
  .wf-goal { grid-template-columns: 1fr; }
  .wf-step-list li { grid-template-columns: 34px 1fr; }
  .wf-step-list li span { grid-column: 2; }
  .wf-role-list { grid-template-columns: 1fr; }
  .wf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .wf-p { padding: 10px 4px 8px; border-radius: 18px; }
  .wf-p .avatar { width: 48px !important; height: 48px !important; }
  .wf-p-name { font-size: .95rem; }
  .wf-flip { height: 340px; }
  .wf-art { width: 104px; height: 104px; }
  .wf-scene { min-height: 360px; }
  .wf-sky { height: 180px; }
  .wf-peek { right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); }
}
.wf-face > * { position: relative; }

/* =========================================================
   CARTE FOLLE · cartes, main en éventail, table
   ========================================================= */
.cf { --cw: 92px; container-type: inline-size; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.cf-head { margin-bottom: 0; }
.cf-rules-btn { border: 0; cursor: pointer; font-weight: 700; }

/* Une carte */
.cf-card { --cc: #1E2533; --cd: #000; position: relative; display: block; width: var(--cw); aspect-ratio: 2 / 3; border-radius: calc(var(--cw) * .14); background: #fff; padding: calc(var(--cw) * .055);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .08), 0 6px 14px rgba(20, 30, 50, .22); user-select: none; -webkit-user-select: none; }
.cf-face { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: calc(var(--cw) * .1); overflow: hidden;
  background: var(--cc); background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .1) 0 6px, transparent 6px 14px), linear-gradient(160deg, rgba(255, 255, 255, .25), rgba(0, 0, 0, .12)); color: #fff; }
.cf-mid { width: 74%; aspect-ratio: 1; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 calc(var(--cw) * .04) rgba(255, 255, 255, .45), inset 0 -4px 0 rgba(0, 0, 0, .08); color: var(--cc); }
.cf-mid b { font: 700 calc(var(--cw) * .42) var(--font-d); line-height: 1; letter-spacing: -.04em; text-shadow: 2px 2px 0 var(--cd); -webkit-text-stroke: 1px var(--cd); }
.cf-card.v-D .cf-mid b, .cf-card.v-F .cf-mid b { font-size: calc(var(--cw) * .34); }
.cf-corner { position: absolute; font: 700 calc(var(--cw) * .17) var(--font-d); line-height: 1; color: #fff; text-shadow: 1px 1px 0 var(--cd); display: flex; }
.cf-corner.tl { left: 7%; top: 5%; } .cf-corner.br { right: 7%; bottom: 5%; transform: rotate(180deg); }
.cf-sym { display: inline-flex; width: calc(var(--cw) * .17); height: calc(var(--cw) * .17); }
.cf-sym svg { width: 100%; height: 100%; }
.cf-sym.big { width: 62%; height: 62%; color: var(--cc); filter: drop-shadow(2px 2px 0 var(--cd)); }
.cf-card.wild { --cc: #1E2533; --cd: #000; }
.cf-card.wild .cf-mid { background: transparent; box-shadow: none; }
.cf-wheel { position: relative; width: 92%; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 calc(var(--cw) * .03) #fff;
  background: conic-gradient(#F0466A 0 25%, #FFC531 0 50%, #2FB765 0 75%, #3F8CFF 0); }
.cf-wheel b { font: 700 calc(var(--cw) * .3) var(--font-d); color: #fff; text-shadow: 2px 2px 0 #000; -webkit-text-stroke: 1px #000; }
.cf-card.back .cf-face { background: #1E3A2F; background-image: radial-gradient(circle at 50% 50%, #5CB83F 0 28%, transparent 29%), repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .07) 0 5px, transparent 5px 12px); }
.cf-back-logo { font: 700 calc(var(--cw) * .15) var(--font-d); color: #fff; text-align: center; line-height: 1.05; transform: rotate(-14deg); text-shadow: 0 2px 0 #1E3A2F; }

/* Sièges des joueurs */
.cf-seats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cf-seat { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 30px; background: rgba(255, 255, 255, .8); border: 3px solid #fff; box-shadow: var(--shadow);
  transition: transform .3s var(--spring), box-shadow .3s; animation: popIn .4s var(--spring) both; animation-delay: calc(var(--i) * 50ms); }
.cf-seat.active { transform: translateY(-4px) scale(1.04); box-shadow: 0 0 0 4px #F0466A, 0 10px 30px rgba(240, 70, 106, .35); }
.cf-seat.me .cf-seat-txt b { color: #F0466A; }
.cf-seat-av { position: relative; display: inline-flex; }
.cf-seat-av .timer { position: absolute; inset: -6px; width: auto; height: auto; background: conic-gradient(#F0466A calc(var(--p) * 360deg), transparent 0); -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%); mask: radial-gradient(circle, transparent 62%, #000 63%); z-index: -1; }
.cf-seat-av .timer .t { display: none; }
.cf-seat-av .timer.urgent { animation: none; }
.cf-seat-txt { display: flex; flex-direction: column; gap: 2px; }
.cf-seat-txt b { font: 600 1.02rem var(--font-d); line-height: 1.1; }
.cf-seat-txt em { font-style: normal; color: var(--ink2); font-size: .85em; }
.cf-backs { display: flex; align-items: center; height: 22px; }
.cf-backs i { width: 14px; height: 20px; border-radius: 3px; background: #1E3A2F; border: 1.5px solid #fff; margin-left: -7px; transform: rotate(calc((var(--j) - 4) * 4deg)); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.cf-backs i:first-child { margin-left: 0; }
.cf-backs small { margin-left: 6px; font: 700 .95rem var(--font-d); color: var(--ink2); }
.cf-folle-tag { position: absolute; top: -12px; right: -6px; background: #FFC531; color: #1E2533; font: 700 .85rem var(--font-d); padding: 2px 10px; border-radius: 12px; box-shadow: 0 2px 0 #B07A00; transform: rotate(6deg); }
.cf-catch { position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%); border: 0; cursor: pointer; background: #F0466A; color: #fff; font: 700 .85rem var(--font-d); padding: 4px 10px; border-radius: 12px; white-space: nowrap; box-shadow: 0 3px 0 #A8213F; animation: nudge 1.2s infinite; z-index: 2; }

/* Table */
.cf-table { position: relative; display: flex; align-items: center; justify-content: center; gap: clamp(30px, 6vw, 70px); padding: 22px 10px 44px; min-height: calc(var(--cw) * 1.5 + 70px); }
.cf-ring { position: absolute; left: 50%; top: 50%; width: calc(var(--cw) * 3.3); aspect-ratio: 1; margin: calc(var(--cw) * -1.65) 0 0 calc(var(--cw) * -1.65); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--cc) 30%, transparent) 0 40%, transparent 70%); transition: background .5s; }
.cf-ring::before { content: ''; position: absolute; inset: 8%; border-radius: 50%; border: 4px dashed color-mix(in srgb, var(--cc) 70%, #fff); opacity: .6; animation: spin 14s linear infinite; }
.cf-ring::after { content: ''; position: absolute; inset: 8%; border-radius: 50%; border: 10px solid transparent; border-top-color: var(--cc); opacity: .55; animation: spin 3s linear infinite; }
.cf-ring.ccw::before, .cf-ring.ccw::after { animation-direction: reverse; }
.cf-deck { position: relative; border: 0; background: none; padding: 0; width: var(--cw); aspect-ratio: 2 / 3; cursor: default; }
.cf-deck .cf-card { position: absolute; inset: 0; transform: translate(calc(var(--j) * -3px), calc(var(--j) * -3px)); }
.cf-deck.can { cursor: pointer; }
.cf-deck.can:hover .cf-card:last-of-type, .cf-deck.can:focus-visible .cf-card:last-of-type { transform: translate(-8px, -14px) rotate(-4deg); }
.cf-deck.hint .cf-card:last-of-type { animation: deckHint 1.1s ease-in-out infinite; }
@keyframes deckHint { 50% { transform: translate(-6px, -16px) rotate(-5deg); box-shadow: 0 0 0 4px #FFC531, 0 12px 24px rgba(0, 0, 0, .3); } }
.cf-deck:disabled { opacity: 1; }
.cf-deck-lbl { position: absolute; left: 50%; bottom: -30px; transform: translateX(-50%); background: var(--ink); color: #fff; font: 700 .9rem var(--font-d); padding: 3px 12px; border-radius: 12px; white-space: nowrap; }
.cf-pile { position: relative; width: var(--cw); aspect-ratio: 2 / 3; }
.cf-pc { position: absolute; inset: 0; transform: rotate(var(--rot)); }
.cf-pc .cf-card { box-shadow: 0 2px 6px rgba(20, 30, 50, .25); }
.cf-pc.top .cf-card { box-shadow: 0 0 0 4px var(--cc, #fff), 0 12px 30px rgba(20, 30, 50, .35); }
.cf-pc.top { animation: slam .32s var(--spring) .38s both; }
@keyframes slam { from { transform: rotate(var(--rot)) scale(1.35); opacity: 0; } 60% { opacity: 1; } }
.cf-color { position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%); white-space: nowrap; z-index: 2; display: inline-flex; align-items: center; gap: 6px; background: #fff; padding: 3px 12px 3px 4px; border-radius: 14px; font: 700 .9rem var(--font-d); box-shadow: var(--shadow); }
.cf-color i { width: 18px; height: 18px; border-radius: 50%; background: var(--cc); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); transition: background .4s; }
.cf-fly { position: fixed !important; z-index: 80; pointer-events: none; margin: 0; }

/* Main du joueur */
.cf-tools { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.cf-status { font: 600 1.15rem var(--font-d); color: var(--ink2); }
.cf-status.mine { color: #F0466A; }
.cf-folle-btn { background: #FFC531; color: #1E2533; box-shadow: 0 6px 0 #B07A00; font: 700 1.3rem var(--font-d); }
.cf-folle-btn.ready { animation: folleReady 1s ease-in-out infinite; }
@keyframes folleReady { 50% { transform: scale(1.08) rotate(-2deg); } }
.cf-hand { --gap: max(-62px, min(4px, calc((min(100cqw - 60px, 980px) - var(--n) * var(--cw)) / max(1, var(--n) - 1))));
  display: flex; justify-content: safe center; align-items: flex-end; padding: 34px 26px 14px; overflow-x: auto; overflow-y: visible; min-height: calc(var(--cw) * 1.5 + 50px); scrollbar-width: thin; }
.cf-hc { position: relative; flex-shrink: 0; border: 0; padding: 0; background: none; cursor: pointer; border-radius: calc(var(--cw) * .14); margin-left: var(--gap);
  transform-origin: 50% 160%; transform: rotate(calc((var(--i) - (var(--n) - 1) / 2) * min(3.5deg, 36deg / var(--n))));
  transition: translate .22s var(--spring), filter .2s; animation: dealIn .45s var(--spring) backwards; animation-delay: calc(var(--i) * 45ms); }
.cf-hc:first-child { margin-left: 0; }
@keyframes dealIn { from { translate: 0 120px; opacity: 0; } }
.cf-hand.my-turn .cf-hc:not(.ok) { filter: saturate(.35) brightness(.88); }
.cf-hc.ok { translate: 0 -12px; }
.cf-hc.ok .cf-card { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #FFC531, 0 10px 20px rgba(20, 30, 50, .3); }
.cf-hc.ok:hover, .cf-hc.ok:focus-visible { translate: 0 -30px; z-index: 5; }
.cf-hc:focus-visible { outline: none; }
.cf-hc.drawn { translate: 0 -30px; }
.cf-hc.drawn::after { content: 'Piochée'; position: absolute; top: -26px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font: 700 .75rem var(--font-d); padding: 2px 8px; border-radius: 8px; white-space: nowrap; }

/* Choix de couleur */
.cf-picker { position: fixed; inset: 0; z-index: 70; background: rgba(30, 37, 51, .45); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .2s both; }
.cf-picker-box { border-radius: var(--r-xl); padding: 24px; display: flex; flex-direction: column; gap: 16px; align-items: center; background: #fff; width: min(420px, 100%); }
.cf-picker-box > b { font: 700 1.6rem var(--font-d); }
.cf-picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.cf-pick { border: 0; cursor: pointer; min-height: 90px; border-radius: 24px; background: var(--cc); color: #fff; font: 700 1.5rem var(--font-d); box-shadow: 0 6px 0 var(--cd); text-shadow: 0 2px 0 var(--cd);
  animation: popIn .35s var(--spring) both; animation-delay: calc(var(--i) * 50ms); transition: transform .15s; }
.cf-pick:hover, .cf-pick:focus-visible { transform: translateY(-3px) scale(1.03); }

/* Fin de manche, fil d'actualité, règles */
.cf-round { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.cf-round-win { border-radius: var(--r-xl); padding: 20px 34px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cf-plus { font: 700 2rem var(--font-d); color: #F0466A; animation: scoreUp .6s var(--spring) .4s both; }
.cf-reveal { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 900px; }
.cf-rev-row { display: flex; align-items: center; gap: 10px; border-radius: 22px; padding: 8px 14px 8px 8px; animation: popIn .4s var(--spring) both; animation-delay: calc(.5s + var(--i) * 120ms); }
.cf-rev-name { font: 600 1.05rem var(--font-d); min-width: 80px; }
.cf-rev-cards { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.cf-rev-pts { font: 700 1.1rem var(--font-d); }
.cf-mini { --cw: 34px; display: inline-block; }
.cf-mini .cf-card { box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.cf-totals { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.cf-feed { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cf-feed-line { background: rgba(255, 255, 255, .85); border-radius: 14px; padding: 4px 14px; font-size: 1.05rem; animation: popIn .4s var(--spring) both; }
.cf-feed-line:not(:last-child) { opacity: .6; font-size: .92rem; }
.cf-rules { max-width: 620px; text-align: left; max-height: calc(100dvh - 40px); overflow-y: auto; }
.cf-rules h2 { text-align: center; }
.cf-rule-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-weight: 600; line-height: 1.35; }
.cf-rule-list { display: flex; flex-direction: column; gap: 8px; }
.cf-rule { display: flex; gap: 12px; align-items: center; background: #F4F7F5; border-radius: 16px; padding: 8px 12px 8px 8px; }
.cf-rule .cf-mini { --cw: 44px; }
.cf-rule b { font: 700 1.1rem var(--font-d); display: block; }
.cf-rule span { font-weight: 600; }

/* TV et manette */
.game-wrap.tv .cf { --cw: 150px; }
.game-wrap.tv .cf-seat-txt b { font-size: 1.4rem; }
.game-wrap.tv .cf-deck, .game-wrap.tv .cf-seat { pointer-events: none; }
.game-wrap.tv .cf-feed-line { font-size: 1.4rem; }
.game-wrap.pad .cf { --cw: 80px; }
.game-wrap.pad .cf-seats { display: none; }
.game-wrap.pad .cf-table { min-height: 0; padding: 14px 10px 28px; }
@media (max-width: 820px) {
  .cf { --cw: 72px; gap: 10px; }
  .cf-seats { gap: 6px; }
  .cf-seat { padding: 4px 10px 4px 4px; gap: 6px; }
  .cf-seat .avatar { width: 36px !important; height: 36px !important; }
  .cf-seat-txt b { font-size: .9rem; }
  .cf-backs i { width: 11px; height: 16px; margin-left: -6px; }
  .cf-table { padding: 18px 6px 30px; gap: 34px; }
  .cf-hand { --gap: max(-52px, min(2px, calc((100cqw - 52px - var(--n) * var(--cw)) / max(1, var(--n) - 1)))); padding: 30px 14px 10px; }
  .game-wrap.pad .cf { --cw: 74px; }
  .cf-status { font-size: 1rem; text-align: center; }
}

/* lisibilité de nuit */
body.wolf-night .glass { background: rgba(255, 255, 255, .93); }
.wolf .pill { color: var(--ink); }
.wolf .pill.dark { color: #fff; }
.wolf .pill.ok { color: #fff; }
@media (max-width: 820px) {
  #bg::after { width: 90px; height: 90px; top: 3%; right: 6%; }
  .wf-rules-btn span, .cf-rules-btn span { display: none; }
  .wf-village { left: 8%; width: 60%; bottom: 40px; }
}

/* Joueur sur calculatrice NumWorks */
.calc-badge { display: inline-block; font: 700 .68rem var(--font); letter-spacing: .04em; text-transform: uppercase; background: #FFE27A; color: #6B4E00; padding: 1px 6px; border-radius: 6px; margin-top: 2px; }
