/* Interface agent app/ — aligné charte mz (primary #0383a6) + tuiles webapp */

:root {
    --app-primary: #0383a6;
    --app-primary-dark: #026a87;
    --app-primary-soft: #d9eef4;
    --app-primary-muted: #e8f4f8;
    --app-surface: #ffffff;
    --app-text: #034330;
    --app-header-bg: #3f4254;
    /* Tons tuiles (webapp legacy) */
    --app-tone-success: #7ebf4c;
    --app-tone-info: #59ace2;
    --app-tone-primary: #074a7f;
    --app-tone-danger: #ef0c43;
    --app-tone-warning: #ff9900;
    --app-tone-violet: #e11b8c;
    --app-tone-purple: #7f48c7;
    --app-tone-teal: #1b8a7a;
    --app-tone-mint: #48be9f;
    --app-tone-bs: #296a94;
    --app-tone-orchid: #bd69bf;
    --app-tone-moddef: #407e2c;
    --app-tone-nservices: #998617;
    --app-tone-doccond: #4288d2;
    --app-tone-refcond: #685ed1;
    --app-tone-livretform: #e6904e;
    --app-tone-autres: #e7b049;
    --app-tone-doctps: #ed664e;
}

.app-agent {
    background-color: var(--app-primary-soft);
    color: var(--app-text);
    padding-bottom: 5.5rem;
}

.app-agent--dashboard.app-agent--wallpaper {
    background-color: var(--app-primary-soft);
    background-image: var(--app-dashboard-bg-image);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

.app-agent-header {
    background: var(--app-primary);
    border-bottom: 0;
    min-height: 0;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.app-agent-header > .app-container {
    align-items: center !important;
    min-height: 0;
}

.app-agent-header .fw-bold,
.app-agent-header .text-muted {
    color: #fff !important;
}

.app-header-action {
    background: #fff;
    border: 0;
    border-radius: 0.55rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    font-weight: 600;
    padding: 0.38rem 0.85rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.app-header-action:hover,
.app-header-action:focus {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.app-header-action--gestion {
    color: var(--app-primary-dark);
}

.app-header-action--gestion:hover,
.app-header-action--gestion:focus {
    color: var(--app-primary);
}

.app-header-action--gestion i {
    color: var(--app-primary);
}

.app-header-action--logout {
    color: var(--app-tone-danger);
}

.app-header-action--logout:hover,
.app-header-action--logout:focus {
    color: #d10a38;
}

.app-header-action--logout i {
    color: var(--app-tone-danger);
}

.app-header-action--settings {
    color: var(--app-primary-dark);
}

.app-header-action--settings:hover,
.app-header-action--settings:focus {
    color: var(--app-primary);
}

.app-header-action--settings i {
    color: var(--app-primary);
}

/* Modale paramètres — zoom d'affichage */
.app-settings-scale-control {
    min-height: 3.5rem;
}

.app-settings-scale-value {
    min-width: 5.5rem;
    text-align: center;
}

.app-settings-kbd {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    font-family: inherit;
    line-height: 1.2;
    color: var(--app-text);
    background: var(--app-primary-muted);
    border: 1px solid rgba(3, 131, 166, 0.25);
    border-radius: 0.35rem;
}

.app-settings-wallpapers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr));
    gap: 0.75rem;
}

@media (min-width: 992px) {
    .app-settings-wallpapers {
        grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
    }
}

.app-settings-wallpaper-choice {
    appearance: none;
    border: 2px solid transparent;
    background: #fff;
    border-radius: 0.65rem;
    padding: 0.35rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.app-settings-wallpaper-choice:hover,
.app-settings-wallpaper-choice:focus {
    border-color: rgba(3, 131, 166, 0.45);
    transform: translateY(-1px);
    outline: none;
}

.app-settings-wallpaper-choice.is-selected {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 2px rgba(3, 131, 166, 0.2);
}

.app-settings-wallpaper-preview {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 0.45rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.app-settings-wallpaper-preview--default {
    background: linear-gradient(135deg, var(--app-primary-soft) 0%, #b8dde8 100%);
}

.app-settings-wallpaper-preview--random {
    background: linear-gradient(135deg, var(--app-primary) 0%, #59ace2 55%, var(--app-primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.app-settings-wallpaper-preview--random i {
    font-size: 1.65rem;
    color: #fff !important;
}

.app-settings-wallpaper-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #5e6278;
    text-align: center;
    line-height: 1.2;
}

.app-header-logo-link {
    background: #fff;
    border-radius: 0.55rem;
    padding: 0.28rem 0.65rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.app-header-logo-link:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
    transform: translateY(-1px);
}

.app-header-logo {
    height: 34px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

.app-header-greeting {
    min-width: 0;
    line-height: 1.25;
}

.app-header-greeting-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

.app-header-greeting-sub {
    margin-top: 0.12rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.app-lock-logo {
    width: auto;
    max-width: min(280px, 90vw);
    height: auto;
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.app-impersonation-bar {
    background: #ff9800;
    color: #fff;
    padding: 0.5rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

body.vr-impersonation-active .app-agent-header {
    top: var(--vr-impersonation-bar-height, 40px);
}

.app-impersonation-bar a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}

/* Bandeau bonjour (équivalent #Titre_top webapp) */
.app-hero {
    background: var(--app-primary);
    color: #fff;
    border-radius: 0.75rem;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 14px rgba(3, 131, 166, 0.25);
}

.app-hero h1 {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0;
}

.app-hero .app-hero-sub {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Panneau alertes (équivalent .box_white) */
.app-panel {
    background: var(--app-surface);
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-bottom: 3px solid #d8dee6;
    padding: 1rem 1.1rem 1.15rem;
    margin-bottom: 1rem;
}

.app-panel-title {
    color: #5e6278;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 2px solid #e4e6ef;
    padding-bottom: 0.55rem;
    margin-bottom: 0.85rem;
}

.app-panel-greeting {
    margin-bottom: 0.15rem;
}

.app-agent--dashboard .app-panel:has(.app-panel-greeting),
.app-agent--dashboard .app-dashboard-widget-panel {
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* Dashboard — widget Bonjour + apps (responsive) */
.app-dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.app-dashboard-widget {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.app-dashboard-widget .app-panel {
    margin-bottom: 0;
}

/* Dashboard — pile planning / messagerie */
.app-dashboard-widget-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.app-dashboard-compact-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.9rem 1rem;
    text-align: left;
    border: 0;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-bottom: 3px solid #d8dee6;
    color: inherit;
}

.app-dashboard-compact-card:active {
    transform: scale(0.99);
}

.app-dashboard-compact-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.55rem;
    flex-shrink: 0;
    font-size: 1.15rem;
}

.app-dashboard-compact-card-icon.planning {
    background: rgba(0, 158, 180, 0.12);
    color: var(--app-tone-teal, #009eb4);
}

.app-dashboard-compact-card-icon.messaging {
    background: rgba(54, 153, 235, 0.12);
    color: #3699ff;
}

.app-dash-a2hs-wrap .app-dash-a2hs-trigger,
.app-dash-a2hs-wrap .app-dash-raccourci-link {
    cursor: pointer;
}

.app-a2hs-platform-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-a2hs-steps-list {
    margin: 0;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    font-size: 0.9rem;
    color: #3f4254;
}

.app-a2hs-steps-list li {
    padding-left: 0.15rem;
}

.app-a2hs-share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    border: 1px solid #b5b5c3;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    vertical-align: middle;
}

.app-android-qr-block {
    background: #f9f9f9;
    border: 1px dashed #d8dee6;
    border-radius: 0.75rem;
    padding: 1.25rem 1.35rem;
}

.app-android-modal-instructions {
    padding: 0.15rem 0.25rem;
}

.app-android-qr-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.app-android-apk-steps {
    margin-bottom: 1rem;
}

.app-dashboard-compact-card-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.app-dashboard-compact-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--app-primary);
}

.app-dashboard-compact-card-meta {
    font-size: 0.75rem;
    font-weight: 600;
    color: #7e8299;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-dashboard-compact-card-badge {
    flex-shrink: 0;
}

.app-dashboard-compact-card-chevron {
    flex-shrink: 0;
    font-size: 1.1rem;
    color: #a1a5b7;
}

.app-dashboard-widget-modal .modal-content {
    border-radius: 1rem;
}

.app-dashboard-widget-modal-dialog {
    max-width: 36rem;
}

.app-dashboard-android-modal .modal-dialog,
.app-dashboard-android-modal-dialog {
    max-width: min(96vw, 90rem);
    width: min(96vw, 90rem);
}

.app-dashboard-incident-modal .modal-dialog,
.app-dashboard-incident-modal-dialog {
    max-width: min(96vw, 56rem);
    width: min(96vw, 56rem);
}

.app-dashboard-modal-date {
    margin-top: -0.15rem;
}

/* Dashboard desktop — indicateur défilement */
.app-dashboard-scroll-hint {
    position: fixed;
    left: 50%;
    bottom: 5.5rem;
    z-index: 104;
    transform: translateX(-50%) translateY(0.75rem);
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.app-dashboard-scroll-hint.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.app-dashboard-scroll-hint-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: var(--app-primary);
}

.app-dashboard-scroll-hint-icon {
    font-size: 1.2rem;
    animation: app-dashboard-scroll-hint-bounce 1.45s ease-in-out infinite;
}

.app-dashboard-scroll-hint:hover .app-dashboard-scroll-hint-inner,
.app-dashboard-scroll-hint:focus-visible .app-dashboard-scroll-hint-inner {
    background: #fff;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.22);
}

.app-dashboard-scroll-hint:focus-visible {
    outline: none;
}

.app-dashboard-scroll-hint:focus-visible .app-dashboard-scroll-hint-inner {
    outline: 2px solid var(--app-primary);
    outline-offset: 2px;
}

@keyframes app-dashboard-scroll-hint-bounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.85;
    }
    50% {
        transform: translateY(0.28rem);
        opacity: 1;
    }
}

@media (max-width: 991.98px) {
    .app-dashboard-scroll-hint {
        display: none !important;
    }
}

.app-dashboard-apps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: 1.75rem 1.15rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-items: center;
    padding: 0.5rem 0.25rem 0.75rem;
}

@media (min-width: 992px) {
    .app-dashboard-layout {
        display: grid;
        grid-template-columns: minmax(240px, 30%) minmax(0, 1fr);
        grid-template-rows: auto;
        gap: 1rem 1.35rem;
        align-items: start;
    }

    .app-dashboard-widget {
        grid-column: 1;
        grid-row: 1;
        position: sticky;
        top: 4.25rem;
        align-self: start;
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
        max-height: calc(100vh - 5.5rem);
        overflow-y: auto;
    }

    .app-dashboard-widget .app-panel {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .app-dashboard-widget-panel {
        max-height: none;
        overflow: visible;
    }

    .app-dashboard-apps {
        grid-column: 2;
        grid-row: 1;
        gap: 1.85rem 1.35rem;
        padding: 0.5rem 0.15rem 0.85rem;
    }
}

.app-panel-greeting-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--app-primary);
    letter-spacing: 0.02em;
    text-transform: none;
}

.app-panel-greeting-sub {
    margin-top: 0.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #7e8299;
}

.app-panel-title--alerts {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.app-alert-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px dashed #e4e6ef;
    color: #5e6278;
    text-decoration: none;
}

.app-alert-row:last-child {
    border-bottom: 0;
}

.app-alert-row:hover {
    color: var(--app-primary-dark);
}

.app-alert-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 1rem;
}

.app-alert-icon.danger { background: var(--app-tone-danger); }
.app-alert-icon.warning { background: var(--app-tone-warning); }
.app-alert-icon.success { background: var(--app-tone-success); }

.app-alert-meta {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: #a1a5b7;
    margin-top: 0.15rem;
}

.app-alert-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.app-alert-badge.danger { background: var(--app-tone-danger); }

.app-dashboard-msg-empty {
    text-align: center;
    padding: 0.75rem 0.35rem 0.35rem;
}

/* Dashboard — agenda / planning personnel */
.app-dashboard-agenda-panel {
    padding-bottom: 0.85rem;
}

.app-dashboard-agenda-head {
    margin-bottom: 0.65rem;
}

.app-dashboard-agenda-subtitle,
.app-day-agenda-subtitle {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5e6278;
    margin-bottom: 0.55rem;
}

.app-dashboard-agenda-empty {
    font-size: 0.8rem;
    color: #7e8299;
}

.app-dash-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.app-dash-cal-month {
    font-size: 0.82rem;
    font-weight: 700;
    color: #3f4254;
    text-transform: capitalize;
}

.app-dash-cal-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.45rem;
    color: #5e6278;
    background: #f5f8fa;
    border: 1px solid #eef0f4;
    text-decoration: none;
}

.app-dash-cal-nav-btn:hover {
    color: var(--app-primary);
    border-color: #d8e8f5;
    background: #f1faff;
}

.app-dash-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.2rem;
}

