/*
 * Zen core application shell stylesheet.
 *
 * Framework-neutral CSS for the generic Zen application shell only.
 * Backend-specific styling (Blazor, ASP.NET, PHP, etc.) must not live here.
 *
 * R2C2 (2026-09-30): first audited ZEN_SHELL rule added while this stylesheet
 * remains intentionally NOT loaded by Solvea/_Host.cshtml. The legacy copy in
 * Solvea/default.css is kept during this step, so runtime behavior is unchanged.
 */

/* Application shell: desktop side-panel trigger alignment. */
.app-side-panel-trigger {
    margin-top: 2px;
}

/* Shell navigation: shared desktop/mobile back button. */
.app-back-button {
    width: 38px;
    height: 38px;
    min-width: 38px;
    margin: 8px 8px 4px 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: var(--zen-theme-on-brand, white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
}

.app-back-button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.app-back-button:active {
    transform: scale(0.96);
}

.app-back-button i {
    color: var(--zen-theme-on-brand, white);
}

.bandeauApp .buttonCircle.app-back-button {
    box-shadow: none;
}

/* Shared application navigation shell (desktop + mobile). */
#volet {
    --zen-tree-icon-color: #5578a8;
}

#volet .zen-tree__item {
    min-height: 34px;
    font-size: 15px;
}

#volet .zen-tree__item.is-selected .zen-tree__label {
    font-weight: 700;
}

#volet .zen-tree__item.is-selected .zen-tree__item .zen-tree__label {
    font-weight: 400;
}

#volet .zen-tree__icon {
    font-size: 16px;
}

#volet .zen-tree__label {
    font-size: 15px;
    line-height: 1.25;
}

#volet > mytreenavigator {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: auto;
}

/* Desktop application workspace and sliding side panel. */
.app-desktop .app-workspace {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.app-desktop menulateral.app-side-panel {
    position: relative;
    top: auto;
    left: auto;
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    max-width: 0;
    height: auto;
    align-self: stretch;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0;
    background: var(--zen-theme-surface-muted, #f0f0f0);
    transform: none;
    box-shadow: none;
    z-index: auto;
    transition: flex-basis 0.25s ease, width 0.25s ease, max-width 0.25s ease, padding 0.25s ease;
}

.app-desktop menulateral.app-side-panel.is-open {
    flex-basis: 300px;
    width: 300px;
    max-width: 300px;
    padding: 8px;
    background: var(--zen-theme-surface-muted, #F7F9FD);
    border: 1px solid var(--zen-theme-border, #d0d8e8);
    border-radius: 8px;
    box-shadow: 3px 0 8px rgba(0, 0, 0, 0.05);
    margin-top: 4px;
    margin-left: 8px;
    margin-bottom: 10px;
}

.app-desktop menulateral.app-side-panel > actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.app-desktop .app-workspace > contentmodule {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    margin-top: 4px;
}

/* Shared criteria accordion host used by the application shell. */
#accCriteres {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 8px;
}

/* Desktop module surface and its composition with module tabs. */
.app-desktop .app-module-layout {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
}

.app-desktop .app-module-layout > #myModule {
    border: 1px solid var(--zen-theme-border, #d0d8e8);
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Structural presence of module tabs: no parallel JS state. */
.app-desktop .app-module-layout:has(> tabsmodule > mytabheader.module-tabs-header > tabactions.module-tabs-actions > tabheader) > tabsmodule {
    margin-right: 0;
    padding: 8px 0 8px 8px;
    border-color: var(--zen-theme-border, #d0d8e8);
    border-right: 1px solid var(--zen-theme-border, #d0d8e8);
    border-radius: 8px 0 0 8px;
    box-sizing: border-box;
}

.app-desktop .app-module-layout:has(> tabsmodule > mytabheader.module-tabs-header > tabactions.module-tabs-actions > tabheader) > #myModule {
    border-left: 0;
    border-radius: 0 8px 8px 0;
    padding: 8px;
}

/* Mobile application shell: navigation popup width override. */
/* Mobile application shell: navigation side panel.
   Keep the historical transform-based motion here; managerpopup.css owns only
   the generic popup engine. */
.app-mobile menulateral.ui-popup {
    position: fixed;
    top: 110px;
    left: 0;
    height: 100vh;
    width: 300px;
    background-color: var(--zen-theme-surface-muted, #f0f0f0);
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.25s ease-in-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    padding-left: 12px;
    padding-top: 12px;
    display: block;
}

.app-mobile menulateral.ui-popup.is-open {
    transform: translateX(0);
}

/* Generic application header quick actions. */
.bandeauApp zoneconnexion {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.app-header-actions {
    display: none;
    align-items: center;
    gap: 4px;
}

.app-header-action {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: var(--zen-theme-on-brand, white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.12s ease;
}

.app-header-action:hover {
    background: rgba(255, 255, 255, 0.30);
}

.app-header-action:active {
    transform: scale(0.96);
}

.app-header-action:focus-visible {
    outline: 2px solid var(--zen-theme-focus, #0F6CBD);
    outline-offset: 2px;
}

.app-header-action i {
    color: inherit;
    pointer-events: none;
}
