/* ==========================================================================
   NOFAIL · Base
   Reset léger, typographie, utilitaires de mise en page.
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv11" 1;
  transition: background .25s var(--ease), color .25s var(--ease);
}

img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-weight: 700; }
p { margin: 0; }

.display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.mono {
  font-family: var(--font-mono);
  font-size: .82em;
  letter-spacing: 0;
}
.muted { color: var(--fg-muted); }
.ai-text { color: var(--ai); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 720px) {
  .container { padding-inline: var(--space-6); }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

::selection { background: var(--c-signal); color: var(--c-on-signal); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
