/* ═══════════════════════════════════════════════════════════
   DTISoft — Module Articles
   ═══════════════════════════════════════════════════════════ */

/* ── Module wrapper ─────────────────────────────────────── */
.module-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--gray-100);
}

/* ── Toolbar ─────────────────────────────────────────────── */
.module-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
    flex-wrap: wrap;
}
.module-filters { display: flex; gap: 5px; flex-shrink: 0; }

.filter-toggle {
    display: flex; align-items: center; gap: 5px;
    padding: 4px 11px;
    border: 1.5px solid var(--gray-200);
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px; font-weight: 500;
    color: var(--gray-500);
    background: var(--gray-100);
    transition: all .15s;
    white-space: nowrap;
}
.filter-toggle:hover { border-color: var(--blue-light); color: var(--blue-mid); background: var(--blue-pale); }
.filter-toggle.active {
    background: var(--blue-mid); border-color: var(--blue-mid);
    color: #fff; box-shadow: 0 2px 6px rgba(30,91,181,.22);
}

.module-search-wrap {
    display: flex; align-items: center; gap: 6px;
    flex: 1; min-width: 160px; max-width: 360px;
    background: var(--gray-100);
    border: 1.5px solid var(--gray-200);
    border-radius: 7px; padding: 0 9px;
    transition: border-color .15s, box-shadow .15s;
}
.module-search-wrap:focus-within {
    border-color: var(--blue-light); background: var(--white);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.module-search-wrap i { color: var(--gray-400); font-size: 12px; flex-shrink: 0; }
.module-search-wrap input {
    flex: 1; border: none; background: none; outline: none;
    font-size: 12.5px; color: var(--gray-700); height: 30px;
}
.module-search-wrap input::placeholder { color: var(--gray-400); }
.search-clear { color: var(--gray-400); cursor: pointer; padding: 2px; font-size: 11px; }
.search-clear:hover { color: var(--gray-700); }

.module-info { font-size: 11px; color: var(--gray-400); white-space: nowrap; margin-left: auto; }

/* ── Aide filtres ─────────────────────────────────────────── */
.flt-help-wrap { position: relative; }

.flt-help-btn {
    width: 24px; height: 24px;
    border: none; background: none; cursor: pointer; padding: 0;
    color: var(--gray-400); font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: color .15s, background .15s;
}
.flt-help-btn:hover { color: var(--blue-mid); background: var(--blue-pale); }

.flt-help-panel {
    display: none;
    position: absolute; top: calc(100% + 6px); left: 0;
    z-index: 200;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,.13);
    padding: 12px 14px;
    min-width: 280px;
    font-size: 12px;
}
.flt-help-panel.visible { display: block; }

.flt-help-title {
    font-weight: 700; font-size: 11.5px;
    color: var(--gray-600); margin-bottom: 8px;
    text-transform: uppercase; letter-spacing: .04em;
}
.flt-help-table { border-collapse: collapse; width: 100%; }
.flt-help-table tr:not(:last-child) td { padding-bottom: 4px; }
.flt-help-table td:first-child { padding-right: 12px; white-space: nowrap; }
.flt-help-table td { color: var(--gray-600); vertical-align: top; }
.flt-help-table code {
    background: var(--gray-100); border: 1px solid var(--gray-200);
    border-radius: 3px; padding: 1px 5px;
    font-family: 'Consolas','Courier New',monospace; font-size: 11px;
    color: var(--blue-dark);
}
.flt-help-note {
    margin-top: 9px; padding-top: 8px;
    border-top: 1px solid var(--gray-100);
    font-size: 11px; color: var(--gray-400);
}
.flt-help-note kbd {
    background: var(--gray-100); border: 1px solid var(--gray-300);
    border-radius: 3px; padding: 1px 5px; font-size: 10px;
}

/* Loading indicator dot */
.art-loading-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--gray-300);
    flex-shrink: 0;
    transition: background .2s;
}
.art-loading-dot.active {
    background: var(--blue-mid);
    animation: pulse-dot .8s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(.7); }
}

