/* Space & Dream — styles du site. */
@font-face {
  font-family: "Aquiline Two";
  src: url("../assets/fonts/aquilinetwo.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  /* Un seul monde visuel, par choix : 1 bit, noir et blanc. */
  --noir: #000000;
  --blanc: #f4f4f0;
  --gris: #8a8a86;
  --trait: #3a3a38;
  --font-ui: "VT323", "Courier New", ui-monospace, monospace;
  /* Mise en page : la scène occupe tout l'écran, le texte reste dans les coins. */
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--noir);
  color: var(--blanc);
  font-family: var(--font-ui);
  font-size: 18px;
  line-height: 1.15;
  overflow: hidden;
  -webkit-font-smoothing: none;
}
#scene { position: fixed; inset: 0; cursor: grab; touch-action: none; }
#scene:active { cursor: grabbing; }
#scene canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }

.marque {
  position: fixed; left: 50%; top: 44%;
  transform: translate(-50%, -50%);
  width: min(353px, 70vw, 68vh);
  pointer-events: none;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; justify-items: center;
  letter-spacing: 0.14em; text-align: center;
}
.marque .logo { position: relative; width: 100%; }
.marque img { display: block; width: 100%; height: auto; filter: invert(1); }
.marque img.halo { position: absolute; inset: 0; filter: blur(6px) invert(1); }
.marque span { color: var(--blanc); white-space: nowrap; font-size: clamp(12px, min(4.2vw, 5vh), 18px); }
@media (orientation: portrait) and (max-width: 600px) {
  .marque { top: 28%; }
}

.reglages {
  position: fixed; right: 18px; top: 56px;
  max-height: calc(100% - 72px); overflow-y: auto;
  display: grid; gap: 6px;
  padding: 10px 12px;
  background: var(--noir);
  border: 1px solid var(--trait);
  max-width: calc(100% - 36px);
}
.reglages[hidden] { display: none; }
.reglages label {
  display: grid; grid-template-columns: 9ch 130px 4ch; gap: 10px; align-items: center;
}
.bascule {
  font: inherit; color: var(--blanc); background: var(--noir);
  border: 1px solid var(--trait); padding: 4px 8px; text-align: left; cursor: pointer;
}
.bascule[aria-pressed="true"] { background: var(--blanc); color: var(--noir); }
.bascule:focus-visible { outline: 1px solid var(--blanc); outline-offset: 3px; }
.coin { position: fixed; top: 16px; right: 18px; letter-spacing: 0.08em; }
.coin[aria-expanded="true"] { background: var(--blanc); color: var(--noir); }
.reglages label.inactif { color: var(--trait); }
.reglages output { color: var(--gris); font-variant-numeric: tabular-nums; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 14px; background: transparent; margin: 0; width: 100%;
}
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--trait); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--trait); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 8px; height: 14px; margin-top: -6px;
  background: var(--blanc); border: 0; border-radius: 0;
}
input[type="range"]::-moz-range-thumb {
  width: 8px; height: 14px; background: var(--blanc); border: 0; border-radius: 0;
}
input[type="range"]:focus-visible { outline: 1px solid var(--blanc); outline-offset: 3px; }

.discret {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0;
}
.discret:focus-visible {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: auto; height: auto; clip: auto; clip-path: none; padding: 4px 10px;
  font: inherit; color: var(--blanc); background: var(--noir); border: 1px solid var(--blanc);
}
.mot { position: fixed; inset: 0; }
.mot[hidden] { display: none; }
.zone { position: absolute; display: block; cursor: pointer; }
.zone:focus-visible { outline: 1px solid var(--blanc); outline-offset: 6px; }
.marque { transition: opacity 500ms ease; }
body.lecture .marque { opacity: 0; }

.panne {
  position: fixed; inset: 0; display: none; place-items: center; padding: 24px; text-align: center;
}
.panne.visible { display: grid; }

@media (max-width: 520px) {
  .reglages label { grid-template-columns: 9ch 1fr 4ch; }
}
