/**
 * Styles du header NET-DIRECT (bandeau, menu, loader, compteur).
 * Chargé globalement depuis header.php.
 */

/* Header ligne 1 - fond bleu */
.header_top { 
    background: #1a5276; 
    color: #fff; 
    padding: 4px; 
    font-size: 13px; 
    width: 100%;
    min-height: auto;
}
/* Réduire les marges latérales du header */
#default_header .header_top .container,
#default_header .header_bottom .container {
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
}
@media (min-width: 768px) {
    #default_header .header_top .container,
    #default_header .header_bottom .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}
.header_top a { color: #fff; text-decoration: none; opacity: .9; }
.header_top a:hover { color: #fff; opacity: 1; }

/* Compactage des informations de contact */
.header_contact_info ul { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px 15px; 
}
.header_contact_info ul li { 
    display: inline-flex; 
    align-items: center; 
    white-space: nowrap;
}
@media (max-width: 991px) {
    .header_contact_info ul { gap: 6px 12px; }
}
@media (max-width: 767px) {
    .header_top .row {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
    .header_top .row .col-md-9 { min-width: 0; }
    .header_contact_info ul { flex-direction: row; flex-wrap: wrap; gap: 4px 10px; text-align: left; }
    .header_contact_info ul li { white-space: normal; }
}
@media (max-width: 576px) {
    .header_top .row { margin-left: -4px; margin-right: -4px; }
    .header_top [class*="col-"] { padding-left: 4px; padding-right: 4px; }
    .header_contact_info ul { gap: 4px 8px; font-size: 11px; }
    .header_contact_info ul li span { font-size: 11px; }
}

.header_contact_info ul li i { margin-right: 4px; }

/* Partie droite de la ligne 1 */
.header_top_right { 
    display: flex; 
    align-items: center; 
    justify-content: flex-end; 
    flex-wrap: wrap; 
    gap: 8px; 
}
.social_icon ul { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    display: flex; 
    gap: 4px; 
}
.social_icon ul li a { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    width: 22px; 
    height: 22px; 
    border-radius: 50%; 
    color: #fff; 
    font-size: 12px;
}
/* Couleurs officielles des réseaux sociaux */
#default_header .header_top .social_icon ul li a.fa-facebook { 
    background: #1877F2 !important; 
}
#default_header .header_top .social_icon ul li a.fa-facebook:hover { 
    background: #166FE5 !important; 
    color: #fff; 
}
#default_header .header_top .social_icon ul li a.fa-whatsapp { 
    background: #25D366 !important; 
}
#default_header .header_top .social_icon ul li a.fa-whatsapp:hover { 
    background: #20BD5A !important; 
    color: #fff; 
}
.social_icon ul li a:hover { color: #fff; }

/* Dropdown langue (drapeaux uniquement) */
.language-dropdown {
    position: relative;
    display: inline-block;
}
.lang-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.lang-dropdown-toggle .lang-flag-svg {
    width: 24px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
}
.language-dropdown .lang-flag-fr { display: inline-block; }
.language-dropdown .lang-flag-en { display: none; }
.language-dropdown.lang-en .lang-flag-fr { display: none; }
.language-dropdown.lang-en .lang-flag-en { display: inline-block; }
.lang-dropdown-menu .lang-option .lang-flag-svg {
    width: 20px;
    height: 14px;
    margin-right: 8px;
    vertical-align: middle;
}
.lang-dropdown-toggle:hover {
    background: rgba(255,255,255,.25);
    border-color: rgba(255,255,255,.5);
    color: #fff;
}
.lang-dropdown-toggle .fa-chevron-down {
    font-size: 12px;
    opacity: .9;
    transition: transform .2s;
}
.language-dropdown.is-open .lang-dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}
.lang-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin: 4px 0 0;
    padding: 4px 0;
    min-width: 140px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
    list-style: none;
    z-index: 1001;
}
.lang-dropdown-menu.is-open {
    display: block;
}
.lang-dropdown-menu .lang-option {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}
.lang-dropdown-menu .lang-option:hover {
    background: #f0f0f0;
    color: #1a5276;
}

