/*
Topbar Accueil Style - Spécifique à la page d'accueil
Version avec logo à gauche et bouton "Créer un compte" à droite
*/

.topbar-accueil-custom {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent; 
     /* background-color: #f7f7f7;*/
    box-sizing: border-box;
}

.navbar-nav_wrap-accueil {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1280px;
    margin: auto;
    /* padding: 20px 30px; */
    box-sizing: border-box;
}

.navbar__inner-accueil {
    display: flex;
    justify-content: space-between; /* Pousse les blocs aux extrémités */
    align-items: center;
    width: 100%;
    padding: 10px 20px;
}

/* NOUVEAU CONTENEUR pour le logo et la nav */
.navbar-left-content-wrap {
    display: flex;
    align-items: center;
    gap: 30px; /* Espace entre le logo et le bloc de navigation */
}

.nav_logo-accueil {
    display: flex;
    align-items: center;
}

.header__logo-accueil img {
    height: 50px;
    width: auto;
    object-fit: contain;
}
.button-container_cnx_topbar {
    display: flex;
    justify-content: center; /* Center the buttons horizontally */
    gap: 10px; /* Space between the buttons */
}

.btn-creation-compte-topbar-accueil {
    background-color: transparent;
    border: 2px solid #a4a4a4;
    color: #c00000;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    min-width: 150px;
    text-align: center;
    display: inline-block;
}

.btn-creation-compte-topbar-accueil:hover {
    background-color: #c00000;
    color: white !important;
    transform: translateY(-3px);
    text-decoration:none !important;
}

/* User Connected Zone */
.user-connected-zone {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid #e9ecef;
    position: relative;
}

.user-company-logo {
    height: 40px;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-company-logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}
.achat-pack-zone {

   display: flex;
    align-items: center;
    gap: 15px;
    background-color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid #e9ecef;
    position: relative;
   
}
.achat-pack-btn{
     max-height: 50px;
    max-width: 100%;

}
.topbarUserAvatarToggle,
#topbarUserAvatarToggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #c00000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.2s ease;
}

.topbarUserAvatarToggle:hover,
#topbarUserAvatarToggle:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar-initial {
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
}

.topbarUserDropdown, #topbarUserDropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 300px;
    min-height: 200px;
    z-index: 1050;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.topbarUserDropdown.show, #topbarUserDropdown.show {
    display: flex !important;
    opacity: 1;
    transform: translateY(0);
}

.topbarDropdownHeader {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.topbarUserInfo {
    font-size: 0.9em;
    color: #555;
    text-align: center;
    margin-bottom: 10px;
}

.topbarUserImage {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #c00000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-initial {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
}

.topbarGreetingDiv {
    text-align: center;
    font-size: 1em;
    color: #333;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    width: 100%;
}

.topbarDropdownButtons {
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding: 10px;
}

.btn-topbarAction {
    background-color: transparent;
    border: 2px solid #a4a4a4;
    color: #c00000;
    padding: 8px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    min-width: 100px;
    text-align: center;
}

.btn-topbarAction:hover {
    background-color: #c00000;
    color: white !important;
    transform: translateY(-3px);
}

/* Suppression des marges du bloc de navigation, maintenant gérées par le wrapper */
.nav-location-selector-accueil {
    display: flex;
    align-items: center;
}

/* Styles du menu burger pour mobile */
.burger-menu-toggle {
    display: none; /* Cacher par défaut sur desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
}

.burger-bar {
    width: 100%;
    height: 3px;
    background-color: #c00000;
    transition: all 0.3s ease;
}

.burger-menu-toggle.active .burger-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.burger-menu-toggle.active .burger-bar:nth-child(2) {
    opacity: 0;
}
.burger-menu-toggle.active .burger-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-links-mobile-wrap {
    display: flex; /* Affiché en flex par défaut pour desktop */
    align-items: center;
}

/* Styles pour les selects et spans */
.nav-location-accueil-span {
    color: #c00000;
    font-weight: bold;
}

/* MODIFICATION : NOUVEAUX STYLES POUR SELECT2 */
.select2-container--default .select2-selection--single {
    height: auto !important;
    border: none !important;
    background-color: transparent !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #6c757d;
    /* font-weight: bold; */
    font-size: 1em;
    padding: 0;
    line-height: normal;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    width: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    right: 0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #c00000 transparent transparent transparent !important;
    border-width: 5px 4px 0 4px !important;
    position: static;
}


/* Règle pour la bordure entre les selects */
#pays_select + .select2-container--default .select2-selection--single {
    /* border-right: 1px solid #ccc !important; */
    padding-right: 15px !important;
    margin-right: 10px;
}


