:root {
  --bg: #07100b;
  --bg2: #0f1a13;
  --panel: rgba(12, 22, 16, 0.78);
  --panel-solid: #0e1912;
  --line: rgba(160, 200, 150, 0.14);
  --line2: rgba(160, 200, 150, 0.28);
  --text: #e6eedd;
  --muted: #8fa391;
  --moss: #9ccc65;
  --moss-d: #4f7a2a;
  --ember: #ffa04d;
  --blood: #ff4d5a;
  --monster: #ff4d5a;
  --cyan: #5ff2d6;
  --lcd: #b8f27a;
  --lcd-bg: #15240f;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: Rajdhani, system-ui, sans-serif; font-size: 17px; overscroll-behavior: none; }
body { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: var(--text); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }

/* ======================= DÉCOR ======================= */
#bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; transition: opacity 1s; }
body.in-game #bg { opacity: 0; }
.sky { position: absolute; inset: 0; background: radial-gradient(ellipse 120% 70% at 70% 10%, #1b3a2c 0%, #0c1d15 40%, #050b08 100%); }
.moon { position: absolute; top: 9%; right: 14%; width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fbfbe6, #d9dcc0 60%, #b8bd9c);
  box-shadow: 0 0 60px 20px rgba(230, 240, 200, .18), 0 0 140px 60px rgba(150, 200, 160, .08); animation: moon 8s ease-in-out infinite alternate; }
@keyframes moon { to { transform: translateY(6px); box-shadow: 0 0 70px 26px rgba(230,240,200,.22), 0 0 160px 70px rgba(150,200,160,.1); } }
.layer { position: absolute; left: -5%; width: 110%; bottom: 0; transform-origin: bottom center; }
.l3 { height: 52%; fill: #0f2419; opacity: .9; animation: sway 14s ease-in-out infinite alternate; }
.l2 { height: 44%; fill: #0a1a11; animation: sway 11s ease-in-out infinite alternate-reverse; }
.l1 { height: 34%; fill: #040a06; animation: sway 9s ease-in-out infinite alternate; }
@keyframes sway { from { transform: translateX(-1.2%) skewX(-.6deg); } to { transform: translateX(1.2%) skewX(.6deg); } }
.fog { position: absolute; left: -50%; width: 200%; pointer-events: none; }
.f1 { bottom: 18%; height: 30%; background: radial-gradient(ellipse 30% 50% at 30% 60%, rgba(170,210,180,.10), transparent 70%), radial-gradient(ellipse 25% 40% at 70% 50%, rgba(170,210,180,.08), transparent 70%); animation: drift 40s linear infinite; }
.f2 { bottom: -4%; height: 26%; background: radial-gradient(ellipse 35% 55% at 20% 70%, rgba(170,210,180,.13), transparent 70%), radial-gradient(ellipse 30% 50% at 65% 60%, rgba(170,210,180,.10), transparent 70%); animation: drift 28s linear infinite reverse; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(25%); } }
#fireflies { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ======================= ÉCRANS & TRANSITIONS ======================= */
.screen { position: fixed; inset: 0; z-index: 1; display: none; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.screen.active { display: block; }
.screen.enter { animation: screenIn .55s var(--ease) both; }
.screen.leave { display: block; pointer-events: none; animation: screenOut .38s ease-in both; }
.screen.enter.back { animation-name: screenInBack; }
.screen.leave.back { animation-name: screenOutBack; }
@keyframes screenIn { from { opacity: 0; transform: translateX(40px) scale(.98); filter: blur(6px); } }
@keyframes screenOut { to { opacity: 0; transform: translateX(-40px) scale(.98); filter: blur(6px); } }
@keyframes screenInBack { from { opacity: 0; transform: translateX(-40px) scale(.98); filter: blur(6px); } }
@keyframes screenOutBack { to { opacity: 0; transform: translateX(40px) scale(.98); filter: blur(6px); } }
.screen.enter .reveal { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 120ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
#game.enter { animation: gameIn .9s ease both; }
@keyframes gameIn { from { opacity: 0; filter: brightness(3) blur(10px); } }

.page { position: relative; max-width: 480px; margin: 0 auto; padding: calc(22px + var(--safe-t)) 16px calc(40px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; }
.page.with-radio { padding-bottom: calc(210px + var(--safe-b)); }

/* ======================= SPLASH ======================= */
#splash { display: none; align-items: center; justify-content: center; }
#splash.active { display: flex; }
.splash-inner { text-align: center; }
.emblem { width: 130px; height: 130px; }
.emblem .ring { fill: none; stroke: var(--moss); stroke-width: 1.5; stroke-dasharray: 360; stroke-dashoffset: 360; animation: draw 1.6s var(--ease) forwards; opacity: .7; }
.emblem .trees { fill: var(--moss); opacity: 0; animation: fadeUp .9s .5s var(--ease) forwards; filter: drop-shadow(0 0 12px rgba(156,204,101,.5)); }
.emblem .m { fill: #f3f3dc; opacity: 0; animation: fadeUp .8s 1s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.title { font-family: Cinzel, serif; font-weight: 800; font-size: 46px; letter-spacing: 10px; margin: 14px 0 4px; text-shadow: 0 0 30px rgba(156,204,101,.35); }
.title span { display: inline-block; opacity: 0; animation: letter .7s var(--ease) forwards; }
.title span:nth-child(1) { animation-delay: .9s; } .title span:nth-child(2) { animation-delay: .97s; } .title span:nth-child(3) { animation-delay: 1.04s; }
.title span:nth-child(4) { animation-delay: 1.11s; } .title span:nth-child(5) { animation-delay: 1.18s; } .title span:nth-child(6) { animation-delay: 1.25s; } .title span:nth-child(7) { animation-delay: 1.32s; }
@keyframes letter { from { opacity: 0; transform: translateY(20px) scale(.8); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.subtitle { color: var(--muted); letter-spacing: 6px; text-transform: uppercase; font-size: 13px; opacity: 0; animation: fadeUp 1s 1.6s ease forwards; }

/* ======================= COMPOSANTS ======================= */
.brand { text-align: center; font-family: Cinzel, serif; font-weight: 800; font-size: 34px; letter-spacing: 8px; margin: 10px 0 4px; text-shadow: 0 0 24px rgba(156,204,101,.35); }
.page-head h2, .topbar h2, .end-hero h2 { font-family: Cinzel, serif; margin: 0; letter-spacing: 2px; }
.page-head { text-align: center; margin-top: 24px; }
.page-head p { margin: 6px 0 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.label { margin: 0 0 8px; color: var(--muted); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.section { margin: 8px 0 -4px; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.hint { margin: 0; color: var(--muted); font-size: 15px; text-align: center; }
.err { color: var(--blood); text-align: center; min-height: 1.2em; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field span { color: var(--muted); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.field input, .join-row input { background: rgba(0,0,0,.35); border: 1px solid var(--line2); border-radius: 14px; padding: 14px; width: 100%; outline: none; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .join-row input:focus { border-color: var(--moss); box-shadow: 0 0 0 4px rgba(156,204,101,.15); }
.join-row { display: flex; gap: 10px; }
.join-row input { text-transform: uppercase; letter-spacing: 3px; text-align: center; font-family: "Share Tech Mono", monospace; font-size: 18px; min-width: 0; }

.btn { position: relative; overflow: hidden; border: 1px solid var(--line2); background: var(--panel); backdrop-filter: blur(10px); border-radius: 16px; padding: 14px 18px; font-weight: 700; font-size: 17px; letter-spacing: 1px; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform .15s var(--ease), box-shadow .2s, background .2s, opacity .2s; }
.btn:active { transform: scale(.96); }
.btn.big { padding: 18px; font-size: 19px; }
.btn.small { padding: 8px 14px; font-size: 14px; border-radius: 12px; }
.btn.primary { background: linear-gradient(180deg, #a5d66b, #5f8f30); border-color: #b9e57f; color: #08130b; box-shadow: 0 8px 30px rgba(156,204,101,.3), inset 0 1px 0 rgba(255,255,255,.4); }
.btn.primary::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); animation: shine 3.5s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 140%; } }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); backdrop-filter: none; }
.btn.danger { background: linear-gradient(180deg, #ff5d68, #a3121e); border-color: #ff8a92; color: #fff; box-shadow: 0 8px 26px rgba(255,77,90,.35); }
.btn.purple { background: linear-gradient(180deg, #9a72f0, #4f2e9b); border-color: #c0a3ff; color: #fff; }
.btn.cyan { background: linear-gradient(180deg, #6ff5dc, #1f9c86); border-color: #a5fff0; color: #04211b; box-shadow: 0 8px 26px rgba(95,242,214,.3); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn .ico { font-size: 22px; }
.badge { background: var(--blood); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 13px; min-width: 22px; animation: pop .4s var(--ease); }
.pill { font-style: normal; font-size: 12px; color: var(--moss); letter-spacing: 1px; }
@keyframes pop { from { transform: scale(0); } }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line2); background: var(--panel); backdrop-filter: blur(10px); font-size: 18px; display: inline-flex; align-items: center; justify-content: center; transition: transform .15s; flex: none; }
.icon-btn:active { transform: scale(.9); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.topbar h2 { font-size: 24px; }
.topbar > span { width: 44px; }

.toggle { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 15px; cursor: pointer; }
.toggle input { display: none; }
.switch { position: relative; width: 46px; height: 26px; flex: none; border-radius: 13px; background: rgba(0,0,0,.4); border: 1px solid var(--line2); transition: background .25s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .25s var(--ease), background .25s; }
.toggle input:checked + .switch { background: rgba(156,204,101,.3); }
.toggle input:checked + .switch::after { transform: translateX(20px); background: var(--moss); }
.toggle small { display: block; font-size: 13px; opacity: .8; }

/* profil */
.profile { display: flex; align-items: center; gap: 14px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; background: radial-gradient(circle at 30% 30%, #2a4430, #0d1a12); border: 2px solid var(--line2); flex: none; position: relative; }
.avatar.xl { width: 64px; height: 64px; font-size: 36px; border-color: var(--moss-d); box-shadow: 0 0 24px rgba(156,204,101,.25); animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 34px rgba(156,204,101,.4); } }
.avatar .dot { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--panel-solid); background: #555; }
.dot.online { background: var(--moss); } .dot.lobby { background: var(--ember); } .dot.game { background: var(--blood); }
.pname { font-size: 22px; font-weight: 700; }
.tag { border: 1px dashed var(--line2); background: rgba(0,0,0,.25); color: var(--lcd); border-radius: 10px; padding: 4px 10px; font-family: "Share Tech Mono", monospace; font-size: 14px; }
.tag.big { width: 100%; font-size: 22px; padding: 10px; letter-spacing: 2px; }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatars button { aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.3); font-size: 26px; transition: transform .2s var(--ease), border-color .2s, background .2s; }
.avatars button.sel { border-color: var(--moss); background: rgba(156,204,101,.18); transform: scale(1.08); box-shadow: 0 0 16px rgba(156,204,101,.35); }

/* listes */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list li { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; backdrop-filter: blur(10px); animation: rise .45s var(--ease) both; }
.list li .who { flex: 1; min-width: 0; }
.list li .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list li .who small { color: var(--muted); }
.list li .acts { display: flex; gap: 6px; }
.st-online { color: var(--moss); } .st-lobby { color: var(--ember); } .st-game { color: var(--blood); } .st-offline { color: var(--muted); }

/* lobby */
.code-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 10px 16px; backdrop-filter: blur(10px); }
.code { font-family: "Share Tech Mono", monospace; font-size: 40px; letter-spacing: 10px; color: var(--lcd); text-shadow: 0 0 18px rgba(184,242,122,.45); }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; border-radius: 20px; border: 2px solid var(--line); background: var(--panel); backdrop-filter: blur(10px); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.role-card .r-ico { font-size: 40px; transition: transform .4s var(--ease); }
.role-card b { font-size: 19px; letter-spacing: 1px; text-transform: uppercase; }
.role-card small { color: var(--muted); font-size: 13px; line-height: 1.2; text-align: center; }
.role-card::before { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .4s; }
.role-card.surv::before { background: radial-gradient(circle at 50% 0%, rgba(95,242,214,.28), transparent 70%); }
.role-card.mons::before { background: radial-gradient(circle at 50% 0%, rgba(255,77,90,.32), transparent 70%); }
.role-card.sel { transform: translateY(-3px); }
.role-card.sel::before { opacity: 1; }
.role-card.sel .r-ico { transform: scale(1.18) rotate(-6deg); }
.role-card.surv.sel { border-color: var(--cyan); box-shadow: 0 10px 30px rgba(95,242,214,.25); }
.role-card.mons.sel { border-color: var(--monster); box-shadow: 0 10px 30px rgba(255,77,90,.3); animation: growl 2.4s ease-in-out infinite; }
@keyframes growl { 50% { box-shadow: 0 10px 40px rgba(255,77,90,.5); } }
.rbadge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: 1px; text-transform: uppercase; }
.rbadge.survivant { background: rgba(95,242,214,.15); color: var(--cyan); }
.rbadge.monstre { background: rgba(255,77,90,.18); color: #ff8a92; }
.ready-ok { color: var(--moss); font-size: 18px; }
.host-crown { color: var(--ember); font-size: 13px; margin-left: 4px; }
.map-card { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--line2); background: #050a07; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
#lobby-map { height: 300px; }
.tools { display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: rgba(8,14,10,.9); border-top: 1px solid var(--line); }
.tool { flex: none; border: 1px solid var(--line2); background: rgba(255,255,255,.04); border-radius: 12px; padding: 8px 12px; font-weight: 700; font-size: 14px; transition: background .2s, border-color .2s, transform .15s; }
.tool:active { transform: scale(.94); }
.tool.active { background: rgba(156,204,101,.2); border-color: var(--moss); color: #dff5c4; }
.map-card .hint { padding: 0 10px 10px; background: rgba(8,14,10,.9); font-size: 14px; }
.range { display: block; font-size: 15px; margin-bottom: 10px; }
.range output { color: var(--lcd); font-family: "Share Tech Mono", monospace; }
.range input { display: block; width: 100%; margin-top: 6px; accent-color: var(--moss); }

/* fin */
.end-hero { text-align: center; margin-top: 30px; }
.end-emoji { font-size: 84px; animation: trophy 1.2s var(--ease) both; filter: drop-shadow(0 0 30px rgba(255,200,100,.4)); }
@keyframes trophy { from { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.2) rotate(8deg); } }
.end-hero h2 { font-size: 44px; letter-spacing: 6px; margin-top: 6px; }
.end-hero h2.win { color: var(--lcd); text-shadow: 0 0 30px rgba(184,242,122,.5); }
.end-hero h2.lose { color: var(--blood); text-shadow: 0 0 30px rgba(255,77,90,.5); }
.stat-row { font-size: 13px; color: var(--muted); }

/* ======================= JEU ======================= */
#game { overflow: hidden; }
#map { position: absolute; inset: 0; background: #050a07; }
.leaflet-container { background: #050a07; font-family: Rajdhani, sans-serif; }
.leaflet-control-attribution { background: rgba(0,0,0,.5) !important; color: #667 !important; font-size: 9px; }
.leaflet-control-attribution a { color: #889 !important; }
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.55) contrast(1.05) saturate(.35) sepia(.4) hue-rotate(60deg); }
#vignette { position: absolute; inset: 0; pointer-events: none; z-index: 400; background: radial-gradient(ellipse at center, transparent 35%, rgba(0,4,2,.8) 100%); }
#danger-flash { position: absolute; inset: 0; pointer-events: none; z-index: 401; transition: box-shadow .3s; }
#game.hb2 #danger-flash { box-shadow: inset 0 0 70px 14px rgba(255,77,90,.35); }
#game.hb3 #danger-flash { animation: dflash .55s infinite; }
@keyframes dflash { 50% { box-shadow: inset 0 0 130px 34px rgba(255,77,90,.6); } }
#game.flair #vignette { background: radial-gradient(ellipse at center, rgba(255,40,60,.05) 30%, rgba(80,0,10,.75) 100%); }

#hud { position: absolute; top: 0; left: 0; right: 0; z-index: 500; padding: calc(10px + var(--safe-t)) 12px 0; pointer-events: none; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.hud-row { display: flex; gap: 8px; width: 100%; justify-content: space-between; }
.chip { pointer-events: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 999px; padding: 7px 14px; display: flex; gap: 8px; align-items: center; font-weight: 700; backdrop-filter: blur(10px); white-space: nowrap; }
#phase-timer { font-family: "Share Tech Mono", monospace; color: var(--lcd); }
.chip.role.survivant { color: var(--cyan); border-color: rgba(95,242,214,.5); }
.chip.role.monstre { color: #ff8a92; border-color: rgba(255,77,90,.6); }
.carry { background: rgba(10,40,34,.9); border: 1px solid var(--cyan); color: #c8fff4; border-radius: 12px; padding: 6px 14px; font-weight: 700; font-size: 15px; animation: carryGlow 1.6s ease-in-out infinite; }
@keyframes carryGlow { 50% { box-shadow: 0 0 20px rgba(95,242,214,.5); } }
.heart { display: none; align-items: center; gap: 8px; background: var(--panel); border: 1px solid rgba(255,77,90,.5); border-radius: 999px; padding: 4px 14px; color: var(--blood); font-weight: 700; }
.heart span { display: inline-block; font-size: 20px; }
#game.hb1 .heart, #game.hb2 .heart, #game.hb3 .heart { display: flex; }
#game.hb1 .heart span { animation: beat 1.2s infinite; } #game.hb2 .heart span { animation: beat .7s infinite; } #game.hb3 .heart span { animation: beat .38s infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.4); } 30% { transform: scale(1); } 45% { transform: scale(1.25); } }
.banner { text-align: center; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 6px 14px; font-weight: 700; display: none; max-width: 94%; backdrop-filter: blur(10px); }
.banner.show { display: block; animation: rise .35s var(--ease); }
.banner.red { border-color: var(--blood); color: #ffb3b8; } .banner.gold { border-color: var(--ember); color: #ffd7b0; } .banner.cyan { border-color: var(--cyan); color: #c8fff4; }

.fab { position: absolute; right: 12px; z-index: 500; width: 48px; height: 48px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line2); font-size: 20px; backdrop-filter: blur(10px); }
#btn-center { bottom: calc(238px + var(--safe-b)); }
#btn-roster { bottom: calc(294px + var(--safe-b)); }
#actions { position: absolute; left: 12px; right: 72px; bottom: calc(232px + var(--safe-b)); z-index: 500; display: flex; flex-wrap: wrap-reverse; gap: 8px; }
#actions .btn { padding: 12px 16px; font-size: 16px; border-radius: 14px; animation: rise .3s var(--ease); }

.progress { position: absolute; left: 50%; top: 42%; transform: translate(-50%,-50%); z-index: 700; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ring { position: relative; width: 150px; height: 150px; filter: drop-shadow(0 0 20px rgba(95,242,214,.35)); }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: rgba(6,14,10,.88); stroke: rgba(255,255,255,.08); stroke-width: 7; }
.ring #ring-fg { fill: none; stroke: var(--cyan); stroke-linecap: round; stroke-dasharray: 276.5; stroke-dashoffset: 276.5; }
.ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 700; padding: 22px; }

.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 800; background: rgba(8,16,11,.95); border-top: 1px solid var(--line2); border-radius: 22px 22px 0 0; max-height: 70%; overflow-y: auto; transform: translateY(105%); transition: transform .4s var(--ease); padding: 8px 16px calc(20px + var(--safe-b)); backdrop-filter: blur(14px); }
.sheet.open { transform: none; }
.grab { width: 44px; height: 5px; background: var(--line2); border-radius: 3px; margin: 4px auto 12px; cursor: pointer; }

/* marqueurs */
.mk { position: relative; display: flex; align-items: center; justify-content: center; border-radius: 50%; line-height: 1; }
.mk-label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; white-space: nowrap; text-shadow: 0 1px 3px #000, 0 0 6px #000; margin-top: 3px; color: #dfe9d6; }
.mk-me { background: var(--cyan); border: 3px solid #fff; box-shadow: 0 0 0 7px rgba(95,242,214,.2), 0 0 18px rgba(95,242,214,.9); }
.mk-me.monstre { background: var(--monster); box-shadow: 0 0 0 7px rgba(255,77,90,.2), 0 0 18px rgba(255,77,90,.9); }
.mk-me::after { content: ''; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid currentColor; color: rgba(95,242,214,.5); animation: ping 2s ease-out infinite; }
.mk-me.monstre::after { color: rgba(255,77,90,.5); }
@keyframes ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.mk-pl { font-size: 18px; background: rgba(6,16,12,.92); border: 2px solid var(--cyan); box-shadow: 0 0 12px rgba(95,242,214,.4); }
.mk-pl.monstre { border-color: var(--monster); box-shadow: 0 0 18px rgba(255,77,90,.8); animation: throb 1.2s infinite; }
.mk-pl.down { border-color: var(--blood); animation: throb .7s infinite; filter: saturate(.4); }
.mk-pl.out { opacity: .35; filter: grayscale(1); }
.mk-pl .carry-b { position: absolute; top: -8px; right: -10px; font-size: 13px; background: #062a24; border: 1px solid var(--cyan); border-radius: 8px; padding: 1px 2px; }
@keyframes throb { 50% { transform: scale(1.14); } }
.mk-beacon { font-size: 20px; background: radial-gradient(circle, rgba(95,242,214,.45), rgba(4,20,16,.9) 70%); border: 2px solid var(--cyan); box-shadow: 0 0 22px rgba(95,242,214,.7); animation: float 2.4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-4px); box-shadow: 0 0 32px rgba(95,242,214,.9); } }
.mk-site { font-size: 22px; background: radial-gradient(circle, rgba(255,160,77,.35), rgba(30,14,4,.92) 70%); border: 2px dashed var(--ember); box-shadow: 0 0 18px rgba(255,160,77,.5); }
.mk-site::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(255,160,77,.5); animation: ping 2.4s ease-out infinite; }
.mk-site.on { border: 2px solid var(--lcd); background: radial-gradient(circle, rgba(184,242,122,.6), rgba(10,30,6,.92) 70%); box-shadow: 0 0 30px rgba(184,242,122,.9); }
.mk-site.on::after { border-color: rgba(184,242,122,.6); }

/* ======================= TALKIE-WALKIE ======================= */
.radio { position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); z-index: 900; max-width: 480px; margin: 0 auto; transition: transform .5s var(--ease), opacity .4s; }
.radio.hidden { display: block !important; transform: translateY(130%); opacity: 0; pointer-events: none; }
.antenna { position: absolute; right: 40px; top: -40px; width: 12px; height: 48px; border-radius: 6px 6px 2px 2px; background: linear-gradient(90deg, #161a17, #3a443c, #161a17); }
.antenna::after { content: ''; position: absolute; left: 3px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: #333; transition: background .2s, box-shadow .2s; }
.radio.tx .antenna::after { background: var(--blood); box-shadow: 0 0 12px var(--blood); }
.radio.rx .antenna::after { background: var(--lcd); box-shadow: 0 0 12px var(--lcd); }
.radio-body { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px; border-radius: 24px;
  background: linear-gradient(160deg, #2d362f 0%, #171d19 55%, #0e120f 100%); border: 1px solid #3a463d;
  box-shadow: 0 16px 50px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.1), inset 0 -3px 0 rgba(0,0,0,.4); }
.radio-body::before { content: ''; position: absolute; inset: 6px; border-radius: 19px; border: 1px dashed rgba(255,255,255,.05); pointer-events: none; }
.lcd { position: relative; overflow: hidden; background: var(--lcd-bg); border-radius: 12px; padding: 8px 12px; font-family: "Share Tech Mono", monospace; color: var(--lcd); text-shadow: 0 0 6px rgba(184,242,122,.6); box-shadow: inset 0 2px 10px rgba(0,0,0,.75); border: 1px solid #08120a; min-height: 86px; }
.lcd::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.2) 0 1px, transparent 1px 3px); pointer-events: none; }
.lcd-top { display: flex; justify-content: space-between; font-size: 13px; opacity: .85; }
.lcd-main { font-size: 22px; letter-spacing: 2px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcd-sub { font-size: 12px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq { position: absolute; right: 10px; bottom: 8px; display: flex; gap: 2px; align-items: flex-end; height: 18px; opacity: 0; transition: opacity .2s; }
.eq i { width: 3px; background: currentColor; height: 4px; }
.radio.tx .eq, .radio.rx .eq { opacity: .9; }
.radio.tx .eq i, .radio.rx .eq i { animation: eq .5s ease-in-out infinite alternate; }
.eq i:nth-child(3n) { animation-delay: -.2s !important; } .eq i:nth-child(3n+1) { animation-delay: -.35s !important; } .eq i:nth-child(4n) { animation-duration: .35s !important; }
@keyframes eq { from { height: 3px; } to { height: 18px; } }
.sig { display: inline-flex; gap: 2px; align-items: flex-end; }
.sig i { width: 4px; background: currentColor; opacity: .25; }
.sig i:nth-child(1) { height: 4px; } .sig i:nth-child(2) { height: 7px; } .sig i:nth-child(3) { height: 10px; } .sig i:nth-child(4) { height: 13px; }
.sig.s1 i:nth-child(-n+1), .sig.s2 i:nth-child(-n+2), .sig.s3 i:nth-child(-n+3), .sig.s4 i:nth-child(-n+4) { opacity: 1; }
.radio.jam .lcd { animation: jam .15s steps(2) infinite; }
@keyframes jam { 50% { filter: contrast(1.6) brightness(1.3); transform: translateX(1px); } }
.radio.monstres .lcd { color: #ff9aa1; background: #2a0d10; text-shadow: 0 0 6px rgba(255,120,130,.6); }
.radio.esprits .lcd { color: #9fd9ff; background: #0f1d28; text-shadow: 0 0 6px rgba(159,217,255,.6); }
.radio.survivants .lcd { color: #8ff5e0; background: #0a2420; text-shadow: 0 0 6px rgba(95,242,214,.6); }
.radio-side { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 66px; }
.led { width: 14px; height: 14px; border-radius: 50%; background: #2a2f2b; box-shadow: inset 0 1px 2px rgba(0,0,0,.8); transition: background .15s, box-shadow .15s; }
.radio.tx .led { background: var(--blood); box-shadow: 0 0 12px var(--blood); }
.radio.rx .led { background: var(--lcd); box-shadow: 0 0 12px var(--lcd); }
.grille { width: 60px; flex: 1; min-height: 52px; border-radius: 12px; background: radial-gradient(circle, #070907 1.6px, transparent 2px) 0 0 / 8px 8px, #1d231f; box-shadow: inset 0 2px 5px rgba(0,0,0,.6); }
.radio.rx .grille { animation: speaker .12s infinite alternate; }
@keyframes speaker { to { transform: scale(1.03); } }
.ptt { grid-column: 1 / -1; height: 64px; border-radius: 18px; border: none; user-select: none; -webkit-user-select: none; touch-action: none;
  background: linear-gradient(180deg, #4d5650 0%, #2a312c 100%); box-shadow: 0 5px 0 #0b0e0c, inset 0 1px 0 rgba(255,255,255,.15); color: #d5ded1; font-weight: 700; letter-spacing: 2px; font-size: 15px; transition: transform .06s, box-shadow .06s, background .2s; }
.ptt span { pointer-events: none; }
.radio.tx .ptt { transform: translateY(4px); box-shadow: 0 1px 0 #0b0e0c, inset 0 2px 10px rgba(0,0,0,.6); background: linear-gradient(180deg, #a12a33, #5e1218); color: #fff; }

/* ======================= MODALE & TOASTS ======================= */
.modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: 100%; max-width: 380px; background: linear-gradient(180deg, #13241a, #0a140e); border: 1px solid var(--line2); border-radius: 24px; padding: 22px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: modalIn .45s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(30px) scale(.94); } }
.modal-card h3 { font-family: Cinzel, serif; margin: 6px 0; font-size: 22px; }
.modal-card p { color: #c5d2c0; line-height: 1.4; }
.modal-card .row { display: flex; gap: 10px; margin-top: 14px; }
.modal-card .row .btn { flex: 1; }
.modal-card .avatar { width: 80px; height: 80px; font-size: 44px; margin: 0 auto; }
.rules-list { text-align: left; padding-left: 4px; list-style: none; }
.rules-list li { margin-bottom: 10px; color: #c5d2c0; line-height: 1.35; font-size: 15px; }
#toasts { position: fixed; top: calc(12px + var(--safe-t)); left: 12px; right: 12px; z-index: 2100; display: flex; flex-direction: column; gap: 6px; pointer-events: none; align-items: center; }
body.in-game #toasts { top: calc(118px + var(--safe-t)); }
.toast { background: rgba(10,20,14,.94); border: 1px solid var(--line2); border-left: 4px solid var(--moss); padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 15px; max-width: 100%; box-shadow: 0 8px 24px rgba(0,0,0,.5); animation: toastIn .45s var(--ease); backdrop-filter: blur(10px); }
.toast.out { animation: toastOut .35s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.95); } }
.toast.danger, .toast.err { border-left-color: var(--blood); }
.toast.good { border-left-color: var(--lcd); }
.toast.phase { border-left-color: var(--ember); font-size: 16px; }
.toast.pulse { border-left-color: var(--monster); }
.toast.friend, .toast.join { border-left-color: var(--cyan); }

@media (min-height: 780px) { #lobby-map { height: 340px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ======================= iOS : fluidité & ergonomie ======================= */
html { -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Rajdhani, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.btn, .tool, .chip, .tag, .section, .label, .lcd, .ptt, .rbadge, .code, #phase-timer { font-family: Rajdhani, -apple-system, system-ui, sans-serif; }
button, a, .btn, .tool, .role-card, .avatars button { touch-action: manipulation; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.btn, .icon-btn, .tool, .fab { min-height: 44px; } /* zone tactile minimale Apple : 44 pt */
.btn.small { min-height: 36px; }
input, select, textarea { font-size: 17px !important; } /* ≥ 16 px : pas de zoom auto sur iOS */
.screen { overscroll-behavior: contain; scroll-behavior: smooth; }
:root { --ios: cubic-bezier(.32, .72, 0, 1); }
.screen.enter { animation-duration: .5s; animation-timing-function: var(--ios); }
.small { font-size: 14px; }

/* logo */
.brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.brand-logo { width: 38px; height: 44px; filter: drop-shadow(0 0 12px rgba(156,204,101,.4)); }
.emblem { position: relative; width: 150px; height: 170px; margin: 0 auto; }
.emblem img { position: relative; width: 100%; height: 100%; animation: treeGrow 1.3s var(--ios) both; transform-origin: 50% 100%; filter: drop-shadow(0 0 24px rgba(156,204,101,.45)); }
.emblem .halo { position: absolute; inset: 10% -20% -10%; border-radius: 50%; background: radial-gradient(circle, rgba(156,204,101,.28), transparent 65%); animation: fadeUp 1.4s .4s ease both; }
@keyframes treeGrow { from { opacity: 0; transform: scaleY(.2) scaleX(.6); filter: blur(8px); } }

/* connexion */
.auth-page { min-height: 100%; justify-content: center; gap: 12px; }
.auth-hero { text-align: center; margin-bottom: 10px; }
.auth-logo { width: 96px; height: 112px; filter: drop-shadow(0 0 22px rgba(156,204,101,.45)); animation: sway 6s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.auth-hero p { margin: 4px 0 0; }
.social { width: 100%; text-transform: none; letter-spacing: 0; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; font-weight: 600; font-size: 18px; border-radius: 14px; min-height: 52px; }
.social svg { width: 20px; height: 20px; }
.social.apple { background: #fff; color: #000; border-color: #fff; }
.social.google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
.gsi { display: flex; justify-content: center; min-height: 44px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line2); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: rgba(0,0,0,.35); border-radius: 11px; padding: 3px; margin-bottom: 14px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 9px; font-weight: 600; color: var(--muted); transition: background .25s var(--ios), color .25s; min-height: 36px; }
.seg button.on { background: rgba(255,255,255,.12); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.legal { text-align: center; color: var(--muted); font-size: 13px; line-height: 1.4; }
.legal a { color: var(--moss); }
.name-status { margin: -6px 0 12px; min-height: 1.2em; font-size: 14px; font-weight: 600; color: var(--muted); }
.name-status.ok { color: var(--moss); } .name-status.ko { color: var(--blood); }

/* modales → feuilles iOS en bas d'écran sur mobile */
@media (max-width: 600px) {
  .modal { align-items: flex-end; padding: 0; }
  .modal-card { max-width: none; border-radius: 26px 26px 0 0; padding-bottom: calc(22px + var(--safe-b)); animation: sheetUp .45s var(--ios); max-height: 90%; overflow-y: auto; }
}
@keyframes sheetUp { from { transform: translateY(100%); } }
.grabber { width: 38px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.25); margin: -8px auto 10px; }
.list-ios { margin-top: 16px; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.05); border: 1px solid var(--line); text-align: left; }
.list-ios > a, .list-ios > button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 16px; min-height: 48px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 16px; font-weight: 500; }
.list-ios > :last-child { border-bottom: 0; }
.list-ios span { color: var(--muted); }
.list-ios .destructive { color: #ff6b74; justify-content: center; font-weight: 600; }

/* bouton « Je suis mort » */
.btn.dead { background: linear-gradient(180deg, #2b2b2b, #0e0e0e); border-color: #6b6b6b; color: #f1f1f1; }
.chip.role.infected { color: #b6ff6a; border-color: rgba(182,255,106,.6); text-shadow: 0 0 8px rgba(182,255,106,.6); }

/* ======================= TRANSFORMATION EN INFECTÉ ======================= */
.infect { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; text-align: center; background: #000; overflow: hidden; pointer-events: none; }
.infect.go { animation: infBg 5.2s ease forwards; }
.inf-blood { position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(160,0,10,.9), rgba(30,0,0,.95) 60%, #000); opacity: 0; }
.infect.go .inf-blood { animation: infBlood 5.2s ease forwards; }
.inf-1, .inf-2 { position: absolute; padding: 20px; }
.inf-1 h2, .inf-2 h2 { font-family: Cinzel, serif; font-size: 44px; letter-spacing: 6px; margin: 10px 0; }
.inf-1 h2 { color: #ff3b46; text-shadow: 0 0 30px rgba(255,0,20,.8); }
.inf-2 h2 { color: #b6ff6a; text-shadow: 0 0 30px rgba(150,255,60,.8); line-height: 1.1; }
.inf-2 p { color: #d6ffc0; font-size: 17px; }
.skull, .zombie { font-size: 90px; display: inline-block; }
.inf-1 { opacity: 0; } .inf-2 { opacity: 0; }
.infect.go .inf-1 { animation: inf1 5.2s ease forwards; }
.infect.go .inf-2 { animation: inf2 5.2s ease forwards; }
.infect.go .skull { animation: shake .12s 6 .3s; }
.infect.go .zombie { animation: rise2 1s 2.4s var(--ios) both; }
@keyframes infBg { 0% { opacity: 0; } 5% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes infBlood { 0% { opacity: 0; } 10% { opacity: 1; } 42% { opacity: 1; filter: hue-rotate(0); } 52% { opacity: 1; filter: hue-rotate(100deg) saturate(1.4); } 100% { opacity: 1; filter: hue-rotate(100deg) saturate(1.4); } }
@keyframes inf1 { 0% { opacity: 0; transform: scale(1.6); filter: blur(12px); } 10% { opacity: 1; transform: none; filter: none; } 38% { opacity: 1; } 46% { opacity: 0; transform: scale(.85); filter: blur(6px); } 100% { opacity: 0; } }
@keyframes inf2 { 0%, 44% { opacity: 0; transform: translateY(30px); filter: blur(10px); } 54% { opacity: 1; transform: none; filter: none; } 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes shake { 25% { transform: translate(-6px, 3px) rotate(-6deg); } 75% { transform: translate(6px, -3px) rotate(6deg); } }
@keyframes rise2 { from { transform: translateY(60px) scale(.6); opacity: 0; } }

/* ======================= PING (vue des monstres) ======================= */
.mk-ghost { font-size: 20px; background: rgba(40, 6, 10, .75); border: 2px dashed rgba(255, 77, 90, .85); opacity: .9; filter: saturate(.7); }
.mk-ghost.fresh { animation: pingIn .9s var(--ios) both; }
.mk-ghost.fresh::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid rgba(255, 77, 90, .7); animation: ping 1.2s ease-out infinite; }
.mk-ghost.old { opacity: .55; filter: grayscale(.6); }
@keyframes pingIn { from { transform: scale(1.8); opacity: 0; } }
.mk-ghost .carry-b { position: absolute; top: -8px; right: -10px; font-size: 13px; background: #062a24; border: 1px solid var(--cyan); border-radius: 8px; padding: 1px 2px; }
.ping-tag { background: rgba(20, 4, 6, .88); border: 1px solid rgba(255, 77, 90, .55); border-radius: 8px; padding: 2px 7px; margin-top: 6px; font-size: 12px; color: #ffd4d7; text-shadow: none; }
.ping-tag b { color: #fff; }
.ping-tag i { font-style: normal; font-family: "Share Tech Mono", monospace; color: #ff9aa1; font-variant-numeric: tabular-nums; }
.toast.ping { border-left-color: var(--monster); }
.radio.muted .ptt { opacity: .45; background: linear-gradient(180deg, #2b2f2c, #1a1d1b); }
.radio.muted .lcd-sub { white-space: normal; line-height: 1.25; }
.sig.s0 i { opacity: .25; }

/* ======================= PORTES DE SORTIE ======================= */
.mk-door { font-size: 22px; background: radial-gradient(circle, rgba(120, 130, 120, .35), rgba(10, 14, 12, .92) 70%); border: 2px solid #6f7d72; box-shadow: 0 0 10px rgba(0, 0, 0, .6); filter: saturate(.5); }
.mk-door .lock { position: absolute; bottom: -6px; right: -8px; font-size: 13px; }
.mk-door.open { filter: none; border-color: var(--lcd); background: radial-gradient(circle, rgba(184, 242, 122, .7), rgba(8, 30, 6, .92) 70%); box-shadow: 0 0 30px rgba(184, 242, 122, .9); animation: doorGlow 1.1s ease-in-out infinite; }
.mk-door.open::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid rgba(184, 242, 122, .7); animation: ping 1.4s ease-out infinite; }
.mk-door.open .mk-label { color: var(--lcd); letter-spacing: 2px; }
@keyframes doorGlow { 50% { transform: scale(1.12); box-shadow: 0 0 44px rgba(184, 242, 122, 1); } }

/* la bande d'actions ne doit pas bloquer les touchers sur la carte, seulement ses boutons */
#actions { pointer-events: none; }
#actions .btn { pointer-events: auto; }
/* en jeu, les notifications se placent sous le HUD (hauteur variable) */
body.in-game #toasts { top: calc(var(--hud-h, 118px) + 8px); }

/* ======================= CAMPS (abris) & grandes parties ======================= */
.mk-camp { font-size: 22px; background: radial-gradient(circle, rgba(255, 160, 77, .45), rgba(30, 14, 4, .92) 70%); border: 2px solid var(--ember); box-shadow: 0 0 22px rgba(255, 160, 77, .55); }
.mk-camp .mk-label { color: var(--ember); letter-spacing: 2px; }
.mk-pl .safe-b { position: absolute; bottom: -8px; left: -10px; font-size: 13px; }
.range.number input { display: block; width: 100%; margin-top: 6px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; color: var(--lcd); font-family: "Share Tech Mono", monospace; font-variant-numeric: tabular-nums; }
.list li.more { justify-content: center; color: var(--muted); font-weight: 600; }
.list li.me { border-color: var(--moss); }

/* ======================= ANIMATIONS JUNGLE ======================= */
#jungle { position: fixed; inset: 0; z-index: 5000; pointer-events: none; }
/* l'intro du logo attend que la lampe torche ait fini de chercher */
#splash:not(.play) .emblem img, #splash:not(.play) .emblem .halo, #splash:not(.play) .title span, #splash:not(.play) .subtitle { animation-play-state: paused; }
/* les écrans arrivent derrière le feuillage : pas de glissement, juste les éléments qui poussent */
.screen.enter, .screen.enter.back { animation: screenGrow .7s var(--ios) both; }
@keyframes screenGrow { from { opacity: .4; transform: scale(1.04); filter: blur(4px) brightness(.6); } }
.screen.enter .reveal { animation: sprout .7s var(--ios) both; animation-delay: calc(var(--i, 0) * 55ms + 260ms); }
@keyframes sprout { from { opacity: 0; transform: translateY(22px) scale(.97); filter: blur(3px); } }
/* notifications : suspendues à une liane, elles se balancent en arrivant */
.toast { transform-origin: 50% -30px; animation: vineIn .7s cubic-bezier(.3, 1.6, .5, 1) both; position: relative; }
.toast::before { content: ''; position: absolute; left: 50%; top: -14px; width: 2px; height: 14px; background: linear-gradient(#3d8a4c, transparent); }
@keyframes vineIn { from { opacity: 0; transform: translateY(-26px) rotate(-7deg); } 60% { transform: translateY(3px) rotate(2deg); } }
/* boutons : légère secousse de feuillage à l'appui */
.btn:active, .tool:active, .role-card:active { animation: shake .25s ease; }
@keyframes shake { 30% { transform: scale(.96) rotate(-1deg); } 70% { transform: scale(.97) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { #jungle { display: none; } }

/* ======================= E-MAIL : vérification ======================= */
.link-btn { background: none; border: 0; color: var(--moss); font-weight: 600; font-size: 15px; padding: 10px 6px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn[disabled] { color: var(--muted); text-decoration: none; }
#email-form .link-btn { display: block; margin: 6px auto 0; }
.row-center { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.page-title { font-family: Cinzel, serif; margin: 8px 0 4px; font-size: 26px; letter-spacing: 1px; }
.mail-icon { font-size: 56px; animation: mailFloat 2.6s ease-in-out infinite; filter: drop-shadow(0 0 20px rgba(156, 204, 101, .35)); }
@keyframes mailFloat { 50% { transform: translateY(-6px) rotate(-4deg); } }
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 16px; }
.code-boxes input { width: 100%; aspect-ratio: 4 / 5; max-width: 100%; text-align: center; font-family: "Share Tech Mono", monospace; font-size: 28px !important; color: var(--lcd);
  background: rgba(0, 0, 0, .4); border: 1px solid var(--line2); border-radius: 12px; outline: none; transition: border-color .2s, box-shadow .2s, transform .2s var(--ios); padding: 0; }
.code-boxes input:focus { border-color: var(--moss); box-shadow: 0 0 0 4px rgba(156, 204, 101, .18); }
.code-boxes input.filled { border-color: var(--moss-d); transform: translateY(-2px); }
.code-boxes.shake { animation: codeShake .45s ease; }
@keyframes codeShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
#btn-sound-game { bottom: calc(350px + var(--safe-b)); }
#vf-go { width: 100%; }

/* ======================= MODES DE JEU ======================= */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; border-radius: 18px; border: 2px solid var(--line); background: var(--panel); color: var(--text); backdrop-filter: blur(10px); transition: transform .3s var(--ios), border-color .3s, box-shadow .3s; }
.mode-card .r-ico { font-size: 32px; transition: transform .4s var(--ios); }
.mode-card b { font-size: 17px; letter-spacing: 1px; text-transform: uppercase; }
.mode-card small { color: var(--muted); font-size: 13px; line-height: 1.2; text-align: center; }
.mode-card.sel { border-color: var(--moss); box-shadow: 0 10px 28px rgba(156, 204, 101, .25); transform: translateY(-2px); }
.mode-card.sel .r-ico { transform: scale(1.15) rotate(-6deg); }
.mode-card.hard.sel { border-color: var(--ember); box-shadow: 0 10px 28px rgba(255, 160, 77, .3); }
.mode-card:disabled { opacity: 1; }
.mode-card:disabled:not(.sel) { opacity: .45; }
.mk-site.locked { border-style: solid; border-color: #8a7a5a; filter: saturate(.6); }
.mk-site .lock { position: absolute; bottom: -7px; right: -9px; font-size: 14px; }
.mk-site .game { position: absolute; top: -9px; left: -10px; font-size: 13px; background: rgba(10, 20, 14, .9); border-radius: 8px; padding: 1px 2px; }

/* ======================= MINI-JEUX ======================= */
.mg { position: fixed; inset: 0; z-index: 2150; display: flex; align-items: center; justify-content: center; padding: 16px; padding-top: calc(16px + var(--safe-t)); padding-bottom: calc(16px + var(--safe-b));
  background: radial-gradient(ellipse at center, rgba(4, 14, 8, .82), rgba(0, 0, 0, .94)); opacity: 0; transition: opacity .3s; }
.mg.in { opacity: 1; }
.mg.out { opacity: 0; }
.mg-card { width: 100%; max-width: 420px; background: linear-gradient(180deg, #102016, #08120c); border: 1px solid #2f5a38; border-radius: 24px; padding: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 0 1px rgba(184, 242, 122, .06) inset;
  transform: translateY(30px) scale(.95); transition: transform .45s var(--ios); }
.mg.in .mg-card { transform: none; }
.mg-card.win { animation: mgWin .8s ease; border-color: var(--lcd); }
.mg-card.fail { animation: mgFail .5s ease; border-color: var(--blood); }
@keyframes mgWin { 30% { box-shadow: 0 0 60px rgba(184, 242, 122, .7); transform: scale(1.03); } }
@keyframes mgFail { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } 50% { box-shadow: 0 0 60px rgba(255, 77, 90, .7); } }
.mg-head { display: flex; gap: 12px; align-items: center; }
.mg-ico { font-size: 34px; }
.mg-head b { display: block; font-family: Cinzel, serif; font-size: 22px; letter-spacing: 1px; }
.mg-head small { color: #b8c7b5; font-size: 14px; line-height: 1.3; }
.mg-timer { height: 6px; background: rgba(255, 255, 255, .06); border-radius: 3px; overflow: hidden; margin: 14px 0; }
.mg-timer i { display: block; height: 100%; background: linear-gradient(90deg, #5ff2d6, #b8f27a); transform-origin: left; }
.mg-timer i.low { background: linear-gradient(90deg, #ff4d5a, #ffa04d); }
.mg-body { min-height: 260px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.mg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.mg-status { font-weight: 700; color: var(--lcd); font-family: "Share Tech Mono", monospace; font-size: 15px; }
/* câblage */
.wires { position: relative; display: flex; justify-content: space-between; padding: 6px 4px; }
.wires-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.wire { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .25)); animation: wireIn .35s ease; }
@keyframes wireIn { from { opacity: 0; } }
.wcol { display: flex; flex-direction: column; gap: 18px; }
.plug { width: 56px; height: 50px; border-radius: 12px; border: 3px solid var(--c); background: radial-gradient(circle, var(--c) 0 30%, rgba(0, 0, 0, .5) 32%); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 40%, transparent); transition: transform .2s; }
.plug.sel { transform: scale(1.15); box-shadow: 0 0 26px var(--c); }
.plug.ok { opacity: .55; }
.plug.nope { animation: codeShake .35s ease; }
/* fréquence */
.scope { width: 100%; height: auto; aspect-ratio: 600 / 260; background: #050c07; border: 1px solid #1f3a26; border-radius: 14px; }
.dial { width: 100%; accent-color: var(--cyan); height: 36px; }
.lock { height: 10px; background: rgba(255, 255, 255, .06); border-radius: 5px; overflow: hidden; }
.lock i { display: block; height: 100%; background: var(--lcd); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 12px var(--lcd); }
/* séquence */
.simon { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pad9 { aspect-ratio: 1; border-radius: 16px; border: 1px solid #2f5a38; background: radial-gradient(circle at 40% 35%, #183323, #0a160e); transition: background .15s, box-shadow .15s, transform .1s; }
.pad9.lit { background: radial-gradient(circle at 40% 35%, #f0ffc8, #9ccc65); box-shadow: 0 0 30px rgba(184, 242, 122, .9); transform: scale(1.04); }
.pad9.bad { background: radial-gradient(circle, #ff8a92, #a3121e); }
.pad9:disabled { opacity: .85; }
/* calibrage */
.gauge { position: relative; height: 64px; border-radius: 14px; background: linear-gradient(90deg, #2a0e10, #0b1a10 30%, #0b1a10 70%, #2a0e10); border: 1px solid #2f5a38; overflow: hidden; }
.zone { position: absolute; top: 0; bottom: 0; background: rgba(184, 242, 122, .28); border-left: 2px solid var(--lcd); border-right: 2px solid var(--lcd); transition: left .3s var(--ios), width .3s var(--ios); }
.needle { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: #fff; box-shadow: 0 0 12px #fff; border-radius: 2px; }
.needle.bad { background: var(--blood); box-shadow: 0 0 14px var(--blood); }
.hits { display: flex; justify-content: center; gap: 12px; }
.hits i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #2f5a38; }
.hits i.ok { background: var(--lcd); border-color: var(--lcd); box-shadow: 0 0 10px var(--lcd); }
.caler { width: 100%; }

/* ======================= CHASSEUR ======================= */
.hunter-opt { margin: 4px 0 12px; color: var(--text); }
.btn.shoot { background: linear-gradient(180deg, #f1e3b0, #b8862f); border-color: #ffe9a8; color: #1e1406; box-shadow: 0 8px 26px rgba(255, 210, 120, .35); }
.btn.shoot[disabled] { opacity: .55; }
.chip.role.hunter { color: #ffe3a0; border-color: rgba(255, 210, 120, .6); }
.mk-pl .hunter-b { position: absolute; bottom: -8px; right: -10px; font-size: 13px; }
.mk-pl .stun-b { position: absolute; top: -10px; left: -8px; font-size: 15px; animation: throb .5s infinite; }
.muzzle { position: fixed; inset: 0; z-index: 4900; pointer-events: none; background: radial-gradient(circle at 50% 60%, rgba(255, 240, 200, .85), rgba(255, 200, 120, .25) 35%, transparent 70%); animation: muzzle .45s ease-out forwards; }
@keyframes muzzle { from { opacity: 1; } to { opacity: 0; } }

.hunter-opt { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 14px; }
.hunter-opt .opt-title { font-size: 15px; }
.seg3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 0; }
.seg3 button { font-size: 14px; }
.hunter-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 18px; border: 2px dashed rgba(255, 210, 120, .45); background: var(--panel); color: var(--text); text-align: left; backdrop-filter: blur(10px); transition: border-color .3s, box-shadow .3s, transform .3s var(--ios); }
.hunter-card .r-ico { font-size: 30px; }
.hunter-card .hc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hunter-card b { font-size: 17px; letter-spacing: 1px; text-transform: uppercase; color: #ffe3a0; }
.hunter-card small { color: var(--muted); font-size: 13px; }
.hunter-card .hc-state { font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 210, 120, .15); color: #ffe3a0; white-space: nowrap; }
.hunter-card.sel { border-style: solid; border-color: #ffd27a; box-shadow: 0 10px 28px rgba(255, 210, 120, .3); transform: translateY(-2px); }
.hunter-card.sel .hc-state { background: #ffd27a; color: #1e1406; }
.hunter-card.taken { opacity: .55; }
.rbadge.hunter { background: rgba(255, 210, 120, .18); color: #ffe3a0; }

.mg-warn { margin: -4px 0 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 77, 90, .16); border: 1px solid var(--blood); color: #ffc2c6; font-weight: 700; font-size: 15px; text-align: center; animation: warnPulse .8s ease-in-out infinite alternate; }
@keyframes warnPulse { to { background: rgba(255, 77, 90, .3); } }

/* ======================= GUIDE « COMMENT JOUER » ======================= */
.guide-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 18px; text-align: left; color: var(--text);
  border: 2px solid rgba(255, 210, 120, .7); background: linear-gradient(135deg, rgba(255, 190, 90, .22), rgba(20, 30, 20, .85)); backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(255, 180, 80, .18); min-height: 64px; }
.guide-btn .gb-ico { font-size: 30px; }
.guide-btn .gb-text { flex: 1; display: flex; flex-direction: column; }
.guide-btn b { font-size: 19px; letter-spacing: .5px; color: #ffe3a0; }
.guide-btn small { color: #e6d6b0; font-size: 14px; }
.guide-btn .gb-arrow { font-size: 30px; color: #ffe3a0; }
.guide-btn.new { animation: guideGlow 1.8s ease-in-out infinite; }
@keyframes guideGlow { 50% { box-shadow: 0 0 0 6px rgba(255, 210, 120, .18), 0 12px 40px rgba(255, 180, 80, .45); } }
#btn-guide-game { bottom: calc(406px + var(--safe-b)); }
.guide { position: fixed; inset: 0; z-index: 2120; display: flex; flex-direction: column; background: rgba(5, 12, 8, .97); backdrop-filter: blur(8px);
  padding-top: var(--safe-t); transform: translateY(100%); transition: transform .45s var(--ios); }
.guide.in { transform: none; }
.guide.out { transform: translateY(100%); }
.guide-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 6px; max-width: 560px; width: 100%; margin: 0 auto; }
.guide-top h2 { font-family: Cinzel, serif; margin: 0; font-size: 24px; }
.guide-top > span { width: 44px; }
.guide-nav { display: flex; gap: 8px; overflow-x: auto; padding: 6px 16px 12px; max-width: 560px; width: 100%; margin: 0 auto; scrollbar-width: none; }
.guide-nav a { flex: none; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line2); color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; background: rgba(255, 255, 255, .04); min-height: 40px; display: inline-flex; align-items: center; }
.guide-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px calc(32px + var(--safe-b)); max-width: 560px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.guide-body section { scroll-margin-top: 8px; }
.guide-body h3 { margin: 0 0 10px; font-size: 19px; color: #e6eedd; }
.guide-body p { margin: 6px 0 0; line-height: 1.45; color: #c8d4c2; font-size: 16px; }
.g-kicker { font-size: 18px !important; text-align: center; color: #e6eedd !important; margin: 4px 0 14px !important; }
.g-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g-team { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px; border-radius: 18px; border: 1px solid var(--line2); background: var(--panel); }
.g-team span { font-size: 34px; }
.g-team b { font-size: 17px; text-transform: uppercase; letter-spacing: 1px; }
.g-team small { color: #c8d4c2; font-size: 14px; line-height: 1.3; }
.g-team.surv { border-color: rgba(95, 242, 214, .45); } .g-team.surv b { color: var(--cyan); }
.g-team.mons { border-color: rgba(255, 77, 90, .5); } .g-team.mons b { color: #ff8a92; }
.g-steps { list-style: none; counter-reset: st; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.g-steps li { counter-increment: st; position: relative; padding: 10px 12px 10px 48px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); line-height: 1.4; color: #c8d4c2; font-size: 15.5px; }
.g-steps li::before { content: counter(st); position: absolute; left: 12px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--moss); color: #08130b; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.g-steps li > b:first-child { display: block; color: #e6eedd; font-size: 16px; }
.g-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.g-list li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.4; color: #c8d4c2; font-size: 15.5px; }
.g-list li i { font-style: normal; font-size: 20px; width: 28px; flex: none; text-align: center; }
.g-list b { color: #e6eedd; }
.g-card { padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 10px; }
.g-card > b { font-size: 17px; }
.g-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.g-legend li { display: flex; gap: 10px; align-items: center; color: #c8d4c2; font-size: 15px; line-height: 1.35; }
.g-chip { flex: none; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); font-weight: 700; font-size: 13px; color: #e6eedd; white-space: nowrap; }
.g-safe { padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(255, 160, 77, .5); background: rgba(255, 160, 77, .08); }
.g-safe > b { color: #ffd2a8; }

/* ======================= BRYONE : SÉCURITÉ TERRAIN, SPECTATEURS, REJEU ======================= */
/* zones dangereuses */
.hz-info { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin: 6px 4px 0; color: var(--muted); font-size: 14.5px; line-height: 1.35; }
.hz-info.warn { color: #ffd2a8; }
.hz-info .btn { flex: none; }
#game.hazard #danger-flash { animation: hzflash 1s ease-in-out infinite; }
@keyframes hzflash { 50% { box-shadow: inset 0 0 80px 18px rgba(255, 176, 46, .45); } }
.opt-toggle { margin: 10px 0 4px; color: var(--text); }
.opt-toggle small { color: var(--muted); }

/* SOS */
.sos-fab { bottom: calc(462px + var(--safe-b)); background: rgba(120, 10, 20, .85); border-color: var(--blood); color: #fff; font-weight: 800; font-size: 15px; letter-spacing: 1px; box-shadow: 0 0 18px rgba(255, 77, 90, .45); }
.sos-panel { position: absolute; left: 12px; right: 12px; top: calc(var(--hud-h, 118px) + 8px); z-index: 900; padding: 14px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(70, 6, 14, .95), rgba(30, 4, 8, .95)); border: 2px solid var(--blood); box-shadow: 0 10px 40px rgba(255, 77, 90, .45); animation: rise .35s var(--ease); }
.sos-panel .sos-title { display: block; font-size: 18px; margin-bottom: 6px; color: #ffb3b8; }
.sos-panel ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sos-panel li { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.sos-panel > .btn { width: 100%; margin-bottom: 8px; }
.sos-calls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.sos-calls .btn { text-decoration: none; text-align: center; padding: 8px 4px; font-size: 13.5px; display: flex; align-items: center; justify-content: center; }
.mk-sos { font-size: 24px; background: radial-gradient(circle, rgba(255, 77, 90, .7), rgba(60, 0, 8, .95) 70%); border: 3px solid #fff; box-shadow: 0 0 30px rgba(255, 77, 90, 1); animation: throb .6s infinite; }
.toast.sos, .toast.hazard { border-left-color: var(--blood); background: rgba(70, 8, 14, .92); }
.toast.hazard { border-left-color: #ffb02e; }

/* consignes de sécurité */
.safety-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.safety-list li { display: flex; gap: 10px; align-items: flex-start; color: #c5d2c0; line-height: 1.35; font-size: 15px; }
.safety-list li i { font-style: normal; font-size: 20px; width: 26px; flex: none; text-align: center; }

/* spectateur */
#watch { overflow: hidden; }
#watch-map { position: absolute; inset: 0; background: #050a07; }
#watch-hud { position: absolute; top: 0; left: 0; right: 0; z-index: 500; padding: calc(10px + var(--safe-t)) 12px 0; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#watch-hud .chip, #watch-hud .banner { pointer-events: auto; }
#w-leave { cursor: pointer; color: var(--text); }
.w-counts { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; font-size: 14px; color: var(--muted); text-align: center; backdrop-filter: blur(10px); }
.w-end { position: absolute; left: 12px; right: 12px; bottom: calc(24px + var(--safe-b)); z-index: 600; text-align: center; padding: 18px; border-radius: 22px; background: linear-gradient(180deg, rgba(19, 36, 26, .96), rgba(10, 20, 14, .96)); border: 1px solid var(--line2); animation: rise .4s var(--ease); }
.w-end h2 { font-family: Cinzel, serif; margin: 4px 0; }
.w-end .end-emoji { font-size: 54px; }

/* revoir la partie */
.replay { position: fixed; inset: 0; z-index: 2100; background: #050a07; }
#replay-map { position: absolute; inset: 0; }
.rp-top { position: absolute; top: 0; left: 0; right: 0; z-index: 500; display: flex; gap: 10px; align-items: center; padding: calc(10px + var(--safe-t)) 12px 10px; background: linear-gradient(180deg, rgba(5, 10, 7, .92), rgba(5, 10, 7, 0)); }
.rp-top b { font-family: Cinzel, serif; font-size: 18px; }
.rp-top .icon-btn { margin-left: auto; }
.rp-bar { position: absolute; left: 12px; right: 12px; bottom: calc(14px + var(--safe-b)); z-index: 500; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line2); backdrop-filter: blur(10px); }
.rp-bar input[type=range] { flex: 1; min-width: 140px; accent-color: var(--moss); }
.rp-time { font-family: "Share Tech Mono", monospace; color: var(--lcd); min-width: 92px; text-align: right; }
.rp-bar .seg { margin: 0; grid-template-columns: repeat(3, 1fr); }
.rp-feed { position: absolute; left: 12px; right: 12px; bottom: calc(96px + var(--safe-b)); z-index: 500; display: flex; flex-direction: column-reverse; gap: 4px; pointer-events: none; }
.rp-ev { align-self: flex-start; background: rgba(8, 16, 11, .88); border-left: 3px solid var(--ember); border-radius: 8px; padding: 5px 10px; font-size: 14px; animation: rise .3s var(--ease); }
/* pendant un SOS, les messages passent en bas : le panneau d'alerte reste lisible */
body.sos-on #toasts { top: auto; bottom: calc(250px + var(--safe-b)); }

/* BryOne : annonce de l'administration */
.annonce { position: fixed; z-index: 60; top: calc(env(safe-area-inset-top, 0px) + 8px); left: 12px; right: 12px; max-width: 560px; margin: 0 auto; display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 14px; border-radius: 12px; background: #16261a; border: 1px solid #9ccc65; color: #e6eedd; font-size: 15px; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
.annonce span { flex: 1; overflow-wrap: anywhere; }
.annonce button { flex: none; width: 44px; height: 44px; background: none; border: 0; color: inherit; font-size: 22px; cursor: pointer; }

/* BryOne : présentation vidéo (film.js) */
.guide-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.guide-row .guide-btn { min-width: 0; gap: 10px; padding: 12px; }
.guide-row .gb-ico { font-size: 24px; flex: none; }
.guide-row b { font-size: 17px; }
.guide-row small { font-size: 13px; }
.film-btn { border-color: rgba(156, 204, 101, .7); background: linear-gradient(135deg, rgba(79, 122, 42, .5), rgba(12, 22, 16, .8)); }
.film-btn b { color: #d9f2b4; } .film-btn small { color: #cfe2bb; } .film-btn .gb-ico { color: var(--moss); }
.g-film { margin: 10px auto 14px; display: flex; }
.film { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: var(--safe-t) 0 calc(var(--safe-b) + 8px); background: #030705; }
#film-close { position: absolute; z-index: 2; top: calc(var(--safe-t) + 10px); right: 10px; width: 44px; height: 44px; background: rgba(5, 10, 7, .7); }
.film-view { position: relative; line-height: 0; }
#film-cv { display: block; cursor: pointer; }
#film-big { position: absolute; left: 50%; top: 37%; transform: translate(-50%, -50%); min-width: 84px; height: 84px; padding: 0 22px; border-radius: 42px; border: 2px solid var(--moss); background: rgba(5, 10, 7, .82); color: var(--text); font-size: 26px; font-weight: 700; }
.film-say { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
.film-bar { display: flex; align-items: center; gap: 8px; width: min(100%, 560px); padding: 0 8px; }
.film-bar button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(160, 200, 150, .12); color: var(--text); font-size: 18px; }
#film-time { flex: none; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
#film-seek { flex: 1; min-width: 0; height: 44px; margin: 0; background: none; appearance: none; -webkit-appearance: none; cursor: pointer; }
#film-seek::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--moss) var(--p, 0%), rgba(160, 200, 150, .24) var(--p, 0%)); }
#film-seek::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--moss) var(--p, 0%), rgba(160, 200, 150, .24) var(--p, 0%)); }
#film-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--text); }
#film-seek::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--text); }
