/* Bain & Élégance – Menu mobile
   Les couleurs, la hauteur et le point de rupture sont injectés depuis les réglages. */

/* ---------- Barre ---------- */
.be-mnav {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9990;
	display: grid;
	grid-template-columns: repeat(var(--be-mnav-cols, 6), minmax(0, 1fr));
	height: calc(var(--be-mnav-h) + env(safe-area-inset-bottom));
	padding: 0 4px env(safe-area-inset-bottom);
	background: var(--be-mnav-bg);
	border-top: 1px solid rgba(20, 36, 59, .08);
	box-shadow: 0 -8px 28px rgba(20, 36, 59, .08);
	font-family: inherit;
}

body .be-mnav .be-mnav__item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 0;
	min-height: 0;
	height: var(--be-mnav-h);
	margin: 0;
	padding: 6px 0 4px;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--be-mnav-text);
	font: inherit;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

body .be-mnav .be-mnav__item:hover,
body .be-mnav .be-mnav__item:focus {
	background: none;
	color: var(--be-mnav-text);
	text-decoration: none;
}

body .be-mnav .be-mnav__item.is-active,
body .be-mnav .be-mnav__item[aria-expanded="true"] {
	color: var(--be-mnav-active);
}

body .be-mnav .be-mnav__item:focus-visible {
	outline: 2px solid var(--be-mnav-active);
	outline-offset: -4px;
	border-radius: 12px;
}

.be-mnav__icon {
	position: relative;
	display: block;
	width: 26px;
	height: 26px;
	flex: none;
}

.be-mnav__icon svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: currentColor;
	transition: transform .18s ease;
}

.be-mnav__item:active .be-mnav__icon svg {
	transform: scale(.86);
}

.be-mnav__label {
	max-width: 100%;
	overflow: hidden;
	font-size: clamp(10px, 2.75vw, 12.5px);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -.01em;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.be-mnav--nolabels .be-mnav__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.be-mnav__badge {
	position: absolute;
	top: -6px;
	right: -11px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--be-mnav-active);
	color: #fff;
	font-size: 10.5px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	box-shadow: 0 0 0 2px var(--be-mnav-bg);
}

.be-mnav__badge[data-count="0"] {
	display: none;
}

.be-mnav__badge.is-bump {
	animation: be-mnav-bump .4s ease;
}

@keyframes be-mnav-bump {
	40% { transform: scale(1.35); }
}

/* ---------- Panneau des catégories ---------- */
.be-mnav-sheet {
	position: fixed;
	inset: 0;
	z-index: 9989;
}

.be-mnav-sheet[hidden] {
	display: none;
}

.be-mnav-sheet__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 36, 59, .45);
	opacity: 0;
	transition: opacity .25s ease;
}

.be-mnav-sheet__panel {
	position: absolute;
	right: 0;
	bottom: calc(var(--be-mnav-h) + env(safe-area-inset-bottom));
	left: 0;
	max-height: min(70vh, 560px);
	overflow-y: auto;
	padding: 8px 18px 18px;
	border-radius: 20px 20px 0 0;
	background: #fff;
	box-shadow: 0 -10px 40px rgba(20, 36, 59, .18);
	transform: translateY(105%);
	transition: transform .3s cubic-bezier(.2, .8, .2, 1);
	overscroll-behavior: contain;
}

.be-mnav-sheet.is-open .be-mnav-sheet__backdrop {
	opacity: 1;
}

.be-mnav-sheet.is-open .be-mnav-sheet__panel {
	transform: none;
}

.be-mnav-sheet__handle {
	width: 40px;
	height: 4px;
	margin: 2px auto 10px;
	border-radius: 4px;
	background: rgba(20, 36, 59, .15);
}

.be-mnav-sheet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

body .be-mnav-sheet__head h2 {
	margin: 0;
	color: var(--be-mnav-text);
	font-size: 20px;
	line-height: 1.2;
}

body .be-mnav-sheet .be-mnav-sheet__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(20, 36, 59, .06);
	box-shadow: none;
	color: var(--be-mnav-text);
	cursor: pointer;
}

.be-mnav-sheet__close svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.be-mnav-sheet__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

body .be-mnav-sheet .be-mnav-sheet__link {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 4px;
	border-bottom: 1px solid rgba(20, 36, 59, .07);
	color: var(--be-mnav-text);
	text-decoration: none;
}

.be-mnav-sheet__list li:last-child .be-mnav-sheet__link {
	border-bottom: 0;
}

body .be-mnav-sheet .be-mnav-sheet__link.is-active {
	color: var(--be-mnav-active);
}

.be-mnav-sheet__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	flex: none;
	overflow: hidden;
	border-radius: 12px;
	background: #f3f1ee;
	color: var(--be-mnav-text);
}

.be-mnav-sheet__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.be-mnav-sheet__thumb svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
	opacity: .5;
}

.be-mnav-sheet__name {
	flex: 1;
	min-width: 0;
	font-size: 15.5px;
	font-weight: 600;
}

.be-mnav-sheet__count {
	min-width: 28px;
	padding: 3px 8px;
	border-radius: 999px;
	background: rgba(20, 36, 59, .06);
	font-size: 12px;
	font-weight: 600;
	text-align: center;
}

body .be-mnav-sheet .be-mnav-sheet__all {
	display: block;
	margin-top: 14px;
	padding: 13px 16px;
	border-radius: 12px;
	background: var(--be-mnav-text);
	color: #fff;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}

body.be-mnav-lock {
	overflow: hidden;
}

/* Le bouton WhatsApp s'efface pendant que le panneau ou la fenêtre d'alerte 2DA Favoris est ouvert. */
body.be-mnav-lock .qlwapp__container,
body.da2f-modal-open .qlwapp__container {
	display: none !important;
}

/* ---------- Compteur Favoris (tenu à jour par 2DA Favoris) ---------- */
.be-mnav__badge[hidden] {
	display: none;
}

/* Sur petit écran, l'étiquette de rupture devient « Épuisé » pour laisser place au cœur 2DA Favoris. */
@media (max-width: 600px) {
	body .beh-prod:has(.da2f-heart) .beh-prod__oos,
	body li.product:has(.da2f-heart) .be-oos-badge {
		top: 10px;
		left: 8px;
		font-size: 0;
	}

	body .beh-prod:has(.da2f-heart) .beh-prod__oos::after,
	body li.product:has(.da2f-heart) .be-oos-badge::after {
		content: "Épuisé";
		font-size: 9.5px;
		letter-spacing: .1em;
	}
}