/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  background: var(--sur);
  border-bottom: 1px solid var(--bd);
  padding: 16px var(--s4);
  position: sticky; top: 0; z-index: 100;
}
.topbar__title { color: var(--acc); font-size: var(--lg); font-weight: 700; }
.topbar__sub   { color: var(--muted); font-size: var(--xs); letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: 1160px; margin: 0 auto;
  padding: var(--s4);
  display: flex; flex-direction: column; gap: var(--s3);
}

/* ── Card ───────────────────────────────────────────────── */
.card {
  background: var(--sur);
  border: 1px solid var(--bd);
  border-radius: var(--r2);
  padding: var(--s3) var(--s4);
}
.card__title {
  font-size: var(--xs); text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--acc); margin-bottom: var(--s2);
  display: flex; align-items: center; gap: var(--s1);
}
.step {
  background: var(--acc-dk); color: var(--acc);
  border-radius: 50%; width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.hint { color: var(--muted); font-size: var(--xs); margin-top: 8px; line-height: 1.7; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  border: none; border-radius: var(--r1);
  padding: 9px 18px; font-size: var(--sm);
  font-weight: 600; letter-spacing: .4px;
  transition: opacity var(--tr);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:disabled { opacity: .35; cursor: not-allowed; }

.btn--primary { background: var(--acc); color: #0b0c10; }
.btn--primary:not(:disabled):hover { opacity: .85; }

.btn--ghost {
  background: transparent; color: var(--acc);
  border: 1px solid var(--acc-dk);
}
.btn--ghost:not(:disabled):hover { background: var(--acc-dk); }

.btn--sm  { padding: 4px 10px; font-size: var(--xs); }
.btn--full { width: 100%; justify-content: center; margin-top: var(--s1); }

/* ── Bandeau chronologie ──────────────────────────────────── */
.chrono {
  border-radius: var(--r2);
  padding: 12px var(--s3);
  font-size: var(--sm);
  line-height: 1.7;
  display: none;
}
.chrono--ok   { background: rgba(79,202,122,.12); border: 1px solid var(--green); color: var(--green); }
.chrono--warn { background: rgba(224,180,79,.10);  border: 1px solid var(--amber); color: var(--amber); }
.chrono--err  { background: rgba(224,92,106,.12);  border: 1px solid var(--red);   color: var(--red); }
.chrono__title {
  font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  font-size: var(--xs); margin-bottom: 4px;
}
.chrono ul { margin: 4px 0 0; padding-left: 16px; }

/* ── Dropzones ──────────────────────────────────────────── */
.dropzones-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3);
}
@media (max-width: 680px) { .dropzones-grid { grid-template-columns: 1fr; } }

.dz-label {
  font-size: var(--xs); text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); margin-bottom: var(--s2);
  display: flex; align-items: center; gap: var(--s1);
}
.ftag {
  background: var(--acc-dk); color: var(--acc);
  border-radius: var(--r1); padding: 1px 7px;
  font-size: 10px; font-weight: 700;
}

.dropzone {
  border: 1.5px dashed var(--bd2); border-radius: var(--r2);
  padding: 20px; text-align: center; cursor: pointer;
  color: var(--muted); font-size: var(--xs);
  transition: border-color var(--tr), background var(--tr);
  user-select: none;
}
.dropzone:hover, .dropzone.over {
  border-color: var(--acc); background: var(--acc-dk); color: var(--acc);
}

.import-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: var(--s1); }

/* ── Barre de chargement ────────────────────────────────── */
.load-bar {
  height: 3px; background: var(--acc-dk); border-radius: 2px;
  margin-top: 4px; overflow: hidden; display: none;
}
.load-bar.on { display: block; }
.load-bar::after {
  content: ''; display: block; height: 100%; width: 30%;
  background: var(--acc); border-radius: 2px;
  animation: slide 1s linear infinite;
}
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(400%); } }

