/* ========== Reset doux ========== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; max-width: 100vw; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (max-width: 768px) {
  html { scroll-padding-top: var(--header-h-mobile); }
}
img, video, iframe, svg { max-width: 100%; display: block; }
figure, blockquote, p, h1, h2, h3, h4, h5, h6, ul, ol, dl, dd, dt { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

/* Typo display (Fraunces) */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  font-weight: 400;
  color: var(--text);
  line-height: 1.06;
  letter-spacing: -0.012em;
  font-variation-settings: "opsz" 128, "SOFT" 50;
}
h1 { font-size: var(--fs-3xl); font-variation-settings: "opsz" 144, "SOFT" 30; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { max-width: 65ch; color: var(--text-2); }

a { color: inherit; text-decoration: none; }

/* Selection */
::selection { background: var(--accent); color: var(--bg); }
::-moz-selection { background: var(--accent); color: var(--bg); }

/* Scrollbar fine rebrandee */
* { scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent-2); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Placeholder */
::placeholder { color: var(--text-mute); opacity: 0.8; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}
@media (max-width: 560px) {
  .container { padding: 0 20px; }
}

/* Reduce-motion fallback global (couvre tous les sweeps) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
