/**
 * Fiche produit : étiquettes de variation.
 *
 * Chargée uniquement sur les fiches produit (voir inc/variation-labels.php).
 * Couleurs de la charte Evasion : encre #1e221f (logo), orange #ff5733,
 * sauge #87907c.
 */

/* Les listes déroulantes restent dans le DOM (WooCommerce en dépend) mais
   sortent du champ visuel. Pas de display:none : le <select> porte le
   libellé de l'attribut pour les outils d'assistance. */
.variations .value .er-labels ~ select,
.variations td.value .er-labels ~ select {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

/* Le thème met le libellé et la valeur côte à côte : on empile. */
.summary table.variations,
.summary table.variations tbody,
.summary table.variations tr,
.summary table.variations th,
.summary table.variations td {
	display: block;
	width: 100%;
}

.summary table.variations th.label {
	padding: 0 0 8px;
}

.summary table.variations td.value {
	padding: 0 0 18px;
}

.summary table.variations th.label label {
	color: #1e221f;
	font-size: 15px;
	font-weight: 700;
}

/* Choix courant à côté du nom de l'attribut : « Couleur  Bleu ». */
.er-current {
	color: #5f6457;
	font-weight: 400;
	margin-left: 8px;
}

.er-labels {
	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;
}

.er-label {
	margin: 0;
}

.er-label__btn {
	align-items: center;
	background: #fff;
	border: 1px solid rgba(30, 34, 31, 0.22);
	border-radius: 999px;
	color: #1e221f;
	cursor: pointer;
	display: inline-flex;
	font-size: 14px;
	font-weight: 500;
	gap: 8px;
	line-height: 1.2;
	min-height: 42px;
	min-width: 48px;
	justify-content: center;
	padding: 9px 16px;
	transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.er-label--dot .er-label__btn {
	padding-left: 8px;
}

.er-label__btn:hover,
.er-label__btn:focus-visible {
	border-color: #1e221f;
}

.er-label__btn:focus-visible {
	outline: 2px solid #ff5733;
	outline-offset: 2px;
}

.er-label__dot {
	background: var(--er-dot, #e7e7ea);
	border-radius: 50%;
	/* Contour discret : sans lui, le blanc et le crème disparaissent. */
	box-shadow: inset 0 0 0 1px rgba(30, 34, 31, 0.18);
	display: block;
	flex: 0 0 auto;
	height: 24px;
	width: 24px;
}

/* Sélection : fond encre, texte blanc. La pastille garde un liseré blanc
   pour rester lisible, même noire sur fond noir. */
.er-label.is-selected .er-label__btn {
	background: #1e221f;
	border-color: #1e221f;
	color: #fff;
}

.er-label.is-selected .er-label__dot {
	box-shadow: 0 0 0 2px #fff;
}

/* Combinaison indisponible : barrée, pas seulement estompée (l'opacité seule
   se confond avec une couleur claire). */
.er-label.is-unavailable .er-label__btn {
	cursor: not-allowed;
	opacity: 0.4;
}

.er-label.is-unavailable .er-label__text {
	text-decoration: line-through;
}

@media (max-width: 767px) {
	.er-label__btn {
		font-size: 13px;
		min-height: 40px;
		padding: 8px 13px;
	}

	.er-label--dot .er-label__btn {
		padding-left: 7px;
	}

	.er-label__dot {
		height: 22px;
		width: 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.er-label__btn {
		transition: none;
	}
}
