/* ==========================================================================
   Menu principal — panneau à rubriques (inc/menu-panel.php)
   Le tiroir s'ouvre/ferme via assets/js/menu.js (nav#sc-primary-navigation).
   ========================================================================== */

#main-header .sc-mega {
	--m-red:#e52329; --m-red-t:#ff5a5f; --m-bg2:#141213; --m-bg3:#1c191a;
	--m-line:#2a2627; --m-line2:#3a3436; --m-txt:#f4f2f1; --m-mut:#a39d9b; --m-mut2:#7c7573;
	position:fixed;
	top:100%; /* le header fixe (backdrop-filter) sert de bloc conteneur */
	right:0;
	height:var(--sc-drawer-height, calc(100dvh - 88px));
	z-index:999999;
	display:flex;
	flex-direction:column;
	width:min(760px,100vw);
	margin:0;
	padding:0;
	color:var(--m-txt);
	border-left:1px solid rgba(255,255,255,.1);
	border-top:1px solid rgba(224,32,31,.34);
	background:
		radial-gradient(70% 50% at 100% 0%,rgba(229,35,41,.16),transparent 60%),
		linear-gradient(180deg,rgba(21,17,18,.995),rgba(13,11,11,.995));
	box-shadow:-28px 0 70px rgba(0,0,0,.58);
	font-family:Poppins,Arial,sans-serif;
	text-align:left;
	animation:scMegaIn .38s cubic-bezier(.22,1,.36,1) both;
}
@keyframes scMegaIn { from { transform:translateX(40px); opacity:0; } to { transform:none; opacity:1; } }
#main-header .sc-mega *,
#main-header .sc-mega *::before,
#main-header .sc-mega *::after { box-sizing:border-box; }
#main-header .sc-mega a { color:inherit; text-decoration:none; }
#main-header .sc-mega__icon { width:20px; height:20px; flex:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }

#main-header .sc-mega__scroll {
	flex:1;
	min-height:0;
	padding:24px 30px 22px;
	overflow-y:auto;
	overscroll-behavior:contain;
	scrollbar-width:thin;
	scrollbar-color:var(--m-line2) transparent;
}

/* Bloc compte */
#main-header .sc-mega__account { display:flex; align-items:center; gap:14px; margin:0; padding:16px; border-radius:20px; background:var(--m-bg2); box-shadow:inset 0 0 0 1px var(--m-line); }
#main-header .sc-mega__avatar { width:52px; height:52px; flex:none; margin:0; border-radius:50%; object-fit:cover; background:#222; outline:2px solid var(--m-red); outline-offset:2px; }
#main-header .sc-mega__who { flex:1; min-width:0; }
#main-header .sc-mega__who strong { display:block; overflow:hidden; color:var(--m-txt); font:700 16px/1.2 Poppins,sans-serif; text-overflow:ellipsis; white-space:nowrap; }
#main-header .sc-mega__who span { display:block; color:var(--m-mut); font:400 12.5px/1.4 Poppins,sans-serif; }
#main-header .sc-mega__account-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
#main-header .sc-mega__pill {
	display:inline-flex;
	align-items:center;
	gap:8px;
	min-height:40px;
	margin:0;
	padding:0 14px;
	color:var(--m-txt);
	border:0;
	border-radius:12px;
	background:transparent;
	box-shadow:inset 0 0 0 1.5px var(--m-line2);
	font:600 13px/1 Poppins,sans-serif;
	letter-spacing:0;
	text-transform:none;
	white-space:nowrap;
	transition:box-shadow .15s,background .15s;
}
#main-header .sc-mega__pill:hover { color:#fff; box-shadow:inset 0 0 0 1.5px var(--m-red); }
#main-header .sc-mega__pill.is-red { color:#fff; background:var(--m-red); box-shadow:none; }
#main-header .sc-mega__pill.is-red:hover { background:#f2333a; }
#main-header .sc-mega__pill .sc-mega__icon { width:17px; height:17px; }

