/* pages.css — charte partagée des pages satellites (404, À propos).
   Volontairement séparé de style.css : ces pages sont autonomes, scrollables,
   et n'ont pas besoin du CSS de l'app (dont le body flex/100vh casserait le scroll). */

:root {
  --bg: #072f5f;
  --blanc: #ffffff;
  --vert: #60ec73;
  --bleu-accent: #4f9eff;
  --texte-dim: rgba(255, 255, 255, 0.5);
  --border-glass: rgba(255, 255, 255, 0.18);
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 0;
  color: var(--blanc);
  font-family: "Space Mono", monospace;
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(125deg, #051e3e 0%, #0d3d70 30%, #072f5f 55%, #082244 80%, #0a3560 100%);
  background-size: 24px 24px, 300% 300%;
  animation: gradient-drift 15s ease infinite;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@keyframes gradient-drift {
  0%   { background-position: 0 0, 0% 50%;   }
  50%  { background-position: 0 0, 100% 50%; }
  100% { background-position: 0 0, 0% 50%;   }
}

/* Logo ReacTime (DM Sans 700, comme le splash/header de l'app) */
.brand {
  display: inline-flex;
  text-decoration: none;
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand .reac { color: var(--blanc); }
.brand .time { color: var(--bleu-accent); }
.brand:hover .time { filter: brightness(1.15); }

/* ---- Page de contenu (À propos) ---- */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.page-head {
  text-align: center;
  margin-bottom: 40px;
}
.page-head .brand { font-size: 44px; }
.page-head .tagline {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--texte-dim);
}

/* Nav d'ancres */
.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-top: 22px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.topnav a {
  color: var(--texte-dim);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.topnav a:hover,
.topnav a:focus-visible { color: var(--blanc); border-bottom-color: var(--bleu-accent); }

/* Sections */
.doc section { margin-top: 44px; scroll-margin-top: 24px; }
.doc h2 {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bleu-accent);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-glass);
}
.doc h3 {
  font-size: 14px;
  margin: 22px 0 6px;
  color: var(--blanc);
}
.doc p,
.doc li {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
}
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--blanc); font-weight: 700; }
.doc a {
  color: var(--bleu-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(79, 158, 255, 0.4);
  transition: border-color 0.15s;
}
.doc a:hover,
.doc a:focus-visible { border-bottom-color: var(--bleu-accent); }

/* Bouton « retour au jeu » */
.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 12px 22px;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--bg);
  background: var(--vert);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, filter 0.15s;
}
.btn-home:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-home:active { transform: translateY(0); }

.page-foot {
  margin-top: 56px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--texte-dim);
}
.page-foot a { color: var(--texte-dim); text-decoration: underline; }
.page-foot a:hover { color: var(--blanc); }

/* ---- Variante page 404 (centrée verticalement) ---- */
body.is-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.err {
  max-width: 460px;
}
.err .brand { font-size: 40px; margin-bottom: 28px; }
.err-code {
  font-size: clamp(72px, 22vw, 132px);
  font-weight: 700;
  line-height: 1;
  color: var(--bleu-accent);
  text-shadow: 0 0 28px rgba(79, 158, 255, 0.35);
  margin: 0;
}
.err-msg {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  margin: 14px 0 30px;
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  .btn-home:hover { transform: none; }
}

@media (max-width: 520px) {
  .wrap { padding: 36px 18px 72px; }
  .page-head .brand { font-size: 36px; }
}
