/*
 * Montée en gamme « bougie seule vers pack bougie + recharge » : habillage.
 *
 * Couleurs relevées en lecture seule sur monkobougie.fr le 2026-11-16 (variables globales
 * Divi) : primaire #cc978e, secondaire #6a8d73, texte #474747, fond doux #f8e9e9.
 * Contrastes sur le fond #f8e9e9 : texte #474747 = 7,5:1 (AAA) ; libellé de bouton
 * #4a6450 = 5,5:1 (AA) ; contour #6a8d73 = 3,2:1 (AA pour un élément non textuel).
 *
 * Second niveau visuel voulu par la spec § 4 : bouton à contour, jamais plein, pour ne
 * jamais concurrencer « Ajouter au panier ». Aucun surgissant, aucun compte à rebours.
 */

.mkb-encart,
.mkb-panneau {
	--mkb-fond: #f8e9e9;
	--mkb-texte: #474747;
	--mkb-accent: #6a8d73;
	--mkb-accent-fonce: #4a6450;
	--mkb-blanc: #fff;

	box-sizing: border-box;
	color: var(--mkb-texte);
	font-family: inherit;
	line-height: 1.5;
	text-align: left;
}

.mkb-encart *,
.mkb-panneau * {
	box-sizing: border-box;
}

/* ----------------------------------------------------------------- Fiche */

.mkb-encart {
	background: var(--mkb-fond);
	border-radius: 6px;
	margin: 1.5em 0 0;
	padding: 1.25em;
}

.mkb-encart__titre {
	color: var(--mkb-texte);
	font-size: 1.05em;
	font-weight: 600;
	letter-spacing: normal;
	margin: 0 0 0.4em;
	padding: 0;
	text-transform: none;
}

.mkb-encart__valeur {
	font-size: 0.92em;
	margin: 0 0 1em;
}

/* --------------------------------------------------------------- Choix */

.mkb-choix {
	border: 0;
	margin: 0 0 0.9em;
	min-width: 0;
	padding: 0;
}

.mkb-choix__legende {
	font-size: 0.85em;
	font-weight: 600;
	letter-spacing: normal;
	margin: 0 0 0.25em;
	padding: 0;
	text-transform: none;
}

.mkb-choix__aide {
	display: block;
	font-size: 0.85em;
	margin: 0 0 0.4em;
	opacity: 0.85;
}

.mkb-choix__select {
	background-color: var(--mkb-blanc);
	border: 1px solid var(--mkb-accent);
	border-radius: 4px;
	color: var(--mkb-texte);
	display: block;
	font-family: inherit;
	font-size: 1em;
	min-height: 44px;
	padding: 0.5em 0.75em;
	width: 100%;
}

/* -------------------------------------------------------------- Bouton */

.mkb-bouton {
	background: transparent;
	border: 2px solid var(--mkb-accent);
	border-radius: 4px;
	color: var(--mkb-accent-fonce);
	cursor: pointer;
	display: block;
	font-family: inherit;
	font-size: 1em;
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1.2;
	min-height: 44px;
	padding: 0.6em 1.2em;
	text-transform: none;
	transition: background-color 0.15s ease, color 0.15s ease;
	width: 100%;
}

.mkb-bouton:hover,
.mkb-bouton:focus-visible {
	background: var(--mkb-accent-fonce);
	color: var(--mkb-blanc);
}

.mkb-bouton:focus-visible {
	outline: 2px solid var(--mkb-texte);
	outline-offset: 2px;
}

.mkb-bouton[disabled] {
	cursor: progress;
	opacity: 0.7;
}

@media (min-width: 600px) {
	.mkb-encart .mkb-bouton {
		display: inline-block;
		width: auto;
	}
}

/* ------------------------------------------------------------ Message */

.mkb-message {
	color: #8a2d2d;
	font-size: 0.88em;
	margin: 0 0 0.6em;
}

.mkb-message[hidden] {
	display: none;
}

/* ------------------------------------------------- Panneau : repli 4.2 */

.mkb-panneau {
	background: var(--mkb-fond);
	border-radius: 6px;
	margin: 0.6em 0 0;
}

.mkb-panneau__repli {
	cursor: pointer;
	display: flex;
	align-items: center;
	font-size: 0.88em;
	font-weight: 600;
	list-style: none;
	min-height: 44px;
	padding: 0.5em 0.75em;
}

.mkb-panneau__repli::-webkit-details-marker {
	display: none;
}

