/* Reset + base typo */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
[hidden] { display: none !important; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h-mobile);
  -webkit-text-size-adjust: 100%;
}
@media (min-width: 768px) {
  html { scroll-padding-top: var(--header-h); }
}

body {
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
  position: relative;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* TEX-3 : pointille discret */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image: radial-gradient(rgba(30, 46, 41, 0.10) 1px, transparent 1.4px);
  background-size: 22px 22px;
}
body > * { position: relative; z-index: 1; }

/* Reset elements */
img, video, iframe, svg { max-width: 100%; display: block; }
img { height: auto; }
figure { margin: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: transparent; cursor: pointer; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* Typo */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
h4 { font-size: clamp(1.05rem, 1.8vw, 1.25rem); }

p { color: var(--text); }
em { font-style: italic; color: var(--accent); }
strong { font-weight: 600; }

/* Micro-details */
::selection {
  background: var(--accent);
  color: var(--text-on-dark);
}
::placeholder { color: var(--text-mute); opacity: 1; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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; }
