/* Variables pour les couleurs et dimensions courantes */
:root {
    --primary-color: #54c4b7;
    --text-color: #333;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --header-height: 90px;
    --logo-height: 70px;
}

/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Style principal du header */
.header-section {
    background-color: white;
    box-shadow: 0 2px 5px var(--shadow-color);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
    height: var(--header-height);
}

/* Logo et son conteneur */
.header-section .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-section .logo img {
    height: var(--logo-height);
    width: auto;
}

.header-section .logo span {
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: 10px;
    color: var(--text-color);
}

/* Formulaire de recherche principal */
.header-section .search-form {
    display: flex;
    align-items: center;
    max-width: 400px;
    width: 100%;
    position: relative;
}

.header-section .search-form .search-wrapper {
    position: relative;
    width: 100%;
}

.header-section .search-form input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.header-section .search-form input[type="text"]:focus {
    border-color: var(--primary-color);
}

/* Résultats de recherche */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-shadow: 0 4px 8px var(--shadow-color);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
}

.search-results a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.search-results a:last-child {
    border-bottom: none;
}

.search-results a:hover {
    background-color: #f5f5f5;
}

/* Menu hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* État actif du menu hamburger */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Menu déroulant */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 400px;
    background: white;
    box-shadow: 0 4px 8px var(--shadow-color);
    border-radius: 5px;
    padding: 20px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.menu-toggle.active + .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Style du menu déroulant */
.dropdown-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-menu ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu ul li:last-child {
    border-bottom: none;
}

.dropdown-menu ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 16px;
    display: block;
    transition: color 0.3s ease;
}

/* Formulaire de recherche dans le dropdown */
.dropdown-menu .dropdown-search-form {
    width: 100%;
    margin-bottom: 15px;
    display: block;  /* Important pour l'affichage mobile */
}

.dropdown-menu .search-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.dropdown-menu .search-wrapper input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    outline: none;
}

/* Media Queries */
@media (min-width: 769px) {
    .menu-toggle,
    .dropdown-menu {
        display: none;
    }

    .header-section .search-form {
        display: flex;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .header-section .search-form {
        display: none;
    }

    .header-section .logo img {
        height: 50px;
    }

    .dropdown-menu {
        display: none;
    }

    .dropdown-menu.show {
        display: block;
    }

    /* Style spécifique pour le formulaire de recherche mobile */
    .dropdown-menu .dropdown-search-form {
        display: block !important;
        width: 100%;
    }

    .dropdown-menu .search-wrapper {
        display: block;
        width: 100%;
    }

    .dropdown-menu .search-wrapper input[type="text"] {
        display: block;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-section {
        padding: 10px;
    }

    .header-section .logo span {
        font-size: 1.2rem;
    }

    .dropdown-menu {
        padding: 15px;
    }
}