/* =============================================================================
   BOUTIQUE (WooCommerce) — 0.7.0
   Remplace les feuilles de Woo (désactivées dans inc/woocommerce.php).
   Même langage que le magazine : cartes d'articles, en-têtes de liste,
   boutons et pastilles du thème. ⚠️ Aucun hex : tokens seulement.
   ============================================================================= */

/* --- Commun : prix, pastilles, boutons Woo ---------------------------------- */
.price { font-family: var(--ff-headline); font-weight: var(--fw-light); }
.price del { margin-right: .35em; font-size: .8em; opacity: .5; }
.price ins { text-decoration: none; }
.pm-badge--promo { background: var(--logo-orange) !important; color: var(--ink) !important; }
.pm-badge--epuise { background: var(--ink) !important; color: var(--paper) !important; }
a.pm-badge:hover { background: var(--ink); color: var(--paper); }

/* Boutons de Woo (panier classique, compte, avis…) : ceux du thème. */
.pm-shop :is(a.button, button.button, input.button, .button.alt),
.woocommerce :is(a.button, button.button, input.button) {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-3);
	min-height: 2.875rem; padding: .5rem 1.25rem;
	border: 0; border-radius: var(--r-btn);
	background: var(--ink); color: var(--paper);
	font-family: var(--ff-headline); font-size: var(--fs-ui); font-weight: var(--fw-light); line-height: 1.2;
	text-decoration: none; cursor: pointer;
	transition: background-color .2s var(--ease), color .2s var(--ease);
}
.pm-shop :is(a.button, button.button, input.button):hover,
.woocommerce :is(a.button, button.button, input.button):hover { background: var(--marine); color: var(--paper); }
:is(.button, button):disabled, .button.disabled { opacity: .45; cursor: not-allowed; }

/* --- Messages (ajouté au panier, erreurs…) ---------------------------------- */
.woocommerce-notices-wrapper:empty { display: none; }
:is(.woocommerce-message, .woocommerce-info, .woocommerce-error) {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3) var(--sp-6);
	margin: 0 0 var(--sp-8); padding: 1rem 1.25rem;
	border-radius: var(--r-panel); border-left: 4px solid var(--marine);
	background: var(--mist); color: var(--ink); list-style: none;
}
.woocommerce-error { border-left-color: var(--logo-orange); flex-direction: column; align-items: flex-start; }
.woocommerce-error li { margin: 0; }
/* Woo place le focus sur le message (lecteurs d'écran) : pas de contour pour autant. */
:is(.woocommerce-notices-wrapper, .woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner):focus { outline: none; }
:is(.woocommerce-message, .woocommerce-info) .button { order: 2; }