/* ── Table wrapper ───────────────────────────────────────── */
.table-wrap {
    flex: 1; display: flex; flex-direction: column;
    overflow: hidden; position: relative;
}

.table-loading {
    position: absolute; inset: 0; background: rgba(255,255,255,.8);
    align-items: center; justify-content: center;
    gap: 8px; font-size: 13px; color: var(--blue-mid); z-index: 20;
}
.table-loading i { font-size: 18px; }

.table-empty {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 10px; color: var(--gray-400); font-size: 14px;
}
.table-empty i { font-size: 34px; opacity: .45; }

/* ── Scroll outer ────────────────────────────────────────── */
.art-scroll-outer {
    flex: 1; overflow: auto;
    scrollbar-width: auto; scrollbar-color: var(--gray-400) var(--gray-100);
}
.art-scroll-outer::-webkit-scrollbar       { width: 14px; height: 14px; }
.art-scroll-outer::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 7px; border: 3px solid var(--gray-100); }
.art-scroll-outer::-webkit-scrollbar-track { background: var(--gray-100); }
.art-scroll-outer::-webkit-scrollbar-corner { background: var(--gray-100); }

/* ── Table principale ────────────────────────────────────── */
.art-table {
    width: max-content; min-width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

/* ── thead sticky ───────────────────────────────────────── */
#artThead {
    position: sticky; top: 0; z-index: 10;
}

