/* base.css — reset + typographie + micro-détails */

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

/* Clipping horizontal sans casser le scroll vertical (PIÈGE #11) */
html { overflow-x: hidden; scroll-behavior: smooth; scroll-padding-top: var(--header-h-mobile); }
body {
  overflow-x: clip; /* clip ≠ hidden : ne crée pas de scroll container (PIÈGE #11) */
  max-width: 100vw;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* [hidden] doit toujours masquer (PIÈGE #8 : display:flex surcharge hidden) */
[hidden] { display: none !important; }

img, video, iframe { max-width: 100%; display: block; }

/* Réinitialisation figure (PIÈGE #5 : marge UA 0 40px) */
figure { margin: 0; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: transparent; font-family: inherit; }

/* Typographie de base */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  line-height: 1.1;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 500; margin-bottom: 0.75em; }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.5rem); font-weight: 500; }
p  { line-height: 1.7; color: var(--text-2); }

/* Scrollbar rebrandée */
::-webkit-scrollbar       { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--accent-2); border-radius: 4px; }

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

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

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

/* scroll-padding desktop */
@media (min-width: 768px) {
  html { scroll-padding-top: var(--header-h); }
}