/* --- Fil d'Ariane (fiche) --------------------------------------------------- */
.pm-fil { display: flex; flex-wrap: wrap; gap: .35rem .6rem; margin-bottom: clamp(1.5rem, 1rem + 1.5vw, 2.5rem); font-family: var(--ff-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pm-fil a { color: inherit; text-decoration: none; }
.pm-fil a:hover { color: var(--ink); text-decoration: underline; }
.pm-fil__sep { opacity: .5; }

/* =============================================================================
   LISTE DES PRODUITS — en-tête et pastilles de liste.css, cartes de main.css
   ============================================================================= */
.pm-boutique { padding-bottom: var(--section-y); }
ul.products { margin: 0; padding: 0; list-style: none; }
ul.products::before, ul.products::after { content: none; }
.pm-boutique__grille { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
li.product.pm-carte { margin: 0; width: auto; float: none; }
.pm-carte__badges { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.pm-carte__badges .pm-badge { background: var(--bg); }
.pm-carte__prix { margin: 0; font-size: var(--fs-lead); }
/* Visuels de produits (couvertures, objets détourés) : photo entière, sur le gris des cartes. */
li.product .pm-carte__media img { object-fit: contain; padding: 6%; }
li.product .pm-carte__media { background: color-mix(in srgb, var(--ink) 3%, var(--paper)); }
.woocommerce-no-products-found .woocommerce-info { justify-content: flex-start; }

.woocommerce-pagination { margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.woocommerce-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.woocommerce-pagination :is(a, span) { display: grid; place-items: center; min-width: 2.875rem; height: 2.875rem; padding-inline: var(--sp-3); border-radius: var(--r-btn); background: var(--mist); font-family: var(--ff-headline); text-decoration: none; }
.woocommerce-pagination a:hover, .woocommerce-pagination .current { background: var(--ink); color: var(--paper); }

/* =============================================================================
   FICHE PRODUIT
   ============================================================================= */
.pm-produit { padding-block: clamp(1.5rem, 1rem + 2vw, 3rem) var(--section-y); }
.pm-produit__haut {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
	gap: clamp(2rem, 1rem + 4vw, 5rem);
	align-items: start;
}
/* Galerie + résumé dans leur bloc (0.7.1) : le reste de la fiche dessous. */

/* Galerie : la photo, puis les vignettes. */
.pm-produit__galerie { display: grid; gap: .9rem; }
.pm-produit__photo { position: relative; margin: 0; border-radius: var(--r-card); overflow: hidden; background: color-mix(in srgb, var(--ink) 3%, var(--paper)); }
.pm-produit__photo img { display: block; width: 100%; height: auto; }
.pm-produit__agrandir { position: absolute; left: .9rem; bottom: .9rem; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--paper); color: var(--ink); transition: transform .3s var(--ease-out); }
.pm-produit__agrandir:hover { transform: scale(1.08); }
.pm-produit__agrandir .icon { width: 1rem; }
.pm-produit__vignettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: .9rem; margin: 0; padding: 0; list-style: none; }
.pm-produit__vignettes img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-panel); background: var(--mist); transition: opacity .25s var(--ease); }
.pm-produit__vignettes img:hover { opacity: .8; }

/* Résumé : reste en vue tant que la galerie défile (ordinateur). */
.pm-produit .summary { display: grid; gap: 1.25rem; align-content: start; }
/* Collant seulement s'il tient à l'écran (mesuré par boutique.js) : un résumé
   plus haut que l'écran cacherait son bouton « Ajouter au panier ». */
@media (min-width: 901px) {
	.pm-produit .summary.is-collant { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
.pm-produit__badges { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.pm-produit__titre { margin: 0; font-family: var(--ff-headline); font-size: clamp(2.1rem, 1.5rem + 2vw, 3.4rem); font-weight: var(--fw-light); line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; }
.pm-produit .summary .price { margin: 0; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
.woocommerce-product-details__short-description { font-size: var(--fs-lead); line-height: 1.5; }
.woocommerce-product-details__short-description > :first-child { margin-top: 0; }
.woocommerce-product-details__short-description > :last-child { margin-bottom: 0; }

/* Ajout au panier : quantité − 1 + puis bouton du thème. */
.pm-produit form.cart { display: flex; flex-wrap: wrap; gap: .75rem; margin: .5rem 0 0; padding-top: 1.5rem; border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.quantity { display: inline-flex; align-items: stretch; min-height: 3.5rem; border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: var(--r-btn); overflow: hidden; }
.quantity input.qty { width: 3.25rem; min-width: 0; padding: 0; border: 0; background: transparent; font-family: var(--ff-headline); font-size: var(--fs-lead); text-align: center; -moz-appearance: textfield; appearance: textfield; }
.quantity input.qty::-webkit-inner-spin-button, .quantity input.qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pm-qte__btn { width: 3rem; border: 0; background: transparent; color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; transition: background-color .2s var(--ease); }
.pm-qte__btn:hover { background: var(--mist); }
/* Sans JS, ou vendu à l'unité : le champ seul. */
html:not(.js) .pm-qte__btn, .quantity:has(input[type="hidden"], input[readonly]) .pm-qte__btn { display: none; }
.quantity:has(input[type="hidden"]) { display: none; }
.single_add_to_cart_button {
	flex: 1 1 9rem;
	display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-4);
	min-height: 3.5rem; padding: .5rem 1.5rem;
	border: 0; border-radius: var(--r-btn);
	background: var(--ink); color: var(--paper);
	font-family: var(--ff-headline); font-size: var(--fs-lead); font-weight: var(--fw-light); line-height: 1.2;
	cursor: pointer; transition: background-color .2s var(--ease);
}
.single_add_to_cart_button:hover { background: var(--marine); }
.pm-produit .stock { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.pm-produit .stock.out-of-stock { color: var(--ink); font-weight: var(--fw-medium); }

/* Description : typographie d'article (editorial.css), colonne de lecture. */
.pm-produit__description { justify-self: center; width: min(100%, var(--lecture)); margin-top: clamp(1rem, 0rem + 3vw, 3rem); padding-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.pm-produit__description > .pm-surtitre { margin-bottom: 1.25rem; color: var(--muted); }
.pm-produit__description .pm-prose { width: auto; margin-inline: 0; }

/* Produits liés / suggestions : cartes, titre de section façon colonne. */
.pm-produit :is(section.related, section.upsells) { margin-top: clamp(2.5rem, 2rem + 3vw, 5rem); }
.pm-produit :is(section.related, section.upsells) > h2 { margin-bottom: 1.5rem; padding-bottom: .65rem; border-bottom: 2px solid var(--ink); font-family: var(--ff-mono); font-size: .8rem; font-weight: var(--fw-regular); letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 900px) {
	.pm-produit__haut { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
}

/* =============================================================================
   VOLET « AJOUTÉ AU PANIER » (fiche produit, boutique.js) — 0.7.1
   <dialog> natif : focus, Échap et arrière-plan inerte gérés par le
   navigateur. Glisse depuis la droite ; contenu = mini-panier de Woo.
   ============================================================================= */
.pm-volet {
	position: fixed; inset: 0 0 0 auto;
	width: min(28rem, 100%); height: 100dvh; max-width: none; max-height: none;
	margin: 0; padding: 0; border: 0;
	background: var(--paper); color: var(--ink);
	box-shadow: -24px 0 60px color-mix(in srgb, var(--ink) 18%, transparent);
	translate: 100% 0;
	transition: translate .5s var(--ease-out), overlay .5s allow-discrete, display .5s allow-discrete;
}
.pm-volet[open] { display: flex; flex-direction: column; translate: 0 0; }
@starting-style { .pm-volet[open] { translate: 100% 0; } }
.pm-volet::backdrop { background: color-mix(in srgb, var(--ink) 0%, transparent); transition: background-color .5s var(--ease-out), overlay .5s allow-discrete, display .5s allow-discrete; }
.pm-volet[open]::backdrop { background: color-mix(in srgb, var(--ink) 45%, transparent); }
@starting-style { .pm-volet[open]::backdrop { background: color-mix(in srgb, var(--ink) 0%, transparent); } }
@media (prefers-reduced-motion: reduce) { .pm-volet, .pm-volet::backdrop { transition: none; } }

.pm-volet__tete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.pm-volet__titre { margin: 0; font-family: var(--ff-headline); font-size: 1.375rem; }
.pm-volet__coche { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-right: .35rem; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: .85rem; vertical-align: .15em; }
.pm-volet__fermer { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: var(--mist); color: var(--ink); cursor: pointer; }
.pm-volet__fermer .icon { width: 1rem; }
.pm-volet__corps { flex: 1; overflow: auto; padding: 1.5rem; }
.pm-volet__corps .widget_shopping_cart_content { display: flex; flex-direction: column; min-height: 100%; }
.pm-volet .woocommerce-mini-cart { display: grid; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.pm-volet .woocommerce-mini-cart-item { position: relative; display: grid; grid-template-columns: 5.5rem 1fr; column-gap: 1rem; align-items: center; font-family: var(--ff-headline); font-size: 1.125rem; line-height: 1.3; }
.pm-volet .woocommerce-mini-cart-item > a:not(.remove) { display: contents; color: inherit; text-decoration: none; }
.pm-volet .woocommerce-mini-cart-item img { grid-row: span 2; width: 5.5rem; height: 5.5rem; object-fit: contain; border-radius: var(--r-panel); background: color-mix(in srgb, var(--ink) 3%, var(--paper)); }
.pm-volet .woocommerce-mini-cart-item .quantity { grid-column: 2; display: block; min-height: 0; border: 0; font-family: var(--ff); font-size: var(--fs-base); color: var(--muted); }
.pm-volet .woocommerce-mini-cart-item .remove { display: none; } /* retrait : depuis le panier */
.pm-volet .woocommerce-mini-cart__total { display: flex; justify-content: space-between; align-items: baseline; margin: auto 0 0; padding: 1.25rem 0; border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); font-family: var(--ff-headline); font-size: 1.375rem; }
.pm-volet .woocommerce-mini-cart__total strong { font-weight: var(--fw-light); }
.pm-volet .woocommerce-mini-cart__buttons { display: grid; gap: .75rem; margin: 0; }
.pm-volet .woocommerce-mini-cart__buttons .button { min-height: 3.5rem; font-size: var(--fs-lead); }
.pm-volet .woocommerce-mini-cart__buttons .button:not(.checkout) { order: 2; background: var(--mist); color: var(--ink); }
.pm-volet .woocommerce-mini-cart__buttons .button:not(.checkout):hover { background: var(--ink); color: var(--paper); }
.pm-volet .woocommerce-mini-cart__empty-message { color: var(--muted); }
.pm-volet__continuer { margin: 0 1.5rem 1.5rem; padding: .75rem; border: 0; background: none; color: var(--ink); font: inherit; font-size: var(--fs-base); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.single_add_to_cart_button[aria-busy="true"] { opacity: .6; cursor: progress; }

/* =============================================================================
   PANIER, COMMANDE (blocs Woo) — 0.7.1
   Les blocs fixent leurs propres tailles (14–16 px) : trop petit à côté du
   site (texte à 22 px). On remet l'échelle du thème, et on retire le
   soulignement des liens que la typographie d'article (.pm-prose) posait
   sur les noms de produits et les boutons.
   ============================================================================= */
.pm-page :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) { font-family: var(--ff); font-size: 1.125rem; line-height: 1.5; color: var(--ink); }
.pm-prose :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout, .woocommerce) a { text-decoration: none; }
.pm-prose :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout, .woocommerce) a:not([class*="button"]):hover { text-decoration: underline; }

/* Intitulés : petites capitales mono, comme les titres de colonne du site. */
.pm-page :is(.wc-block-cart-items__header, .wc-block-cart__totals-title, .wc-block-components-checkout-order-summary__title-text) { font-family: var(--ff-mono) !important; font-size: .8rem !important; font-weight: var(--fw-regular) !important; letter-spacing: .08em; text-transform: uppercase; }

/* Produits */
.pm-page .wc-block-components-product-name { font-family: var(--ff-headline); font-size: 1.3rem !important; font-weight: var(--fw-light); line-height: 1.25; color: var(--ink) !important; }
.pm-page :is(.wc-block-cart-item__prices, .wc-block-components-product-price, .wc-block-cart-item__total) { font-size: 1.125rem !important; }
.pm-page .wc-block-components-product-metadata { font-size: 1rem !important; color: var(--muted); }
.pm-page .wc-block-cart-item__image img { border-radius: var(--r-panel); background: color-mix(in srgb, var(--ink) 3%, var(--paper)); }
.pm-page .wc-block-components-quantity-selector { border-radius: var(--r-btn) !important; }
.pm-page .wc-block-components-quantity-selector input { font-size: 1.05rem !important; }

/* Totaux */
.pm-page :is(.wc-block-components-totals-item__label, .wc-block-components-totals-item__value, .wc-block-components-panel__button) { font-size: 1.125rem !important; }
.pm-page .wc-block-components-totals-footer-item :is(.wc-block-components-totals-item__label, .wc-block-components-totals-item__value) { font-family: var(--ff-headline); font-size: 1.6rem !important; font-weight: var(--fw-light) !important; }

/* Boutons : ceux du thème, sans soulignement. */
.wc-block-components-button:not(.is-link) {
	min-height: 3.5rem; border-radius: var(--r-btn) !important;
	background: var(--ink) !important; color: var(--paper) !important;
	font-family: var(--ff-headline); font-size: var(--fs-lead) !important; font-weight: var(--fw-light) !important;
	text-decoration: none !important;
}
.wc-block-components-button:not(.is-link):hover { background: var(--marine) !important; }
.wc-block-components-button:not(.is-link) .wc-block-components-button__text { text-decoration: none; }

/* Commande : étapes, champs */
.pm-page .wc-block-components-checkout-step__title { font-family: var(--ff-headline); font-size: 1.6rem !important; font-weight: var(--fw-light) !important; }
.pm-page :is(.wc-block-components-checkout-step__description, .wc-block-components-checkbox__label, .wc-block-components-radio-control__label, .wc-block-components-address-card) { font-size: 1.0625rem !important; }
.pm-page :is(.wc-block-components-text-input input, .wc-block-components-combobox input, .wc-blocks-components-select__select, .wc-block-components-textarea) { border-radius: var(--r-btn) !important; font-size: 1.125rem !important; }
.pm-page .wc-block-components-text-input label { font-size: 1rem !important; }
.pm-page .wc-block-checkout__terms { font-size: 1rem; }
.pm-page .wc-block-checkout__terms a { text-decoration: underline; }
.pm-page .wc-block-cart__empty-cart__title { font-family: var(--ff-headline); font-weight: var(--fw-light); }

/* =============================================================================
   BANDEAU PHOTO DE LA BOUTIQUE (0.8.0) — repris du CSS additionnel.
   Balisage : pm_boutique_bandeau() (inc/woocommerce.php), photos = la galerie
   posée dans le contenu de la page « Boutique ».
   Les bandes s'ouvrent au survol ; la 4e (les mouettes) est ouverte par défaut.
   ============================================================================= */
.pm-liste__tete--bandeau .pm-boutique-bandeau { margin-bottom: clamp(.5rem, 1.5vw, 1rem); }
.pm-boutique-bandeau { position: relative; }
.pm-boutique-bandeau__bandes { display: flex; gap: clamp(6px, .9vw, 14px); height: clamp(340px, 36vw, 520px); }
.pm-boutique-bandeau__bande {
	flex: 1 1 0; min-width: 0;
	border-radius: var(--r-card, 20px); overflow: hidden;
	transition: flex-grow .7s cubic-bezier(.2,.7,.2,1);
}
.pm-boutique-bandeau__bande img {
	display: block; width: 100%; height: 100%; max-width: none; object-fit: cover;
	transform: scale(1.04);
	transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.pm-boutique-bandeau__bande:hover,
.pm-boutique-bandeau__bande:nth-child(4) { flex-grow: 2.4; }
.pm-boutique-bandeau__bande:hover img,
.pm-boutique-bandeau__bande:nth-child(4) img { transform: scale(1); }
.pm-boutique-bandeau__bandes:hover .pm-boutique-bandeau__bande:nth-child(4):not(:hover) { flex-grow: 1; }
.pm-boutique-bandeau__bandes:hover .pm-boutique-bandeau__bande:nth-child(4):not(:hover) img { transform: scale(1.04); }

.pm-boutique-bandeau__titre {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: min(24rem, 80%);
	padding: clamp(1.6rem, 3vw, 2.4rem) clamp(1.4rem, 3vw, 2.2rem);
	border-radius: var(--r-card, 20px);
	background: color-mix(in srgb, var(--paper) 88%, transparent);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	box-shadow: 0 20px 50px -20px color-mix(in srgb, var(--ink) 35%, transparent);
	text-align: center;
}
.pm-boutique-bandeau__titre p { margin: 0; }
.pm-boutique-bandeau__sur { font-family: var(--ff-mono); font-size: var(--fs-sm, .85rem); text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
.pm-boutique-bandeau__h {
	margin-top: .6rem;
	font-family: var(--ff-headline); font-weight: 400;
	font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -.02em; color: var(--ink);
}
.pm-boutique-bandeau__h em { font-family: var(--ff-serif); font-style: italic; font-weight: 400; color: var(--marine); }
.pm-boutique-bandeau__accroche { margin-top: .9rem; font-weight: 300; font-size: 1rem; line-height: 1.45; color: var(--muted); }

@media (max-width: 767px) {
	.pm-boutique-bandeau__bandes { height: 220px; }
	.pm-boutique-bandeau__bande:nth-child(n+5) { display: none; }
	.pm-boutique-bandeau__titre { position: relative; left: auto; top: auto; transform: none; width: 88%; margin: -3rem auto 0; }
}
@media (prefers-reduced-motion: reduce) {
	.pm-boutique-bandeau__bande, .pm-boutique-bandeau__bande img { transition: none; }
}
