/**
 * NAVIGATION.CSS - Navbar + Menu Hamburger Responsive
 * Compatible avec tous les navigateurs
 */

/* ===========================
   NAVBAR PRINCIPALE
   =========================== */
.navbar {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-container,
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    z-index: 1001;
}

.logo img {
    height: 50px;
    width: auto;
}

/* Menu Desktop */
.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.2rem;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    display: block;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.nav-menu > li > a:hover {
    color: #0066cc;
}

/* Dropdowns Desktop */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #333;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #0066cc;
}

/* Boutons */
.btn-primary {
    background-color: #0066cc;
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #0052a3;
}

.lang-switch {
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lang-switch:hover {
    border-color: #0066cc;
    background-color: #f8f9fa;
}

/* ===========================
   MENU HAMBURGER - ICÔNE
   =========================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    cursor: pointer;
    z-index: 1001;
    background: transparent;
    border: none;
    padding: 0;
}

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

/* Animation hamburger -> X */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

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

/* ===========================
   MENU MOBILE - SLIDE-IN
   =========================== */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background-color: white;
    z-index: 999;
    overflow-y: auto;
    transition: left 0.3s ease-in-out;
    padding-top: 80px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list > li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-list > li > a {
    display: block;
    padding: 1rem 1.5rem;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.mobile-menu-list > li > a:hover {
    background-color: #f8f9fa;
    color: #0066cc;
}

/* Sous-menus mobile */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    background-color: #f8f9fa;
}

.mobile-submenu.active {
    max-height: 500px;
}

.mobile-submenu a {
    display: block;
    padding: 0.75rem 2rem;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #e8e8e8;
}

.mobile-submenu a:hover {
    background-color: #e8e8e8;
    color: #0066cc;
}

/* Bouton expand submenu */
.submenu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    text-align: left;
}

.submenu-toggle::after {
    content: '▾';
    font-size: 12px;
    transition: transform 0.3s ease;
}

.submenu-toggle.active::after {
    transform: rotate(180deg);
}

/* ===========================
   OVERLAY SOMBRE
   =========================== */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===========================
   RESPONSIVE - MEDIA QUERIES
   =========================== */

/* Tablet et mobile */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-menu > li > a {
        padding: 0.5rem 0.75rem;
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
    }
    
    .navbar-container {
        height: 60px;
    }
    
    .logo img {
        height: 40px;
    }
}

/* Mobile petit */
@media (max-width: 480px) {
    .mobile-menu {
        width: 260px;
    }
    
    .navbar-container {
        padding: 0 0.75rem;
    }
}

/* ===========================
   COMPATIBILITÉ IE11
   =========================== */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .navbar-container {
        display: -ms-flexbox;
        -ms-flex-pack: justify;
        -ms-flex-align: center;
    }
    
    .hamburger {
        display: -ms-flexbox;
        -ms-flex-direction: column;
        -ms-flex-pack: justify;
    }
}

/* ===========================
   OVERRIDE POUR PAGE INDEX - Hamburger visible sur mobile
   =========================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex !important;
    }
}
