/* ============================================================
   Base — reset, coquille Netflix (nav top + scroll pleine largeur)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.2; }
p { margin: 0; }
button { font-family: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--red); color: #fff; }

/* Réduction des animations (réglage utilisateur) */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after {
  transition-duration: 0.001ms !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
}

/* — Coquille — */
#app { height: 100vh; overflow: hidden; position: relative; }

/* Mode cinéma immersif : on masque la barre du haut (le lecteur a sa propre flèche retour). */
body.cinema-immersive #topnav { display: none; }

#view {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
}
.view-inner { padding-bottom: 60px; }

/* Pages « simples » (sans héro plein écran) : on garde une marge sous la nav */
.padded { padding: calc(var(--nav-h) + 28px) var(--edge) 40px; max-width: 1500px; margin: 0 auto; }

/* — Barres de défilement masquées (le défilement reste actif) — */
#view { scrollbar-width: none; -ms-overflow-style: none; }
#view::-webkit-scrollbar { width: 0; height: 0; display: none; }
.row-track { scrollbar-width: none; }
.row-track::-webkit-scrollbar { height: 0; display: none; }

/* — Accessibilité — */
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: var(--r-sm); }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 800px) {
  :root { --edge: 24px; }
}
