/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   DTISoft — Duplicata (js/dup.js = window.DTIDup, préfixe dup-) — 2026-10-02
   Modale de clé / d'options (.dup-overlay, z 11300 : au-dessus des fiches ≤ 9700, menus 10001,
   propriétés 10500, audit 10600, étiquettes 10800, picker 11000), toast (.dup-toast, PAS « -overlay » :
   jamais candidat au « premier plan » de DTIOverlay), et éléments ajoutés par app.js aux popups frm- des
   tables de paramètres (bouton « Dupliquer », clé à vérifier, bandeau).
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

.dup-overlay {
    position: fixed; inset: 0; z-index: 11300;
    background: rgba(15, 23, 42, .45);
    display: flex; align-items: center; justify-content: center;
}
/* §7.41 : [hidden] doit masquer quelle que soit la classe qui déclare display. */
.dup-overlay [hidden] { display: none; }

.dup-panel {
    background: var(--white, #fff); color: var(--gray-700, #334155);
    border-radius: 8px; width: 440px; max-width: calc(100vw - 32px); max-height: 86vh;
    overflow: auto; box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
    display: flex; flex-direction: column;
}
.dup-head {
    display: flex; align-items: center; gap: 8px; min-width: 0;
    padding: 12px 16px; font-size: 14px; font-weight: 700; color: var(--gray-900, #0f172a);
    background: var(--gray-50, #f8fafc); border-bottom: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 8px 8px 0 0;
}
.dup-head i { color: var(--blue-mid, #1e5bb5); }
.dup-titre { min-width: 0; overflow-wrap: anywhere; }
.dup-body { padding: 14px 16px 8px; display: flex; flex-direction: column; gap: 8px; }
.dup-label { font-size: 12px; font-weight: 600; color: var(--gray-500, #64748b); }
.dup-input {
    height: 34px; padding: 0 10px; font-size: 13px; font-family: inherit;
    border: 1px solid var(--gray-300, #cbd5e1); border-radius: 5px; background: #fff; color: inherit;
}
.dup-input:focus { outline: none; border-color: var(--blue-light, #3b82f6); box-shadow: 0 0 0 2px var(--blue-pale, #dbeafe); }
.dup-input.dup-input-err { border-color: #dc2626; box-shadow: 0 0 0 2px #fee2e2; }
.dup-input[readonly] { background: var(--gray-50, #f8fafc); }
/* pre-line : les aides « Recopié : … / Non recopié : … / ⚠ … » sont composées de lignes jointes par « \n » (revue 2026-10-02, DUP-AIDE-11). */
.dup-aide { font-size: 12px; color: var(--gray-500, #64748b); line-height: 1.4; white-space: pre-line; }
.dup-err { font-size: 12px; color: #b91c1c; min-height: 16px; }
.dup-msg { font-size: 13px; line-height: 1.45; }
.dup-cases { display: flex; flex-direction: column; gap: 6px; }
.dup-case { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; cursor: pointer; line-height: 1.35; }
.dup-case input { margin-top: 2px; }
.dup-foot {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 10px 16px; border-top: 1px solid var(--gray-200, #e2e8f0);
}
.dup-btn {
    padding: 7px 14px; font-size: 13px; font-family: inherit; cursor: pointer;
    border: 1px solid var(--gray-300, #cbd5e1); border-radius: 5px; background: #fff; color: var(--gray-700, #334155);
}
.dup-btn:hover:not(:disabled) { background: var(--gray-50, #f8fafc); }
.dup-btn-ok { background: var(--blue-mid, #1e5bb5); border-color: var(--blue-mid, #1e5bb5); color: #fff; font-weight: 600; }
.dup-btn-ok:hover:not(:disabled) { background: var(--blue-dark, #1a3a6e); }
.dup-btn:disabled { opacity: .6; cursor: not-allowed; }

.dup-toast {
    position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 11500;
    max-width: calc(100vw - 32px); padding: 9px 18px; border-radius: 8px;
    background: #1e293b; color: #fff; font-size: 13px; font-weight: 600; text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25); pointer-events: none;
}

/* ── Popups frm- des tables de paramètres (app.js) ── */
.frm-footer .dup-frm-btn { margin-right: auto; display: flex; align-items: center; gap: 5px; }
.frm-overlay .dup-cle {
    background: #fef9c3; border-color: #eab308 !important; box-shadow: 0 0 0 1px #eab308;
}
.dup-frm-note {
    font-size: 12px; line-height: 1.4; color: #854d0e;
    background: #fefce8; border: 1px solid #fde68a; border-radius: 4px; padding: 6px 8px;
}