/* Rubriques */
#main-header .sc-mega__grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 28px; margin-top:22px; }
#main-header .sc-mega__col { display:flex; flex-direction:column; gap:6px; min-width:0; }
#main-header .sc-mega__group { margin:0; padding:6px 0 8px; border:0; }
#main-header .sc-mega__switch { position:absolute; width:1px; height:1px; margin:0; opacity:0; pointer-events:none; }
#main-header .sc-mega__title {
	display:flex;
	align-items:center;
	gap:10px;
	width:100%;
	margin:0;
	padding:8px 2px;
	color:var(--m-red-t);
	font:600 12px/1 Oswald,sans-serif;
	letter-spacing:.2em;
	text-transform:uppercase;
	cursor:default;
}
#main-header .sc-mega__title::before { content:""; width:22px; height:2px; flex:none; background:var(--m-red); }
#main-header .sc-mega__title .sc-mega__icon { display:none; margin-left:auto; transition:transform .2s; }
#main-header .sc-mega__list { display:flex; flex-direction:column; gap:2px; margin:2px 0 0; padding:0; list-style:none; }
#main-header .sc-mega__list li { margin:0; padding:0; border:0; list-style:none; }
#main-header .sc-mega__list li::before,
#main-header .sc-mega__list li::marker { content:none; }
#main-header .sc-mega__link {
	display:flex;
	align-items:center;
	gap:12px;
	min-height:0;
	margin:0;
	padding:10px;
	color:var(--m-txt);
	border:0;
	border-radius:12px;
	background:transparent;
	font:600 15px/1.25 Poppins,sans-serif;
	letter-spacing:-.01em;
	text-transform:none;
	transition:background .15s,color .15s;
}
#main-header .sc-mega__link::before,
#main-header .sc-mega__link::after { content:none; display:none; }
#main-header .sc-mega__link .sc-mega__icon { color:var(--m-mut); transition:color .15s; }
#main-header .sc-mega__link:hover { color:#fff; background:rgba(255,255,255,.05); }
#main-header .sc-mega__link:hover .sc-mega__icon { color:var(--m-red-t); }
#main-header .sc-mega__link.is-active { background:linear-gradient(135deg,rgba(229,35,41,.2),rgba(229,35,41,.05)); box-shadow:inset 0 0 0 1px rgba(229,35,41,.4); }
#main-header .sc-mega__link.is-active .sc-mega__icon { color:var(--m-red-t); }
#main-header .sc-mega__sub { display:flex; flex-wrap:wrap; gap:6px; padding:2px 10px 8px 42px; }
#main-header .sc-mega__sub a { padding:6px 11px; color:var(--m-mut); border-radius:999px; box-shadow:inset 0 0 0 1px var(--m-line2); font:500 12.5px/1.2 Poppins,sans-serif; transition:color .15s,box-shadow .15s; }
#main-header .sc-mega__sub a:hover,
#main-header .sc-mega__sub a.is-active { color:#fff; box-shadow:inset 0 0 0 1px var(--m-red); }

/* Pied du panneau */
#main-header .sc-mega__foot { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:16px 30px calc(18px + env(safe-area-inset-bottom,0px)); border-top:1px solid var(--m-line); background:rgba(10,8,8,.6); }
#main-header .sc-mega__btn {
	display:inline-flex;
	align-items:center;
	justify-content:center;
	gap:9px;
	min-height:46px;
	margin:0;
	padding:0 18px;
	color:#fff;
	border:0;
	border-radius:14px;
	background:var(--m-red);
	box-shadow:0 12px 28px -12px rgba(229,35,41,.85);
	font:600 14px/1 Oswald,sans-serif;
	letter-spacing:.08em;
	text-transform:uppercase;
	white-space:nowrap;
	transition:background .2s,transform .2s;
}
#main-header .sc-mega__btn:hover { color:#fff; background:#f2333a; transform:translateY(-1px); }
#main-header .sc-mega__btn.is-ghost { background:transparent; box-shadow:inset 0 0 0 1.5px var(--m-line2); }
#main-header .sc-mega__btn.is-ghost:hover { background:rgba(229,35,41,.08); box-shadow:inset 0 0 0 1.5px var(--m-red); }
#main-header .sc-mega__btn .sc-mega__icon { width:18px; height:18px; }
#main-header .sc-mega__social { display:flex; gap:8px; margin-left:auto; }
#main-header .sc-mega__social a { display:grid; place-items:center; width:38px; height:38px; color:var(--m-mut); border-radius:50%; box-shadow:inset 0 0 0 1px var(--m-line2); }
#main-header .sc-mega__social a:hover { color:#fff; box-shadow:inset 0 0 0 1px var(--m-red); }
#main-header .sc-mega__social .sc-mega__icon { width:17px; height:17px; }

/* Tablette : une seule colonne */
@media (max-width:900px) {
	#main-header .sc-mega { width:min(480px,100vw); }
	#main-header .sc-mega__grid { grid-template-columns:minmax(0,1fr); gap:0; }
	#main-header .sc-mega__account { flex-wrap:wrap; }
	#main-header .sc-mega__account-actions { width:100%; justify-content:flex-start; }
}

