/*
 * Styles pour le menu déroulant "Nos activités"
 * À ajouter au fichier main.css ou à inclure séparément
 * Version: 1.0
 * Date: 4 novembre 2025
 */

/* ========== NAVIGATION AMÉLIORÉE ========== */
nav li {
    position: relative;
}

nav a {
    display: block;
    padding: 0.5rem 0;
}

/* ========== DROPDOWN MENU ========== */
.has-dropdown {
    position: relative;
}

.has-dropdown > a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.has-dropdown > a::before {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    order: 2;
}

.has-dropdown:hover > a::before {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 280px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 0.5rem;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dropdown-menu a {
    padding: 0.5rem 2rem;
    color: #2c3e50;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    display: block;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    border-left-color: #4a7c59;
    color: #4a7c59;
    padding-left: calc(2rem + 5px);
}

.dropdown-menu a.overview {
    font-weight: 600;
    color: #4a7c59;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.75rem;
    margin-bottom: 0.25rem;
}

.dropdown-menu a.overview:hover {
    background-color: #e9b44c;
    color: white;
    border-left-color: #e9b44c;
}

/* Animation d'entrée des éléments du dropdown */
.dropdown-menu li {
    animation: slideInDown 0.3s ease forwards;
    opacity: 0;
}

.has-dropdown:hover .dropdown-menu li:nth-child(1) { animation-delay: 0.05s; }
.has-dropdown:hover .dropdown-menu li:nth-child(2) { animation-delay: 0.1s; }
.has-dropdown:hover .dropdown-menu li:nth-child(3) { animation-delay: 0.15s; }
.has-dropdown:hover .dropdown-menu li:nth-child(4) { animation-delay: 0.2s; }
.has-dropdown:hover .dropdown-menu li:nth-child(5) { animation-delay: 0.25s; }
.has-dropdown:hover .dropdown-menu li:nth-child(6) { animation-delay: 0.3s; }
.has-dropdown:hover .dropdown-menu li:nth-child(7) { animation-delay: 0.35s; }
.has-dropdown:hover .dropdown-menu li:nth-child(8) { animation-delay: 0.4s; }

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 768px) {
    .has-dropdown:hover .dropdown-menu,
    .has-dropdown.active .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        box-shadow: none;
        margin-top: 0.5rem;
        margin-left: 1rem;
        border-left: 2px solid #4a7c59;
    }

    .dropdown-menu {
        display: none;
    }

    .has-dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }

    .dropdown-menu a:hover {
        padding-left: calc(1rem + 5px);
    }

    .dropdown-menu li {
        animation: none;
        opacity: 1;
    }
}
