/* ==========================================================================
   Boutique (page Boutique et catégories de produits WooCommerce) — chargée uniquement sur ces pages.
   WooCommerce garde toute la logique (produits, prix, stocks, panier) ; seule la présentation change.
   Mêmes jetons que le reste du site : encre, pétrole, teal, crème, sable. Survol = couleur seulement.
   ========================================================================== */

/* Hero sans photo : comme l'agenda — fond noir bleuté, Kraken en filigrane, pas de devise. */
.a-hero--shop.a-hero--texture {
	background:
		radial-gradient(ellipse 55% 80% at 85% 40%, color-mix(in srgb, var(--c-teal) 12%, transparent), transparent 70%),
		linear-gradient(160deg, color-mix(in srgb, var(--a-petrol-deep) 70%, var(--c-ink)), var(--c-ink) 70%);
}

.a-hero--shop .a-hero__mascot-wrap {
	opacity: 0.1;
	filter: grayscale(0.4);
}

@media (max-width: 900px) {
	.a-hero--shop .a-hero__mascot-wrap {
		opacity: 0.07;
	}
}

/* Hero plus bas : le catalogue arrive plus vite à l'écran (titre et sous-titre inchangés). */
.a-hero--shop {
	padding-block: clamp(32px, 4.5vw, 64px) clamp(36px, 5vw, 68px);
	border-bottom: 0;
}

.a-hero--shop .a-hero__title {
	font-size: clamp(3rem, 7.4vw, 6.4rem);
}

.a-hero--shop .a-breadcrumb ol {
	margin-bottom: 20px;
}

/* Visuel « merch » à droite (champ « Visuel à droite » de la page Boutique), à la place du Kraken :
   illustration secondaire, assombrie et fondue dans le fond pour garder le titre lisible. */
.a-hero__figure {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: -1;
	width: min(44%, 620px);
	pointer-events: none;
}

/* Halo teal discret derrière la personne. */
.a-hero__figure::before {
	content: "";
	position: absolute;
	inset: 10% 0 0 10%;
	z-index: -1;
	background: radial-gradient(ellipse 55% 60% at 55% 60%, color-mix(in srgb, var(--c-teal) 16%, transparent), transparent 70%);
}

.a-hero__figure img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 18%;
	filter: brightness(0.82) saturate(0.92);
	/* Photo classique : fondu vers le texte (gauche) et vers le bas. */
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 42%), linear-gradient(to top, transparent 0, #000 28%);
	-webkit-mask-composite: source-in;
	mask-image: linear-gradient(to right, transparent 0, #000 42%), linear-gradient(to top, transparent 0, #000 28%);
	mask-composite: intersect;
}

/* Image détourée (PNG transparent) : posée en bas, entière, simple fondu du bas. */
.a-hero__figure.is-cutout {
	right: var(--a-gutter);
	width: min(38%, 520px);
	padding-top: 24px;
}

.a-hero__figure.is-cutout img {
	object-fit: contain;
	object-position: 50% 100%;
	filter: brightness(0.9) saturate(0.95) drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));
	-webkit-mask-image: linear-gradient(to top, transparent 0, #000 18%);
	mask-image: linear-gradient(to top, transparent 0, #000 18%);
}

/* Le texte garde sa largeur : le visuel reste à droite, sous le contenu si l'écran est étroit. */
.a-hero--shop .a-hero__content {
	position: relative;
	max-width: min(720px, 58%);
}

@media (max-width: 900px) {
	.a-hero--shop .a-hero__content {
		max-width: none;
	}

	.a-hero__figure,
	.a-hero__figure.is-cutout {
		right: 0;
		width: 62%;
		opacity: 0.3;
	}
}

@media (max-width: 520px) {
	.a-hero__figure,
	.a-hero__figure.is-cutout {
		width: 72%;
		opacity: 0.2;
	}

	.a-filters .a-filters__list {
		gap: 8px;
		padding-block: 14px;
	}

	.a-filters .a-filters__list a {
		min-height: 38px;
		padding: 0 14px;
		font-size: 0.82rem;
	}
}

/* --------------------------------------------------------------------------
   Catégories (catégories WooCommerce réellement utilisées) et barre de tri
   -------------------------------------------------------------------------- */
/* Bande des catégories dans la continuité du hero (même fond, simple filet dessous), puis le catalogue
   remonte : hero > filtres > produits sans rupture. */
.a-hero--shop + .a-filters {
	border-top: 1px solid var(--a-line);
	border-bottom: 1px solid var(--a-line);
	background: var(--c-ink);
}

.a-filters {
	border-bottom: 1px solid var(--a-line);
	background: color-mix(in srgb, var(--a-petrol-deep) 40%, var(--c-ink));
}

.a-hero--shop ~ .a-section.a-shop {
	padding-top: clamp(28px, 3.5vw, 44px);
}

/* Pastilles regroupées et centrées. La règle commune des filtres (main.css) étire chaque élément
   (flex: 1 0 auto) et coupe la liste (overflow-x: auto) : c'est ce qui espaçait les boutons et rognait
   le contour du dernier (« Esport »). Ici : taille naturelle, retour à la ligne, aucun rognage. */
.a-filters .a-filters__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 18px 2px;
	overflow: visible;
	list-style: none;
}