/* ── Header row ─────────────────────────────────────────── */
.art-th {
    position: relative;
    padding: 5px 20px 5px 7px; /* right padding laisse place au resize handle */
    background: linear-gradient(to bottom, #f0f4fa 0%, #e2e8f0 100%);
    border-right: 1px solid var(--gray-300);
    border-bottom: 2px solid var(--gray-300);
    font-size: 11px; font-weight: 700; color: var(--gray-700);
    white-space: nowrap; user-select: none;
    cursor: default;
    height: 28px;
}
.art-th:last-child { border-right: none; }
.art-th.sortable { cursor: pointer; }
.art-th.sortable:hover { background: linear-gradient(to bottom, var(--blue-pale) 0%, #c7d9f7 100%); color: var(--blue-dark); }
.art-th.sort-active { background: linear-gradient(to bottom, #dbeafe 0%, #bdd1f4 100%); color: var(--blue-dark); }

/* Drag states */
.art-th.col-dragging { opacity: .5; }
.art-th.col-drag-over { border-left: 3px solid var(--blue-light); }

.th-label { margin-right: 3px; }
.si { font-size: 9px; color: var(--blue-mid); }
.si.muted { color: var(--gray-300); }

/* Resize handle */
.th-resize {
    position: absolute; right: 0; top: 0; bottom: 0; width: 6px;
    cursor: col-resize; z-index: 2; background: transparent;
    transition: background .1s;
}
.th-resize:hover, .th-resize:active { background: rgba(59,130,246,.45); }

/* ── Filter row ─────────────────────────────────────────── */
.filter-row {
    background: #fafbfc;
    border-bottom: 2px solid var(--gray-300);
}

.flt-cell {
    padding: 2px 3px;
    border-right: 1px solid var(--gray-200);
    height: 26px;
}
.flt-cell:last-child { border-right: none; }
.flt-cell.flt-empty { background: #f5f6f8; }

.flt-input {
    width: 100%; height: 20px;
    border: 1px solid var(--gray-200);
    border-radius: 3px;
    padding: 0 4px;
    font-size: 11px; color: var(--gray-700);
    background: var(--white);
    outline: none;
    transition: border-color .15s;
}
.flt-input:focus { border-color: var(--blue-light); box-shadow: 0 0 0 2px rgba(59,130,246,.1); }
.flt-input::placeholder { color: var(--gray-300); }

.flt-select {
    width: 100%; height: 20px;
    border: 1px solid var(--gray-200);
    border-radius: 3px;
    padding: 0 2px;
    font-size: 11px; color: var(--gray-700);
    background: var(--white);
    outline: none;
    cursor: pointer;
    transition: border-color .15s;
}
.flt-select:focus { border-color: var(--blue-light); box-shadow: 0 0 0 2px rgba(59,130,246,.1); }

/* ── Data rows ───────────────────────────────────────────── */
.art-table td {
    padding: 3px 7px;
    border-right: 1px solid var(--gray-200);
    border-bottom: 1px solid #eef0f3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 0;          /* force text-overflow avec table-layout:fixed */
    height: 24px;
    line-height: 18px;
    vertical-align: middle;
}
.art-table td:last-child { border-right: none; }

.art-table tbody tr:hover td { background: #eff6ff !important; }

/* ── Colonne Qu Disp/Casier ──────────────────────────────── */
.cell-casier { padding: 2px 6px; vertical-align: top; }
.casier-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    height: 18px;
    line-height: 18px;
}
.casier-code {
    font-size: 11px;
    color: var(--gray-500);
    font-family: monospace;
    flex-shrink: 0;
}
.casier-qty {
    font-size: 11px;
    font-weight: 600;
    text-align: right;
}
.art-table tbody tr:nth-child(even) td { background: #fafbfc; }
.art-table tbody tr.row-disabled td { color: var(--gray-400); }
.art-table tbody tr.row-disabled:hover td { background: #fff5f5 !important; }
.art-table tbody tr.row-selected td { background: #99c2ff !important; color: inherit; }
.art-table tbody tr.row-selected:hover td { background: #80adff !important; }
.art-table tbody tr { cursor: default; user-select: none; }

/* Virtual scroll spacers */
.vs-spacer { padding: 0 !important; border: none !important; height: 0; background: transparent !important; }

/* ── Column-specific ─────────────────────────────────────── */
.text-right  { text-align: right !important; }
.text-center { text-align: center !important; }
.col-ref     { font-family: 'Consolas', 'Courier New', monospace; font-size: 11.5px; font-weight: 600; }
.col-formula { font-family: 'Consolas', 'Courier New', monospace; font-size: 11px; color: var(--gray-500); }

/* Status icons */
.si-active   { font-size: 8px;  color: #22c55e; }
.si-deprecie { font-size: 12px; color: #f59e0b; }
.si-disabled { font-size: 12px; color: #ef4444; }
.si-compose  { font-size: 11px; color: var(--blue-light); }
.art-img-icon { font-size: 11px; color: var(--gray-400); transition: color .15s; }
.art-img-icon:hover { color: var(--primary); }
.si-pub      { font-size: 11px; color: #0ea5e9; }
.si-ges      { font-size: 10px; color: #f59e0b; }

/* Statut text */
.statut-deprecie { color: #f59e0b; font-size: 11px; }
.statut-disabled { color: #ef4444; font-size: 11px; }

/* Quantity colors */
.qty-pos { color: #16a34a; font-weight: 600; }
.qty-neg { color: #dc2626; font-weight: 600; }

/* Empty row (aucun résultat, mais le tableau reste visible) */
.table-empty-row {
    text-align: center !important;
    padding: 40px 20px !important;
    color: var(--gray-400);
    font-size: 13px;
    font-style: italic;
}
.table-empty-row i { margin-right: 8px; font-size: 15px; opacity: .6; }

/* Error cell */
.table-error {
    text-align: center !important; padding: 20px !important;
    color: #dc2626; font-size: 13px;
}

/* ── Status bar ──────────────────────────────────────────── */
.art-status-bar {
    padding: 3px 10px;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    font-size: 10.5px; color: var(--gray-400);
    flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
    .filter-toggle span { display: none; }
    .filter-toggle      { padding: 4px 8px; }
    .module-info        { display: none; }
}

/* ── Popup résultat suppression articles (avec choix désactiver) ─ */
.dti-art-result-overlay {
    position: fixed; inset: 0; z-index: 10500;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
}
.dti-art-result-box {
    background: #fff; border-radius: 8px;
    box-shadow: 0 12px 50px rgba(0,0,0,.35);
    width: 620px; max-width: 92%;
    max-height: 85vh;
    padding: 18px 22px;
    text-align: center;
    display: flex; flex-direction: column;
}
.dti-art-result-icon { font-size: 40px; color: #ea580c; margin-bottom: 6px; }
.dti-art-result-title { font-size: 16px; font-weight: 700; color: #7c2d12; margin-bottom: 8px; }
.dti-art-result-stats { font-size: 13px; color: #374151; margin-bottom: 14px; }
.dti-art-result-stats .art-fail { color: #b91c1c; }
.dti-art-result-subtitle { font-size: 12px; color: #6b7280; text-align: left; margin-bottom: 4px; font-weight: 600; }
.dti-art-result-tablewrap {
    flex: 1; overflow: auto; min-height: 80px; max-height: 280px;
    border: 1px solid #e5e7eb; border-radius: 4px; margin-bottom: 14px;
}
.dti-art-result-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dti-art-result-table thead { background: #f9fafb; position: sticky; top: 0; }
.dti-art-result-table th, .dti-art-result-table td {
    padding: 5px 10px; text-align: left; border-bottom: 1px solid #f3f4f6;
}
.dti-art-result-table th { font-weight: 600; color: #374151; font-size: 11px; }
.dti-art-result-question { font-size: 13px; color: #374151; margin-bottom: 12px; }
.dti-art-result-foot { display: flex; justify-content: flex-end; gap: 8px; }
.dti-art-result-leave {
    padding: 7px 16px; border: 1px solid #d1d5db; background: #fff; color: #374151;
    border-radius: 4px; cursor: pointer; font-size: 13px;
}
.dti-art-result-leave:hover { background: #f3f4f6; }
.dti-art-result-disable {
    padding: 7px 16px; border: 1px solid #ea580c; background: #ea580c; color: #fff;
    border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 6px;
}
.dti-art-result-disable:hover { background: #c2410c; border-color: #c2410c; }

/* Variante du popup d'erreur en mode succès (vert) */
.dti-delete-err-box.art-info-success .dti-delete-err-icon { color: #16a34a; }

/* Badges « Action proposée » dans le tableau des bloqués */
.art-act-badge {
    display: inline-block; padding: 1px 8px; border-radius: 3px;
    font-size: 11px; font-weight: 600;
}
.art-act-badge.art-act-deprec  { background: #fef3c7; color: #92400e; }  /* Déprécier (jaune) */
.art-act-badge.art-act-disable { background: #fee2e2; color: #991b1b; }  /* Désactiver (rouge) */

/* Rapport de suppression (2026-09-29) : ligne « Raisons » + colonnes Raison / Détail */
.dti-art-result-box { width: 780px; }
.dti-art-result-reasons { font-size: 12.5px; color: #374151; margin: -6px 0 12px; }
.dti-art-result-table .art-res-reason { font-weight: 600; white-space: nowrap; }
.dti-art-result-table .art-res-detail { color: #475569; }
.dti-art-result-leave:disabled, .dti-art-result-disable:disabled { opacity: .55; cursor: default; }

/* ═══ Menu contextuel (clic droit) de la vue Articles — 2026-09-29 ═══
   Pas de classe `*-overlay` sur le menu : modalCovering() ne doit pas le voir. */
.art-ctx-menu {
    position: fixed; z-index: 10001;
    background: #fff; border: 1px solid #cbd5e1; border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    padding: 4px 0; min-width: 230px; font-size: 13px;
    user-select: none;
}
.art-ctx-title {
    padding: 4px 12px 6px; margin-bottom: 4px;
    font-size: 11px; font-weight: 600; color: #64748b;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px;
}
.art-ctx-item {
    display: flex; align-items: center; gap: 9px;
    width: 100%; padding: 6px 14px; text-align: left;
    border: 0; background: none; cursor: pointer;
    font: inherit; color: #1f2937; white-space: nowrap;
}
.art-ctx-item i { width: 16px; text-align: center; color: #64748b; font-size: 12px; }
.art-ctx-item:hover:not(:disabled), .art-ctx-item:focus-visible { background: #eff6ff; color: #1e3a8a; outline: none; }
.art-ctx-item:hover:not(:disabled) i, .art-ctx-item:focus-visible i { color: #2563eb; }
.art-ctx-danger:hover:not(:disabled), .art-ctx-danger:focus-visible { background: #fef2f2; color: #991b1b; }
.art-ctx-danger:hover:not(:disabled) i, .art-ctx-danger:focus-visible i { color: #dc2626; }
.art-ctx-item:disabled { color: #9ca3af; cursor: not-allowed; }
.art-ctx-item:disabled i { color: #cbd5e1; }
.art-ctx-sep { height: 1px; background: #e5e7eb; margin: 4px 0; }

/* ─── Popups Propriétés / Back-orders ─── */
.art-pop-overlay {
    position: fixed; inset: 0; z-index: 10500;
    background: rgba(15,23,42,.5);
    display: flex; align-items: center; justify-content: center;
}
.art-pop-overlay [hidden] { display: none !important; }
.art-pop-panel {
    background: #fff; border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    width: 560px; max-width: 94vw; max-height: 88vh;
    display: flex; flex-direction: column; overflow: hidden; outline: none;
}
.art-pop-panel.art-props-panel { width: 740px; }
.art-pop-panel.art-bo-panel    { width: 1180px; height: 82vh; }
.art-pop-head {
    padding: 12px 18px; background: #1e3a8a; color: #fff;
    font-weight: 700; font-size: 14px;
    display: flex; align-items: center; gap: 8px;
}
.art-pop-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-pop-close {
    border: 0; background: none; color: #fff; opacity: .8;
    cursor: pointer; font-size: 15px; padding: 2px 4px; line-height: 1;
}
.art-pop-close:hover { opacity: 1; }
.art-pop-body {
    padding: 14px 18px; overflow-y: auto; flex: 1; min-height: 0;
    font-size: 13px; color: #1f2937; line-height: 1.45;
    display: flex; flex-direction: column; gap: 10px;
}
.art-pop-foot {
    padding: 10px 18px; border-top: 1px solid #e5e7eb;
    display: flex; justify-content: flex-end; align-items: center; gap: 8px;
}
.art-pop-btn {
    padding: 7px 14px; border: 1px solid #cbd5e1; background: #fff; color: #1f2937;
    border-radius: 4px; cursor: pointer; font-size: 13px; font-family: inherit;
}
.art-pop-btn:hover:not(:disabled) { background: #f8fafc; }
.art-pop-btn:disabled { opacity: .55; cursor: default; }
.art-pop-btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; font-weight: 600; }
.art-pop-btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.art-pop-progress { margin-right: auto; font-size: 12px; color: #64748b; }
.art-pop-loading { color: #64748b; padding: 8px 0; }
.art-pop-err { color: #b91c1c; font-size: 12.5px; }
.art-pop-err:empty { display: none; }
.art-pop-warn {
    background: #fffbeb; border: 1px solid #fcd34d; color: #92400e;
    padding: 7px 10px; border-radius: 4px; font-size: 12.5px;
}
.art-pop-hint { font-size: 11.5px; color: #64748b; }
.art-pop-note { font-size: 11.5px; color: #b45309; }
.art-pop-note.is-info { color: #64748b; }
.art-pop-select {
    padding: 5px 7px; border: 1px solid #cbd5e1; border-radius: 4px;
    font-size: 13px; font-family: inherit; background: #fff;
}

/* Propriétés (1..N articles) */
.art-props-grid {
    display: grid; grid-template-columns: 120px minmax(0, 1fr);
    column-gap: 12px; row-gap: 12px; align-items: start;
}
.art-props-lbl {
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
    color: #64748b; padding-top: 7px;
}
.art-props-ctl { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.art-props-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.art-props-mode { flex: 0 0 190px; }
.art-props-cur { font-size: 11.5px; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-props-qulbl { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #475569; cursor: help; }
.art-props-qu { width: 64px; padding: 5px 6px; border: 1px solid #cbd5e1; border-radius: 4px; font: inherit; font-weight: 400; }
.art-props-tri { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; padding-top: 5px; }
.art-props-tri input { width: 15px; height: 15px; margin: 0; cursor: pointer; }
.art-props-tristate { font-size: 11.5px; color: #64748b; }
.art-props-tristate.is-dirty { color: #1d4ed8; font-weight: 600; }
/* Préremplissage (2026-10-01) : champ CHANGÉ (seul envoyé) repéré par son libellé + bordure bleue ;
   « - » = valeurs différentes (placeholder lisible) ; ✕ vider / ↺ rétablir la valeur actuelle. */
.art-props-lbl.is-dirty { color: #1d4ed8; }
.art-props-lbl.is-dirty::after { content: ' \2022'; }
.art-pop-select.is-dirty,
.art-cb.is-dirty .art-cb-inp { border-color: #2563eb; background: #eff6ff; }
.art-cb-inp::placeholder { color: #64748b; opacity: 1; }
.art-props-ibtn {
    flex: 0 0 auto; width: 28px; height: 28px; padding: 0;
    border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; color: #64748b;
    cursor: pointer; font-size: 12px; line-height: 1;
}
.art-props-ibtn:hover { background: #f8fafc; color: #1f2937; }
.art-props-taxcur { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; font-size: 12px; color: #334155; min-width: 0; }
.art-props-taxrow { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.art-props-taxrow b { flex: 0 0 auto; }
.art-props-taxlib { flex: 0 1 auto; min-width: 0; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-props-taxqu { flex: 0 0 auto; font-weight: 600; color: #1e3a8a; }
.art-props-taxn { flex: 0 0 auto; margin-left: auto; color: #64748b; font-size: 11.5px; }
.art-props-taxnone { font-size: 11.5px; color: #64748b; }
.art-props-arts summary { cursor: pointer; font-size: 12px; color: #475569; }
.art-props-artlist {
    max-height: 150px; overflow-y: auto; margin-top: 4px;
    border: 1px solid #e5e7eb; border-radius: 4px; font-size: 12px;
}
.art-props-artrow { display: flex; gap: 10px; padding: 3px 8px; border-bottom: 1px solid #f1f5f9; }
.art-props-artrow:last-child { border-bottom: 0; }
.art-props-artrow b { flex: 0 0 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-props-artrow span { color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-props-sum { font-weight: 600; color: #15803d; }
.art-props-sum.has-err { color: #b45309; }
.art-props-res {
    border: 1px solid #e5e7eb; border-radius: 4px;
    max-height: 46vh; overflow-y: auto; font-size: 12px;
}
.art-props-rrow {
    display: grid; grid-template-columns: 160px 76px minmax(0, 1fr);
    gap: 8px; align-items: baseline; padding: 4px 9px; border-bottom: 1px solid #f1f5f9;
}
.art-props-rrow:last-child { border-bottom: 0; }
.art-props-rrow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-props-rdet { color: #475569; }
.art-props-badge { display: inline-block; padding: 0 7px; border-radius: 3px; font-size: 11px; font-weight: 600; text-align: center; }
.art-props-badge.is-modifie  { background: #dcfce7; color: #166534; }
.art-props-badge.is-inchange { background: #f1f5f9; color: #475569; }
.art-props-badge.is-erreur   { background: #fee2e2; color: #991b1b; }

/* Combobox à recherche (liste en position fixe : jamais rognée par le corps défilant) */
.art-cb { position: relative; flex: 1 1 220px; min-width: 180px; }
.art-cb.is-off .art-cb-inp { background: #f8fafc; color: #64748b; }
.art-cb-inp {
    width: 100%; box-sizing: border-box; padding: 5px 8px;
    border: 1px solid #cbd5e1; border-radius: 4px; font: inherit; font-size: 13px;
}
.art-cb-inp:focus { outline: 2px solid #93c5fd; outline-offset: -1px; }
.art-cb-list {
    position: fixed; z-index: 5;
    background: #fff; border: 1px solid #cbd5e1; border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    overflow-y: auto; font-size: 12.5px;
}
.art-cb-opt { display: flex; justify-content: space-between; gap: 10px; padding: 4px 9px; cursor: pointer; }
.art-cb-opt.is-active, .art-cb-opt:hover { background: #eff6ff; color: #1e3a8a; }
.art-cb-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-cb-sub { color: #64748b; white-space: nowrap; font-size: 11.5px; }
.art-cb-empty { padding: 6px 9px; color: #64748b; font-style: italic; }

/* Back-orders (commandes ouvertes clients + fournisseurs) */
.art-bo-panel .art-pop-body { gap: 8px; }
.art-bo-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.art-bo-chk { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 13px; }
.art-bo-cnt { color: #64748b; font-size: 12px; }
.art-bo-q {
    flex: 0 1 260px; padding: 5px 8px;
    border: 1px solid #cbd5e1; border-radius: 4px; font: inherit; font-size: 13px;
}
.art-bo-info { margin-left: auto; font-size: 12px; color: #475569; }
.art-bo-tablewrap { flex: 1; min-height: 120px; overflow: auto; border: 1px solid #e5e7eb; border-radius: 4px; }
.art-bo-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.art-bo-table th {
    position: sticky; top: 0; z-index: 1; background: #f8fafc;
    color: #374151; font-weight: 600; font-size: 11px; text-align: left;
    padding: 5px 8px; border-bottom: 1px solid #e5e7eb; white-space: nowrap;
}
.art-bo-table td { padding: 3px 8px; border-bottom: 1px solid #f1f5f9; white-space: nowrap; }
.art-bo-table .num { text-align: right; }
.art-bo-row { cursor: pointer; }
.art-bo-row.art-bo-first td { border-top: 1px solid #cbd5e1; }
.art-bo-row:hover td { background: #f8fafc; }
/* Sélection plus spécifique ET plus soutenue que le survol (§7.55) */
.art-bo-table .art-bo-row.is-sel td { background: #bfdbfe; }
.art-bo-row:focus { outline: none; }
.art-bo-row:focus td { box-shadow: inset 0 1px 0 #2563eb, inset 0 -1px 0 #2563eb; }
.art-bo-doc { font-weight: 600; }
.art-bo-tiers, .art-bo-lib { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.art-bo-qbo { font-weight: 700; }
.art-bo-badge { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 10.5px; font-weight: 600; }
.art-bo-badge.is-cli { background: #dbeafe; color: #1e40af; }
.art-bo-badge.is-fou { background: #fef3c7; color: #92400e; }
.art-bo-empty { padding: 18px; text-align: center; color: #64748b; }
.art-bo-notes:empty, .art-bo-synth:empty { display: none; }
.art-bo-synth { max-height: 30vh; overflow: auto; flex-shrink: 0; }
.art-bo-synthdet summary { cursor: pointer; font-size: 12px; color: #475569; }
.art-bo-synthtab { margin-top: 4px; }
.art-bo-none td { color: #94a3b8; }

/* Suppression en cours (bloque la vue le temps de l'appel) */
.art-busy-overlay {
    position: fixed; inset: 0; z-index: 10400;
    background: rgba(15,23,42,.35);
    display: flex; align-items: center; justify-content: center; cursor: progress;
}
.art-busy-box {
    background: #fff; border-radius: 8px; padding: 14px 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,.3);
    display: flex; align-items: center; gap: 10px; font-size: 13px; color: #1f2937;
}
.art-busy-box i { color: #2563eb; }
