/* ==========================================================
   Verb Survivor V3 — feuille de style (arcade pixel, responsive)
   ========================================================== */
@font-face { font-family: 'Jersey'; src: url('../assets/fonts/jersey-10-latin.woff2') format('woff2'); font-weight: 400 700; font-display: swap; size-adjust: 125%; }
@font-face { font-family: 'Nunito'; src: url('../assets/fonts/nunito-latin.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }

:root {
  --bg: #0b0e1c; --panel: #151a33; --panel2: #1e2547; --panel3: #2a3260;
  --cyan: #3de2ff; --magenta: #ff4fd8; --lime: #8dff5a; --gold: #ffd23f; --red: #ff4d5e; --violet: #9b6bff;
  --text: #f3f4ff; --muted: #9aa3d6; --line: #000;
  --r: 14px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --badge-pad: 0px;
  --f-pix: 'Jersey', 'Courier New', monospace; --f-txt: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--f-txt); font-size: 16px; line-height: 1.35; overscroll-behavior: none; }
body { overflow: hidden; -webkit-font-smoothing: antialiased; }
#app { position: fixed; inset: 0; overflow: hidden; }
.kb-open #app { bottom: auto; top: var(--vvt, 0px); height: var(--vvh, 100%); }
img { -webkit-user-drag: none; user-select: none; }
h1, h2, h3, p { margin: 0; }
button { font-family: inherit; color: inherit; }
b { font-weight: 800; }
[hidden] { display: none !important; }
.pix, h1.pix, h2.pix { font-family: var(--f-pix); font-weight: 700; letter-spacing: .02em; }
.good { color: var(--lime); } .bad { color: var(--red); } .center { text-align: center; }
small { color: var(--muted); font-size: .82em; }
.hint { color: var(--muted); font-size: .9rem; margin: 6px 0 10px; }

#splash { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; font-family: var(--f-pix); color: var(--cyan); font-size: 1.4rem; transition: opacity .4s; }
#splash.hide { opacity: 0; pointer-events: none; }

/* ---------- écrans ---------- */
.screen { position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.screen.enter { animation: enter .3s ease-out; }
@keyframes enter { from { opacity: 0; } to { opacity: 1; } }
.scr-combat { overflow: hidden; }
.m-bg { position: fixed; inset: 0; z-index: 0; background-size: cover; background-position: center; }
.m-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,14,28,.35) 0%, rgba(11,14,28,.78) 100%); }
.m-bg.dim::after { background: linear-gradient(180deg, rgba(11,14,28,.6), rgba(11,14,28,.9)); }
.scr-title .m-bg::after { background: linear-gradient(180deg, rgba(11,14,28,.15) 0%, rgba(11,14,28,.1) 35%, rgba(11,14,28,.82) 100%); }
canvas.embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.page, .center-wrap, .title-wrap { position: relative; z-index: 2; }
.page { max-width: 1100px; margin: 0 auto; padding: calc(var(--safe-t) + 12px) calc(var(--safe-r) + 14px) calc(var(--safe-b) + 84px) calc(var(--safe-l) + 14px); }
.center-wrap { min-height: 100%; display: grid; place-items: center; padding: calc(var(--safe-t) + 16px) 14px calc(var(--safe-b) + 84px); }

