/* Nego Manga — grammaire graphique : polices, pantin, cases, formes, textes, effets pilotés par --p.
   Aucune couleur en dur ici (sauf blanc/noir neutres) : tout vient de css/styles.css. */

@font-face { font-family: "Bangers"; src: url(../fonts/Bangers-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Comic Neue"; src: url(../fonts/ComicNeue-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Comic Neue"; src: url(../fonts/ComicNeue-Bold.ttf) format("truetype"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Comic Neue"; src: url(../fonts/ComicNeue-Italic.ttf) format("truetype"); font-style: italic; font-display: swap; }

/* ---------- pantin ---------- */
.chr { display: block; overflow: visible; }
.chr .skin  { fill: var(--skin); }
.chr .hair  { fill: var(--hair); }
.chr .shirt { fill: var(--shirt); }
.chr .ink, .chr .skin, .chr .hair, .chr .shirt { stroke: var(--ink); stroke-width: var(--lw); stroke-linejoin: round; }
.chr .ink:not([fill]):not(.white) { fill: none; }
.chr .line  { fill: none; stroke: var(--ink); stroke-width: calc(var(--lw) * 1.5); stroke-linecap: round; stroke-linejoin: round; }
.chr .brow  { stroke-width: calc(var(--lw) * 1.9); }
.chr .mouth { stroke-width: calc(var(--lw) * 1.15); }
.chr .thin  { fill: none; stroke: var(--ink); stroke-width: calc(var(--lw) * .6); stroke-linecap: round; }
.chr .iris  { fill: var(--iris); }
.chr .iris.fury { fill: var(--fury); }
.chr .white { fill: #fff; }
.chr .dark  { fill: #2a0d12; stroke: var(--ink); stroke-width: var(--lw); }
.chr .tongue { fill: #d9566a; }
.chr .hi    { fill: var(--hair-hi); opacity: .9; stroke: none; }
.chr .shade { fill: var(--shade); opacity: var(--shade-op); stroke: none; }
.chr .shine { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; opacity: .7; }
.chr .acc   { fill: none; stroke: var(--accent); stroke-width: 3.6; stroke-linecap: round; }
.chr .blush { stroke-width: 2.2; }
.chr .sweat { fill: #bfe6ff; stroke: var(--ink); stroke-width: 1.6; }
.chr .tear  { fill: #bfe6ff; stroke: var(--ink); stroke-width: 1.2; }
.chr .gloom { stroke: var(--ink); stroke-width: 1.5; opacity: .6; }
.chr .spark { fill: var(--accent); stroke: var(--ink); stroke-width: 1.5; }
.chr .puff  { fill: #fff; stroke: var(--ink); stroke-width: 1.8; }
.chr .sym   { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; paint-order: stroke; }
.chr .sym-dot, .chr .dots circle { fill: var(--accent); stroke: var(--ink); stroke-width: 1.4; }
.chr .freck circle { fill: #b0603a; opacity: .75; }
.chr .glasses { stroke-width: calc(var(--lw) * .9); }
.chr .tint  { fill: #1d1b26; fill-opacity: .82; stroke: var(--ink); stroke-width: calc(var(--lw) * .9); }
.chr .lens-hi { stroke: #fff; opacity: .5; }
.chr .beard { stroke-width: calc(var(--lw) * .8); }
.chr .wr    { opacity: .55; }
.chr .aid   { fill: #e7d3b8; stroke: var(--ink); stroke-width: 1.6; }
.chr .gold  { fill: #ffcf4a; stroke: var(--ink); stroke-width: 1.4; }
.chr .chair path, .chr .chair circle { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; }
.chr .chair .rim { stroke-width: 2.5; }
.chr .cane-o { stroke: var(--ink); stroke-width: 9; stroke-linecap: round; }
.chr .cane-i { stroke: #fff; stroke-width: 4.5; stroke-linecap: round; }
.chr .cane-r { stroke: #e10600; stroke-width: 4.5; }
.chr .headset .band { fill: none; stroke: var(--ink); stroke-width: 7; }
.chr .headset .cup  { fill: var(--accent); stroke: var(--ink); stroke-width: 2.4; }
.chr .headset .boom { fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; }
.chr .headset .mic  { fill: var(--ink); }
/* silhouette (dos, décideur) : tout en aplat, liseré de contre-jour */
.chr.sil * { fill: var(--sil) !important; stroke: var(--sil-rim) !important; stroke-width: 2.4 !important; opacity: 1 !important; }
.chr.sil .thin, .chr.sil .hi, .chr.sil .shine { display: none; }

/* ---------- objets ---------- */
.prop { display: block; overflow: visible; }
.prop .ink { stroke: var(--ink); stroke-width: calc(var(--lw) * 1.2); stroke-linejoin: round; }
.prop .obj, .prop .frame { fill: var(--paper); }
.prop .frame { fill: var(--ink); }
.prop .screen { fill: var(--accent); opacity: .85; }
.prop .dial { fill: #fff; }
.prop .strap, .prop .pen, .prop .handle, .prop .saucer { fill: var(--bg-b); }
.prop .handle { fill: none; stroke-width: calc(var(--lw) * 3); }
.prop .coffee { fill: #5a3720; }
.prop .knob { fill: var(--accent); }
.prop .thin { fill: none; stroke: var(--ink); stroke-width: calc(var(--lw) * .7); stroke-linecap: round; }
.prop .hand { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.prop .acc { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.prop .buzz, .prop .motion { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.prop .puff { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; opacity: .7; }
.prop .scribble { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.prop .rings circle { fill: var(--paper); stroke: var(--ink); stroke-width: 2.5; }
[data-style="choc"] .prop .obj, [data-style="choc"] .prop .dial { fill: #fff; }
[data-style="choc"] .prop .ink, [data-style="choc"] .prop .buzz, [data-style="choc"] .prop .motion { stroke: #000; }

/* ---------- fonds ---------- */
.bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bg .bolt { fill: var(--bolt); stroke: var(--bolt-stroke); stroke-width: 2.5; stroke-linejoin: round; }
.bg .petal ellipse { fill: var(--petal); stroke: var(--ink); stroke-width: 1.6; }
.bg .heart { fill: var(--heart); stroke: var(--ink); stroke-width: 1.4; }
.bg .spark { fill: var(--spark); stroke: var(--ink); stroke-width: 1.4; }

/* ---------- cases ---------- */
.strip { background: var(--panel-gap); display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }
.panel { position: relative; height: var(--h, 240px); }
.panel > .art { position: absolute; inset: 0; overflow: hidden; background: var(--bg-a); outline: 3px solid var(--panel-line); outline-offset: -3px; }
.panel > .texts { position: absolute; inset: 0; pointer-events: none; }  /* overflow visible : débordement voulu */
.panel .actor, .panel .mover { position: absolute; inset: 0; }
.panel .actor .chr, .panel .art > .chr { position: absolute; left: var(--cx, 0); bottom: var(--cy, 0); width: var(--cw, 100%); height: var(--ch, 100%); }
.panel .actor > .prop { position: absolute; left: 50%; top: 50%; width: var(--pw, 60%); height: 86%; transform: translate(-50%, -50%); }
.sh-bande .actor > .prop { left: 28%; width: 40%; }
.duel-spark { position: absolute; left: 32%; top: 18%; width: 36%; height: 30%; overflow: visible; }
.duel-spark path { fill: var(--accent); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.flash { position: absolute; inset: 0; background: #fff; pointer-events: none; }
.fx-flash { opacity: calc(1 - var(--p, 1)); }
.no-fx .flash { display: none; }
/* jeton qui frappe la case d'action */
.token {
  position: absolute; left: 30%; top: 54%; width: 64px; height: 84px; border-radius: 10px; z-index: 3;
  background: var(--reg, #e8590c); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--ink), 4px 6px 0 var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: 800 11px/1.1 system-ui, "Segoe UI", sans-serif; color: #fff; text-align: center; rotate: -14deg;
}
.token span { font-size: 30px; line-height: 1; }
/* case jauge */
.k-gauge > .art { background: var(--paper); outline: 3px solid var(--ink); outline-offset: -3px; }
.gauges { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 10px 16px; color: var(--bubble-ink); }
[data-style="choc"] .gauges { color: #fff; }
.gauge { display: grid; grid-template-columns: 112px 1fr 38px 40px; align-items: center; gap: 10px; }
.gauge b { font: 800 11px system-ui, "Segoe UI", sans-serif; text-transform: uppercase; letter-spacing: .6px; }
.gauge .track { height: 14px; border: 2.5px solid currentColor; border-radius: 3px; position: relative; overflow: hidden; transform: skewX(-14deg); }
.gauge .fill { position: absolute; inset: 0 auto 0 0; background: var(--accent);
  width: calc((var(--from) + (var(--to) - var(--from)) * var(--p, 1)) / var(--max) * 100%); }
.gauge .count { font: 400 30px/1 var(--font-sfx); text-align: right; }
.gauge .delta { font: 400 22px/1 var(--font-sfx); color: var(--accent); -webkit-text-stroke: 1px var(--ink); opacity: var(--p, 1); translate: 0 calc((1 - var(--p, 1)) * 10px); }
/* case table : la cible */
.panel.target > .art { box-shadow: inset 0 0 0 4px var(--accent); }
.panel.target.hover > .art { box-shadow: inset 0 0 0 6px var(--accent), inset 0 0 40px var(--accent); }
.player { border-style: solid; }
/* formes */
.sh-droite > .art { clip-path: none; }
.sh-biseau-bas > .art { clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
.sh-biseau-haut > .art { clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%); }
.sh-penchee > .art { clip-path: polygon(0 8%, 100% 0, 100% 92%, 0 100%); }
.sh-eclat > .art { clip-path: var(--burst); }
.sh-bande { --h: 96px; }
.sh-pleine-page { --h: 100vh; }

/* ---------- textes ---------- */
.bubble, .shout, .think, .whisper, .caption, .sfx, .badge { position: absolute; left: var(--x, 12px); top: var(--y, 12px); }
.bubble {
  background: var(--bubble); color: var(--bubble-ink); font: var(--bub-w) 16px/1.2 var(--font-bub);
  padding: 10px 16px; border: var(--bubble-bw) solid var(--bubble-ink); border-radius: 50% / 44%;
  text-align: center; max-width: var(--mw, 62%); min-width: 72px;
}
.bubble::after {
  content: ""; position: absolute; width: 18px; height: 18px; background: var(--bubble);
  border-right: var(--bubble-bw) solid var(--bubble-ink); border-bottom: var(--bubble-bw) solid var(--bubble-ink);
  bottom: -9px; left: var(--tail, 70%); transform: rotate(35deg) skew(18deg, 18deg);
}
.bubble.tail-left::after { left: 22%; transform: rotate(55deg) skew(18deg, 18deg) scaleX(-1); }
.bubble.tail-up::after { bottom: auto; top: -9px; transform: rotate(-145deg) skew(18deg, 18deg); }
.bubble.from-edge { border-radius: 40% / 50%; }
.bubble.long { max-width: 78%; }
.outline {
  filter: drop-shadow(var(--bubble-bw) 0 0 var(--bubble-ink)) drop-shadow(calc(var(--bubble-bw) * -1) 0 0 var(--bubble-ink))
          drop-shadow(0 var(--bubble-bw) 0 var(--bubble-ink)) drop-shadow(0 calc(var(--bubble-bw) * -1) 0 var(--bubble-ink));
}
.shout > div {
  background: var(--bubble); color: var(--bubble-ink); font: 900 18px/1.05 var(--font-bub); text-transform: uppercase;
  padding: 30px 34px; text-align: center; clip-path: var(--spiky); max-width: var(--mw, 230px); letter-spacing: .3px;
}
[data-style="choc"] .shout > div { font-weight: 400; font-size: 22px; letter-spacing: 1px; }
.think > div {
  background: var(--bubble); color: var(--bubble-ink); font: italic 400 15px/1.2 var(--font-bub);
  padding: 22px 26px; text-align: center; clip-path: var(--cloud); max-width: var(--mw, 220px);
}
.think::before, .think::after {
  content: ""; position: absolute; border-radius: 50%; background: var(--bubble); border: var(--bubble-bw) solid var(--bubble-ink);
}
.think::before { width: 14px; height: 14px; right: 26%; bottom: -16px; }
.think::after  { width: 8px; height: 8px; right: 20%; bottom: -28px; }
.whisper {
  background: var(--bubble); color: var(--bubble-ink); font: 400 14px/1.2 var(--font-bub); font-style: italic;
  padding: 9px 14px; border: 2px dashed var(--bubble-ink); border-radius: 50% / 44%; text-align: center; max-width: var(--mw, 58%);
}
.caption {
  background: var(--caption-bg); color: var(--caption-ink); font: 700 12px/1.25 system-ui, "Segoe UI", sans-serif;
  font-variant: small-caps; letter-spacing: .6px; padding: 6px 10px; border: 2px solid var(--ink); max-width: var(--mw, 70%);
}
.caption.cap-tr { left: auto; right: 10px; }
.caption.cap-br { left: auto; top: auto; right: 10px; bottom: 16px; }
.caption.cap-bl { top: auto; bottom: 16px; }
.caption.center { left: 50%; transform: translateX(-50%); }
.sfx {
  font: 400 var(--fs, 56px)/0.9 var(--font-sfx); color: var(--sfx-fill); -webkit-text-stroke: 3px var(--sfx-stroke); paint-order: stroke fill;
  letter-spacing: 1px; transform: rotate(var(--rot, -12deg)); text-shadow: 4px 4px 0 var(--sfx-shadow); white-space: nowrap;
}
.badge {
  left: auto; right: var(--x, 10px); font: 800 11px/1 system-ui, "Segoe UI", sans-serif; padding: 5px 9px; border-radius: 20px;
  background: var(--badge-bg); color: var(--badge-ink); letter-spacing: .4px; text-transform: uppercase;
}

/* ---------- effets pilotés par --p (0 → 1, posé par js/scroll.js sur chaque élément) ---------- */
.fx-fade  { opacity: var(--p, 1); }
.fx-zoom  { opacity: min(1, calc(var(--p, 1) * 3)); scale: calc(.7 + .3 * var(--p, 1)); transform-origin: 60% 40%; }
.fx-pop   { opacity: min(1, calc(var(--p, 1) * 4)); scale: calc(.2 + .8 * min(1, var(--p, 1) * 1.25) + .12 * sin(var(--p, 1) * 3.1416)); }
.fx-wipe  { clip-path: inset(0 calc((1 - var(--p, 1)) * 100%) 0 0); }
.fx-slide { opacity: var(--p, 1); translate: calc((1 - var(--p, 1)) * 40px) 0; }
.fx-exit  { translate: calc(var(--p, 0) * -70%) 0; }
.fx-shake { translate: calc(sin(var(--p, 1) * 31.4) * (1 - var(--p, 1)) * 8px) calc(cos(var(--p, 1) * 25) * (1 - var(--p, 1)) * 4px); }
.fx-draw  { clip-path: circle(calc(var(--p, 1) * 75%) at 60% 45%); }
.no-fx [class*="fx-"] { --p: 1 !important; }
@media (prefers-reduced-motion: reduce) { [class*="fx-"] { --p: 1 !important; } }
