/* base.css - reset + typo + base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h-mobile) + 8px); }
@media (min-width: 1024px){ html { scroll-padding-top: calc(var(--header-h) + 8px); } }

body{
  margin: 0;
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
}

/* TEX-2 grain fin subtil sur fond ivoire */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > *{ position: relative; z-index: 1; }

img, video, iframe { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  color: var(--primary);
  line-height: 1.1;
  margin: 0 0 var(--gap-3);
  font-weight: 500;
  letter-spacing: -0.012em;
}
h1 { font-size: var(--fs-2xl); font-weight: 500; letter-spacing: -0.018em; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--gap-3); max-width: 64ch; }
a { color: var(--accent-2); text-underline-offset: 4px; }
em { font-style: italic; color: var(--accent-2); }
strong { font-weight: 600; color: var(--text); }

::selection { background: var(--accent-2); color: var(--bg); }
::-moz-selection { background: var(--accent-2); color: var(--bg); }

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

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

::placeholder { color: var(--text-mute); opacity: 1; }

/* force display:none sur [hidden] (modale / lightbox) */
[hidden] { display: none !important; }

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