/* ========================================
   STYLES DU HEADER ET MENU
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Header principal */
.header {
    background: #fff;
    border-bottom: 1px solid #d1d7dc;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 24px;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}

/* Logo */
.logo-container {
    flex-shrink: 0;
}

.logo-link {
    display: block;
}

.logo {
    height: 40px;
    width: auto;
    border-radius:5px;
}

/* Barre de recherche */
.search-container {
    flex: 1;
    max-width: 500px;
}

.search-container form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    font-size: 16px;
    color: #6a6f73;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #d1d7dc;
    border-radius: 50px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #a435f0;
    box-shadow: 0 0 0 2px rgba(164, 53, 240, 0.1);
}

/* Menu de navigation */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    color: #1c1d1f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-transform: capitalize;
}

.nav-link:hover {
    background: #f7f9fa;
}

/* Menu burger (mobile) */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.burger-line {
    width: 24px;
    height: 2px;
    background: #1c1d1f;
    transition: all 0.3s ease;
}

.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Menu mobile */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: #fff;
    border-top: 1px solid #d1d7dc;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu.active {
    display: flex;
    max-height: 500px;
    padding: 12px 0;
}

.mobile-menu .nav-link {
    padding: 12px 24px;
    display: block;
    border-radius: 0;
}

/* Résultats de recherche */
.search-results-info {
    padding: 12px 0;
    font-size: 14px;
    color: #1c1d1f;
}

.reset-link {
    color: #a435f0;
    text-decoration: none;
    margin-left: 12px;
    font-weight: 600;
}

.reset-link:hover {
    color: #8710d8;
}

/* ========================================
   SÉLECTEUR DE LANGUE
   ======================================== */

/* Container du sélecteur de langue - Desktop */
.language-selector {
    position: relative;
    display: inline-block;
    margin-right: 8px;
}

/* Bouton principal */
.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #d1d7dc;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #1c1d1f;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lang-btn:hover {
    background: #f7f9fa;
    border-color: #a435f0;
}

.lang-btn .flag-icon {
    font-size: 20px;
    line-height: 1;
}

.lang-btn .lang-code {
    font-size: 13px;
    text-transform: uppercase;
}

/* Dropdown des langues */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid #d1d7dc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 9999;
    overflow: hidden;
}

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

/* Options de langue */
.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #1c1d1f;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.lang-option:not(:last-child) {
    border-bottom: 1px solid #f7f9fa;
}

.lang-option:hover {
    background: #f7f9fa;
}

.lang-option.active {
    background: #ecf4e7;
    color: #3d7b2d;
    font-weight: 600;
}

.lang-option .flag-icon {
    font-size: 20px;
    line-height: 1;
}

/* Sélecteur de langue - Mobile */
.mobile-lang-selector {
    display: none;
    padding: 12px 0;
    border-bottom: 1px solid #d1d7dc;
    margin-bottom: 12px;
}

.mobile-lang-selector .lang-option {
    padding: 10px 20px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {

    .header-top {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .logo {
        height: 32px;
    }

    
    .search-container {
        order: 3;
        flex: 1 0 100%;
        max-width: 100%;
        display: none;
    }
    
    .search-container.active {
        display: block;
    }
    
    .nav-menu {
        display: none;
    }
    
    .burger-menu {
        display: flex;
        margin-left: auto;
    }
    
    .language-selector {
        display: none !important;
    }
    
    .mobile-lang-selector {
        display: block;
    }
}

@media (min-width: 769px) {
    .burger-menu {
        display: none;
    }
    
    .mobile-menu {
        display: none !important;
    }
    
    .mobile-lang-selector {
        display: none !important;
    }
    
    .language-selector {
        display: inline-block;
    }

}