#search-departement + .select2-container--default .select2-selection--single {
    /* border-right: 1px solid #ccc !important; */
    padding-right: 15px !important;
    margin-right: 10px;
}


/* Règle pour la bordure entre le span et le select pays */
#pays_select + .select2-container--default {
    margin-left: 5px; /* Espace entre le span 'Mitih -' et le select pays */
}

/* Responsive Design */
/* Tablette */
@media (max-width: 991px) {
    .navbar__inner-accueil {
        padding: 10px 15px;
    }
    .header__logo-accueil img {
        height: 45px;
    }
    .nav-location-selector-accueil {
        margin-left: 30px; /* Espace réduit pour tablette */
    }
}

/* Mobile */
@media (max-width: 767px) {
    .navbar__inner-accueil {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .nav-location-selector-accueil {
        margin-left: 0;
        position: relative;
    }

    .burger-menu-toggle {
        display: flex;
        order: 2;
    }

    .nav-links-mobile-wrap {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        padding: 15px;
        z-index: 999;
    }

    .nav-links-mobile-wrap.show {
        display: flex;
    }

    .nav-links-mobile-wrap > * {
        width: 100%;
        margin: 10px 0;
    }

    .nav-location-accueil-span {
        display: block;
    }

    /* Styles Select2 pour mobile */
    .select2-container--default .select2-selection--single {
        border: 1px solid #ccc !important;
        border-radius: 5px;
    }

    #pays_select + .select2-container--default .select2-selection--single {
        padding-right: 15px !important;
        margin-right: 0;
    }
     #search-departement + .select2-container--default .select2-selection--single {
        padding-right: 15px !important;
        margin-right: 0;
    }
}


/* Style for the button container */
.form-login_btn_topbar {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 0 auto;
    max-width: 350px;
}

/* Base styles for both buttons */
.form-login_btn_topbar button {
    height: 40px;
    padding: 9px 12px;
    font-size: 0.95em;
    font-weight: bold;
    color: #c00000;
    cursor: pointer; /* This line makes the cursor a pointer over each button */
    background-color: transparent;
    border: 2px solid #dee2e6;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
    min-width: 150px;
    white-space: nowrap;
}

/* Styles for the "Se connecter" button (the left one) */
.form-login_btn_topbar #confirm_login {
    border-radius: 25px 0 0 25px;
    border-right: none;
}

/* Styles for the "Créer un compte" button (the right one) */
.form-login_btn_topbar #create_account {
    border-radius: 0 25px 25px 0;
}

/* Separator between the buttons */
.form-login_btn_topbar #confirm_login::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 80%;
    background-color: #a4a4a4;
}

/* Hover effects */
.form-login_btn_topbar button:hover {
    background-color: #c00000;
    color: white !important;
}

/* Adjust the hover effect for the separator color */
.form-login_btn_topbar button:hover#confirm_login::after {
    background-color: white;
}

