/* RESET + BASE */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h-mobile); }
@media (min-width: 768px) { html { scroll-padding-top: var(--header-h); } }

html, body {
  margin: 0;
  padding: 0;
  /* clip evite tout scroll horizontal sans creer de conteneur de scroll (PIEGE PROD #11) */
  overflow-x: clip;
  max-width: 100vw;
}
body {
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* attribut hidden force (PIEGE PROD #8 - modals/lightbox) */
[hidden] { display: none !important; }

img, video, iframe { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 500;
  color: var(--text);
  margin: 0 0 .6em;
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.15; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.25; }

p { margin: 0 0 1em; color: var(--text-2); }

/* MICRO-DETAILS SIGNATURE */
::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: color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: var(--accent); }

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

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

/* CONTAINER */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* SECTIONS PADDING (mobile-first regle absolue) */
section { padding: 48px 0; }
@media (min-width: 768px) { section { padding: 80px 0; } }

/* TEXTURE TEX-2 grain fin */
body { position: relative; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%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; }
