/*
 * Blocs Mery.M — feuille de style front.
 *
 * Regle absolue : aucune couleur, aucune police, aucune taille de texte n'est
 * ecrite ici. Tout vient des Global Styles du Kit Elementor, via les variables
 * --e-global-*. Modifier le Kit doit suffire a changer le rendu.
 *
 * Les seules valeurs litterales sont structurelles (grilles, espacements,
 * rayons) et des transparences neutres calculees a partir de currentColor,
 * qui suit donc la couleur de texte heritee.
 *
 * Points de reglage exposes aux widgets Elementor :
 *   --merym-gap        espacement des grilles
 *   --merym-columns    nombre de colonnes
 *   --merym-surface    fond des surfaces (barre collante, ajout rapide)
 */

.merym-block {
	--merym-gap: 1.5rem;
	--merym-columns: 3;
	--merym-radius: 2px;
	--merym-line: color-mix(in srgb, currentColor 16%, transparent);
	--merym-muted: color-mix(in srgb, currentColor 65%, transparent);
}

/* --- Grille commune ------------------------------------------------------ */

.merym-grid {
	display: grid;
	grid-template-columns: repeat(var(--merym-columns, 3), minmax(0, 1fr));
	gap: var(--merym-gap, 1.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 767px) {
	.merym-grid {
		--merym-columns: 1;
	}

	.merym-chaine__grid,
	.merym-cross-sell__list,
	.merym-reassurance {
		--merym-columns: 2;
	}
}

/* --- Accordeons et FAQ --------------------------------------------------- */

.merym-accordeons,
.merym-faq {
	display: flex;
	flex-direction: column;
}

.merym-accordeons__item,
.merym-faq__item {
	border-bottom: 1px solid var(--merym-line);
}

.merym-accordeons__title,
.merym-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding: 1em 0;
	cursor: pointer;
	list-style: none;
}

.merym-accordeons__title::-webkit-details-marker,
.merym-faq__question::-webkit-details-marker {
	display: none;
}

.merym-accordeons__title::after,
.merym-faq__question::after {
	content: "+";
	flex: 0 0 auto;
	line-height: 1;
	transition: transform 0.2s ease;
}

.merym-accordeons__item[open] .merym-accordeons__title::after,
.merym-faq__item[open] .merym-faq__question::after {
	transform: rotate(45deg);
}

.merym-accordeons__content,
.merym-faq__answer {
	padding-bottom: 1.4em;
	color: var(--merym-muted);
}

.merym-accordeons__content > :last-child,
.merym-faq__answer > :last-child {
	margin-bottom: 0;
}

.merym-faq__title {
	margin-bottom: 0.6em;
}

/* --- Statistiques -------------------------------------------------------- */

.merym-stats__item {
	display: flex;
	flex-direction: column;
	gap: 0.35em;
}

.merym-stats__value {
	font-size: 1.75em;
	line-height: 1.1;
	color: var(--e-global-color-primary, currentColor);
}

.merym-stats__label {
	color: var(--merym-muted);
}

/* --- Ou tombe la chaine -------------------------------------------------- */

.merym-chaine__subtitle {
	color: var(--merym-muted);
	margin-bottom: 1.2em;
}

.merym-chaine__figure {
	margin: 0;
}

.merym-chaine__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--merym-radius);
}

.merym-chaine__caption {
	display: flex;
	align-items: baseline;
	gap: 0.6em;
	padding-top: 0.6em;
}

.merym-chaine__badge {
	color: var(--e-global-color-accent, currentColor);
}

.merym-chaine__choose {
	display: inline-block;
	margin-top: 0.3em;
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* --- Reassurance --------------------------------------------------------- */

.merym-reassurance__item {
	display: flex;
	align-items: flex-start;
	gap: 0.7em;
	text-align: initial;
}

.merym-reassurance__icon {
	flex: 0 0 auto;
	line-height: 1;
	color: var(--e-global-color-accent, currentColor);
}

.merym-reassurance__body {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
}

.merym-reassurance__subtitle {
	color: var(--merym-muted);
	font-size: 0.9em;
}

.merym-reassurance--achat {
	--merym-columns: 1;
	--merym-gap: 0.6rem;
}

/* --- Avis ---------------------------------------------------------------- */

.merym-avis__summary {
	display: flex;
	align-items: baseline;
	gap: 0.6em;
	margin-bottom: 1.4em;
}

.merym-avis__note {
	font-size: 1.4em;
	color: var(--e-global-color-primary, currentColor);
}

.merym-avis__count {
	color: var(--merym-muted);
}

.merym-avis__item {
	display: flex;
	flex-direction: column;
	gap: 0.6em;
}

.merym-avis__text {
	margin: 0;
	padding: 0;
	border: 0;
	quotes: none;
}

.merym-avis__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2em 0.6em;
	font-size: 0.9em;
	color: var(--merym-muted);
}