/* Mobile : plein écran, rubriques repliables (case à cocher, sans JS) */
@media (max-width:600px) {
	#main-header .sc-mega { width:100vw; border-left:0; }
	#main-header .sc-mega__scroll { padding:16px 16px 20px; }
	#main-header .sc-mega__account { padding:14px; }
	#main-header .sc-mega__account-actions .sc-mega__pill { flex:1; justify-content:center; }
	#main-header .sc-mega__grid { margin-top:12px; }
	#main-header .sc-mega__group { padding:2px 0; border-bottom:1px solid var(--m-line); }
	#main-header .sc-mega__title { padding:14px 2px; cursor:pointer; }
	#main-header .sc-mega__title .sc-mega__icon { display:block; }
	#main-header .sc-mega__switch:checked + .sc-mega__title .sc-mega__icon { transform:rotate(180deg); }
	#main-header .sc-mega__switch:not(:checked) ~ .sc-mega__list { display:none; }
	#main-header .sc-mega__switch:focus-visible + .sc-mega__title { outline:2px solid #fff; outline-offset:2px; border-radius:6px; }
	#main-header .sc-mega__list { padding-bottom:8px; }
	#main-header .sc-mega__foot { flex-wrap:nowrap; gap:8px; padding:12px 16px calc(14px + env(safe-area-inset-bottom,0px)); }
	#main-header .sc-mega__btn { flex:1 1 0; min-width:0; min-height:44px; padding:0 10px; font-size:12.5px; letter-spacing:.05em; white-space:normal; text-align:center; line-height:1.15; }
	#main-header .sc-mega__btn .sc-mega__icon { display:none; }
	#main-header .sc-mega__social { display:none; }
}

@media (prefers-reduced-motion:reduce) {
	#main-header .sc-mega { animation:none; }
	#main-header .sc-mega * { transition:none!important; }
}

/* Menu ouvert : les boutons flottants (Stella, messagerie, cookies) ne recouvrent pas le panneau. */
body.sc-menu-drawer-open .scuw,
body.sc-menu-drawer-open .scd-artist-chat,
body.sc-menu-drawer-open .cmplz-manage-consent { visibility:hidden!important; }

/* Se connecter : choix Visiteur / Artiste (deux formulaires différents) */
#main-header .sc-mega__login { position:relative; margin:0; }
#main-header .sc-mega__login > summary { list-style:none; cursor:pointer; user-select:none; }
#main-header .sc-mega__login > summary::-webkit-details-marker { display:none; }
#main-header .sc-mega__login > summary .sc-mega__icon { width:15px; height:15px; margin-left:2px; transition:transform .2s; }
#main-header .sc-mega__login[open] > summary .sc-mega__icon { transform:rotate(180deg); }
#main-header .sc-mega__login > summary:focus-visible { outline:2px solid #fff; outline-offset:2px; }
#main-header .sc-mega__login-menu {
	position:absolute;
	top:calc(100% + 8px);
	right:0;
	z-index:5;
	display:flex;
	flex-direction:column;
	gap:6px;
	width:280px;
	padding:8px;
	border-radius:16px;
	background:#1a1617;
	box-shadow:inset 0 0 0 1px var(--m-line2),0 22px 50px -16px #000;
}
#main-header .sc-mega__login-menu a { display:flex; align-items:center; gap:12px; padding:11px 12px; color:var(--m-txt); border-radius:12px; transition:background .15s; }
#main-header .sc-mega__login-menu a:hover { background:rgba(229,35,41,.12); }
#main-header .sc-mega__login-menu .sc-mega__icon { color:var(--m-red-t); }
#main-header .sc-mega__login-menu strong { display:block; font:700 14px/1.2 Poppins,sans-serif; }
#main-header .sc-mega__login-menu small { display:block; margin-top:2px; color:var(--m-mut); font:400 12px/1.3 Poppins,sans-serif; }
@media (max-width:900px) {
	#main-header .sc-mega__login-menu { right:auto; left:0; }
}
@media (max-width:600px) {
	#main-header .sc-mega__login { flex:1; }
	#main-header .sc-mega__login > summary { width:100%; justify-content:center; }
	#main-header .sc-mega__login-menu { position:static; width:auto; margin-top:8px; }
	#main-header .sc-mega__account.is-guest .sc-mega__account-actions { flex-wrap:wrap; align-items:flex-start; }
	#main-header .sc-mega__login[open] { flex:1 1 100%; }
}
