/* =============================================================
   BASE — reset, typographie, éléments natifs, accessibilité
   Aucune classe de composant ici : uniquement des éléments.
   ============================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--t-base);
  line-height: var(--lh-base);
  font-weight: var(--fw-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Empêche toute page de défiler horizontalement : le contenu large
     (tableaux, carrousels) doit gérer son propre overflow. */
  overflow-x: clip;
}

/* ---- Titres ---------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text-strong);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  text-wrap: balance;
}
h1 { font-size: var(--t-2xl); line-height: var(--lh-tight); letter-spacing: var(--ls-tight); font-weight: var(--fw-black); }
h2 { font-size: var(--t-xl);  letter-spacing: var(--ls-tight); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-base); font-weight: var(--fw-semi); }

p { margin: 0 0 var(--s-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

/* ---- Liens ------------------------------------------------------ */
a {
  color: var(--secondary);
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
  transition: color var(--dur-2) var(--ease), text-decoration-color var(--dur-2) var(--ease);
}
a:hover { color: var(--primary); text-decoration-color: currentColor; }

/* ---- Listes ------------------------------------------------------ */
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25em; }
li { margin-bottom: var(--s-2); }
li:last-child { margin-bottom: 0; }
:where(nav) ul, :where(nav) ol { list-style: none; margin: 0; padding: 0; }
:where(nav) li { margin: 0; }

/* ---- Médias ------------------------------------------------------ */
img, svg, video, canvas, picture { display: block; max-width: 100%; }
img, video { height: auto; }
svg { flex: none; }
figure { margin: 0; }

/* ---- Chiffres ----------------------------------------------------
   Prix, quantités, totaux, horaires : chiffres de largeur fixe, sinon
   une colonne de totaux « danse » à chaque recalcul.                 */
.num, .price, .qty__input, input[type="number"], td.amount, .woocommerce-Price-amount {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---- Formulaires : base commune, le style vit dans components ----- */
input, select, textarea, button { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
textarea { resize: vertical; }
:where(label) { display: block; }

/* Retire les flèches des champs numériques : on fournit un stepper. */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-7) 0; }

table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: var(--fw-semi); }

strong, b { font-weight: var(--fw-semi); color: var(--text-strong); }
small { font-size: var(--t-sm); }

::selection { background: var(--c-teal-100); color: var(--c-teal-800); }

/* ---- Focus ------------------------------------------------------
   Visible, toujours, et jamais supprimé. `:focus-visible` évite
   seulement de l'afficher au clic souris.                            */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--r-sm);
  position: relative;
  z-index: 1;
}

/* ---- Lien d'évitement -------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  z-index: calc(var(--z-modal) + 1);
  transform: translateY(-200%);
  background: var(--primary);
  color: var(--on-primary);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-sm);
  font-weight: var(--fw-semi);
  text-decoration: none;
  transition: transform var(--dur-2) var(--ease);
}
.skip-link:focus { transform: translateY(0); color: var(--on-primary); }

/* ---- Masquage accessible ----------------------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.sr-only-focusable:focus,
.sr-only-focusable:focus-visible {
  position: static !important;
  width: auto; height: auto;
  clip: auto; clip-path: none;
  white-space: normal;
  margin: 0;
}

[hidden] { display: none !important; }

/* ---- Contenu éditorial (description produit, pages légales) -------
   Écrit en :where() pour une spécificité NULLE : un reset qui porte
   0-1-1 écrase toutes les règles de classe et décale toute la page.  */
:where(.prose) > * + * { margin-top: var(--s-4); }
:where(.prose) h2 { font-size: var(--t-lg); margin-top: var(--s-7); }
:where(.prose) h3 {
  font-size: var(--t-base);
  font-weight: var(--fw-bold);
  color: var(--text-strong);
  margin-top: var(--s-6);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  font-size: var(--t-sm);
}
:where(.prose) ul { padding-left: 0; list-style: none; }
:where(.prose) ul > li {
  position: relative;
  padding-left: var(--s-6);
  margin-bottom: var(--s-3);
}
/* La puce reprend le filet teal — élément signature, à dose homéopathique. */
:where(.prose) ul > li::before {
  content: "";
  position: absolute;
  left: var(--s-2);
  top: 0.62em;
  width: 7px; height: 7px;
  /* Arrondi de FORME, pas rayon de composant : la puce est un carré
     pivoté de 7 px, un token de 8 px l'arrondirait en cercle. */
  border-radius: 2px;
  background: var(--primary);
  transform: rotate(45deg);
}
:where(.prose) ol { padding-left: var(--s-5); }
:where(.prose) a { font-weight: var(--fw-medium); }
:where(.prose) img { border-radius: var(--r-md); margin-block: var(--s-5); }
:where(.prose) blockquote {
  margin: var(--s-6) 0;
  padding: var(--s-4) var(--s-5);
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--text-strong);
}
:where(.prose) table { margin-block: var(--s-5); font-size: var(--t-sm); }
:where(.prose) :is(th, td) { padding: var(--s-3); border-bottom: 1px solid var(--border-soft); }
