/* Printer Fury 2000 : feuille de style Frutiger Aero, sans dépendance */

:root {
  --ink: #0d2b45;
  --ink-2: #2c5576;
  --navy: #0b3d6b;
  --blue: #1576c9;
  --green: #3a9d14;
  --green-dark: #2c7a0c;
  --gold-ink: #7a4a00;
  --font: "Segoe UI", "Lucida Grande", Tahoma, Verdana, sans-serif;
  --mono: Consolas, "Lucida Console", "Courier New", monospace;
  --glass: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.6));
  --glass-border: 1px solid rgba(255,255,255,0.95);
  --shadow: 0 12px 36px rgba(0,60,120,0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #3ea8ec 0%, #8fd5ff 34%, #e6f7ff 60%, #c4ec8e 76%, #6cbf2a 100%);
  background-color: #8fd5ff;
  position: relative;
  overflow-x: hidden;
}
a { color: #0b4f8a; }
a:hover { color: #06335c; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
kbd {
  font-family: var(--mono);
  padding: 1px 6px;
  border-radius: 4px;
  background: linear-gradient(180deg, #fff, #dfeaf3);
  border: 1px solid #9cb7cc;
  box-shadow: 0 1px 0 #9cb7cc;
  font-size: 0.9em;
}
button { font-family: inherit; }
:focus-visible { outline: 3px solid #ffb000; outline-offset: 2px; }

/* ---------- Décor ---------- */
.decor { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.09) 0 1px, transparent 1px 4px);
}
.sun {
  position: absolute; right: -160px; top: -200px; width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,240,0.95) 0%, rgba(255,250,210,0.55) 18%, rgba(255,255,255,0.18) 42%, transparent 70%);
}
.flare { position: absolute; border-radius: 50%; }
.flare-a { right: 360px; top: 250px; width: 60px; height: 60px; background: radial-gradient(circle, rgba(255,255,255,0.55), transparent 70%); }
.flare-b { right: 520px; top: 360px; width: 26px; height: 26px; background: radial-gradient(circle, rgba(200,255,200,0.6), transparent 70%); }
.aurora { position: absolute; left: 0; top: 40px; width: 100%; height: 620px; }
.aurora path { fill: none; stroke-linecap: round; }
.bubble {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, rgba(255,255,255,0.95) 0 10%, rgba(255,255,255,0.25) 22%, rgba(120,200,255,0.15) 60%, rgba(255,255,255,0.6) 100%);
  border: 1px solid rgba(255,255,255,0.7);
  animation: float 9s ease-in-out infinite;
}
.bubble:nth-of-type(2n) { animation-duration: 12s; animation-delay: -3s; }
.bubble:nth-of-type(3n) { animation-duration: 15s; animation-delay: -6s; }
.bubble-green { background: radial-gradient(circle at 30% 28%, rgba(255,255,255,0.95) 0 10%, rgba(255,255,255,0.25) 22%, rgba(160,255,160,0.15) 60%, rgba(255,255,255,0.6) 100%); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
.hills { position: absolute; left: 0; bottom: 0; width: 100%; height: 230px; }

/* ---------- Mise en page ---------- */
.page {
  position: relative; z-index: 1;
  max-width: 1120px; margin: 0 auto;
  padding: 24px 16px 240px;
  display: flex; flex-direction: column; gap: 32px;
}
main { display: flex; flex-direction: column; gap: 32px; }
.glass {
  position: relative;
  background: var(--glass);
  border: var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 #fff;
}
.dots { background-image: radial-gradient(rgba(140,190,230,0.22) 1px, transparent 1.6px); background-size: 12px 12px; }
.muted { color: var(--ink-2); font-size: 14px; }
.fine { font-size: 13px; color: var(--ink-2); }
.green { color: var(--green); }

/* ---------- Boutons gel ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600; line-height: 1.1;
  text-decoration: none; cursor: pointer;
  transition: transform .08s ease, filter .15s ease;
  user-select: none;
}
.btn:hover { filter: brightness(1.06) saturate(1.1); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn[disabled] { cursor: not-allowed; filter: grayscale(0.8) opacity(0.6); }
.btn-blue {
  color: #fff; text-shadow: 0 1px 1px rgba(0,40,90,0.5);
  background: linear-gradient(180deg, #8fd6ff 0%, #2f9be8 50%, #1576c9 51%, #3fa8f0 100%);
  border: 1px solid #0f5fa3;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 2px 6px rgba(0,60,120,0.25);
}
.btn-blue:hover { color: #fff; }
.btn-white {
  color: var(--navy);
  background: linear-gradient(180deg, #fff 0%, #e8f4ff 50%, #d2e9fb 51%, #f2f9ff 100%);
  border: 1px solid #9cc6e8;
  box-shadow: inset 0 1px 0 #fff;
}
.btn-white:hover { color: var(--navy); }
.btn-green {
  color: #fff; text-shadow: 0 1px 1px rgba(0,60,0,0.5);
  background: linear-gradient(180deg, #c8f78e 0%, #6ccd28 50%, #3a9d14 51%, #74d830 100%);
  border: 1px solid var(--green-dark);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), inset 0 -3px 6px rgba(20,80,0,0.3), 0 6px 16px rgba(40,110,10,0.35);
}
.btn-green:hover { color: #fff; }
.btn-red {
  color: #fff; text-shadow: 0 1px 1px rgba(90,0,0,0.5);
  background: linear-gradient(180deg, #ffb3a6 0%, #e8513a 50%, #c22a12 51%, #e8513a 100%);
  border: 1px solid #8a1a0a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-xl { padding: 16px 32px; font-size: 18px; font-weight: 700; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.btn-icon { padding: 10px 12px; }
#sound-toggle .ico-off { display: none; }
#sound-toggle[aria-pressed="false"] .ico-on { display: none; }
#sound-toggle[aria-pressed="false"] .ico-off { display: inline; }

/* ---------- En-tête ---------- */
.topbar {
  overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.5) 50%, rgba(215,238,255,0.6) 51%, rgba(255,255,255,0.75) 100%);
}
.shine {
  position: absolute; left: 40%; top: -40px; width: 70px; height: 160px; transform: rotate(25deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  pointer-events: none;
}
.brand { position: relative; display: flex; align-items: center; gap: 12px; text-decoration: none; }
.orb {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 28%, #fff 0 12%, #7fe3ff 30%, #1a8fe0 72%, #0b5fa8 100%);
  box-shadow: inset 0 -5px 9px rgba(0,40,90,0.4), 0 3px 8px rgba(0,60,120,0.3);
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; color: var(--navy); }
.brand-name sup { font-size: 13px; color: var(--blue); }
.brand-tag { font-size: 13px; color: var(--ink-2); }
.nav { position: relative; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Hero ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; padding: 8px 4px; }
.hero-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 16px; }
.badge {
  align-self: flex-start; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
}
.badge-gold {
  color: var(--gold-ink);
  background: linear-gradient(180deg, #fffbe0 0%, #ffe680 50%, #ffcc33 51%, #ffe27a 100%);
  border: 1px solid #e0a800; box-shadow: inset 0 1px 0 #fff;
}
h1 {
  font-size: clamp(40px, 7vw, 64px); line-height: 1.02; font-weight: 800; letter-spacing: -1.8px;
  color: #fff;
  text-shadow: 0 2px 0 #0b5fa8, 0 4px 0 #0a4f8e, 0 10px 22px rgba(0,50,110,0.45);
}
.lead { font-size: 19px; line-height: 1.5; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.cancel-msg { min-height: 1.4em; font-size: 14px; color: var(--ink-2); font-style: italic; }
.hero-visual { flex: 1 1 380px; display: flex; justify-content: center; }

/* ---------- Fenêtres façon Vista ---------- */
.window {
  position: relative; width: 100%; max-width: 420px;
  border-radius: 10px 10px 8px 8px; overflow: hidden;
  background: rgba(255,255,255,0.55);
  border: var(--glass-border);
  box-shadow: 0 14px 40px rgba(0,50,110,0.3), 0 0 0 6px rgba(255,255,255,0.25);
}
.titlebar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #8fd2f8 0%, #3496e0 50%, #1a74c2 51%, #3d9be3 100%);
  color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 1px rgba(0,40,90,0.5);
}
.winbtns { display: flex; gap: 4px; }
.wb {
  display: block; width: 18px; height: 16px; padding: 0; border-radius: 3px;
  background: linear-gradient(180deg, rgba(255,255,255,0.67), rgba(255,255,255,0.2));
  border: 1px solid rgba(255,255,255,0.67);
}
.wb-close { background: linear-gradient(180deg, #ffb3a6 0%, #e8513a 50%, #c22a12 51%, #e8513a 100%); border-color: #8a1a0a; }
button.wb { width: 44px; height: 24px; cursor: pointer; position: relative; }
button.wb::before, button.wb::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: #fff; border-radius: 1px;
}
button.wb::before { transform: translate(-50%,-50%) rotate(45deg); }
button.wb::after { transform: translate(-50%,-50%) rotate(-45deg); }
.window-body {
  position: relative; padding: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  background-color: #eef7fd;
  background-image: radial-gradient(rgba(140,190,230,0.22) 1px, transparent 1.6px), linear-gradient(180deg, #f7fcff, #e0f0fc);
  background-size: 12px 12px, auto;
}
.drop {
  position: absolute; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 35% 30%, #fff 0 18%, rgba(170,215,255,0.4) 45%, rgba(255,255,255,0.15) 100%);
  border: 1px solid rgba(120,180,230,0.5);
}
.alert {
  width: 100%; padding: 12px 14px; border-radius: 8px;
  background: linear-gradient(180deg, #fffbe6, #fff1bf);
  border: 1px solid #e5c24a; box-shadow: inset 0 1px 0 #fff;
  font-size: 14px; line-height: 1.45; color: #5a4200;
}
.progress {
  width: 100%; height: 18px; border-radius: 9px; overflow: hidden;
  background: linear-gradient(180deg, #e9f2f9, #fff);
  border: 1px solid #9cc6e8; box-shadow: inset 0 2px 3px rgba(0,50,100,0.15);
}
.progress-fill {
  width: 63%; height: 100%;
  background: repeating-linear-gradient(-45deg, rgba(255,255,255,0.28) 0 6px, transparent 6px 12px),
              linear-gradient(180deg, #c8f78e 0%, #6ccd28 50%, #3a9d14 51%, #74d830 100%);
  background-size: 17px 17px, auto;
  animation: stripes 1s linear infinite;
  transition: width .4s ease;
}
.progress-fill.hot {
  background: repeating-linear-gradient(-45deg, rgba(255,255,255,0.28) 0 6px, transparent 6px 12px),
              linear-gradient(180deg, #ffd3a0 0%, #ff8a1f 50%, #e0520a 51%, #ff9a3a 100%);
  background-size: 17px 17px, auto;
}
@keyframes stripes { to { background-position: 17px 0, 0 0; } }

/* ---------- Panneaux & cartes ---------- */
.panel {
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px; border-radius: 22px; overflow: hidden;
}
.panel h2 { font-size: 24px; font-weight: 800; color: var(--navy); }
#jeux h2 { font-size: 30px; }
.panel > p { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.dots-strong {
  background-image: radial-gradient(rgba(255,255,255,0.5) 1px, transparent 1.6px), linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.5));
  background-size: 14px 14px, auto;
}
.panel-gloss {
  position: absolute; left: 0; right: 0; top: 0; height: 70px;
  background: linear-gradient(180deg, rgba(255,255,255,0.75), transparent);
  pointer-events: none;
}
.panel-head { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.cards { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #eef8ff 100%);
  border: 1px solid #b9dcf5;
  box-shadow: 0 4px 12px rgba(0,60,120,0.1), inset 0 1px 0 #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,60,120,0.18), inset 0 1px 0 #fff; }
.card h3 { font-size: 20px; color: var(--navy); }
.card p { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tile {
  position: relative; overflow: hidden; height: 110px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 -4px 10px rgba(0,40,90,0.25);
}
.tile::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.1));
}
.tile svg { position: relative; }
.tile-orange { background: radial-gradient(circle at 50% 120%, #ffe27a 0%, #ff8a1f 45%, #2c8fdc 46%, #7cc7f5 100%); }
.tile-blue { background: repeating-linear-gradient(90deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 10px), linear-gradient(180deg, #a8e6ff 0%, #3aa7ea 100%); }
.tile-green { background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.35) 0 12px, transparent 13px), radial-gradient(circle at 80% 30%, rgba(255,255,255,0.3) 0 8px, transparent 9px), linear-gradient(180deg, #c9f59a 0%, #4fb51a 100%); }
.pill { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill-green { color: #1d5a0a; background: linear-gradient(180deg, #f0fde4, #d2f0b3); border: 1px solid #8fcf5c; }
.pill-gold { color: var(--gold-ink); background: linear-gradient(180deg, #fffbe6, #ffe9a6); border: 1px solid #e0a800; }
.pill-blue { color: var(--navy); background: linear-gradient(180deg, #f0f8ff, #cfe6fb); border: 1px solid #8fbfe8; }

.duo { display: flex; flex-wrap: wrap; gap: 20px; }
.duo > .panel { flex: 1 1 320px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 12px; border-radius: 12px; }
.stat-num { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 13px; color: var(--ink-2); }
.stat-blue { background: linear-gradient(180deg, #fff 0%, #f2f9ff 50%, #e2f1fd 51%, #f4faff 100%); border: 1px solid #b9dcf5; }
.stat-blue .stat-num { color: var(--blue); }
.stat-green { background: linear-gradient(180deg, #fff 0%, #f6fdef 50%, #e7f7d6 51%, #f6fdef 100%); border: 1px solid #b6e09a; }
.stat-green .stat-num { color: var(--green-dark); }
.stat-gold { background: linear-gradient(180deg, #fff 0%, #fffbea 50%, #fff2c4 51%, #fffbea 100%); border: 1px solid #ecd27a; }
.stat-gold .stat-num { color: #9a6200; }

/* ---------- Pied de page ---------- */
.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; border-radius: 14px;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 6px),
              linear-gradient(180deg, rgba(40,110,30,0.78) 0%, rgba(20,80,15,0.82) 50%, rgba(10,60,10,0.88) 51%, rgba(25,85,20,0.88) 100%);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  color: #f0ffe6; font-size: 13px;
}

/* ---------- Imprimante SVG ---------- */
.printer-slot { width: 220px; max-width: 100%; }
.printer { display: block; width: 100%; height: auto; overflow: visible; }
.p-lcd { font-family: var(--mono); font-size: 8.5px; font-weight: 700; fill: #9cff7a; letter-spacing: 0.3px; }
.p-led-green { fill: #9fdc5a; }
.p-led-red { fill: #ff3b2f; }
.printer.blink .p-led-red { animation: blink .6s steps(2) infinite; }
@keyframes blink { 50% { fill: #5a1a14; } }
.p-dmg, .p-smoke { opacity: 0; transition: opacity .2s; }
.p-jam { opacity: 0; }
.printer.jammed .p-jam { opacity: 1; }
.printer[data-dmg="1"] .p-dmg1,
.printer[data-dmg="2"] .p-dmg1, .printer[data-dmg="2"] .p-dmg2,
.printer[data-dmg="3"] .p-dmg, .printer[data-dmg="4"] .p-dmg { opacity: 1; }
.printer[data-dmg="3"] .p-smoke, .printer[data-dmg="4"] .p-smoke { opacity: 1; }
.p-smoke circle { fill: rgba(90,100,110,0.45); transform-box: fill-box; transform-origin: center; animation: smoke 1.6s ease-out infinite; }
.p-smoke circle:nth-child(2) { animation-delay: -.5s; }
.p-smoke circle:nth-child(3) { animation-delay: -1s; }
@keyframes smoke { from { transform: translateY(6px) scale(.6); opacity: .9; } to { transform: translateY(-22px) scale(1.4); opacity: 0; } }
.printer[data-dmg="2"] .p-paper, .printer[data-dmg="3"] .p-paper, .printer[data-dmg="4"] .p-paper { transform: rotate(-8deg) translate(-6px, 4px); transform-origin: 110px 54px; }
.printer[data-dmg="3"] .p-tray, .printer[data-dmg="4"] .p-tray { transform: rotate(6deg) translate(4px, 10px); transform-origin: 30px 130px; }
.p-paper, .p-tray { transition: transform .25s ease; }
.p-all { transform-origin: 110px 100px; }
.printer.shake .p-all { animation: shake .25s ease; }
@keyframes shake {
  0% { transform: translate(0,0) rotate(0); }
  25% { transform: translate(-5px,2px) rotate(-2deg); }
  50% { transform: translate(4px,-2px) rotate(2deg); }
  75% { transform: translate(-3px,1px) rotate(-1deg); }
  100% { transform: translate(0,0) rotate(0); }
}
.printer.boom .p-all { animation: boom .9s ease-in forwards; }
@keyframes boom {
  0% { transform: scale(1); opacity: 1; }
  30% { transform: scale(1.15) rotate(3deg); opacity: 1; }
  100% { transform: scale(0.2) rotate(-40deg) translateY(80px); opacity: 0; }
}
.printer.enter .p-all { animation: enter .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes enter { from { transform: translateY(-60px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Fenêtre de jeu ---------- */
.stage { max-width: none; scroll-margin-top: 16px; }
.stage-body {
  position: relative; min-height: 460px; padding: 20px;
  background-color: #eef7fd;
  background-image: radial-gradient(rgba(140,190,230,0.22) 1px, transparent 1.6px), linear-gradient(180deg, #f7fcff, #dcedfa);
  background-size: 12px 12px, auto;
  display: flex; flex-direction: column; gap: 16px;
}
.hud { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.hud-item { font-size: 14px; color: var(--ink-2); }
.hud-item strong { font-size: 18px; color: var(--navy); font-variant-numeric: tabular-nums; }
.meter { flex: 1 1 200px; display: flex; flex-direction: column; gap: 4px; }
.meter-label { font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: .5px; }
.arena { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.target {
  position: relative; padding: 0; border: 0; background: none; cursor: crosshair;
  width: min(320px, 80%);
  border-radius: 20px;
  -webkit-tap-highlight-color: transparent;
}
.target:focus-visible { outline-offset: 6px; }
.model-name { text-align: center; font-weight: 700; color: var(--navy); font-size: 16px; }
.weapons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.weapons .btn[aria-pressed="true"] {
  color: #fff; text-shadow: 0 1px 1px rgba(0,60,0,0.5);
  background: linear-gradient(180deg, #c8f78e 0%, #6ccd28 50%, #3a9d14 51%, #74d830 100%);
  border-color: var(--green-dark);
}
.weapon-dmg { font-size: 11px; opacity: .8; font-weight: 700; }
.lock { font-size: 11px; font-weight: 700; }

/* Particules */
.fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.chip {
  position: absolute; left: 0; top: 0; width: 10px; height: 10px;
  animation: fly .8s cubic-bezier(.15,.6,.4,1) forwards;
}
.chip-paper { width: 14px; height: 18px; background: #fff; border: 1px solid #b8c7d4; border-radius: 1px; }
.chip-screw { width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #8796a5); }
.chip-toner { width: 9px; height: 9px; border-radius: 50%; background: #1b1f24; }
.chip-plastic { width: 12px; height: 7px; background: #c8d3dc; border: 1px solid #7d93a8; border-radius: 2px; }
@keyframes fly {
  0% { transform: translate(var(--x0), var(--y0)) rotate(0); opacity: 1; }
  100% { transform: translate(calc(var(--x0) + var(--dx)), calc(var(--y0) + var(--dy))) rotate(var(--rot)); opacity: 0; }
}
.dmg-pop {
  position: absolute; left: 0; top: 0; font-weight: 800; font-size: 20px; color: #fff;
  text-shadow: 0 2px 0 #c22a12, 0 0 8px rgba(255,80,40,0.7);
  animation: pop .7s ease-out forwards; white-space: nowrap;
}
@keyframes pop { from { transform: translate(var(--x0), var(--y0)); opacity: 1; } to { transform: translate(var(--x0), calc(var(--y0) - 50px)); opacity: 0; } }
.flash {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle, rgba(255,250,200,0.95), rgba(255,160,40,0.6) 40%, transparent 70%);
  animation: flash .7s ease-out forwards;
}
@keyframes flash { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(1.6); } }

/* File d'attente infernale */
.queue-area {
  position: relative; flex: 1; min-height: 380px; overflow: hidden;
  border-radius: 14px; border: 1px solid #b9dcf5;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.15) 0 1px, transparent 1px 4px), linear-gradient(180deg, #bfe7ff 0%, #f2fbff 75%, #d8f3bf 100%);
  touch-action: manipulation;
}
.queue-printer { position: absolute; left: 50%; bottom: 6px; width: 150px; transform: translateX(-50%); }
.queue-line { position: absolute; left: 0; right: 0; bottom: 104px; border-top: 2px dashed rgba(194,42,18,0.45); }
.job {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center; gap: 8px;
  max-width: 230px; min-height: 44px; padding: 6px 10px 6px 6px;
  border-radius: 10px; cursor: pointer;
  font-size: 12px; text-align: left; color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, #f3f8fc 50%, #e4eef6 51%, #f6fafd 100%);
  border: 1px solid #9cc6e8; box-shadow: 0 4px 10px rgba(0,50,110,0.18);
  will-change: transform;
}
.job .k {
  flex: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 800; font-size: 15px; color: #fff;
  border-radius: 8px;
  background: linear-gradient(180deg, #8fd6ff 0%, #2f9be8 50%, #1576c9 51%, #3fa8f0 100%);
  border: 1px solid #0f5fa3;
}
.job .meta { display: flex; flex-direction: column; overflow: hidden; }
.job .fname { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job .pages { color: var(--ink-2); font-size: 11px; }
.job.ghost { background: linear-gradient(180deg, #f6eefe, #e5d6f7); border-color: #b49ad8; }
.job.ghost .k { background: linear-gradient(180deg, #d9c2f7 0%, #9a6ad8 50%, #7a45c2 51%, #a27be0 100%); border-color: #5a2f99; }
.job.urgent .k { background: linear-gradient(180deg, #ffb3a6 0%, #e8513a 50%, #c22a12 51%, #e8513a 100%); border-color: #8a1a0a; }
.job.gone { animation: jobgone .3s ease-out forwards; pointer-events: none; }
@keyframes jobgone { to { opacity: 0; filter: blur(3px); } }
.overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(220,240,255,0.55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.dialog {
  width: min(420px, 100%);
  display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center;
  padding: 24px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(236,246,255,0.95));
  border: 1px solid #fff; box-shadow: 0 14px 40px rgba(0,50,110,0.3);
}
.dialog h3 { font-size: 24px; color: var(--navy); }
.dialog p { color: var(--ink-2); line-height: 1.5; }
.dialog .big { font-size: 40px; font-weight: 800; color: var(--blue); font-variant-numeric: tabular-nums; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* Ticket de 17h29 */
.ticket-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.ticket-side { flex: 1 1 200px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ticket-side .printer-slot { width: 200px; }
.ticket-main { flex: 3 1 340px; display: flex; flex-direction: column; gap: 14px; }
.call {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: 14px;
  background: linear-gradient(180deg, #fff, #eef7ff);
  border: 1px solid #b9dcf5; box-shadow: inset 0 1px 0 #fff;
}
.avatar {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 20px;
  background: radial-gradient(circle at 35% 28%, #fff 0 10%, #ffcf6a 30%, #ff8a1f 75%, #c25a00 100%);
  box-shadow: inset 0 -4px 8px rgba(120,50,0,0.35);
}
.call-who { font-weight: 700; color: var(--navy); }
.call-text { line-height: 1.5; margin-top: 4px; }
.choices { display: flex; flex-direction: column; gap: 8px; }
/* réponse choisie */
.choices .btn.chosen { filter: none; opacity: 1; border-color: #1576c9; box-shadow: 0 0 0 3px rgba(21,118,201,0.3), inset 0 1px 0 #fff; }
.choices .btn { justify-content: flex-start; text-align: left; border-radius: 14px; padding: 12px 16px; font-size: 15px; }
.ticket-main > .btn { align-self: flex-start; }
.outcome { padding: 14px; border-radius: 12px; line-height: 1.5; background: linear-gradient(180deg, #f3fde9, #dff5c8); border: 1px solid #8fcf5c; }
.outcome.bad { background: linear-gradient(180deg, #fff1ee, #ffd9d2); border-color: #e8907e; }
.outcome.meh { background: linear-gradient(180deg, #fffbe6, #fff1bf); border-color: #e5c24a; }
.clock { font-family: var(--mono); font-size: 22px; font-weight: 800; color: #9cff7a; background: #1d3a28; padding: 4px 12px; border-radius: 8px; border: 1px solid #0e1f15; box-shadow: inset 0 2px 4px rgba(0,0,0,0.4); }
.timer { width: 100%; height: 10px; border-radius: 5px; overflow: hidden; background: #e3eef7; border: 1px solid #b9dcf5; }
.timer-fill { height: 100%; width: 100%; background: linear-gradient(180deg, #8fd6ff, #1576c9); transform-origin: left center; }
.timer-fill.low { background: linear-gradient(180deg, #ffb3a6, #c22a12); }

/* Toast easter egg */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  width: min(460px, calc(100% - 32px));
  padding: 14px 16px; border-radius: 12px;
  font-family: var(--mono); font-size: 13px; line-height: 1.5; white-space: pre-line;
  color: #9cff7a; background: rgba(16,36,26,0.92);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 12px 30px rgba(0,30,10,0.4);
}

/* Page 404 */
.page-404 { min-height: 100vh; align-items: center; justify-content: center; padding-bottom: 24px; }
.page-404 .window { max-width: 480px; }
.page-404 .window-body { text-align: center; }
.h404 { font-size: 96px; color: #fff; text-shadow: 0 3px 0 #0b5fa8, 0 10px 22px rgba(0,50,110,0.45); }

/* ---------- Petits écrans ---------- */
@media (max-width: 640px) {
  .page { gap: 24px; padding-bottom: 180px; }
  .topbar { padding: 12px 14px; }
  .brand-name { font-size: 20px; }
  .lead { font-size: 17px; }
  .panel { padding: 18px; }
  .stage-body { padding: 14px; }
  .job { max-width: 180px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}
