/* Styles pour le menu mobile */
.toggle-button {
    display: none;
}

@media (max-width: 768px) {
    /* Styles généraux pour mobile */
    body.menu-open {
        overflow: hidden;
    }

    .navbar {
        padding: 0 1rem;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: rgba(255, 255, 255, 0.98);
        transform: translateY(0);
        transition: transform 0.3s ease, background-color 0.3s ease;
        z-index: 1000;
    }

    .navbar.nav-hidden {
        transform: translateY(-100%);
    }

    .brand-title {
        position: relative;
        z-index: 1001;
        display: flex;
        align-items: center;
        height: 100%;
        padding: 0.5rem 0;
    }

    .brand-title a {
        display: flex;
        align-items: center;
        height: 100%;
    }

    .brand-title .logo {
        height: 100%;
        width: auto;
        max-height: 50px;
        object-fit: contain;
        object-position: left center;
    }

    /* Style du bouton burger */
    .toggle-button {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: absolute;
        top: 25px;
        right: 1rem;
        width: 30px;
        height: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }

    .toggle-button .bar {
        width: 100%;
        height: 3px;
        background-color: var(--dark-color);
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    /* Animation du bouton burger */
    .toggle-button.active .bar:nth-child(1) {
        transform: translateY(8.5px) rotate(45deg);
    }

    .toggle-button.active .bar:nth-child(2) {
        opacity: 0;
    }

    .toggle-button.active .bar:nth-child(3) {
        transform: translateY(-8.5px) rotate(-45deg);
    }

    /* Style du menu mobile */
    .navbar-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: white;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        padding-top: 0;
    }

    .navbar-links.active {
        transform: translateX(0);
    }

    .navbar-links ul {
        width: 100%;
        list-style: none;
        padding: 0;
        margin: -100px 0 0 0;
        text-align: center;
    }

    .navbar-links li {
        margin: 1rem 0;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

    .navbar-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    .navbar-links a {
        display: block;
        font-size: 1.4rem;
        padding: 0.5rem;
        color: var(--dark-color);
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .navbar-links a:hover,
    .navbar-links a.active {
        color: var(--primary-color);
    }

    /* Animation des liens */
    .navbar-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .navbar-links.active li:nth-child(2) { transition-delay: 0.2s; }
    .navbar-links.active li:nth-child(3) { transition-delay: 0.3s; }
    .navbar-links.active li:nth-child(4) { transition-delay: 0.4s; }

    /* Ajustements de la navbar en mode menu ouvert */
    .navbar.menu-open {
        background: white;
        box-shadow: none;
    }

    .navbar.menu-open .brand-title a {
        color: var(--dark-color);
    }

    .navbar.menu-open .toggle-button .bar {
        background-color: var(--dark-color);
    }
}