/* ---------- boutons ---------- */
.btn { --b: var(--panel3); --bd: #0e1230; display: inline-flex; align-items: center; justify-content: center; gap: .5em; font-weight: 800; font-size: 1rem; padding: .72em 1.15em; border: 0; border-radius: 12px; color: #fff; background: var(--b);
  box-shadow: 0 5px 0 var(--bd), 0 0 0 2px #000, inset 0 2px 0 rgba(255,255,255,.22); cursor: pointer; transition: transform .06s, box-shadow .06s, filter .15s; text-align: center; line-height: 1.15; min-height: 44px; }
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--bd), 0 0 0 2px #000, inset 0 2px 0 rgba(255,255,255,.22); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.btn:focus-visible, .chip:focus-visible, .ans:focus-visible, .node:focus-visible, .tab:focus-visible, .tool:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn.primary { --b: #1fb6d6; --bd: #0b6076; background: linear-gradient(180deg, #4ee9ff, #1fb6d6); color: #04222c; }
.btn.magenta { --b: #d62aa8; --bd: #7d1062; background: linear-gradient(180deg, #ff6fe3, #d62aa8); }
.btn.danger { --b: #d93548; --bd: #7b1020; background: linear-gradient(180deg, #ff6575, #d93548); }
.btn.ghost { --b: #232b57; --bd: #0e1230; }
.btn.dark { --b: rgba(21,26,51,.92); --bd: #05071a; flex-direction: column; gap: .15em; font-size: .9rem; padding: .6em .5em; }
.btn.dark > span { font-size: .85rem; }
.btn.sm { font-size: .88rem; padding: .45em .8em; min-height: 36px; border-radius: 10px; box-shadow: 0 3px 0 var(--bd), 0 0 0 2px #000, inset 0 2px 0 rgba(255,255,255,.2); }
.btn.big { font-size: 1.15rem; padding: .85em 1.4em; }
.btn.huge { font-size: 1.35rem; padding: .95em 1.4em; font-family: var(--f-pix); letter-spacing: .03em; flex-direction: column; gap: .1em; }
.btn.huge small { color: inherit; opacity: .75; font-family: var(--f-txt); font-size: .62em; font-weight: 700; }
.btn.big small { color: inherit; opacity: .8; font-size: .7em; display: block; }
.btn.icon { padding: 0; width: 44px; min-height: 44px; font-size: 1.15rem; }
.btn.icon.sm { width: 36px; min-height: 36px; font-size: 1rem; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font: 800 .92rem var(--f-txt); color: var(--text); background: var(--panel2); border: 2px solid #000; border-radius: 999px; padding: .5em .95em; cursor: pointer; min-height: 38px; box-shadow: 0 3px 0 #000a; }
.chip.on { background: var(--cyan); color: #04222c; box-shadow: 0 3px 0 #0b6076; }
.chip.warn { background: #4a2e10; color: #ffcf8a; border-color: #000; }
.chips.wrap { max-height: 190px; overflow: auto; }

.pill { display: inline-flex; align-items: center; gap: .35em; background: rgba(11,14,28,.78); border: 2px solid #000; border-radius: 999px; padding: .15em .7em .15em .45em; font-size: .95rem; box-shadow: 0 2px 0 #000a; }
.pill i { font-style: normal; font-size: 1rem; }
.pill b { font-family: var(--f-pix); font-size: 1.05rem; }
.pill.gems b { color: #7df0ff; } .pill.gold b { color: var(--gold); } .pill.streak b { color: #ff9a3d; } .pill.mini { padding: .05em .5em .05em .35em; }
.pill.pop { animation: pop .35s; }
@keyframes pop { 50% { transform: scale(1.35); } }

.bar { height: 12px; background: #080a18; border: 2px solid #000; border-radius: 8px; overflow: hidden; position: relative; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--lime)); border-radius: 6px; transition: width .35s; }
.bar.xp i { background: linear-gradient(90deg, #9b6bff, #ff4fd8); }
.bar.thin { height: 8px; border-width: 1px; }
.bar.quest i { background: linear-gradient(90deg, var(--gold), var(--lime)); }
.bar.foe { height: 14px; min-width: 120px; } .bar.foe i { background: linear-gradient(90deg, #ff4d5e, #ff9a3d); }
.bar.foe span { position: absolute; inset: 0; display: grid; place-items: center; font: 700 .7rem var(--f-pix); color: #fff; text-shadow: 0 1px 0 #000; }

.stars { display: inline-flex; gap: 2px; } .star { color: #2c3260; font-size: 1.3em; text-shadow: 0 2px 0 #000; } .star.on { color: var(--gold); }

.hearts { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.heart { width: 20px; height: 18px; filter: drop-shadow(0 2px 0 #000); }
.hearts .hp-num { font-family: var(--f-pix); font-size: 1.15rem; margin: 0 4px; } .hearts .hp-num small { font-size: .7em; }
.hearts .hp-bar { width: 90px; height: 10px; border: 2px solid #000; border-radius: 6px; background: #3a2340; overflow: hidden; } .hearts .hp-bar i { display: block; height: 100%; background: var(--red); }
.hp-inf b { font-size: 1.3rem; margin-left: 6px; font-family: var(--f-pix); }

.rankbox { min-width: 150px; display: flex; flex-direction: column; gap: 3px; }
.rank-top { display: flex; flex-direction: column; } .rank-top b { font-family: var(--f-pix); font-size: 1.1rem; }
.rank-name { font-size: .78rem; color: var(--gold); font-weight: 800; }

/* ---------- panneaux ---------- */
.panel { background: linear-gradient(180deg, rgba(30,37,71,.95), rgba(21,26,51,.95)); border: 3px solid #000; border-radius: var(--r); padding: 14px; box-shadow: 0 5px 0 rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.09); }
.panel.soft { background: rgba(21,26,51,.85); margin-bottom: 10px; }
.panel-t { font-family: var(--f-pix); font-size: 1.15rem; color: var(--cyan); margin: 4px 0 8px; }
.card { background: linear-gradient(180deg, rgba(30,37,71,.96), rgba(21,26,51,.96)); border: 3px solid #000; border-radius: 18px; padding: 22px 20px; box-shadow: 0 6px 0 rgba(0,0,0,.55); max-width: 460px; width: 100%; display: flex; flex-direction: column; gap: 14px; }
.card h1 { font-size: 1.7rem; text-align: center; }
.card p { color: var(--muted); }
.onboard label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; }
.ob-hero { display: grid; place-items: center; } .ob-hero .spr { width: 180px; animation: bob 1.8s ease-in-out infinite; filter: drop-shadow(0 6px 6px #0008); }
input[type=text], textarea { width: 100%; font: 700 1.05rem var(--f-txt); color: var(--text); background: #0a0d20; border: 3px solid #000; border-radius: 12px; padding: .7em .9em; box-shadow: inset 0 3px 0 rgba(0,0,0,.5); min-height: 46px; }
input[type=text]:focus, textarea:focus { border-color: var(--cyan); outline: none; }
textarea { resize: vertical; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; } .field > label { font-weight: 800; color: var(--cyan); font-family: var(--f-pix); }

.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.tb-title { font-family: var(--f-pix); font-size: 1.6rem; flex: 1; text-shadow: 0 3px 0 #000; } .tb-pills { display: flex; gap: 6px; }
.back { flex: none; }

.switch { width: 54px; height: 30px; border-radius: 999px; border: 3px solid #000; background: #2a3260; position: relative; cursor: pointer; flex: none; padding: 0; transition: background .15s; }
.switch i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { background: #1fb6d6; } .switch.on i { transform: translateX(24px); }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(255,255,255,.1); } .opt-row small { display: block; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.about { display: flex; align-items: center; gap: 12px; margin-top: 14px; } .about p { font-size: .88rem; color: var(--muted); }

/* ---------- toasts / modales ---------- */
#toasts { position: fixed; top: calc(var(--safe-t) + 8px); left: 0; right: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: rgba(21,26,51,.97); border: 3px solid #000; border-radius: 14px; padding: 8px 14px 8px 10px; max-width: min(94vw, 460px); box-shadow: 0 5px 0 rgba(0,0,0,.5); animation: toastIn .3s cubic-bezier(.2,1.4,.4,1); }
.toast.out { opacity: 0; transform: translateY(-12px); transition: all .35s; }
.toast .t-ico { font-size: 1.7rem; } .toast .t-body { display: flex; flex-direction: column; font-size: .92rem; } .toast .t-body span { color: var(--muted); font-size: .84rem; }
.toast.good { border-color: #1b6b24; } .toast.bad { border-color: #8b1a28; } .toast.gold { border-color: #a7821a; background: linear-gradient(180deg, #3a3012, #1f1a0b); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(.9); } }
#modals { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.modal-back { position: absolute; inset: 0; background: rgba(3,4,12,.7); display: grid; place-items: center; padding: 16px; pointer-events: auto; animation: enter .2s; backdrop-filter: blur(2px); }
.modal { position: relative; width: min(560px, 100%); max-height: calc(100% - 20px); overflow: auto; background: linear-gradient(180deg, #232b57, #151a33); border: 3px solid #000; border-radius: 18px; padding: 20px 18px 18px; box-shadow: 0 8px 0 rgba(0,0,0,.55); animation: modalIn .25s cubic-bezier(.2,1.3,.4,1); }
.modal.small { width: min(420px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: scale(.9) translateY(10px); } }
.modal-title { font-family: var(--f-pix); font-size: 1.5rem; margin-bottom: 10px; padding-right: 34px; }
.modal-body p { color: var(--muted); }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; justify-content: flex-end; } .modal-actions .btn { flex: 1 1 auto; }
.modal-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #000; background: #2a3260; cursor: pointer; font-weight: 800; }
.verb-detail { display: flex; flex-direction: column; gap: 10px; }
.forms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; } .forms div { background: #0a0d20; border-radius: 10px; padding: 8px 4px; border: 2px solid #000; } .forms small { display: block; } .forms b { font-family: var(--f-pix); font-size: 1.25rem; color: var(--gold); }
.verb-detail .ex { font-style: italic; color: var(--text); } .vd-top { display: flex; gap: 8px; align-items: center; } .vd-stats { display: flex; gap: 14px; color: var(--muted); font-size: .9rem; }
.tier { padding: .15em .7em; border-radius: 999px; font-weight: 800; font-size: .8rem; background: #2a3260; } .tier.t-gold { background: #b8860b; } .tier.t-silver { background: #8a93a6; color: #111; } .tier.t-bronze { background: #a05a2c; } .fam { color: var(--muted); font-size: .85rem; }
.pause-opts .opt-row:last-child { border: 0; }
.rank-up { text-align: center; display: grid; gap: 8px; } .ru-ico { font-size: 3.5rem; } .rank-up b { font-family: var(--f-pix); font-size: 1.6rem; color: var(--gold); }

/* ==========================================================
   ACCUEIL
   ========================================================== */
.title-wrap { min-height: 100%; display: flex; flex-direction: column; align-items: center; padding: calc(var(--safe-t) + 10px) calc(var(--safe-r) + 14px) calc(var(--safe-b) + var(--badge-pad) + 16px) calc(var(--safe-l) + 14px); max-width: 980px; margin: 0 auto; gap: 8px; }
.t-top { width: 100%; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.t-profile { display: flex; align-items: center; gap: 10px; background: rgba(11,14,28,.72); border: 3px solid #000; border-radius: 14px; padding: 6px 12px 6px 8px; box-shadow: 0 4px 0 #000a; }
.avatar-box { width: 52px; height: 58px; display: grid; place-items: center; background: #0a0d20; border-radius: 10px; border: 2px solid #000; overflow: hidden; } .avatar { width: 44px; height: 52px; object-fit: contain; }
.t-logo { text-align: center; margin-top: clamp(4px, 3vh, 36px); }
.t-logo h1 { display: flex; flex-direction: column; line-height: .92; font-family: var(--f-pix); text-transform: uppercase; }
.t-logo .l1 { font-size: clamp(2.4rem, 9vw, 4.4rem); color: var(--cyan); letter-spacing: .06em; text-shadow: 3px 0 #02222c, -3px 0 #02222c, 0 3px #02222c, 0 -3px #02222c, 3px 3px #02222c, -3px 3px #02222c, 0 7px 0 #0a4a5c, 0 0 30px rgba(61,226,255,.55); }
.t-logo .l2 { font-size: clamp(3rem, 12vw, 6rem); background: linear-gradient(180deg, #fff5a8 0%, #ffd23f 45%, #ff8a3d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 5px 0 #6a2d00) drop-shadow(0 0 22px rgba(255,170,60,.55)); -webkit-text-stroke: 0; letter-spacing: .02em; }
.t-logo p { margin-top: 10px; color: #fff; font-weight: 800; text-shadow: 0 2px 0 #000, 0 0 12px #000; font-size: clamp(.85rem, 2.5vw, 1.1rem); }
.t-menu { margin-top: auto; width: min(100%, 440px); display: flex; flex-direction: column; gap: 12px; padding: 14px; background: rgba(8,10,26,.62); border: 3px solid #000; border-radius: 20px; backdrop-filter: blur(4px); box-shadow: 0 6px 0 rgba(0,0,0,.5); }
.t-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .t-row.two { grid-template-columns: 1fr 1fr; }
.t-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.credits { display: flex; align-items: center; gap: 10px; color: #dfe3ff; font-size: .78rem; font-weight: 700; text-shadow: 0 1px 0 #000, 0 0 8px #000; text-align: left; }
.lord { image-rendering: auto; border-radius: 8px; border: 2px solid #000; background: #fff; width: 58px; height: auto; }

/* ---------- donjons ---------- */
.level-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.level-card { display: flex; gap: 12px; align-items: stretch; text-align: left; background: linear-gradient(180deg, rgba(30,37,71,.96), rgba(21,26,51,.96)); border: 3px solid #000; border-radius: 16px; padding: 14px; cursor: pointer; box-shadow: 0 5px 0 rgba(0,0,0,.55); flex-wrap: wrap; transition: transform .1s; }
.level-card:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--cyan); } .level-card:active:not(:disabled) { transform: translateY(3px); }
.level-card.special { border-color: #6a3bb8; } .level-card.locked { opacity: .55; cursor: not-allowed; filter: grayscale(.6); }
.lv-ico { font-size: 2.6rem; width: 62px; height: 62px; display: grid; place-items: center; background: #0a0d20; border-radius: 14px; border: 2px solid #000; flex: none; }
.lv-main { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 4px; } .lv-main h3 { font-family: var(--f-pix); font-size: 1.2rem; } .lv-main p { color: var(--muted); font-size: .9rem; }
.cefr { align-self: flex-start; font-size: .72rem; font-weight: 800; background: #2a3260; color: var(--cyan); border-radius: 999px; padding: .1em .7em; }
.lv-foot { width: 100%; display: flex; justify-content: space-between; align-items: center; border-top: 2px dashed rgba(255,255,255,.1); padding-top: 8px; } .lock { color: #ffb0b8; }

/* ---------- préparation ---------- */
.prep { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; align-items: start; }
.hero-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hero-card { background: #0a0d20; border: 3px solid #000; border-radius: 14px; padding: 8px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; text-align: center; box-shadow: 0 4px 0 #000a; }
.hero-card .prev { width: 80px; height: 80px; object-fit: contain; } .hero-card b { font-family: var(--f-pix); } .hero-card small { font-size: .7rem; line-height: 1.15; }
.hero-card.on { border-color: var(--cyan); background: #0e2a38; box-shadow: 0 0 0 2px var(--cyan), 0 4px 0 #000a; } .hero-card.locked .prev { filter: brightness(.35) saturate(0); }
.skin-row { display: flex; gap: 8px; margin: 10px 0; justify-content: center; }
.skin { width: 62px; min-height: 70px; background: #0a0d20; border: 3px solid #000; border-radius: 12px; display: grid; place-items: center; cursor: pointer; padding: 4px; position: relative; } .skin .mini { width: 46px; height: 48px; object-fit: contain; }
.skin.on { border-color: var(--gold); } .skin.locked { opacity: .5; cursor: not-allowed; } .skin small { font-size: .62rem; }
.hero-detail h3 { font-family: var(--f-pix); font-size: 1.3rem; } .hero-detail p { color: var(--muted); font-size: .92rem; } .hero-detail .sk { color: var(--text); margin-top: 4px; }
.lv-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; } .lv-head h2 { font-family: var(--f-pix); font-size: 1.4rem; } .lv-head p { color: var(--muted); font-size: .9rem; } .lv-head .lv-ico { font-size: 2.2rem; }
.prep-side .btn.huge { width: 100%; margin-top: 10px; }
.code-row { display: flex; gap: 8px; align-items: center; } code { font-family: var(--f-pix); background: #0a0d20; border: 2px solid #000; border-radius: 8px; padding: .3em .6em; color: var(--gold); word-break: break-all; font-size: 1rem; }
.code-out { font-size: .92rem; } .code-out.ok { color: var(--lime); } .code-out.bad { color: var(--red); } .daily-done { background: #0e2a1a; border: 2px solid #1b6b24; border-radius: 12px; padding: 10px; display: grid; gap: 8px; }

/* ---------- camp (méta) ---------- */
.camp-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; align-items: start; }
.camp-gems { font-size: 1.4rem; margin-bottom: 6px; } .camp-gems b { font-family: var(--f-pix); color: #7df0ff; font-size: 2rem; } .camp-gems small { display: block; }
.up-list, .hero-shop { display: flex; flex-direction: column; gap: 8px; }
.up-card, .hs-card { display: flex; align-items: center; gap: 12px; background: #0a0d20; border: 2px solid #000; border-radius: 12px; padding: 8px 10px; }
.up-ico { font-size: 1.8rem; width: 44px; text-align: center; } .up-main { flex: 1; display: flex; flex-direction: column; gap: 2px; } .up-main small { color: var(--muted); }
.pips { display: flex; gap: 4px; } .pips i { width: 16px; height: 8px; border-radius: 3px; background: #2a3260; border: 1px solid #000; } .pips i.on { background: var(--gold); }
.maxed { font-weight: 800; color: var(--lime); padding: 0 8px; } .hs-card .prev { width: 58px; height: 58px; object-fit: contain; } .hs-card > div { flex: 1; display: flex; flex-direction: column; }

/* ---------- Codex ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; font: 800 .95rem var(--f-txt); color: var(--text); background: #1b2147; border: 3px solid #000; border-radius: 12px 12px 0 0; padding: .6em 1em; cursor: pointer; } .tab.on { background: var(--cyan); color: #04222c; } .tab i { font-style: normal; margin-right: .4em; }
@media (max-width: 560px) { .tabs { display: grid; grid-template-columns: repeat(5, 1fr); overflow: visible; gap: 4px; } .tab { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: .45em .1em .4em; font-size: .7rem; border-radius: 10px 10px 0 0; } .tab i { margin: 0; font-size: 1.35rem; line-height: 1.1; } }
.codex-sum { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 8px; }
.sum { background: #0a0d20; border: 3px solid #000; border-radius: 12px; padding: 8px 4px; text-align: center; display: flex; flex-direction: column; } .sum b { font-family: var(--f-pix); font-size: 1.6rem; }
.sum.t-gold b { color: #ffd23f; } .sum.t-silver b { color: #c5cddd; } .sum.t-bronze b { color: #d98a4a; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-top: 10px; }
.vcard { position: relative; background: #12163a; border: 3px solid #000; border-radius: 12px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; min-height: 70px; box-shadow: 0 4px 0 #000a; }
.vcard b { font-family: var(--f-pix); font-size: 1.15rem; } .vcard small { font-size: .72rem; text-align: center; }
.vcard.t-locked { opacity: .55; } .vcard.t-seen { border-color: #4a5aa8; }
.vcard.t-bronze { border-color: #b8743a; background: linear-gradient(180deg, #2a1d14, #12163a); }
.vcard.t-silver { border-color: #b9c2d6; background: linear-gradient(180deg, #2a2f40, #12163a); }
.vcard.t-gold { border-color: #ffd23f; background: linear-gradient(180deg, #3a3012, #12163a); box-shadow: 0 0 14px rgba(255,210,63,.35), 0 4px 0 #000a; }
.due-dot { position: absolute; top: -8px; right: -6px; font-style: normal; font-size: 1rem; background: #4a2e10; border-radius: 50%; border: 2px solid #000; width: 26px; height: 26px; display: grid; place-items: center; }
.beast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.beast { display: flex; gap: 10px; background: #12163a; border: 3px solid #000; border-radius: 14px; padding: 8px; }
.beast.k-boss { border-color: #a7261f; } .beast.k-elite { border-color: #a7821a; }
.b-img { width: 92px; height: 92px; flex: none; display: grid; place-items: end center; background: radial-gradient(circle at 50% 80%, #2a3260, #0a0d20); border-radius: 10px; overflow: hidden; } .b-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.beast.unknown .b-img img { filter: brightness(0); opacity: .6; }
.b-txt { display: flex; flex-direction: column; gap: 3px; } .b-txt b { font-family: var(--f-pix); font-size: 1.1rem; } .b-txt p { font-size: .88rem; } .kind { font-size: .7rem; font-weight: 800; color: var(--gold); font-style: normal; } .kills { color: var(--lime); }
.relic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.relic-card { background: #12163a; border: 3px solid #000; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; } .relic-card.rare { border-color: #9b6bff; background: linear-gradient(180deg, #25194a, #12163a); }
.r-ico { font-size: 2.4rem; } .relic-card.unknown { opacity: .55; } .relic-card em { font-size: .72rem; color: var(--gold); font-style: normal; font-weight: 800; }
.troph-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 8px; }
.troph { display: flex; align-items: center; gap: 10px; background: #12163a; border: 3px solid #000; border-radius: 12px; padding: 8px 10px; opacity: .6; } .troph > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.troph.got { opacity: 1; border-color: #a7821a; background: linear-gradient(180deg, #2c2610, #12163a); } .troph .t-ico { font-size: 1.8rem; width: 40px; text-align: center; } .t-gem { color: #7df0ff; font-weight: 800; font-size: .85rem; }
.streak-card { display: flex; gap: 12px; align-items: center; background: #3a1e0a; border: 3px solid #000; border-radius: 14px; padding: 12px; margin-bottom: 10px; } .s-fire { font-size: 2.4rem; } .streak-card > div:last-child { display: flex; flex-direction: column; }
.quest-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.quest { display: flex; gap: 10px; align-items: center; background: #12163a; border: 3px solid #000; border-radius: 12px; padding: 10px; } .quest.done { border-color: #1b6b24; background: #0e2a1a; } .q-ico { font-size: 1.6rem; } .q-main { flex: 1; display: flex; flex-direction: column; gap: 4px; } .q-rew { display: flex; flex-direction: column; text-align: right; font-size: .82rem; color: #7df0ff; font-weight: 800; }
.vid-grid, .sci-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin: 12px 0 20px; }
.vid h3, .sci h3 { font-family: var(--f-pix); margin-bottom: 8px; } .vid-holder { position: relative; padding-top: 56.25%; background: #000; border-radius: 10px; overflow: hidden; display: grid; } .vid-holder iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; } .vid-holder > .btn { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; }
.sci p { color: var(--muted); margin: 6px 0; font-size: .92rem; }

/* ==========================================================
   PARTIE : bandeau, carte, scènes
   ========================================================== */
.run-screen { position: relative; z-index: 2; min-height: 100%; max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; padding: calc(var(--safe-t) + 8px) calc(var(--safe-r) + 12px) calc(var(--safe-b) + 84px) calc(var(--safe-l) + 12px); }
.scr-map { overflow: hidden; } .scr-map .run-screen { height: 100%; padding-bottom: calc(var(--safe-b) + 12px); }
.run-hud { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "hearts pause" "items floor" "lvl lvl"; align-items: center; gap: 6px 10px; background: rgba(11,14,28,.82); border: 3px solid #000; border-radius: 14px; padding: 8px 10px; box-shadow: 0 4px 0 #000a; }
.rh-hearts { grid-area: hearts; min-width: 0; } .rh-pause { grid-area: pause; align-self: start; min-width: 0; width: 42px; height: 42px; padding: 0; } .rh-items { grid-area: items; } .rh-floor { grid-area: floor; justify-self: end; } .rh-lvl { grid-area: lvl; display: flex; align-items: center; gap: 8px; min-width: 0; }
.hud-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .hud-items { display: flex; gap: 6px; }
.rh-lvl b { font-family: var(--f-pix); font-size: 1rem; white-space: nowrap; } .rh-lvl .bar { flex: 1; min-width: 60px; }
.floor-tag { font-family: var(--f-pix); font-size: .95rem; color: var(--gold); white-space: nowrap; }
.hud-relics.inline { position: static; flex-direction: row; display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; } .relic-mini { width: 30px; height: 30px; border-radius: 8px; border: 2px solid #000; background: #2a3260; font-size: 1.05rem; cursor: pointer; padding: 0; }
@media (min-width: 700px) { .run-hud { grid-template-columns: auto 1fr auto auto; grid-template-areas: "hearts lvl floor pause" "items items items items"; } .rh-lvl { max-width: 360px; justify-self: center; width: 100%; } }
.hud-holder { display: block; }
.map-title { display: flex; justify-content: space-between; align-items: baseline; } .map-title h2 { font-size: 1.4rem; text-shadow: 0 3px 0 #000; } .map-title span { color: var(--muted); font-weight: 800; }
.map-canvas { position: relative; flex: 1; min-height: 340px; width: 100%; max-width: 980px; margin: 0 auto; }
.map-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ln { stroke: rgba(255,255,255,.22); stroke-width: 4; stroke-dasharray: 3 9; stroke-linecap: round; } .ln.done { stroke: rgba(61,226,255,.6); stroke-dasharray: none; } .ln.live { stroke: var(--gold); stroke-dasharray: none; stroke-width: 5; }
.node { position: absolute; transform: translate(-50%, -50%); width: 58px; height: 58px; border-radius: 50%; border: 4px solid #000; background: #1b2147; display: grid; place-items: center; font-size: 1.7rem; padding: 0; cursor: help; opacity: .5; box-shadow: 0 4px 0 #000a; touch-action: manipulation; }
.node.combat { border-color: #1b8fa8; } .node.elite { border-color: var(--gold); background: #3a3012; width: 64px; height: 64px; } .node.boss { border-color: var(--red); background: #3a1018; width: 76px; height: 76px; font-size: 2.2rem; }
.node.shop, .node.camp, .node.treasure, .node.mystery { border-color: #6a74b8; background: #232b57; }
.node.avail { opacity: 1; cursor: pointer; animation: nodePulse 1.4s ease-in-out infinite; box-shadow: 0 0 0 4px rgba(255,210,63,.55), 0 4px 0 #000a; }
.node.avail:hover { transform: translate(-50%, -50%) scale(1.12); } .node.done { opacity: .5; filter: grayscale(.8); } .node.cur { opacity: .9; }
.n-chest { width: 30px; height: auto; image-rendering: pixelated; display: block; } .node.elite .n-chest { width: 34px; }
.n-done { position: absolute; right: -4px; bottom: -4px; background: var(--lime); color: #04220c; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #000; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: .8rem; }
@keyframes nodePulse { 50% { box-shadow: 0 0 0 9px rgba(255,210,63,.15), 0 4px 0 #000a; } }
.map-hero { position: absolute; transform: translate(-50%, -100%); pointer-events: none; z-index: 3; margin-top: -26px; } .map-hero.start { margin-top: 0; } .map-hero .mk { width: 42px; animation: bob 1.4s ease-in-out infinite; filter: drop-shadow(0 3px 3px #000a); }
.node.cur ~ .map-hero { } .map-info { display: flex; align-items: center; gap: 10px; min-height: 52px; background: rgba(11,14,28,.85); border: 3px solid #000; border-radius: 12px; padding: 8px 12px; font-size: .92rem; } .map-info b { margin-right: 6px; } .map-info span { color: var(--muted); }
.map-legend { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: .78rem; color: var(--muted); font-weight: 700; }

.intro-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; background: rgba(8,10,26,.72); border: 3px solid #000; border-radius: 20px; padding: 24px 22px; backdrop-filter: blur(3px); max-width: 440px; width: 100%; }
.ic-floor { color: var(--gold); font-family: var(--f-pix); letter-spacing: .1em; } .intro-card h1 { font-size: 2.2rem; text-shadow: 0 4px 0 #000; } .ic-hero .big { width: 160px; animation: bob 1.5s ease-in-out infinite; filter: drop-shadow(0 6px 6px #000a); }
.scene-card { display: flex; gap: 14px; align-items: center; background: rgba(11,14,28,.85); border: 3px solid #000; border-radius: 16px; padding: 12px 14px; max-width: 760px; width: 100%; margin: 0 auto; }
.scene-card.center { justify-content: center; text-align: center; }
.npc { font-size: 3.4rem; flex: none; animation: bob 2s ease-in-out infinite; } .npc-say { display: flex; flex-direction: column; gap: 4px; } .npc-say b { font-family: var(--f-pix); font-size: 1.2rem; color: var(--gold); } .npc-say p { color: var(--muted); }
.wallet { text-align: center; font-size: 1.2rem; } .wallet b { font-family: var(--f-pix); color: var(--gold); font-size: 1.5rem; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; max-width: 900px; width: 100%; margin: 0 auto; }
.shop-card { background: linear-gradient(180deg, #232b57, #151a33); border: 3px solid #000; border-radius: 14px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; cursor: pointer; box-shadow: 0 4px 0 #000a; } .shop-card small { font-size: .78rem; }
.shop-card .s-ico { font-size: 2.2rem; } .shop-card .price { margin-top: auto; background: #0a0d20; border: 2px solid #000; border-radius: 999px; padding: .15em .8em; font-weight: 800; color: var(--gold); } .shop-card .price.no { color: var(--red); }
.shop-card:disabled { opacity: .55; cursor: not-allowed; } .shop-card.sold { opacity: .35; } .shop-card.relic { border-color: #6a3bb8; } .shop-card.relic.rare { border-color: var(--violet); } .shop-card em { font-size: .7rem; color: var(--violet); font-style: normal; font-weight: 800; }
.leave { align-self: center; margin-top: 6px; }
.camp-box, .myst-box { max-width: 760px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.camp-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.choice-card { background: linear-gradient(180deg, #232b57, #151a33); border: 3px solid #000; border-radius: 16px; padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer; box-shadow: 0 5px 0 #000a; transition: transform .1s; } .choice-card:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--cyan); }
.choice-card .c-ico { font-size: 2.6rem; } .choice-card b { font-family: var(--f-pix); font-size: 1.2rem; } .choice-card.study { border-color: #6a3bb8; } .choice-card.off, .choice-card:disabled { opacity: .45; cursor: not-allowed; }
.camp-done { text-align: center; }
.quick-q { background: rgba(11,14,28,.88); border: 3px solid #000; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.q-title { font-family: var(--f-pix); color: var(--gold); }
.chest-box { text-align: center; display: grid; gap: 12px; justify-items: center; }
.chest img { width: 150px; height: auto; image-rendering: pixelated; display: block; } .chest { font-size: 6rem; background: none; border: 0; cursor: pointer; animation: bob 1.8s ease-in-out infinite; filter: drop-shadow(0 8px 0 rgba(0,0,0,.5)); } .chest.opening { animation: chestShake .6s; } .chest.opened { animation: pop .5s; }
@keyframes chestShake { 20% { transform: rotate(-10deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(8deg); } }
.reward { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; } .reward b { font-family: var(--f-pix); font-size: 1.8rem; color: var(--gold); } .mimic { font-size: 6rem; animation: chestShake .5s infinite; } .mimic img { width: 190px; max-width: 60vw; height: auto; image-rendering: auto; display: block; margin: 0 auto; filter: drop-shadow(0 6px 0 #0008); } .mimic p { font-family: var(--f-pix); font-size: 1.4rem; color: var(--red); }
.pick-wrap { max-width: 860px; width: 100%; display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; position: relative; z-index: 2; } .pick-head { display: grid; gap: 6px; }
.lvl-up { font-family: var(--f-pix); font-size: clamp(2rem, 8vw, 3.2rem); background: linear-gradient(180deg, #fff, #8dff5a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #0a3a12); animation: pop .5s; } .lvl-up.gold { background-image: linear-gradient(180deg, #fff5a8, #ff9a3d); filter: drop-shadow(0 4px 0 #6a2d00); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; width: 100%; }
.pick-card { background: linear-gradient(180deg, #232b57, #151a33); border: 3px solid #000; border-radius: 16px; padding: 16px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; box-shadow: 0 5px 0 #000a; transition: transform .1s; } .pick-card:hover { transform: translateY(-4px); border-color: var(--gold); } .pick-card:active { transform: translateY(2px); }
.pick-card .p-ico { font-size: 2.8rem; } .pick-card b { font-family: var(--f-pix); font-size: 1.2rem; } .pick-card small { font-size: .9rem; } .pick-card em { font-size: .75rem; color: var(--gold); font-style: normal; font-weight: 800; } .pick-card.rare { border-color: var(--violet); background: linear-gradient(180deg, #2c1f58, #151a33); }

/* ---------- fin de partie ---------- */
.end-page { text-align: center; }
.end-head { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 14px; }
.end-head h1 { font-size: clamp(2.2rem, 9vw, 4rem); text-shadow: 0 5px 0 #000; } .end-head h1.win { color: var(--gold); text-shadow: 0 5px 0 #6a2d00, 0 0 26px rgba(255,200,60,.6); } .end-head h1.lose { color: #ff7a88; text-shadow: 0 5px 0 #5a0a14; }
.end-stars { display: flex; gap: 8px; } .end-stars .star { font-size: 3rem; opacity: 0; animation: starIn .5s forwards; } .end-stars .star.on { color: var(--gold); filter: drop-shadow(0 0 10px rgba(255,210,63,.7)); } @keyframes starIn { from { opacity: 0; transform: scale(3) rotate(-30deg); } to { opacity: 1; transform: none; } } .end-stars .star:not(.on) { opacity: .5; }
.hero-end .big { width: 150px; filter: drop-shadow(0 6px 6px #000a); } .hero-end .win { animation: jump .8s ease-in-out infinite; } .hero-end .lose { filter: grayscale(.7); transform: rotate(8deg); }
@keyframes jump { 50% { transform: translateY(-14px); } }
.end-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: left; align-items: start; } .col { display: flex; flex-direction: column; gap: 10px; }
.end-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .stat { background: rgba(21,26,51,.92); border: 3px solid #000; border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; } .stat b { font-family: var(--f-pix); font-size: 1.4rem; } .stat.main { grid-column: 1 / -1; align-items: center; } .stat.main b.big { font-size: 2.6rem; color: var(--gold); }
.new { color: var(--lime); font-style: normal; font-weight: 800; } .end-rewards { background: rgba(21,26,51,.92); border: 3px solid #000; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.rew { display: flex; justify-content: space-between; align-items: center; font-weight: 800; } .rew b { font-family: var(--f-pix); font-size: 1.6rem; color: #7df0ff; } .rankline { display: flex; flex-direction: column; gap: 4px; }
.unlock { background: #0e2a1a; border: 3px solid #1b6b24; border-radius: 12px; padding: 10px; font-weight: 800; }
.mini-troph { display: flex; align-items: center; gap: 8px; padding: 3px 0; } .mini-troph i { font-style: normal; font-size: 1.4rem; } .mini-troph b { flex: 1; font-size: .92rem; }
.card-up { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .vcard-mini { font-family: var(--f-pix); padding: .15em .6em; border-radius: 8px; border: 2px solid #000; background: #2a3260; } .vcard-mini.t-gold { background: #b8860b; } .vcard-mini.t-silver { background: #8a93a6; color: #111; } .vcard-mini.t-bronze { background: #a05a2c; }
.weak { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed rgba(255,255,255,.1); font-size: .92rem; } .weak .cnt { color: var(--red); white-space: nowrap; }
.end-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.panel.soft h3 { font-family: var(--f-pix); color: var(--cyan); margin-bottom: 6px; }

/* ==========================================================
   COMBAT
   ========================================================== */
.cb { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.cb-stage { position: relative; flex: 0 1000 46%; min-height: 150px; overflow: hidden; --hs: 5; --fh: 200px; border-bottom: 4px solid #000; }
.cb-bg { position: absolute; inset: 0; background-size: cover; background-position: center 65%; image-rendering: auto; }
.cb-bg .glow { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--gc, #ff9a3d) 70%, transparent) 0%, transparent 68%); mix-blend-mode: screen; animation: flicker 1.7s infinite; pointer-events: none; }
.cb-bg .glow.portal { animation-duration: 3.2s; }
@keyframes flicker { 0%, 100% { opacity: .85; transform: translate(-50%, -50%) scale(1); } 20% { opacity: .55; transform: translate(-50%, -50%) scale(.93); } 45% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } 70% { opacity: .65; transform: translate(-50%, -50%) scale(.96); } }
.cb-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 60%, transparent 45%, rgba(0,0,0,.55) 100%), linear-gradient(180deg, rgba(0,0,0,.4) 0, transparent 22%); pointer-events: none; }
.cb-hud { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: calc(var(--safe-t) + 8px) calc(var(--safe-r) + 10px) 0 calc(var(--safe-l) + 10px); z-index: 6; pointer-events: none; }
.cb-hud > * { pointer-events: auto; } .hud-left { display: flex; flex-direction: column; gap: 5px; background: rgba(8,10,26,.68); border: 2px solid #000; border-radius: 12px; padding: 6px 8px; } .hud-right { display: flex; gap: 6px; align-items: flex-start; }
.hud-lvl { background: rgba(8,10,26,.68); border: 2px solid #000; border-radius: 12px; padding: 6px 8px; min-width: 112px; }
.hud-relics:not(.inline) { position: absolute; left: calc(var(--safe-l) + 10px); top: 78px; display: flex; flex-direction: column; gap: 4px; z-index: 6; }
.actor { position: absolute; bottom: 8%; display: flex; flex-direction: column; align-items: center; z-index: 3; }
.actor.hero { left: 10%; } .actor.foe { right: 9%; }
.actor .shadow { position: absolute; bottom: -6px; width: 80%; height: 14px; border-radius: 50%; background: rgba(0,0,0,.55); filter: blur(3px); z-index: -1; }
.hero-body { position: relative; animation: breathe 1.6s ease-in-out infinite; transform-origin: 20% 100%; filter: drop-shadow(0 4px 5px rgba(0,0,0,.55)); }
.hero-body .hp { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; user-select: none; }
.hero-body .hp-stance { opacity: 1; }
@keyframes breathe { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-2px) scale(1.012, 1.02); } }
.hero.atk .hp-stance, .hero.dead .hp-stance { opacity: 0; } .hero.atk .hp-attack { opacity: 1; } .hero.dead .hp-ko { opacity: 1; }
.foe-img { height: var(--fh); width: auto; max-width: 52vw; animation: bob 2.4s ease-in-out infinite; filter: drop-shadow(0 6px 8px rgba(0,0,0,.6)); }
.foe-img.cut { -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, #000 78%, transparent 100%); }
.actor.boss .foe-img { filter: drop-shadow(0 0 18px rgba(255,60,60,.65)) drop-shadow(0 6px 8px rgba(0,0,0,.6)); }
.actor.elite .foe-img { filter: drop-shadow(0 0 14px rgba(255,210,63,.55)) drop-shadow(0 6px 8px rgba(0,0,0,.6)); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.foe-info { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-bottom: 4px; } .foe-name { font-family: var(--f-pix); font-size: 1rem; text-shadow: 0 2px 0 #000, 0 0 6px #000; white-space: nowrap; } .foe-name .k { font-style: normal; font-size: .65rem; padding: .1em .5em; border-radius: 6px; margin-right: 6px; border: 2px solid #000; vertical-align: middle; } .foe-name .k.boss { background: var(--red); } .foe-name .k.elite { background: var(--gold); color: #3a2a00; }
.foe-badge .mech { font-size: .72rem; font-weight: 800; background: rgba(8,10,26,.8); border: 2px solid #000; border-radius: 999px; padding: .1em .7em; cursor: pointer; }
.hero.atk { animation: atkR .42s ease-out; } .foe.lunge { animation: atkL .45s ease-out; }
@keyframes atkR { 40% { transform: translateX(min(14vw, 90px)) scale(1.05); } }
@keyframes atkL { 40% { transform: translateX(max(-22vw, -150px)) scale(1.1); } }
.foe.hurt .foe-img, .hero.hurt .hero-body { animation: hurt .42s; } @keyframes hurt { 0%, 100% { filter: brightness(1); transform: none; } 20% { filter: brightness(3.2) saturate(0); transform: translateX(6px); } 50% { filter: brightness(2) sepia(1) hue-rotate(-40deg) saturate(4); transform: translateX(-6px); } }
.foe.dying .foe-img { animation: dissolve .75s forwards; } .foe.dying .foe-info { opacity: 0; transition: opacity .2s; } @keyframes dissolve { to { opacity: 0; transform: translateY(20px) scale(.8); filter: blur(6px) brightness(3); } }
.hero.dead .hero-body { animation: koThud .5s ease-out forwards; } @keyframes koThud { 0% { transform: translateY(-14px); } 55% { transform: translateY(3px) scale(1.04, .94); } 100% { transform: none; } }
.foe.poisoned .foe-img { filter: hue-rotate(80deg) saturate(1.6) drop-shadow(0 0 10px #8dff5a); }
.cb-banner { position: absolute; left: 50%; top: 24%; transform: translate(-50%, -10px); z-index: 7; background: rgba(8,10,26,.9); border: 3px solid #000; border-radius: 14px; padding: 8px 16px; text-align: center; display: flex; flex-direction: column; gap: 2px; max-width: 88%; opacity: 0; pointer-events: none; transition: all .35s; } .cb-banner.show { opacity: 1; transform: translate(-50%, 0); } .cb-banner span { color: var(--muted); font-size: .85rem; }
.fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 8; overflow: hidden; }
.fx-float { position: absolute; transform: translate(-50%, 0); font-family: var(--f-pix); font-weight: 700; font-size: 1.6rem; color: #fff; text-shadow: 0 3px 0 #000, 0 0 8px #000; white-space: nowrap; animation: floatUp 1.1s ease-out forwards; }
.fx-float.crit { color: var(--gold); font-size: 2.4rem; } .fx-float.dmg { color: #fff; font-size: 2rem; } .fx-float.bad { color: #ff6575; } .fx-float.good { color: var(--lime); } .fx-float.gold { color: var(--gold); } .fx-float.small { font-size: 1.1rem; } .fx-float.banner { font-size: 2rem; color: #fff7a8; letter-spacing: .06em; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -64px) scale(1); } }
.fx-p { position: absolute; width: var(--s); height: var(--s); animation: burst .85s ease-out forwards; } @keyframes burst { to { transform: translate(var(--dx), var(--dy)) rotate(180deg); opacity: 0; } }
.fx-flash { position: absolute; inset: 0; z-index: 9; animation: flash .4s ease-out forwards; pointer-events: none; } @keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.fx-confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }
.shake { animation: shake .5s; } @keyframes shake { 10%, 50%, 90% { transform: translateX(-6px); } 30%, 70% { transform: translateX(6px); } }

/* ----- scène compacte (écran bas : téléphone, clavier ouvert…) : tout rapetisse pour laisser la place au clavier ----- */
.cb-stage.compact .cb-hud { padding-top: calc(var(--safe-t) + 5px); gap: 6px; }
.cb-stage.compact .hud-left { padding: 4px 7px; gap: 3px; border-radius: 10px; } .cb-stage.compact .hud-row { gap: 4px; flex-wrap: nowrap; } .cb-stage.compact .hud-row .pill { font-size: .78rem; padding: .05em .5em .05em .35em; } .cb-stage.compact .hud-row .pill b { font-size: .9rem; }
.cb-stage.compact .heart { width: 13px; height: 12px; } .cb-stage.compact .hearts { gap: 1px; } .cb-stage.compact .hearts .hp-num { font-size: .95rem; margin: 0 2px; } .cb-stage.compact .hearts .hp-bar { width: 60px; height: 8px; }
.cb-stage.compact .hud-lvl { min-width: 0; padding: 3px 7px; border-radius: 10px; } .cb-stage.compact .hud-lvl .lvl b { font-size: .8rem; }
.cb-stage.compact .hud-right .btn.icon { width: 36px; height: 36px; min-height: 0; padding: 0; }
.cb-stage.compact .foe-info { margin-bottom: 2px; gap: 2px; } .cb-stage.compact .foe-name { font-size: .88rem; } .cb-stage.compact .foe-badge { display: none; } .cb-stage.compact .foe-hp .bar { height: 14px; } .cb-stage.compact .foe-hp .bar span { font-size: .62rem; }
.cb-stage.compact .actor { bottom: 5%; } .cb-stage.compact .hud-relics:not(.inline) { display: none; } .cb-stage.compact .cb-banner { top: 30%; padding: 5px 12px; font-size: .85rem; }
.cb-stage.tiny .hud-lvl { display: none; } .cb-stage.tiny .foe-name { font-size: .78rem; } .cb-stage.tiny .foe-name .k { display: none; }
/* panneau compact : même idée pour les boutons et les champs */
.cb.compact-ui .cb-panel { gap: 6px; padding-top: 7px; padding-left: calc(var(--safe-l) + 8px); padding-right: calc(var(--safe-r) + 8px); }
.cb.compact-ui .tool { min-height: 38px; } .cb.compact-ui .q-box { gap: 5px; } .cb.compact-ui .q-label { font-size: .88rem; line-height: 1.2; } .cb.compact-ui .q-word { font-size: clamp(1.7rem, 8vw, 2.3rem); }
.cb.compact-ui .q-sentence { font-size: clamp(1rem, 4.4vw, 1.25rem); line-height: 1.25; } .cb.compact-ui .q-sub { font-size: .85rem; } .cb.compact-ui .q-hint { font-size: .82rem; }
.cb.compact-ui .timer { height: 13px; } .cb.compact-ui .ans { min-height: 48px; } .cb.compact-ui .answers { gap: 7px; }
.cb.compact-ui .ans-input input { min-height: 46px; font-size: 1.3rem; } .cb.compact-ui .ans-input .btn { min-height: 46px; }
.cb.compact-ui .fb { padding: 8px 10px; gap: 5px; } .cb.compact-ui .ex-forms { font-size: .98rem; } .cb.compact-ui .ex-tip { font-size: .85rem; padding: 4px 7px; }
.cb.compact-ui .cb-panel.wrong-state .cb-tools, .cb.compact-ui .cb-panel.wrong-state .q-label, .cb.compact-ui .cb-panel.wrong-state .q-badge { display: none; }
.cb.compact-ui .retype { padding: 6px; gap: 5px; } .cb.compact-ui .rt-row input { min-height: 40px; font-size: 1.15rem; } .cb.compact-ui .rt-msg { font-size: .82rem; }
.cb.compact-ui .fb .btn.big { min-height: 46px; }
.cb.compact-ui .cb-panel.wrong-state .q-wordrow, .cb.compact-ui .cb-panel.wrong-state .q-sub, .cb.compact-ui .cb-panel.wrong-state .q-sentence, .cb.compact-ui .cb-panel.wrong-state .q-verbhint { display: none; }
.cb.compact-ui.wrong-mode .cb-stage { min-height: 118px; }
.cb-panel.wrong-state .fb.ko .btn.big { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -10px 10px -2px #2c1219, 0 4px 0 #000a; }

/* ----- panneau de question ----- */
.cb-panel { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px calc(var(--safe-r) + 12px) calc(var(--safe-b) + 14px) calc(var(--safe-l) + 12px); background: linear-gradient(180deg, #151a33, #0d1028); width: 100%; margin: 0 auto; }
.cb-tools { display: flex; gap: 8px; align-items: stretch; flex-wrap: nowrap; }
.tool { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; min-width: 52px; border-radius: 12px; border: 3px solid #000; background: #232b57; color: var(--text); font-weight: 800; cursor: pointer; padding: 0 10px; box-shadow: 0 4px 0 #000a; }
.tool:disabled { opacity: .4; cursor: not-allowed; } .tool .t-ico { font-size: 1.3rem; position: relative; z-index: 1; } .tool .cnt { font-family: var(--f-pix); position: relative; z-index: 1; }
.tool.item { flex-direction: row; } .tool.sm { min-height: 34px; min-width: 44px; padding: 0 8px; border-width: 2px; border-radius: 10px; }
.tool.skill { flex: 1; max-width: 270px; justify-content: flex-start; text-align: left; gap: 8px; background: #1b2147; } .tool.skill .t-txt { display: flex; flex-direction: column; line-height: 1.1; position: relative; z-index: 1; } .tool.skill small { color: #cfd6ff; font-size: .75rem; }
.tool.skill .t-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(141,255,90,.28), rgba(61,226,255,.35)); transition: width .4s; }
.tool.skill.ready:not(:disabled) { border-color: var(--gold); background: #3a3012; animation: readyPulse 1s ease-in-out infinite; } .tool.skill.ready small { color: var(--gold); font-weight: 900; } @keyframes readyPulse { 50% { box-shadow: 0 0 0 5px rgba(255,210,63,.25), 0 4px 0 #000a; } }
.q-box { display: flex; flex-direction: column; gap: 8px; align-items: stretch; text-align: center; }
.q-badge { align-self: center; font-size: .78rem; font-weight: 900; background: #4a1a60; color: #ffd0ff; border: 2px solid #000; border-radius: 999px; padding: .15em .9em; }
.q-pips { display: flex; gap: 6px; justify-content: center; } .q-pips i { width: 26px; height: 8px; border-radius: 4px; background: #2a3260; border: 2px solid #000; } .q-pips i.on { background: var(--cyan); }
.q-label { color: #dfe3ff; font-weight: 700; font-size: clamp(.9rem, 2.4vw, 1.05rem); } .q-key { color: var(--gold); font-weight: 900; }
.q-wordrow { display: flex; align-items: center; justify-content: center; gap: 10px; } .q-word { font-family: var(--f-pix); font-size: clamp(2rem, 7vw, 3rem); color: #fff; text-shadow: 0 4px 0 #000, 0 0 18px rgba(61,226,255,.45); line-height: 1; } .q-word.long { font-size: clamp(1.4rem, 5vw, 2.2rem); }
.q-sub { color: var(--muted); font-weight: 700; }
.q-sentence { font-size: clamp(1.1rem, 3.6vw, 1.55rem); font-weight: 800; line-height: 1.4; } .blank { display: inline-block; min-width: 4.2em; border-bottom: 4px solid var(--gold); margin: 0 4px; color: var(--gold); text-align: center; } .q-verbhint { color: var(--cyan); }
.timer { position: relative; height: 16px; background: #080a18; border: 3px solid #000; border-radius: 10px; overflow: hidden; } .timer i { display: block; height: 100%; background: linear-gradient(90deg, #3de2ff, #8dff5a); transition: width .12s linear; } .timer.mid i { background: linear-gradient(90deg, #ffb13d, #ffd23f); } .timer.low i { background: linear-gradient(90deg, #ff4d5e, #ff9a3d); animation: lowPulse .5s infinite alternate; } .timer.frozen i { background: linear-gradient(90deg, #a8e8ff, #fff); } .timer.none { display: none; }
.timer .t-num { position: absolute; inset: 0; display: grid; place-items: center; font: 700 .68rem var(--f-pix); color: #fff; text-shadow: 0 1px 0 #000; } @keyframes lowPulse { to { filter: brightness(1.5); } }
.q-hint { color: var(--gold); font-weight: 700; font-size: .92rem; } .q-hint:empty { display: none; }
.answers { display: grid; gap: 10px; }
.answers.choices { grid-template-columns: 1fr 1fr; } .answers.choices.three { grid-template-columns: repeat(3, 1fr); } .answers.choices.wide { grid-template-columns: 1fr; }
.answers.shuffled .ans { animation: pop .3s; }
.ans { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: .6em .8em; font-family: var(--f-pix); font-size: clamp(1.1rem, 3.6vw, 1.5rem); font-weight: 700; color: #fff; background: linear-gradient(180deg, #2f3a78, #232b57); border: 3px solid #000; border-radius: 14px; cursor: pointer; box-shadow: 0 5px 0 #0b0f2a, inset 0 2px 0 rgba(255,255,255,.18); transition: transform .06s, box-shadow .06s, background .15s; word-break: break-word; }
.ans kbd { position: absolute; left: 8px; top: 6px; font: 700 .65rem var(--f-pix); color: #9aa3d6; opacity: .8; }
@media (hover: hover) { .ans:hover:not(:disabled) { background: linear-gradient(180deg, #3b49a0, #2a3468); } }
.ans:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #0b0f2a; }
.ans.right { background: linear-gradient(180deg, #3fcf5a, #1f8f3a); box-shadow: 0 5px 0 #0c4a1a; animation: pop .35s; } .ans.wrong { background: linear-gradient(180deg, #ff5566, #c92a3c); box-shadow: 0 5px 0 #6a0f1c; animation: shake .45s; } .ans.dim { opacity: .5; } .ans.gone { opacity: .22; text-decoration: line-through; pointer-events: none; }
.answers.wide .ans { font-size: clamp(1rem, 3vw, 1.3rem); }
.answers.typing { grid-template-columns: 1fr; }
.ans-input { display: flex; gap: 10px; } .ans-input input { flex: 1; min-width: 0; font-family: var(--f-pix); font-size: 1.5rem; text-align: center; min-height: 56px; }
.osk { display: flex; flex-direction: column; gap: 5px; width: 100%; max-width: 520px; margin: 0 auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.osk-row { display: flex; gap: 4px; justify-content: center; }
.key { flex: 1 1 0; min-width: 0; max-width: 52px; height: 44px; font: 700 1.2rem var(--f-pix); color: #fff; background: linear-gradient(180deg, #3a4690, #2a3468); border: 2px solid #000; border-radius: 8px; box-shadow: 0 3px 0 #0b0f2a; cursor: pointer; padding: 0; touch-action: manipulation; }
.key.wide { flex: 1.7 1 0; max-width: 88px; background: linear-gradient(180deg, #7a3a52, #5a2640); font-size: 1.1rem; }
.key:active { transform: translateY(3px); box-shadow: 0 0 0 #0b0f2a; }
.osk-mini .key { height: 38px; }
.answers.tiles { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.slots, .pool { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.slot { width: 44px; height: 52px; border: 3px dashed #4a5aa8; border-radius: 10px; background: #0a0d20; font: 700 1.6rem var(--f-pix); color: var(--gold); cursor: pointer; padding: 0; } .slot.filled { border-style: solid; border-color: var(--gold); }
.tile { width: 48px; height: 54px; border: 3px solid #000; border-radius: 10px; background: linear-gradient(180deg, #4e5ec4, #2f3a78); font: 700 1.7rem var(--f-pix); color: #fff; cursor: pointer; box-shadow: 0 4px 0 #0b0f2a; padding: 0; } .tile.used { opacity: .2; box-shadow: none; }

/* ----- retour après réponse ----- */
.cb-feedback { display: none; } .cb-feedback.show, .cb-feedback.static { display: block; }
.cb-feedback:not(:empty) { display: block; }
.fb { border: 3px solid #000; border-radius: 14px; padding: 10px 12px; text-align: left; display: flex; flex-direction: column; gap: 6px; animation: modalIn .25s; }
.fb.ok { background: #0e2a1a; border-color: #1b6b24; color: var(--lime); font-weight: 900; text-align: center; font-size: 1.1rem; } .fb.ko { background: #2c1219; border-color: #8b1a28; }
.ex-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .ex-head b:first-child { color: #ff8a96; font-family: var(--f-pix); font-size: 1.2rem; } .ex-head span { flex: 1; } .ans-good { color: var(--lime); font-family: var(--f-pix); font-size: 1.25rem; }
.ex-forms { font-size: 1.05rem; } .ex-forms b { color: var(--gold); font-family: var(--f-pix); } .ex-forms span { color: var(--muted); } .ex-tip { color: #cfd6ff; font-size: .92rem; background: rgba(0,0,0,.25); border-radius: 8px; padding: 6px 8px; }
.retype { display: flex; flex-direction: column; gap: 6px; background: rgba(0,0,0,.25); border-radius: 10px; padding: 8px; } .rt-row { display: flex; gap: 8px; } .rt-row input { min-height: 42px; font-size: 1.1rem; } .rt-msg { color: #cfd6ff; } .rt-ok { color: var(--lime); font-weight: 900; }
.fb .btn.big { width: 100%; }
.victory { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding-top: 4px; animation: modalIn .3s; }
.v-title { font-family: var(--f-pix); font-size: clamp(1.8rem, 7vw, 2.6rem); color: var(--gold); text-shadow: 0 4px 0 #6a2d00; } .v-name { color: var(--muted); font-weight: 800; }
.loot { display: flex; flex-direction: column; gap: 4px; width: min(100%, 380px); } .loot-row { display: flex; align-items: center; gap: 10px; background: #0a0d20; border: 2px solid #000; border-radius: 10px; padding: 6px 12px; } .loot-row i { font-style: normal; font-size: 1.3rem; } .loot-row b { font-family: var(--f-pix); font-size: 1.2rem; color: var(--gold); min-width: 3.2em; } .loot-row.special { border-color: #a7821a; background: #2c2610; }

/* ==========================================================
   ADAPTATIONS ÉCRAN
   ========================================================== */
@media (max-width: 860px) {
  :root { --badge-pad: 64px; }
  .prep, .camp-grid, .opt-grid, .end-grid { grid-template-columns: 1fr; }
  .cb-panel { padding-bottom: calc(var(--safe-b) + 14px); }
  .page, .center-wrap, .run-screen { padding-bottom: calc(var(--safe-b) + 84px); }
  .codex-sum { grid-template-columns: repeat(5, 1fr); gap: 4px; } .sum b { font-size: 1.2rem; } .sum small { font-size: .65rem; }
}
@media (max-width: 520px) {
  body { font-size: 15px; }
  .t-top { flex-direction: column; align-items: stretch; } .t-top .tb-pills { justify-content: flex-end; }
  .t-profile { align-self: stretch; } .tb-title { font-size: 1.25rem; }
  .hero-grid { gap: 5px; } .hero-card { padding: 6px 2px; } .hero-card .prev { width: 56px; height: 56px; } .hero-card b { font-size: .85rem; } .hero-card small:not(.lock) { display: none; } .skin-row { margin: 6px 0; }
  .actor.hero { left: 4%; } .actor.foe { right: 3%; }
  .hud-lvl { min-width: 92px; } .heart { width: 16px; height: 14px; }
  .answers.choices { gap: 8px; } .ans { min-height: 54px; }
  .tool.skill { max-width: none; }
  .end-stats { grid-template-columns: 1fr 1fr; }
}
@media (orientation: landscape) and (max-height: 560px) {
  :root { --badge-pad: 0px; }
  .cb { flex-direction: row; }
  .cb-stage { flex: 0 0 52%; min-height: 0; border-bottom: 0; border-right: 4px solid #000; }
  .cb-panel { padding-top: calc(var(--safe-t) + 6px); padding-bottom: calc(var(--safe-b) + 56px); gap: 6px; }
  .q-word { font-size: clamp(1.6rem, 6vh, 2.4rem); } .ans { min-height: 46px; font-size: 1.15rem; } .answers { gap: 7px; }
  .tool { min-height: 38px; } .q-box { gap: 5px; }
  .actor { bottom: 6%; } .hud-relics:not(.inline) { display: none; }
  .t-logo .l1 { font-size: 2rem; } .t-logo .l2 { font-size: 2.6rem; } .t-logo p { margin-top: 4px; }
  .title-wrap { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; } .t-top { order: 0; } .t-logo { flex: 1 1 40%; margin: 0; } .t-menu { margin-top: 0; flex: 1 1 40%; } .t-foot { order: 5; }
  .map-canvas { min-height: 200px; } .node { width: 46px; height: 46px; font-size: 1.3rem; } .node.boss { width: 58px; height: 58px; } .node.elite { width: 50px; height: 50px; }
  .run-screen { gap: 6px; } .map-legend { display: none; }
}
@media (min-width: 1100px) and (min-height: 700px) {
  .cb-panel { align-items: stretch; }
  .cb-panel > * { width: min(860px, 100%); margin-left: auto; margin-right: auto; }
  .cb-stage { flex-basis: 48%; }
}
@media (min-width: 861px) { .cb-stage { flex-basis: 42%; } .q-box { gap: 6px; } .cb-panel { gap: 6px; } }
@media (min-width: 1000px) { .actor.hero { left: 21%; } .actor.foe { right: 19%; } }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
@media (prefers-reduced-motion: reduce) { .hero-body, .foe-img, .npc, .chest { animation: none; } }

.pause-ic { display: inline-flex; gap: 4px; } .pause-ic i { width: 5px; height: 16px; background: #fff; border-radius: 1px; }
#screen.scr-combat + #toasts { top: calc(var(--safe-t) + 74px); }
.cb-panel.wrong-state .answers, .cb-panel.wrong-state .timer, .cb-panel.wrong-state .q-hint, .cb-panel.wrong-state .q-pips { display: none; }
.cb-panel.wrong-state .q-wordrow { margin-top: -2px; } .cb-panel.wrong-state .q-word { font-size: clamp(1.6rem, 5.5vw, 2.2rem); }

@media (min-width: 1000px) and (min-height: 700px) { .ans { min-height: 62px; } .q-word { font-size: 3.2rem; } }
@media (min-width: 700px) and (orientation: portrait) {
  .cb-stage { flex-basis: 50%; } .ans { min-height: 78px; font-size: 1.8rem; } .q-word { font-size: 4rem; } .q-label { font-size: 1.2rem; } .tool { min-height: 54px; }
  .cb-panel { gap: 12px; } .q-box { gap: 12px; } .answers { gap: 14px; }
}

/* ----- Grimoire : liste des verbes par thèmes ----- */
.tabs3 { display: flex; } .tabs3 .tab { flex: 1; } @media (max-width: 560px) { .tabs3 { display: grid; grid-template-columns: repeat(3, 1fr); } }
.vl-tools { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; } .vl-tools input { font-size: 1rem; } .vl-tools .chips { align-items: center; } .vl-count { color: var(--muted); font-weight: 800; margin-left: auto; }
.vl-theme { background: rgba(21,26,51,.94); border: 3px solid #000; border-radius: 14px; overflow: hidden; margin-bottom: 8px; box-shadow: 0 4px 0 #000a; }
.vl-head { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; background: #232b57; color: var(--text); border: 0; text-align: left; cursor: pointer; font: inherit; }
.vl-head .ico { font-size: 1.4rem; } .vl-head b { flex: 1; font-family: var(--f-pix); font-size: 1.25rem; font-weight: 700; line-height: 1.1; } .vl-head small { color: var(--muted); font-weight: 800; white-space: nowrap; } .vl-head .chev { color: var(--cyan); font-size: 1.1rem; transition: transform .18s; } .vl-theme.open .chev { transform: rotate(90deg); }
.vl-body { padding: 6px 8px 8px; } .vl-tip { color: #cfd6ff; font-size: .88rem; background: rgba(0,0,0,.28); border-radius: 8px; padding: 6px 9px; margin: 2px 0 8px; }
.vl-colhead, .vl-row { display: grid; grid-template-columns: 1.05fr 1fr 1fr; column-gap: 8px; align-items: baseline; }
.vl-colhead { padding: 0 6px 3px 20px; color: var(--muted); font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.vl-row { position: relative; width: 100%; text-align: left; background: transparent; border: 0; border-top: 1px dashed rgba(255,255,255,.14); padding: 7px 6px 7px 20px; color: var(--text); cursor: pointer; font: inherit; min-height: 48px; }
@media (hover: hover) { .vl-row:hover { background: rgba(61,226,255,.08); } }
.vl-row:active { background: rgba(61,226,255,.16); }
.vl-row .dot { position: absolute; left: 4px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: #333b6b; border: 2px solid #000; } .vl-row .dot.t-seen { background: #5a78d8; } .vl-row .dot.t-bronze { background: #d98a4a; } .vl-row .dot.t-silver { background: #c5cddd; } .vl-row .dot.t-gold { background: #ffd23f; box-shadow: 0 0 6px #ffd23f; }
.vl-row .bv { font-family: var(--f-pix); font-size: 1.3rem; font-weight: 700; color: var(--gold); line-height: 1.1; } .vl-row .pt { font-family: var(--f-pix); font-size: 1.2rem; line-height: 1.1; overflow-wrap: anywhere; transition: filter .2s; }
.vl-row .fr { grid-column: 1 / -1; color: var(--muted); font-size: .82rem; font-weight: 700; margin-top: 1px; }
.vl-list.quiz .vl-row:not(.revealed) .pt { filter: blur(9px); opacity: .85; } .vl-list.quiz .vl-row:not(.revealed) { cursor: help; }
.map-info .mi-text { flex: 1; min-width: 0; } .map-info .mi-state { display: block; color: var(--gold); font-style: normal; font-size: .82rem; font-weight: 800; }
.map-enter { flex: none; min-height: 44px; white-space: nowrap; }
.node.sel { z-index: 4; opacity: 1; transform: translate(-50%, -50%) scale(1.18); box-shadow: 0 0 0 5px var(--cyan), 0 0 18px 6px rgba(61,226,255,.55), 0 4px 0 #000a; animation: none; }
/* ----- téléphone : bandeau de partie sur 2 lignes, carte plus haute, salles plus petites ----- */
@media (max-width: 520px) {
  .run-hud { grid-template-columns: auto 1fr auto; grid-template-areas: "hearts hearts pause" "items lvl floor"; gap: 5px 8px; padding: 6px 8px; }
  .run-hud .heart { width: 14px; height: 13px; } .run-hud .hearts { gap: 1px; } .rh-pause { width: 38px; height: 38px; }
  .rh-floor .ft-w { display: none; } .rh-lvl { flex-wrap: wrap; row-gap: 2px; } .rh-lvl .bar { min-width: 44px; }
  .run-screen { padding-bottom: calc(var(--safe-b) + 14px); gap: 7px; }
  .node { width: 48px; height: 48px; font-size: 1.4rem; } .node.elite { width: 52px; height: 52px; } .node.boss { width: 62px; height: 62px; font-size: 1.9rem; } .n-chest { width: 26px; }
  .map-title h2 { font-size: 1.2rem; }
}
@media (max-width: 560px) and (max-height: 760px) { .map-legend { display: none; } }
/* ----- téléphone en paysage : clavier et champs plus bas pour tout voir ----- */
@media (orientation: landscape) and (max-height: 560px) {
  .osk { gap: 3px; } .osk-row { gap: 3px; } .key { height: 33px; font-size: 1.02rem; border-radius: 7px; box-shadow: 0 2px 0 #0b0f2a; } .key.wide { font-size: .95rem; }
  .cb .ans-input input, .cb .ans-input .btn { min-height: 40px; } .cb .ans-input input { font-size: 1.2rem; }
  .cb .q-badge { font-size: .7rem; padding: .05em .7em; } .cb .q-label { font-size: .85rem; line-height: 1.15; } .cb .timer { height: 12px; }
  .cb .tool { min-height: 34px; } .cb .tool.skill small { display: none; } .cb-panel { gap: 4px; padding-top: 4px; }
  .cb .hud-left { padding: 4px 6px; } .cb .hearts .heart { width: 13px; height: 12px; } .cb .hud-lvl { min-width: 0; padding: 3px 6px; } .cb .foe-badge { display: none; }
  .cb-panel.wrong-state .q-wordrow, .cb-panel.wrong-state .q-sub, .cb-panel.wrong-state .q-sentence, .cb-panel.wrong-state .q-verbhint, .cb-panel.wrong-state .cb-tools, .cb-panel.wrong-state .q-label, .cb-panel.wrong-state .q-badge { display: none; }
  .fb.has-osk .ex-tip { display: none; } .osk-mini .key { height: 30px; } .retype { padding: 5px; gap: 4px; } .rt-row input { min-height: 36px; }
}
