/* GOLDMARKET — gm-panier.css
 * Tiroir du mini-panier et page /panier/ : rendu minimal.
 * Charte BRANDBOOK-WEB-GOLDMARKET v1.1. Aucune police, aucune bibliotheque
 * ajoutee : les familles citees sont celles deja servies par le site, avec
 * repli systeme.
 *
 * Jetons : encre #1A1814 · fond #FAFAF8 · creme #F5F0E8 · filet #E7E1D6
 *          or #C4913A · or fonce #A97B2E · or texte #7A5A22
 *          texte #2A2620 · texte secondaire #6E695F
 * Une seule elevation : 0 1px 2px rgba(26,24,20,.06)
 */

/* =========================================================================
 * 1. Prix en doublon
 *
 * La ligne rend deux fois le meme objet `prices` de la Store API :
 *   - .wc-block-cart-item__prices  = prix unitaire, fige quelle que soit la
 *     quantite ;
 *   - td.wc-block-cart-item__total = total de ligne (line_subtotal), donc
 *     quantite x prix.
 * On garde le total : c'est le seul des deux qui reste juste quand la
 * quantite change. La pastille de promotion (« Save X ») vit dans le total,
 * elle n'est pas perdue.
 * Couche CSS et non PHP : les deux valeurs derivent du meme champ de reponse,
 * qu'aucun filtre serveur ne permet de retirer sans emporter l'autre.
 * ====================================================================== */
table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices {
	display: none !important;
}

/* =========================================================================
 * 2. Description d'article
 *
 * Deja videe cote serveur (gm-panier.php, filtres
 * woocommerce_product_get_short_description / _description limites aux
 * routes Store API de panier). Cette regle est la ceinture : un panier
 * hydrate depuis un cache client garderait sinon l'ancien texte.
 * ====================================================================== */
table.wc-block-cart-items .wc-block-components-product-metadata__description {
	display: none !important;
}

/* Le conteneur de metadonnees vide ne doit plus reserver d'espace. */
table.wc-block-cart-items .wc-block-components-product-metadata:empty {
	display: none;
}

/* =========================================================================
 * 3. Le tiroir : vignette, titre, quantite, un prix, un retrait
 * ====================================================================== */

.wc-block-mini-cart__drawer {
	--gm-pan-encre: #1A1814;
	--gm-pan-texte: #2A2620;
	--gm-pan-second: #6E695F;
	--gm-pan-filet: #E7E1D6;
	--gm-pan-creme: #F5F0E8;
	--gm-pan-or-texte: #7A5A22;
	--gm-pan-or: #C4913A;
	background: #FAFAF8;
	color: var(--gm-pan-texte);
}

.wc-block-mini-cart__drawer .wc-block-mini-cart__title,
.wc-block-mini-cart__drawer .wc-block-mini-cart__title h2 {
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	color: var(--gm-pan-encre);
	letter-spacing: .01em;
}

/* L'entete de tableau (« Produit » / « Total ») n'a plus rien a annoncer :
   une seule colonne de prix subsiste, et le tiroir n'est pas un tableau de
   comparaison. */
.wc-block-mini-cart-items .wc-block-cart-items__header {
	display: none;
}

/* Lignes aerees, separees par un filet et non par une ombre. */
.wc-block-mini-cart-items .wc-block-cart-items__row > td {
	padding-top: 20px;
	padding-bottom: 20px;
	vertical-align: top;
	border-bottom: 1px solid var(--gm-pan-filet);
	background: transparent;
}

.wc-block-mini-cart-items .wc-block-cart-items__row:last-child > td {
	border-bottom: 0;
}

/* Vignette : cadre creme discret, une seule elevation. */
.wc-block-mini-cart-items .wc-block-cart-item__image img {
	border-radius: 2px;
	background: var(--gm-pan-creme);
	box-shadow: 0 1px 2px rgba(26, 24, 20, .06);
}

/* Titre : la seule note serif de la ligne. */
.wc-block-mini-cart-items .wc-block-components-product-name {
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: 17px;
	line-height: 1.35;
	color: var(--gm-pan-encre);
	text-decoration: none;
}

