/* =====================================================================
   base.css  -  reset, typo, accessibilite
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
}

/* Texture papier chaud (TEX-5) */
body {
  background-image: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 5%, var(--bg)) 0%, var(--bg) 60%);
  background-attachment: fixed;
}

img, video, iframe, svg { max-width: 100%; }
img { height: auto; display: block; }
figure { margin: 0; }
[hidden] { display: none !important; }

/* Titres en Fraunces editorial */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0 0 var(--gap-3);
  font-variation-settings: "opsz" 128, "SOFT" 50;
}
h1 { font-size: var(--fs-3xl); line-height: 1.04; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl);  }
h4 { font-size: var(--fs-lg);  }

p { margin: 0 0 var(--gap-3); max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--text); }

ul, ol { padding-left: 1.2em; margin: 0 0 var(--gap-3); }

::selection { background: var(--accent); color: #fff; }
::-moz-selection { background: var(--accent); color: #fff; }

* { 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); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text); }

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

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
::placeholder { color: var(--text-mute); opacity: 1; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
