/* Findzle — Catalogue des applications */

#findzle-app-launcher .fz-app-launcher-footer {
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(15, 23, 42, .10);
}

#findzle-app-launcher .fz-apps-catalog-link {
    display: flex !important;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 13px 15px;
    border: 1px solid rgba(100, 116, 139, .14);
    border-radius: 12px;
    background: rgba(100, 116, 139, .09);
    color: inherit;
    text-decoration: none;
}

#findzle-app-launcher .fz-apps-catalog-link:hover {
    background: rgba(100, 116, 139, .16);
    text-decoration: none;
}

#findzle-app-launcher .fz-apps-catalog-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #dfe9ff;
    color: #3264eb;
    font-size: 24px;
}

#findzle-app-launcher .fz-apps-catalog-copy {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 4px;
}

#findzle-app-launcher .fz-apps-catalog-copy strong {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

#findzle-app-launcher .fz-apps-catalog-copy small {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
    color: #718096;
}

#findzle-app-launcher .fz-apps-catalog-arrow {
    font-size: 23px;
    font-weight: 600;
    color: #667085;
}

html[data-theme="dark"] #findzle-app-launcher .fz-apps-catalog-link {
    background: rgba(148, 163, 184, .10);
    border-color: rgba(148, 163, 184, .20);
}

html[data-theme="dark"] #findzle-app-launcher .fz-apps-catalog-icon {
    background: #23365d;
    color: #91b3ff;
}


/* FINDZLE LAUNCHER — FIXED CATALOG FOOTER */

/* Panneau principal */
#findzle-app-launcher-menu {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    max-height: calc(100dvh - 100px) !important;
}

/* En-tête et recherche */
#findzle-app-launcher-menu > .fz-dropdown-header,
#findzle-app-launcher-menu > .fz-app-launcher-search {
    flex: 0 0 auto !important;
}

/* Seule la liste des applications défile */
#findzle-app-launcher-menu > .fz-app-launcher-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* Catalogue toujours visible en bas */
#findzle-app-launcher-menu > .fz-app-launcher-footer {
    flex: 0 0 auto !important;
    position: relative !important;
    z-index: 2 !important;
    background: #ffffff !important;
}

/* Respecter la fermeture du menu */
#findzle-app-launcher-menu[hidden] {
    display: none !important;
}

/* Mode sombre */
html[data-theme="dark"]
#findzle-app-launcher-menu > .fz-app-launcher-footer {
    background: #182235 !important;
}

/* END FINDZLE LAUNCHER — FIXED CATALOG FOOTER */


/* FINDZLE LAUNCHER SEARCH VISIBILITY START */

/* Recherche active : masquer les groupes habituels */
#findzle-app-launcher.fz-search-active
.fz-app-launcher-content
.fz-app-launcher-section:not(.fz-app-launcher-section--search_results) {
    display: none !important;
}

/* Recherche inactive : masquer les résultats */
#findzle-app-launcher:not(.fz-search-active)
.fz-app-launcher-section--search_results {
    display: none !important;
}

/* Respecter les éléments masqués par le moteur */
#findzle-app-launcher .fz-app-launcher-section[hidden],
#findzle-app-launcher .fz-app-launcher-item[hidden],
#findzle-app-launcher .fz-app-launcher-search-empty[hidden] {
    display: none !important;
}

/* FINDZLE LAUNCHER SEARCH VISIBILITY END */



/* FINDZLE LAUNCHER ORGANIZATION LAYOUT START */

body.fzl-shell-body .fzl-shell-topbar
#findzle-app-launcher
.fz-app-launcher-section--organization
.fz-app-launcher-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
    width: 100% !important;
}

body.fzl-shell-body .fzl-shell-topbar
#findzle-app-launcher
.fz-app-launcher-section--organization
.fz-app-launcher-item {
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr) auto !important;
    grid-template-areas:
        "icon name badge"
        "icon description badge" !important;

    grid-column: 1 / -1 !important;
    align-items: center !important;
    justify-items: start !important;

    width: 100% !important;
    max-width: none !important;
    min-height: 104px !important;
    height: auto !important;

    padding: 18px 16px !important;
    gap: 8px 22px !important;

    box-sizing: border-box !important;
    text-align: left !important;

    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 14px !important;
}

body.fzl-shell-body .fzl-shell-topbar
#findzle-app-launcher
.fz-app-launcher-section--organization
.fz-app-launcher-item:hover {
    background: rgba(75, 105, 200, .065) !important;
    border-color: rgba(75, 105, 200, .15) !important;
}

body.fzl-shell-body .fzl-shell-topbar
#findzle-app-launcher
.fz-app-launcher-section--organization
.fz-app-launcher-icon {
    grid-area: icon !important;
    width: 56px !important;
    height: 56px !important;
    margin: 0 !important;
    align-self: center !important;
}

body.fzl-shell-body .fzl-shell-topbar
#findzle-app-launcher
.fz-app-launcher-section--organization
.fz-app-launcher-name {
    grid-area: name !important;

    display: block !important;
    width: 100% !important;
    max-width: none !important;

    font-size: 15px !important;
    font-weight: 700 !important;

    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: left !important;

    margin: 0 !important;
}

body.fzl-shell-body .fzl-shell-topbar
#findzle-app-launcher
.fz-app-launcher-section--organization
.fz-app-organization-description {
    grid-area: description !important;

    display: block !important;
    width: 100% !important;
    max-width: none !important;

    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;

    white-space: normal !important;
    overflow: visible !important;
    text-align: left !important;

    opacity: .75 !important;
}

body.fzl-shell-body .fzl-shell-topbar
#findzle-app-launcher
.fz-app-launcher-section--organization
.fz-app-launcher-badge {
    grid-area: badge !important;
    align-self: center !important;
    justify-self: end !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

/* Mobile */

@media (max-width: 480px) {

    body.fzl-shell-body .fzl-shell-topbar
    #findzle-app-launcher
    .fz-app-launcher-section--organization
    .fz-app-launcher-item {
        grid-template-columns: 44px minmax(0, 1fr) !important;
        grid-template-areas:
            "icon name"
            "icon description"
            "icon badge" !important;

        gap: 6px 12px !important;
        padding: 12px !important;
    }

    body.fzl-shell-body .fzl-shell-topbar
    #findzle-app-launcher
    .fz-app-launcher-section--organization
    .fz-app-launcher-icon {
        width: 44px !important;
        height: 44px !important;
    }

    body.fzl-shell-body .fzl-shell-topbar
    #findzle-app-launcher
    .fz-app-launcher-section--organization
    .fz-app-launcher-badge {
        justify-self: start !important;
    }
}

/* FINDZLE LAUNCHER ORGANIZATION LAYOUT END */

