@font-face { font-family: 'Bangers'; src: url('../fonts/bangers-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bangers'; src: url('../fonts/bangers-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Comic Neue'; font-weight: 400; src: url('../fonts/comic-neue-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Comic Neue'; font-weight: 700; src: url('../fonts/comic-neue-latin-700-normal.woff2') format('woff2'); }

:root {
  --ink: #141414; --paper: #fbf5e6; --paper2: #f1e7cf; --yellow: #ffd23f; --cap: #fff3a8;
  --A: #1d6fd1; --B: #d7263d; --good: #2a9d4b; --muted: #6b6152;
  --b: 3px solid var(--ink); --shadow: 4px 4px 0 var(--ink);
  --dots: radial-gradient(rgba(0,0,0,.13) 1.1px, transparent 1.4px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Comic Neue', 'Comic Sans MS', sans-serif; color: var(--ink); background: var(--paper);
  background-image: var(--dots); background-size: 7px 7px; font-size: 17px; line-height: 1.3;
  user-select: none; -webkit-user-select: none; overscroll-behavior: none;
}
input, textarea, select { user-select: text; -webkit-user-select: text; font: inherit; }
h1, h2, h3, .bang { font-family: 'Bangers', Impact, sans-serif; font-weight: 400; letter-spacing: .04em; margin: 0; }
button { font: inherit; }

/* ---------- briques comics ---------- */
.panel { background: #fff; border: var(--b); box-shadow: var(--shadow); position: relative; }
.panel.tone { background-color: #fff; background-image: var(--dots); background-size: 6px 6px; }
.caption { background: var(--cap); border: var(--b); padding: 6px 10px; font-weight: 700; font-size: .92em; }
.caption.dark { background: var(--ink); color: #fff; }
.tag { display: inline-block; font-family: 'Bangers'; letter-spacing: .05em; background: var(--ink); color: #fff; padding: 2px 8px 0; border-radius: 3px; font-size: 15px; }
.bubble {
  position: relative; background: #fff; border: var(--b); border-radius: 22px / 18px; padding: 12px 16px;
  font-weight: 700; box-shadow: 3px 3px 0 rgba(0,0,0,.85);
}
.bubble::after { content: ''; position: absolute; left: 34px; bottom: -19px; width: 22px; height: 20px; background: #fff;
  border-right: var(--b); border-bottom: var(--b); transform: skewX(-38deg) rotate(8deg); border-bottom-right-radius: 4px; }
.bubble.up::after { bottom: auto; top: -19px; transform: skewX(38deg) rotate(188deg); }
.bubble.think { border-radius: 40px; }

.btn {
  font-family: 'Bangers', Impact, sans-serif; letter-spacing: .06em; font-size: 20px; border: var(--b); background: var(--yellow);
  color: var(--ink); padding: 8px 16px 6px; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; border-radius: 4px; transition: transform .05s;
}
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn.red { background: var(--B); color: #fff; } .btn.blue { background: var(--A); color: #fff; }
.btn.white { background: #fff; } .btn.black { background: var(--ink); color: #fff; } .btn.green { background: var(--good); color: #fff; }
.btn.small { font-size: 16px; padding: 5px 10px 3px; box-shadow: 2px 2px 0 var(--ink); }
.btn.big { font-size: 26px; padding: 12px 22px 9px; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn.block { width: 100%; display: block; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hide { display: none !important; }

/* ---------- dés ---------- */
.die {
  --c: var(--A); width: 46px; height: 46px; border-radius: 9px; background: var(--c); border: var(--b); display: inline-grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 5px; box-shadow: 2px 2px 0 var(--ink); position: relative; flex: none;
}
.die.B { --c: var(--B); } .die.A { --c: var(--A); }
.die i { width: 9px; height: 9px; background: #fff; border-radius: 50%; place-self: center; visibility: hidden; border: 1.5px solid rgba(0,0,0,.4); }
.die.v1 i:nth-child(5), .die.v2 i:nth-child(1), .die.v2 i:nth-child(9), .die.v3 i:nth-child(1), .die.v3 i:nth-child(5), .die.v3 i:nth-child(9),
.die.v4 i:nth-child(1), .die.v4 i:nth-child(3), .die.v4 i:nth-child(7), .die.v4 i:nth-child(9),
.die.v5 i:nth-child(1), .die.v5 i:nth-child(3), .die.v5 i:nth-child(5), .die.v5 i:nth-child(7), .die.v5 i:nth-child(9),
.die.v6 i:nth-child(1), .die.v6 i:nth-child(3), .die.v6 i:nth-child(4), .die.v6 i:nth-child(6), .die.v6 i:nth-child(7), .die.v6 i:nth-child(9) { visibility: visible; }
.die.big { width: 86px; height: 86px; padding: 9px; border-radius: 14px; }
.die.big i { width: 16px; height: 16px; }
.die.sm { width: 30px; height: 30px; padding: 3px; border-radius: 6px; border-width: 2px; }
.die.sm i { width: 6px; height: 6px; border-width: 1px; }
.die.pick { cursor: pointer; outline: 4px dashed transparent; outline-offset: 3px; }
.die.pick.ok { outline-color: var(--good); animation: wob .9s infinite; }
.die.pick.sel { outline: 4px solid var(--yellow); }
.die.dim { opacity: .3; }
@keyframes wob { 50% { transform: rotate(-6deg) scale(1.05); } }

/* ---------- objectifs (post-it) ---------- */
.obj {
  background: #fff8b8; border: var(--b); box-shadow: 5px 5px 0 rgba(0,0,0,.85); padding: 10px 12px 12px; position: relative;
  transform: rotate(var(--rot, -1deg)); display: flex; flex-direction: column; gap: 8px; min-width: 260px;
}
.obj::before { content: ''; position: absolute; top: -12px; left: 50%; width: 90px; height: 22px; margin-left: -45px; background: rgba(255,255,255,.7);
  border: 1px solid rgba(0,0,0,.25); transform: rotate(3deg); }
.obj h3 { font-size: 26px; line-height: 1.05; text-align: center; padding: 4px 6px 0; }
.obj .sides { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.obj .side { border: var(--b); background: #fff; padding: 6px; display: flex; flex-direction: column; gap: 6px; align-items: center; position: relative; }
.obj .side.A { border-color: var(--A); box-shadow: inset 0 6px 0 var(--A); }
.obj .side.B { border-color: var(--B); box-shadow: inset 0 6px 0 var(--B); }
.obj .side.lead { background-image: var(--dots); background-size: 5px 5px; background-color: #fffbe0; }
.obj .side .lbl { font-family: 'Bangers'; font-size: 18px; letter-spacing: .05em; }
.obj .side.A .lbl { color: var(--A); } .obj .side.B .lbl { color: var(--B); }
.obj .tot { font-family: 'Bangers'; font-size: 34px; line-height: 1; }
.obj .dice { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 2px solid var(--ink); border-radius: 20px; padding: 0 8px 0 3px; font-weight: 700; font-size: 13px; background: #fff; }
.chip .dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ink); }
.claimflag { font-family: 'Bangers'; font-size: 14px; padding: 2px 7px 0; border: 2px solid var(--ink); color: #fff; border-radius: 3px; }
.stakes { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.coin { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ink); align-items: center; justify-content: center; font-family: 'Bangers'; font-size: 15px; color: #fff; }
.coin.debt { background: #8a1c1c; } .coin.narr { background: #111; color: var(--yellow); } .coin.insp { background: #f9c80e; color: var(--ink); border-radius: 6px; }

/* ---------- onomatopées / effets ---------- */
.burst {
  position: fixed; left: 50%; top: 50%; z-index: 90; pointer-events: none; transform: translate(-50%, -50%) scale(.2) rotate(-8deg);
  width: min(78vw, 640px); aspect-ratio: 1.6; display: grid; place-items: center; opacity: 0;
}
.burst svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(6px 6px 0 #000); }
.burst .t { position: relative; font-family: 'Bangers'; font-size: clamp(40px, 9vw, 96px); color: #fff; -webkit-text-stroke: 3px #000; text-shadow: 4px 4px 0 #000; text-align: center; line-height: .95; }
.burst .t small { display: block; font-size: .36em; -webkit-text-stroke: 1px #000; text-shadow: 2px 2px 0 #000; max-width: 80%; margin: 0 auto; }
.burst.go { animation: pow 1.5s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes pow { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.2) rotate(-14deg); } 18% { opacity: 1; transform: translate(-50%,-50%) scale(1.05) rotate(-4deg); }
  75% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(-4deg); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.2) rotate(-4deg); } }
.rollfx { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; pointer-events: none; }
.rollfx .box { display: flex; align-items: center; gap: 26px; padding: 22px 30px; background: #fff; border: 4px solid #000; box-shadow: 8px 8px 0 #000; transform: rotate(-2deg); animation: popin .25s ease-out; }
.rollfx .arrow { font-family: 'Bangers'; font-size: 54px; }
.rollfx .tumble { animation: tumble .55s ease-out; }
@keyframes tumble { 0% { transform: rotate(-540deg) scale(.3); } 100% { transform: none; } }
@keyframes popin { from { transform: scale(.4) rotate(-10deg); opacity: 0; } }

/* ---------- feuilles/modales ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(20,20,20,.55); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--paper); background-image: var(--dots); background-size: 7px 7px; border: 4px solid var(--ink); border-bottom: 0; width: min(760px, 100%); max-height: 92vh; overflow: auto;
  padding: 16px 16px 26px; box-shadow: 0 -6px 0 rgba(0,0,0,.3); animation: up .18s ease-out; }
.sheet.center { border-bottom: 4px solid var(--ink); margin: auto; align-self: center; }
.sheet h2 { font-size: 30px; margin-bottom: 8px; }
.sheet .x { position: sticky; top: 0; float: right; z-index: 2; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 99; background: var(--B); color: #fff; border: var(--b); padding: 10px 16px; font-weight: 700; box-shadow: var(--shadow); max-width: 92vw; animation: up .2s; }
.toast.ok { background: var(--good); }

/* ---------- fiche de personnage ---------- */
.csheet { display: flex; flex-direction: column; gap: 10px; }
.cs-head { display: flex; gap: 12px; align-items: stretch; }
.cs-art { width: 108px; min-height: 108px; border: var(--b); background-color: var(--pc, #ffd23f); background-image: radial-gradient(rgba(255,255,255,.45) 1.5px, transparent 1.8px); background-size: 6px 6px; flex: none; overflow: hidden; position: relative; }
.cs-art img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; display: block; }
.cs-name { font-family: 'Bangers'; font-size: 30px; line-height: 1; }
.cs-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cs-col { border: var(--b); background: #fff; display: flex; flex-direction: column; }
.cs-col > h4 { margin: 0; font-family: 'Bangers'; font-weight: 400; background: var(--ink); color: #fff; padding: 3px 6px 0; font-size: 15px; letter-spacing: .05em; }
.ab { display: flex; align-items: center; gap: 6px; padding: 6px 6px; border-top: 1.5px dashed #bbb; min-height: 44px; font-size: 14.5px; line-height: 1.1; position: relative; }
.ab:first-of-type { border-top: 0; }
.ab .v { flex: none; width: 28px; height: 28px; border: var(--b); display: grid; place-items: center; font-family: 'Bangers'; font-size: 20px; background: #fff; }
.ab.pw .v { background: #ffd9d9; }
.ab .t { flex: 1; }
.ab .k { flex: none; font-size: 15px; }
.ab.struck { opacity: .35; text-decoration: line-through; }
.ab.used .t { text-decoration: line-through; color: #888; }
.ab.used .k::after { content: '☒'; }
.ab.ok { background: #e9ffe3; cursor: pointer; }
.ab.ok:active { background: var(--yellow); }
.ab.no { opacity: .55; }
.motifs { display: flex; gap: 4px; justify-content: space-between; }
.motif { flex: 1; text-align: center; border: var(--b); border-radius: 50% 50% 46% 46%; padding: 6px 2px 4px; background: radial-gradient(circle at 35% 30%, #fff, #cfcfcf); min-width: 0; }
.motif.vil { background: radial-gradient(circle at 35% 30%, #ddd, #7d7d7d); color: #fff; text-shadow: 1px 1px 0 #000; }
.motif b { display: block; font-family: 'Bangers'; font-size: clamp(10px, 2.9vw, 14px); font-weight: 400; overflow: hidden; text-overflow: ellipsis; letter-spacing: .03em; }
.motif .n { font-family: 'Bangers'; font-size: 22px; }
.motif .d { font-size: 12px; font-weight: 700; color: #8a1c1c; background: #fff; border-radius: 9px; padding: 0 5px; border: 1.5px solid #000; text-shadow: none; }

/* ---------- liste de choix ---------- */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.choice { border: var(--b); background: #fff; padding: 8px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); font-weight: 700; }
.choice small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; line-height: 1.15; margin-top: 3px; }
.choice.sel { background: var(--yellow); }
.choice.pw { border-left: 8px solid var(--B); } .choice.sk { border-left: 8px solid var(--A); } .choice.pe { border-left: 8px solid #8e44ad; }
.stepper { display: inline-flex; align-items: center; border: var(--b); background: #fff; }
.stepper button { border: 0; background: var(--yellow); font-family: 'Bangers'; font-size: 22px; width: 38px; height: 38px; }
.stepper span { width: 34px; text-align: center; font-family: 'Bangers'; font-size: 22px; }
input.txt, textarea.txt, select.txt { border: var(--b); padding: 9px 10px; background: #fff; width: 100%; font-size: 18px; border-radius: 0; }

/* ---------- BD ---------- */
.bdpanel { border: var(--b); background-color: var(--bg, #ffd23f); background-image: radial-gradient(rgba(0,0,0,.26) 1.4px, transparent 1.7px); background-size: 7px 7px; position: relative; overflow: hidden; }
.bdpanel img { width: 100%; height: 100%; object-fit: cover; display: block; mix-blend-mode: multiply; filter: contrast(1.1); }
.bdpanel .num { position: absolute; top: 6px; left: 6px; background: #fff; border: var(--b); font-family: 'Bangers'; font-size: 22px; padding: 2px 9px 0; z-index: 2; }
.bdpanel .ttl { position: absolute; top: 6px; right: 6px; left: 56px; text-align: right; z-index: 2; }
.bdpanel .ttl span { background: #fff; border: var(--b); font-family: 'Bangers'; font-size: 22px; padding: 2px 9px 0; display: inline-block; transform: rotate(-1.5deg); }
.comicbook { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.comicbook .cell { display: flex; flex-direction: column; border: var(--b); background: #fff; box-shadow: var(--shadow); }
.comicbook .cell .bdpanel { border: 0; border-bottom: var(--b); height: 170px; }
.comicbook .cell .caption { border: 0; border-top: 0; font-weight: 400; font-size: 15px; }
.comicbook .cell.now { outline: 6px solid var(--B); }
.comicbook .part { grid-column: 1 / -1; font-family: 'Bangers'; font-size: 34px; background: var(--ink); color: var(--yellow); padding: 6px 12px 2px; transform: rotate(-.6deg); }
@media (max-width: 600px) { .comicbook { grid-template-columns: 1fr; } }

.qr { background: #fff; border: var(--b); padding: 10px; display: inline-block; }
.qr img, .qr canvas { display: block; image-rendering: pixelated; }
.pill { display: inline-flex; gap: 4px; align-items: center; font-weight: 700; }
.logline { font-size: 13.5px; padding: 3px 0; border-bottom: 1px dotted #aaa; }
.logline.big { font-weight: 700; }

/* ---------- icônes ---------- */
.ic { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; line-height: 0; flex: none; }
.ic svg { width: 100%; height: 100%; display: block; }
.ic.big { width: 40px; height: 40px; }
.btn .ic { width: 1.05em; height: 1.05em; vertical-align: -0.15em; }
.btn.mic { padding: 6px 10px 4px; background: #fff; }
.btn.mic .ic { width: 26px; height: 26px; color: var(--B); }
.objline { display: flex; gap: 6px; align-items: stretch; }
.objline .txt { flex: 1; min-width: 0; }
.objline .btn .ic { width: 26px; height: 26px; }

/* ---------- carte "maintenant" ---------- */
.now { background: #fff; border: var(--b); box-shadow: var(--shadow); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.now.hot { background: #fffbe0; border-width: 4px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 4px 4px 0 var(--ink), 0 0 0 5px rgba(215,38,61,.35); } }
.now-h { display: flex; align-items: center; gap: 10px; }
.now-h .ic.big { color: var(--B); }
.now-h h2 { font-size: 28px; line-height: 1; }
.hint { margin: 0; color: var(--muted); font-weight: 700; font-size: 15px; }
.waitline { background: var(--cap); border: 2.5px solid var(--ink); padding: 7px 10px; font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.greenchip { background: #e9ffe3; border: 1.5px solid #000; padding: 0 5px; }
.claimrow { display: flex; align-items: center; gap: 8px; border-bottom: 1.5px dashed #bbb; padding-bottom: 6px; }
.claimrow .btn { min-width: 56px; font-size: 24px; }

/* ---------- barre des phases ---------- */
.phasebar { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.phasebar .ph { display: flex; align-items: center; gap: 6px; border: var(--b); background: #fff; padding: 4px 10px 3px; font-family: 'Bangers'; font-size: 19px; letter-spacing: .04em; opacity: .55; white-space: nowrap; }
.phasebar .ph .ic { width: 24px; height: 24px; }
.phasebar .ph.on { opacity: 1; background: var(--pc); box-shadow: 3px 3px 0 #000; transform: rotate(-1.5deg) scale(1.06); }
.phasebar .arr { font-family: 'Bangers'; opacity: .5; }
.phasebar .dots { display: inline-flex; gap: 3px; margin-left: 2px; }
.phasebar .dots b { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #000; background: #fff; }
.phasebar .dots b.auto { border-style: dotted; background: transparent; }
.phasebar .dots b.on { background: var(--B); }

/* ---------- cartes de règle ---------- */
.rules .part { grid-column: 1 / -1; font-family: 'Bangers'; font-size: 32px; background: var(--ink); color: var(--pc, var(--yellow)); padding: 6px 12px 2px; transform: rotate(-.6deg); margin: 16px 0 10px; display: flex; gap: 10px; align-items: center; }
.rules .part .ic { width: 32px; height: 32px; }
.stepcard { display: flex; flex-direction: column; border: var(--b); background: #fff; box-shadow: var(--shadow); }
.stepcard .bdpanel { border: 0; border-bottom: var(--b); }
.stepcard.now { outline: 6px solid var(--B); }
.stepcard.isauto { background: #f4f4f4; }
.sc-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 5px; }
.sc-short { font-family: 'Bangers'; font-size: 22px; line-height: 1.05; letter-spacing: .02em; }
.sc-line { font-size: 14.5px; font-weight: 700; display: flex; gap: 6px; align-items: flex-start; }
.sc-line .ic { width: 18px; height: 18px; margin-top: 1px; }
.sc-line.app { color: #2a6e3f; }
details { font-size: 14px; color: #333; }
details summary { cursor: pointer; font-weight: 700; color: var(--muted); list-style: none; }
details summary::-webkit-details-marker { display: none; }
.autotag { position: absolute; bottom: 6px; right: 6px; background: #2a9d4b; color: #fff; border: 2px solid #000; font-family: 'Bangers'; font-size: 15px; padding: 2px 7px 0; z-index: 2; }
.autotag .ic { width: 15px; height: 15px; }
.bdpanel .ttl span .ic { width: 20px; height: 20px; }
@media (max-width: 700px) { .phasebar { flex-wrap: wrap; } .phasebar .arr { display: none; } .phasebar .ph { font-size: 16px; } }

/* ---------- générique ---------- */
.intro { position: fixed; inset: 0; z-index: 200; background: #141414; background-image: radial-gradient(rgba(255,255,255,.09) 1.6px, transparent 1.9px); background-size: 9px 9px; overflow: hidden; transition: opacity .6s; }
.intro.out { opacity: 0; }
.i-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.i-skip { position: absolute; right: 14px; bottom: 14px; z-index: 5; }
.i-start { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; background: rgba(0,0,0,.6); }
.i-logo { font-family: 'Bangers'; font-size: clamp(80px, 20vw, 200px); color: var(--yellow); -webkit-text-stroke: 4px #000; text-shadow: 8px 8px 0 #000; transform: rotate(-4deg); line-height: .9; letter-spacing: .05em; position: relative; }
.i-card { position: absolute; text-align: center; color: #fff; animation: icard .7s cubic-bezier(.2,1.5,.4,1) both; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 20px; }
.i-card.leave, .i-panel.leave { animation: ileave .6s ease-in forwards; }
.i-pre { font-family: 'Bangers'; font-size: clamp(36px, 7vw, 72px); letter-spacing: .08em; color: #fff; text-shadow: 4px 4px 0 var(--B); }
.i-sub { font-family: 'Bangers'; font-size: clamp(22px, 4vw, 38px); color: var(--yellow); letter-spacing: .06em; }
.i-burst { position: relative; width: min(90vw, 760px); aspect-ratio: 1.6; display: grid; place-items: center; animation: ispin 4s ease-out; }
.i-burst svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(10px 10px 0 #000); }
.i-credits { font-size: clamp(15px, 2.2vw, 22px); line-height: 1.6; color: #fff; max-width: 820px; animation: iroll 7s linear both; }
.i-credits b { font-family: 'Bangers'; font-size: 1.8em; color: var(--yellow); letter-spacing: .05em; }
.i-panel { position: absolute; width: min(88vw, 980px); height: min(78vh, 620px); border: 6px solid #000; background: #fff; box-shadow: 14px 14px 0 rgba(0,0,0,.6); }
.i-panel.from-l { animation: ipanelL .8s cubic-bezier(.2,1.3,.4,1) both; }
.i-panel.from-r { animation: ipanelR .8s cubic-bezier(.2,1.3,.4,1) both; }
.i-img { position: absolute; inset: 0; overflow: hidden; background-image: radial-gradient(rgba(0,0,0,.28) 1.6px, transparent 1.9px); background-size: 8px 8px; }
.i-img img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; animation: kenburns 5s ease-out both; }
.i-cap { position: absolute; left: -10px; top: 18px; max-width: 70%; background: var(--cap); border: 4px solid #000; box-shadow: 5px 5px 0 #000; padding: 12px 18px; transform: rotate(-1.5deg); animation: icap .5s .35s both; }
.i-cap span { font-family: 'Bangers'; font-size: clamp(24px, 4.2vw, 46px); line-height: 1.05; letter-spacing: .03em; }
.i-bam { position: absolute; right: -30px; bottom: -30px; width: min(42vw, 360px); aspect-ratio: 1.6; display: grid; place-items: center; animation: ibam .6s .8s cubic-bezier(.2,1.8,.4,1) both; }
.i-bam svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(6px 6px 0 #000); }
.i-bam span { position: relative; font-family: 'Bangers'; font-size: clamp(30px, 6vw, 64px); color: #fff; -webkit-text-stroke: 2.5px #000; text-shadow: 4px 4px 0 #000; transform: rotate(-8deg); }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.16) translate(-1.5%, 1%); } }
@keyframes ipanelL { from { transform: translateX(-120vw) rotate(-8deg); } to { transform: rotate(-1deg); } }
@keyframes ipanelR { from { transform: translateX(120vw) rotate(8deg); } to { transform: rotate(1deg); } }
@keyframes ileave { to { transform: translateY(120vh) rotate(12deg); opacity: .3; } }
@keyframes icard { from { transform: scale(.3); opacity: 0; } }
@keyframes icap { from { transform: scale(0) rotate(-12deg); } }
@keyframes ibam { from { transform: scale(0) rotate(30deg); } }
@keyframes ispin { from { transform: scale(.2) rotate(-40deg); } 60% { transform: scale(1.05) rotate(2deg); } to { transform: none; } }
@keyframes iroll { from { transform: translateY(40px); opacity: 0; } 12% { opacity: 1; transform: none; } }
.focus { animation: focuspulse 1s infinite !important; position: relative; z-index: 3; }
@keyframes focuspulse { 0%,100% { box-shadow: 0 0 0 4px #d7263d, 3px 3px 0 #000; } 50% { box-shadow: 0 0 0 9px rgba(215,38,61,.35), 3px 3px 0 #000; } }
a.btn { text-decoration: none; display: inline-block; }

/* ---------- générique cinématique ---------- */
.cine { position: fixed; inset: 0; z-index: 200; background: #0d0d0d; overflow: hidden; transition: opacity .7s; color: #fff; }
.cine.out { opacity: 0; }
.c-stage, .c-shot { position: absolute; inset: 0; }
.c-shot { overflow: hidden; }
.c-bar { position: absolute; left: 0; right: 0; height: 8vh; background: #000; z-index: 8; }
.c-bar.top { top: 0; } .c-bar.bot { bottom: 0; }
.c-grain { position: absolute; inset: 0; z-index: 6; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.06) 1.2px, transparent 1.5px); background-size: 6px 6px; animation: grain .4s steps(2) infinite; mix-blend-mode: screen; }
@keyframes grain { 50% { background-position: 3px 2px; } }
.c-vign { position: absolute; inset: 0; z-index: 7; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.7)); }
.c-fx { position: absolute; inset: 0; z-index: 9; pointer-events: none; opacity: 0; }
.c-fx.flash.go { background: #fff; animation: cflash .45s ease-out; }
@keyframes cflash { 0% { opacity: .95; } 100% { opacity: 0; } }
.c-fx.wipe.go { background: repeating-linear-gradient(115deg, #ffd23f 0 40px, #000 40px 52px); animation: cwipe .6s ease-in-out; }
@keyframes cwipe { 0% { opacity: 1; transform: translateX(-110%); } 50% { opacity: 1; transform: translateX(0); } 100% { opacity: 1; transform: translateX(110%); } }
.c-skip { position: absolute; right: 14px; bottom: calc(8vh + 10px); z-index: 12; }
.c-start { position: absolute; inset: 0; z-index: 14; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; background: #0d0d0d; }
.c-center { position: absolute; inset: 8vh 4vw; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4vh; text-align: center; }
.c-small { font-family: 'Bangers'; font-size: clamp(30px, 6vw, 70px); letter-spacing: .1em; text-shadow: 4px 4px 0 #d7263d; }
.c-tiny { font-family: 'Bangers'; font-size: clamp(20px, 3vw, 34px); color: #ffd23f; letter-spacing: .1em; }
.c-big { font-family: 'Bangers'; font-size: clamp(38px, 7vw, 92px); line-height: 1; letter-spacing: .03em; max-width: 90vw; }
.c-huge { font-family: 'Bangers'; font-size: clamp(56px, 11vw, 150px); line-height: .9; color: #fff; -webkit-text-stroke: 3px #000; text-shadow: 6px 6px 0 #d7263d; animation: slam .55s cubic-bezier(.2,1.6,.4,1) both; }
.c-line { font-family: 'Bangers'; font-size: clamp(24px, 3.6vw, 46px); letter-spacing: .04em; animation: rise .6s ease-out both; }
.c-line.sm { font-family: 'Comic Neue'; font-weight: 700; font-size: clamp(16px, 2.2vw, 26px); letter-spacing: 0; color: #ddd; }
.kw { display: inline-block; animation: kwin .5s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes kwin { from { opacity: 0; transform: translateY(30px) scale(.6) rotate(-6deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes slam { from { opacity: 0; transform: scale(3) rotate(-8deg); } }
.c-cap { position: absolute; left: 5vw; top: 12vh; z-index: 4; max-width: 60vw; background: var(--cap); color: #000; border: 4px solid #000; box-shadow: 6px 6px 0 #000; padding: 1.4vh 1.6vw; font-family: 'Bangers'; font-size: clamp(22px, 3.4vw, 44px); line-height: 1.05; letter-spacing: .03em; transform: rotate(-1.2deg); animation: capin .5s cubic-bezier(.2,1.5,.4,1) both; }
.c-cap.low { top: auto; bottom: 12vh; left: auto; right: 5vw; transform: rotate(1deg); }
.c-cap b { color: #d7263d; font-weight: 400; }
@keyframes capin { from { opacity: 0; transform: scale(0) rotate(-12deg); } }
/* page de BD qui se monte */
.c-cam { position: absolute; inset: 0; display: grid; place-items: center; }
@keyframes camPage { from { transform: scale(.82) rotate(-2deg); } to { transform: scale(1.18) translate(4%, 4%) rotate(1deg); } }
.c-page { width: min(86vw, 150vh); height: 72vh; display: grid; grid-template: 1.1fr 1fr / 1fr 1fr; gap: 1.4vh; padding: 1.4vh; background: #fff; border: 5px solid #000; }
.c-pan { position: relative; overflow: hidden; border: 4px solid #000; background-color: var(--bg); background-image: radial-gradient(rgba(0,0,0,.28) 1.5px, transparent 1.8px); background-size: 8px 8px; animation: panin .5s cubic-bezier(.2,1.4,.4,1) both; }
.c-pan.p1 { grid-column: 1 / -1; }
.c-pan img, .c-full img, .c-case img, .c-cut img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; display: block; }
@keyframes panin { from { opacity: 0; transform: translateY(-60px) scale(1.15) rotate(3deg); } }
/* table et joueurs */
.c-table { position: absolute; left: 8vw; top: 50%; width: min(40vw, 60vh); aspect-ratio: 1; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(circle, #3a2a1a, #1d140c); border: 5px solid #000; box-shadow: 0 0 0 6px #5b4129; animation: rise .8s ease-out both; }
.c-tab { position: absolute; left: 50%; top: 50%; width: 34%; height: 24%; transform: translate(-50%,-50%) rotate(-4deg); background: #fff8b8; border: 4px solid #000; display: grid; place-items: center; color: #000; }
.c-tab svg { width: 50%; height: 70%; }
.c-seat { position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; margin: -11% 0 0 -11%; border-radius: 50%; background: var(--c); border: 4px solid #000; transform: rotate(var(--a)) translate(0, -175%) rotate(calc(-1 * var(--a))); display: grid; place-items: center; animation: seat .5s cubic-bezier(.2,1.6,.4,1) both; }
.c-seat i { width: 62%; height: 62%; color: #000; display: block; } .c-seat i svg { width: 100%; height: 100%; }
@keyframes seat { from { opacity: 0; transform: rotate(var(--a)) translate(0, -320%) rotate(calc(-1 * var(--a))) scale(.3); } }
.c-side { position: absolute; right: 6vw; top: 50%; transform: translateY(-50%); width: 42vw; display: flex; flex-direction: column; gap: 3vh; }
/* plein cadre */
.c-full { position: absolute; inset: 0; background-color: var(--bg); background-image: radial-gradient(rgba(0,0,0,.3) 1.6px, transparent 1.9px); background-size: 9px 9px; }
.c-full.dim::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.45); }
@keyframes kb { from { transform: scale(1.04); } to { transform: scale(1.2) translate(-2%, 1%); } }
@keyframes kbIn { from { transform: scale(1.3); } to { transform: scale(1); } }
.c-stamp { position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%) rotate(-6deg); font-family: 'Bangers'; font-size: clamp(60px, 12vw, 170px); line-height: .85; text-align: center; color: #d7263d; -webkit-text-stroke: 4px #000; text-shadow: 8px 8px 0 #000; animation: stamp .5s cubic-bezier(.2,1.7,.4,1) both; z-index: 3; }
@keyframes stamp { from { opacity: 0; transform: translate(-50%,-50%) scale(4) rotate(-20deg); } }
/* emboîtement scène > pages > cases */
@keyframes camNest { 0%, 22% { transform: scale(.9); } 50% { transform: scale(1.9); } 58% { transform: scale(1.9); } 85%, 100% { transform: scale(4.2) translate(-9%, 4%); } }
.c-scene { position: relative; width: 84vw; height: 66vh; border: 6px solid #ffd23f; padding: 4vh 1.5vw 1.5vw; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2vw; background: rgba(255,210,63,.07); }
.c-lbl { position: absolute; top: -3.4vh; left: 1vw; font-family: 'Bangers'; font-size: 4vh; background: #ffd23f; color: #000; padding: .2vh 1vw 0; border: 3px solid #000; }
.c-lbl.sm { font-size: 2.4vh; top: -2.4vh; background: #9fd3ff; }
.c-pg { position: relative; border: 4px solid #9fd3ff; padding: 2.4vh .6vw .6vw; background: #fff; }
.c-cases { display: grid; grid-template: 1fr 1fr / 1fr 1fr; gap: .5vw; height: 100%; }
.c-case { overflow: hidden; border: 3px solid #000; background-color: var(--bg); background-image: radial-gradient(rgba(0,0,0,.28) 1.2px, transparent 1.5px); background-size: 6px 6px; }
.c-steps { position: absolute; left: 0; right: 0; bottom: 11vh; display: flex; justify-content: center; gap: 4vw; z-index: 4; }
.c-steps span { font-family: 'Bangers'; font-size: clamp(26px, 4vw, 52px); background: #000; padding: .4vh 1.2vw 0; border: 3px solid #ffd23f; animation: rise .5s ease-out both; }
.c-steps b { color: #ffd23f; font-weight: 400; }
/* objectif */
.c-postit { position: absolute; left: 50%; top: 44%; width: min(56vw, 640px); transform: translate(-50%,-50%) rotate(-2deg); background: #fff8b8; color: #000; border: 5px solid #000; box-shadow: 10px 10px 0 #000; padding: 2vh 2vw; text-align: center; z-index: 3; animation: fly .8s cubic-bezier(.2,1.3,.4,1) .3s both; }
.c-postit > b { font-family: 'Bangers'; font-size: clamp(28px, 4.5vw, 58px); font-weight: 400; display: block; }
@keyframes fly { from { opacity: 0; transform: translate(80%,-160%) rotate(40deg) scale(.5); } }
.c-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5vw; margin-top: 1.5vh; }
.c-sides > div { border: 4px solid; padding: 1vh; display: flex; align-items: center; justify-content: space-around; font-family: 'Bangers'; font-size: 5vh; }
.c-sides .A { border-color: #1d6fd1; color: #1d6fd1; } .c-sides .B { border-color: #d7263d; color: #d7263d; }
.c-die { position: relative; width: 9vh; height: 9vh; border: 4px solid #000; border-radius: 1.4vh; color: #fff; display: grid; place-items: center; animation: dropdie .5s cubic-bezier(.2,1.6,.4,1) both; }
.c-die.A { background: #1d6fd1; } .c-die.B { background: #d7263d; }
.c-die em { position: absolute; font-style: normal; font-family: 'Bangers'; font-size: 6vh; }
.c-die em:first-child { animation: dieout .2s 3s forwards; }
.c-die em:last-child { opacity: 0; animation: diein .4s cubic-bezier(.2,1.8,.4,1) forwards; }
@keyframes dropdie { from { opacity: 0; transform: translateY(-40vh) rotate(-360deg); } }
@keyframes dieout { to { opacity: 0; } }
@keyframes diein { from { opacity: 1; transform: scale(2.4) rotate(30deg); } to { opacity: 1; transform: none; } }
/* bulle Raconte */
.c-tell { width: min(34vh, 40vw); aspect-ratio: 1.1; background: #ffd23f; border: 6px solid #000; border-radius: 50% 50% 46% 46% / 52% 52% 44% 44%; display: grid; place-items: center; color: #000; box-shadow: 10px 10px 0 #d7263d; position: relative; animation: slam .6s cubic-bezier(.2,1.6,.4,1) both, wobble 1.4s 1s ease-in-out infinite; }
.c-tell::after { content: ''; position: absolute; left: 18%; bottom: -12%; width: 18%; height: 22%; background: #ffd23f; border-right: 6px solid #000; border-bottom: 6px solid #000; transform: skewX(-30deg) rotate(10deg); }
.c-tell svg { width: 62%; height: 62%; }
@keyframes wobble { 50% { transform: rotate(-5deg) scale(1.05); } }
/* montage */
.c-montage { position: absolute; inset: 0; }
.c-cut { position: absolute; inset: 0; background-color: var(--bg); background-image: radial-gradient(rgba(0,0,0,.3) 1.6px, transparent 1.9px); background-size: 9px 9px; opacity: 0; animation: cutshow .85s linear both; }
.c-cut img { animation: kb .85s linear both; }
@keyframes cutshow { 0% { opacity: 1; transform: scale(1.08); } 95% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
.c-bam { position: absolute; left: 50%; top: 52%; width: min(70vw, 760px); aspect-ratio: 1.6; transform: translate(-50%,-50%) rotate(-6deg); display: grid; place-items: center; }
.c-bam svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(8px 8px 0 #000); }
.c-bam span { position: relative; font-family: 'Bangers'; font-size: clamp(50px, 10vw, 130px); color: #fff; -webkit-text-stroke: 4px #000; text-shadow: 6px 6px 0 #000; }
/* logo final */
.c-logo { position: relative; width: min(84vw, 820px); aspect-ratio: 1.6; display: grid; place-items: center; animation: slam .6s cubic-bezier(.2,1.6,.4,1) both; }
.c-logo.static { animation: none; width: min(80vw, 600px); }
.c-logo svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(10px 10px 0 #d7263d); }
.c-logo span { position: relative; font-family: 'Bangers'; font-size: clamp(70px, 15vw, 190px); color: #d7263d; -webkit-text-stroke: 4px #000; text-shadow: 8px 8px 0 #000; transform: rotate(-5deg); letter-spacing: .05em; }
.shake { animation: shake .5s .1s; }
@keyframes shake { 20% { transform: translate(-12px, 6px); } 40% { transform: translate(10px, -8px); } 60% { transform: translate(-6px, 4px); } 80% { transform: translate(4px, -2px); } }
.c-credits { font-size: clamp(15px, 2.1vw, 23px); line-height: 1.6; max-width: 880px; animation: rise 1s ease-out both; }
.c-credits b { font-family: 'Bangers'; font-size: 1.8em; color: #ffd23f; letter-spacing: .05em; font-weight: 400; }
@media (orientation: portrait) {
  .c-table { left: 50%; top: 30%; width: 62vw; transform: translate(-50%,-50%); }
  .c-side { left: 6vw; right: 6vw; width: auto; top: auto; bottom: 11vh; transform: none; text-align: center; }
  .c-page { height: 56vh; }
  .c-cap { max-width: 84vw; }
  .c-steps { flex-direction: column; align-items: center; gap: 1vh; }
  .c-scene { width: 92vw; height: 50vh; }
}

/* ---------- bulle "Raconte !" ---------- */
.tell { display: inline-flex; align-items: center; gap: 4px; background: #ffd23f; border: 2.5px solid #000; border-radius: 14px 14px 14px 3px; padding: 1px 8px 0 5px; font-family: 'Bangers'; font-size: 15px; letter-spacing: .04em; color: #000; vertical-align: middle; box-shadow: 2px 2px 0 #000; white-space: nowrap; }
.tell .ic { width: 18px; height: 18px; }
.tell.only { padding: 2px 4px; }
.tell.lg { font-size: 22px; padding: 3px 12px 1px 7px; } .tell.lg .ic { width: 26px; height: 26px; }
.tellnote { display: flex; gap: 8px; align-items: flex-start; font-weight: 700; font-size: 15px; }
.c-sides .c-die { color: #fff; }
.c-steps { bottom: auto; top: 10vh; }
@media (orientation: portrait) { .c-steps { top: 9vh; } }

/* ---------- habilleur ---------- */
.du { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 14px; align-items: start; }
@media (max-width: 620px) { .du { grid-template-columns: 1fr; } .du-prev { max-width: 220px; margin: 0 auto; } }
.du-prev { position: sticky; top: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.du-prev svg { width: 100%; border: var(--b); box-shadow: var(--shadow); background: #ffd23f; }
.du-panel { display: flex; flex-direction: column; gap: 10px; }
.du-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.du-row b { display: block; font-family: 'Bangers'; font-weight: 400; font-size: 17px; letter-spacing: .04em; margin-bottom: 4px; }
.du-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.du-c { width: 34px; height: 34px; border: 3px solid #000; border-radius: 50%; cursor: pointer; }
.du-c.on { outline: 4px solid var(--B); outline-offset: 2px; }
.du-t { border: 2.5px solid #000; background: #fff; padding: 5px 9px; font-weight: 700; font-size: 14px; cursor: pointer; }
.du-t.on { background: var(--yellow); box-shadow: 2px 2px 0 #000; }
.du-s { width: 42px; height: 42px; border: 2.5px solid #000; background: #fff; cursor: pointer; font-size: 18px; display: grid; place-items: center; }
.du-s .ic { width: 28px; height: 28px; }
.du-s.on { background: var(--yellow); }
.cs-art svg.doll { width: 100%; height: 100%; display: block; }
.artpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.artpick .cs-art { width: 100%; height: 110px; min-height: 0; cursor: pointer; }
.artpick .cs-art.on { outline: 5px solid var(--B); }
.choice .thumb { display: block; width: 100%; height: 90px; object-fit: cover; object-position: 50% 20%; border: 2px solid #000; margin-bottom: 5px; background: #eee; }

.bdgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.bdpick { border: var(--b); background: #fff; cursor: pointer; box-shadow: 3px 3px 0 #000; display: flex; flex-direction: column; }
.bdpick img, .bdpick .none { width: 100%; aspect-ratio: 1.46; object-fit: cover; display: block; border-bottom: var(--b); }
.bdpick .none { display: grid; place-items: center; font-size: 40px; background: #eee; }
.bdpick span { font-family: 'Bangers'; font-size: 16px; padding: 4px 8px 2px; letter-spacing: .03em; }
.bdpick.on { outline: 5px solid var(--B); }
#board.hasbg { background-size: cover; background-position: center; position: relative; }
#board.hasbg::before { content: ''; position: absolute; inset: 0; background: rgba(251,245,230,.18); pointer-events: none; }
#board.hasbg #objs { position: relative; }
.bgtitle { position: sticky; top: 0; z-index: 2; display: inline-block; margin-bottom: 10px; }