.a-filters .a-filters__list > li {
	flex: 0 0 auto;
}

.a-filters .a-filters__list a {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 0;
	min-height: 42px;
	padding: 0 20px;
	border: 1px solid var(--a-line-strong);
	border-radius: 999px;
	font-family: var(--a-ff-cond);
	font-stretch: var(--a-fs-cond);
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--a-text);
	text-decoration: none;
	transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

/* Contour complet pour toutes les pastilles, y compris la dernière (main.css lui retire son bord droit). */
.a-filters .a-filters__list > li:last-child a {
	border-right-color: var(--a-line-strong);
}

.a-filters .a-filters__list > li:last-child a[aria-current],
.a-filters .a-filters__list > li:last-child a:hover {
	border-right-color: var(--c-teal);
}

.a-filters .a-filters__list a:hover {
	border-color: var(--c-teal);
	color: var(--c-teal);
}

.a-filters .a-filters__list a[aria-current] {
	border-color: var(--c-teal);
	background: var(--c-teal);
	color: var(--c-ink);
}

/* Nombre de résultats à gauche, tri à droite, sur une même ligne. */
.a-shop .woocommerce-notices-wrapper:empty {
	display: none;
}

.a-shop .woocommerce-result-count {
	float: left;
	margin: 0 0 24px;
	padding-top: 12px;
	font-size: 0.95rem;
	color: var(--a-text);
}

.a-shop .woocommerce-ordering {
	float: right;
	margin: 0 0 24px;
}

.a-shop .woocommerce-ordering select {
	min-width: 220px;
	min-height: 46px;
	padding-right: 2.6em;
	border-color: var(--a-line-strong);
	background-color: color-mix(in srgb, var(--a-petrol-deep) 40%, var(--c-ink));
	font-weight: 700;
	color: var(--c-almond);
	cursor: pointer;
}

.a-shop .woocommerce-ordering select:hover,
.a-shop .woocommerce-ordering select:focus {
	border-color: var(--c-teal);
}

.a-shop ul.products {
	clear: both;
}

/* Moins d'espace sous le catalogue (la section suivante a son propre rythme). */
.a-section.a-shop {
	padding-bottom: clamp(36px, 4vw, 56px);
}

.a-shop ul.products {
	margin-bottom: 0;
}

.a-shop .woocommerce-pagination {
	margin-top: 28px;
}

/* --------------------------------------------------------------------------
   Grille : 4 produits par ligne, cartes sombres, visuel carré homogène
   -------------------------------------------------------------------------- */
