/* ===== MENU NAVIGATION - TROIS MODES ===== */

/* MODE GRAND ÉCRAN (desktop) - Menu sur une seule ligne */
.nav-menu {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-link {
    position: relative;
    color: var(--gray-700);
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
    border-radius: 5px;
}

.nav-link:hover {
    color: var(--primary);
    transform: translateY(-3px);
    text-shadow: 0 2px 8px rgba(26, 84, 144, 0.2);
}

/* Style générique pour les liens actifs */
.nav-link.active {
    color: var(--primary);
    font-weight: 700;
    background-color: rgba(26, 84, 144, 0.08);
    border-bottom: 3px solid var(--secondary);
    position: relative;
}

/* Style spécial pour la page d'accueil active */
.nav-link[href="index.php"].active {
    background: linear-gradient(135deg, rgba(26, 84, 144, 0.15) 0%, rgba(255, 215, 0, 0.15) 100%);
    border-bottom: 3px solid var(--secondary);
    position: relative;
}

/* Indicateur visuel pour la page active */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--secondary);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

.nav-link.active:hover {
    transform: translateY(-3px);
}

/* Style spécial pour le bouton de soutien en mode desktop */
.nav-link.support-btn {
    background: linear-gradient(135deg, #1a5490 0%, #2b70b8 100%);
    color: white !important;
    font-weight: 600;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(26, 84, 144, 0.2);
    margin-left: 1rem;
    border: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav-link.support-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.nav-link.support-btn:hover::before {
    left: 100%;
}

.nav-link.support-btn:hover {
    background: linear-gradient(135deg, #1a5490 0%, #2b70b8 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(26, 84, 144, 0.3);
    color: white !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* MODE MOYEN (tablette/petit desktop) - Menu sublime sur deux lignes */
@media (max-width: 1500px) and (min-width: 901px) {
    .navbar {
        padding: 1rem 0;
    }

    .nav-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0;
        width: 100%;
        padding: 1.2rem 1.5rem;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 20px;
        backdrop-filter: blur(10px);
        margin: 2rem 0 0.5rem 0;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(26, 84, 144, 0.15);
    }
    
    .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        margin: 0.2rem 0.3rem;
        border-radius: 10px;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        backdrop-filter: blur(5px);
        border: 1px solid transparent;
        position: relative;
        overflow: hidden;
        font-weight: 500;
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(26, 84, 144, 0.2);
        box-shadow: 0 4px 20px rgba(26, 84, 144, 0.15);
        transform: translateY(-2px);
    }
    
    /* Première ligne - 5 liens */
    .nav-link:nth-child(-n+5) {
        order: 1;
    }
    
    /* Deuxième ligne - 4 liens */
    .nav-link:nth-child(n+6) {
        order: 2;
        margin-top: 0.4rem;
    }
    
    /* Style spécial pour le bouton de soutien */
    .nav-link.support-btn {
        background: linear-gradient(135deg, #1a5490 0%, #2b70b8 100%);
        color: white !important;
        font-weight: 600;
        border-radius: 25px;
        box-shadow: 0 6px 20px rgba(26, 84, 144, 0.3);
        border: 2px solid rgba(255, 255, 255, 0.2);
        margin-left: 0.5rem;
        position: relative;
        overflow: hidden;
    }
    
    .nav-link.support-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.6s;
    }
    
    .nav-link.support-btn:hover::before {
        left: 100%;
    }
    
    .nav-link.support-btn:hover {
        background: linear-gradient(135deg, #1a5490 0%, #2b70b8 100%);
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 8px 25px rgba(26, 84, 144, 0.4);
        border: 2px solid rgba(255, 215, 0, 0.6);
    }
    
    /* Animation d'apparition élégante */
    .nav-link {
        animation: slideInDown 0.6s ease-out;
        animation-fill-mode: both;
    }
    
    .nav-link:nth-child(1) { animation-delay: 0.1s; }
    .nav-link:nth-child(2) { animation-delay: 0.15s; }
    .nav-link:nth-child(3) { animation-delay: 0.2s; }
    .nav-link:nth-child(4) { animation-delay: 0.25s; }
    .nav-link:nth-child(5) { animation-delay: 0.3s; }
    .nav-link:nth-child(6) { animation-delay: 0.35s; }
    .nav-link:nth-child(7) { animation-delay: 0.4s; }
    .nav-link:nth-child(8) { animation-delay: 0.45s; }
    .nav-link:nth-child(9) { animation-delay: 0.5s; }
}

/* ===== HEADER ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(26, 84, 144, 0.1);
    padding: 0.5rem 1rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1a5490;
    font-size: 1.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
    z-index: 2001;
    margin-right: auto;
}

.logo img {
    height: 50px;
    width: auto;
    margin-right: 0.5rem;
}

/* ===== HAMBURGER MENU ===== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 12px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 8px;
    z-index: 2000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(26, 84, 144, 0.3);
    justify-content: center;
    align-items: center;
    margin-left: auto;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--primary);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    display: block;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* MODE MOBILE (petit écran) - Menu hamburger */
@media (max-width: 900px) {
    .hamburger {
        display: flex !important;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        display: none !important;
        flex-direction: column;
        padding: 90px 1.5rem 2rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
        z-index: 1999;
        overflow-y: auto;
        backdrop-filter: blur(10px);
        border-left: 1px solid rgba(26, 84, 144, 0.1);
    }

    .nav-menu.active {
        display: flex !important;
        right: 0;
    }

    .nav-link {
        width: 100%;
        padding: 1rem 1.5rem;
        text-align: center;
        border-bottom: 1px solid rgba(26, 84, 144, 0.1);
        font-size: 1.1rem;
        margin: 0;
        border-radius: 0;
        display: block;
        white-space: normal;
        line-height: 1.4;
    }

    .nav-link:hover {
        background: rgba(26, 84, 144, 0.05);
        transform: none;
    }

    .nav-link.support-btn {
        margin: 1.5rem 0 0 0;
        text-align: center;
        background: linear-gradient(135deg, #1a5490 0%, #2b70b8 100%);
        color: white !important;
        border-radius: 50px;
        padding: 1rem 2rem;
        font-size: 1.2rem;
        border: none;
        box-shadow: 0 4px 15px rgba(26, 84, 144, 0.2);
    }

    .nav-link.support-btn:hover {
        background: linear-gradient(135deg, #1a5490 0%, #2b70b8 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(26, 84, 144, 0.3);
    }

    /* Cacher uniquement les boutons du bas de la page d'accueil en mode mobile */
    body.index-page .hero-buttons,
    body.index-page .cta-section {
        display: none !important;
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 