/* ------------------------------ */
/* RESET DE BASE                  */
/* ------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ------------------------------ */
/* STYLES DU MENU                 */
/* ------------------------------ */
nav {
    background-color: var(--menu-bg); /* Thématisation */
    color: var(--text-color);
    font-family: Arial, sans-serif;
    position: relative;
    z-index: 1000;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
}

nav ul li {
    position: relative;
}

nav ul li a,
nav ul li a:visited,
nav ul li a:focus {
    display: block;
    padding: 15px 20px;
    color: var(--menu-text-hover);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

nav ul li a:hover {
    background-color: var(--menu-hover-bg);
    color: var(--link-hover);
    text-decoration: none;
}

/* ------------------------------ */
/* SOUS-MENU                       */
/* ------------------------------ */
nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--menu-bg);
    min-width: 150px;
    flex-direction: column;
    z-index: 1000;
}

nav ul li ul li a {
    padding: 10px 15px;
}

/* Affichage du sous-menu au hover */
nav ul li:hover > ul {
    display: flex;
}

/* ------------------------------ */
/* HAMBURGER MENU POUR MOBILE      */
/* ------------------------------ */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 15px;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--hamberger-link-bg);
    margin: 4px 0;
    transition: background-color 0.2s;
}

/* ------------------------------ */
/* RESPONSIVE                      */
/* ------------------------------ */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        display: none; /* caché par défaut */
        width: 100%;
        background-color: var(--menu-bg);
    }

    nav ul.active {
        display: flex; /* affiché quand toggle */
    }

    nav ul li ul {
        display: none; /* sous-menu caché par défaut */
        flex-direction: column;
    }

    nav ul li.active > ul {
        display: flex; /* sous-menu ouvert si li.active */
    }

    .hamburger {
        display: flex;
    }
}
