:root {
  --bg: #f6f7f5; --surface: #ffffff; --text: #1c2321; --muted: #5d6a66; --line: #dfe4e1;
  --accent: #0f766e; --accent-strong: #0b5c56; --accent-soft: #e3f2ef;
  --ok: #15803d; --warn: #b45309; --warn-soft: #fef3c7; --err: #b91c1c; --err-soft: #fee2e2; --info-soft: #e0ecff;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.7rem; margin: .2em 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 1.2em 0 .6em; }
code { background: #eef1ef; padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 700; font-size: 1.25rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-dot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--accent); display: inline-block; }
nav { display: flex; align-items: center; gap: 18px; }
nav a { text-decoration: none; color: var(--text); }
.inline { display: inline; margin: 0; }
.lang-switch { display: inline-flex; gap: 6px; font-size: .85rem; }
.lang-switch .lang-current { color: var(--text); font-weight: 700; text-decoration: underline; }
.linklike { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.btn { display: inline-block; background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 8px; padding: 10px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-strong); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-small { padding: 6px 12px; font-size: .9rem; }
nav .btn { color: #fff; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.narrow { max-width: 520px; margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field-check label { font-weight: 400; display: flex; gap: 8px; align-items: center; }
.field-multi label { font-weight: 400; display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.field-multi > label { font-weight: 600; }
.field input:not([type=checkbox]), .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.field textarea { font-family: ui-monospace, Menlo, monospace; font-size: .92rem; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.help { display: block; color: var(--muted); margin-top: 4px; }
.help ul { margin: 4px 0 0; padding-left: 18px; }
.error { color: var(--err); font-size: .92rem; margin-top: 4px; }
.has-error input, .has-error textarea { border-color: var(--err); }
.messages { margin-bottom: 18px; }
.msg { padding: 12px 14px; border-radius: 8px; margin-bottom: 10px; background: var(--info-soft); }
.msg-success { background: var(--accent-soft); }
.msg-error { background: var(--err-soft); color: #7f1d1d; }
.msg-warning { background: var(--warn-soft); color: #78350f; }
.hero { padding: 30px 0 10px; }
.hero h1 { font-size: 2.3rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 18px 0; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 14px 52px; position: relative; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: #eef1ef; color: var(--muted); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.steps li.done::before { content: "✓"; background: var(--accent); color: #fff; }
.steps li.todo { border-color: var(--accent); }
.steps strong, .steps span { display: block; }
.steps span { color: var(--muted); font-size: .92rem; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: .85rem; color: var(--muted); font-weight: 600; background: #fafbfa; }
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pm { display: flex; gap: 12px; align-items: center; background: var(--accent-soft); padding: 14px; border-radius: 8px; margin-bottom: 16px; }
.pm-check { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.testcards { margin-top: 18px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 8px; font-size: .92rem; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 8px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi-label { display: block; color: var(--muted); font-size: .85rem; }
.kpi-value { display: block; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-top: 16px; align-items: start; }
.map { height: 520px; border-radius: var(--radius); border: 1px solid var(--line); background: #e8ecea; }
.pin { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: .8rem; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.pin-depot { background: #1c2321; border-radius: 6px; }
.pin-muted { background: #6b7280; }
.route-head { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.route-head h2 { margin: 0; font-size: 1.1rem; }
.route-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.route-block { margin-bottom: 20px; }
.route-block .table { margin-top: 6px; }
.kpi-delta { display: block; color: var(--muted); font-size: .85rem; }
.report-summary { padding: 16px 20px; margin-bottom: 16px; }
.report-summary ul { margin: 0; padding-left: 20px; }
.report-summary li { margin: 3px 0; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .85rem; }
.tag { background: #eef1ef; color: var(--muted); }
.tag-window { background: var(--info-soft); color: #1e3a8a; }
.tag-skill { background: var(--accent-soft); color: var(--accent-strong); }
.stop-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reason { margin-top: 4px; font-size: .9rem; color: #78350f; }
.row-pause td { background: #fafbfa; color: var(--muted); }
.tag-ok { background: var(--accent-soft); color: var(--accent-strong); }
.tag-err { background: var(--err-soft); color: #7f1d1d; }
.import-table input[type=text] { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.import-table .row-error td { background: #fffafa; }
.include { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: .9rem; }
.tag-urgent { background: var(--err); color: #fff; font-weight: 600; }
.tag-frozen { background: #e5e7eb; color: #374151; }
.tag-done { background: var(--accent); color: #fff; }
.tag-progress { background: #fef3c7; color: #78350f; font-weight: 600; }
.tracking-table select, .tracking-table input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; }
.tracking-actions { margin-top: 18px; }
.tag-lez { background: #ede9fe; color: #5b21b6; }
.team-changes ul { margin: 6px 0 10px; padding-left: 20px; }
.team-changes small { display: block; margin-top: 6px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 14px; }
.tag-warn { background: var(--warn-soft); color: #78350f; }
.history { margin: 0; padding-left: 18px; font-size: .92rem; }
.route-empty { padding: 10px 12px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.footer { color: var(--muted); font-size: .85rem; padding: 40px 16px 30px; }
.job-card { max-width: 640px; }
.job-phases { margin: 0 0 16px; padding-left: 22px; }
.job-phases li { color: var(--muted); margin: 4px 0; }
.job-phases li.current { color: var(--text); font-weight: 600; }
.job-phases li.done { color: var(--ok); }
.job-phases li.done::after { content: " ✓"; }
.progress { height: 10px; background: var(--accent-soft); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.progress-bar { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .6s ease; }
@media (prefers-reduced-motion: reduce) { .progress-bar { transition: none; } }
.tag-tech { background: var(--info-soft); color: #1e3a8a; }
.tech-updates { padding: 14px 18px; margin-bottom: 12px; }
.tech-updates ul { margin: 8px 0 0; padding-left: 20px; font-size: .92rem; }
.route-link { margin-left: auto; }
.link-row { display: flex; gap: 8px; margin: 6px 0; }
.link-row input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .9rem; }
.qr svg { display: block; margin: 14px 0 4px; max-width: 220px; height: auto; }
/* Page mobile du technicien */
body.mobile { font-size: 17px; }
.m-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.m-head .lang-switch a { margin-left: 8px; text-decoration: none; color: var(--muted); }
.m-head .lang-switch a.lang-current { color: var(--text); font-weight: 700; text-decoration: underline; }
.m-main { max-width: 640px; margin: 0 auto; padding: 14px 16px 24px; }
.m-summary { color: var(--muted); margin: 4px 0 14px; }
.m-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.m-card h2 { font-size: 1.1rem; margin: 6px 0 2px; }
.m-card-head { display: flex; align-items: center; gap: 10px; }
.m-time { font-weight: 700; font-size: 1.1rem; }
.m-address { margin: 2px 0 6px; }
.m-pause { color: var(--muted); background: transparent; border-style: dashed; }
.m-done { opacity: .75; }
.m-in_progress { border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn-soft); }
.m-skipped { border-color: var(--err); }
.m-nav { font-size: .95rem; margin: 8px 0; }
.m-status { margin: 6px 0; }
.m-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.m-actions form { flex: 1; }
.m-btn { width: 100%; padding: 14px; font-size: 1.05rem; }
.m-skip { margin-top: 10px; }
.m-skip summary { cursor: pointer; color: var(--err); font-weight: 600; padding: 6px 0; }
.m-radio { display: block; padding: 8px 0; }
.m-note { display: block; margin: 8px 0 4px; }
.m-note input { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; margin-top: 4px; }
.m-undo { margin-top: 8px; }
.m-foot { max-width: 640px; margin: 0 auto; padding: 0 16px 30px; }
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .map { height: 360px; }
  nav { gap: 10px; font-size: .92rem; }
  .card { padding: 20px; }
}
