/* Le thème du lanceur (crates/dq9-launcher/src/theme.rs) : nuit bleu profond,
   accents dorés ; et les fenêtres des menus du jeu, bleu nuit à cadre blanc. */
:root {
  color-scheme: dark;

  --night: #0c1120;
  --panel: #141c32;
  --raised: #1e2844;
  --hover: #2a375c;
  --border: #303e64;
  --gold: #e8b64c;
  --gold-light: #f8d078;
  --text: #e7ecf7;
  --text-soft: #c3cbe0;
  --weak: #96a2c2;
  --sky: #5fa8e8;
  --sky-light: #8cc3f2;
  --ok: #6ccb8b;
  --warn: #e8a33d;
  --error: #e46a6a;

  --window-top: rgba(30, 44, 98, 0.94);
  --window-bottom: rgba(13, 20, 52, 0.94);
  --frame: #f2f4fa;
  --frame-shadow: #080c1a;

  --font-title: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-menu: 'DotGothic16', ui-monospace, monospace;
  --font-body: 'Nunito Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box }

html { scroll-behavior: smooth; background: #070a14 }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 75% -10%, rgba(95, 168, 232, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 0%, rgba(232, 182, 76, 0.12), transparent 60%),
    linear-gradient(180deg, #0f1730 0%, var(--night) 45%, #070a14 100%);
  background-attachment: fixed;
}

::selection { background: #785c1e; color: #fff }

a { color: var(--sky-light) }
code { font-family: var(--font-menu); color: var(--gold-light) }

/* Le texte d'appoint sous une fenêtre. Global : il est écrit dans le contenu que
   chaque section passe à <Section>, donc dans la portée de la section, pas d'un
   composant commun. */
.note {
  max-width: 48rem;
  margin: 1.25rem 0 0;
  color: var(--weak);
  line-height: 1.65;
}

/* --- Le curseur des menus : une flèche dorée qui clignote ------------------
   Partagé par l'en-tête, les paquets, l'avancement et les questions : chaque
   composant ne règle que la position de la flèche (`.x::before { top; left }`). */

.menu-item {
  position: relative;
  display: inline-block;
  padding: 0.45rem 0.7rem 0.45rem 1.55rem;
  font-family: var(--font-menu);
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
}

.menu-item::before {
  content: '▶';
  position: absolute;
  left: 0.35rem;
  top: 0.45rem;
  font-size: 0.8em;
  line-height: 1.6;
  color: var(--gold);
  opacity: 0;
}

.menu-item:hover::before,
.menu-item:focus-visible::before,
.menu-item-active::before {
  opacity: 1;
  animation: blink 0.8s steps(2, jump-none) infinite;
}

.menu-item:hover, .menu-item:focus-visible { color: #fff }
.menu-item:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px }

@keyframes blink {
  from { opacity: 1 }
  to { opacity: 0.15 }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  .menu-item:hover::before, .menu-item:focus-visible::before, .menu-item-active::before { animation: none }
}