.merym-avis__verified {
	color: var(--e-global-color-accent, currentColor);
}

.merym-stars {
	display: inline-flex;
	gap: 0.1em;
	line-height: 1;
}

.merym-star {
	opacity: 0.25;
}

.merym-star.is-filled {
	opacity: 1;
	color: var(--e-global-color-accent, currentColor);
}

/* --- Selecteurs de variation --------------------------------------------- */

.merym-swatches {
	display: flex;
	flex-direction: column;
	gap: var(--merym-gap, 1.5rem);
}

.merym-swatches__group {
	display: flex;
	flex-direction: column;
	gap: 0.5em;
}

.merym-swatches__label {
	font-size: 0.85em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--merym-muted);
}

.merym-swatches__options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.merym-swatch {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.55em 1em;
	background: none;
	border: 1px solid var(--merym-line);
	border-radius: var(--merym-radius);
	color: inherit;
	font: inherit;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.merym-swatch:hover {
	border-color: color-mix(in srgb, currentColor 45%, transparent);
}

.merym-swatch.is-selected {
	border-color: var(--e-global-color-primary, currentColor);
}

.merym-swatch[disabled],
.merym-swatch.is-unavailable {
	opacity: 0.35;
	cursor: not-allowed;
	text-decoration: line-through;
}

.merym-swatch__dot {
	width: 1em;
	height: 1em;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--merym-swatch-color, currentColor);
	box-shadow: inset 0 0 0 1px var(--merym-line);
}

.merym-swatches__note {
	margin: 0;
	font-size: 0.9em;
	color: var(--merym-muted);
}

.merym-swatches__guide-toggle {
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 0.25em;
	font-size: 0.9em;
}

.merym-swatches__guide-body {
	padding-top: 0.8em;
	color: var(--merym-muted);
}

/* Les listes natives de WooCommerce restent dans le DOM pour que le panier
   fonctionne, mais elles sont retirees visuellement des que le script les a
   prises en charge. */
.merym-variations-hidden .variations {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* --- WhatsApp ------------------------------------------------------------ */

.merym-whatsapp {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	padding: 0.9em 1.6em;
	border: 1px solid var(--e-global-color-primary, currentColor);
	border-radius: var(--merym-radius);
	text-decoration: none;
	line-height: 1.2;
}

.merym-whatsapp--full {
	display: flex;
	width: 100%;
}

.merym-whatsapp__icon {
	line-height: 1;
}

/* --- Barre collante ------------------------------------------------------ */

.merym-sticky {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 99;
	background: var(--merym-surface, Canvas);
	border-top: 1px solid var(--merym-line);
	transform: translateY(100%);
	transition: transform 0.25s ease;
}

.merym-sticky.is-visible {
	transform: translateY(0);
}

.merym-sticky[hidden] {
	display: none;
}

.merym-sticky__inner {
	display: flex;
	align-items: center;
	gap: 1em;
	padding: 0.7em 1em;
	max-width: 1140px;
	margin: 0 auto;
}

.merym-sticky__image {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: var(--merym-radius);
	flex: 0 0 auto;
}

.merym-sticky__info {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1 1 auto;
}

.merym-sticky__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.merym-sticky__variation {
	font-size: 0.85em;
	color: var(--merym-muted);
}

.merym-sticky__price {
	flex: 0 0 auto;
	white-space: nowrap;
}

.merym-sticky .merym-whatsapp {
	flex: 0 0 auto;
	padding: 0.7em 1.1em;
}

@media (max-width: 767px) {
	.merym-sticky__image,
	.merym-sticky__price {
		display: none;
	}
}

/* --- Badges -------------------------------------------------------------- */

.merym-badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--merym-gap, 0.4rem);
}