/* Header ligne 2 - fixe au scroll avec transition douce */
.header-bottom-spacer {
    display: none;
    height: 0;
}
.header_bottom { 
    background: #e3f2fd !important; 
    box-shadow: 0 2px 8px rgba(0,0,0,.08); 
    position: relative; 
    z-index: 9999; 
    width: 100%;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
#default_header .header_bottom.is-stuck {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
#default_header .header_bottom.is-stuck + .header-bottom-spacer {
    display: block;
}
/* Bootstrap navbar dans le header */
#default_header .header_bottom .navbar {
    padding-top: 0;
    padding-bottom: 0;
    background: #e3f2fd !important;
    border: none;
}
#default_header .header_bottom .navbar .container-fluid {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}
#default_header .header_bottom .navbar-brand {
    padding-top: 0px;
    padding-bottom: 0px;
}
#default_header .header_bottom .navbar-brand img {
    max-height: 50px;
    width: auto;
    height: auto;
}
#default_header .header_bottom .navbar-nav .nav-link {
    color: #333;
    font-weight: 600;
    font-size: 14px;
    padding: 16px 12px;
}
#default_header .header_bottom .navbar-nav .nav-link:hover {
    color: #1a5276;
}
#default_header .header_bottom .navbar-nav .nav-link.active {
    color: #1a5276;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid #1a5276;
    padding-bottom: 2px;
}
#default_header .header_bottom .navbar-nav .dropdown-menu {
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0,0,0,.1);
    border: 1px solid rgba(0,0,0,.08);
}
#default_header .header_bottom .navbar-nav .dropdown-item:hover {
    background: #f5f5f5;
    color: #1a5276;
}
/* Menu à gauche, recherche à droite */
#default_header .header_bottom .navbar-collapse {
    justify-content: flex-start;
}
/* Menu mobile : overlay au-dessus du contenu (ne pousse jamais le slide) */
@media (max-width: 991px) {
    #default_header .header_bottom .navbar {
        position: relative;
    }
    /* Toujours hors flux : ni l’animation ni l’état ouvert ne poussent le contenu */
    #default_header .header_bottom .navbar-collapse.collapsing,
    #default_header .header_bottom .navbar-collapse.show {
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        z-index: 1050;
        max-height: 80vh;
        overflow-y: auto;
        margin-top: 0;
    }
    #default_header .header_bottom .navbar-collapse.collapsing {
        transition: none;
    }
}
#default_header .header_bottom .navbar-nav.mr-auto {
    margin-right: auto;
}
#default_header .header_bottom .navbar .form-inline .btn-outline-primary {
    border-color: #1a5276;
    color: #1a5276;
    margin-top: 0px;
    font-size: 13px;
    height: 32px;
    line-height: 0;
    min-width: auto;
    border-radius: 50%;
}
#default_header .header_bottom .navbar .form-inline .btn-outline-primary:hover {
    background: #1a5276;
    color: #fff;
    border-color: #1a5276;
}
#default_header .header_bottom .navbar .form-inline .btn-search-icon {
    padding: 6px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#default_header .header_bottom .navbar .form-inline .btn-search-icon svg {
    display: block;
}
#default_header .header_bottom .navbar .form-inline .form-control {
    padding: 4px 10px;
    font-size: 13px;
    height: 32px;
    width: 150px;
    border-radius: 10px;
}
.logo a { display: inline-block; }
.logo img { 
    max-height: 50px; 
    width: auto; 
    display: block; 
    margin: 8px 0;
}
.menu_side { 
    display: flex; 
    align-items: center; 
    justify-content: flex-end; 
    flex-wrap: wrap;
    position: relative; 
    gap: 0;
}
#navbar_menu { margin: 0; padding: 0; flex: 1; }
#navbar_menu .first-ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: center;
}
#navbar_menu .first-ul > li > a { 
    display: block; 
    padding: 16px 12px; 
    color: #333; 
    font-weight: 600; 
    font-size: 14px; 
    text-decoration: none; 
}
#navbar_menu .first-ul > li > a:hover { color: #28a745; }
#navbar_menu .first-ul > li { position: relative; }
#navbar_menu .first-ul > li.has-sub > ul { 
    display: none; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    min-width: 200px; 
    background: #fff; 
    box-shadow: 0 8px 16px rgba(0,0,0,.1); 
    padding: 5px 0; 
    border-radius: 4px; 
    z-index: 1000; 
    list-style: none; 
}
/* Dropdown fermé par défaut ; s'ouvre uniquement au survol du menu header */
#default_header .header_bottom .menu_side:hover .first-ul > li.has-sub:hover > ul,
#default_header .header_bottom .menu_side:hover .first-ul > li.has-sub > ul:hover {
    display: block;
}
#navbar_menu .first-ul > li > ul li a { 
    display: block; 
    padding: 8px 16px; 
    color: #444; 
    font-size: 13px; 
    text-decoration: none; 
}
#navbar_menu .first-ul > li > ul li a:hover { background: #f5f5f5; color: #28a745; }

/* Loader */
.bg_load {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Compteur de visite - position fixe en bas à droite, au-dessus du bord */
#visit-counter { 
    position: fixed; 
    bottom: 20px; 
    right: 20px; 
    left: auto;
    background: rgba(255,255,255,.95); 
    padding: 10px 16px; 
    border-radius: 999px; 
    box-shadow: 0 4px 16px rgba(0,0,0,.18); 
    z-index: 10000; 
    font-size: 13px; 
    font-weight: 600; 
    color: #333;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    pointer-events: auto;
}
#visit-counter i {
    margin-right: 6px;
    opacity: 0.9;
}

/* Bouton Back to top - bas à gauche */
#back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1a5276;
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(26, 82, 118, 0.4);
    z-index: 9998;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease, background-color 0.2s ease;
}
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
#back-to-top:hover {
    background: #154360;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 82, 118, 0.5);
}
#back-to-top svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
@media (max-width: 576px) {
    #back-to-top { width: 44px; height: 44px; bottom: 18px; left: 18px; }
    #back-to-top svg { width: 20px; height: 20px; }
}

