/* =========================================================
   Header Vaults — dimensions identiques à Assets
   ========================================================= */

.vaults-topbar,
.vaults-topbar-actions,
.vaults-header-menu-wrapper {
    overflow: visible;
}

.vaults-topbar {
    min-height: 72px;
    height: 72px;

    padding: 12px 30px;

    gap: 20px;

    background: rgba(255, 255, 255, 0.96);

    border-bottom: 1px solid #e4e9f2;

    backdrop-filter: blur(12px);
}

.vaults-topbar-left,
.vaults-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vaults-topbar-actions {
    position: relative;
    gap: 14px;
}

/* =========================================================
   Burger
   ========================================================= */

.vaults-icon-button {
    appearance: none;
    -webkit-appearance: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;
    min-width: 54px;
    flex: 0 0 54px;

    padding: 0;

    border: 1px solid #dde5f1;
    border-radius: 16px;

    background: #ffffff;
    color: #172033;

    cursor: pointer;
}

.vaults-icon-button:hover {
    background: #f7f9fd;
    border-color: #cdd8e8;
}

.vaults-burger {
    width: 20px;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vaults-burger > span {
    width: 20px;
    height: 2px;

    display: block;

    border-radius: 999px;

    background: #1c2d50;
}

/* =========================================================
   Recherche identique à Assets
   ========================================================= */

.vaults-global-search {
    position: relative;

    width: min(100%, 775px);
    height: 54px;
    min-height: 54px;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 0 13px;

    border: 1px solid #dbe3f0;
    border-radius: 16px;

    background: #ffffff;
}

.vaults-global-search input {
    min-width: 0;
    flex: 1;

    border: 0;
    outline: 0;

    background: transparent;
    color: #26324a;

    font-size: 16px;
}

.vaults-global-search kbd {
    padding: 4px 9px;

    border: 1px solid #dbe3f0;
    border-radius: 7px;

    background: #f8fafc;
    color: #52617a;

    font-size: 12px;
}

/* =========================================================
   Boutons applications et notifications
   ========================================================= */

.vaults-header-menu-wrapper {
    position: relative;

    display: inline-flex;
    align-items: center;
}

.vaults-header-action-button {
    appearance: none;
    -webkit-appearance: none;

    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;
    min-width: 54px;
    flex: 0 0 54px;

    padding: 0;

    border: 1px solid #dde5f1;
    border-radius: 16px;

    background: #ffffff;
    color: #172033;

    font: inherit;
    cursor: pointer;
}

.vaults-header-action-button:hover,
.vaults-header-action-button[aria-expanded="true"] {
    border-color: #cbd7ea;
    background: #f5f8fe;
}

.vaults-header-action-button svg {
    width: 22px;
    height: 22px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =========================================================
   Neuf points
   ========================================================= */

.vaults-nine-dots {
    width: 20px;
    height: 20px;

    display: grid;

    grid-template-columns:
        repeat(3, 4px);

    grid-template-rows:
        repeat(3, 4px);

    gap: 4px;

    align-content: center;
    justify-content: center;
}

.vaults-nine-dots > span {
    width: 4px;
    height: 4px;

    display: block;

    border-radius: 1px;

    background: #1d2e51;
}

/* =========================================================
   Avatar
   ========================================================= */

.vaults-user-avatar {
    appearance: none;
    -webkit-appearance: none;

    width: 50px;
    height: 50px;
    min-width: 50px;
    flex: 0 0 50px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin: 0;

    border: 0;
    border-radius: 50%;

    background: #eef2ff;
    color: #3157d5;

    font: inherit;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;

    cursor: pointer;
}

.vaults-user-avatar:hover,
.vaults-user-avatar[aria-expanded="true"] {
    background: #e1e8ff;
}

/* =========================================================
   Panneaux déroulants
   ========================================================= */

.vaults-dropdown-panel {
    position: absolute;

    top: calc(100% + 12px);
    right: 0;

    z-index: 100000;

    overflow: hidden;

    border: 1px solid #dfe6f1;
    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.18),
        0 4px 14px rgba(15, 23, 42, 0.08);
}

.vaults-dropdown-panel[hidden] {
    display: none !important;
}

.vaults-dropdown-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    padding: 20px 20px 14px;
}

