/* ============ RESET + BASE ============ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h-mobile);
}

body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  /* TEX-5 — Papier chaud */
  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;
  /* PIÈGE #11 FIX : clip ne crée pas de conteneur de scroll (≠ hidden) */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* PIÈGE #5 — reset figure margin UA */
figure { margin: 0; }

/* PIÈGE #8 — [hidden] forcé à display:none */
[hidden] { display: none !important; }

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

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: var(--ff-ui); background: none; border: none; padding: 0; }

/* PIÈGE #10 — inputs/select dans grille */
input, textarea, select {
  font-family: var(--ff-ui);
  font-size: 1rem;
  min-width: 0;
  width: 100%;
}

/* Titres */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  line-height: 1.08;
  font-weight: 500;
  margin: 0;
  color: var(--text);
}

/* Micro-détails */
::selection { background: var(--accent); color: #fff; }
::placeholder { color: var(--text-mute); opacity: 1; }

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

/* Scrollbar fine rebrandée */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--accent) 80%, #000); }
