/* =============================================================================
   Reprise des données (lot G) : sortes, étapes de l'assistant, avancement,
   correspondance des colonnes, compte rendu. Compléments d'app.css.
   ============================================================================= */

.reprise-pile { display: flex; flex-direction: column; gap: 10px; }
.reprise-pile p { margin: 0; }

/* Sortes dans l'ordre de la reprise */
.reprise-sortes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.reprise-sorte { display: flex; flex-direction: column; }
.reprise-sorte .actions { margin-top: auto; }
.reprise-sorte .btn-sm { margin-top: 0; }
.reprise-sorte-tete { display: flex; align-items: center; gap: 10px; }
.reprise-titre { margin: 0; font-size: 16px; font-weight: 600; }
.reprise-titre a { color: var(--ink); text-decoration: none; }
.reprise-titre a:hover { color: var(--primary); text-decoration: underline; }
.reprise-numero { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 999px;
  background: var(--gray-bg); color: var(--ink-2); font: 600 13px var(--mono); }

/* Étapes de l'assistant */
.reprise-etapes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13.5px; color: var(--muted); }
.reprise-etapes li { display: inline-flex; align-items: center; gap: 8px; }
.reprise-etapes li.on { color: var(--ink); font-weight: 600; }
.reprise-etapes li.on .reprise-numero { background: var(--primary); color: #FFFFFF; }
.reprise-etapes li.fait .reprise-numero { background: var(--green-bg); color: var(--green-ink); }

/* Avancement */
.reprise-barre { width: 100%; height: 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); overflow: hidden; appearance: none; -webkit-appearance: none; }
.reprise-barre::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
.reprise-barre::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
.reprise-barre::-moz-progress-bar { background: var(--primary); border-radius: 999px; }

/* Correspondance et options (bloc repliable) */
.reprise-config > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.reprise-config > summary::-webkit-details-marker { display: none; }
.reprise-config > summary::before { content: '▸'; color: var(--muted); }
.reprise-config[open] > summary::before { content: '▾'; }
.reprise-config:not([open]) > summary { border-bottom: 0; }
.reprise-groupe { margin: 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line-2); min-width: 0; }
.reprise-groupe legend { padding: 0 8px 0 0; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.reprise-groupe .grid-form { margin-top: 10px; }
.reprise-groupe .fld p { margin: 0; }
.reprise-groupe .fld label .mono { font-weight: 400; }

/* Aperçu du fichier, compte rendu */
.reprise-apercu { margin-top: 12px; border: 1px solid var(--line-2); border-radius: var(--radius); }
.reprise-apercu .tbl td, .reprise-apercu .tbl th { padding: 6px 10px; font-size: 12.5px; }
.reprise-compteurs .tile { cursor: default; }
.reprise-compteurs .tile:hover { border-color: var(--line); }
.reprise-texte { white-space: normal; min-width: 240px; }
.reprise-fichier { white-space: normal; word-break: break-all; min-width: 140px; }

@media (max-width: 599px) {
  .reprise-etapes { flex-direction: column; gap: 6px; }
  .reprise-texte { min-width: 200px; }
  .reprise-sorte .actions .btn { flex: 1 1 auto; justify-content: center; }
}