.merym-badge {
	display: inline-block;
	padding: 0.3em 0.7em;
	font-size: 0.75em;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.2;
	border-radius: var(--merym-radius);
	border: 1px solid transparent;
}

.merym-badge--outline {
	border-color: currentColor;
}

.merym-badge--solid {
	background: var(--e-global-color-primary, currentColor);
	color: Canvas;
}

.merym-badge--discount {
	background: var(--e-global-color-accent, currentColor);
	color: Canvas;
}

/* --- Carte produit ------------------------------------------------------- */

.merym-card {
	display: flex;
	flex-direction: column;
	gap: 0.8em;
}

.merym-card__media {
	position: relative;
	overflow: hidden;
	border-radius: var(--merym-radius);
}

.merym-card__media .merym-badges {
	position: absolute;
	top: 0.6em;
	inset-inline-start: 0.6em;
	z-index: 2;
	--merym-gap: 0.4rem;
}

.merym-card__image {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.4s ease;
}

.merym-card:hover .merym-card__image {
	transform: scale(1.03);
}

.merym-card__fav {
	position: absolute;
	top: 0.5em;
	inset-inline-end: 0.5em;
	z-index: 2;
	width: 2em;
	height: 2em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	line-height: 1;
}

.merym-card__fav-icon {
	opacity: 0.35;
	transition: opacity 0.15s ease;
}

.merym-card__fav:hover .merym-card__fav-icon,
.merym-card__fav[aria-pressed="true"] .merym-card__fav-icon {
	opacity: 1;
	color: var(--e-global-color-accent, currentColor);
}

.merym-card__quick {
	position: absolute;
	inset-inline: 0.6em;
	bottom: 0.6em;
	z-index: 2;
	padding: 0.6em 1em;
	text-align: center;
	text-decoration: none;
	background: var(--merym-surface, Canvas);
	border-radius: var(--merym-radius);
	opacity: 0;
	transform: translateY(0.4em);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.merym-card:hover .merym-card__quick,
.merym-card__quick:focus-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (hover: none) {
	.merym-card__quick {
		opacity: 1;
		transform: none;
	}
}

.merym-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
}

.merym-card__category {
	font-size: 0.75em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--merym-muted);
}

.merym-card__title {
	margin: 0;
	font-size: 1em;
}

.merym-card__title a {
	text-decoration: none;
	color: inherit;
}

.merym-card-attribut {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-size: 0.9em;
	color: var(--merym-muted);
}

.merym-card-attribut__dot {
	width: 0.7em;
	height: 0.7em;
	border-radius: 50%;
	background: var(--merym-swatch-color, currentColor);
	box-shadow: inset 0 0 0 1px var(--merym-line);
}

.merym-card__price del {
	opacity: 0.5;
	margin-inline-end: 0.4em;
}

/* --- Compléter la parure ------------------------------------------------- */

.merym-cross-sell__title {
	margin-bottom: 1em;
}

/* --- Message reserve a l'editeur Elementor ------------------------------- */

.merym-editor-notice {
	padding: 1em;
	border: 1px dashed var(--merym-line);
	border-radius: var(--merym-radius);
	color: var(--merym-muted);
	font-size: 0.9em;
}

/* --- Accessibilite ------------------------------------------------------- */

.merym-block .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* --- Bulle WhatsApp flottante -------------------------------------------- */

.merym-bubble {
	position: fixed;
	bottom: 1.2rem;
	z-index: 100;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.2rem;
	height: 3.2rem;
	border-radius: 50%;
	text-decoration: none;
	background: var(--e-global-color-primary, currentColor);
	color: Canvas;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
	transition: transform 0.2s ease;
}

.merym-bubble:hover,
.merym-bubble:focus-visible {
	transform: scale(1.06);
}

.merym-bubble--bottom-right {
	inset-inline-end: 1.2rem;
}

.merym-bubble--bottom-left {
	inset-inline-start: 1.2rem;
}

.merym-bubble__icon {
	font-size: 1.4rem;
	line-height: 1;
}

.merym-bubble .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* La barre collante laisse la place a la bulle. */
.merym-sticky.is-visible ~ .merym-bubble,
.merym-bubble {
	margin-bottom: 0;
}

@media (max-width: 767px) {
	.merym-bubble {
		bottom: 4.6rem;
	}
}
