/* Explicyte Mobile Menu — les couleurs de base arrivent en variables inline par profil. */

#exm {
	--exm-muted: color-mix(in srgb, var(--exm-text) 68%, transparent);
	--exm-line: color-mix(in srgb, var(--exm-text) 12%, transparent);
	--exm-hover: color-mix(in srgb, var(--exm-text) 6%, transparent);
	--exm-ease: cubic-bezier(.22, .8, .24, 1);
	--exm-dur: 380ms;
	--exm-font: "Work Sans", system-ui, sans-serif;
	--exm-font-text: "Inter", system-ui, sans-serif;
	position: fixed;
	inset: 0;
	z-index: 99999;
	font-family: var(--exm-font-text);
	-webkit-font-smoothing: antialiased;
}
#exm[hidden] { display: none; }
#exm *, #exm *::before, #exm *::after { box-sizing: border-box; }
/* Remise à zéro : le thème et le kit Elementor stylent tous les boutons et liens. */
#exm a, #exm button { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; font: inherit; letter-spacing: normal; text-transform: none; text-decoration: none; text-shadow: none; min-height: 0; width: auto; line-height: inherit; white-space: normal; }
#exm ul, #exm li, #exm p, #exm h2 { margin: 0; padding: 0; }
#exm img { border: 0; box-shadow: none; border-radius: 0; }

#exm svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

#exm .exm__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 18, 30, .45);
	opacity: 0;
	transition: opacity var(--exm-dur) ease;
}
#exm.is-open .exm__backdrop { opacity: 1; }

#exm .exm__drawer {
	position: absolute;
	inset: 0 0 0 auto;
	width: min(100%, 440px);
	display: flex;
	flex-direction: column;
	background: var(--exm-bg);
	color: var(--exm-text);
	transform: translateX(100%);
	transition: transform var(--exm-dur) var(--exm-ease);
	box-shadow: -20px 0 60px rgba(0, 0, 0, .18);
	overscroll-behavior: contain;
}
#exm.is-open .exm__drawer { transform: none; }
#exm.exm--fade .exm__drawer { transform: none; opacity: 0; transition: opacity var(--exm-dur) ease; }
#exm.exm--fade.is-open .exm__drawer { opacity: 1; }

/* En-tête du tiroir */
#exm .exm__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px 14px 24px;
	flex: none;
}
#exm .exm__logo { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
#exm .exm__logo img { display: block; height: 30px; width: auto; max-width: 190px; }
#exm .exm__close {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--exm-line);
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
	transition: background .2s, transform .2s;
}
#exm .exm__close:hover { background: var(--exm-hover); }
#exm .exm__close:active { transform: scale(.94); }

/* Panneaux empilés : chaque niveau glisse depuis la droite */
#exm .exm__viewport { position: relative; flex: 1; overflow: hidden; }
#exm .exm__panel {
	position: absolute;
	inset: 0;
	visibility: hidden;
	transform: translateX(100%);
	transition: transform var(--exm-dur) var(--exm-ease), opacity var(--exm-dur) ease, visibility 0s linear var(--exm-dur);
}
#exm .exm__panel.is-active { visibility: visible; transform: none; transition-delay: 0s; }
#exm .exm__panel.is-behind { visibility: visible; transform: translateX(-28%); opacity: 0; transition-delay: 0s; }
#exm .exm__panel.is-leaving { visibility: visible; transition-delay: 0s; }
#exm .exm__scroll {
	height: 100%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 6px 24px 28px;
}

#exm .exm__eyebrow {
	margin: 4px 0 6px;
	font: 600 11px/1.2 var(--exm-font);
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--exm-muted);
	display: flex;
	align-items: center;
	gap: 8px;
}
#exm .exm__eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--exm-accent); }

#exm .exm__back {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0 0 10px -8px;
	padding: 8px 12px 8px 4px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--exm-muted);
	font: 500 14px/1 var(--exm-font);
	cursor: pointer;
}
#exm .exm__back:hover { background: var(--exm-hover); color: var(--exm-text); }
#exm .exm__back svg { width: 18px; height: 18px; }

#exm .exm__title {
	margin: 0 0 6px;
	font: 700 26px/1.15 var(--exm-font);
	letter-spacing: -.01em;
	color: var(--exm-text);
}
#exm .exm__overview {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 14px;
	font: 600 14px/1 var(--exm-font);
	color: var(--exm-text);
	text-decoration: underline;
	text-decoration-color: var(--exm-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}
#exm .exm__overview svg { width: 16px; height: 16px; color: var(--exm-accent); transition: transform .2s; }
#exm .exm__overview:hover svg { transform: translateX(3px); }

/* Lignes du menu */
#exm .exm__list { list-style: none; margin: 0; padding: 0; }
#exm .exm__list > li { border-bottom: 1px solid var(--exm-line); }
#exm .exm__list > li:last-child { border-bottom: 0; }
#exm .exm__row {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 56px;
	padding: 12px 4px;
	border: 0;
	background: transparent;
	color: var(--exm-text);
	text-align: left;
	text-decoration: none;
	font: 500 17px/1.3 var(--exm-font);
	cursor: pointer;
	transition: padding .25s var(--exm-ease), color .2s;
}
#exm .exm__list--root .exm__row { min-height: 62px; font-size: 20px; font-weight: 600; }
#exm .exm__row:hover, #exm .exm__row:focus-visible { padding-left: 10px; }
#exm .exm__row:hover .exm__chev { transform: translateX(3px); color: var(--exm-accent); }
#exm .exm__row::before {
	content: "";
	position: absolute;
	left: -24px;
	top: 14px;
	bottom: 14px;
	width: 3px;
	border-radius: 0 3px 3px 0;
	background: var(--exm-accent);
	transform: scaleY(0);
	transition: transform .25s var(--exm-ease);
}
#exm .exm__row.is-current::before, #exm .exm__row.is-trail::before { transform: scaleY(1); }
#exm .exm__row.is-trail::before { opacity: .45; }
#exm .exm__row.is-current { font-weight: 700; }

