/* ICONS : styles partagés (couleurs de base et cartes). Les couleurs viennent de config.js. */
:root {
  --bg: #F2EBDD; --paper: #F8F3E8; --ink: #141210; --accent: var(--ink); --visual: #ECE3D0; --muted: #5A5248;
  --surface: var(--paper); --line: #CFC5B1; --accent-ink: var(--paper); --danger: #A3122A; --ok: #1E6B45;
  --font-title: 'Big Shoulders Display', Impact, 'Arial Narrow', sans-serif;
  --font: 'Courier Prime', 'Courier New', monospace;
  --holo: linear-gradient(125deg, #FF7AD9 0%, #7AE7FF 25%, #FFF27A 50%, #9B7BFF 75%, #FF7AD9 100%);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- Carte ---------- */
.card { container-type: inline-size; position: relative; width: 100%; aspect-ratio: 300 / 440; border-radius: 12px; box-shadow: 5px 5px 0 var(--ink); font-family: var(--font); }
.card-in { position: relative; height: 100%; min-height: 0; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 4cqw; overflow: hidden; }
.card.is-inverse .card-in { background: var(--ink); color: var(--paper); }
.card.is-holo { padding: 1.7%; background: var(--holo); border-radius: 14px; }
.card.is-holo .card-in { border-radius: 3.4cqw; }
.card-body { flex: 1; min-height: 0; padding: 4.7cqw 4.7cqw 3.3cqw; display: flex; flex-direction: column; gap: 2.7cqw; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 2cqw; }
.stamp { display: inline-flex; align-items: center; gap: 2cqw; border: 1.5px solid currentColor; border-radius: 1cqw; padding: 1cqw 2.3cqw; font-size: 3.7cqw; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.stamp svg { width: 4.3cqw; height: 4.3cqw; }
.num { font-size: 3.7cqw; font-variant-numeric: tabular-nums; }
.visual { position: relative; flex: 0 0 31.8%; border-radius: 1.3cqw; background: var(--visual); display: grid; place-items: center; overflow: hidden; }
.card.is-inverse .visual { background: #26231F; }
.visual b { font-family: var(--font-title); font-weight: 900; font-size: 36cqw; line-height: 1; letter-spacing: -0.01em; }
.card h3 { margin: 0; font-family: var(--font-title); font-weight: 900; line-height: .95; text-transform: uppercase; overflow-wrap: anywhere; }
.card h3.t1 { font-size: 10cqw; } .card h3.t2 { font-size: 8.7cqw; } .card h3.t3 { font-size: 7.3cqw; } .card h3.t4 { font-size: 6.3cqw; }
.sub { font-size: 3.8cqw; font-weight: 700; }
.ctx { margin: 0; font-size: 3.8cqw; line-height: 1.35; overflow-wrap: anywhere; }
.rail { flex: 0 0 12cqw; display: flex; justify-content: space-between; align-items: center; padding: 0 4.7cqw; border-top: 2px solid var(--ink); background: var(--rail, var(--visual)); color: var(--ink); }
.rail .pips { display: flex; gap: 1.3cqw; }
.rail .pips i { width: 3cqw; height: 3cqw; border-radius: 50%; border: 1.5px solid var(--ink); }
.rail .pips i.on { background: var(--ink); }
.rail strong { font-family: var(--font-title); font-weight: 900; font-size: 6cqw; letter-spacing: .08em; text-transform: uppercase; }
/* Billet (catégories marquées billet dans config.js) */
.perf { position: relative; border-top: 2px dashed #8C8274; margin: 0 2cqw; }
.notch { position: absolute; width: 6.7cqw; height: 6.7cqw; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); top: -3.7cqw; }
.notch.l { left: -5.7cqw; } .notch.r { right: -5.7cqw; }
.stub { flex: 0 0 17cqw; display: flex; justify-content: space-between; align-items: center; padding: 0 4.7cqw; font-size: 3.6cqw; }
.barcode { width: 20cqw; height: 8.7cqw; background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 4px, currentColor 4px 5px, transparent 5px 8px); }
.yetais { position: absolute; right: 3cqw; bottom: 3cqw; transform: rotate(-10deg); border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 1.3cqw; padding: 1.3cqw 2.7cqw; font-size: 4.2cqw; font-weight: 700; letter-spacing: .12em; }
/* Carte à trouver */
.card.locked { box-shadow: none; }
.card.locked .card-in { background: transparent; border-style: dashed; color: var(--muted); }
.card.locked .visual { background: transparent; border: 1.5px dashed var(--line); }
.card.locked.is-holo { background: none; padding: 0; }
.card.legend-flash { animation: flash 1.2s ease-out 1; }
@keyframes flash { 0% { box-shadow: 5px 5px 0 var(--ink), 0 0 0 0 rgba(20,18,16,.45); } 100% { box-shadow: 5px 5px 0 var(--ink), 0 0 0 18px rgba(20,18,16,0); } }
@media (prefers-reduced-motion: reduce) { .card.legend-flash { animation: none; } }
