/* MegaMenu Builder — toutes les valeurs viennent des variables --wpmm-* posées sur le panneau. */

.wpmm-has-mega { position: relative; }
.wpmm-has-mega > .sub-menu { display: none !important; }

/* Surlignage de l'élément du menu du haut */
.wpmm-has-mega.wpmm-open > a {
	background: var(--wpmm-top-bg) !important;
	color: var(--wpmm-top-color) !important;
}
.wpmm-top-arrow > a { position: relative; }
.wpmm-top-arrow.wpmm-open > a::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 100%;
	z-index: 100000;
	width: 0;
	height: 0;
	margin: 0;
	transform: translateX(-50%);
	border: 9px solid transparent;
	border-top-color: var(--wpmm-top-bg);
	border-bottom: 0;
	background: none;
	opacity: 1;
}

/* Panneau */
.wpmm-panel {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 99999;
	display: none;
	box-sizing: border-box;
	width: var(--wpmm-panel-width);
	max-width: calc(100vw - 32px);
	margin-top: var(--wpmm-top-offset);
	background: var(--wpmm-panel-bg);
	border-radius: var(--wpmm-radius);
	font-size: 16px;
	line-height: 1.35;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	white-space: normal;
}
.wpmm-panel *, .wpmm-panel *::before, .wpmm-panel *::after { box-sizing: border-box; }
/* Protection contre les styles du thème appliqués aux liens/listes du menu */
.wpmm-panel a, .wpmm-panel button, .wpmm-panel span {
	float: none;
	height: auto;
	min-height: 0;
	text-transform: none;
	letter-spacing: normal;
}
.wpmm-panel .wpmm-items { display: block; }
.wpmm-panel .wpmm-group-title a { display: inline; padding: 0; margin: 0; background: none; }
/* Pont invisible pour ne pas perdre le survol entre le menu et le panneau */
.wpmm-panel::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: calc(max(var(--wpmm-top-offset), 0px) + 6px);
}
.wpmm-open > .wpmm-panel { display: block; animation: wpmm-in .18s ease-out; }
.wpmm-shadow { box-shadow: 0 24px 60px rgba(15, 30, 50, .16), 0 2px 8px rgba(15, 30, 50, .06); }

@keyframes wpmm-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

.wpmm-inner { display: flex; align-items: stretch; }

