/**
 * Styles pour la barre de navigation (topbar)
 * Extrait de views/layouts/topbar.php pour respecter le principe MVC
 * 
 * Auteur: IT JD SOLUTIONS
 * Date: 10 janvier 2026
 */

/* Avatar utilisateur caché (fallback pour erreur image) */
.topbar__user-avatar-hidden {
    display: none;
    width: 37px;
    height: 37px;
    align-items: center;
    justify-content: center;
}

/* Avatar utilisateur (icône par défaut) */
.topbar__user-avatar {
    width: 37px;
    height: 37px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sélecteur de langue - TOUJOURS caché */
.topbar__lang-selector {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Force le masquage sur tous les breakpoints */
@media (max-width: 1400px) {
    .topbar__lang-selector {
        display: none !important;
        visibility: hidden !important;
    }
}

@media (max-width: 1024px) {
    .topbar__lang-selector {
        display: none !important;
        visibility: hidden !important;
    }
}

@media (max-width: 991px) {
    .topbar__lang-selector {
        display: none !important;
        visibility: hidden !important;
    }
}

@media (max-width: 768px) {
    .topbar__lang-selector {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Avatar avec initiales (base) */
.topbar__user-avatar-initials {
    width: 37px;
    height: 37px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Super Admin - Violet */
.topbar__user-avatar-initials--admin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Entreprise - Bleu */
.topbar__user-avatar-initials--company {
    background: linear-gradient(135deg, #0099FF 0%, #0088FF 100%);
    box-shadow: 0 4px 12px rgba(0, 153, 255, 0.3);
}

/* Client - Vert */
.topbar__user-avatar-initials--client {
    background: linear-gradient(135deg, #0ab39c 0%, #099885 100%);
    box-shadow: 0 4px 12px rgba(10, 179, 156, 0.3);
}

.topbar__user-initials {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
}

/* Correction de l'alignement de la barre de recherche */
.topbar__search-input {
    line-height: normal !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

/* Icône de recherche alignée verticalement */
.app-search span.search-widget-icon {
    top: 50% !important;
    transform: translateY(-50%) !important;
    line-height: 1 !important;
}

/* Icône de fermeture alignée */
.topbar__search-close {
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* Positionnement du header container */
.topbar__header-container {
    align-items: center;
    width: 100%;
}

/* Correction du positionnement du logo principal en responsive */
.navbar-brand-box.horizontal-logo {
    display: flex !important;
    align-items: center;
    flex-shrink: 0;
}

/* Amélioration du responsive pour le logo */
@media (max-width: 1024px) {
    .navbar-brand-box {
        margin-right: 8px;
        max-width: 160px;
    }
    
    .horizontal-logo {
        flex-shrink: 0;
    }
    
    /* Réduire légèrement la taille du logo */
    .navbar-brand-box .logo-lg img {
        max-height: 50px !important;
    }
}

@media (max-width: 767px) {
    .navbar-brand-box {
        width: auto !important;
        margin-right: 4px;
        max-width: 140px;
    }
    
    /* Logo plus petit sur mobile */
    .navbar-brand-box .logo-sm img {
        max-height: 35px !important;
    }
    
    .navbar-brand-box .logo-lg img {
        max-height: 40px !important;
    }
    
    /* Ajuster la position de l'icône de recherche mobile */
    .d-md-none.topbar-head-dropdown .btn-icon {
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    .navbar-brand-box {
        width: auto !important;
        margin-right: 4px;
        max-width: 140px;
    }
    
    /* Logo plus petit sur mobile */
    .navbar-brand-box .logo-sm img {
        max-height: 35px !important;
    }
    
    .navbar-brand-box .logo-lg img {
        max-height: 40px !important;
    }
}

@media (max-width: 576px) {
    .navbar-brand-box {
        max-width: 120px;
    }
}

/* Amélioration du positionnement du hamburger menu */
@media (max-width: 1024px) {
    .topnav-hamburger {
        margin-left: 4px;
        margin-right: 8px;
    }
}

/* Ajustement de l'espacement quand pas de logo (entreprises/admins) */
.topbar__header-container > .topnav-hamburger:first-child {
    margin-left: 0;
}
