@font-face {
  font-family: "VeridixPixel";
  src: url("assets/fonts/VeridixPixel.ttf") format("truetype");
  font-display: swap;
}

:root {
  --near-black: #101412;
  --graphite: #202822;
  --green: #7cff52;
  --deep-green: #267d4b;
  --off-white: #f4f1e8;
  --gray: #bec5bb;
  --orange: #f6a23c;
  --red: #e45b5b;
  /* Le jeu a un seul look, volontaire : sombre. */
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--near-black);
  color: var(--off-white);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

#stage {
  position: fixed;
  inset: 0;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  image-rendering: pixelated;
  touch-action: none;
}

#boot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 4px),
    var(--near-black);
  transition: opacity 400ms ease;
  z-index: 2;
}
#boot.done { opacity: 0; pointer-events: none; }

.boot-card {
  width: min(560px, 100%);
  border: 2px solid var(--deep-green);
  background: var(--graphite);
  padding: 28px 28px 20px;
  box-shadow: 6px 6px 0 #0a0d0b;
}

.kicker {
  margin: 0 0 14px;
  font: 12px/1 "VeridixPixel", monospace;
  letter-spacing: 0.08em;
  color: var(--gray);
}

h1 {
  margin: 0;
  font: 44px/1.05 "VeridixPixel", monospace;
  letter-spacing: 0.02em;
}
h1 .g { color: var(--green); }

.tagline {
  margin: 14px 0 22px;
  font-style: italic;
  color: var(--gray);
}

.bar {
  height: 14px;
  border: 2px solid var(--deep-green);
  background: var(--near-black);
}
.fill {
  height: 100%;
  width: 0%;
  background: var(--green);
  transition: width 120ms linear;
}
.status {
  margin: 10px 0 0;
  font: 14px/1.4 "VeridixPixel", monospace;
  color: var(--off-white);
  min-height: 1.4em;
}

.incompatible h2 {
  margin: 0 0 8px;
  font: 20px/1.2 "VeridixPixel", monospace;
  color: var(--orange);
}
.incompatible p { line-height: 1.5; }
.incompatible pre {
  max-height: 160px;
  overflow: auto;
  white-space: pre-wrap;
  background: var(--near-black);
  padding: 8px;
  font-size: 12px;
  color: var(--red);
}
.incompatible button {
  font: 16px "VeridixPixel", monospace;
  background: var(--deep-green);
  color: var(--off-white);
  border: 0;
  padding: 10px 18px;
  cursor: pointer;
}

.small { font-size: 12px; color: var(--gray); }
.renderer { margin: 16px 0 0; }

.noscript { padding: 16px; }

@media (max-width: 480px) {
  h1 { font-size: 32px; }
  .boot-card { padding: 20px 16px 16px; }
}