.app-dash-cal-dow {
    font-size: 0.62rem;
    font-weight: 700;
    text-align: center;
    color: #a1a5b7;
    padding-bottom: 0.15rem;
}

.app-dash-cal-day {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 1.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #3f4254;
    border-radius: 0.4rem;
}
button.app-dash-cal-day--btn {
    border: 0;
    background: transparent;
    padding: 0;
    width: 100%;
    cursor: pointer;
}
button.app-dash-cal-day--btn:hover {
    background: #f1f3f5;
}
button.app-dash-cal-day--btn.app-dash-cal-day--today:hover {
    background: var(--app-tone-teal);
    color: #fff;
}
.app-plan-jour-timeline { display: flex; flex-direction: column; gap: 0.55rem; }
.app-plan-jour-slot {
    display: grid;
    grid-template-columns: 4.5rem 0.7rem 1fr;
    gap: 0.45rem;
    align-items: start;
}
.app-plan-jour-slot-time {
    font-size: 0.72rem;
    font-weight: 700;
    color: #5e6278;
    padding-top: 0.1rem;
}
.app-plan-jour-slot-dot {
    width: 0.55rem;
    height: 0.55rem;
    margin-top: 0.35rem;
    border-radius: 50%;
    background: var(--app-tone-teal, #0d7377);
}
.app-plan-jour-slot-body { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.app-plan-jour-slot-title { font-size: 0.85rem; font-weight: 700; color: #181c32; }
.app-plan-jour-slot-meta { font-size: 0.72rem; color: #7e8299; }

.app-dash-cal-day--empty {
    visibility: hidden;
}

.app-dash-cal-day--today {
    background: var(--app-tone-teal);
    color: #fff;
}

.app-dash-cal-day--has-event:not(.app-dash-cal-day--today)::after {
    content: '';
    position: absolute;
    bottom: 0.12rem;
    left: 50%;
    width: 0.28rem;
    height: 0.28rem;
    margin-left: -0.14rem;
    border-radius: 50%;
    background: var(--app-tone-teal);
}

.app-day-agenda {
    margin-top: 0;
    padding-top: 0.35rem;
    border-top: 1px solid #eef0f4;
}

.app-day-agenda-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 2px solid #e4e6ef;
    font-size: 0.8rem;
    font-weight: 700;
    color: #5e6278;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.app-day-agenda-date {
    font-size: 0.68rem;
    font-weight: 600;
    color: #7e8299;
    text-transform: none;
    letter-spacing: 0;
}

.app-day-timeline {
    position: relative;
    padding-left: 0.15rem;
}

.app-day-timeline::before {
    content: '';
    position: absolute;
    left: 2.15rem;
    top: 0.35rem;
    bottom: 0.35rem;
    width: 2px;
    background: linear-gradient(180deg, #e4e6ef 0%, #d8dee6 100%);
    border-radius: 1px;
}

.app-day-slot,
.app-day-slot-link {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.45rem 0;
    color: inherit;
}

.app-day-slot-time {
    flex: 0 0 2.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--app-primary);
    line-height: 1.25;
    padding-top: 0.1rem;
}

.app-day-slot-dot {
    position: relative;
    z-index: 1;
    flex: 0 0 0.55rem;
    width: 0.55rem;
    height: 0.55rem;
    margin-top: 0.28rem;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--app-primary);
    box-shadow: 0 0 0 2px #fff;
}

.app-day-slot-dot.teal { border-color: var(--app-tone-teal); }
.app-day-slot-dot.warning { border-color: var(--app-tone-warning); }
.app-day-slot-dot.info { border-color: var(--app-tone-info); }
.app-day-slot-dot.success { border-color: var(--app-tone-success); }

.app-day-slot-body {
    flex: 1;
    min-width: 0;
    padding: 0.35rem 0.55rem;
    background: #f9fafb;
    border: 1px solid #eef0f4;
    border-radius: 0.5rem;
}

.app-day-slot-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #3f4254;
    line-height: 1.3;
}

.app-day-slot-meta {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    color: #7e8299;
    margin-top: 0.1rem;
}

.app-day-slot--now .app-day-slot-body {
    background: #f1faff;
    border-color: #b8e0f5;
}

.app-day-slot--now .app-day-slot-dot {
    background: var(--app-tone-info);
    border-color: var(--app-tone-info);
}

.app-day-slot-link:hover .app-day-slot-body {
    border-color: #cfe8f5;
    background: #f8fcff;
}

.app-dashboard-msg-actions {
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px dashed #e4e6ef;
}

.app-dashboard-msg-row {
    margin-bottom: 0;
}

/* Grille dashboard — icônes (hors layout widget) */
.app-tile-grid--apps:not(.app-dashboard-apps) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: 1.75rem 1.15rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-items: center;
    padding: 0.5rem 0.25rem 0.75rem;
}

@media (min-width: 768px) {
    .app-tile-grid--apps:not(.app-dashboard-apps) {
        gap: 1.85rem 1.25rem;
        padding: 0.65rem 0.35rem 1rem;
    }
}

@media (min-width: 1200px) {
    .app-tile-grid--apps:not(.app-dashboard-apps) {
        gap: 2rem 1.35rem;
        padding: 0.75rem 0.5rem 1.25rem;
    }
}

.app-dash-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
    padding: 0.15rem 0.05rem;
    text-decoration: none;
    color: inherit;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.app-dash-app:hover,
.app-dash-app:focus {
    color: inherit;
    text-decoration: none;
}

.app-dash-app:active .app-dash-app-icon {
    transform: scale(0.9);
    filter: brightness(0.96);
}

.app-dash-app-icon {
    position: relative;
    width: 5.5rem;
    height: 5.5rem;
    flex-shrink: 0;
    border-radius: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 3.15rem;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
    transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1), filter 0.2s ease, box-shadow 0.22s ease;
}

.app-dash-app-icon i {
    font-size: inherit;
    color: inherit;
}

.app-dash-app:hover .app-dash-app-icon,
.app-dash-app:focus .app-dash-app-icon {
    filter: brightness(1.12);
    transform: scale(1.12);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.app-dash-app-label {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
    max-width: 5.85rem;
    padding: 0 0.1rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    color: #3f4254;
    letter-spacing: 0;
    text-transform: none;
}

/* Tuile app — cadre blanc carré (icône + label), centré dans la colonne */
html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-app,
.app-agent--dashboard.app-agent--wallpaper .app-dash-app {
    width: 100%;
    max-width: 8.5rem;
    height: auto;
    aspect-ratio: 1 / 1;
    min-height: 0;
    box-sizing: border-box;
    justify-self: center;
    align-self: start;
    align-items: stretch;
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.42);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 1.15rem;
    padding: 0;
    gap: 0;
    overflow: visible;
    position: relative;
    z-index: 1;
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.22s ease, z-index 0s;
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-app-label,
.app-agent--dashboard.app-agent--wallpaper .app-dash-app-label {
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    padding: 0.32rem 0.4rem 0.42rem;
    font-size: 0.8rem;
    line-height: 1.25;
    min-height: 2rem;
    background: rgba(255, 255, 255, 0.32);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
    border-bottom-left-radius: 1.05rem;
    border-bottom-right-radius: 1.05rem;
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-app-icon,
.app-agent--dashboard.app-agent--wallpaper .app-dash-app-icon {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    font-size: 2.95rem;
    border-radius: 0;
    border-top-left-radius: 1.1rem;
    border-top-right-radius: 1.1rem;
    box-shadow: none;
    opacity: 0.78;
    overflow: visible;
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-app-badge,
.app-agent--dashboard.app-agent--wallpaper .app-dash-app-badge {
    top: -0.35rem;
    right: -0.35rem;
    z-index: 12;
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-app:hover .app-dash-app-icon,
html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-app:focus .app-dash-app-icon,
.app-agent--dashboard.app-agent--wallpaper .app-dash-app:hover .app-dash-app-icon,
.app-agent--dashboard.app-agent--wallpaper .app-dash-app:focus .app-dash-app-icon {
    transform: none;
    filter: brightness(1.05);
    box-shadow: none;
    opacity: 0.88;
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-app:hover,
html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-app:focus,
.app-agent--dashboard.app-agent--wallpaper .app-dash-app:hover,
.app-agent--dashboard.app-agent--wallpaper .app-dash-app:focus {
    transform: translateY(-4px) scale(1.1);
    z-index: 3;
    box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-app:active,
.app-agent--dashboard.app-agent--wallpaper .app-dash-app:active {
    transform: translateY(-1px) scale(1.04);
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-app:active .app-dash-app-icon,
.app-agent--dashboard.app-agent--wallpaper .app-dash-app:active .app-dash-app-icon {
    transform: none;
    filter: brightness(0.96);
}

html.app-dashboard-wallpaper .app-tile-grid--apps,
.app-agent--dashboard.app-agent--wallpaper .app-tile-grid--apps {
    gap: 1.85rem 1.25rem;
    padding-bottom: 1rem;
}

.app-agent--dashboard #kt_app_content,
.app-agent--dashboard #kt_app_content_container,
.app-agent--dashboard .app-dashboard-layout {
    overflow-x: clip;
    max-width: 100%;
}

.app-dash-app-badge {
    position: absolute;
    top: -0.12rem;
    right: -0.12rem;
    width: 0.88rem;
    height: 0.88rem;
    border-radius: 999px;
    background: var(--app-tone-danger);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    pointer-events: none;
}

.app-dash-app-badge--count {
    width: auto;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.28rem;
    font-size: 0.62rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Pastille sur la tuile (hors zone icône seule) */
.app-dash-app > .app-dash-app-badge {
    top: 0.15rem;
    right: calc(50% - 2.75rem - 0.1rem);
}

.app-dash-app > .app-dash-app-badge--count {
    top: 0.08rem;
    right: calc(50% - 2.85rem - 0.15rem);
    min-width: 1.25rem;
    height: 1.25rem;
    font-size: 0.65rem;
}

.app-dash-app-icon[data-tone="success"] { background: var(--app-tone-success); }
.app-dash-app-icon[data-tone="info"] { background: var(--app-tone-info); }
.app-dash-app-icon[data-tone="primary"] { background: var(--app-tone-primary); }
.app-dash-app-icon[data-tone="danger"] { background: var(--app-tone-danger); }
.app-dash-app-icon[data-tone="warning"] { background: var(--app-tone-warning); }
.app-dash-app-icon[data-tone="violet"] { background: var(--app-tone-violet); }
.app-dash-app-icon[data-tone="purple"] { background: var(--app-tone-purple); }
.app-dash-app-icon[data-tone="teal"] { background: var(--app-tone-teal); }
.app-dash-app-icon[data-tone="mint"] { background: var(--app-tone-mint); }
.app-dash-app-icon[data-tone="bs"] { background: var(--app-tone-bs); }

/* Anciennes tuiles pleine largeur (backup / rétrocompat) */
.app-tile-grid:not(.app-tile-grid--apps) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (min-width: 992px) {
    .app-tile-grid:not(.app-tile-grid--apps) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.65rem;
    }
}

.app-dash-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 128px;
    padding: 1.1rem 0.5rem 0.95rem;
    border-radius: 0.45rem;
    border: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: #fff;
    transition: filter 0.15s ease, transform 0.15s ease;
    position: relative;
}

.app-dash-tile:hover,
.app-dash-tile:focus {
    color: #fff;
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.app-dash-tile:active {
    filter: brightness(0.94);
    transform: translateY(0);
}

.app-dash-tile-icon {
    display: block;
    line-height: 1;
    margin-bottom: 0.55rem;
    color: #fff;
    font-size: 2.85rem;
}

.app-dash-tile-icon i {
    font-size: inherit;
    color: inherit;
}

.app-dash-tile-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #fff;
    padding: 0 0.35rem;
}

.app-dash-tile-badge {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    background: var(--app-tone-danger);
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.app-dash-tile[data-tone="success"] { background: var(--app-tone-success); }
.app-dash-tile[data-tone="info"] { background: var(--app-tone-info); }
.app-dash-tile[data-tone="primary"] { background: var(--app-tone-primary); }
.app-dash-tile[data-tone="danger"] { background: var(--app-tone-danger); }
.app-dash-tile[data-tone="warning"] { background: var(--app-tone-warning); color: #fff; }
.app-dash-tile[data-tone="violet"] { background: var(--app-tone-violet); }
.app-dash-tile[data-tone="purple"] { background: var(--app-tone-purple); }
.app-dash-tile[data-tone="teal"] { background: var(--app-tone-teal); }
.app-dash-tile[data-tone="mint"] { background: var(--app-tone-mint); }
.app-dash-tile[data-tone="bs"] { background: var(--app-tone-bs); }

.app-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 105;
    background: var(--app-primary);
    border-top: 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.app-bottom-nav-inner {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
    padding: 0 0.35rem;
    gap: 0.35rem;
}

.app-bottom-nav-inner--split {
    justify-content: space-between;
}

.app-bottom-nav-group {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}

.app-bottom-nav-group--left {
    justify-content: flex-start;
}

.app-bottom-nav-group--right {
    justify-content: flex-end;
    margin-left: auto;
}

.app-bottom-nav-group .app-bottom-nav-item,
.app-bottom-nav-group .app-footer-assistance {
    flex: 0 0 auto;
}

.app-bottom-nav-group .app-bottom-nav-item {
    min-width: 4.25rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.app-bottom-nav-group .app-footer-assistance {
    display: flex;
    align-items: stretch;
}

.app-bottom-nav-group .app-footer-catrail {
    flex: 0 0 auto;
    width: auto;
    min-width: 4.25rem;
}

.app-footer-catrail .app-catrail-nav-icon {
    width: 2.35rem;
    height: 2.35rem;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.app-bottom-nav-group .app-footer-assistance .app-bottom-nav-item {
    width: auto;
    min-width: 4.25rem;
}

.app-bottom-nav-group .app-bottom-nav-item--action {
    width: auto;
}

.app-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.55rem 0.25rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    min-height: 58px;
    opacity: 0.92;
}

.app-bottom-nav-item i {
    color: #fff !important;
    font-size: 1.85rem;
    line-height: 1;
}

.app-bottom-nav-item span {
    color: #fff;
}

.app-bottom-nav-item.is-active {
    color: #fff;
    opacity: 1;
    background: rgba(0, 0, 0, 0.15);
}

.app-bottom-nav-item.is-active i,
.app-bottom-nav-item.is-active span {
    color: #fff;
}

.app-bottom-nav-item--action {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    width: 100%;
}

.app-bottom-nav-item--action:hover,
.app-bottom-nav-item--action:focus {
    color: #fff;
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.app-bottom-nav--dashboard .app-bottom-nav-item {
    font-size: 0.78rem;
    min-height: 66px;
    padding: 0.65rem 0.35rem;
    gap: 0.35rem;
}

.app-bottom-nav--dashboard .app-bottom-nav-item i {
    font-size: 2.35rem;
}

.app-bottom-nav--dashboard .app-bottom-nav-item .fa {
    font-size: 2.2rem;
}

.app-bottom-nav--inner .app-bottom-nav-item {
    font-size: 0.7rem;
    min-height: 60px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    gap: 0.25rem;
}

.app-bottom-nav--inner .app-bottom-nav-item i {
    font-size: 2rem;
}

.app-bottom-nav--inner .app-footer-catrail .app-catrail-nav-icon {
    width: 2rem;
    height: 2rem;
}

/* CatRail — halo / pulse logo footer (aligné gestion aside) */
.app-catrail-nav-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.2rem;
    overflow: visible;
    border-radius: 50%;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.app-catrail-nav-btn::before,
.app-catrail-nav-btn::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    pointer-events: none;
}

.app-catrail-nav-btn::before {
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    animation: app-catrail-halo-idle 3.2s ease-in-out infinite;
}

.app-catrail-nav-btn::after {
    inset: -6px;
    border: 2px solid rgba(180, 235, 255, 0);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.2s ease, transform 0.25s ease, border-color 0.2s ease;
}

@keyframes app-catrail-halo-idle {
    0%, 100% {
        opacity: 0.35;
        transform: scale(0.94);
        box-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.06);
        box-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
    }
}

@keyframes app-catrail-icon-idle {
    0%, 100% {
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.25));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.55));
        transform: scale(1.05);
    }
}

@keyframes app-catrail-icon-hover {
    0%, 100% {
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.95))
                drop-shadow(0 0 22px rgba(140, 220, 255, 0.85));
        transform: scale(1.16);
    }
    50% {
        filter: drop-shadow(0 0 18px rgba(255, 255, 255, 1))
                drop-shadow(0 0 32px rgba(120, 210, 255, 1));
        transform: scale(1.22);
    }
}

@keyframes app-catrail-halo-hover {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        border-color: rgba(200, 240, 255, 0.95);
        box-shadow: 0 0 18px rgba(255, 255, 255, 0.55), 0 0 28px rgba(120, 210, 255, 0.45);
    }
    50% {
        opacity: 1;
        transform: scale(1.12);
        border-color: rgba(255, 255, 255, 1);
        box-shadow: 0 0 26px rgba(255, 255, 255, 0.75), 0 0 40px rgba(100, 200, 255, 0.65);
    }
}

.app-footer-catrail .app-catrail-nav-icon {
    position: relative;
    z-index: 1;
    object-fit: contain;
    display: block;
    transform-origin: center center;
    animation: app-catrail-icon-idle 3.2s ease-in-out infinite;
    transition: filter 0.2s ease;
}

.app-footer-catrail:hover .app-catrail-nav-btn,
.app-footer-catrail:focus-visible .app-catrail-nav-btn {
    transform: scale(1.04);
}

.app-footer-catrail:hover .app-catrail-nav-btn::before,
.app-footer-catrail:focus-visible .app-catrail-nav-btn::before {
    animation: app-catrail-halo-hover 0.9s ease-in-out infinite;
    border-width: 2px;
}

.app-footer-catrail:hover .app-catrail-nav-btn::after,
.app-footer-catrail:focus-visible .app-catrail-nav-btn::after {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.45);
    transform: scale(1.15);
    animation: app-catrail-halo-hover 0.9s ease-in-out infinite reverse;
}