/* Bouton WhatsApp flottant - au-dessus du compteur, bas à droite */
.whatsapp-float {
    position: fixed;
    width: 56px;
    height: 56px;
    bottom: 72px;
    right: 20px;
    left: auto;
    background: #25D366 !important;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4) !important;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

.whatsapp-float:hover {
    background-color: #20BD5A !important;
    transform: scale(1.08);
    color: #fff;
}

.whatsapp-float i {
    display: block;
    line-height: 1;
    margin: 0;
}

/* Responsive - boutons flottants (éviter chevauchement sur petit écran) */
@media (max-width: 480px) {
    #visit-counter {
        bottom: 18px;
        right: 18px;
        padding: 8px 12px;
        font-size: 12px;
    }
    .whatsapp-float {
        bottom: 68px;
        right: 18px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    #back-to-top {
        bottom: 18px;
        left: 18px;
    }
}

/* Responsive - toutes tailles d'écran */

/* Très petit écran (mobile portrait) */
@media (max-width: 480px) {
    #default_header .header_top .container,
    #default_header .header_bottom .container {
        padding-left: 8px;
        padding-right: 8px;
    }
    .header_top { font-size: 12px; padding: 2px 0; }
    .header_contact_info ul { gap: 4px 8px; }
    .header_contact_info ul li span { font-size: 11px; }
    .logo img { max-height: 40px; margin: 6px 0; }
    #navbar_menu .first-ul > li > a { padding: 12px 10px; font-size: 13px; }
    .search_icon ul li a { padding: 12px 6px; font-size: 14px; }
    .language-flags .lang-flag { font-size: 18px; }
    .social_icon ul li a { width: 20px; height: 20px; font-size: 11px; }
}

/* Mobile */
@media (max-width: 576px) {
    #default_header .header_top .container,
    #default_header .header_bottom .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    .header_top .row { margin-left: -5px; margin-right: -5px; }
    .header_top [class*="col-"] { padding-left: 5px; padding-right: 5px; }
    .header_bottom .row { margin-left: -5px; margin-right: -5px; }
    .header_bottom [class*="col-"] { padding-left: 5px; padding-right: 5px; }
}

/* Tablette portrait / petit desktop */
@media (max-width: 767px) {
    .header_top_right { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; }
    .header_top .col-md-5.text-right { text-align: center !important; }
    .header_top .col-md-9 { text-align: left !important; }
    .logo { text-align: center; }
    .logo img { margin: 10px auto; max-height: 45px; }
    .menu_side { flex-direction: column; width: 100%; justify-content: center; }
    #navbar_menu { width: 100%; }
    #navbar_menu .first-ul { flex-direction: column; width: 100%; }
    #navbar_menu .first-ul > li { width: 100%; border-bottom: 1px solid #eee; }
    #navbar_menu .first-ul > li > a { padding: 12px 15px; }
    .search_icon { margin-left: 0; margin-top: 5px; }
    #navbar_menu .first-ul > li.has-sub > ul { position: static; display: none; padding-left: 15px; background: #f8f9fa; margin: 0; border-radius: 0; box-shadow: none; }
    #navbar_menu .first-ul > li.has-sub.is-open > ul,
    #navbar_menu .first-ul > li.has-sub.active > ul { display: block; }
    #navbar_menu .first-ul > li.has-sub > ul li a { padding: 10px 15px; }
}

/* Tablette paysage */
@media (max-width: 991px) {
    .header_contact_info ul { justify-content: center; }
    .header_top .col-md-5 { text-align: center !important; }
    .header_top_right { justify-content: center; }
    .logo { text-align: center; }
    .menu_side { justify-content: center; }
    #navbar_menu .first-ul { justify-content: center; flex-wrap: wrap; }
    #navbar_menu .first-ul > li > a { padding: 14px 10px; font-size: 13px; }
}

/* Desktop moyen */
@media (min-width: 992px) and (max-width: 1199px) {
    #navbar_menu .first-ul > li > a { padding: 14px 10px; font-size: 13px; }
    .logo img { max-height: 48px; }
}

/* Grand écran */
@media (min-width: 1200px) {
    #default_header .header_top .container,
    #default_header .header_bottom .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Section "Ils nous font confiance" - Slider logos animé */
.trust-section .trust-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a5276;
    margin-bottom: 10px;
    text-transform: none;
}
.trust-logos-slider {
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    padding: 10px 0;
}
.trust-logos-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: trust-slide 30s linear infinite;
    will-change: transform;
}
.trust-logos-track:hover {
    animation-play-state: paused;
}
.trust-logo-item {
    flex: 0 0 auto;
    width: 180px;
    margin: 0 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    border: 1px solid rgba(0,0,0,.06);
    transition: transform .3s ease, box-shadow .3s ease;
}
.trust-logo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 28px rgba(0,0,0,.12);
}
.trust-logo-item img {
    max-width: 100%;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
@keyframes trust-slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@media (max-width: 768px) {
    .trust-section .trust-title { font-size: 22px; }
    .trust-logo-item { width: 140px; margin: 0 15px; padding: 15px 10px; }
    .trust-logo-item img { max-height: 50px; }
}
