/* ch.590 — Paramètres → Maintenance (admin). Charte claire, ⛔ aucune variable CSS (piège n°7). Grilles par CLASSES (R120). */
.mt590-page { display: flex; flex-direction: column; gap: 16px; max-width: 1100px; }
.mt590-entete { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 16px; padding: 16px 20px; }
.mt590-h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: #0F172A; }
.mt590-intro { margin: 0; font-size: 13px; color: #64748B; line-height: 1.5; }
.mt590-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mt590-carte { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 16px; padding: 16px 20px; box-shadow: 0 1px 3px rgba(15, 23, 42, .04); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mt590-h3 { margin: 0; font-size: 15px; font-weight: 700; color: #1E293B; }
.mt590-texte { margin: 0; font-size: 13px; color: #475569; line-height: 1.5; }
.mt590-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.mt590-btn { min-height: 44px; padding: 0 16px; border-radius: 10px; border: none; background: #34D399; color: #0F172A; font-size: 13px; font-weight: 700; cursor: pointer; }
.mt590-btn:hover { background: #10B981; }
.mt590-btn-sec { background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0; font-weight: 600; }
.mt590-btn-sec:hover { background: #E2E8F0; }
.mt590-btn-petit { min-height: 44px; padding: 0 12px; font-size: 12px; }
.mt590-liste { display: flex; flex-direction: column; gap: 8px; }
.mt590-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #F1F5F9; border-radius: 10px; background: #F8FAFC; }
.mt590-ligne-id { display: flex; flex-direction: column; min-width: 0; font-size: 13px; color: #1E293B; }
.mt590-ligne-id span { font-size: 12px; color: #64748B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt590-ligne-mt { font-size: 13px; font-weight: 600; color: #0F172A; white-space: nowrap; }
.mt590-ligne-etat { font-size: 12px; color: #92400E; background: #FEF3C7; border-radius: 10px; padding: 2px 8px; }
.mt590-ligne-etat.mt590-ko { color: #B91C1C; background: #FEE2E2; }
.mt590-vide, .mt590-attente { font-size: 13px; color: #64748B; padding: 12px; text-align: center; background: #F8FAFC; border-radius: 10px; }
.mt590-erreur { font-size: 13px; color: #B91C1C; background: #FEE2E2; border-radius: 10px; padding: 10px 12px; }
.mt590-note { font-size: 12px; color: #64748B; }
@media (max-width: 1024px) {
  .mt590-grille { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .mt590-entete, .mt590-carte { padding: 14px; }
  .mt590-ligne { grid-template-columns: minmax(0, 1fr) auto; }
  .mt590-ligne-etat { grid-column: 1 / -1; justify-self: start; }
  .mt590-btn-petit { grid-column: 1 / -1; width: 100%; }
}

/* ch.596 — Doublons de justificatifs : carte pleine largeur, liste des cas, fenêtre d'aperçu (fond blanc, z 1100 < 10000). */
.mt596-carte { grid-column: 1 / -1; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 16px; padding: 16px 20px; box-shadow: 0 1px 3px rgba(15, 23, 42, .04); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mt596-cas { border: 1px solid #E2E8F0; border-radius: 12px; background: #F8FAFC; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mt596-cas-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.mt596-cas-titre { font-size: 14px; font-weight: 700; color: #0F172A; min-width: 0; overflow-wrap: anywhere; }
.mt596-cas-resume { font-size: 13px; color: #475569; line-height: 1.5; overflow-wrap: anywhere; }
.mt596-cas-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.mt596-pastille { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.mt596-pastille-sur { background: #FEF3C7; color: #92400E; }
.mt596-pastille-passages { background: #DBEAFE; color: #1E40AF; }
.mt596-pastille-non { background: #F1F5F9; color: #475569; }
.mt596-etat { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 10px; padding: 2px 8px; }
.mt596-etat-ok { background: #D1FAE5; color: #065F46; }
.mt596-etat-fait { background: #ECFDF5; color: #047857; }
.mt596-etat-non { background: #F1F5F9; color: #475569; }
.mt596-raison { font-size: 12px; color: #475569; margin-top: 4px; line-height: 1.5; overflow-wrap: anywhere; }
.mt596-details { font-size: 12px; color: #334155; }
.mt596-details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: #1E293B; }
.mt596-etapes { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #1E293B; }
.mt596-etape-lib { overflow-wrap: anywhere; }
.mt596-etape-preuve { font-size: 11px; color: #64748B; overflow-wrap: anywhere; }
.mt596-journal { display: flex; flex-direction: column; gap: 4px; }
.mt596-journal-ligne { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 8px; font-size: 12px; color: #334155; padding: 4px 0; border-bottom: 1px solid #F1F5F9; }
.mt596-journal-quand { color: #64748B; white-space: nowrap; }
.mt596-journal-qui { font-weight: 600; white-space: nowrap; }
.mt596-journal-quoi { overflow-wrap: anywhere; }
.mt596-a-supprimer { border: 2px solid #F59E0B; background: #FFFBEB; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.mt596-a-supprimer-titre { font-size: 14px; font-weight: 800; color: #92400E; }
.mt596-a-supprimer-ligne { font-size: 13px; color: #1E293B; overflow-wrap: anywhere; }
.mt596-a-supprimer-note { font-size: 12px; color: #92400E; }
.mt596-fond { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); backdrop-filter: blur(3px); z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mt596-boite { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 16px; padding: 20px; width: 860px; max-width: 96vw; max-height: 90vh; overflow-y: auto; overflow-x: hidden; box-sizing: border-box; box-shadow: 0 24px 70px rgba(15, 23, 42, .22); display: flex; flex-direction: column; gap: 10px; }
.mt596-boite-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mt596-boite-titre { font-size: 16px; font-weight: 800; color: #0F172A; min-width: 0; overflow-wrap: anywhere; }
.mt596-boite-sous { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: #475569; }
.mt596-x { min-width: 44px; min-height: 44px; background: none; border: none; font-size: 20px; cursor: pointer; color: #64748B; }
.mt596-corps { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mt596-avap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mt596-avap-col { border: 1px solid #E2E8F0; border-radius: 12px; padding: 10px 12px; background: #F8FAFC; min-width: 0; }
.mt596-avap-titre { font-size: 13px; font-weight: 800; color: #0F172A; margin-bottom: 4px; }
.mt596-bloc-groupe { margin-top: 6px; }
.mt596-bloc-cle { font-size: 12px; font-weight: 700; color: #334155; }
.mt596-bloc-texte { font-size: 12px; color: #1E293B; overflow-wrap: anywhere; line-height: 1.5; }
.mt596-bloc-liste { margin: 2px 0 0; padding-left: 18px; font-size: 12px; color: #1E293B; overflow-wrap: anywhere; }
.mt596-vide-petit { font-size: 12px; color: #94A3B8; }
.mt596-info { font-size: 13px; color: #475569; background: #F1F5F9; border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; }
.mt596-pied { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.mt596-confirm { border: 1px solid #FCD34D; background: #FFFBEB; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.mt596-confirm-texte { font-size: 13px; color: #78350F; line-height: 1.5; }
.mt596-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.mt596-resultat { border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.mt596-resultat-ok { background: #ECFDF5; border: 1px solid #A7F3D0; }
.mt596-resultat-ko { background: #FEF2F2; border: 1px solid #FECACA; }
.mt596-resultat-titre { font-size: 14px; font-weight: 700; color: #0F172A; overflow-wrap: anywhere; }
.mt596-resultat-msg { font-size: 13px; color: #B91C1C; overflow-wrap: anywhere; }
.mt596-resultat-sous { font-size: 12px; font-weight: 700; color: #334155; }
.mt596-ok { color: #047857; }
.mt596-ko { color: #B91C1C; }
@media (max-width: 768px) {
  .mt596-avap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .mt596-carte { padding: 14px; }
  .mt596-boite { padding: 14px; }
  .mt596-journal-ligne { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .mt596-cas-actions .mt590-btn, .mt596-pied .mt590-btn, .mt596-confirm-actions .mt590-btn { width: 100%; }
}

/* ch.597 — Doublons : une LIGNE compacte par cas, détail en fenêtre, cas terminés repliés. Charte claire (R119), ⛔ aucune variable CSS. */
.mt597-note { margin: 0; font-size: 12px; color: #475569; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 10px; padding: 8px 12px; line-height: 1.5; }
.mt597-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #E2E8F0; border-radius: 12px; background: #FFFFFF; min-width: 0; }
.mt597-ligne-titre { font-size: 14px; font-weight: 600; color: #0F172A; min-width: 0; overflow-wrap: anywhere; }
.mt597-ligne-pastilles { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; min-width: 0; }
.mt597-btn-detail { min-height: 44px; padding: 0 14px; font-size: 13px; }
.mt597-etat { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; max-width: 100%; overflow-wrap: anywhere; }   /* ⚠️ ⛔ pas de nowrap : « Ne pas supprimer : cette pièce porte un paiement » débordait à 375 px (mesuré) */
.mt597-e-afaire { background: #34D399; color: #0F172A; }
.mt597-e-fait { background: #ECFDF5; color: #047857; }
.mt597-e-orange { background: #FEF3C7; color: #92400E; }
.mt597-e-rouge { background: #FEE2E2; color: #B91C1C; }
.mt597-e-gris { background: #F1F5F9; color: #475569; }
.mt597-termines { border: 1px solid #E2E8F0; border-radius: 12px; background: #F8FAFC; padding: 4px 12px; }
.mt597-termines > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-size: 13px; font-weight: 700; color: #334155; }
.mt597-termines > .mt590-liste { padding-bottom: 10px; }
.mt597-detail-etat { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.mt597-copies { display: flex; flex-direction: column; gap: 8px; }
.mt597-copie { border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; border: 1px solid #E2E8F0; }
.mt597-copie-titre { font-size: 14px; font-weight: 800; }
.mt597-copie-ligne { font-size: 13px; color: #1E293B; overflow-wrap: anywhere; }
.mt597-copie-note { font-size: 12px; color: #475569; line-height: 1.5; }
.mt597-copie-orange { border: 2px solid #F59E0B; background: #FFFBEB; }
.mt597-copie-orange .mt597-copie-titre { color: #92400E; }
.mt597-copie-rouge { border: 2px solid #EF4444; background: #FEF2F2; }
.mt597-copie-rouge .mt597-copie-titre { color: #B91C1C; }
.mt597-copie-ok { background: #ECFDF5; border-color: #A7F3D0; }
.mt597-copie-ok .mt597-copie-titre { color: #047857; }
.mt597-copie-gris { background: #F1F5F9; }
.mt597-copie-gris .mt597-copie-titre { color: #475569; }
.mt597-reconstituee { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #E0E7FF; color: #3730A3; }
@media (max-width: 768px) {
  .mt597-ligne { grid-template-columns: minmax(0, 1fr) auto; }
  .mt597-ligne-pastilles { grid-column: 1 / -1; justify-content: flex-start; grid-row: 2; }
  .mt597-btn-detail { grid-column: 2; grid-row: 1; }
}

/* ch.598 — carte « Doublons » au MÊME format que les autres (grille), fenêtre « Vérifier les doublons », détail PAR-DESSUS.
   Charte (R119) : à faire = vert #34D399 / texte #0F172A ; aucun doublon = neutre ; ⛔ aucune variable CSS ; grilles par classe (R120). */
.mt598-compteur { display: flex; flex-wrap: wrap; gap: 6px; }
.mt598-cpt { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.mt598-cpt-afaire { background: #34D399; color: #0F172A; }
.mt598-cpt-ok { background: #F1F5F9; color: #475569; }
.mt598-cpt-gris { background: #F1F5F9; color: #64748B; }
.mt598-boite { width: min(980px, 96vw); }
.mt598-dessus { z-index: 1110; }   /* le « Détail » s'ouvre AU-DESSUS de la fenêtre (1100), sous FileViewer (10010) et les modals partagés (≥ 10000) */
.mt598-liens { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.mt598-a { display: inline-flex; align-items: center; text-decoration: none; }
.mt598-lien-ligne { display: flex; gap: 8px; flex-wrap: wrap; }
.mt598-champ { flex: 1 1 240px; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid #CBD5E1; border-radius: 10px; font-size: 13px; box-sizing: border-box; }
@media (max-width: 480px) {
  .mt598-lien-ligne .mt590-btn, .mt598-liens .mt590-btn { width: 100%; justify-content: center; }
}

/* ch.601 — requalification : actions d'une ligne (boutons ≥ 44 px, retour à la ligne sur mobile). */
.mt601-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
@media (max-width: 768px) { .mt601-actions { grid-column: 1 / -1; justify-content: flex-start; } }
/* ch.602 — réglages du traitement d'image (cibles tactiles ≥ 44 px) */
.mt602-champ { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 44px; font-size: 14px; color: #1e293b; }
.mt602-champ input[type="number"] { min-height: 44px; width: 120px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; box-sizing: border-box; }
.mt602-champ select { min-height: 44px; max-width: 100%; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }
.mt602-champ input[type="checkbox"] { width: 22px; height: 22px; }
/* ch.603 — reprise des justificatifs douteux */
.mt603-grille { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: start; }
@media (max-width: 1024px) { .mt603-grille { grid-template-columns: minmax(0, 1fr); } }
.mt603-cadre { max-height: 60vh; overflow: auto; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; cursor: zoom-in; }
.mt603-cadre img { display: block; width: 100%; height: auto; }
.mt603-cadre.mt603-zoom { cursor: zoom-out; }
.mt603-cadre.mt603-zoom img { width: 220%; max-width: none; }
.mt603-pdf { width: 100%; height: 60vh; border: 1px solid #e2e8f0; border-radius: 10px; }
.mt603-tab-cadre { overflow-x: auto; }
.mt603-tab { width: 100%; border-collapse: collapse; font-size: 13px; }
.mt603-tab th, .mt603-tab td { border-bottom: 1px solid #e2e8f0; padding: 8px 6px; text-align: left; vertical-align: top; }
.mt603-tab thead th { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: .03em; }
.mt603-act { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 768px) {
  .mt603-tab thead { display: none; }
  .mt603-tab tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid #e2e8f0; }
  .mt603-tab th, .mt603-tab td { border: none; padding: 2px 0; }
  .mt603-tab th[scope="row"] { grid-column: 1 / -1; font-weight: 700; }
  .mt603-act { grid-column: 1 / -1; }
}
.mt603-rescan { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; cursor: pointer; }
.mt603-e-rescan { background: #fef3c7; color: #92400e; }
.mt603-e-garde { background: #f1f5f9; color: #334155; }

/* ch.612 — « Ce qui reste pour toi » : les boutons passent TOUJOURS sous le titre. MESURÉ : en grille `1fr auto`, la colonne des boutons (largeur
   « auto » = largeur de TOUS les boutons alignés) écrasait le titre à 0 px (905 px de haut, une lettre par ligne) dès 6 boutons dans 800 px — le cas
   du bureau avec la barre latérale ouverte, où la règle mobile (≤ 768 px de fenêtre) ne s'applique pas. */
.mt597-ligne.mt612-question { grid-template-columns: minmax(0, 1fr); }
.mt597-ligne.mt612-question > .mt601-actions { grid-column: 1 / -1; justify-content: flex-start; }