.a-shop ul.products {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

/* La grille place les cartes : on neutralise largeur, flottant et marges de la feuille WooCommerce
   « petits écrans » (li.product à 48 % en flottant), qui l'emportait sur mobile. */
.a-shop ul.products[class*="columns-"] li.product,
.a-shop ul.products li.product {
	float: none;
	clear: none;
	width: auto;
	margin: 0;
}

.a-shop ul.products li.product {
	display: flex;
	flex-direction: column;
	padding: 0 0 20px;
	overflow: hidden;
	border: 1px solid var(--a-line);
	border-radius: var(--a-radius);
	background: color-mix(in srgb, var(--a-petrol-deep) 45%, var(--c-ink));
	transition: border-color 0.2s;
}

/* Survol : bordure turquoise seulement (aucun décalage de mise en page). */
.a-shop ul.products li.product:hover,
.a-shop ul.products li.product:focus-within {
	border-color: var(--c-teal);
	transform: none;
}

.a-shop ul.products li.product .woocommerce-LoopProduct-link {
	display: flex;
	flex: 1;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

.a-shop ul.products li.product .woocommerce-LoopProduct-link:focus-visible {
	outline: 2px solid var(--c-teal);
	outline-offset: -2px;
}

/* Photo produit : présentée entière (contain) sur un fond sobre, sans déformation. */
.a-shop ul.products li.product a img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 0 18px;
	padding: 18px;
	aspect-ratio: 1;
	object-fit: contain;
	border-radius: 0;
	background:
		radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c-almond) 8%, transparent), transparent 65%),
		color-mix(in srgb, var(--a-petrol-deep) 75%, var(--c-ink));
	filter: none;
}

/* Sans photo : visuel sombre aux couleurs Antic, emblème en filigrane (jamais de texte « photo à fournir »). */
.a-product-ph {
	display: grid;
	place-items: center;
	margin: 0 0 18px;
	aspect-ratio: 1;
	background:
		linear-gradient(135deg, transparent 55%, color-mix(in srgb, var(--c-teal) 8%, transparent) 55%),
		color-mix(in srgb, var(--a-petrol-deep) 75%, var(--c-ink));
}

/* Emblème carré à taille fixe : sans cela, une image différée non encore chargée reprend la taille
   réservée par WordPress (3000 × 1500) et étire la carte. */
.a-shop ul.products li.product .a-product-ph img,
.a-product-ph .a-product-ph__mark {
	width: 34%;
	height: auto;
	margin: 0;
	padding: 0;
	aspect-ratio: 1 / 1;
	contain-intrinsic-size: auto;
	object-fit: contain;
	background: none;
	opacity: 0.28;
}

.a-shop ul.products li.product .woocommerce-loop-product__title {
	margin: 0 0 8px;
	padding: 0 20px;
	font-family: var(--a-ff-body);
	font-size: 1.08rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: var(--c-almond);
	overflow-wrap: anywhere;
}

.a-shop ul.products li.product .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	margin: 0 0 16px;
	padding: 0 20px;
	font-size: 1.45rem;
	color: var(--c-almond);
}

.a-shop ul.products li.product .price del {
	order: 2;
	font-size: 1rem;
	color: var(--a-muted);
	opacity: 1;
}

.a-shop ul.products li.product .price ins {
	text-decoration: none;
	color: var(--c-teal);
}

/* Bouton : pleine largeur, aligné en bas de la carte (quel que soit le nom du produit). */
.a-shop ul.products li.product .button {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	margin: auto 20px 0;
	text-align: center;
}

.a-shop ul.products li.product .added_to_cart {
	display: block;
	margin: 10px 20px 0;
	font-size: 0.9rem;
	font-weight: 700;
	text-align: center;
	color: var(--c-teal);
}

/* Pastilles : Coup de cœur / Nouveauté / Rupture (gauche) ; Promo réelle WooCommerce (droite). */
.a-shop .a-product-badges {
	top: 12px;
	left: 12px;
}