.wc-block-mini-cart-items .wc-block-components-product-name:hover,
.wc-block-mini-cart-items .wc-block-components-product-name:focus-visible {
	color: var(--gm-pan-or-texte);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Le prix conserve : total de ligne, aligne a droite, en encre. */
.wc-block-mini-cart-items .wc-block-cart-item__total,
.wc-block-mini-cart-items .wc-block-cart-item__total .wc-block-components-product-price__value {
	font-size: 17px;
	line-height: 1.4;
	color: var(--gm-pan-encre);
	white-space: nowrap;
}

/* Quantite et retrait sur une meme ligne, respirante. */
.wc-block-mini-cart-items .wc-block-cart-item__wrap {
	gap: 10px;
}

.wc-block-mini-cart-items .wc-block-cart-item__quantity {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
}

.wc-block-mini-cart-items .wc-block-components-quantity-selector {
	border: 1px solid var(--gm-pan-filet);
	border-radius: 4px;
	background: #FFF;
	min-height: 44px;
	box-shadow: none;
}

.wc-block-mini-cart-items .wc-block-components-quantity-selector__button {
	min-width: 44px;
	min-height: 44px;
	color: var(--gm-pan-second);
	background: transparent;
}

.wc-block-mini-cart-items .wc-block-components-quantity-selector__button:hover:not(:disabled) {
	color: var(--gm-pan-or-texte);
}

.wc-block-mini-cart-items .wc-block-components-quantity-selector__input {
	min-height: 44px;
	color: var(--gm-pan-texte);
	background: transparent;
}

/* Lien de retrait : sobre, pas rouge, cible tactile de 44 px. */
.wc-block-mini-cart-items .wc-block-cart-item__remove-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--gm-pan-second);
	text-decoration: none;
	cursor: pointer;
}

.wc-block-mini-cart-items .wc-block-cart-item__remove-link:hover,
.wc-block-mini-cart-items .wc-block-cart-item__remove-link:focus-visible {
	color: var(--gm-pan-or-texte);
}

.wc-block-mini-cart-items .wc-block-cart-item__remove-link:focus-visible,
.wc-block-mini-cart-items .wc-block-components-product-name:focus-visible {
	outline: 2px solid #E4C48A;
	outline-offset: 2px;
	border-radius: 4px;
}

/* Sauver pour plus tard : hors sujet dans un tiroir minimal. */
.wc-block-mini-cart-items .wc-block-cart-item__save-for-later {
	display: none;
}

/* Pied du tiroir : un filet, un total, deux actions. */
.wc-block-mini-cart__drawer .wc-block-mini-cart__footer {
	border-top: 1px solid var(--gm-pan-filet);
	background: #FAFAF8;
	box-shadow: none;
}

.wc-block-mini-cart__drawer .wc-block-components-totals-item__label,
.wc-block-mini-cart__drawer .wc-block-components-totals-item__value {
	color: var(--gm-pan-encre);
}

/* Un seul bouton dore par ecran : « Commander » le porte, « Voir mon
   panier » passe en secondaire. Texte encre sur dore, jamais blanc. */
.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-actions .wc-block-components-button:not(.is-link).contained,
.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-checkout .wc-block-components-button:not(.is-link) {
	background-color: var(--gm-pan-or);
	border-color: var(--gm-pan-or);
	color: var(--gm-pan-encre);
	box-shadow: none;
}

.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-actions .wc-block-components-button:not(.is-link).contained:hover,
.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-checkout .wc-block-components-button:not(.is-link):hover {
	background-color: #A97B2E;
	border-color: #A97B2E;
	color: var(--gm-pan-encre);
}

.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-cart .wc-block-components-button:not(.is-link) {
	background-color: transparent;
	border: 1px solid var(--gm-pan-filet);
	color: var(--gm-pan-or-texte);
	box-shadow: none;
}

/* Regle permanente du 10 aout 2026 : sur mobile, tout bouton d'action est
   centre, pleine largeur, 56 a 60 px de haut. */
@media (max-width: 781px) {

	.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-actions .wc-block-components-button,
	.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-cart .wc-block-components-button,
	.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-checkout .wc-block-components-button {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: 58px;
		text-align: center;
	}

	.wc-block-mini-cart-items .wc-block-cart-items__row > td {
		padding-top: 16px;
		padding-bottom: 16px;
	}
}

/* =========================================================================
 * 4. Page /panier/ — meme defaut, meme traitement
 *
 * Le bloc woocommerce/cart rend la meme ligne que le tiroir : le prix
 * unitaire y est donc le meme doublon. La regle du point 1 le couvre deja,
 * elle porte sur `table.wc-block-cart-items` sans distinction de contexte.
 * Il ne reste ici que la mise au registre de la charte.
 * ====================================================================== */
.wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row > td {
	border-bottom: 1px solid #E7E1D6;
	padding-top: 20px;
	padding-bottom: 20px;
}

.wc-block-cart table.wc-block-cart-items .wc-block-components-product-name {
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-size: 17px;
	line-height: 1.35;
	color: #1A1814;
	text-decoration: none;
}

.wc-block-cart table.wc-block-cart-items .wc-block-cart-item__total {
	font-size: 17px;
	color: #1A1814;
	white-space: nowrap;
}

.wc-block-cart table.wc-block-cart-items .wc-block-cart-item__remove-link {
	color: #6E695F;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.wc-block-cart table.wc-block-cart-items .wc-block-cart-item__remove-link:hover,
.wc-block-cart table.wc-block-cart-items .wc-block-cart-item__remove-link:focus-visible {
	color: #7A5A22;
}

/* =========================================================================
 * 5. Tunnel — ceinture du retrait de l'icone panier
 *
 * Le bloc `woocommerce/mini-cart` n'est plus emis sur /panier/ ni sur
 * /commander/ (gm-panier.php, section 5). Cette regle ne sert qu'au cas ou
 * un en-tete servi depuis un cache anterieur au deploiement porterait encore
 * le bouton : sans feuille de contenu, son tiroir deborde de l'ecran.
 * Les classes de body viennent de WooCommerce (`wc_body_class`), le tunnel
 * est donc le seul contexte vise ; l'archive, la fiche produit et le compte
 * gardent leur bouton.
 * ====================================================================== */
body.woocommerce-cart .wc-block-mini-cart,
body.woocommerce-checkout .wc-block-mini-cart {
	display: none !important;
}

/* =========================================================================
 * 6. Recapitulatif de commande — le prix unitaire en doublon
 *
 * Meme defaut que la ligne de panier, autre composant : le recapitulatif du
 * tunnel n'est pas un tableau `wc-block-cart-items` mais une liste de
 * `.wc-block-components-order-summary-item`, que la regle du point 1 ne
 * touchait donc pas. Mesure faite sur le composant compile
 * (wc-cart-checkout-base-frontend.js, module 9097) : chaque ligne rend deux
 * fois le meme objet `prices`,
 *   - `.wc-block-components-order-summary-item__description
 *      > .wc-block-cart-item__prices` — prix unitaire, fige quelle que soit
 *      la quantite ;
 *   - `.wc-block-components-order-summary-item__total-price` — total de
 *      ligne (line_subtotal), donc quantite x prix.
 * Soit 2 noeuds de prix visibles par ligne, plus un `.screen-reader-text`
 * qui enonce deja « Prix total pour N articles : X ».
 *
 * On garde le total, comme pour le panier : c'est le seul des deux qui reste
 * juste quand la quantite change, et la quantite reste lisible dans la
 * pastille posee sur la vignette. Apres : 1 noeud de prix visible par ligne,
 * le noeud pour lecteur d'ecran est intact.
 *
 * CSS et non PHP : le recapitulatif est integralement construit par le
 * navigateur — le serveur ne rend que `<div
 * class="wp-block-woocommerce-checkout-order-summary-cart-items-block">`,
 * vide. Et les deux valeurs derivent du meme champ de reponse Store API,
 * qu'aucun filtre serveur ne retire sans emporter l'autre.
 * ====================================================================== */
.wc-block-components-order-summary-item .wc-block-components-order-summary-item__description > .wc-block-cart-item__prices,
.wc-block-components-order-summary-item .wc-block-components-order-summary-item__individual-prices {
	display: none !important;
}

/* =========================================================================
 * 7. Recapitulatif de commande — la bande vide au-dessus du titre
 *
 * Mesure : `checkout.css` pose
 * `.wp-block-woocommerce-checkout-order-summary-block
 *  .wc-block-components-checkout-order-summary__title{margin-top:16px}`,
 * et, sous `@container (max-width:699px)`, un `border-top` + `border-bottom`
 * + `padding:20px 0` sur ce meme titre. Le titre etant le premier enfant du
 * bloc, cette marge se serait effondree hors du conteneur — sauf que
 * gm-boutique.css peint ce bloc en carte creme bordee
 * (`.wp-block-woocommerce-checkout-order-summary-block{background;border}`),
 * et une bordure bloque l'effondrement. Les 16 px deviennent donc une bande
 * creme vide a l'interieur de la carte, suivie du filet du titre : exactement
 * ce que montre la capture.
 *
 * On rend la marge a la carte sous forme de rembourrage, et on retire le
 * filet du titre, redondant avec la bordure de la carte immediatement
 * au-dessus. Rien n'est masque, rien ne change de `display` : le repli et le
 * depli du panneau, qui reposent sur `.is-open` et sur l'attribut
 * `aria-expanded` du titre, sont intacts.
 *
 * CSS et non PHP, meme raison qu'au point 6 : le panneau est rendu par le
 * navigateur. La specificite (0,3,0) passe devant celle de checkout.css
 * (0,2,0) sans dependre de l'ordre de chargement des feuilles.
 * ====================================================================== */
.wc-block-checkout .wp-block-woocommerce-checkout-order-summary-block > .wc-block-components-checkout-order-summary__title {
	margin-top: 0;
	border-top: 0;
	padding-top: 20px;
}

/* =========================================================================
 * 8. Bouton de validation — texte encre sur dore, jamais blanc
 *
 * Mesure du 20 aout 2026 : le blanc ne vient pas de WooCommerce mais des
 * styles globaux du theme, qui servent la meme regle pour le fond et pour le
 * texte —
 *   :root :where(.wp-element-button,.wp-block-button__link){
 *     background-color: var(--wp--preset--color--bbe-primary-500);
 *     color: var(--wp--preset--color--bbe-neutral-000); }
 * avec `bbe-primary-500 = #C4913A` et `bbe-neutral-000 = #ffffff`. Les
 * boutons du tunnel portent `wp-element-button` : d'ou le blanc sur dore.
 *
 * Contrastes mesures sur #C4913A : blanc 2,82:1 (echec AA), #1A1814 6,30:1.
 * Au survol, sur #A97B2E : blanc 3,78:1 (echec AA), #1A1814 4,69:1.
 *
 * gm-boutique.css pose deja la bonne couleur, sans `!important` ; la capture
 * client prouve qu'elle ne gagne pas la cascade telle qu'elle est servie. On
 * ne rouvre pas ce fichier, qui appartient a un autre agent : on tranche ici,
 * en `!important` sur la seule couleur, fond et geometrie laisses en place.
 * Aucune autre feuille de wp-content ne declare `!important` sur ces
 * selecteurs — verifie par balayage complet des CSS le 20 aout 2026.
 *
 * CSS et non PHP : le bouton est rendu par le navigateur.
 * ====================================================================== */
.wc-block-cart .wc-block-cart__submit-button,
.wc-block-cart .wc-block-cart__submit-button .wc-block-components-button__text,
.wc-block-checkout .wc-block-components-checkout-place-order-button,
.wc-block-checkout .wc-block-components-checkout-place-order-button .wc-block-components-button__text,
.wc-block-checkout .wc-block-components-checkout-place-order-button .wc-block-components-checkout-place-order-button__text {
	color: #1A1814 !important;
}

.wc-block-cart .wc-block-cart__submit-button svg,
.wc-block-checkout .wc-block-components-checkout-place-order-button svg {
	fill: #1A1814 !important;
}

/* Le tiroir du mini-panier porte le meme bouton dore, hors tunnel : meme
   regle de charte, meme arbitrage de cascade. */
.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-checkout .wc-block-components-button:not(.is-link),
.wc-block-mini-cart__drawer .wc-block-mini-cart__footer-checkout .wc-block-components-button:not(.is-link) .wc-block-components-button__text {
	color: #1A1814 !important;
}

/* =====================================================================
   Tiroir du mini-panier — géométrie verrouillée (signalement client du
   24 août 2026, mobile) : boutons et titre débordaient à droite. Les
   styles globaux du site (boutons pleine largeur avec padding hors
   border-box, H2 de gabarit) atteignaient l'intérieur du tiroir.
   ===================================================================== */
.wc-block-components-drawer, .wc-block-components-drawer * { box-sizing: border-box; }
.wc-block-components-drawer { width: min(420px, 100vw) !important; max-width: 100vw !important; overflow-x: hidden; }
.wc-block-mini-cart__drawer .wc-block-components-button {
	width: 100% !important; max-width: 100% !important; margin: 0 !important;
	display: flex; align-items: center; justify-content: center; }
.wc-block-mini-cart__footer { padding: 16px; }
.wc-block-mini-cart__title { font: 700 22px/1.3 "DM Sans", sans-serif; padding-right: 44px; margin: 0; }
.wc-block-mini-cart__title span { font: inherit; }
.wc-block-components-drawer__close {
	top: 10px !important; right: 10px !important; left: auto !important;
	width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
