/*
 * Charte agribiomix.com : jetons communs (AGRI-25, 20/10/2026).
 * Règle : aucune couleur, police, taille de cible ou rayon écrit en dur ailleurs que dans ce bloc.
 * Contrastes calculés (WCAG 2.2) :
 *   encre #14261C sur blanc 15,86:1 ; texte #4F5655 sur blanc 7,51:1 ; lien #006B3C sur blanc 6,63:1 (6,09:1 sur #F3F6F3) ;
 *   encre #14261C sur vert #30C76B 7,18:1 (bouton principal ; 5,63:1 au survol #27B05E) ; ligne #D5DDD6 = décor seulement (non porteuse de sens).
 */
/* AGRI-135 (21/10/2026, contrôle UXE-01) : polices de la charte hébergées sur le site (Inter 400-700, Lexend 600-700,
 * jeu latin, licence SIL OFL, fichiers @fontsource 5.1.0). Avant, Astra les chargeait depuis Google Fonts et Complianz bloquait
 * ce chargement tant que les cookies marketing n'étaient pas acceptés : la plupart des visiteurs voyaient Arial/Helvetica. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("polices/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("polices/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("polices/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("polices/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lexend"; font-style: normal; font-weight: 600; font-display: swap; src: url("polices/lexend-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Lexend"; font-style: normal; font-weight: 700; font-display: swap; src: url("polices/lexend-latin-700-normal.woff2") format("woff2"); }
:root {
	/* Gouttières (AGRI-152, 21/10/2026, règle unique pour tous les types de page) : seul le conteneur de la page porte la
	 * marge latérale ; aucun bloc intérieur (article, section, gabarit) n'en ajoute. Encadrés et cartes : marge intérieure
	 * --ab-carte-pad. Valeurs : 16 px téléphone, 24 px tablette, 16 px ordinateur dans la colonne de 1 240 px (bord du
	 * contenu = bord du logo de l'en-tête). */
	--ab-gouttiere: 16px;
	--ab-colonne: 1240px;
	--ab-carte-pad: 14px;
	/* Couleurs (palette Astra du site, relue le 16/10/2026) */
	--ab-vert: #30C76B;          /* action principale : fond du bouton principal */
	--ab-vert-survol: #27B05E;
	--ab-vert-fonce: #006B3C;    /* liens, contours d'action, bascules (texte : 6,6:1 sur blanc) */
	--ab-encre: #14261C;         /* titres, texte sur vert */
	--ab-texte: #4F5655;         /* texte courant */
	--ab-fond: #F3F6F3;          /* panneaux, encarts */
	--ab-fond-neutre: #F6F7F8;
	--ab-ligne: #D5DDD6;         /* séparateurs, bordures de cartes */
	--ab-blanc: #FFFFFF;
	--ab-alerte: #B3261E;        /* erreurs uniquement */
	--ab-bordure-champ: #8A938E; /* contour des champs et sélecteurs : 3,16:1 sur blanc (seuil 3:1) */
	--ab-precommande: #8A5A00;   /* mention « précommande » : 5,93:1 sur blanc */

	/* Typographie */
	--ab-police-titre: "Lexend", "Inter", system-ui, sans-serif;
	--ab-police-texte: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--ab-taille-texte: 16px;     /* en px : Astra fixe la racine à 15 px ; jamais moins pour un champ (évite le zoom iOS) */
	--ab-taille-petit: 14px;

	/* Formes, espaces, mouvement */
	--ab-rayon: 8px;
	--ab-rayon-carte: 12px;
	--ab-espace-1: .5rem;
	--ab-espace-2: 1rem;
	--ab-espace-3: 1.5rem;
	--ab-ombre: 0 1px 2px rgba(20, 38, 28, .06), 0 4px 16px rgba(20, 38, 28, .08);
	--ab-transition: 160ms ease;

	/* Cibles tactiles (WCAG 2.5.8 : 24 px minimum ; règle maison : 48 px pour toute action, 44 px au plus serré) */
	--ab-cible: 48px;
	--ab-cible-serree: 44px;
}

/* Boutons de la charte : un seul bouton principal par zone d'action. */
.ab-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	min-height: var(--ab-cible); padding: 0 1.25rem;
	border-radius: var(--ab-rayon); border: 2px solid transparent;
	font: 600 var(--ab-taille-texte)/1.2 var(--ab-police-texte);
	text-decoration: none; cursor: pointer;
	transition: background-color var(--ab-transition), border-color var(--ab-transition), color var(--ab-transition);
}
.ab-btn--principal { background: var(--ab-vert); color: var(--ab-encre); border-color: var(--ab-vert); }
.ab-btn--principal:hover { background: var(--ab-vert-survol); border-color: var(--ab-vert-survol); }
.ab-btn--secondaire { background: var(--ab-blanc); color: var(--ab-vert-fonce); border-color: var(--ab-vert-fonce); }
.ab-btn:focus-visible { outline: 3px solid var(--ab-encre); outline-offset: 2px; }

/* AGRI-64 (20/10/2026) : longs mots (« Phytoépuration/Phytoremédiation ») qui sortaient de l'écran sur téléphone :
 * coupure autorisée dans les titres et les liens de tout le site (césure française grâce à lang="fr-FR"). */
:where(h1, h2, h3, h4, .product_title, .ab-boutique__titre, .woocommerce-loop-product__title) { overflow-wrap: anywhere; hyphens: auto; }
:where(.entry-content, .ab-article__contenu, #tab-description) :where(p, li, a, td) { overflow-wrap: break-word; }

/* AGRI-68 (20/10/2026) : texte des boutons centré horizontalement et verticalement, quelle que soit leur origine. */
.ab-btn { text-align: center; line-height: 1.2; }

@media (min-width: 600px) and (max-width: 1023px) { :root { --ab-gouttiere: 24px; } }
@media (min-width: 1024px) { :root { --ab-carte-pad: 20px; } }

/* ---- AGRI-152 : application de la règle de gouttière à tous les conteneurs de page ---- */
.ab-entete__barre { max-width: var(--ab-colonne) !important; padding-left: var(--ab-gouttiere) !important; padding-right: var(--ab-gouttiere) !important; }
.site-content > .ast-container { max-width: var(--ab-colonne) !important; padding-left: var(--ab-gouttiere) !important; padding-right: var(--ab-gouttiere) !important; }
.ast-container:has(> .ab-boutique) { max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; }
.ab-boutique { max-width: var(--ab-colonne) !important; padding-left: var(--ab-gouttiere) !important; padding-right: var(--ab-gouttiere) !important; }
:is(.ab-gabarit, .ab-article, .ab-liste, #primary, .ast-woocommerce-container, .site-content article.page, .site-main) { padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; margin-right: 0 !important; max-width: none; }