.vaults-dropdown-header strong {
    display: block;

    color: #172033;

    font-size: 17px;
    line-height: 1.25;
}

.vaults-dropdown-header span {
    display: block;

    margin-top: 3px;

    color: #6f7a8f;
    font-size: 13px;
}

.vaults-dropdown-close {
    appearance: none;
    -webkit-appearance: none;

    width: 34px;
    height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 10px;

    background: transparent;
    color: #6f7a8f;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}

.vaults-dropdown-close:hover {
    background: #f3f5f9;
    color: #172033;
}

/* =========================================================
   Applications Findzle
   ========================================================= */

.vaults-app-launcher-menu {
    width: 520px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 100px);
}

.vaults-app-launcher-search {
    padding: 0 20px 16px;
}

.vaults-app-launcher-search input {
    width: 100%;
    height: 44px;

    padding: 0 14px;

    border: 1px solid #dbe3f0;
    border-radius: 11px;

    background: #f8faff;
    color: #172033;

    font: inherit;
    outline: none;
}

.vaults-app-launcher-search input:focus {
    border-color: #3157d5;

    background: #ffffff;

    box-shadow:
        0 0 0 3px
        rgba(49, 87, 213, 0.12);
}

.vaults-app-launcher-content {
    max-height: 560px;

    padding: 0 14px 18px;

    overflow-y: auto;
}

.vaults-app-launcher-section {
    padding: 4px 0 16px;
}

.vaults-app-launcher-section
+ .vaults-app-launcher-section {
    padding-top: 16px;

    border-top: 1px solid #e8edf5;
}

.vaults-app-launcher-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 5px 10px;
}

.vaults-app-launcher-section-header h3 {
    margin: 0;

    color: #202b41;

    font-size: 13px;
    font-weight: 800;
}

.vaults-app-launcher-section-header span {
    min-width: 22px;
    height: 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 6px;

    border-radius: 999px;

    background: #f0f3f8;
    color: #6f798c;

    font-size: 12px;
    font-weight: 700;
}

.vaults-app-launcher-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 8px;
}

.vaults-app-launcher-item {
    position: relative;

    min-width: 0;
    min-height: 112px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    padding: 14px 8px 10px;

    border: 1px solid transparent;
    border-radius: 14px;

    color: #25304a;

    text-align: center;
    text-decoration: none;
}

.vaults-app-launcher-item:hover {
    border-color: #dce5ff;
    background: #f4f7ff;
}

.vaults-app-launcher-icon {
    width: 46px;
    height: 46px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 8px;

    border-radius: 13px;

    background: #edf2ff;
    color: #3157d5;
}

.vaults-app-launcher-name {
    width: 100%;

    display: block;
    overflow: hidden;

    color: #25304a;

    font-size: 12px;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   Notifications
   ========================================================= */

.vaults-notification-menu {
    width: 380px;
    max-width: calc(100vw - 24px);
}

.vaults-notification-list {
    max-height: 430px;

    overflow-y: auto;
}

.vaults-dropdown-empty {
    min-height: 220px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 24px;

    color: #6f7a8f;
    text-align: center;
}

.vaults-dropdown-empty-icon {
    display: block;

    margin-bottom: 10px;

    font-size: 30px;
}

.vaults-dropdown-empty strong {
    color: #25304a;
    font-size: 14px;
}

.vaults-dropdown-empty p {
    margin: 5px 0 0;

    color: #7c879a;
    font-size: 13px;
}

.vaults-dropdown-footer {
    padding: 13px 18px;

    border-top: 1px solid #e7ebf2;

    background: #fafbfe;

    text-align: center;
}

.vaults-dropdown-footer a {
    color: #3157d5;

    font-size: 13px;
    font-weight: 700;
}

/* =========================================================
   Menu utilisateur
   ========================================================= */

.vaults-user-menu {
    width: 330px;
    max-width: calc(100vw - 24px);
}

.vaults-user-menu-profile {
    display: flex;
    align-items: center;
    gap: 13px;

    padding: 20px;
}

.vaults-user-menu-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #eef2ff;
    color: #3157d5;

    font-size: 17px;
    font-weight: 800;
}

