/* ==========================================================================
   RESET CSS — Astra + WooCommerce safe
   Place: /wp-content/themes/astra-child/assets/css/reset.css
   Enqueue-le AVANT tes autres CSS.
   ========================================================================== */

/* 1) Box-sizing universel (hérité) */
*, *::before, *::after { box-sizing: border-box; }

/* 2) Mise à zéro des marges par défaut des éléments bloc communs */
:where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd) { margin: 0; }

/* 3) Corps de page – pas de marges implicites, défilement fluide optionnel */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  text-rendering: optimizeLegibility;
}

/* 4) Titres — ne force pas la taille/gras (Astra gère). Seulement line-height neutre */
:where(h1, h2, h3, h4, h5, h6) { line-height: 1.2; }

/* 5) Listes — retire bullets uniquement lorsqu’explicitement non typées */
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding-left: 0; margin: 0; }

/* 6) Liens — pas de couleurs ou décorations imposées, seulement fixes d’accessibilité */
a { text-underline-offset: .15em; }

/* 7) Images, vidéos — fluides, sans bordure fantôme */
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }

/* 8) Formulaires — héritent la typo, normalisation douce */
input, button, textarea, select { font: inherit; color: inherit; }
button, [type="button"], [type="submit"], [role="button"] { cursor: pointer; }
textarea { resize: vertical; }
:where(input, textarea, select) { margin: 0; }

/* 9) Tables — neutraliser espacements implicites */
table { border-collapse: collapse; border-spacing: 0; }

/* 10) Focus — accessibilité (laisser Astra/UA gérer, mais garantir visible si absent) */
:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ==========================================================================
   WOOCOMMERCE — resets “safe” (ne touche pas aux couleurs/espacements d’Astra)
   ========================================================================== */

/* Grilles produits : retire marges implicites des UL si Woo n’a pas de classe utilitaire */
.woocommerce :where(ul.products) { margin: 0; padding: 0; list-style: none; }

/* Cartes produit — éviter les espacements hérités étranges */
.woocommerce :where(ul.products li.product) { margin: 0; }

/* Images produit — fluides */
.woocommerce :where(ul.products li.product img, div.product div.images img) {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Messages Woo (notices) — neutraliser marges par défaut pour un layout plus prévisible */
.woocommerce :where(.woocommerce-message, .woocommerce-info, .woocommerce-error) {
  margin: 0;
}

/* Formulaires Woo : login/checkout/coupon — éviter marges implicites */
.woocommerce :where(form .form-row) { margin: 0; }

/* Boutons Woo — pas de styles visuels ici (Astra gère), juste héritage typo + curseur */
.woocommerce :where(a.button, button.button, .button) {
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}

/* Tables (panier, checkout, compte) — baseline neutre */
.woocommerce :where(table.shop_table) {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Quantité — enlever min-width implicites selon navigateurs */
.woocommerce :where(.quantity input.qty) { min-width: 0; }

/* Champs avis produit — normalisation douce */
.woocommerce :where(#reviews #comment) { resize: vertical; }

/* Breadcrumb — enlever marges par défaut si non définies par Astra */
.woocommerce :where(nav.woocommerce-breadcrumb) { margin: 0; }

/* ==========================================================================
   WORDPRESS/GUTENBERG — alignements et images
   ========================================================================== */
:where(.alignwide, .alignfull) { margin: 0; }
:where(.wp-caption) { margin: 0; }

/* Éviter que les blocs quote/pre aient des marges UA énormes */
:where(blockquote, pre) { margin: 0; }

/* ==========================================================================
   UTILITAIRES ULTRA-LIGHT (facultatifs, pratiques pour repartir proprement)
   ========================================================================== */
/* .u-reset-list : reset rapide des listes */
.u-reset-list { list-style: none; margin: 0; padding: 0; }
/* .u-clearfix */
.u-clearfix::after { content: ""; display: table; clear: both; }
/* .u-sr-only : accessibilité pour texte caché */
.u-sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}