.app-footer-catrail:hover .app-catrail-nav-icon,
.app-footer-catrail:focus-visible .app-catrail-nav-icon {
    animation: app-catrail-icon-hover 0.9s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .app-catrail-nav-btn::before,
    .app-catrail-nav-btn::after,
    .app-footer-catrail .app-catrail-nav-icon {
        animation: none !important;
    }
    .app-footer-catrail:hover .app-catrail-nav-icon,
    .app-footer-catrail:focus-visible .app-catrail-nav-icon {
        transform: scale(1.08);
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    }
}

.app-bottom-nav--inner .app-bottom-nav-item .fa {
    font-size: 1.9rem;
}

/* Messagerie — badge barre du bas */
.app-bottom-nav-badge-wrap {
    position: relative;
    display: inline-flex;
    line-height: 1;
}

.app-bottom-nav-badge {
    position: absolute;
    top: -0.35rem;
    right: -0.55rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #f1416c;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.15rem;
    text-align: center;
    border: 2px solid var(--app-primary);
    pointer-events: none;
}

.app-bottom-nav--dashboard .app-bottom-nav-badge {
    top: -0.4rem;
    right: -0.65rem;
    min-width: 1.25rem;
    height: 1.25rem;
    font-size: 0.62rem;
    line-height: 1.25rem;
}

/* Boutons contextuels (droite) — même esprit que .app-header-action */
.app-bottom-nav-group--context {
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.65rem 0.35rem 0;
}

.app-bottom-nav-ctx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #fff;
    border: 0;
    border-radius: 0.6rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
    padding: 0.52rem 1.05rem;
    min-height: 2.75rem;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.app-bottom-nav-ctx:hover,
.app-bottom-nav-ctx:focus {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    outline: none;
}

.app-bottom-nav-ctx i {
    font-size: 1.35rem !important;
    line-height: 1;
    color: inherit;
}

.app-bottom-nav-ctx span {
    color: inherit;
}

.app-bottom-nav-ctx--primary,
.app-bottom-nav-ctx--settings {
    color: var(--app-primary-dark);
}

.app-bottom-nav-ctx--primary i,
.app-bottom-nav-ctx--settings i {
    color: var(--app-primary);
}

.app-bottom-nav-ctx--primary:hover,
.app-bottom-nav-ctx--primary:focus,
.app-bottom-nav-ctx--settings:hover,
.app-bottom-nav-ctx--settings:focus {
    color: var(--app-primary);
}

.app-bottom-nav-ctx--success {
    color: #4d7f2e;
}

.app-bottom-nav-ctx--success i {
    color: var(--app-tone-success);
}

.app-bottom-nav-ctx--success:hover,
.app-bottom-nav-ctx--success:focus {
    color: var(--app-tone-success);
}

.app-bottom-nav-ctx--warning {
    color: #b36d00;
}

.app-bottom-nav-ctx--warning i {
    color: var(--app-tone-warning);
}

.app-bottom-nav-ctx--warning:hover,
.app-bottom-nav-ctx--warning:focus {
    color: var(--app-tone-warning);
}

.app-bottom-nav-ctx--danger {
    color: #c40a35;
}

.app-bottom-nav-ctx--danger i {
    color: var(--app-tone-danger);
}

.app-bottom-nav-ctx--danger:hover,
.app-bottom-nav-ctx--danger:focus {
    color: var(--app-tone-danger);
}

.app-bottom-nav-ctx--info {
    color: #2f7eb5;
}

.app-bottom-nav-ctx--info i {
    color: var(--app-tone-info);
}

.app-bottom-nav-ctx--info:hover,
.app-bottom-nav-ctx--info:focus {
    color: var(--app-tone-info);
}

.app-bottom-nav-ctx--violet {
    color: #a8166f;
}

.app-bottom-nav-ctx--violet i {
    color: var(--app-tone-violet);
}

.app-bottom-nav-ctx--violet:hover,
.app-bottom-nav-ctx--violet:focus {
    color: var(--app-tone-violet);
}

@media (max-width: 380px) {
    .app-bottom-nav-ctx {
        font-size: 0.82rem;
        padding: 0.46rem 0.75rem;
        min-height: 2.5rem;
    }

    .app-bottom-nav-ctx i {
        font-size: 1.2rem !important;
    }

    .app-bottom-nav-ctx span {
        max-width: 6.25rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.app-bottom-nav-item .fa {
    color: #fff !important;
    font-size: 1.75rem;
    line-height: 1;
}

.app-footer-assistance {
    position: relative;
}

.app-bottom-nav--dashboard .app-footer-assistance {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
}

.app-bottom-nav-inner > .app-footer-assistance .app-bottom-nav-item {
    flex: 0 0 auto;
    width: auto;
    min-width: 5.5rem;
}

.app-footer-assistance .dropdown-menu {
    margin-bottom: 0.45rem;
    min-width: 11rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.app-assistance-menu .dropdown-header {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5e6278;
}

/* CatRail — modale chat app agent */
.app-catrail-modal-dialog {
    max-width: min(720px, calc(100vw - 1.5rem));
}

.app-catrail-modal-body {
    min-height: 22rem;
    max-height: min(58vh, 520px);
}

.app-catrail-msg {
    max-width: 88%;
}

.app-catrail-user {
    margin-left: auto;
}

.app-catrail-bot {
    margin-right: auto;
}

.app-catrail-bubble {
    border-radius: 0.75rem;
    padding: 0.65rem 0.85rem;
    line-height: 1.45;
    font-size: 0.875rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.app-catrail-user .app-catrail-bubble {
    background: #e7f1ff;
}

.app-catrail-bot .app-catrail-bubble {
    background: #fff;
    border: 1px solid #eef0f4;
}

.app-catrail-bot .app-catrail-bubble a {
    color: var(--app-tone-info);
}

/* Mode hors ligne (module documents, extensible app) */
.app-offline-banner {
    display: none;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.15rem;
    padding: 0.85rem 1rem;
    border-radius: 0.65rem;
    border: 1px solid #f5c6a5;
    border-left: 4px solid var(--app-tone-warning);
    background: linear-gradient(135deg, #fff8f0 0%, #fff3e6 100%);
    box-shadow: 0 2px 10px rgba(255, 153, 0, 0.12);
}

.app-offline-banner.is-offline {
    display: flex;
}

.app-offline-banner__icon {
    flex-shrink: 0;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--app-tone-warning);
    color: #fff;
    font-size: 1.15rem;
}

.app-offline-banner__body {
    flex: 1;
    min-width: 0;
}

.app-offline-banner__title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #9a5b00;
    margin-bottom: 0.2rem;
}

.app-offline-banner__text {
    font-size: 0.8rem;
    font-weight: 500;
    color: #7e6a52;
    line-height: 1.45;
}

.app-offline-banner__badge {
    flex-shrink: 0;
    align-self: center;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    background: var(--app-tone-warning);
}

html.app-is-offline .app-doc-files-toolbar h3::after {
    content: ' · Hors ligne';
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--app-tone-warning);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.app-doc-home-hero {
    border: 1px solid #e1f0ff;
    border-radius: 1.15rem;
    padding: 1.35rem 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(0, 158, 247, 0.14), transparent 38%),
        linear-gradient(135deg, #fff 0%, #f8fbff 100%);
    box-shadow: 0 8px 24px rgba(63, 66, 84, 0.06);
}

.app-doc-home-hero-icon,
.app-doc-hero-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-doc-home-hero-icon {
    color: var(--app-primary);
    background: #e1f0ff;
}

.app-doc-help-card {
    border: 1px solid #eef0f4;
    border-radius: 1rem;
    color: inherit;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(63, 66, 84, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.app-doc-help-card:hover {
    border-color: #d7e8ff;
    box-shadow: 0 10px 28px rgba(63, 66, 84, 0.1);
    transform: translateY(-2px);
}

.app-doc-help-card.is-soon {
    opacity: 0.92;
}

.app-doc-help-icon {
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(24, 28, 50, 0.12);
}

.app-doc-help-icon[data-tone="primary"] { background: var(--app-tone-primary); }
.app-doc-help-icon[data-tone="info"] { background: var(--app-tone-info); }
.app-doc-help-icon[data-tone="bs"] { background: var(--app-tone-bs); }
.app-doc-help-icon[data-tone="violet"] { background: var(--app-tone-violet); }
.app-doc-help-icon[data-tone="success"] { background: var(--app-tone-success); }
.app-doc-help-icon[data-tone="teal"] { background: var(--app-tone-teal, #0d9488); }

.app-module-hero--doc {
    border-radius: 1.15rem;
    padding: 1.5rem 1.65rem;
    color: #fff;
    box-shadow: 0 10px 26px rgba(24, 28, 50, 0.14);
    overflow: hidden;
    position: relative;
}

.app-module-hero--doc::after {
    content: "";
    position: absolute;
    top: -3rem;
    right: -2.5rem;
    width: 10rem;
    height: 10rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.app-doc-hero-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    position: relative;
    z-index: 1;
}

.app-module-hero--doc .badge,
.app-module-hero--doc .min-w-0 {
    position: relative;
    z-index: 1;
}

.app-module-hero--doc.app-module-hero--primary { background: var(--app-tone-primary); }
.app-module-hero--doc.app-module-hero--info { background: var(--app-tone-info); }
.app-module-hero--doc.app-module-hero--violet { background: var(--app-tone-violet); }
.app-module-hero--doc.app-module-hero--success { background: var(--app-tone-success); }
.app-module-hero--doc.app-module-hero--teal { background: var(--app-tone-teal, #0d9488); }

.app-doc-article {
    width: 100%;
    max-width: none;
}

.app-doc-sections-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
    width: 100%;
}

@media (min-width: 768px) {
    .app-doc-sections-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .app-doc-sections-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.app-doc-section-card--wide {
    grid-column: 1 / -1;
}

/* Guide chambres : 3 cartes sur la première ligne dès tablette */
@media (min-width: 768px) {
    .app-doc-sections-grid--steps-last {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Guide chambres : 3 cartes compactes puis procédure pleine largeur en bas */
.app-doc-sections-grid--steps-last .app-doc-section-card--wide .app-doc-steps-list {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 992px) {
    .app-doc-sections-grid--steps-last .app-doc-section-card--wide .app-doc-steps-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1.5rem;
    }
}

.app-doc-section-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(63, 66, 84, 0.06);
    margin-bottom: 0;
}

.app-doc-section-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #181c32;
}

.app-doc-section-badge {
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--app-primary);
    background: #e1f0ff;
    font-weight: 800;
    flex-shrink: 0;
}

.app-doc-steps-list {
    display: grid;
    gap: 0.75rem;
}

.app-doc-step-row,
.app-doc-check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    color: #3f4254;
    line-height: 1.52;
}

.app-doc-step-number {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--app-primary);
    font-size: 0.8rem;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 158, 247, 0.24);
}

.app-doc-step-content {
    padding-top: 0.1rem;
}

.app-doc-check-list {
    display: grid;
    gap: 0.65rem;
}

.app-doc-check-icon {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--app-tone-success);
    background: #e8fff3;
    flex-shrink: 0;
}

.app-doc-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    border-radius: 0.9rem;
    background: #f1faff;
    border: 1px solid #e1f0ff;
    font-size: 0.9rem;
    color: #3f4254;
    line-height: 1.5;
    width: 100%;
}

.app-doc-tip-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--app-primary);
    background: #fff;
    flex-shrink: 0;
}

