/* Module privilegestatus */
#privilege-status-block {
    display: none;   /* JS active display:block après positionnement */
    position: absolute;
    top: 100%;
    left: -50px;
    z-index: 50;
    text-align: left;
    background: #fff;
}

.priv-name {
    display: none;          /* Caché sur desktop (thème affiche déjà le nom) */
    font-weight: bold;
    white-space: nowrap;
    line-height: 1.6;
}

.priv-link {
    display: block;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.6;
}

.priv-link:hover {
    color: #0066CC !important;
    text-decoration: underline;
}

/* Barre de recherche : décalage desktop uniquement */
@media (min-width: 768px) {
    #header #search_block_top {
        width: 400px !important;
        transform: translateX(calc(-50% - 40px)) !important;
    }
}

/* Écrans intermédiaires ≤1500px : bloc privilège inline */
@media (max-width: 1500px) and (min-width: 768px) {
    #header_user_info {
        top: -28px;
    }
    #privilege-status-block {
        position: static !important;
        display: inline;
        background: transparent;
    }
    .priv-link {
        display: inline;
    }
}

/* Mobile */
@media (max-width: 767px) {
    /* Nom du client visible sur mobile (le thème ne l'affiche pas dans le header) */
    .priv-name {
        display: block;
    }

    #privilege-status-block {
        position: static !important;
        left: auto !important;
        top: auto !important;
        background: transparent !important;
        text-align: center !important;
        width: 100%;
        box-sizing: border-box;
        padding: 2px 8px 4px;
        font-size: 13px;
    }

    /* Annuler le padding-top du slider : c'était la cause du gap */
    #top_column {
        padding-top: 0 !important;
    }

    /* Recherche */
    #header #search_block_top {
        transform: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
        left: 0 !important;
    }

    #header #search_block_top #search_query_top {
        width: calc(100% - 52px) !important;
        height: 44px !important;
        box-sizing: border-box !important;
    }

    #header #search_block_top .btn.button-search {
        top: 0 !important;
        bottom: 0 !important;
        height: auto !important;
        width: 50px !important;
    }
}