#exm .exm__label { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
#exm .exm__desc { font: 400 13px/1.35 var(--exm-font-text); color: var(--exm-muted); }
#exm .exm__count {
	min-width: 24px;
	padding: 3px 7px;
	border-radius: 999px;
	background: var(--exm-hover);
	color: var(--exm-muted);
	font: 600 11px/1.2 var(--exm-font);
	text-align: center;
}
#exm .exm__chev { color: var(--exm-muted); transition: transform .2s, color .2s; }

/* Bas du panneau racine : autre section + 10x */
#exm .exm__extras { display: grid; gap: 12px; margin-top: 28px; }

#exm .exm__switch {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px 18px 18px 20px;
	border-radius: 16px;
	background: var(--exm-sw-bg);
	color: var(--exm-sw-text);
	text-decoration: none;
	overflow: hidden;
	isolation: isolate;
}
#exm .exm__switch::after {
	content: "";
	position: absolute;
	right: -40px;
	top: -40px;
	width: 140px;
	height: 140px;
	border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--exm-sw-accent) 35%, transparent), transparent 70%);
	z-index: -1;
}
#exm .exm__switch-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
#exm .exm__switch-eyebrow { font: 600 10.5px/1.2 var(--exm-font); letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
#exm .exm__switch-label { font: 700 18px/1.2 var(--exm-font); }
#exm .exm__switch-desc { font: 400 13px/1.35 var(--exm-font-text); opacity: .78; }
#exm .exm__switch-go {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--exm-sw-accent);
	color: #fff;
	transition: transform .25s var(--exm-ease);
}
#exm .exm__switch:hover .exm__switch-go { transform: translateX(4px); }

#exm .exm__badge {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	border: 1px solid var(--exm-line);
	border-radius: 16px;
	color: var(--exm-muted);
	text-decoration: none;
	transition: background .2s;
}
#exm a.exm__badge:hover { background: var(--exm-hover); }
#exm .exm__badge-img { display: block; width: auto; height: 46px; max-width: 100%; }
#exm .exm__badge-text { font: 500 13px/1.3 var(--exm-font); text-align: center; }

/* Contact fixe en bas */
#exm .exm__bottom {
	flex: none;
	padding: 14px 24px calc(16px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--exm-line);
	background: var(--exm-bg);
}
#exm .exm__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 56px;
	border-radius: 999px;
	background: var(--exm-cta-bg);
	color: var(--exm-cta-text);
	font: 700 17px/1 var(--exm-font);
	text-decoration: none;
	box-shadow: 0 10px 24px color-mix(in srgb, var(--exm-cta-bg) 40%, transparent);
	transition: transform .2s, box-shadow .2s;
}
#exm .exm__cta:hover { transform: translateY(-1px); color: var(--exm-cta-text); }
#exm .exm__cta:active { transform: scale(.98); }
#exm .exm__cta svg { transition: transform .2s; }
#exm .exm__cta:hover svg { transform: translateX(3px); }

#exm a:focus-visible, #exm button:focus-visible { outline: 2px solid var(--exm-accent); outline-offset: 3px; border-radius: 8px; }

/* Entrée échelonnée des lignes à l'ouverture */
#exm.is-open .exm__panel.is-active .exm__list > li,
#exm.is-open .exm__panel.is-active .exm__extras { animation: exm-in .5s var(--exm-ease) both; }
#exm .exm__list > li:nth-child(2) { animation-delay: 40ms !important; }
#exm .exm__list > li:nth-child(3) { animation-delay: 80ms !important; }
#exm .exm__list > li:nth-child(4) { animation-delay: 120ms !important; }
#exm .exm__list > li:nth-child(5) { animation-delay: 160ms !important; }
#exm .exm__list > li:nth-child(n+6) { animation-delay: 200ms !important; }
#exm .exm__extras { animation-delay: 240ms !important; }
@keyframes exm-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	#exm { --exm-dur: 1ms; }
	#exm.is-open .exm__panel.is-active .exm__list > li,
	#exm.is-open .exm__panel.is-active .exm__extras { animation: none; }
}

html.exm-lock, html.exm-lock body { overflow: hidden !important; }

/* Burger ajouté par le plugin quand l'en-tête n'en a pas (id : passer devant les styles de boutons du kit) */
#exm-burger {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0 0 0 auto;
	padding: 0;
	border: 1px solid rgba(31, 51, 73, .15);
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: #1F3349;
	cursor: pointer;
}
#exm-burger:hover { background: rgba(31, 51, 73, .06); color: #1F3349; }
#exm-burger svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#exm-burger.exm-burger--floating { position: fixed; top: 16px; right: 16px; z-index: 9999; background: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }

/* Encarts sous un sous-menu (ex. 10x et ISO sous Trials) */
#exm .exm__extras--panel { margin-top: 24px; }
#exm .exm__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