.app-doc-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.app-doc-feature-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.15rem;
    border-radius: 0.85rem;
    border: 1px solid #eef0f4;
    background: #fff;
    box-shadow: 0 2px 12px rgba(63, 66, 84, 0.05);
    height: 100%;
}

.app-doc-feature-card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--app-tone-primary);
}

.app-doc-feature-card[data-tone="info"] .app-doc-feature-card-icon { background: var(--app-tone-info); }
.app-doc-feature-card[data-tone="success"] .app-doc-feature-card-icon { background: var(--app-tone-success); }
.app-doc-feature-card[data-tone="warning"] .app-doc-feature-card-icon { background: var(--app-tone-warning); }
.app-doc-feature-card[data-tone="danger"] .app-doc-feature-card-icon { background: var(--app-tone-danger); }
.app-doc-feature-card[data-tone="violet"] .app-doc-feature-card-icon { background: var(--app-tone-violet); }
.app-doc-feature-card[data-tone="teal"] .app-doc-feature-card-icon { background: var(--app-tone-teal, #0d9488); }
.app-doc-feature-card[data-tone="purple"] .app-doc-feature-card-icon { background: var(--app-tone-purple); }
.app-doc-feature-card[data-tone="bs"] .app-doc-feature-card-icon { background: var(--app-tone-bs); }
.app-doc-feature-card[data-tone="mint"] .app-doc-feature-card-icon { background: var(--app-tone-mint); }

.app-doc-feature-card-title {
    font-weight: 700;
    color: #181c32;
    font-size: 0.95rem;
}

.app-doc-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    border-radius: 0.85rem;
    border: 1px solid #e1f0ff;
    background: #f8fbff;
}

.app-doc-callout--warning {
    border-color: #ffe2b3;
    background: #fff8ee;
}

.app-doc-callout--primary {
    border-color: #d9e8ff;
    background: #f1f6ff;
}

.app-doc-callout-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--app-primary);
    flex-shrink: 0;
}

.app-doc-callout--warning .app-doc-callout-icon {
    color: #b78103;
}

.app-doc-module-cta {
    border: 1px solid #eef0f4;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(63, 66, 84, 0.06);
    width: 100%;
}

.app-doc-module-cta .btn {
    min-width: 12rem;
}

.app-doc-locked {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 26rem;
}

.app-doc-inline-link {
    color: var(--app-primary);
    text-decoration: none;
    border-bottom: 1px dashed rgba(0, 158, 247, 0.45);
}

.app-doc-inline-link:hover {
    color: #0077c8;
    border-bottom-color: #0077c8;
}

.app-doc-inline-label {
    color: #181c32;
}

.app-doc-search-results {
    min-height: 4rem;
}

.app-doc-search-empty {
    text-align: center;
    color: #a1a5b7;
    font-size: 0.85rem;
    padding: 1.5rem 0.75rem;
}

.app-doc-search-list .app-doc-search-item {
    border: 0;
    border-bottom: 1px solid #eff2f5;
    padding: 0.85rem 0.35rem;
}

.app-doc-search-list .app-doc-search-item:last-child {
    border-bottom: 0;
}

.app-doc-search-item-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.55rem;
    background: #f9f9f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--app-primary);
    flex-shrink: 0;
}

#appDocSearchModal .modal-content {
    border-radius: 1rem;
}

#appDocSearchModal .modal-body {
    max-height: min(70vh, 520px);
    overflow-y: auto;
}

/* Hero catégorie documents (tons catdocumentation.css) */
.app-hero--success { background: var(--app-tone-success); }
.app-hero--info { background: var(--app-tone-info); }
.app-hero--danger { background: var(--app-tone-danger); }
.app-hero--warning { background: var(--app-tone-warning); }
.app-hero--primary { background: var(--app-tone-primary); }
.app-hero--violet { background: var(--app-tone-violet); }
.app-hero--purple { background: var(--app-tone-purple); }
.app-hero--teal { background: var(--app-tone-teal); }

.app-doc-back {
    margin-bottom: 0.75rem;
}

.app-doc-search .form-control {
    border-radius: 0.5rem;
}

.app-doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.app-doc-count {
    font-size: 0.8rem;
    color: #7e8299;
    margin-bottom: 0.5rem;
}

.app-doc-list {
    display: flex;
    flex-direction: column;
}

/* Liste documents (step2=liste) */
.app-doc-list-toolbar {
    margin-bottom: 1.25rem;
}

.app-doc-file-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.app-doc-file-item {
    background: #fff;
    border: 1px solid #e4e6ef;
    border-radius: 0.625rem;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.app-doc-file-item:hover {
    border-color: rgba(3, 131, 166, 0.35);
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.06);
}

.app-doc-file-item.is-unread {
    border-left: 3px solid var(--app-tone-danger);
}

.app-doc-file-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.app-doc-file-link:hover {
    color: inherit;
}

.app-doc-file-link:hover .app-doc-file-title {
    color: var(--app-primary);
}

.app-doc-file-body {
    flex: 1;
    min-width: 0;
}

.app-doc-file-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    margin-bottom: 0.35rem;
}

.app-doc-file-meta .text-muted {
    font-size: 0.78rem;
}

.app-doc-file-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #181c32;
    line-height: 1.4;
    word-break: break-word;
}

.app-doc-file-arrow {
    color: #a1a5b7;
    flex-shrink: 0;
}

.app-doc-week-icon {
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 0.5rem;
    background: var(--app-tone-primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-doc-file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0 1.15rem 1rem;
    margin-top: -0.25rem;
}

/* Artic — S+1 / MD à droite (comme webapp #BTN-s1md) */
.app-doc-file-item.has-side-actions {
    position: relative;
}

.app-doc-file-item.has-side-actions .app-doc-file-link {
    padding-right: 9rem;
}

.app-doc-file-actions--right {
    position: absolute;
    right: 0.95rem;
    top: 1.25rem;
    transform: none;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.app-doc-file-actions--right .btn {
    min-width: auto;
    white-space: nowrap;
}

.app-doc-file-item.has-side-actions--livret .app-doc-file-link {
    padding-right: 8.5rem;
}

.app-doc-rt-futur-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    line-height: 1.2;
    padding: 0.35rem 0.65rem;
    white-space: normal;
    text-align: center;
}

.app-doc-rt-futur-label {
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .app-doc-file-item.has-side-actions .app-doc-file-link {
        padding-right: 1.15rem;
        padding-bottom: 3.25rem;
    }

    .app-doc-file-actions--right {
        right: 0.85rem;
        bottom: 0.75rem;
        top: auto;
        flex-direction: row;
        justify-content: flex-end;
    }
}

.app-doc-search-bar .form-control {
    background-color: #f9f9f9;
    border-color: #e4e6ef;
}

.app-doc-search-bar .input-group-text {
    background: #f9f9f9;
    border-color: #e4e6ef;
}

.app-doc-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #7e8299;
}

/* Sous-pages documents (detailsArtic, siop, attFormations) */
.app-doc-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eef2f5;
}

.app-doc-row:hover {
    background: rgba(3, 131, 166, 0.04);
    color: inherit;
}

.app-doc-icon {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.5rem;
    background: var(--app-primary-muted);
    color: var(--app-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.app-dash-tile--unread {
    box-shadow: 0 0 0 3px rgba(239, 12, 67, 0.45);
}

/* Grille catégories documents — style Metronic files.html */
.app-doc-files-toolbar {
    margin-bottom: 1.25rem;
}

.app-doc-cat-card {
    border: 0;
    color: #fff;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.app-doc-cat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.18);
    filter: brightness(1.04);
}

.app-doc-cat-card--unread {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--app-tone-danger);
}

.app-doc-cat-card .card-body {
    min-height: 11rem;
}

.app-doc-cat-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-doc-cat-card .theme-dark-show {
    display: none !important;
}

.app-doc-cat-card .theme-light-show {
    display: block !important;
}

/* Fond plein par catégorie (webapp legacy) */
.app-doc-cat-card[data-tone="success"] { background: var(--app-tone-success); }
.app-doc-cat-card[data-tone="info"] { background: var(--app-tone-info); }
.app-doc-cat-card[data-tone="danger"] { background: var(--app-tone-danger); }
.app-doc-cat-card[data-tone="warning"] { background: var(--app-tone-warning); }
.app-doc-cat-card[data-tone="primary"] { background: var(--app-tone-primary); }
.app-doc-cat-card[data-tone="violet"] { background: var(--app-tone-violet); }
.app-doc-cat-card[data-tone="purple"] { background: var(--app-tone-purple); }
.app-doc-cat-card[data-tone="teal"] { background: var(--app-tone-teal); }
.app-doc-cat-card[data-tone="mint"] { background: var(--app-tone-mint); }
.app-doc-cat-card[data-tone="orchid"] { background: var(--app-tone-orchid); }
.app-doc-cat-card[data-tone="moddef"] { background: var(--app-tone-moddef); }
.app-doc-cat-card[data-tone="nservices"] { background: var(--app-tone-nservices); }
.app-doc-cat-card[data-tone="doccond"] { background: var(--app-tone-doccond); }
.app-doc-cat-card[data-tone="refcond"] { background: var(--app-tone-refcond); }
.app-doc-cat-card[data-tone="livretform"] { background: var(--app-tone-livretform); }
.app-doc-cat-card[data-tone="autres"] { background: var(--app-tone-autres); }
.app-doc-cat-card[data-tone="doctps"] { background: var(--app-tone-doctps); }

.app-doc-cat-card .app-doc-cat-link,
.app-doc-cat-card .app-doc-cat-title {
    color: #fff;
    text-decoration: none;
}

.app-doc-cat-card .app-doc-cat-subtitle {
    color: rgba(255, 255, 255, 0.78);
}

.app-doc-cat-card .app-doc-cat-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    min-height: 2.7em;
}

