/* Smeg Mega Menu 1.2.0 */

/* ---------- Commun ---------- */
html { --smm-dir: 1; }
html[dir="rtl"] { --smm-dir: -1; }

/* Sécurité : on masque tout sous-menu natif du thème qui resterait (normalement le plugin ne le génère plus). */
html body .smm-item.smm-item > :is(ul, .sub-menu, .children, .submenu, .sub-menu-wrap, .sub-menu-wrapper, .dropdown, .dropdown-menu, [class*="sub-menu"], [class*="submenu"], [class*="dropdown"]):not(.smm-panel),
html body .smm-item.smm-item .smm-native-sub {
	display: none !important; visibility: hidden !important; opacity: 0 !important; pointer-events: none !important;
}

.smm-panel { display: none; }
.smm-panel *, .smm-toggle { box-sizing: border-box; }
.smm-panel ul { list-style: none; margin: 0; padding: 0; }
.smm-panel li { margin: 0; padding: 0; }
.smm-panel a { text-decoration: none; }
.smm-panel p { margin: 0; }

.smm-toggle, .smm-sub-toggle, .smm-close {
	background: none; border: 0; padding: 0; margin: 0; color: inherit; cursor: pointer;
	font: inherit; line-height: 0; box-shadow: none; min-height: 0; border-radius: 0;
}
.smm-toggle:hover, .smm-sub-toggle:hover, .smm-close:hover,
.smm-toggle:focus, .smm-sub-toggle:focus, .smm-close:focus { background: none; color: inherit; }
.smm-chev { display: block; transform: scaleX(var(--smm-dir)); transition: transform .2s ease; }

.smm-sr,
html:not(.smm-mobile) .smm-toggle {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: -1px;
}
html.smm-desktop .smm-toggle:focus-visible {
	position: static !important; width: auto; height: auto; overflow: visible;
	clip: auto; clip-path: none; margin: 0; padding: 4px; display: inline-block; vertical-align: middle;
}
html.smm-desktop .smm-toggle:focus-visible .smm-chev { transform: rotate(90deg); }
html.smm-desktop .smm-toggle .smm-sr { display: none; }

/* ---------- Ordinateur : onglets verticaux ---------- */
.smm-desktop .smm-panel {
	display: block;
	position: fixed;
	top: var(--smm-top, 80px);
	inset-inline-start: 0; inset-inline-end: auto;
	width: var(--smm-nav-w);
	z-index: 99990;
	background: none;
	color: var(--smm-text);
	font-size: 15px; line-height: 1.4; letter-spacing: .02em;
	text-align: start; text-transform: none; font-weight: 400;
	opacity: 0; visibility: hidden; pointer-events: none;
	transition: opacity .18s ease, visibility 0s linear .18s;
}
.smm-desktop .smm-panel.smm-h-full { bottom: 0; }
.smm-desktop .smm-panel.smm-h-auto { max-height: calc(100vh - var(--smm-top, 80px)); }
.smm-desktop .smm-panel.smm-has-active { inset-inline-end: 0; width: auto; }
.smm-desktop .smm-item.smm-open .smm-panel {
	opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s;
}

.smm-desktop .smm-inner { position: relative; height: 100%; min-height: 440px; max-height: inherit; }
.smm-desktop .smm-nav {
	width: var(--smm-nav-w);
	height: 100%; max-height: inherit;
	overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
	background: var(--smm-bg);
	padding: 4px 0 32px;
	padding-inline-start: var(--smm-gutter);
}
.smm-desktop .smm-h-auto .smm-nav { height: auto; }
.smm-desktop .smm-group {
	border-top: 1px solid color-mix(in srgb, var(--smm-text) 40%, transparent);
	padding: 16px 0 10px;
	margin-inline-end: 24px;
}
.smm-desktop .smm-group-title {
	font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
	color: var(--smm-text); margin-bottom: 6px; font-weight: 400;
}
.smm-desktop .smm-group-title a { color: inherit; }
.smm-desktop .smm-row {
	display: flex; align-items: center; justify-content: space-between;
	margin-inline: -12px -24px;
	padding-inline: 12px 24px;
	transition: background-color .15s ease;
}
.smm-desktop .smm-link {
	flex: 1; display: block; padding: 6px 0;
	color: var(--smm-text); font-size: 15px;
}
.smm-desktop a.smm-link:hover { color: var(--smm-text); opacity: .75; }
.smm-desktop .smm-sub-toggle { padding: 6px; }
.smm-desktop .smm-entry.smm-active > .smm-row { background: var(--smm-hover-bg); }
.smm-desktop .smm-entry.smm-active > .smm-row .smm-link { font-weight: 700; opacity: 1; }
.smm-desktop .smm-entry.smm-active .smm-sub-toggle .smm-chev { transform: scaleX(calc(var(--smm-dir) * -1)); }

