/* =====================================================================
   BASE — vitrine ultrafin.fr (M53)
   Layout, typo, grille, états génériques. AUCUNE valeur brute de couleur
   ou de police ici : var(--...) exclusivement (les tokens font foi).
   ===================================================================== */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-1);
  font-family: var(--font-stack);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

/* ---- Conteneur & sections ---- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--sp-section); }

.section-dark {
  background: var(--bg-dark);
  color: var(--text-1-dark);
  padding-block: calc(var(--sp-section) + var(--sp-section-dark-extra));
  /* couture FRANCHE : aucun dégradé de transition, aucune vague */
  --link: var(--link-on-dark);
  --focus-ring: var(--focus-ring-dark);
}

.section-alt { background: var(--surface-2); }

/* ---- Typo ---- */
h1, h2, h3 { margin: 0 0 var(--sp-4); }

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
  font-weight: var(--fw-h1);
  text-wrap: balance;
}

h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: var(--fw-h2);
  text-wrap: balance;
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: var(--fw-h3);
}

p { margin: 0 0 var(--sp-4); max-width: 68ch; }
p:last-child { margin-bottom: 0; }

.lead { font-size: var(--fs-lead); line-height: var(--lh-lead); }
.small { font-size: var(--fs-small); }
.muted { color: var(--text-2); }
.section-dark .muted, .site-footer .muted { color: var(--text-2-dark); }

.eyebrow {
  display: block;
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}
.section-dark .eyebrow { color: var(--link-on-dark); }

.num { font-variant-numeric: tabular-nums; }

/* ---- Liens (spec §2 états) ---- */
a { color: var(--link); }

.prose a, .faq a, .footer-links a, .legal-text a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--dur) ease-out, text-decoration-thickness var(--dur) ease-out;
}
.prose a:hover, .faq a:hover, .legal-text a:hover {
  text-decoration-thickness: 2px;
  color: var(--link-hover-on-light);
}

/* ---- Focus visible, clair ET sombre ---- */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--sp-1);
}

/* ---- Apparition au scroll (classe posée par JS uniquement :
        sans JS, tout est visible — dégradation propre) ---- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--reveal-dur) ease-out, transform var(--reveal-dur) ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Utilitaires ---- */
.center { text-align: center; }
.grid { display: grid; gap: var(--sp-6); }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

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