.app-doc-cat-card .app-doc-cat-link:hover .app-doc-cat-title {
    color: rgba(255, 255, 255, 0.92);
}

.app-doc-cat-card .badge {
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.app-doc-cat-card .badge-light {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* Page lock — alignée mz/lock.php */
.app-lock-page {
    min-height: 100vh;
}

.app-lock-page.auth-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

@media (max-width: 991.98px) {
    .app-lock-page .flex-lg-row-auto {
        padding: 1.5rem !important;
    }

    .app-lock-card-mz {
        max-width: 100%;
    }
}

/* En-têtes modules */
.app-module-hero {
    border-radius: 0.75rem;
    padding: 1.1rem 1.25rem;
    text-align: center;
    color: #fff;
    margin-bottom: 1rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.app-module-hero-title,
.app-module-hero h1.app-module-hero-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff !important;
    line-height: 1.25;
}

.app-module-hero-sub {
    margin-top: 0.35rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.4;
}

.app-module-hero .text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
}

.app-module-hero--primary { background: var(--app-tone-primary); box-shadow: 0 4px 14px rgba(30, 136, 229, 0.22); }
.app-module-hero--success { background: var(--app-tone-success); box-shadow: 0 4px 14px rgba(34, 197, 94, 0.22); }
.app-module-hero--violet { background: var(--app-tone-violet); box-shadow: 0 4px 14px rgba(124, 58, 237, 0.22); }
.app-module-hero--teal { background: var(--app-tone-teal); box-shadow: 0 4px 14px rgba(27, 138, 122, 0.28); }
.app-module-hero--danger { background: var(--app-tone-danger); box-shadow: 0 4px 14px rgba(239, 68, 68, 0.22); }
.app-module-hero--mint { background: var(--app-tone-mint); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.22); }
.app-module-hero--info { background: var(--app-tone-info); box-shadow: 0 4px 14px rgba(89, 172, 226, 0.28); }
.app-module-hero--warning { background: var(--app-tone-warning); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.22); }

/* Pages modules (hors dashboard) — respiration sous le header */
.app-agent:not(.app-agent--dashboard) #kt_app_content_container {
    padding-top: 1.15rem;
}

/* PDV terrain — recherche agent */
.app-veille-page-head .card-body {
    padding-top: 1.35rem;
    padding-bottom: 1.35rem;
}

.app-veille-agent-steps li + li {
    margin-top: 0.35rem;
}

.app-veille-agent-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.app-veille-agent-result-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    text-align: left;
    padding: 0.85rem 1rem;
    border: 1px solid #e4e6ef;
    border-radius: 0.625rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.app-veille-agent-result-item:hover,
.app-veille-agent-result-item:focus {
    border-color: var(--app-tone-primary);
    box-shadow: 0 0 0 1px rgba(0, 158, 247, 0.12);
    background: #f9fafb;
    outline: none;
}

.app-veille-agent-result-item:active {
    background: #f1faff;
}

/* PDV terrain — saisie compacte (app) */
.app-veille-pdv-wrap--compact {
    margin-bottom: 0.5rem;
}

.app-veille-pdv-head {
    margin-bottom: 0.65rem;
}

.app-veille-pdv-head-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #181c32;
    line-height: 1.25;
}

.app-veille-pdv-head-sub {
    font-size: 0.78rem;
    color: #7e8299;
    margin-top: 0.15rem;
}

.app-veille-pdv-wrap--compact .app-veille-pdv-content > .card {
    margin-bottom: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.app-veille-pdv-wrap--compact .app-veille-pdv-content > .card > .card-header {
    display: none;
}

.app-veille-pdv-wrap--compact .app-veille-pdv-content > .card > .card-body {
    padding: 0;
}

.app-veille-pdv-wrap--compact .alert {
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.65rem;
    font-size: 0.82rem;
}

.app-veille-pdv-wrap--compact #mzPdvForm1v2 > .row.g-6,
.app-veille-pdv-wrap--compact #blockNonHabFields {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.45rem;
}

.app-veille-pdv-wrap--compact #blockNonHabFields {
    width: 100%;
    margin: 0;
}

.app-veille-pdv-wrap--1v2 #mzPdvForm1v2 .col-md-6,
.app-veille-pdv-wrap--1v2 #blockNonHabFields > .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.app-veille-pdv-wrap--1v2 #mzPdvForm1v2 > .row > .col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.app-veille-pdv-wrap--compact .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.app-veille-pdv-wrap--compact .form-control,
.app-veille-pdv-wrap--compact .form-select {
    min-height: 2.15rem;
    padding: 0.3rem 0.55rem;
    font-size: 0.82rem;
    line-height: 1.3;
}

.app-veille-pdv-wrap--compact textarea.form-control {
    min-height: 2.75rem;
    height: 2.75rem;
    padding: 0.35rem 0.55rem;
    resize: vertical;
}

.app-veille-pdv-wrap--compact #mzPdvForm1v2 > .d-flex.flex-wrap.justify-content-between {
    display: none !important;
}

/* PDV terrain — récapitulatif 2v2 */
.app-veille-pdv-summary {
    border: 1px solid #e4e6ef;
    background: #fff;
}

.app-veille-pdv-summary-title {
    font-size: 1rem;
    font-weight: 700;
    color: #181c32;
    line-height: 1.25;
}

.app-veille-pdv-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.75rem;
}

.app-veille-pdv-summary-item {
    min-width: 0;
}

.app-veille-pdv-summary-item--wide {
    grid-column: 1 / -1;
}

.app-veille-pdv-summary-item dt {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #a1a5b7;
    line-height: 1.2;
}

.app-veille-pdv-summary-item dd {
    margin: 0.1rem 0 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: #3f4254;
    line-height: 1.25;
    word-break: break-word;
}

.app-veille-pdv-wrap--2v2 .app-veille-pdv-content > .card > .card-body {
    padding: 0.35rem 0 0.75rem;
}

.app-veille-pdv-wrap--2v2 .app-veille-pdv-content > .card > .card-body > .text-muted.mb-4,
.app-veille-pdv-wrap--2v2 .mz-pdv-board__title {
    display: none !important;
}

.app-veille-pdv-wrap--2v2 .alert.mb-6 {
    margin-bottom: 0.65rem !important;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
}

.app-veille-pdv-wrap--2v2 #mzPdvFormTriennale .d-flex.justify-content-end {
    display: none !important;
}

/* PDV terrain — tuiles rubriques 2v2 plus compactes (app) */
.app-veille-pdv-wrap--2v2 .mz-pdv-board {
    padding-bottom: 0.5rem;
}

.app-veille-pdv-wrap--2v2 .mz-pdv-grid {
    margin: 0 -3px;
}

.app-veille-pdv-wrap--2v2 .mz-pdv-cat {
    height: 108px;
    min-width: 0;
    margin: 4px;
    padding: 6px 5px 30px;
    border-radius: 6px;
}

.app-veille-pdv-wrap--2v2 .mz-pdv-cat__label {
    min-height: 50px;
    font-size: 13px;
    line-height: 1.28;
    padding: 4px 3px 0;
}

.app-veille-pdv-wrap--2v2 .mz-pdv-cat__footer {
    padding: 3px 6px;
    font-size: 10px;
    line-height: 1.2;
}

.app-veille-pdv-wrap--2v2 .mz-pdv-cat__footer > i {
    font-size: 12px;
    margin-top: 0;
}

.app-veille-pdv-wrap--2v2 .mz-pdv-cat__footer .tag-revoir,
.app-veille-pdv-wrap--2v2 .mz-pdv-cat__footer .ac-recent,
.app-veille-pdv-wrap--2v2 .mz-pdv-cat__footer .triennale-non-vue,
.app-veille-pdv-wrap--2v2 .mz-pdv-cat__footer .triennale-rubrique-sans-item {
    font-size: 9px;
    margin-bottom: 1px;
}

.app-veille-pdv-wrap--2v2 .mz-pdv-cat__footer .bouclage-badge {
    font-size: 9px;
    padding: 1px 4px;
    margin-left: 2px;
}

.app-veille-pdv-wrap--2v2 .mz-pdv-cat__footer img {
    max-height: 12px;
    width: auto;
}

@media (max-width: 575px) {
    .app-veille-pdv-wrap--2v2 .mz-pdv-cat {
        flex: 0 0 calc(50% - 6px);
        max-width: calc(50% - 6px);
    }
}

/* QCM — tuiles liste (style Millet) */
.app-qcm-tile {
    display: block;
    position: relative;
    width: 100%;
    min-height: 6.5rem;
    padding: 1rem 1rem 2.5rem;
    border-radius: 0.55rem;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.app-qcm-tile:hover,
.app-qcm-tile:has(a.app-qcm-tile-main:hover) {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

a.app-qcm-tile-main {
    display: block;
    color: inherit;
    text-decoration: none;
}

a.app-qcm-tile-main:hover {
    color: #fff;
}

.app-qcm-tile.is-disabled {
    filter: grayscale(0.85);
    opacity: 0.75;
    cursor: not-allowed;
}

.app-qcm-tile--orange { background: #f0ad4e; }
.app-qcm-tile--navy { background: #0f4b6e; }
.app-qcm-tile--pink { background: #e91e63; }
.app-qcm-tile--purple { background: #b569c6; }
.app-qcm-tile--blue { background: #4586c7; }
.app-qcm-tile--olive { background: #8c7b1a; }
.app-qcm-tile--teal { background: #38b2ac; }

.app-qcm-tile-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.35;
    padding-right: 4rem;
}

.app-qcm-meta {
    font-size: 0.75rem;
    opacity: 0.92;
    margin-top: 0.35rem;
}

.app-qcm-cat {
    margin-top: 0.4rem;
}

.app-qcm-badge {
    position: absolute;
    right: 0.65rem;
    top: 0.65rem;
    background: #fff;
    color: #333;
    border-radius: 1rem;
    padding: 0.15rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
}

.app-qcm-overlay {
    margin-top: 0.65rem;
    padding: 0.55rem 0.65rem;
    background: rgba(0, 0, 0, 0.22);
    border-radius: 0.35rem;
    font-size: 0.72rem;
}

.app-qcm-pj-hint {
    font-size: 0.72rem;
    margin-top: 0.45rem;
    opacity: 0.95;
}

.app-qcm-pj-inline {
    margin-top: 0.5rem;
    font-size: 0.72rem;
    color: #fff;
    line-height: 1.4;
}

.app-qcm-pj-inline-intro {
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.app-qcm-pj-inline-list {
    margin: 0 0 0 1.1rem;
    padding: 0;
    list-style: disc;
}

.app-qcm-pj-inline-list li {
    margin-bottom: 0.15rem;
}

.app-qcm-pj-inline-link {
    color: #fff;
    text-decoration: underline;
}

.app-qcm-pj-inline-link:hover {
    color: #fff;
    opacity: 0.85;
    text-decoration: none;
}

.app-qcm-recap-q,
.app-qcm-recap-a {
    max-width: 28rem;
    word-wrap: break-word;
    word-break: break-word;
}

.app-qcm-pj-block {
    border-left: 3px solid var(--app-tone-info);
}

.app-qcm-thumb {
    max-height: 3.5rem;
    vertical-align: middle;
    cursor: zoom-in;
}

.app-qcm-thumb-lg {
    max-height: 10rem;
    max-width: 100%;
    cursor: zoom-in;
}

.app-qcm-zoom-img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
}

/* Bulletins de service */
.app-bs-panel {
    font-size: 0.85rem;
}

.app-bs-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--bs-gray-800);
}

.app-bs-list-item {
    display: block;
    padding: 0.85rem 0.65rem;
    margin-bottom: 0.35rem;
    border-radius: 0.5rem;
    border: 1px solid var(--bs-gray-200);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-bs-list-item:hover {
    border-color: var(--app-tone-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    color: inherit;
}

.app-bs-list-item + hr,
.app-bs-panel hr {
    margin: 0.5rem 0;
    opacity: 0.35;
}

/* BS home — layout 3 colonnes */
.app-bs-home-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
    width: 100%;
    min-width: 0;
}

.app-bs-home-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.app-bs-home-panel {
    margin-bottom: 0;
    height: 100%;
}

.app-bs-home-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.35rem;
}

.app-bs-home-panel-sub {
    font-weight: 600;
}

.app-bs-home-demo-note {
    padding: 0.35rem 0.55rem;
    border-radius: 0.4rem;
    background: rgba(54, 153, 235, 0.08);
    border-left: 3px solid #3699ff;
}

.app-bs-home-mission-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.app-bs-home-mission-slot {
    display: grid;
    grid-template-columns: 3.1rem 0.55rem minmax(0, 1fr);
    gap: 0.45rem 0.55rem;
    align-items: start;
    padding: 0.55rem 0.45rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--bs-gray-200);
}

.app-bs-home-mission-time {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--bs-gray-800);
    line-height: 1.2;
}

.app-bs-home-mission-dot {
    width: 0.55rem;
    height: 0.55rem;
    margin-top: 0.35rem;
    border-radius: 50%;
    background: var(--app-tone-primary, #009ef7);
    box-shadow: 0 0 0 3px rgba(0, 158, 247, 0.15);
}

.app-bs-home-mission-dot--info {
    background: #3699ff;
    box-shadow: 0 0 0 3px rgba(54, 153, 235, 0.15);
}

.app-bs-home-mission-dot--teal {
    background: var(--app-tone-teal, #009eb4);
    box-shadow: 0 0 0 3px rgba(0, 158, 180, 0.15);
}

.app-bs-home-mission-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.app-bs-home-mission-day {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #7e8299;
}

.app-bs-home-mission-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--bs-gray-900);
    line-height: 1.35;
}

.app-bs-home-mission-meta {
    font-size: 0.76rem;
    color: var(--bs-gray-600);
}

/* Slots cliquables (Ma journée / prochaines missions) */
a.app-bs-home-mission-slot,
.app-bs-home-mission-slot--link {
    grid-template-columns: 3.1rem 0.55rem minmax(0, 1fr) auto;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

a.app-bs-home-mission-slot:hover,
.app-bs-home-mission-slot--link:hover {
    background: rgba(0, 158, 247, 0.08);
    border-color: rgba(0, 158, 247, 0.35);
}

.app-bs-home-mission-chevron {
    align-self: center;
    color: #a1a5b7;
    font-size: 1rem;
}

/* Bloc « Ma journée » */
.app-bs-home-panel--jour {
    background: rgba(0, 158, 247, 0.05);
    border: 1px solid rgba(0, 158, 247, 0.22);
    border-radius: 0.75rem;
    padding: 1rem 1.1rem;
}

.app-bs-home-jour-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 0.6rem;
    background: #fff;
    border: 1px solid rgba(0, 158, 247, 0.25);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.app-bs-home-jour-card:hover {
    background: rgba(0, 158, 247, 0.06);
    border-color: rgba(0, 158, 247, 0.4);
}

.app-bs-home-jour-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.app-bs-home-jour-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bs-gray-900);
    line-height: 1.3;
}

.app-bs-home-jour-card-meta {
    font-size: 0.8rem;
    color: var(--bs-gray-600);
}

.app-bs-home-jour-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #009ef7;
    white-space: nowrap;
}

.app-bs-home-infos-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.84rem;
    color: var(--bs-gray-700);
}

.app-bs-home-infos-block {
    padding: 0.65rem 0.75rem;
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--bs-gray-200);
}

