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

html {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  font-size: var(--fs-body);
  background: var(--bg);
  color: var(--text);
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
/* Ambiance showroom : halo chaud fixe + grain pellicule très léger sur tout le site. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 85% -5%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(50% 40% at -5% 100%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
}
body > * { position: relative; z-index: 1; }
/* Réserve la hauteur du viewport pendant le rendu asynchrone des écrans :
   le footer démarre déjà en bas et ne « saute » pas quand <main> se remplit (anti-CLS). */
main { flex: 1; min-height: calc(100dvh - 64px); }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }

/* Typographie display : titres marqués, tracking serré */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;          /* lignes de titre équilibrées */
}

/* Prose : moins d'orphelins sur les paragraphes longs */
.prose p, .el-desc, .home-review .text, .product-block p { text-wrap: pretty; }

/* Chiffres tabulaires alignés pour les données techniques (réf, EAN, capacité) */
.product-block, .rating, .ps-progress, .home-review .stars { font-variant-numeric: tabular-nums; }

/* Layout */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-4); }
@media (min-width: 768px) { .container { padding: 0 var(--sp-6); } }
.section { padding: var(--sp-8) 0; }
@media (min-width: 768px) { .section { padding: var(--sp-9) 0; } }

/* Petit label montant (kicker) */
.label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--text-soft);
}

/* En-tête de section : titre puis sous-titre EMPILÉS (colonne) */
.section-head { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.section-head h2 { font-size: var(--fs-h2); display: flex; align-items: center; }
.section-head p { margin: 0; }

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

/* Focus visible accessible (ne jamais supprimer l'anneau) */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   Scroll reveal : éléments qui apparaissent au défilement.
   Activé par JS (.reveal → .is-visible via IntersectionObserver).
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Respect strict des préférences de mouvement réduites */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
