/* ═══════════════════════════════════════════════════════════
   DTISoft — Centralisation comptable — namespace `cz-` (bleu DTI)
   ═══════════════════════════════════════════════════════════ */
.cz-overlay {
    position: fixed; inset: 0; z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .5);
}
.cz-panel {
    display: flex; flex-direction: column;
    width: 984px; max-width: calc(100% - 32px); height: 80vh; max-height: 80vh;  /* 820 +20 % (demande utilisateur) */
    background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .4);
    font-size: 13px; color: #1e293b;
}
.cz-header {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; background: #2563eb; color: #fff; flex: 0 0 auto;
}
.cz-title { flex: 1 1 auto; font-weight: 600; font-size: 14px; }
.cz-close { background: rgba(255,255,255,.15); color: #fff; border: none; cursor: pointer; width: 28px; height: 26px; border-radius: 5px; }
.cz-close:hover { background: rgba(255,255,255,.3); }

.cz-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #eef2f7; flex: 0 0 auto; }
.cz-toolbar label { color: #64748b; font-size: 12px; }
.cz-date { padding: 5px 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; }
.cz-spacer { flex: 1 1 auto; }
.cz-toolbar button {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
}
.cz-refresh { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.cz-refresh:hover { background: #e2e8f0; }
.cz-export { background: #fff; color: #1d4ed8; border-color: #2563eb; }
.cz-export:hover { background: #eff6ff; }
.cz-run { background: #2563eb; color: #fff; }
.cz-run:hover:not(:disabled) { background: #1d4ed8; }
.cz-run:disabled { opacity: .5; cursor: default; }

.cz-body { flex: 1 1 auto; overflow: auto; padding: 12px; }
.cz-loading { padding: 30px; text-align: center; color: #64748b; }
.cz-summary { padding: 8px 12px; margin-bottom: 12px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; color: #1e293b; }
.cz-ok { color: #15803d; font-weight: 600; }

.cz-sec { margin-bottom: 16px; }
.cz-sec-head { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #1d4ed8; font-weight: 700; margin-bottom: 6px; }
.cz-empty { color: #94a3b8; padding: 6px 2px; }
.cz-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cz-tbl th { text-align: left; background: #f1f5f9; color: #475569; font-weight: 600; padding: 5px 8px; border-bottom: 1px solid #e2e8f0; }
.cz-tbl td { padding: 5px 8px; border-bottom: 1px solid #f1f5f9; }
.cz-tbl .cz-r { text-align: right; white-space: nowrap; }

.cz-note { padding: 8px 12px; border-top: 1px solid #eef2f7; color: #64748b; font-size: 12px; flex: 0 0 auto; }
.cz-note b { color: #475569; }

.cz-voir { background: #fff; color: #475569; border-color: #cbd5e1; }
.cz-voir:hover:not(:disabled) { background: #f8fafc; }
.cz-voir-wrap { max-height: 180px; overflow: auto; border: 1px solid #eef2f7; border-radius: 6px; }
/* La modale « Voir Falco » contient 2 tables → élargie */
.cz-modal:has(.cz-voir-wrap) { width: 760px; }

.cz-undo { background: #fff; color: #b45309; border-color: #f59e0b; }
.cz-undo:hover:not(:disabled) { background: #fffbeb; }
.cz-undo:disabled { opacity: .45; cursor: default; }

/* ═══ Modales maison (confirmation « OUI » + info) — z au-dessus de l'outil ═══ */
.cz-modal-overlay {
    position: fixed; inset: 0; z-index: 9100;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .55);
}
.cz-modal {
    width: 480px; max-width: calc(100% - 40px); max-height: 85vh;
    display: flex; flex-direction: column;
    background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
    font-size: 13px; color: #1e293b;
}
.cz-modal-head {
    padding: 10px 14px; background: #2563eb; color: #fff;
    font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px;
}
.cz-modal-head.cz-modal-danger { background: #b45309; }
.cz-modal-body { padding: 14px 16px; overflow: auto; }
.cz-modal-body p { margin: 0 0 8px; line-height: 1.45; }
.cz-modal-list { margin: 6px 0 10px 18px; padding: 0; }
.cz-modal-list li { margin: 3px 0; }
.cz-modal-note { color: #64748b; font-size: 12px; }
.cz-modal-oui { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e2e8f0; }
.cz-modal-oui label { display: block; color: #475569; font-size: 12.5px; margin-bottom: 5px; }
.cz-oui-inp {
    width: 120px; padding: 7px 10px; font-size: 15px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em; text-align: center;
    border: 1px solid #cbd5e1; border-radius: 6px;
}
.cz-oui-inp:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.cz-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid #eef2f7; }
.cz-btn-cancel, .cz-btn-ok {
    padding: 7px 16px; border-radius: 7px; font-size: 13px; font-weight: 600;
    cursor: pointer; border: 1px solid transparent;
}
.cz-btn-cancel { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.cz-btn-cancel:hover { background: #e2e8f0; }
.cz-btn-ok { background: #2563eb; color: #fff; }
.cz-btn-ok:hover:not(:disabled) { background: #1d4ed8; }
.cz-btn-ok:disabled { opacity: .45; cursor: default; }

/* ── Horus Office (2026-09-07) : aperçu dry-run, badge d'état, statuts des pièces ── */
.cz-horus-dry { background: #fff; color: #6d28d9; border-color: #8b5cf6; }
.cz-horus-dry:hover:not(:disabled) { background: #f5f3ff; }
.cz-horus-dry:disabled { opacity: .5; cursor: default; }
.cz-horus-badge { display: inline-block; margin-left: 10px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid; vertical-align: middle; }
.cz-horus-badge.cz-horus-off { color: #64748b; border-color: #cbd5e1; background: #f8fafc; }
.cz-horus-badge.cz-horus-sim { color: #92400e; border-color: #fde68a; background: #fef3c7; }
.cz-horus-badge.cz-horus-on  { color: #166534; border-color: #bbf7d0; background: #dcfce7; }
.cz-dry-wrap { max-height: 340px; }
.cz-modal:has(.cz-dry-wrap) { width: 1040px; max-width: 96vw; }
.cz-st { font-weight: 600; white-space: nowrap; }
.cz-st-ok  { color: #15803d; }
.cz-st-sim { color: #b45309; }
.cz-st-dry { color: #1d4ed8; }
.cz-st-err { color: #b91c1c; }
.cz-st-exi { color: #6d28d9; }   /* déjà présente chez Horus (pré-contrôle d'existence, §7.2) */
.cz-st-skp { color: #64748b; }   /* antérieure à la date de bascule (§7.1) */
.cz-row-err td { background: #fef2f2; }
.cz-row-exi td { background: #f5f3ff; }
.cz-dry-warn { margin: 0 0 8px; padding: 6px 10px; background: #fef3c7; border: 1px solid #fde68a; color: #92400e; border-radius: 4px; font-size: 12px; }
.cz-dry-yes { color: #6d28d9; font-weight: 600; white-space: nowrap; }
.cz-dry-no  { color: #15803d; white-space: nowrap; }
.cz-dry-na  { color: #94a3b8; white-space: nowrap; }
