/* Fenêtre d'import des factures */

/* Zone de dépôt */
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 32px 20px; border-radius: 16px; cursor: pointer;
  border: 2px dashed var(--gray-300); background: var(--gray-50);
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover, .drop.is-over { border-color: var(--primary-500); background: var(--primary-50); }
.drop-ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 6px;
  background: linear-gradient(-155deg, #5dd26e 8.5%, #36a747 91.5%); color: #fff;
  border: 2px solid #fff; box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(51, 177, 76, 0.25);
}
.drop-ico svg.i { width: 24px; height: 24px; }
.drop strong { font-size: 15px; font-weight: 700; color: var(--gray-900); }
.drop > span { font-size: 13px; color: var(--gray-600); }
.drop u { color: var(--gray-900); font-weight: 600; }

.import-or { display: flex; align-items: center; gap: 12px; color: var(--gray-600); font-size: 12px; }
.import-or::before, .import-or::after { content: ""; flex: 1; height: 1px; background: var(--gray-100); }
.import-sample { justify-content: center; }
.import-note { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--gray-600); }
.import-note svg.i { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--primary-500); }

/* Lecture en cours */
.reading { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.rd { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--gray-50); }
.rd.is-done { background: #fff; box-shadow: inset 0 0 0 1px var(--gray-100); animation: pop 0.35s ease-out; }
.rd-file { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--gray-600); }
.rd-file svg.i { width: 18px; height: 18px; }
.rd-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rd-main strong { font-size: 14px; font-weight: 600; color: var(--gray-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-main > span { font-size: 12px; color: var(--gray-600); }
.rd-bar { display: block; height: 6px; border-radius: 99px; background: #fff; overflow: hidden; margin-top: 3px; }
.rd-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5dd26e, #36a747); transition: width 0.4s ease; }
.rd-result { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.rd-result b { font: 600 14px/1 var(--font-num); color: var(--gray-900); white-space: nowrap; }
.rd-result .ia { font-size: 12px; }
/* Imprévus : doublon, illisible, pas une facture, nouveau fournisseur */
.rd.is-skip { background: var(--gray-50); box-shadow: none; }
.rd.is-skip .rd-main strong, .rd.is-skip .rd-result b { color: var(--gray-600); }
.rd.is-skip .rd-result b { text-decoration: line-through; }
.rd.is-error { background: var(--danger-50); box-shadow: none; }
.rd-file--error { color: var(--danger-600); }
.rd .rd-main > span { white-space: normal; }
.ia--late { color: var(--danger-600); font-weight: 600; }
.ia--muted { color: var(--gray-600); font-weight: 600; }
.ia--new { color: var(--blue-600); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.ia--new svg.i { width: 14px; height: 14px; }
.rd-choice { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; padding-left: 48px; }
.chip-btn {
  height: 30px; padding: 0 12px; border: 0; border-radius: 99px; cursor: pointer;
  background: #fff; box-shadow: inset 0 0 0 1px var(--gray-100);
  font: inherit; font-size: 12px; font-weight: 600; color: var(--gray-700);
}
.chip-btn:hover { background: var(--gray-50); }
.chip-btn.is-on { background: var(--gray-900); color: #fff; box-shadow: none; }

.import-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 4px; font-size: 13px; color: var(--gray-600); }

@media (prefers-reduced-motion: reduce) {
  .modal-back, .modal, .rd.is-done { animation: none; }
  .rd-bar i { transition: none; }
}
@media (max-width: 640px) {
  .modal-back { place-items: end center; padding: 0; }
  .modal { border-radius: 20px 20px 0 0; max-height: 92vh; }
  .import-foot .btn { width: 100%; justify-content: center; }
}
