/* Color Theme Variables */
:root {
    /* Charte principale */
    --brand-50: #D4E5D8;
    --brand-200: #A3BFB2;
    --brand-700: #2F5554;

    /* Charte secondaire */
    --accent-100: #C19FAC;
    --accent-500: #A34B69;
    --accent-700: #7D4158;

    /* Neutre */
    --neutral-50: #F4F1EE;

    /* Tokens d'usage */
    --primary-gradient: linear-gradient(180deg, var(--brand-700) 0%, #274847 100%);
    --primary-color: var(--brand-700);
    --primary-hover: #274847;
    --primary-light: rgba(47, 85, 84, 0.10);
    --primary-soft: var(--brand-50);
    --accent-color: var(--accent-500);
    --accent-hover: var(--accent-700);
    --surface-soft: var(--neutral-50);
    --surface-muted: #ffffff;
    --border-soft: #d9d7d3;
    --text-strong: #213635;
    --shadow-soft: 0 4px 14px rgba(47, 85, 84, 0.08);
}

h1:focus {
    outline: none;
}

/* Header unifie sur toutes les pages */
.app-page-header {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.35rem !important;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.app-page-header svg {
    width: 1.45rem !important;
    height: 1.45rem !important;
    flex-shrink: 0;
}

.app-focus-scope .btn:focus-visible,
.app-focus-scope .form-control:focus-visible,
.app-focus-scope .form-select:focus-visible,
.app-focus-scope .form-check-input:focus-visible,
.app-focus-scope .form-range:focus-visible,
.app-focus-scope textarea:focus-visible,
.app-focus-ring:focus-visible {
    outline: 2px solid rgba(163, 191, 178, 0.95);
    outline-offset: 2px;
}

.app-card-header-soft {
    background: rgba(163, 191, 178, .18) !important;
    border-bottom: 1px solid var(--border-soft) !important;
    font-weight: 700;
    color: var(--text-strong);
}

.app-card-header-primary {
    background: var(--primary-color) !important;
    color: #fff !important;
}

.app-card-header-primary .badge {
    color: var(--text-strong);
}

.app-toolbar-gap {
    gap: 0.75rem;
}

.app-sticky-action-bar {
    position: sticky;
    bottom: 8px;
    z-index: 5;
    background: rgba(244, 241, 238, .92);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.delivery-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.delivery-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(47, 85, 84, 0.18);
    border-radius: 999px;
    background: rgba(244, 241, 238, .82);
    color: var(--primary-color);
    padding: 5px 10px;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
}

.delivery-tag-chip-accent {
    border-color: rgba(163, 75, 105, .26);
    background: rgba(193, 159, 172, .22);
    color: var(--accent-700);
}

.delivery-tag-chip-sage-light {
    border-color: rgba(47, 85, 84, .16);
    background: rgba(212, 229, 216, .72);
    color: var(--primary-color);
}

.delivery-tag-chip-sage {
    border-color: rgba(47, 85, 84, .22);
    background: rgba(163, 191, 178, .38);
    color: var(--primary-color);
}

.delivery-tag-chip-brand {
    border-color: rgba(47, 85, 84, .35);
    background: rgba(47, 85, 84, .12);
    color: var(--primary-color);
}

.delivery-tag-chip-blush {
    border-color: rgba(125, 65, 88, .18);
    background: rgba(193, 159, 172, .28);
    color: var(--accent-700);
}

.delivery-tag-chip-plum {
    border-color: rgba(125, 65, 88, .28);
    background: rgba(125, 65, 88, .14);
    color: var(--accent-700);
}

.delivery-tag-chip-neutral {
    border-color: rgba(47, 85, 84, .14);
    background: rgba(244, 241, 238, .94);
    color: var(--text-strong);
}

.delivery-tag-option {
    cursor: pointer;
    user-select: none;
    opacity: .72;
}

.delivery-tag-option.selected {
    opacity: 1;
    box-shadow: inset 0 0 0 1px currentColor;
}

@media (max-width: 992px) {
    .app-page-header {
        font-size: 1.2rem !important;
        gap: 0.45rem;
    }

    .app-page-header svg {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
}

@media (max-width: 576px) {
    .app-sticky-action-bar {
        bottom: 0;
        border-radius: 12px 12px 0 0;
    }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Theme Application */
.themed-header {
    background: var(--primary-gradient) !important;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(47, 85, 84, 0.18);
}

.themed-header .navbar-brand {
    color: #fff !important;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.themed-header .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
    border-radius: 8px;
    transition: background-color .15s ease, color .15s ease;
}

.themed-header .nav-link:hover,
.themed-header .nav-link:focus {
    background-color: rgba(212, 229, 216, 0.12);
    color: #fff !important;
}

.themed-header .dropdown-menu {
    margin-top: .35rem;
    border-radius: 12px;
    background: #fff;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--brand-200);
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-light {
    background-color: var(--surface-soft) !important;
}

.table-light,
.table > :not(caption) > * > .table-light {
    --bs-table-bg: var(--surface-soft);
}

.card {
    border-color: var(--border-soft);
    box-shadow: var(--shadow-soft);
}

.card-header {
    border-bottom-color: var(--border-soft);
}

.table {
    --bs-table-border-color: #e3e0db;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: rgba(163, 191, 178, 0.14);
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.badge.bg-secondary {
    background-color: var(--accent-100) !important;
    color: #2f2430 !important;
}

.badge.bg-danger {
    background-color: var(--accent-500) !important;
}

.badge.bg-dark {
    background-color: var(--accent-700) !important;
}

.badge.bg-info.text-dark {
    background-color: var(--neutral-50) !important;
    border: 1px solid var(--border-soft);
}

.badge.bg-warning.text-dark {
    background-color: var(--brand-50) !important;
    border: 1px solid rgba(47, 85, 84, 0.15);
    color: var(--text-strong) !important;
}

.dropdown-menu {
    border-color: var(--border-soft);
    box-shadow: 0 12px 30px rgba(47, 85, 84, 0.10);
}

.dropdown-item:active,
.dropdown-item.active {
    background-color: var(--primary-color);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(212, 229, 216, 0.45);
    color: var(--text-strong);
}

.alert-success {
    background-color: rgba(163, 191, 178, 0.22);
    border-color: rgba(47, 85, 84, 0.18);
    color: #22403f;
}

.alert-danger {
    background-color: rgba(163, 75, 105, 0.10);
    border-color: rgba(163, 75, 105, 0.25);
    color: #6a2940;
}

.alert-warning {
    background-color: rgba(244, 241, 238, 0.9);
    border-color: rgba(193, 159, 172, 0.35);
    color: #5a4650;
}

/* Custom styles for the app */
html, body {
    height: 100%;
    background: linear-gradient(180deg, #fbfaf8 0%, var(--surface-soft) 100%);
    color: var(--text-strong);
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content {
    flex: 1;
    padding: 2rem 0;
    background-color: var(--surface-soft);
}

.footer {
    margin-top: auto;
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    font-size: 0.9rem;
}

/* ===== Data display (Plan 7) ===== */
.qty-display { font-variant-numeric: tabular-nums; }
.qty-unit { color: var(--bs-secondary-color, #6c757d); font-weight: 400; }
.action-figure { font-size: 1.15rem; font-weight: 700; padding: .35rem .6rem;
  border: 2px solid var(--brand-700); border-radius: .5rem; background: var(--brand-50, #eef4f4); }
.stat-badge { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
.stat-badge-ok { background: var(--brand-700); color: #fff; }
.stat-badge-warning { background: #f0ad4e; color: #212529; }
.stat-badge-danger { background: var(--accent-500); color: #fff; }
.stat-badge-info { background: #5bc0de; color: #212529; }
.stat-badge-neutral { background: #6c757d; color: #fff; }
.calc-breakdown { font-size: .85rem; background: var(--bs-tertiary-bg, #f8f9fa);
  border-left: 3px solid var(--brand-700); padding: .4rem .6rem; margin-top: .25rem; }
.calc-part { margin-right: .5rem; white-space: nowrap; }
.calc-result { font-weight: 700; }

/* Équation reconstructible en pastilles signées (EquationPills / CalculationBreakdown) :
   chaque terme montre TOUJOURS son signe en texte (+ / −), jamais la couleur seule. La couleur
   code le SENS métier (ambre = besoin/demande, vert = disponible : ce qu'on a ou reçoit), pas
   le signe arithmétique — voir la note dans Components/Shared/EquationPills.razor. */
.dz-eqn { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .35rem; row-gap: .3rem; }
.dz-eqn-pill {
    display: inline-flex; align-items: center; gap: .25rem;
    border-radius: 999px; padding: .12rem .55rem; font-size: .74rem; font-weight: 600;
    white-space: nowrap; line-height: 1.4;
}
.dz-eqn-pill--besoin { background: #FCEFDC; color: #8A5A00; border: 1px solid #F0C989; }
.dz-eqn-pill--disponible { background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-200); }
.dz-eqn-sign { font-weight: 800; }
.dz-eqn-op { font-weight: 700; opacity: .55; margin: 0 .1rem; }
.dz-eqn-result { font-weight: 700; color: #fff; border: none; }
.dz-eqn-result--danger { background: var(--accent-500); }
.dz-eqn-result--ok { background: var(--brand-700); }
.dz-eqn-result--warning { background: #f0ad4e; color: #212529; }
.dz-eqn-result--neutral { background: #6c757d; }
.saisie-vide { background: #fffdf0; border-color: #f0ad4e !important; }
.saisie-remplie { background: #f2f8f5; border-color: var(--brand-700) !important; }

/* ===== Trou tablette 769-1024px (Plan 7 / Tâche 6) =====
   Constat audit : entre le breakpoint mobile (768px) et desktop (1024px+), certains
   tableaux perdaient leur défilement horizontal ou débordaient sans indice visuel.
   On généralise ici le comportement de .table-responsive sur cette plage et on ajoute
   une ombre de débordement à droite (affordance de scroll) tant que le tableau n'est
   pas scrollé jusqu'au bout. */
.table-responsive {
    position: relative;
}

.table-responsive::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.08));
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

/* ===== File de triage (Plan 8 / Tâche 1) =====
   Classes réutilisables pour la refonte "file de triage" du Tableau de Bord
   (option 1a du handoff design) : bandeau de tête, chips de filtre, ligne de
   file, tuile monogramme, mini-jauge, stepper, rail droit et pastilles
   d'équation (modale 4a). Préfixe .dz- pour éviter toute collision avec les
   classes existantes. */

.dz-header {
    background: var(--primary-gradient);
    color: #fff;
    border-radius: 16px 16px 0 0;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.dz-header-title { display: flex; align-items: center; gap: 12px; }
.dz-header-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(255,255,255,.14);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dz-header-heading { font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; }
.dz-header-subtitle { font-size: .76rem; color: rgba(255,255,255,.7); margin-top: 1px; }
.dz-header-kpis { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.dz-header-kpi { text-align: right; }
.dz-header-kpi-label {
    font-size: .66rem; text-transform: uppercase; letter-spacing: .06em;
    color: rgba(255,255,255,.62);
}
.dz-header-kpi-value { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dz-header-kpi-alert .dz-header-kpi-value,
.dz-header-kpi-alert .dz-header-kpi-label { color: var(--accent-100); }
.dz-header-kpi-divider { width: 1px; height: 28px; background: rgba(255,255,255,.18); }
/* Bandeau de tête utilisé seul (sans .dz-body dessous, ex. dashboards de consultation
   Stockage/Logements) : coins entièrement arrondis + marge basse. */
.dz-header--solo { border-radius: 16px; margin-bottom: 16px; }

.dz-body {
    background: #fff;
    border-radius: 0 0 16px 16px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}
.dz-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 0;
    align-items: start;
}
@media (max-width: 992px) {
    .dz-grid { grid-template-columns: 1fr; }
    .dz-rail { border-left: 0 !important; border-top: 1px solid var(--border-soft); }
}

.dz-main { padding: 20px 22px; min-width: 0; }

.dz-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.dz-chips-label {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--text-strong); opacity: .55; font-weight: 600; margin-right: 2px;
}
.dz-chip {
    padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border-soft);
    background: #fff; color: var(--text-strong); font-size: .78rem; font-weight: 500;
    cursor: pointer; line-height: 1.4;
}
.dz-chip.active { background: var(--primary-color); border-color: var(--primary-color); color: #fff; font-weight: 600; }
.dz-chip-toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-strong); }
.dz-chip-toggle input { width: 16px; height: 16px; accent-color: var(--primary-color); cursor: pointer; }

.dz-section-title {
    display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
    margin-bottom: 12px; flex-wrap: wrap;
}
.dz-section-title h3 {
    margin: 0; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--accent-700); font-weight: 700;
}
.dz-section-meta { font-size: .76rem; color: var(--text-strong); opacity: .6; }

.dz-queue { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.dz-queue-row {
    display: flex; align-items: center; gap: 16px; background: #fff;
    border: 1px solid var(--border-soft); border-left: 4px solid var(--border-soft);
    border-radius: 14px; padding: 13px 16px; cursor: pointer;
}
.dz-queue-row:hover { background: rgba(163,191,178,.14); }
.dz-queue-row--critical { border-left-color: var(--accent-500); }
.dz-queue-row--watch { border-left-color: var(--accent-100); }
.dz-queue-row--ok { border-left-color: var(--brand-700); }

.dz-monogram {
    width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.05rem;
}
.dz-monogram--critical { background: #f2e3e9; color: var(--accent-500); }
.dz-monogram--watch { background: #f2e3e9; color: var(--accent-700); }
.dz-monogram--ok, .dz-monogram--pack { background: var(--brand-50); color: var(--primary-color); }

.dz-queue-row-body { min-width: 0; flex: 1; }
.dz-queue-row-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dz-queue-row-name strong { font-weight: 600; font-size: .95rem; color: var(--text-strong); }
.dz-type-chip {
    font-size: .66rem; padding: 2px 7px; border-radius: 5px;
    background: var(--surface-soft); color: var(--text-strong); opacity: .85;
}
.dz-queue-row-note { font-size: .72rem; color: var(--text-strong); opacity: .6; margin-top: 3px; }

.dz-gauge-wrap { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.dz-gauge {
    flex: 1; max-width: 220px; height: 7px; border-radius: 999px;
    background: #eee7e9; overflow: hidden; display: flex;
}
.dz-gauge-stock { background: var(--brand-700); height: 100%; }
.dz-gauge-order { background: var(--brand-200); height: 100%; }
.dz-gauge-manque {
    height: 100%;
    background: repeating-linear-gradient(45deg,#e3b9c8,#e3b9c8 5px,#edcdd8 5px,#edcdd8 10px);
}
.dz-gauge-label { font-size: .72rem; color: var(--text-strong); opacity: .6; font-variant-numeric: tabular-nums; white-space: nowrap; }

.dz-col-meta { text-align: center; min-width: 70px; }
.dz-col-meta-label { font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-strong); opacity: .5; }
.dz-col-meta-value { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-strong); opacity: .75; }
.dz-col-action { text-align: center; min-width: 78px; }
.dz-col-action-label { font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-500); }
.dz-col-action-value { font-weight: 700; font-size: 1.2rem; color: var(--accent-500); font-variant-numeric: tabular-nums; }

.dz-stepper {
    display: inline-flex; align-items: center; border: 1px solid var(--border-soft);
    border-radius: 10px; overflow: hidden; background: #fff; flex-shrink: 0;
}
.dz-stepper button {
    border: 0; background: var(--surface-soft); width: 32px; height: 36px;
    font-size: 1.1rem; color: var(--primary-color); cursor: pointer;
}
.dz-stepper button:disabled { opacity: .5; cursor: not-allowed; }
.dz-stepper input {
    width: 52px; height: 36px; border: 0; border-left: 1px solid var(--border-soft);
    border-right: 1px solid var(--border-soft); text-align: center; font-size: .9rem;
    font-weight: 600; color: var(--text-strong); font-variant-numeric: tabular-nums;
}
.dz-stepper input::-webkit-outer-spin-button,
.dz-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dz-stepper input[type=number] { -moz-appearance: textfield; }

.dz-btn-order {
    border: 0; background: var(--primary-color); color: #fff; font-weight: 600;
    font-size: .84rem; padding: 9px 16px; border-radius: 10px; cursor: pointer;
    white-space: nowrap; flex-shrink: 0;
}
.dz-btn-order:hover { background: var(--primary-hover); }
.dz-btn-order:disabled { opacity: .6; cursor: not-allowed; }
a.dz-btn-order { display: inline-flex; align-items: center; justify-content: center; }
a.dz-btn-order:hover { color: #fff; }

.dz-collapsed-toggle {
    width: 100%; margin-top: 4px; display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 11px; border: 1px dashed var(--border-soft); background: transparent;
    border-radius: 12px; color: var(--text-strong); opacity: .8; font-size: .8rem; cursor: pointer;
}
.dz-collapsed-toggle:hover { opacity: 1; background: var(--surface-soft); }
.dz-collapsed-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--brand-700); display: inline-block; }

.dz-rail { background: #fff; border-left: 1px solid var(--border-soft); padding: 20px; }
.dz-rail-title { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.dz-rail-title strong { font-weight: 700; font-size: .92rem; color: var(--accent-700); }
.dz-rail-badge {
    margin-left: auto; background: #f2e3e9; color: var(--accent-700); font-weight: 700;
    border-radius: 999px; padding: 2px 9px; font-size: .78rem; font-variant-numeric: tabular-nums;
}
.dz-rail-meta { font-size: .72rem; color: var(--text-strong); opacity: .6; margin-bottom: 14px; }
.dz-rail-list { display: flex; flex-direction: column; gap: 9px; }
.dz-rail-item { border: 1px solid #ecdfe4; border-radius: 11px; padding: 11px 12px; background: #fdf9fb; }
.dz-rail-item-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.dz-rail-item-head strong { font-weight: 600; font-size: .86rem; }
.dz-rail-item-qty { font-weight: 700; color: var(--accent-700); font-size: .82rem; font-variant-numeric: tabular-nums; }
.dz-rail-item-note { font-size: .72rem; color: var(--text-strong); opacity: .6; margin-top: 5px; }
.dz-rail-item .dz-btn-cancel {
    margin-top: 8px; border: 1px solid #d7b7c2; background: #fff; color: var(--accent-500);
    font-size: .74rem; padding: 4px 10px; border-radius: 8px; cursor: pointer;
}
.dz-rail-item .dz-btn-cancel:disabled { opacity: .5; cursor: not-allowed; }
.dz-rail-export {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid var(--border-soft); background: var(--surface-soft); color: var(--text-strong);
    font-size: .82rem; font-weight: 500; padding: 10px; border-radius: 10px; cursor: pointer;
}
.dz-rail-export:hover { background: var(--brand-50); }

/* Modale 4a : bandeau équation en pastilles */
.dz-equation {
    background: var(--surface-soft); border: 1px solid var(--border-soft); border-radius: 13px;
    padding: 14px 16px; margin-bottom: 20px;
}
.dz-equation-title {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-strong);
    opacity: .6; font-weight: 700; margin-bottom: 11px;
}
.dz-equation-row { display: flex; align-items: stretch; gap: 9px; flex-wrap: wrap; }
.dz-equation-pill {
    background: #fff; border: 1px solid var(--border-soft); border-radius: 10px;
    padding: 8px 12px; text-align: center; min-width: 76px;
}
.dz-equation-pill-label { font-size: .66rem; color: var(--text-strong); opacity: .6; }
.dz-equation-pill-value { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.dz-equation-pill-value--alert { color: var(--accent-700); }
.dz-equation-op { display: flex; align-items: center; color: var(--text-strong); opacity: .6; font-weight: 700; font-size: 1.1rem; }
.dz-equation-result {
    background: var(--primary-color); border-radius: 10px; padding: 8px 16px; text-align: center;
    color: #fff; display: flex; flex-direction: column; justify-content: center; min-width: 90px;
}
.dz-equation-result-manque { background: var(--accent-500); }
.dz-equation-result .dz-equation-pill-label { color: rgba(255,255,255,.75); }
.dz-equation-result .dz-equation-pill-value { color: #fff; }

/* ===== Maître-détail « Origine du besoin » (Plan 8 / Tâche 2) =====
   Classes réutilisables pour la refonte du Tableau de Bord Lieux de Stockage
   (option 2c du handoff design) : shell maître-détail 300px/1fr, liste des
   lieux, cartes d'article dépliables et lignes d'origine (logement/stockage
   secondaire). Réutilise .dz-monogram, .dz-equation*, .dz-btn-order,
   .dz-chip*, .dz-modal-*, .dz-section-count et .dz-collapsed-* définis
   ci-dessus. Préfixe .dz-md- pour éviter toute collision. */

.dz-md-shell {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-columns: 300px 1fr;
    overflow: hidden;
    align-items: start;
}
/* Responsive < 992px : la liste des lieux passe au-dessus du détail (empilée),
   plutôt qu'un sélecteur déroulant, pour rester cohérent avec le pattern déjà
   établi par .dz-grid (Plan 8 / Tâche 1, page Commandes des Stocks). */
@media (max-width: 992px) {
    .dz-md-shell { grid-template-columns: 1fr; }
    .dz-md-list {
        border-right: 0;
        border-bottom: 1px solid var(--border-soft);
        flex-direction: row;
        flex-wrap: wrap;
        overflow-x: auto;
    }
    .dz-md-list-item { min-width: 180px; flex: 1 1 auto; }
}

.dz-md-list {
    background: var(--surface-soft);
    border-right: 1px solid var(--border-soft);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dz-md-list-item {
    display: flex; flex-direction: column; gap: 2px; text-align: left;
    background: #fff; border: 1px solid var(--border-soft); border-radius: 12px;
    padding: 10px 12px; cursor: pointer;
}
.dz-md-list-item:hover { background: rgba(163,191,178,.14); }
.dz-md-list-item--selected { border: 2px solid var(--primary-color); padding: 9px 11px; }
.dz-md-list-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dz-md-list-item-name { font-weight: 700; font-size: .9rem; color: var(--text-strong); }
.dz-md-list-item-sub { font-size: .7rem; color: var(--text-strong); opacity: .6; }

.dz-md-badge {
    font-weight: 700; font-size: .72rem; border-radius: 999px; padding: 2px 9px;
    white-space: nowrap; flex-shrink: 0;
}
.dz-md-badge--alert { background: rgba(163, 75, 105, .12); /* teinte dérivée de --accent-500 (#A34B69) */ color: var(--accent-500); }
.dz-md-badge--ok { background: var(--brand-50); color: var(--brand-700); }

.dz-md-detail { padding: 18px 20px; min-width: 0; }
.dz-md-detail-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.dz-md-detail-title { font-weight: 700; font-size: 1rem; color: var(--text-strong); }
.dz-md-detail-meta { font-size: .78rem; color: var(--text-strong); opacity: .65; margin-top: 2px; }

.dz-md-card { border: 1px solid var(--border-soft); border-radius: 14px; margin-bottom: 10px; overflow: hidden; background: #fff; }
.dz-md-card-band { display: flex; align-items: center; gap: 14px; padding: 12px 14px; cursor: pointer; flex-wrap: wrap; }
.dz-md-card-band:hover { background: rgba(163,191,178,.14); }
.dz-md-card-body-name { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 160px; }
.dz-md-card-meta { font-size: .74rem; color: var(--text-strong); opacity: .6; margin-top: 2px; }
.dz-md-card-manque { text-align: center; min-width: 70px; }
.dz-md-card-manque-label { font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-500); }
.dz-md-card-manque-value { font-weight: 700; font-size: 1.15rem; color: var(--accent-500); font-variant-numeric: tabular-nums; }
.dz-md-card-chevron { color: var(--text-strong); opacity: .5; }

.dz-md-card-body { border-top: 1px solid var(--border-soft); background: var(--surface-soft); padding: 12px 14px; }
.dz-md-card-body-title {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-strong);
    opacity: .6; font-weight: 700; margin-bottom: 8px;
}

.dz-md-origin-line { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: .84rem; color: var(--text-strong); }
.dz-md-origin-dot { width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0; }
.dz-md-origin-dot--logement { background: var(--accent-500); }
.dz-md-origin-dot--secondaire { background: var(--accent-100); }
.dz-md-origin-name { font-weight: 600; flex: 1; min-width: 0; }
.dz-md-origin-qty { font-weight: 700; color: var(--accent-500); font-variant-numeric: tabular-nums; white-space: nowrap; }

.dz-md-detail-btn {
    border: 1px solid var(--border-soft); background: #fff; color: var(--text-strong);
    font-size: .72rem; padding: 4px 10px; border-radius: 8px; white-space: nowrap;
}
.dz-md-detail-btn:hover { background: var(--surface-soft); }

@media (max-width: 1024px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive::after {
        opacity: 1;
    }
}

/* ===== Tableau de bord parc (Plan 8 / Tâche 3) =====
   Classes réutilisables pour la refonte "plan de gouvernante" du Tableau de
   Bord Logements (option 3a du handoff design) : bandeau de compteurs,
   grille de tuiles par logement et panneau de détail déplié sous la grille.
   Réutilise .dz-chips*, .dz-rail-export et <CalculationBreakdown> définis
   ailleurs. Préfixe .dz-fleet- pour éviter toute collision. */

.dz-fleet-stats { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.dz-fleet-stat {
    flex: 1; min-width: 160px; background: #fff; border: 1px solid var(--border-soft);
    border-radius: 13px; padding: 14px 18px;
}
.dz-fleet-stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.dz-fleet-stat-value { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dz-fleet-stat--alert { border-color: #ecdbe1; }
.dz-fleet-stat--alert .dz-fleet-stat-label, .dz-fleet-stat--alert .dz-fleet-stat-value { color: var(--accent-500); }
.dz-fleet-stat--ok { border-color: #dfe6e0; }
.dz-fleet-stat--ok .dz-fleet-stat-label, .dz-fleet-stat--ok .dz-fleet-stat-value { color: var(--brand-700); }
.dz-fleet-stat--total .dz-fleet-stat-label { color: var(--text-strong); opacity: .55; }
.dz-fleet-stat--total .dz-fleet-stat-value { color: var(--text-strong); }

.dz-fleet-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 11px; }
@media (max-width: 1200px) { .dz-fleet-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .dz-fleet-grid { grid-template-columns: repeat(2, 1fr); } }

.dz-fleet-tile {
    background: #fff; border: 1px solid var(--border-soft); border-top: 4px solid var(--brand-700);
    border-radius: 12px; padding: 13px 12px; text-align: left; width: 100%; cursor: pointer;
}
.dz-fleet-tile:hover { background: rgba(163,191,178,.14); }
.dz-fleet-tile:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.dz-fleet-tile--alert { border-top-color: var(--accent-500); border-color: #ecdbe1; }
.dz-fleet-tile--ok { border-top-color: var(--brand-700); border-color: #dfe6e0; }
.dz-fleet-tile--selected { box-shadow: inset 0 0 0 2px var(--primary-color); }
.dz-fleet-tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.dz-fleet-tile-name { font-weight: 700; font-size: .86rem; color: var(--text-strong); }
.dz-fleet-tile-dot { width: 9px; height: 9px; border-radius: 999px; margin-top: 4px; flex-shrink: 0; }
.dz-fleet-tile-dot--alert { background: var(--accent-500); }
.dz-fleet-tile-dot--ok { background: var(--brand-700); }
.dz-fleet-tile-type { font-size: .68rem; color: var(--text-strong); opacity: .6; margin-top: 3px; }
.dz-fleet-tile-foot { margin-top: 10px; font-size: .76rem; font-weight: 600; }
.dz-fleet-tile-foot--alert { color: var(--accent-500); }
.dz-fleet-tile-foot--ok { color: var(--brand-700); }

.dz-fleet-panel { margin-top: 14px; background: #fff; border: 1px solid var(--border-soft); border-radius: 13px; padding: 15px 18px; }
.dz-fleet-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.dz-fleet-panel-name { font-weight: 700; color: var(--text-strong); }
.dz-fleet-panel-type { font-size: .7rem; background: var(--surface-soft); color: var(--text-strong); border-radius: 5px; padding: 2px 7px; }
.dz-fleet-panel-count { margin-left: auto; font-size: .74rem; color: var(--accent-500); font-weight: 600; }
.dz-fleet-panel-close {
    border: 1px solid var(--border-soft); background: #fff; color: var(--text-strong);
    font-size: .72rem; padding: 4px 10px; border-radius: 8px; cursor: pointer;
}
.dz-fleet-panel-close:hover { background: var(--surface-soft); }

.dz-fleet-panel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
@media (max-width: 768px) { .dz-fleet-panel-grid { grid-template-columns: 1fr 1fr; } }
.dz-fleet-panel-item {
    display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border-soft);
    border-radius: 9px; padding: 9px 11px;
}
.dz-fleet-panel-item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dz-fleet-panel-item-name { font-size: .82rem; font-weight: 500; }
.dz-fleet-panel-item-pack { font-size: .62rem; padding: 1px 5px; }
.dz-fleet-panel-item-qty { font-weight: 700; color: var(--accent-500); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* =====================================================================
   Plan 9 / Task 1 — 5a : écran de comptage repensé (/saisie-stock et
   /saisie-stock-stockage). Présentation seule — la logique @code (P7 :
   nullable, variance, compteurs .HasValue) reste inchangée. Préfixe
   .dz-count- pour éviter toute collision avec les classes existantes
   (.article-row, .stock-input, .type-header, .app-sticky-action-bar…). */

/* 1. Bannière contexte (gradient) */
.dz-count-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-wrap: wrap; padding: 16px 20px; background: var(--primary-gradient);
    color: #fff; border-radius: 12px; margin-bottom: 16px;
}
.dz-count-banner-eyebrow { font-size: .72rem; color: rgba(255,255,255,.72); }
.dz-count-banner-title { font-weight: 700; font-size: 1.15rem; margin-top: 1px; }
.dz-count-banner-meta { text-align: right; font-size: .72rem; color: rgba(255,255,255,.78); }
.dz-count-banner-meta strong { display: block; font-weight: 600; color: #fff; font-size: .85rem; margin-top: 2px; }
.dz-count-banner-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dz-count-banner-change-btn {
    display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.4);
    background: rgba(255,255,255,.12); color: #fff; border-radius: 9px; padding: 0 14px;
    font-weight: 600; font-size: .82rem; cursor: pointer; min-height: 44px; white-space: nowrap;
}
.dz-count-banner-change-btn:hover { background: rgba(255,255,255,.22); color: #fff; }

/* 2. Barre de statut condensée (chips) */
.dz-count-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.dz-count-chip {
    display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
    padding: 5px 11px; font-size: .76rem; font-weight: 500; line-height: 1.2;
    background: #fff; border: 1px solid var(--border-soft); color: var(--text-strong);
}
button.dz-count-chip { cursor: pointer; }
button.dz-count-chip:hover { background: var(--surface-soft); }
.dz-count-chip--prune { background: rgba(163,75,105,.10); border-color: rgba(163,75,105,.32); color: var(--accent-700); font-weight: 600; }
.dz-count-chip--blush { background: rgba(193,159,172,.26); border-color: rgba(163,75,105,.22); color: var(--accent-700); }
.dz-count-chip--sauge { background: rgba(163,191,178,.24); border-color: rgba(47,85,84,.22); color: var(--primary-color); }
.dz-count-chip-dot { width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0; background: var(--text-strong); opacity: .45; }
.dz-count-chip--prune .dz-count-chip-dot { background: var(--accent-500); opacity: 1; }
.dz-count-chip--blush .dz-count-chip-dot { background: var(--accent-100); opacity: 1; }
.dz-count-chip--sauge .dz-count-chip-dot { background: var(--primary-color); opacity: 1; }

/* 3. Barre de progression */
.dz-count-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.dz-count-progress-track {
    flex: 1; height: 8px; border-radius: 999px; background: #e6e1da; overflow: hidden;
}
.dz-count-progress-fill { height: 100%; background: var(--primary-color); border-radius: 999px; transition: width .2s ease; }
.dz-count-progress-label { font-size: .76rem; color: var(--text-strong); opacity: .75; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 5. Ligne de saisie (remplace visuellement .article-row pour les lignes
   de comptage : packs, articles, sac linge sale, retour qualité — pas les
   lignes de réception de livraison/commande, qui gardent .article-row). */
.dz-count-row {
    display: flex; align-items: center; gap: 14px; padding: 12px 15px;
    border-bottom: 1px solid var(--border-soft); flex-wrap: wrap;
}
.dz-count-row:last-child { border-bottom: none; }
.dz-count-row-body { flex: 1; min-width: 160px; }
.dz-count-row-name { font-weight: 600; font-size: .9rem; color: var(--text-strong); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dz-count-row-sub { font-size: .7rem; color: var(--text-strong); opacity: .55; margin-top: 2px; font-variant-numeric: tabular-nums; }

.dz-count-variance-chip {
    font-size: .68rem; font-weight: 600; border-radius: 999px; padding: 2px 8px;
    white-space: nowrap; font-variant-numeric: tabular-nums;
}
.dz-count-variance-chip--unchanged { color: var(--primary-color); background: rgba(163,191,178,.28); border: 1px solid rgba(47,85,84,.2); }
.dz-count-variance-chip--diff { color: var(--accent-700); background: rgba(163,75,105,.10); border: 1px solid rgba(163,75,105,.28); }

/* Stepper −/+ : boutons 40×44, input 52×44 (hit-targets ≥44px), spinners
   natifs masqués. */
.dz-count-stepper {
    display: inline-flex; align-items: center; border: 1px solid var(--border-soft);
    border-radius: 11px; overflow: hidden; background: #fff; flex-shrink: 0;
}
.dz-count-stepper button {
    border: 0; background: var(--surface-soft); width: 40px; height: 44px;
    font-size: 1.2rem; color: var(--primary-color); cursor: pointer;
    display: flex; align-items: center; justify-content: center; line-height: 1;
}
.dz-count-stepper button:hover { background: var(--brand-50); }
.dz-count-stepper button:disabled { opacity: .5; cursor: not-allowed; }
.dz-count-stepper input {
    width: 52px; height: 44px; border: 0; border-left: 1px solid var(--border-soft);
    border-right: 1px solid var(--border-soft); text-align: center; font-size: 1.05rem;
    font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums;
}
.dz-count-stepper input::-webkit-outer-spin-button,
.dz-count-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dz-count-stepper input[type=number] { -moz-appearance: textfield; }

/* 6. Barre d'action collante — enfants de .app-sticky-action-bar existant
   (non redéfini ici). */
.dz-count-sticky-inner { display: flex; align-items: center; gap: 14px; padding: 13px 20px; flex-wrap: wrap; }
.dz-count-sticky-progress { flex: 1; min-width: 160px; }
.dz-count-sticky-progress-label { font-size: .72rem; color: var(--text-strong); opacity: .6; }
.dz-count-sticky-progress-value { font-weight: 700; font-size: .9rem; color: var(--text-strong); font-variant-numeric: tabular-nums; margin-top: 1px; }
.dz-count-sticky-btn {
    border: 0; background: var(--primary-color); color: #fff; font-weight: 700;
    font-size: .9rem; padding: 12px 22px; border-radius: 12px; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
}
.dz-count-sticky-btn:hover:not(:disabled) { background: var(--primary-hover); color: #fff; }
.dz-count-sticky-btn:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 576px) {
    .dz-count-banner { padding: 14px 16px; }
    .dz-count-row { padding: 12px; }
    .dz-count-stepper { width: 100%; }
    .dz-count-stepper input { flex: 1; width: auto; }
    .dz-count-sticky-inner { padding: 12px 14px; }
}

/* =====================================================================
   Plan 9 / Task 2 — 5b : liste de prélèvement (/stocks-a-recuperer).
   Présentation seule — la logique @code (VisibleSections, SelectSection/
   ClearSection, row.Selected, row.MaxRecoverable, ValidateSection + garde
   Edit + ConfirmModal, messages) reste inchangée. Préfixe .dz-pick- pour
   éviter toute collision avec les classes existantes de la page. */

/* 1. Carte de section + bannière contexte (gradient) */
.dz-pick-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: var(--shadow-soft); position: relative;
}
.dz-pick-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-wrap: wrap; padding: 16px 20px; background: var(--primary-gradient); color: #fff;
}
.dz-pick-banner-eyebrow { font-size: .72rem; color: rgba(255,255,255,.72); }
.dz-pick-banner-title { font-weight: 700; font-size: 1.15rem; margin-top: 1px; }
.dz-pick-banner-meta { text-align: right; }
.dz-pick-banner-title-sm { font-weight: 600; }
.dz-pick-body { padding: 14px 20px 18px; }

/* 2. Ligne d'info (fond sauge clair) */
.dz-pick-info {
    display: flex; align-items: center; gap: 10px; background: rgba(163,191,178,.24);
    border: 1px solid rgba(47,85,84,.22); border-radius: 10px; padding: 9px 13px;
    margin-bottom: 14px; font-size: .78rem; color: var(--text-strong);
}
.dz-pick-info svg { color: var(--primary-color); flex-shrink: 0; }

/* 3. Actions Tout cocher / Tout décocher */
.dz-pick-actions { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.dz-pick-action-btn {
    border: 1px solid var(--border-soft); background: #fff; color: var(--text-strong);
    font-size: .76rem; font-weight: 500; padding: 5px 11px; border-radius: 8px;
    cursor: pointer; min-height: 32px;
}
.dz-pick-action-btn:hover { background: var(--surface-soft); }
.dz-pick-action-btn--primary {
    border-color: var(--brand-200); color: var(--primary-color); font-weight: 600;
}

/* 4. Groupes (Packs / type d'article) */
.dz-pick-group-label {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-strong); opacity: .6; font-weight: 700; margin: 14px 2px 8px;
}
.dz-pick-group-label:first-of-type { margin-top: 6px; }

/* 5. Ligne de prélèvement = label cliquable, hit-target large */
.dz-pick-row {
    display: flex; align-items: center; gap: 14px; background: #fff;
    border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px 15px;
    margin-bottom: 9px; cursor: pointer; min-height: 44px;
}
.dz-pick-row--selected { border-color: var(--brand-200); background: rgba(163,191,178,.10); }
.dz-pick-row--disabled { opacity: .6; cursor: not-allowed; }

/* Case à cocher custom 24×24 radius 7 — input réel masqué visuellement
   mais accessible (focus, clavier), pas une simple div décorative. */
.dz-pick-checkbox-wrap { position: relative; width: 24px; height: 24px; flex-shrink: 0; }
.dz-pick-checkbox {
    position: absolute; inset: 0; width: 24px; height: 24px; margin: 0;
    opacity: 0; cursor: pointer;
}
.dz-pick-checkbox-box {
    position: absolute; inset: 0; width: 24px; height: 24px; border-radius: 7px;
    border: 2px solid #cfd4d1; background: #fff; display: flex; align-items: center;
    justify-content: center; pointer-events: none; transition: background .12s ease, border-color .12s ease;
}
.dz-pick-checkbox-box svg { color: #fff; opacity: 0; transition: opacity .1s ease; }
.dz-pick-checkbox:checked + .dz-pick-checkbox-box {
    background: var(--primary-color); border-color: var(--primary-color);
}
.dz-pick-checkbox:checked + .dz-pick-checkbox-box svg { opacity: 1; }
.dz-pick-checkbox:focus-visible + .dz-pick-checkbox-box {
    outline: 2px solid rgba(163, 191, 178, 0.95); outline-offset: 2px;
}
.dz-pick-checkbox:disabled + .dz-pick-checkbox-box { opacity: .5; }
.dz-pick-checkbox:disabled { cursor: not-allowed; }

.dz-pick-row-body { flex: 1; min-width: 160px; }
.dz-pick-row-name { font-weight: 600; font-size: .9rem; color: var(--text-strong); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dz-pick-row-sub { font-size: .7rem; color: var(--text-strong); opacity: .55; margin-top: 2px; font-variant-numeric: tabular-nums; }

.dz-pick-row-take { text-align: right; flex-shrink: 0; }
.dz-pick-row-take-label {
    font-size: .62rem; text-transform: uppercase; color: var(--accent-700);
    letter-spacing: .04em; font-weight: 600;
}
.dz-pick-row-take-value {
    font-weight: 700; font-size: 1.3rem; color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

/* 5bis. Stepper de quantité (Plan 9 / Task 2 restauration prélèvement partiel)
   — réutilise le style visuel .dz-count-stepper (boutons 40×44, input 52×44,
   hit-targets ≥44px), affiché uniquement quand la ligne est sélectionnée.
   Le "max" reste visible sous le stepper (ou seul si non sélectionnée). */
.dz-pick-row-take .dz-count-stepper { margin-left: auto; }
.dz-pick-row-take-max {
    font-size: .68rem; color: var(--text-strong); opacity: .55; margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

/* 6. Panier collant — enfants de .app-sticky-action-bar existant (non redéfini ici). */
.dz-pick-sticky-inner { display: flex; align-items: center; gap: 14px; padding: 13px 20px; flex-wrap: wrap; }
.dz-pick-sticky-cart { flex: 1; min-width: 160px; }
.dz-pick-sticky-cart-label { font-size: .72rem; color: var(--text-strong); opacity: .6; }
.dz-pick-sticky-cart-value { font-weight: 700; font-size: .9rem; color: var(--text-strong); font-variant-numeric: tabular-nums; margin-top: 1px; }
.dz-pick-sticky-btn {
    border: 0; background: var(--primary-color); color: #fff; font-weight: 700;
    font-size: .9rem; padding: 12px 22px; border-radius: 12px; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
}
.dz-pick-sticky-btn:hover:not(:disabled) { background: var(--primary-hover); color: #fff; }
.dz-pick-sticky-btn:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 576px) {
    .dz-pick-banner { padding: 14px 16px; }
    .dz-pick-body { padding: 12px 14px 16px; }
    .dz-pick-row { padding: 12px; flex-wrap: wrap; }
    .dz-pick-row-take { flex-basis: 100%; text-align: left; margin-top: 4px; }
    .dz-pick-row-take .dz-count-stepper { margin-left: 0; width: 100%; }
    .dz-pick-row-take .dz-count-stepper input { flex: 1; width: auto; }
    .dz-pick-sticky-inner { padding: 12px 14px; }
}

/* =====================================================================
   Plan 10 / Task 1 — 6a puis Plan 11 / Tâche 1 — restyle « file de triage »
   (/preparation-packs et /reappro-stockages). Présentation seule — toute la
   logique @code (gardes Edit, ConfirmModal, calculs bloc/prop, sources,
   delivery tags) reste inchangée. La nav latérale et l'en-tête de carte du
   patron 6a ont été retirés (Plan 11 : remplacés par .dz-queue-row /
   .dz-header du patron 1a — cf. rapport Plan 11 Tâche 1) ; ce qui reste sert
   au panneau de détail déplié sous la ligne de file. Réutilise
   .dz-count-stepper (steppers) et .dz-count-sticky-inner / .dz-count-sticky-btn
   (palette collante, enfants de .app-sticky-action-bar). Préfixe .dz-deliv-
   pour les éléments propres à ce panneau de détail (en-tête, barre de
   config, lignes). */

/* 2. En-tête détail : "Préparer pour <Destination>" + sous-titre */
.dz-deliv-detail-subtitle {
    font-size: .82rem; color: var(--text-strong); opacity: .62; margin: -6px 0 14px;
}

/* 3. Barre de config condensée : chip "Depuis <source>" + delivery tags,
   ligne qui wrap. Réutilise .delivery-tag-list / .delivery-tag-chip
   existants pour les tags. */
.dz-deliv-config-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px;
}
.dz-deliv-config-chip {
    display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
    border: 1px solid rgba(47,85,84,.22); background: rgba(212,229,216,.55);
    color: var(--primary-color); padding: 5px 6px 5px 12px; font-size: .82rem; font-weight: 700;
}
.dz-deliv-config-chip-label { white-space: nowrap; opacity: .85; }
.dz-deliv-config-chip-value {
    padding: 4px 8px; border-radius: 999px; background: #fff; color: var(--text-strong);
    font-weight: 600; font-size: .82rem;
}
.dz-deliv-config-chip-select {
    border: 0; background: #fff; color: var(--text-strong); border-radius: 999px;
    padding: 4px 10px; font-size: .82rem; font-weight: 600; min-height: 32px; max-width: 220px;
}
.dz-deliv-config-chip-select:focus {
    outline: 2px solid rgba(163,191,178,.95); outline-offset: 1px;
}

/* 4. Groupe (Packs / Linge) + ligne de préparation */
.dz-deliv-rows { display: flex; flex-direction: column; gap: 8px; }
.dz-deliv-row {
    display: flex; align-items: center; gap: 14px; padding: 12px 15px;
    border: 1px solid var(--border-soft); border-radius: 12px; background: #fff; flex-wrap: wrap;
}
.dz-deliv-row--warn { border-color: rgba(163,75,105,.32); background: rgba(163,75,105,.04); }
.dz-deliv-warn-text { color: var(--accent-700); font-weight: 600; font-size: .74rem; opacity: 1; }
.dz-deliv-row-check { display: flex; align-items: center; flex-shrink: 0; }
.dz-deliv-row-check input { width: 24px !important; height: 24px !important; cursor: pointer; }
.dz-deliv-row-body { flex: 1; min-width: 200px; }
.dz-deliv-row-name { font-weight: 600; font-size: .92rem; color: var(--text-strong); }
.dz-deliv-row-surplus { display: block; font-size: .72rem; color: var(--text-strong); opacity: .55; margin-top: 2px; }
.dz-deliv-row-meta { font-size: .74rem; color: var(--text-strong); opacity: .6; margin-top: 3px; font-variant-numeric: tabular-nums; }
.dz-deliv-row-meta-manque { color: var(--accent-700); opacity: 1; font-weight: 600; }
.dz-deliv-row-action { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.dz-deliv-row-action-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-strong); opacity: .55; font-weight: 700; }
.dz-deliv-row-action-sub { font-size: .68rem; color: var(--text-strong); opacity: .55; font-variant-numeric: tabular-nums; }

/* 5. Palette collante (icône colis + "N lignes · M unités" + bouton) —
   contenu placé dans .dz-count-sticky-inner existant. */
.dz-deliv-palette-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 160px; }
.dz-deliv-palette-info svg { color: var(--primary-color); flex-shrink: 0; }

@media (max-width: 576px) {
    .dz-deliv-row { padding: 12px; }
    .dz-deliv-row-action { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
    .dz-deliv-row-action .dz-count-stepper { width: auto; }
    .dz-deliv-config-chip-select { max-width: 160px; }
}

/* ===== Livraisons — file de triage (Plan 11 / Tâche 2 — patron 1a / handoff 04 §8c) =====
   Réutilise .dz-header/.dz-grid/.dz-chips/.dz-queue-row/.dz-monogram/.dz-type-chip/
   .dz-col-action/.dz-rail/.dz-collapsed-toggle/.dz-btn-order existants. Ajouts ci-dessous :
   variantes "route" (sauge-clair) et "annulé" pour les bordures/monogrammes, chips de
   statut colorées, pastilles du rail "Par statut", et une variante neutre de
   .dz-col-action pour une simple quantité (pas un "à préparer"). */
.dz-queue-row--route { border-left-color: var(--brand-200); }
.dz-queue-row--annule { border-left-color: #9aa5ab; opacity: .82; }

.dz-col-action--neutral .dz-col-action-label { color: var(--text-strong); opacity: .5; }
.dz-col-action--neutral .dz-col-action-value { color: var(--text-strong); }

.dz-type-chip--attente { background: #f2e3e9; color: var(--accent-700); font-weight: 600; }
.dz-type-chip--route { background: #e7efe9; color: var(--primary-color); font-weight: 600; }
.dz-type-chip--livre { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.dz-type-chip--annule { background: var(--surface-soft); color: var(--text-strong); opacity: .7; }
/* Direction (Plan 11 / Tâche 3 — §8d, /erreurs-stock) : Manquant = prune plein/texte
   blanc, Excédent = blush/texte accent foncé — jamais couleur seule (libellé conservé). */
.dz-type-chip--manquant { background: var(--accent-500); color: #fff; font-weight: 600; }
.dz-type-chip--excedent { background: var(--accent-100); color: var(--accent-700); font-weight: 600; }

.dz-status-dot {
    width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.08);
}
.dz-status-dot--preparation { background: var(--accent-100); }
.dz-status-dot--route { background: var(--brand-200); }
.dz-status-dot--attente { background: var(--accent-500); }
.dz-status-dot--livre { background: var(--brand-700); }
.dz-status-dot--annule { background: #9aa5ab; }

/* ===== Vue livreur — sections de jour (Plan 12 / Tâche 1 — patron 1a / handoff 05 §9a) =====
   Réutilise .dz-header/.dz-header-title/.dz-header-icon/.dz-header-heading/
   .dz-header-subtitle/.dz-header-kpis/.dz-header-kpi-value,-label/.dz-header-kpi-divider
   existants pour le bandeau + KPI. Ajouts ci-dessous : alerte erreurs compacte,
   cartes de jour repliables (conteneur générique, pas de nouvel état — réutilise
   collapsedSections/expandedPlanningDays existants côté C#), lignes-cartes de
   destination (tags, mini-stats, chip d'état, bouton Livrer). Préfixe .dz-livreur-
   pour éviter toute collision. */
.dz-livreur-kpi-late .dz-header-kpi-label { color: #E7C3D0; }
.dz-livreur-kpi-late .dz-header-kpi-value { color: #EEC9D6; }

.dz-livreur-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    background: #f7edf1;
    border: 1px solid #ecd7de;
    border-radius: 11px;
    padding: 10px 14px;
    margin-bottom: 16px;
}
.dz-livreur-alert:hover { background: #f2e3e9; }
.dz-livreur-alert svg { color: var(--accent-500); flex-shrink: 0; }
.dz-livreur-alert-text { flex: 1; font-size: .82rem; color: var(--accent-700); font-weight: 600; }
.dz-livreur-alert-cta { font-size: .76rem; color: var(--accent-500); white-space: nowrap; }

.dz-livreur-group {
    border: 1px solid var(--border-soft);
    border-radius: 13px;
    overflow: hidden;
    margin-bottom: 12px;
    background: #fff;
}
.dz-livreur-group-toggle {
    width: 100%;
    border: 0;
    background: var(--surface-soft);
    color: var(--primary-color);
    padding: 11px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: .86rem;
    text-align: left;
    min-height: 44px;
}
.dz-livreur-group-toggle--late {
    background: linear-gradient(180deg, rgba(193,159,172,.5) 0%, rgba(163,75,105,.12) 100%);
    color: var(--accent-700);
}
.dz-livreur-group-chevron { font-size: .85rem; opacity: .8; transition: transform .18s ease-in-out; }
.dz-livreur-group-toggle[aria-expanded="false"] .dz-livreur-group-chevron { transform: rotate(-90deg); }
.dz-livreur-group-count {
    margin-left: auto;
    background: var(--accent-700);
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 9px;
    font-size: .74rem;
}
.dz-livreur-group-body { padding: 10px 13px; display: flex; flex-direction: column; gap: 8px; }

.dz-livreur-day {
    border: 1px solid var(--border-soft);
    border-radius: 13px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #fff;
}
.dz-livreur-day-toggle {
    width: 100%;
    border: 0;
    cursor: pointer;
    text-align: left;
    color: inherit;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 15px;
    background: linear-gradient(180deg, rgba(212,229,216,.65) 0%, rgba(163,191,178,.35) 100%);
    border-bottom: 1px solid rgba(163,191,178,.45);
}
.dz-livreur-day-chevron { font-size: .85rem; color: var(--primary-color); opacity: .8; }
.dz-livreur-day-title { font-weight: 700; font-size: .86rem; color: var(--primary-color); min-width: 0; flex: 1 1 auto; }
.dz-livreur-day-meta { flex-shrink: 0; font-size: .74rem; color: var(--text-strong); opacity: .65; white-space: nowrap; }
.dz-livreur-day-body { padding: 10px 13px; display: flex; flex-direction: column; gap: 8px; }
.dz-livreur-day-empty { text-align: center; color: var(--text-strong); opacity: .6; padding: 14px 0; font-size: .84rem; }

.dz-livreur-collapsed-day {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    color: var(--text-strong);
    margin-bottom: 10px;
    min-height: 48px;
}

.dz-livreur-row {
    display: flex;
    align-items: center;
    gap: 13px;
    flex-wrap: wrap;
    border: 1px solid var(--border-soft);
    border-left: 4px solid var(--brand-200);
    border-radius: 11px;
    padding: 10px 13px;
}
.dz-livreur-row:hover { background: rgba(163,191,178,.14); }
.dz-livreur-row--late { border-left-color: var(--accent-500); }
.dz-livreur-row--done { opacity: .72; }

.dz-livreur-row-main { flex: 1 1 200px; min-width: 0; }
.dz-livreur-row-name { font-weight: 600; font-size: .88rem; color: var(--text-strong); }
.dz-livreur-row-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.dz-livreur-tag-chip {
    font-size: .64rem;
    border-radius: 999px;
    padding: 1px 8px;
    font-weight: 700;
}
/* Couleur reprise de .delivery-tag-chip-* (page /livraisons) via @tag.BadgeCssClass — pas de
   background/color propre ici, sinon elle écraserait la couleur du tag (même spécificité CSS,
   règle définie après dans la feuille de style). Secours si un tag n'a aucune classe (défaut neutre) : */
.dz-livreur-tag-chip:not([class*="delivery-tag-chip-"]):not(.dz-livreur-tag-chip--collecte) {
    background: rgba(244, 241, 238, .82);
    color: var(--primary-color);
}
.dz-livreur-tag-chip--collecte { background: rgba(193,159,172,.28); color: var(--accent-700); }
.dz-livreur-row-note { font-size: .74rem; color: var(--accent-700); font-weight: 700; opacity: 1; margin-top: 5px; }
.note-text { color: var(--accent-700); font-weight: 700; }

.dz-livreur-row-stats { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dz-livreur-mini-stat { text-align: center; min-width: 44px; }
.dz-livreur-mini-stat-label { display: block; font-size: .6rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-strong); opacity: .5; }
.dz-livreur-mini-stat-value { display: block; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-strong); }

.dz-livreur-state-chip {
    font-size: .68rem;
    border-radius: 6px;
    padding: 3px 9px;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.dz-livreur-state-chip--todo { background: #eef1ef; color: var(--primary-color); }
.dz-livreur-state-chip--late { background: #f2e3e9; color: var(--accent-700); }
.dz-livreur-state-chip--done { background: #e7efe9; color: var(--primary-color); }
.dz-livreur-state-chip--readonly { background: var(--surface-soft); color: var(--text-strong); opacity: .7; border: 1px solid var(--border-soft); }

.dz-livreur-btn {
    border: 0;
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    font-size: .8rem;
    padding: 8px 15px;
    border-radius: 9px;
    cursor: pointer;
    min-height: 44px;
    white-space: nowrap;
}
.dz-livreur-btn:hover { background: var(--primary-hover); color: #fff; }

@media (max-width: 768px) {
    .dz-livreur-row { padding: 12px; }
    .dz-livreur-row-stats { width: 100%; justify-content: flex-start; gap: 16px; }
    .dz-livreur-btn { width: 100%; }
    .dz-livreur-day-toggle { padding: 12px; }
    .dz-livreur-group-toggle { padding: 12px; flex-wrap: wrap; }
}

/* Les classes .dz-tri-* (Plan 10 / Tâche 3 — anciennes cartes de triage,
   design 6c, /erreurs-stock) ont été retirées (Plan 11 / Tâche 3 : la page
   a été restylée en file de triage §8d, réutilisant .dz-header/.dz-grid/
   .dz-chips/.dz-queue-row/.dz-monogram/.dz-type-chip/.dz-col-action/
   .dz-rail/.dz-status-dot/.dz-collapsed-toggle/.dz-btn-order existants —
   cf. rapport Plan 11 Tâche 3). Le panneau de réassignation inline vit
   désormais dans les classes .err-reassign-* scoped à ErreursStock/Index.razor. */

/* ===== Historique des livraisons — cartes de jour lecture seule
   (Plan 12 / Tâche 2 — patron 1a / handoff 05 §9b) =====
   Réutilise .dz-header/.dz-chips existants pour le bandeau + les filtres
   secteur/période (mode organisation §8c intact, non touché). Ajouts
   ci-dessous : barre chips actifs + export, carte de jour (en-tête dégradé
   sauge, badges résumé), ligne horodatée lecture seule. Préfixe .dz-histo-
   pour éviter toute collision avec .dz-livreur-* (§9a) et .dz-queue-* (§8c). */
.dz-histo-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.dz-histo-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dz-histo-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: .76rem;
    color: var(--text-strong);
    white-space: nowrap;
}
.dz-histo-export {
    border: 1px solid #b9c6bf;
    background: #fff;
    color: var(--primary-color);
    font-size: .78rem;
    font-weight: 600;
    padding: 7px 14px;
    min-height: 44px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}
.dz-histo-export:hover { background: var(--surface-soft); }
.dz-histo-export:disabled { opacity: .6; cursor: not-allowed; }

.dz-histo-day {
    border: 1px solid var(--border-soft);
    border-radius: 13px;
    overflow: hidden;
    margin-bottom: 11px;
    background: #fff;
}
.dz-histo-day-toggle {
    width: 100%;
    border: 0;
    cursor: pointer;
    text-align: left;
    color: inherit;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: linear-gradient(180deg, rgba(212,229,216,.55) 0%, rgba(163,191,178,.28) 100%);
}
.dz-histo-day-chevron { font-size: .85rem; color: var(--primary-color); opacity: .8; flex-shrink: 0; }
.dz-histo-day-title { font-weight: 700; font-size: .9rem; color: var(--primary-color); min-width: 0; }
.dz-histo-day-badges { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.dz-histo-day-badge {
    font-variant-numeric: tabular-nums;
    background: #fff;
    border: 1px solid #dbe3de;
    color: var(--primary-color);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}
.dz-histo-day-body { padding: 6px 8px; }

.dz-histo-collapsed-day {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: #fff;
    color: var(--text-strong);
    margin-bottom: 11px;
    min-height: 48px;
}
.dz-histo-collapsed-day .dz-histo-day-badge {
    background: var(--surface-soft);
    border-color: var(--border-soft);
    color: var(--text-strong);
    opacity: .8;
}

.dz-histo-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #f1eee9;
}
.dz-histo-line:last-child { border-bottom: 0; }
.dz-histo-line:hover { background: rgba(163,191,178,.14); }
.dz-histo-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--primary-color);
    flex-shrink: 0;
}
.dz-histo-line-main { flex: 1 1 auto; min-width: 0; }
.dz-histo-line-name { font-weight: 600; font-size: .87rem; color: var(--text-strong); }
.dz-histo-line-detail { font-size: .72rem; color: var(--text-strong); opacity: .6; margin-left: 4px; }
.dz-histo-line-time {
    font-variant-numeric: tabular-nums;
    font-size: .72rem;
    color: var(--text-strong);
    opacity: .6;
    flex-shrink: 0;
    white-space: nowrap;
}
.dz-histo-chip-livre {
    font-size: .66rem;
    background: #e7efe9;
    color: var(--primary-color);
    border-radius: 5px;
    padding: 2px 8px;
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .dz-histo-day-toggle { flex-wrap: wrap; }
    .dz-histo-day-badges { margin-left: 0; }
    .dz-histo-line { flex-wrap: wrap; }
    .dz-histo-line-time { margin-left: 20px; }
}

/* ===== Infos livreur — design 9c (Plan 12 / Tâche 3) =====
   Fil de consignes terrain : épinglés en tête (liseré sauge + ombre), puis
   informations triées par priorité décroissante (liseré coloré). Réutilise
   .dz-header pour le bandeau. Préfixe .dz-info- pour éviter toute collision
   avec .dz-livreur-* (§9a) et .dz-histo-* (§9b). */
.dz-info-body { padding: 16px 18px 20px; }
.dz-info-section { margin-bottom: 18px; }
.dz-info-section:last-child { margin-bottom: 0; }
.dz-info-section-head {
    display: flex; align-items: center; gap: 9px; margin-bottom: 11px;
}
.dz-info-section-head svg { color: var(--brand-700); flex-shrink: 0; }
.dz-info-section-title {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
    font-weight: 700; color: var(--brand-700); white-space: nowrap;
}
.dz-info-section-head--rule .dz-info-section-title { color: #8a9291; }
.dz-info-section-line { flex: 1; height: 1px; background: var(--border-soft); }
.dz-info-stack { display: flex; flex-direction: column; gap: 10px; }

.dz-info-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-left: 4px solid var(--brand-200);
    border-radius: 12px;
    padding: 13px 15px;
}
.dz-info-card.priority-urgent { border-left-color: var(--accent-500); }
.dz-info-card.priority-important { border-left-color: var(--accent-100); }
.dz-info-card.priority-info { border-left-color: var(--brand-200); }
.dz-info-card--pinned {
    border-left-color: var(--brand-700);
    box-shadow: 0 2px 8px rgba(47, 85, 84, .06);
}

.dz-info-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dz-info-badge {
    font-size: .66rem;
    border-radius: 999px;
    padding: 2px 9px;
    font-weight: 700;
    border: 1px solid transparent;
}
.dz-info-badge.priority-urgent {
    background: rgba(163, 75, 105, .14); color: var(--accent-700);
    border-color: rgba(163, 75, 105, .25);
}
.dz-info-badge.priority-important {
    background: rgba(193, 159, 172, .22); color: var(--accent-700);
    border-color: rgba(193, 159, 172, .4);
}
.dz-info-badge.priority-info {
    background: rgba(163, 191, 178, .24); color: var(--brand-700);
    border-color: rgba(163, 191, 178, .45);
}
.dz-info-badge-neutral {
    font-size: .66rem;
    background: var(--surface-soft);
    color: #5c6564;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 2px 9px;
    font-weight: 600;
}
.dz-info-badge-date { font-variant-numeric: tabular-nums; }

.dz-info-title { font-weight: 700; font-size: .95rem; margin-bottom: 4px; color: var(--text-strong); }
.dz-info-content { font-size: .84rem; color: #4a5453; line-height: 1.5; overflow-wrap: anywhere; }
.dz-info-content a { color: var(--primary-color); text-decoration: underline; font-weight: 600; }
.dz-info-window { font-size: .74rem; color: #8a9291; margin-top: 8px; }

.dz-info-empty {
    background: #fff;
    border: 1px dashed var(--border-soft);
    border-radius: 16px;
    padding: 32px 20px;
    text-align: center;
    color: #5c6564;
}

@media (max-width: 576px) {
    .dz-info-body { padding: 14px; }
}

/* ===== Timeline hebdomadaire — design 10a (Plan 13, correction de §8c)
   Réutilise .dz-livreur-day/.dz-livreur-day-toggle/.dz-livreur-day-chevron/
   .dz-livreur-day-title/.dz-livreur-day-meta/.dz-livreur-day-body/
   .dz-livreur-day-empty/.dz-livreur-collapsed-day pour les sections de jour,
   .dz-livreur-row(*),.dz-livreur-mini-stat(*),.dz-livreur-tag-chip,.dz-livreur-btn
   pour les lignes-cartes destination, et .dz-type-chip--attente/--route/--livre/
   --annule pour le chip de statut (déjà utilisés par la file §8c). Préfixe
   .dz-tl- réservé au rail de semaine, aux bandes et aux variantes propres à
   la timeline (en-tête prune, badge AUJOURD'HUI). */
.dz-tl-week-rail {
    display: flex;
    gap: 7px;
    padding: 14px 18px;
    background: #fff;
    border-bottom: 1px solid var(--border-soft);
    flex-wrap: wrap;
}
.dz-tl-week-tile {
    flex: 1 1 80px;
    text-align: center;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 8px 4px;
    background: var(--surface-soft);
    cursor: pointer;
    min-height: 44px;
}
.dz-tl-week-tile:hover { background: rgba(163,191,178,.18); }
.dz-tl-week-tile--today {
    border: 2px solid var(--brand-700);
    background: var(--brand-50, #eef1ef);
    padding: 7px 4px;
}
.dz-tl-week-tile-label {
    font-size: .66rem;
    color: var(--text-strong);
    opacity: .6;
    text-transform: uppercase;
}
.dz-tl-week-tile--today .dz-tl-week-tile-label { color: var(--brand-700); opacity: 1; font-weight: 700; }
.dz-tl-week-tile-value {
    font-weight: 700;
    color: var(--brand-700);
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}
.dz-tl-week-tile-value--empty { color: #a3a9a8; }
.dz-tl-week-tile--selected {
    border: 2px solid var(--primary-color);
    background: rgba(47, 85, 84, .12);
}
.dz-tl-week-rail-label {
    padding: 8px 18px 0;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-strong);
    opacity: .6;
    background: #fff;
}

.dz-tl-body { padding: 16px 18px 20px; }

.dz-tl-band {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 2px 10px;
}
.dz-tl-band:first-child { margin-top: 2px; }
.dz-tl-band-dot { width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0; }
.dz-tl-band-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    white-space: nowrap;
}
.dz-tl-band-rule { flex: 1; height: 1px; background: var(--border-soft); }
.dz-tl-band--late .dz-tl-band-dot { background: var(--accent-500); }
.dz-tl-band--late .dz-tl-band-label { color: var(--accent-700); }
.dz-tl-band--late .dz-tl-band-rule { background: #ecdbe1; }
.dz-tl-band--current .dz-tl-band-dot { background: var(--brand-700); }
.dz-tl-band--current .dz-tl-band-label { color: var(--brand-700); }
.dz-tl-band--current .dz-tl-band-rule { background: #dbe3de; }
.dz-tl-band--upcoming .dz-tl-band-dot { background: var(--accent-100); }
.dz-tl-band--upcoming .dz-tl-band-label { color: var(--accent-700); }

.dz-tl-day-toggle--late {
    background: linear-gradient(180deg, rgba(193,159,172,.5) 0%, rgba(163,75,105,.12) 100%) !important;
    border-bottom: 1px solid #ecdbe1 !important;
}
.dz-tl-day-toggle--late .dz-livreur-day-chevron,
.dz-tl-day-toggle--late .dz-livreur-day-title { color: var(--accent-700) !important; }
.dz-tl-day-late-badge {
    font-size: .74rem;
    background: var(--accent-700);
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 9px;
    flex-shrink: 0;
}
.dz-tl-day-today-badge {
    font-size: .62rem;
    background: var(--brand-700);
    color: #fff;
    border-radius: 5px;
    padding: 1px 7px;
    font-weight: 700;
    letter-spacing: .03em;
    flex-shrink: 0;
}

.dz-tl-sub {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 2px 2px 8px;
}
.dz-tl-sub-label {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-strong);
    opacity: .6;
    font-weight: 700;
}
.dz-tl-sub-count {
    font-size: .64rem;
    color: var(--text-strong);
    opacity: .6;
    background: var(--surface-soft);
    border-radius: 999px;
    padding: 0 7px;
}
.dz-tl-sub-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.dz-tl-sub-rows:last-child { margin-bottom: 0; }

/* Bloc destination : le LOGEMENT porte la livraison, ses articles sont a l interieur.
   Les reglages (date, tags, sacs, note) vivent sur l en-tete du bloc, pas sur les lignes. */
.dz-dest-bloc {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--surface-soft);
    padding: 10px 10px 12px;
}
.dz-dest-bloc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 2px 8px;
}
.dz-dest-bloc-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: none;
    padding: 2px 0;
    text-align: left;
    cursor: pointer;
}
.dz-dest-bloc-chevron {
    color: var(--primary-color);
    font-size: .8rem;
    line-height: 1;
}
.dz-dest-bloc-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
/* Le LOGEMENT domine : c est lui qui porte la livraison. Les articles sont a l interieur. */
.dz-dest-bloc-nom {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--text-strong);
    letter-spacing: -.01em;
}
.dz-dest-bloc-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 18px;
    border-left: 2px solid var(--border-soft);
    margin-left: 6px;
}

/* Reglages de la livraison, affiches en clair : un clic sur la valeur ouvre son edition. */
.dz-dest-bloc-infos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 2px 10px;
}
.dz-dest-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    min-width: 96px;
    padding: 6px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 9px;
    background: var(--surface);
    text-align: left;
    cursor: pointer;
}
.dz-dest-info:hover { border-color: var(--primary-color); }
.dz-dest-info--readonly { cursor: default; }
.dz-dest-info--readonly:hover { border-color: var(--border-soft); }
.dz-dest-info--wide { flex: 1 1 220px; }
.dz-dest-info-label {
    font-size: .6rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    color: var(--text-strong);
    opacity: .5;
}
.dz-dest-info-value {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-strong);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.dz-dest-info-empty { font-weight: 500; opacity: .45; font-style: italic; }

/* Une ligne d article : subordonnee au bloc, sans concurrence visuelle avec le logement. */
.dz-dest-article { padding-top: 8px; padding-bottom: 8px; }
.dz-dest-article-nom { font-weight: 600; font-size: .88rem; color: var(--text-strong); }
.dz-dest-article-x {
    border: 1px solid var(--border-soft);
    background: var(--surface);
    color: #b3261e;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    line-height: 1;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}
.dz-dest-article-x:hover { border-color: #b3261e; background: #fdecea; }
.dz-tl-dest-name {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-strong);
}
.dz-tl-dest-meta {
    font-size: .68rem;
    color: var(--text-strong);
    opacity: .55;
}

.dz-tl-row--livre { border-left-color: var(--border-soft); opacity: .72; }
.dz-tl-row--annule { border-left-color: #9aa5ab; opacity: .72; }

@media (max-width: 576px) {
    .dz-tl-week-rail { gap: 5px; padding: 10px 12px; }
    .dz-tl-week-tile { flex: 1 1 42%; }
}

/* ============================================================
   cfg-* — Handoff 06 (Configuration) — patron liste CRUD 11b.
   Classes partagees, consommees telles quelles par les pages
   Articles / Logements / Types d'articles / Tags / Produits
   d'accueil / Lieux de stockage / Secteurs / Conversions /
   Infos livreur / Utilisateurs / Packs / Roles (taches C a E).
   Ne pas dupliquer ces regles dans le style local d'une page :
   ajouter uniquement les ajustements specifiques a cette page.
   ============================================================ */

.cfg-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.cfg-page-header-main {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.cfg-page-header-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--brand-50);
    color: var(--primary-color);
}

.cfg-page-header-icon svg {
    width: 20px;
    height: 20px;
}

.cfg-page-header-icon--accent {
    background: var(--accent-100);
    color: var(--accent-700);
}

.cfg-page-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-strong);
    line-height: 1.2;
}

.cfg-page-subtitle {
    margin: 2px 0 0;
    font-size: .85rem;
    color: var(--text-strong);
    opacity: .68;
}

.cfg-page-toolbar {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.cfg-search {
    position: relative;
    min-width: 220px;
}

.cfg-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .55;
    pointer-events: none;
}

.cfg-search input.form-control {
    padding-left: 2.25rem;
    border-radius: 10px;
    border-color: var(--border-soft);
    min-height: 44px;
}

.cfg-search input.form-control:focus {
    border-color: var(--brand-200);
    box-shadow: 0 0 0 .2rem rgba(163, 191, 178, .25);
}

/* Section repliable par categorie (type d'article, etc.) */
.cfg-section {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    background: #fff;
    margin-top: .9rem;
}

.cfg-section-head {
    width: 100%;
    border: 0;
    text-align: left;
    background: var(--surface-soft);
    padding: .7rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 44px;
}

.cfg-section-head-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    color: var(--text-strong);
}

.cfg-section-count {
    font-family: var(--bs-font-monospace, ui-monospace, monospace);
    font-size: .8rem;
    color: var(--text-strong);
    opacity: .65;
}

.cfg-section-chevron {
    display: inline-flex;
    color: var(--text-strong);
    opacity: .6;
    flex-shrink: 0;
}

.cfg-section-body {
    padding: 0;
}

/* Ligne d'entite : nom | chips mono | actions */
.cfg-row {
    transition: background-color .12s ease;
}

.cfg-row:hover {
    background-color: rgba(163, 191, 178, .14);
}

.cfg-row-name {
    font-weight: 600;
    color: var(--text-strong);
}

.cfg-row-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
}

.cfg-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-family: var(--bs-font-monospace, ui-monospace, monospace);
    font-size: .74rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--text-strong);
    background: var(--surface-soft);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
}

.cfg-chip--brand {
    background: var(--brand-50);
    border-color: rgba(47, 85, 84, .18);
    color: var(--primary-color);
}

.cfg-chip--accent {
    background: var(--accent-100);
    border-color: rgba(163, 75, 105, .22);
    color: var(--accent-700);
}

.cfg-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .4rem;
    flex-wrap: nowrap;
}

/* Boutons d'action 32x32 (44px min sur mobile, cf. contrainte hit-target) */
.cfg-action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    background: #fff;
    color: var(--text-strong);
    flex-shrink: 0;
}

.cfg-action-btn:hover {
    background: var(--surface-soft);
}

.cfg-action-btn--danger {
    color: var(--accent-700);
    border-color: rgba(163, 75, 105, .28);
}

.cfg-action-btn--danger:hover {
    background: rgba(163, 75, 105, .1);
}

@media (max-width: 576px) {
    .cfg-page-header {
        align-items: flex-start;
    }

    .cfg-page-toolbar {
        width: 100%;
    }

    .cfg-search {
        flex: 1 1 auto;
        min-width: 0;
    }

    .cfg-action-btn {
        width: 44px;
        height: 44px;
    }
}
