/* ── Variables ── */
:root {
  --drop-border: #94a3b8;
  --drop-bg: #f8fafc;
  --drop-hover-border: var(--pico-primary);
  --drop-hover-bg: var(--pico-primary-background);
  --drop-ok-border: #22c55e;
  --drop-ok-bg: #f0fdf4;
  --radius: 0.75rem;
  --transition: 180ms ease;
}

/* ── Layout ── */
body {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
  padding-bottom: 1.5rem;
}

header h1 {
  margin-bottom: 0.25rem;
  font-size: 1.5rem;
}

header p {
  margin: 0;
  color: var(--pico-muted-color);
  font-size: 0.9rem;
}

/* ── Drop zones ── */
.drop-zone {
  border: 2px dashed var(--drop-border);
  border-radius: var(--radius);
  background: var(--drop-bg);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--drop-hover-border);
  background: var(--drop-hover-bg);
}

.drop-zone.ready {
  border-color: var(--drop-ok-border);
  background: var(--drop-ok-bg);
  border-style: solid;
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.drop-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.drop-label {
  font-weight: 500;
  display: block;
  margin-bottom: 0.25rem;
}

.drop-hint {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

.file-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #15803d;
  margin-top: 0.5rem;
  display: block;
  word-break: break-all;
}

.drop-zones-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 540px) {
  .drop-zones-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Bouton ── */
#btn-run {
  width: 100%;
  margin-top: 1.5rem;
}

/* ── Progression ── */
.progress-section {
  margin-top: 1.5rem;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--pico-muted-color);
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
}

progress {
  margin-bottom: 0;
}

/* ── Log ── */
.log {
  margin-top: 1rem;
  background: var(--pico-code-background, #f4f4f5);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-family: var(--pico-font-family-monospace, monospace);
  max-height: 180px;
  overflow-y: auto;
  color: var(--pico-muted-color);
}

.log p {
  margin: 0.15rem 0;
}

.log .log-ok   { color: #16a34a; }
.log .log-warn { color: #d97706; }
.log .log-err  { color: #dc2626; }

/* ── Alertes ── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-top: 1rem;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #14532d;
}
