/* === Général === */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
}
/* Navbar / header du bas */
.navbar {
    position: fixed;
    top: 40px; /* hauteur du top-header */
    left: 0;
    width: 100%;
    z-index: 1040; 
    height: 55px; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.navbar .container-fluid {
    height: 100%;
    display: flex;
    align-items: center;
}
/* === Logo === */
.navbar .navbar-brand img {
    height: 40px;
    max-height: 100%;
}
/* === Barre de recherche modernisée === */
.navbar .search-bar-container {
    position: relative;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.navbar .search-bar {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #ddd;
    padding: 10px 45px 10px 45px; /* espace pour icônes */
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
}

.navbar .search-bar:focus {
    border-color: #f0151f;
    box-shadow: 0 0 0 3px rgba(240, 21, 31, 0.2);
    outline: none;
}

/* Bouton recherche (loupe) */
.navbar .search-bar-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background-color: #f0151f;
    border: none;
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease-in-out;
}

.navbar .search-bar-btn:hover {
    background-color: #b01017;
}

/* Bouton filtres */
.navbar .filter-btn {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background-color: #f0151f;
    border: none;
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease-in-out;
}

.navbar .filter-btn:hover {
    background-color: #b01017;
}
/* Style pour le bouton Publier */
.navbar .publish-btn {
    background-color: #f0151f;
    color: #fff;
    border-radius: 50px;
    border: none;
    font-weight: bold;
    white-space: nowrap; /* Empêche le texte de se couper */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.navbar .publish-btn:hover {
    background-color: #b01017;
}
/* Notifcation  */
.navbar .header-btn {
    transition: transform 0.2s ease;
}
.navbar .header-btn:hover {
    transform: scale(1.05);
}
.navbar .header-btn .notification-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    background-color: var(--primary); /* Ou la couleur de votre choix */
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    z-index: 1;
}
/* === Boutons et icônes === */
.navbar .dropdown .btn {
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0 10px;
}
/* === Menu mobile === */
.navbar .navbar-toggler {
    width: 35px;
    height: 35px;
    border: none;
    color: #000 !important;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Menu déroulant */
.navbar .collapse .navbar-nav {
    background-color: #fff;
}
.navbar .collapse .dropdown-menu {
    background-color: #fff;
    /* Couleur tertiaire */
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* === Bouton utilisateur === */
.user-btn {
    /* Couleur primaire */
    background-color: #fff;
    /* Couleur tertiaire */
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    /* Couleur secondaire */
}
.user-btn:hover,
.user-btn:focus,
.user-btn:active,
.navbar .navbar-toggler:hover,
.navbar .navbar-toggler:active,
.navbar .navbar-toggler:focus {
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}
/* Appliquer un effet au survol des éléments du menu principal */
.navbar .navbar-nav .nav-item .dropdown-item:hover {
    color: #fff;
    /* Couleur du texte */
    background-color: #f0151f;
}
.navbar .navbar-nav .nav-item .dropdown-toggle:hover {
    color: #f0151f;
}
/* Appliquer un effet au survol des sous-menus */
.navbar .dropdown-menu .dropdown-item:hover {
    color: #fff;
    /* Couleur du texte */
    background-color: #f0151f;
}
.navbar #navbarNav {
    background-color: #fff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* === Mobile Search Overlay === */
.navbar-mobile .search-section {
    display: flex;
    align-items: center;
    margin: 10px 0;
    position: relative;
}
.navbar-mobile .search-section input {
    flex: 1;
    padding: 9px 20px;
    border-radius: 50px;
    border: 1px solid #ddd;
    font-size: 16px;
}
.navbar-mobile .search-section button {
    margin-left: 8px;
    padding: 9px 20px;
    border-radius: 50px;
    background-color: #f0151f;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.navbar-mobile .search-section button:hover {
    background-color: #b01017;
}
.navbar-mobile .autocomplete-container {
    position: absolute;
    z-index: 1050; /* Assurez-vous que c'est suffisamment élevé */
    display: none; /* Par défaut, caché */
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%; /* Prend la largeur de son parent */
    max-width: 500px; /* Limite la largeur maximale */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-y: auto; /* Permet le défilement si les suggestions sont nombreuses */
    max-height: 300px; /* Limite la hauteur pour éviter que la liste dépasse */
    margin-top: 5px; /* Ajoute un peu d'espace entre la barre de recherche et les suggestions */
}
/* Style de base pour les éléments des suggestions */
.navbar-mobile .autocomplete-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--neutral-light); /* Utilisation d'une couleur neutre */
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease; /* Transition fluide pour tous les effets */
    background-color: var(--background-white); /* Fond blanc par défaut */
    border-radius: 5px; /* Coins arrondis */
    margin: 5px 0; /* Espacement entre les éléments */
    box-shadow: 0 2px 4px var(--shadow-light); /* Ombre légère */
}
.navbar-mobile .autocomplete-item:last-child {
    border-bottom: none; /* Pas de bordure pour le dernier élément */
}
/* Effet au survol */
.autocomplete-item:hover {
    background-color: var(--primary); /* Fond rouge primaire au survol */
    color: var(--tertiary); /* Texte blanc au survol */
    transform: translateY(-2px); /* Légère élévation */
    box-shadow: 0 4px 8px var(--shadow-medium); /* Ombre plus prononcée */
}
/* Style du lien à l'intérieur de l'élément */
.autocomplete-item a {
    color: var(--text-primary); /* Couleur du texte par défaut */
    text-decoration: none; /* Pas de soulignement */
    display: block; /* Le lien occupe tout l'espace du parent */
}
/* Style du texte secondaire (petit texte) */
.autocomplete-item small {
    color: var(--text-secondary); /* Couleur grise pour le texte secondaire */
    font-size: 12px; /* Taille plus petite */
}
/* Effet au survol pour le texte secondaire */
.autocomplete-item:hover small {
    color: var(--tertiary); /* Texte secondaire en blanc au survol */
}
/* Effet au survol pour le lien */
.autocomplete-item:hover a {
    color: var(--tertiary); /* Texte du lien en blanc au survol */
}
.navbar #mobileSearchInput:focus {
    border-color: #ddd !important;
}
/* === Top Header === */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050; /* au-dessus du contenu */
    height: 40px; /* adapte à ta vraie hauteur */
}
.top-header .country-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    padding: 4px;
    background-color: #f8f9fa;
    border-radius: 4px;
    min-width: auto; /* Largeur minimale pour afficher les noms */
    width: auto; /* S'adapte au contenu */
    white-space: nowrap; /* Empêche le retour à la ligne */
}
.top-header .form-select-sm {
    font-size: 0.8rem;
    padding: 0.1rem 1.5rem 0.1rem 0.25rem;
    cursor: pointer;
}
.top-header .location-icon {
    color: var(--primary);
    font-size: 1rem;
}
/* Styles pour le dropdown de langue dans le header supérieur */
.top-header .dropdown-menu {
    min-width: 180px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.top-header .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.top-header .dropdown-item:hover {
    background-color: var(--primary);
    color: white;
}
.top-header .flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
    flex-shrink: 0;
}
/* Alignement des éléments dans le dropdown */
.top-header .dropdown-toggle::after {
    margin-left: 0.5rem;
}
/* Ajustement pour l'icône globe */
.top-header .dropdown-toggle i {
    font-size: 0.9rem;
}
.content-first-section {
    padding-top: 110px;
}
@media (max-width: 340px) {
    /* Logo */
    .navbar .navbar-brand img {
        height: 30px;
        max-width: 100%;
    }
    .navbar .navbar-brand {
        margin-left: auto;
        margin-right: auto;
    }
    /* Barre de recherche */
    .navbar .search-bar-container {
        max-width: 200px;
    }
    .navbar .search-bar {
        padding: 6px 12px;
        font-size: 14px;
    }
    .navbar .search-bar-btn {
        width: 30px;
        height: 30px;
        right: 5px;
    }
    /* Boutons et icônes */
    .navbar .dropdown .btn {
        height: 30px;
        padding: 0 8px;
        font-size: 14px;
    }
    .user-btn {
        font-size: 16px;
        padding: 4px 8px;
    }
    /* Menu mobile */
    .navbar .navbar-toggler {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
    .navbar .collapse .navbar-nav {
        padding: 10px;
    }
    .navbar .collapse .dropdown-menu {
        width: 100%;
    }
    .navbar .collapse .dropdown-item {
        font-size: 14px;
    }
    /* Bouton "Publier" */
    .navbar .publish-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    /* Section de recherche mobile */
    .navbar-mobile .search-section input {
        padding: 6px 12px;
        font-size: 14px;
    }
    .navbar-mobile .search-section button {
        padding: 6px 12px;
        font-size: 14px;
    }
    /* Conteneur d'autocomplétion */
    .navbar-mobile .autocomplete-container {
        max-width: 100%;
        font-size: 14px;
    }
    .navbar-mobile .autocomplete-item {
        padding: 8px 12px;
    }
    /* Ajustements généraux */
    .navbar-mobile {
        height: 45px;
    }
    .navbar .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    .navbar .d-flex.align-items-center {
        gap: 5px;
    }
}

/* Desktop autocomplete container */
.autocomplete-container {
    position: absolute;
    z-index: 1050;
    display: none;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    max-height: 300px;
    margin-top: 5px;
}
.autocomplete-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--neutral-light);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: var(--background-white);
}
.autocomplete-item:last-child {
    border-bottom: none;
}
.autocomplete-item:hover {
    background-color: var(--primary);
    color: var(--tertiary);
}
.autocomplete-item a {
    color: var(--text-primary);
    text-decoration: none;
    display: block;
}
.autocomplete-item:hover a,
.autocomplete-item:hover small {
    color: var(--tertiary);
}