/* ============================================
   HEADER / NAVBAR - COMMUN À TOUTES LES PAGES
   ============================================ */

.header {
    position: relative;
    z-index: 100;
    width: 100%;
    padding: 12px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-container {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

@media (min-width: 1025px) {
    .logo {
        height: 70px;
    }
}

.nav-menu {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex !important;
    gap: 20px;
    align-items: center;
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    .nav-menu.collapse {
        display: flex !important;
    }
    
    .nav-menu.collapse:not(.show) {
        display: flex !important;
    }
}

.navbar-toggler {
    background: transparent;
    border: 2px solid #000000;
    border-radius: 5px;
    padding: 8px 10px;
    cursor: pointer;
    display: none;
}

@media (max-width: 767px) {
    .navbar-toggler {
        display: block;
    }
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: 18px;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background: #000000;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-link {
    color: #000000;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding: 5px 0;
    white-space: nowrap;
}

@media (min-width: 1025px) {
    .nav-link {
        font-size: 17px;
        font-weight: 600;
        padding: 6px 0;
    }
}

.nav-link:hover {
    color: #1AA45A;
}

.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 12px;
    margin-left: 5px;
    border: none;
    vertical-align: middle;
}

.dropdown-menu {
    background: #000000;
    border: none;
    z-index: 1003;
    border-radius: 0;
    padding: 0;
    margin-top: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 220px;
}

.dropdown-item {
    color: #ffffff;
    padding: 10px 18px;
    font-size: 14px;
    transition: background 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.dropdown-item:active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

@media (max-width: 767px) {
    .header {
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .logo-container {
        flex: 0 0 auto;
        z-index: 1002;
    }

    .navbar-toggler {
        display: block;
        order: 2;
        z-index: 1002;
        position: relative;
    }

    .nav-menu {
        /* Menu mobile compact sous le header, ne couvre pas tout l'écran */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px 20px;
        width: 100%;
        max-height: 60vh; /* limite la hauteur à ~60% de l'écran */
        text-align: center;
        background: #ffffff;
        margin: 0;
        order: 3;
        z-index: 1001;
        overflow-y: auto;
        justify-content: flex-start;
        align-items: center;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        border-radius: 0 0 12px 12px;
    }

    .nav-menu.collapse:not(.show) {
        display: none !important;
    }

    .nav-menu.collapse.show {
        display: flex !important;
    }

    /* Liens plus grands et plus lisibles sur mobile */
    .nav-link {
        font-size: 18px;
        font-weight: 600;
        padding: 8px 0;
    }

    .nav-item.dropdown {
        width: 100%;
    }

    .dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100%;
        margin-top: 10px;
    }

    .dropdown-item {
        padding: 12px 20px;
        font-size: 16px;
    }
}

