.navbar {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.navbar-item a {
    position: relative;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s ease;
}

/* Hover + animation underline */
.navbar-item a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0%;
    height: 2px;
    background: #ff4656;
    transition: width 0.3s ease;
}

.navbar-item a:hover {
    color: #ff4656;
}

.navbar-item a:hover::after {
    width: 100%;
}

/* Dropdown container */
.dropdown {
    position: relative;
}

/* Sous-menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(10, 14, 39, 0.95);
    border: 1px solid #ff4656;
    border-radius: 8px;
    min-width: 200px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s ease;
    z-index: 1000;
}

/* Liens du sous-menu */
.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: white;
    text-decoration: none;
    font-size: 0.95em;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: #ff4656;
}

/* Hover effect */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* Page active */
.navbar-item.active a {
    color: #ff4656;
}

.navbar-item.active a::after {
    width: 100%;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 2000; /* 👈 plus haut que .navbar */
}
/* MOBILE */

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 20px;
        z-index: 2000;
    }

    .navbar {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background: rgba(10, 14, 39, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 100px;
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }

    .navbar.active {
        right: 0;
    }

    .navbar-menu {
        flex-direction: column;
        gap: 1.5rem;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        background: transparent;
        padding-left: 15px;
    }

    .navbar::before {
        content: "";
        position: fixed;
        top: 0;
        left: -100%;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.6);
        transition: left 0.3s ease;
        z-index: -1;
    }

    .navbar.active::before {
        left: 0;
    }
}