/* Colonne des catégories */
.wpmm-cats {
	flex: 0 0 var(--wpmm-sidebar-width);
	padding: 22px 0 22px 18px;
	background: var(--wpmm-sidebar-bg);
	border-right: 1px solid var(--wpmm-sidebar-border);
	border-radius: var(--wpmm-radius) 0 0 var(--wpmm-radius);
}
.wpmm-panel .wpmm-cat {
	display: flex;
	align-items: center;
	gap: 18px;
	width: 100%;
	margin: 0 0 6px;
	padding: 18px 22px 18px 18px;
	border: 0;
	border-radius: var(--wpmm-radius) 0 0 var(--wpmm-radius);
	background: transparent;
	box-shadow: none;
	color: var(--wpmm-cat-color);
	font: inherit;
	font-size: var(--wpmm-cat-size);
	font-weight: var(--wpmm-cat-weight);
	line-height: 1.2;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
.wpmm-panel .wpmm-cat.is-active { background: var(--wpmm-cat-active-bg); color: var(--wpmm-cat-active-color); }
.wpmm-panel .wpmm-cat:focus-visible { outline: 2px solid var(--wpmm-cat-icon-color); outline-offset: -2px; }
.wpmm-cat-icon {
	flex: 0 0 auto;
	width: 1.15em;
	color: var(--wpmm-cat-icon-color);
	font-size: var(--wpmm-icon-size);
	line-height: 1;
	text-align: center;
}
.wpmm-cat.is-active .wpmm-cat-icon { color: var(--wpmm-cat-active-icon); }
.wpmm-cat-label { flex: 1 1 auto; min-width: 0; }
.wpmm-cat-chev { flex: 0 0 auto; color: var(--wpmm-chevron-color); font-size: .8em; transition: transform .15s; }
.wpmm-cat.is-active .wpmm-cat-chev { transform: translateX(3px); }
.wpmm-no-chevron .wpmm-cat-chev { display: none; }

/* Contenu */
.wpmm-panes { flex: 1 1 auto; min-width: 0; padding: 40px 36px; }
.wpmm-pane { display: none; }
.wpmm-pane.is-active { display: block; }
.wpmm-cols { display: grid; grid-template-columns: repeat(var(--wpmm-columns), minmax(0, 1fr)); }
.wpmm-col { min-width: 0; padding: 0 34px; }
.wpmm-col:first-child { padding-left: 0; }
.wpmm-col:last-child { padding-right: 0; }
.wpmm-col + .wpmm-col { border-left: 1px solid var(--wpmm-separator-color); }

.wpmm-group + .wpmm-group {
	margin-top: 30px;
	padding-top: 30px;
	border-top: 1px solid var(--wpmm-separator-color);
}
.wpmm-group-title {
	margin: 0 0 20px;
	color: var(--wpmm-group-color);
	font-size: var(--wpmm-group-size);
	font-weight: var(--wpmm-group-weight);
	line-height: 1.2;
}
.wpmm-group-title::after {
	content: "";
	display: block;
	width: var(--wpmm-underline-width);
	height: var(--wpmm-underline-height);
	margin-top: 14px;
	background: var(--wpmm-underline-color);
}
.wpmm-panel .wpmm-group-title a { color: inherit; text-decoration: none; transition: color .15s; }
.wpmm-panel .wpmm-group-title a:hover { color: var(--wpmm-group-hover); }

.wpmm-panel .wpmm-items, .wpmm-panel .wpmm-items li {
	margin: 0;
	padding: 0;
	list-style: none;
	background: none;
	border: 0;
}
.wpmm-panel .wpmm-items li::before, .wpmm-panel .wpmm-items li::after { display: none; }
.wpmm-panel .wpmm-item {
	display: flex;
	align-items: baseline;
	gap: 14px;
	padding: calc(var(--wpmm-item-spacing) / 2) 0;
	color: var(--wpmm-item-color);
	background: none;
	font-size: var(--wpmm-item-size);
	font-weight: var(--wpmm-item-weight);
	line-height: 1.3;
	text-decoration: none;
	transition: color .15s;
}
.wpmm-panel .wpmm-item:hover, .wpmm-panel .wpmm-item:focus { color: var(--wpmm-item-hover); }
.wpmm-bullet {
	flex: 0 0 auto;
	color: var(--wpmm-bullet-color);
	font-size: var(--wpmm-bullet-size);
	transition: transform .15s;
}
.wpmm-item:hover .wpmm-bullet { transform: translateX(3px); }

/* Shortcode : affichage à plat */
.wpmm-panel.wpmm-inline { position: relative; display: block; width: 100%; max-width: var(--wpmm-panel-width); margin: 0 auto; }
.wpmm-inline::before { display: none; }

/* Mobile (classe posée par le JS selon le point de rupture réglé) */
.wpmm-panel.wpmm-mobile {
	position: static;
	width: auto;
	max-width: none;
	margin: 0;
	box-shadow: none;
	animation: none;
}
.wpmm-mobile::before, .wpmm-top-arrow.wpmm-open > a:has(+ .wpmm-mobile)::after { display: none; }
.wpmm-mobile .wpmm-inner { flex-direction: column; }
.wpmm-mobile .wpmm-cats { flex: none; padding: 8px; border-right: 0; border-bottom: 1px solid var(--wpmm-sidebar-border); border-radius: var(--wpmm-radius) var(--wpmm-radius) 0 0; }
.wpmm-panel.wpmm-mobile .wpmm-cat { margin: 0 0 2px; padding: 12px 14px; gap: 12px; border-radius: var(--wpmm-radius); font-size: min(var(--wpmm-cat-size), 18px); }
.wpmm-mobile .wpmm-cat-icon { font-size: min(var(--wpmm-icon-size), 26px); }
.wpmm-mobile .wpmm-cat.is-active .wpmm-cat-chev { transform: rotate(90deg); }
.wpmm-mobile .wpmm-panes { padding: 20px; }
.wpmm-mobile .wpmm-cols { grid-template-columns: 1fr; }
.wpmm-mobile .wpmm-col { padding: 0; }
.wpmm-mobile .wpmm-col + .wpmm-col { border-left: 0; }
.wpmm-mobile .wpmm-col:empty { display: none; }
.wpmm-mobile .wpmm-col:not(:empty) ~ .wpmm-col:not(:empty) { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--wpmm-separator-color); }
.wpmm-mobile .wpmm-group + .wpmm-group { margin-top: 24px; padding-top: 24px; }