.vaults-user-menu-identity {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.vaults-user-menu-identity strong,
.vaults-user-menu-identity span,
.vaults-user-menu-identity small {
    display: block;
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.vaults-user-menu-identity strong {
    color: #202b41;
    font-size: 14px;
}

.vaults-user-menu-identity span {
    margin-top: 2px;

    color: #707b8f;
    font-size: 12px;
}

.vaults-user-menu-identity small {
    margin-top: 5px;

    color: #3157d5;

    font-size: 12px;
    font-weight: 700;
}

.vaults-user-menu-separator {
    height: 1px;

    margin: 0 14px;

    background: #e8ecf3;
}

.vaults-user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;

    margin: 5px 8px;
    padding: 11px 12px;

    border-radius: 11px;

    color: inherit;
    text-decoration: none;
}

.vaults-user-menu-item:hover {
    background: #f5f7fb;
}

.vaults-user-menu-item > span:first-child {
    width: 34px;
    height: 34px;
    min-width: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #f0f3f9;
}

.vaults-user-menu-item > span:last-child {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.vaults-user-menu-item strong {
    color: #273248;
    font-size: 13px;
}

.vaults-user-menu-item small {
    margin-top: 2px;

    color: #7a8495;
    font-size: 12px;
}

.vaults-user-menu-logout {
    margin-bottom: 8px;
}

.vaults-user-menu-logout strong {
    color: #c63e4a;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 720px) {
    .vaults-topbar {
        padding: 12px 16px;
    }

    .vaults-global-search kbd {
        display: none;
    }

    .vaults-dropdown-panel {
        position: fixed;

        top: 72px;
        right: 12px;
        left: 12px;

        width: auto;
        max-width: none;
    }

    .vaults-app-launcher-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}

/* =========================================================
   Positionnement final du top Vaults
   ========================================================= */

.vaults-topbar {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 1000 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    width: 100% !important;
    min-height: 72px !important;
    height: 72px !important;

    padding: 9px 30px !important;
}

.vaults-topbar-left {
    display: flex !important;
    min-width: 0 !important;
    flex: 1 !important;
    align-items: center !important;
    gap: 12px !important;
}

.vaults-topbar-actions {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 14px !important;

    margin-left: auto !important;
}

.vaults-global-search {
    width: min(775px, 100%) !important;
}

.vaults-main {
    margin-top: 72px;
}

.vaults-sidebar {
    top: 0;
}

/* =========================================================
   Correction finale :
   header complètement à droite de la sidebar
   ========================================================= */

:root {
    --vaults-topbar-height: 72px;
    --vaults-sidebar-width: 270px;
}

/*
 * La sidebar occupe toute la hauteur et reste au-dessus.
 */
.vaults-sidebar {
    position: fixed !important;

    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;

    width: var(--vaults-sidebar-width) !important;
    height: 100vh !important;

    z-index: 1100 !important;
}

/*
 * Le header commence réellement après la sidebar.
 */
.vaults-topbar {
    position: fixed !important;

    top: 0 !important;
    right: 0 !important;
    left: var(--vaults-sidebar-width) !important;

    z-index: 1000 !important;

    width: auto !important;
    max-width: none !important;
    height: var(--vaults-topbar-height) !important;
    min-height: var(--vaults-topbar-height) !important;

    margin: 0 !important;
    padding: 9px 30px !important;

    box-sizing: border-box !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    gap: 20px !important;
}

/*
 * Partie gauche : burger + recherche.
 */
.vaults-topbar-left {
    position: relative !important;

    display: flex !important;
    align-items: center !important;
    gap: 12px !important;

    min-width: 0 !important;
    width: auto !important;
    flex: 1 1 auto !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: visible !important;
}

/*
 * Le burger ne doit jamais être masqué ou rétréci.
 */
.vaults-icon-button {
    position: relative !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    flex: 0 0 54px !important;

    margin: 0 !important;
    padding: 0 !important;

    transform: none !important;
}

/*
 * La recherche utilise l’espace restant sans passer
 * derrière la sidebar.
 */
.vaults-global-search {
    position: relative !important;

    display: flex !important;
    align-items: center !important;

    width: min(775px, 100%) !important;
    min-width: 220px !important;
    max-width: 775px !important;
    height: 54px !important;
    flex: 1 1 775px !important;

    margin: 0 !important;
    padding: 0 13px !important;

    box-sizing: border-box !important;
    overflow: hidden !important;
}

.vaults-global-search input {
    display: block !important;

    min-width: 0 !important;
    width: 100% !important;
    flex: 1 1 auto !important;

    margin: 0 !important;
}

/*
 * Les trois boutons restent complètement à droite.
 */
.vaults-topbar-actions {
    position: relative !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 14px !important;

    width: auto !important;
    min-width: max-content !important;
    flex: 0 0 auto !important;

    margin: 0 0 0 auto !important;
    padding: 0 !important;

    overflow: visible !important;
}

/*
 * Le contenu commence lui aussi après la sidebar.
 */
.vaults-main {
    width: auto !important;

    margin-top:
        var(--vaults-topbar-height) !important;

    margin-left:
        var(--vaults-sidebar-width) !important;
}

/*
 * Sidebar fermée.
 */
body.vaults-sidebar-collapsed .vaults-topbar {
    left: 0 !important;
}

body.vaults-sidebar-collapsed .vaults-main {
    margin-left: 0 !important;
}

/*
 * Mobile.
 */
@media (max-width: 1050px) {
    .vaults-topbar {
        left: 0 !important;

        width: auto !important;

        padding-right: 16px !important;
        padding-left: 16px !important;
    }

    .vaults-main {
        margin-left: 0 !important;
    }

    .vaults-sidebar {
        transform: translateX(-100%);
    }

    body.vaults-sidebar-open .vaults-sidebar {
        transform: translateX(0);
    }
}

@media (max-width: 720px) {
    .vaults-global-search {
        display: none !important;
    }
}

/* =========================================================
   Correction burger et raccourci Ctrl K
   ========================================================= */

.vaults-global-search kbd {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    min-width: 62px !important;
    max-width: none !important;
    height: 30px !important;
    flex: 0 0 auto !important;

    padding: 0 9px !important;

    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;

    line-height: 1 !important;
}

.vaults-icon-button {
    pointer-events: auto !important;
}

body.vaults-sidebar-collapsed
.vaults-sidebar {
    width: 0 !important;
    min-width: 0 !important;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;

    transform: translateX(-100%) !important;
}

body.vaults-sidebar-collapsed
.vaults-topbar {
    left: 0 !important;
}

body.vaults-sidebar-collapsed
.vaults-main {
    width: 100% !important;
    margin-left: 0 !important;
}

/* =========================================================
   V12.1 — Typographie topbar / menus déroulants
   ========================================================= */

.vaults-global-search input {
    font-size: 16px !important;
}

.vaults-global-search kbd {
    font-size: 12px !important;
}

.vaults-dropdown-header strong {
    font-size: 17px !important;
}

.vaults-dropdown-header span {
    font-size: 13px !important;
    line-height: 1.5 !important;
}

.vaults-notification-item-content strong {
    font-size: 13px !important;
}

.vaults-notification-item-content span,
.vaults-notification-item-content small {
    font-size: 12px !important;
    line-height: 1.5 !important;
}

.vaults-app-launcher-section-header h3 {
    font-size: 13px !important;
}

.vaults-app-launcher-name {
    font-size: 12px !important;
}

.vaults-dropdown-empty strong {
    font-size: 14px !important;
}

.vaults-dropdown-empty p,
.vaults-dropdown-footer a,
.vaults-user-menu-identity span,
.vaults-user-menu-identity small,
.vaults-user-menu-item small {
    font-size: 12px !important;
}

.vaults-user-menu-identity strong,
.vaults-user-menu-item strong {
    font-size: 14px !important;
}