/* ── File list ──────────────────────────────────────────── */
.file-list { display: flex; flex-direction: column; gap: 5px; margin-top: var(--s2); }
.fi {
  background: var(--sur2); border: 1px solid var(--bd);
  border-radius: var(--r1); padding: 6px 10px;
  display: flex; align-items: center; gap: var(--s1);
  font-size: var(--xs); animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
.fi__type {
  background: var(--acc-dk); color: var(--acc);
  border-radius: 3px; padding: 1px 6px;
  font-size: 10px; font-weight: 700; white-space: nowrap;
}
.fi__name {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  cursor: pointer;
}
.fi__name:hover { color: var(--acc); text-decoration: underline; }
.fi__rows { color: var(--muted); white-space: nowrap; }
.fi__view { color: var(--acc); cursor: pointer; padding: 0 3px; opacity: .75; font-size: var(--sm); }
.fi__view:hover { opacity: 1; }
.fi__del  { color: var(--red); cursor: pointer; margin-left: auto; padding: 0 2px; opacity: .7; }
.fi__del:hover { opacity: 1; }

/* ── Notice navigateur ──────────────────────────────────── */
.notice {
  background: var(--sur2); border: 1px solid var(--amber);
  border-radius: var(--r1); padding: 10px 14px;
  font-size: var(--xs); color: var(--amber); margin-top: var(--s2);
  display: none;
}

/* ── Config panel ───────────────────────────────────────── */
.config-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: var(--s2); }
.cc { background: var(--sur2); border: 1px solid var(--bd); border-radius: var(--r2); padding: var(--s2); }
.cc__title { font-size: var(--xs); color: var(--acc); font-weight: 700; margin-bottom: var(--s2); }
.cc__badge {
  font-size: 9px; background: var(--acc-dk); color: var(--acc);
  border-radius: 2px; padding: 1px 4px; margin-left: 4px; vertical-align: middle;
}
.cc label { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; margin: 7px 0 3px; }
.cc select { width: 100%; }

/* ── Progress ───────────────────────────────────────────── */
.prog-bar  { height: 5px; background: var(--sur2); border-radius: 3px; overflow: hidden; margin-top: 12px; }
.prog-fill { height: 100%; background: var(--acc); border-radius: 3px; transition: width .25s; width: 0; }
.prog-lbl  { font-size: var(--xs); color: var(--muted); margin-top: 5px; }

/* ── Results ────────────────────────────────────────────── */
.results-hd {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3);
}
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: var(--s2); }
.rc { background: var(--sur2); border: 1px solid var(--bd); border-radius: var(--r2); padding: var(--s2) var(--s3); }
.rc__title { font-size: var(--xs); font-weight: 700; color: var(--acc); margin-bottom: var(--s2); }
.rrow { display: flex; align-items: center; gap: var(--s1); padding: 6px 0; border-bottom: 1px solid var(--bd); font-size: var(--xs); }
.rrow:last-child { border-bottom: none; }
.rrow__lbl { flex: 1; color: var(--muted); }
.rrow__cnt { font-weight: 700; min-width: 44px; text-align: right; }
.c-cre  { color: var(--red); }
.c-sol  { color: var(--green); }
.c-ver  { color: var(--amber); }
.c-cla  { color: var(--blue, #5c9ae0); }
.c-zero { color: var(--muted); }

/* ── Footer ─────────────────────────────────────────────── */
.footer { text-align: center; color: var(--muted); font-size: var(--xs); padding: var(--s3); border-top: 1px solid var(--bd); }

/* ── Section date export ────────────────────────────────── */
.date-lbl {
  display: block;
  font-size: var(--xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 4px;
}
.date-input {
  font-size: var(--sm);
  padding: 7px 10px;
  border-radius: var(--r1);
  border: 1px solid var(--bd2);
  background: var(--sur2);
  color: var(--tx);
  cursor: pointer;
}
.date-input:focus { border-color: var(--acc); outline: none; }
.date-preview {
  font-size: var(--sm);
  color: var(--acc);
  background: var(--acc-dk);
  border-radius: var(--r1);
  padding: 7px 14px;
  font-weight: 600;
  letter-spacing: .5px;
}

/* ── Fenêtre Configuration (modal) ───────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  padding: var(--s3);
}
.modal {
  background: var(--sur);
  border: 1px solid var(--bd2);
  border-radius: var(--r2);
  max-width: 720px; width: 100%;
  max-height: 85vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: fadeIn .18s ease;
}
.modal__hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--bd);
}
.modal__title { color: var(--acc); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: var(--xs); }
.modal__close {
  background: transparent; border: none; cursor: pointer;
  color: var(--muted); font-size: var(--md); line-height: 1;
}
.modal__close:hover { color: var(--red); }
.modal__bd { padding: var(--s3); overflow-y: auto; }
.modal__sec-title {
  font-size: var(--xs); text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--acc); margin-bottom: var(--s2); font-weight: 700;
}
.modal__divider { border: none; border-top: 1px solid var(--bd); margin: var(--s3) 0; }
