document.addEventListener('DOMContentLoaded', function() {
    var burgerBtn = document.getElementById('burgerBtnVitrine');
    var navMenu = document.getElementById('navMenuVitrine');
    var body = document.body;

    if (burgerBtn && navMenu) {
        burgerBtn.addEventListener('click', function(e) {
            e.stopPropagation();
            burgerBtn.classList.toggle('active');
            navMenu.classList.toggle('open');
            // Bloque ou débloque le scroll de la page en arrière-plan
            body.classList.toggle('menu-open-active');
        });

        // Ferme le menu automatiquement si on clique en dehors
        document.addEventListener('click', function(e) {
            if (!navMenu.contains(e.target) && !burgerBtn.contains(e.target)) {
                burgerBtn.classList.remove('active');
                navMenu.classList.remove('open');
                body.classList.remove('menu-open-active');
            }
        });
    }
});