.smm-desktop .smm-pane {
	display: none;
	position: absolute; top: 0; bottom: 0;
	inset-inline-start: var(--smm-nav-w);
	inset-inline-end: 0;
	overflow-y: auto; overscroll-behavior: contain;
	background: var(--smm-bg2);
	padding: 24px 0 40px;
	padding-inline: 76px max(var(--smm-gutter), 72px);
}
.smm-desktop .smm-entry.smm-active > .smm-pane {
	display: flex; flex-direction: column; gap: 56px;
	animation: smm-fade .18s ease;
}
@keyframes smm-fade { from { opacity: 0; } to { opacity: 1; } }
.smm-desktop .smm-title {
	font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
	color: var(--smm-muted); margin-bottom: 12px;
}
.smm-desktop .smm-cats li a { display: inline-block; padding: 6px 0; color: var(--smm-text); }
.smm-desktop .smm-cats li a:hover { opacity: .7; }
.smm-desktop .smm-all { display: inline-block; margin-top: 6px; padding: 6px 0; font-weight: 700; color: var(--smm-text); }
.smm-desktop .smm-all:hover { opacity: .7; }

.smm-cards { display: grid; grid-template-columns: repeat(4, var(--smm-card-w, 150px)); gap: 12px; }
.smm-card { display: block; color: var(--smm-text); }
.smm-card-media { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: color-mix(in srgb, var(--smm-text) 10%, transparent); }
.smm-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
a.smm-card:hover .smm-card-media img { transform: scale(1.05); }
.smm-card-label { display: block; margin-top: 10px; font-size: 15px; line-height: 1.2; }
@media (max-width: 1280px) { .smm-desktop .smm-cards { --smm-card-w: 120px; } }

.smm-desktop .smm-close {
	display: none;
	position: absolute; top: 14px; inset-inline-end: 24px; z-index: 2;
	width: 36px; height: 36px; align-items: center; justify-content: center;
	color: var(--smm-text);
}
.smm-desktop .smm-has-active .smm-close { display: flex; }
.smm-desktop .smm-close:hover { opacity: .7; color: var(--smm-text); }
.smm-panel :focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ---------- Mobile : accordéon simple ---------- */
.smm-mobile .smm-item { position: relative; }
.smm-mobile .smm-toggle {
	position: absolute; top: var(--smm-m-top, 0); inset-inline-end: 0;
	width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; z-index: 1;
}
.smm-mobile .smm-item.smm-theme-arrow > .smm-toggle { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
.smm-mobile .smm-toggle .smm-chev,
.smm-mobile .smm-sub-toggle .smm-chev { transform: rotate(90deg); }
.smm-mobile .smm-item.smm-open > .smm-toggle .smm-chev,
.smm-mobile .smm-entry.smm-expanded .smm-sub-toggle .smm-chev { transform: rotate(-90deg); }

.smm-mobile .smm-item.smm-open .smm-panel { display: block; }
.smm-mobile .smm-panel {
	position: static; background: none; color: inherit; text-align: start;
	padding: 0 0 10px; padding-inline-start: 14px;
}
.smm-mobile .smm-close { display: none; }
.smm-mobile .smm-group-title {
	font-size: .78em; letter-spacing: .08em; text-transform: uppercase; opacity: .6;
	margin: 14px 0 2px;
}
.smm-mobile .smm-group-title a { color: inherit; }
.smm-mobile .smm-row { display: flex; align-items: center; }
.smm-mobile .smm-link { flex: 1; display: block; padding: 10px 0; color: inherit; }
.smm-mobile .smm-sub-toggle { width: 44px; height: 40px; display: flex; align-items: center; justify-content: center; flex: none; }
.smm-mobile .smm-pane { display: none; padding: 0 0 8px; padding-inline-start: 14px; }
.smm-mobile .smm-entry.smm-expanded > .smm-pane { display: block; }
.smm-mobile .smm-pane .smm-title { display: none; }
.smm-mobile .smm-cats a { display: block; padding: 8px 0; color: inherit; font-size: .95em; }
.smm-mobile .smm-all { font-weight: 700; }
.smm-mobile .smm-disc { display: none; }
.smm-mobile.smm-m-cards .smm-disc { display: block; padding-top: 6px; }
.smm-mobile .smm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.smm-mobile .smm-card { color: inherit; }
.smm-mobile .smm-card-label { margin-top: 6px; font-size: .9em; }

.smm-mobile .smm-m-center .smm-panel { padding-inline-start: 0; text-align: center; }
.smm-mobile .smm-m-center .smm-row { justify-content: center; }
.smm-mobile .smm-m-center .smm-link { flex: 0 1 auto; }
.smm-mobile .smm-m-center .smm-pane { padding-inline-start: 0; }

/* Mega menus du thème ouverts au clic */
.smm-click-area > .grve-link-wrapper > a { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
	.smm-panel, .smm-panel *, .smm-chev { transition: none !important; }
}
