/**
 * Fiche produit — pastilles de variation.
 *
 * Chargée uniquement sur les fiches produit (voir inc/product.php).
 */

/* Les listes déroulantes restent dans le DOM — WooCommerce en dépend —
   mais sortent du champ visuel. Pas de display:none : un select masqué
   ainsi n'est plus lisible par les outils d'assistance, or il porte le
   libellé de l'attribut. */
.variations .value select,
.variations td.value select {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.sweat-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	/* Le thème pose une marge sur les <ul> : remise à zéro complète. */
	margin: 0;
	padding: 0;
}

.sweat-swatch {
	margin: 0;
}

.sweat-swatch__btn {
	background: none;
	border: 0;
	cursor: pointer;
	display: inline-flex;
	padding: 0;
}

/* Coloris — pastilles rondes
   ------------------------------------------------------------------ */

.sweat-swatches--color {
	gap: 10px;
}

.sweat-swatch--color .sweat-swatch__label {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.sweat-swatch--color .sweat-swatch__dot {
	background-color: var(--swatch, #e7e7ea);
	border-radius: 50%;
	display: block;
	height: 28px;
	position: relative;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	width: 28px;
	/* Contour discret : sans lui, un coloris très clair disparaît sur
	   fond blanc. */
	box-shadow: inset 0 0 0 1px rgba(30, 30, 30, 0.14);
}

.sweat-swatch--color .sweat-swatch__btn:hover .sweat-swatch__dot,
.sweat-swatch--color .sweat-swatch__btn:focus-visible .sweat-swatch__dot {
	transform: scale(1.08);
}

/* Sélection : un anneau détaché de la pastille, qui fonctionne quelle que
   soit la couleur — y compris le noir, où une simple bordure sombre
   serait invisible. */
.sweat-swatch--color.is-selected .sweat-swatch__dot {
	box-shadow:
		inset 0 0 0 1px rgba(30, 30, 30, 0.14),
		0 0 0 2px #fff,
		0 0 0 4px var(--sweat-ink, #1e1e1e);
}

/* Taille — pastilles allongées
   ------------------------------------------------------------------ */

.sweat-swatch--text .sweat-swatch__dot {
	display: none;
}

.sweat-swatch--text .sweat-swatch__label {
	align-items: center;
	border: 1px solid rgba(30, 30, 30, 0.25);
	border-radius: 50px;
	color: var(--sweat-ink, #1e1e1e);
	display: inline-flex;
	font-size: 14px;
	justify-content: center;
	line-height: 1;
	min-width: 44px;
	padding: 11px 12px;
	transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.sweat-swatch--text .sweat-swatch__btn:hover .sweat-swatch__label,
.sweat-swatch--text .sweat-swatch__btn:focus-visible .sweat-swatch__label {
	border-color: var(--sweat-ink, #1e1e1e);
}

.sweat-swatch--text.is-selected .sweat-swatch__label {
	background-color: var(--sweat-ink, #1e1e1e);
	border-color: var(--sweat-ink, #1e1e1e);
	color: #fff;
}

/* Combinaison indisponible
   ------------------------------------------------------------------ */

.sweat-swatch.is-unavailable .sweat-swatch__btn {
	cursor: not-allowed;
}

.sweat-swatch.is-unavailable .sweat-swatch__label,
.sweat-swatch.is-unavailable .sweat-swatch__dot {
	opacity: 0.3;
}

/* Barré en diagonale : l'opacité seule se confond avec un coloris clair. */
.sweat-swatch--text.is-unavailable .sweat-swatch__label {
	background-image: linear-gradient(
		to top right,
		transparent calc(50% - 1px),
		currentColor calc(50% - 1px),
		currentColor calc(50% + 1px),
		transparent calc(50% + 1px)
	);
}

@media (prefers-reduced-motion: reduce) {

	.sweat-swatch__dot,
	.sweat-swatch__label {
		transition: none;
	}

	.sweat-swatch--color .sweat-swatch__btn:hover .sweat-swatch__dot {
		transform: none;
	}
}

/* Disponibilité
   ------------------------------------------------------------------ */

.sweat-stock {
	align-items: center;
	display: flex;
	gap: 4px;
	justify-content: center;
	margin: 0 0 14px;
}

.sweat-stock__label {
	color: var(--sweat-ink, #1e1e1e);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
}

.sweat-stock__dot {
	background-color: #17994f;
	border-radius: 50%;
	flex: 0 0 auto;
	height: 9px;
	position: relative;
	width: 9px;
}

/* Halo qui respire : c'est l'anneau qui pulse, pas la pastille — la
   pastille garde une opacité pleine, donc l'information reste lisible
   à tout moment de l'animation. */
.sweat-stock--in .sweat-stock__dot::after {
	animation: sweat-stock-pulse 2.4s ease-in-out infinite;
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(23, 153, 79, 0.55);
	content: "";
	inset: 0;
	position: absolute;
}

.sweat-stock--out .sweat-stock__dot {
	background-color: #b3251e;
}

@keyframes sweat-stock-pulse {

	0% {
		box-shadow: 0 0 0 0 rgba(23, 153, 79, 0.5);
	}

	70% {
		box-shadow: 0 0 0 5px rgba(23, 153, 79, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(23, 153, 79, 0);
	}
}

/* Bouton d'ajout au panier
   ------------------------------------------------------------------ */

.summary .single_add_to_cart_button {
	background-color: var(--sweat-ink, #1e1e1e);
	border: 0;
	border-radius: 10px;
	color: #fff;
	display: block;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 1.5px;
	line-height: 1.3;
	padding: 16px 24px;
	text-align: center;
	text-transform: uppercase;
	/* L'espace avant le bandeau express se porte ici, pas sur le bandeau :
	   le bouton étant flottant, la « clearance » qui remet le bandeau dans
	   le flux absorbe sa marge supérieure. La marge basse du flottant, elle,
	   est bien prise en compte. */
	margin-bottom: 12px;
	transition: background-color 0.18s ease, opacity 0.18s ease;
	width: 100%;
}

.summary .single_add_to_cart_button:hover,
.summary .single_add_to_cart_button:focus-visible {
	background-color: #000;
	color: #fff;
}

.summary .single_add_to_cart_button.disabled,
.summary .single_add_to_cart_button:disabled {
	background-color: var(--sweat-ink, #1e1e1e);
	cursor: not-allowed;
	opacity: 0.4;
}

/* La quantité passe au-dessus du bouton pour lui laisser toute la largeur,
   comme sur la maquette. */
.summary form.cart .quantity {
	margin-bottom: 12px;
}

@media (prefers-reduced-motion: reduce) {

	.sweat-stock--in .sweat-stock__dot::after {
		animation: none;
	}

	.summary .single_add_to_cart_button {
		transition: none;
	}
}

/* Le sélecteur de quantité n'existe pas dans la maquette : le bouton
   occupe toute la largeur. Masqué visuellement, mais laissé dans le
   formulaire — WooCommerce attend le champ à la soumission. */
.summary form.cart .quantity {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	margin: 0;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

/* Accordéon produit
   ------------------------------------------------------------------ */

.sweat-accordion {
	/* Le bouton d'ajout étant flottant, il faut dégager le flux. */
	clear: both;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 24px;
}

.sweat-accordion__item {
	background-color: #f7f7f7;
	border-radius: 10px;
	overflow: hidden;
}

.sweat-accordion__heading {
	margin: 0;
}

.sweat-accordion__trigger {
	align-items: center;
	background: none;
	border: 0;
	color: var(--sweat-ink, #1e1e1e);
	cursor: pointer;
	display: flex;
	font-size: 16px;
	font-weight: 500;
	gap: 16px;
	justify-content: space-between;
	line-height: 1.4;
	padding: 18px 20px;
	text-align: left;
	width: 100%;
}

/* Signe + qui pivote en – : une seule forme animée plutôt que deux
   icônes permutées, la transition reste continue. */
.sweat-accordion__sign {
	flex: 0 0 auto;
	height: 14px;
	position: relative;
	width: 14px;
}

.sweat-accordion__sign::before,
.sweat-accordion__sign::after {
	background-color: currentColor;
	content: "";
	inset: 50% 0 auto 0;
	height: 1.5px;
	position: absolute;
	transition: transform 0.3s ease;
	transform: translateY(-50%);
}

.sweat-accordion__sign::after {
	transform: translateY(-50%) rotate(90deg);
}

.sweat-accordion__trigger[aria-expanded="true"] .sweat-accordion__sign::after {
	transform: translateY(-50%) rotate(180deg);
}

/*
 * Dépliage animé sans hauteur calculée en JavaScript : la grille passe de
 * 0fr à 1fr, ce qui s'anime nativement et reste juste quel que soit le
 * contenu — un max-height figé tronquerait un texte long ou traînerait
 * sur un texte court.
 */
.sweat-accordion__panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.32s ease;
}

.sweat-accordion__panel.is-open {
	grid-template-rows: 1fr;
}

.sweat-accordion__content {
	min-height: 0;
	overflow: hidden;
	padding: 0 20px;
	transition: padding 0.32s ease, opacity 0.24s ease;
	opacity: 0;
}

.sweat-accordion__panel.is-open .sweat-accordion__content {
	opacity: 1;
	padding-bottom: 20px;
}

/*
 * Titres du contenu déplié.
 *
 * Le contenu vient de la description longue du produit, donc du thème
 * global : ses h2 sortaient en 30 px dans un panneau dont le texte fait
 * 16 px et dont l'onglet lui-même n'en fait que 16. Un titre presque
 * deux fois plus gros que le libellé qui l'ouvre déséquilibre le bloc.
 * On resserre le rapport à 1,25 — assez pour structurer la lecture, pas
 * assez pour crier.
 */
.sweat-accordion__content h2 {
	font-size: 20px;
	line-height: 1.3;
	margin-bottom: 10px;
	margin-top: 28px;
}

.sweat-accordion__content h3 {
	font-size: 17px;
	line-height: 1.35;
	margin-bottom: 8px;
	margin-top: 22px;
}

/* Le premier titre ne doit pas décoller du haut du panneau. */
.sweat-accordion__content > h2:first-child,
.sweat-accordion__content > h3:first-child {
	margin-top: 0;
}

.sweat-accordion__content > :first-child {
	margin-top: 0;
}

.sweat-accordion__content > :last-child {
	margin-bottom: 0;
}

.sweat-accordion__content table {
	margin: 0;
	width: 100%;
}

.sweat-accordion__content th {
	font-weight: 500;
	padding: 6px 12px 6px 0;
	text-align: left;
	vertical-align: top;
	white-space: nowrap;
	width: 1%;
}

.sweat-accordion__content td {
	padding: 6px 0;
}

.sweat-accordion__content p {
	margin-block: 0 12px;
}

@media (prefers-reduced-motion: reduce) {

	.sweat-accordion__panel,
	.sweat-accordion__content,
	.sweat-accordion__sign::before,
	.sweat-accordion__sign::after {
		transition: none;
	}
}

/* Bandeau promotionnel, au-dessus du titre
   ------------------------------------------------------------------
   Valeurs relevées sur la maquette (nœuds 46:859 et 47:2006, identiques
   en desktop et mobile) : pastille 57 x 28 à rayon 6 sur #1E1E1E, texte
   blanc 16, écart 14, libellé 16 en #1e1e1e avec le code en semi-gras. */

.sweat-promo {
	align-items: center;
	display: flex;
	/* Le libellé passe sous la pastille plutôt que de déborder si la
	   date rallonge la ligne sur un petit écran. */
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 12px;
}

.sweat-promo__badge {
	background-color: var(--sweat-ink, #1e1e1e);
	border-radius: 6px;
	color: #fff;
	display: inline-block;
	font-size: 16px;
	font-weight: 700;
	/* 28 px de haut sans hauteur codée : 20 de ligne + 2 x 4 de marge. */
	line-height: 20px;
	padding: 4px 10px;
	white-space: nowrap;
}

.sweat-promo__text {
	color: var(--sweat-ink, #1e1e1e);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.35;
	margin: 0;
}

.sweat-promo__text strong {
	font-weight: 600;
}

/* Description courte du haut de fiche
   ------------------------------------------------------------------ */

/*
 * Remplace l'extrait natif, qui sortait en 14/21 sans aucune marge
 * basse : la première pastille de points forts venait toucher la
 * dernière ligne de texte. On lui redonne l'échelle de la maquette
 * (un cran au-dessus des libellés) et l'air qui l'entoure.
 */
.sweat-intro {
	color: #4a4a4a;
	font-size: 16px;
	line-height: 1.55;
	margin: 2px 0 20px;
	max-width: 46ch;
}

.sweat-intro p {
	margin: 0;
}

.sweat-intro p + p {
	margin-top: 8px;
}

@media (min-width: 1024px) {

	.sweat-intro {
		font-size: 17px;
		margin-bottom: 24px;
	}
}

/* Points forts du produit
   ------------------------------------------------------------------ */

.sweat-highlights {
	align-items: flex-start;
	display: flex;
	flex-direction: column;
	gap: 6px;
	list-style: none;
	/* Le thème pose une marge sur les <ul> : remise à zéro complète. */
	margin: 0 0 20px;
	padding: 0;
}

.sweat-highlight {
	align-items: center;
	background-color: #fff;
	border-radius: 40px;
	display: flex;
	filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.1));
	gap: 7px;
	margin: 0;
	/* Retrait asymétrique : la pastille touche presque le bord gauche,
	   le texte respire à droite. */
	padding: 3px 12px 3px 3px;
}

.sweat-highlight__badge {
	align-items: center;
	background-color: #dcd4cb;
	border-radius: 40px;
	display: inline-flex;
	flex: 0 0 auto;
	height: 22px;
	justify-content: center;
	overflow: hidden;
	width: 22px;
}

.sweat-highlight__icon {
	display: block;
	height: 12px;
	object-fit: contain;
	width: 12px;
}

/*
 * 15 px et non 18 : dans cette colonne, les pastilles de taille, le bandeau
 * express et la ligne de stock tournent tous autour de 12-14 px. À 18 px
 * les points forts écrasaient le titre du produit lui-même. 15 px les
 * garde lisibles en tête de zone sans dominer.
 */
.sweat-highlight__label {
	color: var(--sweat-ink, #1e1e1e);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
}

@media (min-width: 1024px) {

	.sweat-highlight__label {
		font-size: 15px;
	}
}

/* Le filtre vide le balisage des étoiles mais le thème imprime quand même
   son conteneur ; vidé, il laisserait un blanc dans la colonne.
   Pas de :empty — le conteneur contient une espace, pas rien. */
.summary .woocommerce-product-rating {
	display: none;
}

/* Guide des tailles, replacé près du sélecteur
   ------------------------------------------------------------------
   Le bouton est déplacé par le script ; ces règles ne font que le mettre
   en forme à sa nouvelle place. Rien n'est masqué tant que le
   déplacement n'a pas eu lieu : sans JavaScript, le guide reste
   accessible là où CommerceKit l'a mis. */

.sweat-sizeline {
	align-items: baseline;
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

.sweat-sizeline .sweat-sizeguide {
	background: none;
	border: 0;
	color: rgba(30, 30, 30, 0.7);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: inherit;
	font-size: 13px;
	padding: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sweat-sizeline .sweat-sizeguide:hover,
.sweat-sizeline .sweat-sizeguide:focus-visible {
	color: var(--sweat-ink, #1e1e1e);
}

.sweat-sizeline .sweat-sizeguide svg {
	display: block;
	height: 15px;
	width: 15px;
}

/* Le bouton d'origine reste dans le DOM — la liaison du plugin en dépend —
   mais n'a plus à s'afficher en bas de fiche. */
.sweat-sizeguide-place #shoptimizer-modals-wrapper .commercekit-sg-label {
	display: none;
}

/* --------------------------------------------------------------------
   Genius Video — vignettes circulaires sous l'ajout au panier
   -------------------------------------------------------------------- */

/*
 * Le plugin sort « padding: 20px 0 0 » : rien en bas. Comme le bouton
 * d'ajout au panier apporte déjà 12 px de marge, on obtenait 32 px
 * au-dessus des vignettes et 0 sous l'étiquette, collée à la barre
 * express. On rééquilibre à 20 px de part et d'autre, ce qui rejoint le
 * rythme de la colonne (14 px sous la ligne de stock, 24 px avant
 * l'accordéon).
 *
 * En padding et non en marge : le module est le dernier enfant de
 * .variations_button, une marge basse s'échapperait du parent.
 */
.single-product .genius-circle-video-module {
	/* Plus de marge basse : la barre « livraison express » qu'elle écartait a
	   été retirée le 02/10/2026, l'accordéon apporte sa propre marge. */
	padding: 8px 0 0;
}

/* Sans variations, la marge du bouton n'existe pas : on la compense. */
.single-product form.cart:not(.variations_form) .genius-circle-video-module {
	padding-top: 20px;
}

/* Repli sans JavaScript : l'ancre ne se cale pas sous l'en-tête collant. */
.sweat-anchor {
	scroll-margin-top: 110px;
}