.a-tag--muted {
	border-color: var(--a-line-strong);
	background: var(--c-ink);
	color: var(--a-muted);
}

.a-shop ul.products li.product .onsale {
	position: absolute;
	top: 12px;
	right: 12px;
	left: auto;
	z-index: 2;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0.35em 0.7em;
	border-radius: var(--a-radius-sm);
	background: var(--c-sand);
	font-family: var(--a-ff-cond);
	font-stretch: var(--a-fs-cond);
	font-size: 0.82rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--c-ink);
}

/* Pagination WooCommerce dans le style du site. */
.a-shop .woocommerce-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	border: 0;
}

.a-shop .woocommerce-pagination ul.page-numbers li {
	border: 0;
}

.a-shop .woocommerce-pagination .page-numbers a,
.a-shop .woocommerce-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border: 1px solid var(--a-line-strong);
	color: var(--a-text);
}

.a-shop .woocommerce-pagination .page-numbers .current {
	border-color: var(--c-teal);
	background: var(--c-teal);
	color: var(--c-ink);
}

/* --------------------------------------------------------------------------
   « Porter nos couleurs, soutenir l'équipage » : bloc court et sobre
   -------------------------------------------------------------------------- */
.a-shop-support {
	padding-block: clamp(36px, 4.5vw, 56px);
	border-top: 1px solid var(--a-line);
	background:
		radial-gradient(ellipse 50% 90% at 0% 50%, color-mix(in srgb, var(--c-teal) 9%, transparent), transparent 70%),
		color-mix(in srgb, var(--a-petrol-deep) 40%, var(--c-ink));
}

.a-shop-support__inner {
	display: flex;
	align-items: center;
	gap: clamp(18px, 3vw, 32px);
}

.a-shop-support__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 60px;
	height: 60px;
	border: 1px solid var(--a-piping-soft);
	border-radius: 50%;
	color: var(--c-teal);
}

.a-shop-support__icon .a-icon {
	width: 26px;
	height: 26px;
}

.a-shop-support__title {
	margin: 0 0 6px;
	font-family: var(--a-ff-cond);
	font-stretch: var(--a-fs-cond);
	font-size: clamp(1.5rem, 2.6vw, 2.2rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--c-almond);
}

.a-shop-support__text {
	max-width: 70ch;
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--a-text);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
	.a-shop ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	.a-shop ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}

	/* Pastilles plus compactes : elles ne masquent pas le visuel sur deux colonnes. */
	.a-shop .a-product-badges {
		top: 8px;
		left: 8px;
		gap: 4px;
	}

	.a-shop .a-product-badges .a-tag {
		padding: 0.25em 0.5em;
		font-size: 0.66rem;
	}
}

@media (max-width: 640px) {
	.a-shop .woocommerce-result-count,
	.a-shop .woocommerce-ordering {
		float: none;
	}

	.a-shop .woocommerce-result-count {
		margin-bottom: 10px;
		padding-top: 0;
	}

	.a-shop .woocommerce-ordering select {
		width: 100%;
	}

	.a-shop ul.products li.product .woocommerce-loop-product__title,
	.a-shop ul.products li.product .price {
		padding-inline: 14px;
	}

	.a-shop ul.products li.product .woocommerce-loop-product__title {
		font-size: 1rem;
	}

	.a-shop ul.products li.product .price {
		font-size: 1.25rem;
	}

	.a-shop ul.products li.product .button {
		margin-inline: 14px;
		padding-inline: 0.6em;
		font-size: 0.78rem;
	}

	.a-shop-support__inner {
		align-items: flex-start;
	}

	.a-shop-support__icon {
		width: 48px;
		height: 48px;
	}
}

/* Très petits écrans : une colonne, textes et boutons à taille normale. */
@media (max-width: 380px) {
	.a-shop ul.products {
		grid-template-columns: minmax(0, 1fr);
	}

	.a-shop ul.products li.product .button {
		font-size: 0.86rem;
	}
}
