setIsOpen(false)}
aria-hidden="true"
/>
{/* Drawer */}
{t("nav.navigation")}
{navItems.map((item) => (
setIsOpen(false)}
>
{item.label}
))}
{users.length > 0 && (
<>
{t("users.title")}
{ select(null); setIsOpen(false); }}
className={`w-full flex items-center gap-3 px-3 py-3 rounded-lg transition-colors duration-200 active:scale-[0.98] ${
!activeUserId ? "text-foreground bg-accent font-medium" : "text-muted-foreground hover:text-foreground hover:bg-accent"
}`}
>
Admin
{users.map((user) => (
{ select(user.id); setIsOpen(false); }}
className={`w-full flex items-center gap-3 px-3 py-3 rounded-lg transition-colors duration-200 active:scale-[0.98] ${
activeUserId === user.id ? "text-foreground bg-accent font-medium" : "text-muted-foreground hover:text-foreground hover:bg-accent"
}`}
>
{user.username}
))}
>
)}
setIsOpen(false)}
>
{t("nav.settings")}
>
);
return (
<>
{/* Hamburger button — reste dans le header */}
setIsOpen(!isOpen)}
aria-label={isOpen ? t("nav.closeMenu") : t("nav.openMenu")}
aria-expanded={isOpen}
>
{isOpen ? : }
{/* Backdrop + Drawer portés directement sur document.body,
hors du header et de son backdrop-filter */}
{mounted && createPortal(overlay, document.body)}
>
);
}