/* Responsive Design pour la topbar_accueil */
@media (max-width: 768px) {
    .navbar-nav_wrap-accueil {
        padding: 15px 20px;
    }
    .header__logo-accueil img {
        height: 40px;
    }
    .btn-creation-compte-topbar-accueil {
        padding: 8px 15px;
        font-size: 0.9em;
        min-width: 120px;
    }
    .topbarUserAvatarToggle,
    #topbarUserAvatarToggle { /* <--- ID AND CLASS SELECTORS CHANGED */
        width: 35px;
        height: 35px;
    }
    .user-avatar-initial {
        font-size: 16px;
    }
    .user-company-logo {
        height: 35px;
    }
    /* Responsive adjustment for dropdown on smaller screens */
    .topbarUserDropdown,
    #topbarUserDropdown { /* <--- ID AND CLASS SELECTORS CHANGED */
        min-width: 160px;
        max-width: calc(100vw - 40px); /* Ensures it doesn't overflow screen */
       /* left: 50%;  */
        right: auto; /* Remove right alignment for mobile centering */
        transform: translateX(-50%) translateY(-10px); /* Center and maintain animation */
    }
    .topbarUserDropdown.show,
    #topbarUserDropdown.show { /* <--- ID AND CLASS SELECTORS CHANGED */
        transform: translateX(-50%) translateY(0);
    }
}

/* Container for the suggestions list */
#nav-search-toggle-container {
    position: relative; /* This is crucial for positioning the suggestions list */
}

/* Style for the suggestions list (ul) */
#suggestionsServices {
    list-style-type: none; /* Removes bullet points */
    padding: 0;
    margin: 0;
    position: absolute; /* Positions the list relative to its parent container */
    top: 100%; /* Places the list right below the input field */
    left: 0;
    width: 100%; /* Makes the list the same width as the input */
    max-height: 250px; /* Limits the height and adds a scrollbar if needed */
    overflow-y: auto;
    background-color: #fff; /* White background */
    border: 1px solid #ccc; /* Subtle border */
    border-top: none; /* Removes the top border to visually connect it to the input */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Adds a soft shadow for depth */
    z-index: 1000; /* Ensures the list appears on top of other elements */
    border-radius: 0 0 4px 4px; /* Rounds the bottom corners */
    display: none; /* Initially hide the list */
}

/* Style for each suggestion item (li) */
#suggestionsServices li {
    padding: 10px 15px; /* Adds space inside each item */
    cursor: pointer; /* Changes the cursor to a hand on hover */
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease; /* Smooth transition on hover */
}

/* Hover effect for suggestion items */
#suggestionsServices li:hover {
    background-color: #f0f0f0; /* Light gray background on hover */
}

/* Style for when a suggestion is "active" or "selected" */
#suggestionsServices li.active,
#suggestionsServices li:focus {
    background-color: #e6f7ff;
    font-weight: bold;
    outline: none;
}

@media (max-width: 480px) {
    .navbar-nav_wrap-accueil {
        padding: 10px 15px;
    }
    .header__logo-accueil img {
        height: 35px;
    }
    .btn-creation-compte-topbar-accueil {
        padding: 8px 12px;
        font-size: 0.8em;
        min-width: unset;
    }
    /* Potentially further adjustments for very small screens */
    .topbarUserDropdown,
    #topbarUserDropdown { /* <--- ID AND CLASS SELECTORS CHANGED */
        min-width: unset;
        width: 50vw;
    }
}


.navbar-nav_bottom {
    display: flex
;
    justify-content: space-around;
    align-items: center;
    /* background-color: #ffffff; */
    /* border-top: 1px solid #e9ecef; */
    padding: 10px 0;
    /* box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); */
}

.navbar-nav_bottom ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px; /* Space between menu items */
}

.navbar-nav_bottom .nav-item-accueil {
    margin: 0 10px;
}

.navbar-nav_bottom .nav-link-accueil {
    color: #333;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar-nav_bottom .nav-link-accueil:hover {
    color: #c00000 !important; /* Hover color */
}

.navbar-nav_bottom .nav-link-accueil img {
    max-height: 20px;
    margin-right: 5px;
    vertical-align: middle;
}








