:root {
  --ink: #16202e;
  --ink-soft: #55606f;
  --line: #dfe3ea;
  --paper: #f6f5f1;
  --card: #ffffff;
  --accent: #1f4b7a;
  --accent-dark: #173a5f;
  --accent-tint: #e8eff7;
  --ok: #1d6b4a;
  --ok-tint: #e3f2ea;
  --warn: #8a5a0b;
  --warn-tint: #fbf1dc;
  --bad: #a3322b;
  --bad-tint: #fbe9e7;
  --radius: 10px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 var(--font);
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3, p, ol { margin: 0; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--ink-soft); font-size: 14px; }
[hidden] { display: none !important; }

/* ---------- marque ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 18px; letter-spacing: .01em; }
.mark { width: 30px; height: 30px; }
.mark rect { fill: var(--accent); }
.mark path { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; fill: none; }

/* ---------- en-tête ---------- */
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.who { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-soft); }

/* ---------- intro ---------- */
.intro { padding: 44px 0 26px; }
.intro h1 { font-size: 30px; line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
.steps { list-style: none; padding: 0; margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-soft); font-size: 14.5px; }
.steps b {
  display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 7px;
  border-radius: 50%; background: var(--accent-tint); color: var(--accent); font-size: 12.5px; font-weight: 700;
}

/* ---------- zone de dépôt ---------- */
.drop {
  background: var(--card); border: 1.5px dashed #b9c2cf; border-radius: var(--radius);
  padding: 34px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop:focus-visible, .drop.over { border-color: var(--accent); background: var(--accent-tint); outline: none; }
.drop svg { width: 30px; height: 30px; stroke: var(--accent); stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { margin-top: 8px; font-weight: 600; }
.drop-hint { margin-top: 2px; font-size: 14px; color: var(--ink-soft); }
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- messages ---------- */
.alert {
  margin-top: 14px; padding: 11px 14px; border-radius: 8px; font-size: 14.5px;
  background: var(--bad-tint); color: var(--bad); border: 1px solid #f1c9c4;
}

/* ---------- liste ---------- */
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 38px 0 12px; }
.list-head h2 { font-size: 18px; font-weight: 650; }
.jobs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.job { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.job-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.job-title { min-width: 0; }
.job-title h3 { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.job-body { margin-top: 12px; }
.note { font-size: 14.5px; color: var(--ink-soft); }
.note.bad { color: var(--bad); }
.empty { padding: 26px; text-align: center; color: var(--ink-soft); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }

.chip { flex: none; padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.info { background: var(--accent-tint); color: var(--accent); }
.chip.ready { background: var(--warn-tint); color: var(--warn); }
.chip.ok { background: var(--ok-tint); color: var(--ok); }
.chip.bad { background: var(--bad-tint); color: var(--bad); }

.bar { height: 8px; background: #e9ecf1; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
.progress .note { margin-top: 7px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.actions.secondary { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.launch, .confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; }

/* ---------- boutons et champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 15px/1 var(--font); padding: 11px 16px; border-radius: 8px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.btn.small { font-size: 14px; padding: 8px 12px; }
.btn.wide { width: 100%; margin-top: 20px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: #b9c2cf; background: #fafbfc; }
.btn.warn { background: var(--card); color: var(--warn); border-color: #e6cf9c; }
.btn.warn:hover { background: var(--warn-tint); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger:hover { background: #8a2923; }
.btn:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

select, input[type=text], input[type=password] {
  font: 15px/1.2 var(--font); color: var(--ink); background: var(--card);
  border: 1px solid #c3cad5; border-radius: 8px; padding: 10px 12px;
}
select { padding: 7px 10px; font-size: 14px; max-width: 100%; }

/* ---------- pied ---------- */
.foot { margin: 40px 0 48px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-soft); display: grid; gap: 6px; }

/* ---------- connexion ---------- */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login { width: 100%; max-width: 400px; }
.login h1 { margin-top: 26px; font-size: 26px; line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
.lede { margin-top: 6px; color: var(--ink-soft); }
.card { margin-top: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
.card label:first-of-type { margin-top: 0; }
.card input { width: 100%; }
.card .alert { margin: 0 0 16px; }
.fine { margin-top: 18px; font-size: 13.5px; color: var(--ink-soft); }

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .intro { padding-top: 30px; }
  .intro h1 { font-size: 25px; }
  .job-head { flex-direction: column-reverse; gap: 8px; }
  .list-head { flex-direction: column; gap: 2px; }
  .who span { display: none; }
}