.mkb-panneau__repli::before {
	content: "\25B8";
	display: inline-block;
	margin-right: 0.5em;
	transition: transform 0.15s ease;
}

.mkb-panneau[open] > .mkb-panneau__repli::before {
	transform: rotate(90deg);
}

.mkb-panneau__repli:focus-visible {
	outline: 2px solid var(--mkb-texte);
	outline-offset: -2px;
}

.mkb-panneau__corps {
	padding: 0 0.75em 0.75em;
}

/* ------------------------------------------------------------ Annonce */

/*
 * Bande de confirmation, pour les pages sans panneau latéral ouvert.
 *
 * Le z-index n'est pas une rondeur : Side Cart 2.8.3 pose un voile sombre à 999 996, son
 * panneau à 999 999, sa notice à 999 997 et son panier flottant à 9 999 997 (relevés dans
 * `assets/css/xoo-wsc-style.css`, lignes 18, 40, 101 et 617). À 100 000, la bande passait
 * SOUS le voile : grisée au bureau, invisible au téléphone. 9 999 998 la met au-dessus de
 * tout ce que Side Cart pose, et sous rien d'autre de l'extension.
 */

.mkb-annonce {
	position: fixed;
	left: 50%;
	bottom: 1.25em;
	transform: translate(-50%, 1.5em);
	z-index: 9999998;
	max-width: min(92vw, 28em);
	padding: 0.85em 1.1em;
	border-radius: 6px;
	font-size: 0.92em;
	line-height: 1.4;
	opacity: 0;
	pointer-events: none;
	visibility: hidden;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.mkb-annonce--visible {
	opacity: 1;
	transform: translate(-50%, 0);
	visibility: visible;
}

.mkb-annonce--succes {
	background: var(--mkb-accent-fonce, #4a6450);
	color: #fff;
}

.mkb-annonce--echec {
	background: #8a2d2d;
	color: #fff;
}

/*
 * Message dans le panneau latéral, en tête de la liste des articles.
 *
 * Fond doux et texte foncé de la charte : #474747 sur #f8e9e9 = 7,5:1 (AAA), bien au-delà
 * du 4,5:1 exigé. Le filet vert #6a8d73 n'est pas porteur d'information : il n'a pas à
 * atteindre un contraste de texte.
 */

.mkb-annonce-panneau {
	background: #f8e9e9;
	border-left: 3px solid #6a8d73;
	border-radius: 4px;
	color: #474747;
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 0.75em;
	padding: 0.7em 0.9em;
	text-align: left;
}

@media (prefers-reduced-motion: reduce) {
	.mkb-annonce,
	.mkb-bouton,
	.mkb-panneau__repli::before {
		transition: none;
	}
}

/* ------------------------------------------------------------- Divers */

.mkb-visuellement-cache {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------- Place dans le panneau latéral */
/*
 * `xoo_wsc_product_end` se déclenche à l'intérieur de `.xoo-wsc-product`, qui est une
 * rangée `display:flex; flex-wrap:nowrap` (colonne image + colonne résumé). Sans ceci,
 * notre bloc devient une troisième colonne de 157 px à côté du nom du produit (relevé au
 * banc le 2026-11-16). On le renvoie sur sa propre ligne, pleine largeur, sous la ligne
 * de panier, sans toucher au gabarit ni aux styles de Side Cart.
 */
.xoo-wsc-product:has(> .mkb-panneau) {
	flex-wrap: wrap;
}

.xoo-wsc-product > .mkb-panneau {
	flex: 0 0 100%;
	width: 100%;
}

/* ------------------------------------------ Ligne d'économie du pack (§ 5b.2) */
/*
 * Une explication, pas une bannière : même taille que la méta de ligne voisine, pas de
 * couleur d'alerte, pas de fond. Elle doit se lire comme une note sous le nom du pack,
 * sur les trois surfaces où elle apparaît (panneau, /panier/, page de commande).
 */
.mkb-eco-pack {
	display: block;
	margin: 0.25em 0 0;
	font-size: 0.8125em;
	line-height: 1.4;
	color: inherit;
	opacity: 0.85;
}

.mkb-eco-pack__montant {
	font-weight: 600;
}

/* Dans le panneau latéral, la ligne passe sous la rangée flex (même raison qu'au-dessus). */
.xoo-wsc-product:has(> .mkb-eco-pack) {
	flex-wrap: wrap;
}

.xoo-wsc-product > .mkb-eco-pack {
	flex: 0 0 100%;
	width: 100%;
}
