/* ==========================================================================
   Menu mobile — panneau latéral, visible sous 1000 px
   Le bouton n'apparaît jamais sur grand écran ; le panneau reste caché
   tant que [hidden] n'est pas retiré par le script.
   ========================================================================== */

.lune-burger {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-right: 4px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--lune-white);
	cursor: pointer;
}

.lune-burger:hover { color: rgba(255, 255, 255, .78); }

/* --- le panneau ---------------------------------------------------------- */

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

.lune-mnav {
	position: fixed;
	inset: 0;
	/* au-dessus de la bannière cookies (9997) et du panier latéral (9998) */
	z-index: 10000;
	display: flex;
}

.lune-mnav__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(23, 17, 13, .55);
	animation: lune-mnav-fade .18s ease-out;
}

.lune-mnav__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(88vw, 400px);
	height: 100%;
	background: var(--lune-white);
	border-right: 1px solid var(--lune-line);
	animation: lune-mnav-slide .22s ease-out;
}

.lune-mnav__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 0 0 auto;
	padding: 18px 22px;
	border-bottom: 1px solid var(--lune-line);
}

.lune-mnav__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--lune-line);
	border-radius: 0;
	background: transparent;
	color: var(--lune-ink);
	cursor: pointer;
}

.lune-mnav__close:hover { background: var(--lune-ink); color: var(--lune-white); }

.lune-mnav__body {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 8px 0 28px;
}

/* --- les catégories ------------------------------------------------------ */

.lune-mnav__list,
.lune-mnav__sub {
	margin: 0;
	padding: 0;
	list-style: none;
}

.lune-mnav__list > li { border-bottom: 1px solid var(--lune-line); }

.lune-mnav__link,
.lune-mnav__group > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 15px 22px;
	color: var(--lune-ink);
	font-family: var(--lune-sans);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.lune-mnav__group > summary { list-style: none; }
.lune-mnav__group > summary::-webkit-details-marker { display: none; }

.lune-mnav__link:hover,
.lune-mnav__group > summary:hover { background: var(--lune-panel); }

.lune-mnav__count {
	flex: 0 0 auto;
	color: var(--lune-muted);
	font-size: 11px;
	font-weight: 400;
	letter-spacing: .06em;
}

/* chevron */
.lune-mnav__group > summary::after {
	content: "";
	width: 7px;
	height: 7px;
	margin-left: 6px;
	border-right: 1.6px solid var(--lune-muted);
	border-bottom: 1.6px solid var(--lune-muted);
	transform: rotate(45deg);
	transition: transform .15s;
}

.lune-mnav__group[open] > summary::after { transform: rotate(-135deg); }
.lune-mnav__group > summary .lune-mnav__count { margin-left: auto; }

.lune-mnav__sub {
	padding: 2px 0 12px;
	background: var(--lune-warm);
}

.lune-mnav__sub a {
	display: block;
	padding: 10px 22px 10px 38px;
	color: var(--lune-ink-2);
	font-family: var(--lune-sans);
	font-size: 14px;
	text-decoration: none;
}

.lune-mnav__sub a:hover { color: var(--lune-accent); }

/* --- pied ---------------------------------------------------------------- */

.lune-mnav__foot {
	display: flex;
	gap: 8px;
	margin-top: 18px;
	padding: 18px 22px 0;
	border-top: 1px solid var(--lune-line);
}

.lune-mnav__foot a {
	flex: 1 1 0;
	padding: 11px 8px;
	border: 1px solid var(--lune-ink);
	color: var(--lune-ink);
	font-family: var(--lune-sans);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .12em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
}

.lune-mnav__foot a:hover { background: var(--lune-ink); color: var(--lune-white); }

/* on ne verrouille le défilement que quand le panneau est ouvert */
.lune-site.lune-mnav-open,
.lune-site.lune-mnav-open body { overflow: hidden; }

@keyframes lune-mnav-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lune-mnav-slide { from { transform: translateX(-100%); } to { transform: translateX(0); } }

@media (prefers-reduced-motion: reduce) {
	.lune-mnav__backdrop,
	.lune-mnav__panel { animation: none; }
}

@media (max-width: 1000px) {
	.lune-burger { display: inline-flex; }

	/* le ruban horizontal des catégories n'a plus lieu d'être : le menu le remplace */
	.lune-site .lune-head .lune-nav { display: none; }
}