.app-bs-home-infos-block--mois + .app-bs-home-infos-block--mois {
    margin-top: 0;
}

.app-bs-home-infos-list--compact {
    font-size: 0.8rem;
    gap: 0.35rem;
}

.app-bs-home-bs-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.app-bs-home-bs-card {
    margin-bottom: 0;
}

.app-bs-home-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.25rem 0.85rem;
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px dashed var(--bs-gray-300);
}

.app-bs-home-empty-state--muted {
    padding: 0.85rem;
    background: transparent;
    border-style: solid;
    border-color: var(--bs-gray-200);
}

@media (min-width: 992px) {
    .app-bs-home-layout {
        display: grid;
        grid-template-columns: minmax(220px, 1fr) minmax(200px, 0.95fr) minmax(260px, 1.15fr);
        gap: 1rem 1.15rem;
        align-items: start;
    }

    .app-bs-home-col--agenda {
        position: sticky;
        top: 4.25rem;
        align-self: start;
        max-height: calc(100vh - 5.5rem);
        overflow-y: auto;
    }

    .app-bs-home-col--actions {
        position: sticky;
        top: 4.25rem;
        align-self: start;
        max-height: calc(100vh - 5.5rem);
        overflow-y: auto;
    }
}

@media (min-width: 1200px) {
    .app-bs-home-layout {
        grid-template-columns: minmax(240px, 1.05fr) minmax(220px, 0.9fr) minmax(280px, 1.2fr);
        gap: 1.15rem 1.35rem;
    }
}

.app-bs-nav .form-label {
    font-size: 0.8rem;
}

.app-bs-resume-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* BS résumé — layout 3 colonnes (priorité tablette) */
.app-bs-resume-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.app-bs-resume-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.app-bs-resume-banner {
    min-width: 0;
}

.app-bs-resume-meta-bar {
    padding: 0.65rem 0.85rem;
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--bs-gray-200);
}

.app-bs-resume-meta-bar .app-bs-resume-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
}

@media (min-width: 768px) {
    .app-bs-resume-layout {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem 1.1rem;
        align-items: start;
    }

    .app-bs-resume-banner {
        grid-column: 1 / -1;
    }

    .app-bs-resume-col--general,
    .app-bs-resume-col--mission,
    .app-bs-resume-col--closure {
        align-self: start;
    }
}

@media (min-width: 992px) {
    .app-bs-resume-layout {
        gap: 1.1rem 1.25rem;
    }
}

.app-bs-resume-section {
    margin-bottom: 0;
}

.app-bs-resume-card {
    padding: 1.1rem 1.15rem;
}

.app-bs-resume-head {
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--app-tone-primary);
}

.app-bs-resume-head--edit-only {
    border-bottom: none;
    margin-bottom: 0.5rem;
    padding-bottom: 0;
}

.app-bs-resume-title {
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-gray-800);
}

.app-bs-edit-link {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.app-bs-resume-body,
.app-bs-resume-card {
    font-size: 0.84rem;
    line-height: 1.65;
    color: var(--bs-gray-700);
}

.app-bs-resume-card strong {
    color: var(--bs-gray-900);
    font-weight: 600;
}

.app-bs-resume-subtitle {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--bs-gray-800);
    margin: 1rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--bs-gray-200);
}

.app-bs-resume-card h5.upper.bold {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--bs-gray-800);
    margin: 1rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--bs-gray-200);
}

.app-bs-resume-meta {
    font-size: 0.8rem;
    color: var(--bs-gray-600);
}

.app-bs-resume-actions {
    padding: 1rem 1.15rem;
}

.app-bs-resume-actions .btn {
    margin-bottom: 0.65rem;
}

.app-bs-resume-actions .btn:last-child {
    margin-bottom: 0;
}

.app-bs-resume-modif {
    border-left: 4px solid var(--app-tone-warning) !important;
    background: rgba(255, 153, 0, 0.06);
}

.app-bs-resume-block {
    margin-bottom: 1rem;
}

.app-bs-form-actions {
    position: sticky;
    bottom: 4.5rem;
    z-index: 5;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    padding: 0.75rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--bs-gray-200);
}

/* BS — écrans de saisie (ajout / modification) */
.app-bs-edit-layout {
    width: 100%;
    min-width: 0;
    margin-bottom: 1rem;
}

.app-bs-subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-gray-800);
    margin: 1.25rem 0 0.75rem;
}

.app-bs-inline-form .form-group {
    margin-bottom: 1rem;
}

.app-bs-inline-form .form-group > label,
.app-bs-edit-layout .form-group > label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bs-gray-700);
}

.app-bs-edit-layout select,
.app-bs-inline-form select,
.app-bs-edit-form select {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0.775rem 3rem 0.775rem 1rem;
    font-size: 0.925rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--bs-gray-700);
    background-color: var(--bs-gray-100);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2378829D' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    border: 1px solid var(--bs-gray-200);
    border-radius: 0.475rem;
    appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-bs-edit-layout select:focus,
.app-bs-inline-form select:focus,
.app-bs-edit-form select:focus {
    outline: none;
    border-color: var(--app-tone-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 158, 247, 0.12);
}

.app-bs-edit-layout input[type="text"]:not([class*="form-"]),
.app-bs-inline-form input[type="text"]:not([class*="form-"]),
.app-bs-edit-layout input[type="number"]:not([class*="form-"]),
.app-bs-inline-form input[type="number"]:not([class*="form-"]),
.app-bs-edit-layout input[type="time"]:not([class*="form-"]),
.app-bs-inline-form input[type="time"]:not([class*="form-"]),
.app-bs-edit-layout input[type="file"]:not([class*="form-"]),
.app-bs-inline-form input[type="file"]:not([class*="form-"]),
.app-bs-edit-layout textarea:not([class*="form-"]),
.app-bs-inline-form textarea:not([class*="form-"]) {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.925rem;
    line-height: 1.5;
    color: var(--bs-gray-700);
    background-color: var(--bs-gray-100);
    border: 1px solid var(--bs-gray-200);
    border-radius: 0.475rem;
}

.app-bs-edit-layout .table-responsive {
    margin-top: 0.75rem;
}

.app-bs-edit-layout .table > :not(caption) > * > * {
    vertical-align: middle;
}

.app-bs-edit-card > h4.app-bs-section-title ~ h4.app-bs-section-title {
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bs-gray-200);
}

.app-bs-edit-card {
    padding: 1.15rem 1.2rem;
}

.app-bs-edit-form .form-group {
    margin-bottom: 1rem;
}

.app-bs-edit-form .form-group > label,
.app-bs-edit-form .row > label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bs-gray-700);
}

.app-bs-edit-form input[type="text"]:not([class*="form-"]),
.app-bs-edit-form input[type="number"]:not([class*="form-"]),
.app-bs-edit-form input[type="file"]:not([class*="form-"]),
.app-bs-edit-form textarea:not([class*="form-"]) {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--bs-gray-700);
    background-color: var(--bs-gray-100);
    border: 1px solid var(--bs-gray-300);
    border-radius: 0.475rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-bs-edit-form input[type="text"]:not([class*="form-"]):focus,
.app-bs-edit-form input[type="number"]:not([class*="form-"]):focus,
.app-bs-edit-form textarea:not([class*="form-"]):focus {
    outline: none;
    border-color: var(--app-tone-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 158, 247, 0.12);
}

.app-bs-edit-form hr {
    margin: 1.25rem 0;
    opacity: 0.35;
}

.app-bs-nav.app-bs-panel {
    padding: 1rem 1.1rem;
}

.app-bs-date-field .flatpickr-input[readonly],
.app-ch-date-field .flatpickr-input[readonly],
.app-ch-time-field .flatpickr-input[readonly] {
    cursor: pointer;
}

.app-bs-date-field .input-group-text,
.app-ch-date-field .input-group-text,
.app-ch-time-field .input-group-text {
    cursor: pointer;
}

.app-agent .flatpickr-calendar {
    z-index: 1060;
}

.app-bs-statut-badge {
    font-size: 0.68rem;
    font-weight: 600;
    vertical-align: middle;
}

