/* Navigation moderne et responsive */

/* Variables pour la navigation */
:root {
    --nav-height: 70px;
    --nav-bg: #2c3e50;
    --nav-text: #ffffff;
    --nav-hover: #3498db;
    --nav-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    --nav-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation principale */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    box-shadow: var(--nav-shadow);
    height: var(--nav-height);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo */
.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--nav-text);
    transition: var(--nav-transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand img {
    height: 45px;
    width: auto;
    margin-right: 0.5rem;
}

/* Navigation desktop */
.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.navbar-nav li {
    position: relative;
}

.navbar-nav a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--nav-text);
    font-weight: 500;
    text-decoration: none;
    transition: var(--nav-transition);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.navbar-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.navbar-nav a:hover::before {
    left: 100%;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    background: var(--nav-hover);
    color: var(--nav-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Bouton hamburger mobile */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--nav-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--nav-transition);
}

.navbar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Navigation mobile */
@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }
    
    .navbar-toggle {
        display: block;
    }
    
    .navbar-nav {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background: var(--nav-bg);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 0;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 0;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    
    .navbar-nav.active {
        left: 0;
    }
    
    .navbar-nav li {
        width: 90%;
        margin: 0.5rem 0;
    }
    
    .navbar-nav a {
        width: 100%;
        text-align: center;
        padding: 1rem 2rem;
        margin: 0;
        border-radius: 12px;
        font-size: 1.1rem;
        border: 2px solid transparent;
    }
    
    .navbar-nav a:hover,
    .navbar-nav a.active {
        border-color: var(--nav-hover);
        transform: translateX(10px);
    }
}

/* Animation d'apparition pour les liens mobiles */
@media (max-width: 768px) {
    .navbar-nav.active li {
        animation: slideInFromLeft 0.3s ease forwards;
        opacity: 0;
    }
    
    .navbar-nav.active li:nth-child(1) { animation-delay: 0.1s; }
    .navbar-nav.active li:nth-child(2) { animation-delay: 0.2s; }
    .navbar-nav.active li:nth-child(3) { animation-delay: 0.3s; }
    .navbar-nav.active li:nth-child(4) { animation-delay: 0.4s; }
    .navbar-nav.active li:nth-child(5) { animation-delay: 0.5s; }
    .navbar-nav.active li:nth-child(6) { animation-delay: 0.6s; }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Effet de scroll */
.site-header.scrolled {
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Indicateur de page active */
.navbar-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--nav-text);
    border-radius: 50%;
}

/* Hover effect pour les liens */
.navbar-nav a {
    position: relative;
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--nav-text);
    transition: var(--nav-transition);
    transform: translateX(-50%);
}

.navbar-nav a:hover::after {
    width: 80%;
}

/* Style pour les icônes */
.navbar-nav a i {
    margin-right: 0.5rem;
    font-size: 0.9em;
}

/* Responsive pour tablettes */
@media (max-width: 1024px) and (min-width: 769px) {
    .navbar-nav {
        gap: 0.25rem;
    }
    
    .navbar-nav a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Amélioration de l'accessibilité */
.navbar-nav a:focus {
    outline: 2px solid var(--nav-hover);
    outline-offset: 2px;
}

.navbar-toggle:focus {
    outline: 2px solid var(--nav-hover);
    outline-offset: 2px;
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    .site-header {
        background: rgba(20, 25, 31, 0.95);
    }
    
    .navbar-nav a:hover,
    .navbar-nav a.active {
        background: #4a90e2;
    }
}
