/* Reset minimal + base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h-mobile) + 8px); }
@media (min-width: 768px){ html { scroll-padding-top: calc(var(--header-h) + 12px); } }

html, body { overflow-x: hidden; max-width: 100vw; }
img, video, iframe, svg { max-width: 100%; }
img { display: block; height: auto; }
figure { margin: 0; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
blockquote { margin: 0; }

[hidden] { display: none !important; }

body {
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Typo de base */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
  line-height: 1.15;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
p  { margin: 0 0 1em; color: var(--text); }
strong { font-weight: 600; }

/* Selection & scrollbar — signature soignée */
::selection { background: var(--accent); color: #fff; }
::-moz-selection { background: var(--accent); color: #fff; }
html { scrollbar-color: var(--accent) var(--bg-alt); scrollbar-width: thin; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

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

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

/* Texture TEX-2 — grain fin */
body { position: relative; }
body::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .035;
  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.9' 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; }