/* Pastilles type BS — parité webapp/cssz/custom.css (bullServices_TypeMission.cssColor) */
.app-bs-type-badge .icon_violet,
.icon_violet {
    background: #c29bca;
    color: #fff;
    border-radius: 0.45rem;
    line-height: 1.25;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.75rem;
    padding: 0.5rem 0.35rem;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.app-bs-type-badge .icon_blue,
.icon_blue { background: #94b1cb; color: #fff; border-radius: 0.45rem; line-height: 1.25; display: flex; align-items: center; justify-content: center; min-height: 3.75rem; padding: 0.5rem 0.35rem; text-align: center; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.app-bs-type-badge .icon_rouge,
.icon_rouge { background: #d0959d; color: #fff; border-radius: 0.45rem; line-height: 1.25; display: flex; align-items: center; justify-content: center; min-height: 3.75rem; padding: 0.5rem 0.35rem; text-align: center; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.app-bs-type-badge .icon_vert,
.icon_vert { background: #99bb88; color: #fff; border-radius: 0.45rem; line-height: 1.25; display: flex; align-items: center; justify-content: center; min-height: 3.75rem; padding: 0.5rem 0.35rem; text-align: center; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.app-bs-type-badge .icon_gris,
.icon_gris { background: #acacac; color: #fff; border-radius: 0.45rem; line-height: 1.25; display: flex; align-items: center; justify-content: center; min-height: 3.75rem; padding: 0.5rem 0.35rem; text-align: center; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.app-bs-type-badge .icon_rose,
.icon_rose { background: #da9cca; color: #fff; border-radius: 0.45rem; line-height: 1.25; display: flex; align-items: center; justify-content: center; min-height: 3.75rem; padding: 0.5rem 0.35rem; text-align: center; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.app-bs-type-badge .icon_orange,
.icon_orange { background: #ddb35a; color: #fff; border-radius: 0.45rem; line-height: 1.25; display: flex; align-items: center; justify-content: center; min-height: 3.75rem; padding: 0.5rem 0.35rem; text-align: center; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.app-bs-type-badge .icon_marine,
.icon_marine { background: #6e89a6; color: #fff; border-radius: 0.45rem; line-height: 1.25; display: flex; align-items: center; justify-content: center; min-height: 3.75rem; padding: 0.5rem 0.35rem; text-align: center; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.app-bs-type-badge .icon_vertfonce,
.icon_vertfonce { background: #6f9363; color: #fff; border-radius: 0.45rem; line-height: 1.25; display: flex; align-items: center; justify-content: center; min-height: 3.75rem; padding: 0.5rem 0.35rem; text-align: center; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.app-bs-type-badge .icon_bronze,
.icon_bronze { background: #b68a4c; color: #fff; border-radius: 0.45rem; line-height: 1.25; display: flex; align-items: center; justify-content: center; min-height: 3.75rem; padding: 0.5rem 0.35rem; text-align: center; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.app-bs-type-badge .icon_prune,
.icon_prune { background: #9a6a8f; color: #fff; border-radius: 0.45rem; line-height: 1.25; display: flex; align-items: center; justify-content: center; min-height: 3.75rem; padding: 0.5rem 0.35rem; text-align: center; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.app-bs-type-badge .icon_petrole,
.icon_petrole { background: #5b7c7a; color: #fff; border-radius: 0.45rem; line-height: 1.25; display: flex; align-items: center; justify-content: center; min-height: 3.75rem; padding: 0.5rem 0.35rem; text-align: center; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.app-bs-type-badge .icon_moutarde,
.icon_moutarde { background: #c4a04a; color: #fff; border-radius: 0.45rem; line-height: 1.25; display: flex; align-items: center; justify-content: center; min-height: 3.75rem; padding: 0.5rem 0.35rem; text-align: center; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }

.app-bs-list-item .row {
    margin-left: 0;
    margin-right: 0;
}

.app-bs-type-badge {
    padding-right: 0;
}

/* Mon planning démo */
.app-mpd-week {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.app-mpd-day {
    flex: 1 1 7.5rem;
    max-width: 12.5rem;
    min-height: 7.25rem;
    border: 1px solid #95c9b8;
    border-radius: 0.45rem;
    padding: 0.65rem 0.5rem;
    text-align: center;
    cursor: pointer;
    color: #034330;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.app-mpd-day span { display: block; }
.app-mpd-day-title { font-weight: 700; font-size: 0.75rem; margin-bottom: 0.35rem; }
.app-mpd-day-mission { font-weight: 700; font-size: 0.8rem; margin-bottom: 0.25rem; }
.app-mpd-day-hours { font-size: 0.75rem; }
.app-mpd-day-lieu { color: #555; margin-top: 0.25rem; font-size: 0.7rem; }

.app-mpd-day--retard {
    background: #ef0c43;
    border-color: #c00a36;
    color: #fff;
}
.app-mpd-day--retard .app-mpd-day-lieu { color: #fce4ec; }

.app-mpd-day--courant {
    background: #59ace2;
    border-color: #3d8ec4;
    color: #fff;
}
.app-mpd-day--courant .app-mpd-day-lieu { color: #e3f2fd; }

.app-mpd-day--futur {
    background: #e0e0e0;
    border-color: #bdbdbd;
    color: #616161;
    cursor: default;
    box-shadow: none;
}

.app-mpd-day--manuel {
    background: #ef0c43;
    border-color: #c00a36;
    color: #fff;
    flex: 0 0 6.25rem;
    max-width: 7.5rem;
}

.app-mpd-pill-modif {
    display: inline-block;
    background: #ffeb3b;
    color: #333;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 0.35rem;
    border: 1px solid #e6c200;
}

/* Listes cliquables */
.app-list-card {
    background: var(--app-surface);
    border-radius: 0.65rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid #eef0f4;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-list-card:hover {
    border-color: #d8dee9;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.app-list-card--unread {
    border-left: 3px solid var(--app-tone-warning);
}

.app-list-card-btn {
    display: block;
    width: 100%;
    padding: 0.9rem 1rem;
    border: 0;
    background: transparent;
    text-align: inherit;
}

a.app-list-card {
    display: block;
    padding: 0.9rem 1rem;
    color: inherit;
}

/* Congés calendrier */
.app-conge-chip {
    border-radius: 0.5rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.app-conge-chip.conge_paye { background: #7239ea; }
.app-conge-chip.conge_recup { background: #50cd89; }
.app-conge-chip.conge_autre { background: #009ef7; }

/* Fil de discussion */
.app-chat-thread {
    max-height: 65vh;
    overflow-y: auto;
}

.app-chat-msg {
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.app-chat-msg--mine {
    flex-direction: row-reverse;
}

.app-chat-bubble {
    max-width: 85%;
    background: #f4f6fa;
    border-radius: 0.75rem;
    padding: 0.65rem 0.85rem;
}

.app-chat-msg--mine .app-chat-bubble {
    background: #e8f4ff;
}

.app-chat-meta {
    font-size: 0.72rem;
    font-weight: 600;
    color: #7e8299;
    margin-bottom: 0.35rem;
}

.app-chat-text {
    font-size: 0.88rem;
    color: #3f4254;
    word-break: break-word;
}

/* Chambres — planning FullCalendar */
.app-chambres-calendar {
    min-height: 520px;
}

.app-chambres-calendar .fc-toolbar-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.app-chambres-calendar .fc-button {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
}

.app-chambres-calendar .fc-event {
    cursor: pointer;
    font-size: 0.78rem;
}

.app-chambres-resa .badge {
    font-weight: 600;
}

/* Chambres — sous-menu (À venir / Passées / Planning) */
.app-chambres-subnav {
    background: #fff;
    border-radius: 0.75rem;
    padding: 0.25rem 1rem 0;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    border: 1px solid var(--bs-gray-200);
}

.app-chambres-subnav .nav-line-tabs {
    border-bottom-color: var(--bs-gray-200);
}

.app-chambres-subnav .nav-link {
    color: #4b5563;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 0.65rem;
    margin: 0 0.5rem;
    opacity: 1;
}

.app-chambres-subnav .nav-link i {
    color: inherit;
    font-size: 1.05rem;
    vertical-align: -0.1em;
}

.app-chambres-subnav .nav-item:first-child .nav-link {
    margin-left: 0;
}

.app-chambres-subnav .nav-item:last-child .nav-link {
    margin-right: 0;
}

.app-chambres-subnav .nav-link:hover:not(.disabled):not(.active) {
    color: #181c32;
    border-bottom-color: var(--bs-gray-300);
}

.app-chambres-subnav .nav-link.active {
    color: var(--app-tone-teal);
    font-weight: 700;
    border-bottom-color: var(--app-tone-teal);
}

.app-chambres-card {
    border: 1px dashed var(--bs-gray-300);
    border-radius: 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-chambres-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 0.25rem 1rem rgba(30, 136, 229, 0.12);
}

/* Dashboard — raccourcis gestion (widgets, inline dans la grille) */
.app-dash-app--add {
    cursor: pointer;
}

.app-dash-app-icon--add {
    background: transparent !important;
    border: 2px dashed #b5b5c3;
    color: #7e8299 !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.app-dash-app--add:hover .app-dash-app-icon--add,
.app-dash-app--add:focus .app-dash-app-icon--add {
    border-color: var(--app-primary);
    color: var(--app-primary) !important;
    background: rgba(0, 158, 247, 0.06) !important;
}

.app-dashboard-sort-hint {
    grid-column: 1 / -1;
    margin: 0.15rem 0 0.35rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px dashed rgba(0, 158, 247, 0.35);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
    color: #5e6278;
    text-align: center;
}

.app-raccourci-reorder-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    z-index: 1040;
    padding: 0.55rem 0.85rem;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #ebedf3;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.app-raccourci-reorder-bar-inner {
    max-width: 36rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.app-raccourci-reorder-bar-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #181c32;
    min-width: 0;
}

.app-raccourci-reorder-bar-actions {
    display: flex;
    flex-shrink: 0;
    gap: 0.45rem;
}

body.app-raccourci-reorder-active .app-bottom-nav {
    opacity: 0.55;
    pointer-events: none;
}

/* PDV terrain — DataTables accueil */
.app-veille-dt .dataTables_wrapper .dataTables_length,
.app-veille-dt .dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.app-veille-dt .dataTables_wrapper .dataTables_filter input {
    margin-left: 0.35rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--bs-gray-300);
    border-radius: 0.475rem;
    font-size: 0.925rem;
}

.app-veille-dt .dataTables_wrapper .dataTables_info {
    padding-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--bs-gray-600);
}

.app-veille-dt .dataTables_wrapper .dataTables_paginate {
    padding-top: 0.75rem;
}

.app-dashboard-apps.is-sorting-active {
    cursor: grabbing;
}

.app-dashboard-apps--reorder-mode .app-dash-raccourci-link {
    pointer-events: none;
}

.app-dashboard-apps--reorder-mode .app-dash-raccourci-remove,
.app-dashboard-apps--reorder-mode .app-dash-a2hs-remove,
.app-dashboard-apps--reorder-mode .app-dash-app--add {
    display: none !important;
}

.app-dashboard-apps--reorder-mode .app-dash-raccourci-wrap,
.app-dashboard-apps--reorder-mode .app-dash-sort-item:not(.app-dash-raccourci-wrap) {
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    animation: app-raccourci-wiggle 0.35s ease-in-out infinite alternate;
}

@keyframes app-raccourci-wiggle {
    from { transform: rotate(-0.6deg); }
    to { transform: rotate(0.6deg); }
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dashboard-apps--reorder-mode .app-dash-raccourci-wrap,
html.app-dashboard-wallpaper .app-agent--dashboard .app-dashboard-apps--reorder-mode .app-dash-sort-item:not(.app-dash-raccourci-wrap),
.app-agent--dashboard.app-agent--wallpaper .app-dashboard-apps--reorder-mode .app-dash-raccourci-wrap,
.app-agent--dashboard.app-agent--wallpaper .app-dashboard-apps--reorder-mode .app-dash-sort-item:not(.app-dash-raccourci-wrap) {
    animation: app-raccourci-wiggle-wall 0.35s ease-in-out infinite alternate;
}

@keyframes app-raccourci-wiggle-wall {
    from { transform: translateY(-2px) rotate(-0.5deg); }
    to { transform: translateY(-2px) rotate(0.5deg); }
}

.app-dashboard-apps--reorder-mode .app-dash-raccourci-wrap.is-sorting,
.app-dashboard-apps--reorder-mode .app-dash-sort-item:not(.app-dash-raccourci-wrap).is-sorting {
    cursor: grabbing;
    animation: none !important;
    z-index: 30;
    transform: scale(1.06);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dashboard-apps--reorder-mode .app-dash-raccourci-wrap.is-sorting,
html.app-dashboard-wallpaper .app-agent--dashboard .app-dashboard-apps--reorder-mode .app-dash-sort-item:not(.app-dash-raccourci-wrap).is-sorting,
.app-agent--dashboard.app-agent--wallpaper .app-dashboard-apps--reorder-mode .app-dash-raccourci-wrap.is-sorting,
.app-agent--dashboard.app-agent--wallpaper .app-dashboard-apps--reorder-mode .app-dash-sort-item:not(.app-dash-raccourci-wrap).is-sorting {
    transform: translateY(-4px) scale(1.08);
}

.app-dash-raccourci-handle {
    position: absolute;
    left: 0.2rem;
    bottom: 0.2rem;
    z-index: 5;
    width: 1.45rem;
    height: 1.45rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #a1a5b7;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: grab;
    touch-action: none;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.app-dash-raccourci-wrap:hover .app-dash-raccourci-handle,
.app-dash-raccourci-wrap:focus-within .app-dash-raccourci-handle {
    opacity: 0;
}

.app-dashboard-apps--reorder-mode .app-dash-raccourci-handle {
    opacity: 1;
}

.app-dash-raccourci-handle:active,
.app-dash-raccourci-wrap.is-sorting .app-dash-raccourci-handle {
    cursor: grabbing;
    color: var(--app-primary);
    transform: scale(1.08);
}

.app-dash-raccourci-wrap {
    position: relative;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

.app-dash-raccourci-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
    padding: 0.15rem 0.05rem;
    text-decoration: none;
    color: inherit;
}

.app-dash-raccourci-link:hover,
.app-dash-raccourci-link:focus {
    color: inherit;
    text-decoration: none;
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-raccourci-wrap,
.app-agent--dashboard.app-agent--wallpaper .app-dash-raccourci-wrap {
    width: 100%;
    max-width: 8.5rem;
    height: auto;
    aspect-ratio: 1 / 1;
    min-height: 0;
    box-sizing: border-box;
    justify-self: center;
    align-self: start;
    align-items: stretch;
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.42);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 1.15rem;
    padding: 0;
    gap: 0;
    overflow: visible;
    z-index: 1;
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.22s ease, z-index 0s;
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-raccourci-link,
.app-agent--dashboard.app-agent--wallpaper .app-dash-raccourci-link {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    justify-content: flex-start;
    padding: 0;
    gap: 0;
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-raccourci-wrap .app-dash-app-label,
.app-agent--dashboard.app-agent--wallpaper .app-dash-raccourci-wrap .app-dash-app-label {
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    padding: 0.32rem 0.4rem 0.42rem;
    font-size: 0.8rem;
    line-height: 1.25;
    min-height: 2rem;
    background: rgba(255, 255, 255, 0.32);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
    border-bottom-left-radius: 1.05rem;
    border-bottom-right-radius: 1.05rem;
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-raccourci-wrap .app-dash-app-icon,
.app-agent--dashboard.app-agent--wallpaper .app-dash-raccourci-wrap .app-dash-app-icon {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    font-size: 2.95rem;
    border-radius: 0;
    border-top-left-radius: 1.1rem;
    border-top-right-radius: 1.1rem;
    box-shadow: none;
    opacity: 0.78;
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-raccourci-wrap:hover,
html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-raccourci-wrap:focus-within,
.app-agent--dashboard.app-agent--wallpaper .app-dash-raccourci-wrap:hover,
.app-agent--dashboard.app-agent--wallpaper .app-dash-raccourci-wrap:focus-within {
    transform: translateY(-4px) scale(1.1);
    z-index: 3;
    box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-raccourci-wrap:hover .app-dash-app-icon,
html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-raccourci-wrap:focus-within .app-dash-app-icon,
.app-agent--dashboard.app-agent--wallpaper .app-dash-raccourci-wrap:hover .app-dash-app-icon,
.app-agent--dashboard.app-agent--wallpaper .app-dash-raccourci-wrap:focus-within .app-dash-app-icon {
    transform: none;
    filter: brightness(1.05);
    opacity: 0.88;
}

.app-dash-raccourci-remove {
    position: absolute;
    top: -0.15rem;
    right: calc(50% - 2.35rem);
    width: 1.35rem;
    height: 1.35rem;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #a1a5b7;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
    z-index: 4;
}

html.app-dashboard-wallpaper .app-agent--dashboard .app-dash-raccourci-remove,
.app-agent--dashboard.app-agent--wallpaper .app-dash-raccourci-remove {
    top: 0.15rem;
    right: 0.15rem;
}

.app-dash-raccourci-wrap:hover .app-dash-raccourci-remove,
.app-dash-raccourci-wrap:focus-within .app-dash-raccourci-remove {
    opacity: 1;
}

.app-dash-raccourci-remove:hover {
    color: var(--app-tone-danger);
    background: #fff5f8;
}

.app-raccourci-preview {
    border: 1px dashed #e4e6ef;
    border-radius: 0.75rem;
    background: #f9f9f9;
    padding: 1rem;
}

/* Modal ajout raccourci — picker style app */
.app-raccourci-modal .app-raccourci-modal-dialog {
    width: min(94vw, 52rem);
    max-width: min(94vw, 52rem);
}

.app-raccourci-modal .modal-content {
    border: none;
    border-radius: 1.15rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.app-raccourci-modal .modal-body {
    overflow: visible;
}

.app-raccourci-modal-lead {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    line-height: 1.45;
    color: #7e8299;
}

.app-raccourci-split {
    display: flex;
    min-height: 16rem;
    max-height: min(52vh, 400px);
    border: 1px solid #ebedf3;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #f9fafb;
}

.app-raccourci-cats {
    flex: 0 0 9.25rem;
    width: 9.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem 0;
    border-right: 1px solid #ebedf3;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.app-raccourci-cat-tab {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
    padding: 0.55rem 0.6rem 0.55rem 0.55rem;
    border: none;
    border-left: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    color: #7e8299;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.app-raccourci-cat-tab:hover,
.app-raccourci-cat-tab:focus-visible {
    background: rgba(255, 255, 255, 0.65);
    color: #3f4254;
    outline: none;
}

.app-raccourci-cat-tab.is-active {
    background: #fff;
    color: var(--app-primary);
    border-left-color: var(--app-primary);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.app-raccourci-cat-count {
    flex-shrink: 0;
    min-width: 1.15rem;
    padding: 0.08rem 0.3rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: #a1a5b7;
}

.app-raccourci-cat-tab.is-active .app-raccourci-cat-count {
    background: rgba(0, 158, 247, 0.12);
    color: var(--app-primary);
}

.app-raccourci-panels {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}

.app-raccourci-panel {
    display: none;
    padding: 0.85rem 0.9rem;
}

.app-raccourci-panel.is-active {
    display: block;
}

.app-raccourci-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem 0.5rem;
}

@media (min-width: 520px) {
    .app-raccourci-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 720px) {
    .app-raccourci-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .app-raccourci-cats {
        flex-basis: 10.5rem;
        width: 10.5rem;
    }
}

.app-raccourci-pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 0;
    padding: 0.45rem 0.25rem 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.72);
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.app-raccourci-pick:hover,
.app-raccourci-pick:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    outline: none;
}

.app-raccourci-pick:active {
    transform: scale(0.96);
}

.app-raccourci-pick.is-selected {
    border-color: var(--app-primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 0 0 3px rgba(0, 158, 247, 0.18),
        0 6px 18px rgba(0, 0, 0, 0.1);
}

.app-raccourci-pick-icon {
    width: 2.85rem;
    height: 2.85rem;
    flex-shrink: 0;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.55rem;
    line-height: 1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.app-raccourci-pick.is-selected .app-raccourci-pick-icon {
    transform: scale(1.06);
}

.app-raccourci-pick-icon i {
    font-size: inherit;
    color: inherit;
}

.app-raccourci-pick-icon[data-tone="success"] { background: var(--app-tone-success); }
.app-raccourci-pick-icon[data-tone="info"] { background: var(--app-tone-info); }
.app-raccourci-pick-icon[data-tone="primary"] { background: var(--app-tone-primary); }
.app-raccourci-pick-icon[data-tone="danger"] { background: var(--app-tone-danger); }
.app-raccourci-pick-icon[data-tone="warning"] { background: var(--app-tone-warning); }
.app-raccourci-pick-icon[data-tone="violet"] { background: var(--app-tone-violet); }
.app-raccourci-pick-icon[data-tone="purple"] { background: var(--app-tone-purple); }
.app-raccourci-pick-icon[data-tone="teal"] { background: var(--app-tone-teal); }
.app-raccourci-pick-icon[data-tone="mint"] { background: var(--app-tone-mint); }
.app-raccourci-pick-icon[data-tone="bs"] { background: var(--app-tone-bs); }

.app-raccourci-pick-label {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
    margin-top: 0.38rem;
    padding: 0 0.1rem;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    color: #3f4254;
}

.app-raccourci-colors-panel {
    margin-top: 1.25rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.95rem;
    background: linear-gradient(180deg, #f5f8fa 0%, #eef3f7 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.app-raccourci-colors-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.app-raccourci-colors-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #181c32;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-raccourci-colors-hint {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a1a5b7;
}

.app-raccourci-tones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.app-raccourci-error {
    margin-top: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.65rem;
    background: #fff5f8;
    color: var(--app-tone-danger);
    font-size: 0.82rem;
    font-weight: 600;
}

.app-raccourci-modal .app-raccourci-btn-cancel,
.app-raccourci-modal .app-raccourci-btn-add {
    border-radius: 0.75rem;
    padding: 0.55rem 1.15rem;
    font-weight: 600;
}

.app-raccourci-tone-btn {
    border: 2px solid transparent;
    background: transparent;
    border-radius: 999px;
    padding: 0.2rem;
    cursor: pointer;
    line-height: 0;
    flex-shrink: 0;
}

.app-raccourci-tone-btn.is-active {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 2px rgba(0, 158, 247, 0.15);
}

.app-raccourci-tone-swatch {
    display: block;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.app-raccourci-tone-swatch[data-tone="success"] { background: var(--app-tone-success); }
.app-raccourci-tone-swatch[data-tone="info"] { background: var(--app-tone-info); }
.app-raccourci-tone-swatch[data-tone="primary"] { background: var(--app-tone-primary); }
.app-raccourci-tone-swatch[data-tone="danger"] { background: var(--app-tone-danger); }
.app-raccourci-tone-swatch[data-tone="warning"] { background: var(--app-tone-warning); }
.app-raccourci-tone-swatch[data-tone="violet"] { background: var(--app-tone-violet); }
.app-raccourci-tone-swatch[data-tone="purple"] { background: var(--app-tone-purple); }
.app-raccourci-tone-swatch[data-tone="teal"] { background: var(--app-tone-teal); }
.app-raccourci-tone-swatch[data-tone="mint"] { background: var(--app-tone-mint); }
.app-raccourci-tone-swatch[data-tone="bs"] { background: var(--app-tone-bs); }

/* QCM — corrigé après réussite */
.app-qcm-review {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.app-qcm-review-intro {
    padding: 1rem 1.15rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(56, 189, 248, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.app-qcm-review-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(16, 185, 129, 0.18);
    color: #059669;
    flex-shrink: 0;
}
.app-qcm-review-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 1.15rem 1.25rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    text-align: left;
}
.app-qcm-review-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.app-qcm-review-num {
    display: inline-grid;
    place-items: center;
    min-width: 1.85rem;
    height: 1.85rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}
.app-qcm-review-box {
    border-radius: 12px;
    padding: 0.85rem 1rem;
    min-height: 100%;
    font-size: 0.9rem;
}
.app-qcm-review-box-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
    opacity: 0.85;
}
.app-qcm-review-box--wrong {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.22);
}
.app-qcm-review-box--wrong .app-qcm-review-box-label { color: #b91c1c; }
.app-qcm-review-box--good {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.28);
}
.app-qcm-review-box--good .app-qcm-review-box-label { color: #047857; }
.app-qcm-review-perfect {
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.1rem 1rem;
}

/* -------------------------------------------------------------------------
   Accessibilité (Paramètres) — contraste, animations, zones de clic
   ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

html[data-app-a11y-reduce-motion="1"] *,
html[data-app-a11y-reduce-motion="1"] *::before,
html[data-app-a11y-reduce-motion="1"] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

html[data-app-a11y-contrast="1"] {
    --app-text: #0a0a0a;
    --app-text-muted: #1e293b;
    color-scheme: light;
}

html[data-app-a11y-contrast="1"] body,
html[data-app-a11y-contrast="1"] .app-root {
    color: #0a0a0a;
}

html[data-app-a11y-contrast="1"] .text-muted,
html[data-app-a11y-contrast="1"] .text-gray-500,
html[data-app-a11y-contrast="1"] .text-gray-600,
html[data-app-a11y-contrast="1"] .form-text {
    color: #1e293b !important;
    opacity: 1 !important;
}

html[data-app-a11y-contrast="1"] a:not(.btn):not(.nav-link):not(.app-header-action) {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

html[data-app-a11y-contrast="1"] .card,
html[data-app-a11y-contrast="1"] .modal-content,
html[data-app-a11y-contrast="1"] .dropdown-menu,
html[data-app-a11y-contrast="1"] .form-control,
html[data-app-a11y-contrast="1"] .form-select,
html[data-app-a11y-contrast="1"] .app-settings-wallpaper-choice {
    border-color: #0f172a !important;
    border-width: 2px;
}

html[data-app-a11y-contrast="1"] .btn {
    border-width: 2px;
    font-weight: 600;
}

html[data-app-a11y-contrast="1"] .badge,
html[data-app-a11y-contrast="1"] .btn-light,
html[data-app-a11y-contrast="1"] .btn-light-primary {
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.35);
}

html[data-app-a11y-contrast="1"] :focus-visible {
    outline: 3px solid #000 !important;
    outline-offset: 2px !important;
}

html[data-app-a11y-large-targets="1"] .btn,
html[data-app-a11y-large-targets="1"] .app-header-action,
html[data-app-a11y-large-targets="1"] .nav-link,
html[data-app-a11y-large-targets="1"] .page-link,
html[data-app-a11y-large-targets="1"] .dropdown-item {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
}

html[data-app-a11y-large-targets="1"] .btn-icon {
    min-width: 2.75rem;
    min-height: 2.75rem;
    justify-content: center;
}

html[data-app-a11y-large-targets="1"] .form-control,
html[data-app-a11y-large-targets="1"] .form-select,
html[data-app-a11y-large-targets="1"] .form-check-input {
    min-height: 2.75rem;
}

html[data-app-a11y-large-targets="1"] .form-check-input[type="checkbox"],
html[data-app-a11y-large-targets="1"] .form-check-input[type="radio"] {
    width: 1.35rem;
    height: 1.35rem;
    min-height: 1.35rem;
}

html[data-app-a11y-large-targets="1"] .form-check.form-switch .form-check-input {
    width: 3.25rem;
    height: 1.75rem;
    min-height: 1.75rem;
}

html[data-app-a11y-large-targets="1"] .app-dashboard-tile,
html[data-app-a11y-large-targets="1"] .app-tile,
html[data-app-a11y-large-targets="1"] a.app-module-card {
    min-height: 5.5rem;
}
