/* styles/base/reset.css — extrait de styles.css L79-L113. Reset + body::before/::after. */

/* ----------------------------- Reset ------------------------------- */
*{box-sizing:border-box}
html,body{height:100%}
/* Fond sur <html> : sans lui, le rubber-band iOS (overscroll) révèle
   du blanc au-dessus/en-dessous de la page. */
html{background:var(--bg)}
body{
  margin:0;padding:0;background:var(--bg);color:var(--fg);font-family:var(--sans);
  -webkit-font-smoothing:antialiased;
  background-image:
    radial-gradient(900px 500px at 50% -10%, var(--glow-1), transparent 60%),
    radial-gradient(700px 400px at 100% 110%, var(--glow-2), transparent 60%),
    var(--bg-gradient);
  overflow-x:hidden;
  /* Pas de bounce/scroll-chaining vertical (mobile). */
  overscroll-behavior-y:none;
  /* Safe area for notched devices */
  padding-left:env(safe-area-inset-left, 0px);
  padding-right:env(safe-area-inset-right, 0px);
}
button{font:inherit}
input{font:inherit;color:inherit}

/* Dotted grid — ambiance jeu vidéo, très léger */
body::before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:0;
  background-image:
    radial-gradient(circle, var(--dot-color) 1px, transparent 1.2px);
  background-size:22px 22px;
  mask-image:radial-gradient(1200px 800px at 50% 40%, #000 30%, transparent 85%);
  -webkit-mask-image:radial-gradient(1200px 800px at 50% 40%, #000 30%, transparent 85%);
  opacity:var(--dot-opacity);
}
/* Scan lines — subtle CRT / gaming overlay */
body::after{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:9998;
  background:repeating-linear-gradient(
    0deg, transparent 0, transparent 2px, rgba(0,0,0,.02) 2px, rgba(0,0,0,.02) 4px);
}

/* --------------------------- A11y baseline -------------------------- */

/* Focus visible : anneau net pour la navigation clavier. N'interfère
   pas avec le focus souris (WebKit/Chrome/FF moderns supportent
   :focus-visible). Les vues ou composants qui veulent un style
   spécifique peuvent override via un sélecteur plus précis. */
:focus{ outline: none; }
:focus-visible{
  outline: 2px solid var(--focus-ring, currentColor);
  outline-offset: 2px;
  border-radius: 2px;
}

/* prefers-reduced-motion : on coupe les animations, transitions et
   scroll-behavior pour respecter le réglage système. Le jeu reste
   jouable ; seuls les effets décoratifs sont désactivés. */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  body::after{ background: none; }
}
