/* Ortenor — espace client. Lisible en plein soleil, utilisable d'une main, gants compris. */
:root {
  --paper: #ffffff; --ink: #111318; --muted: #5f6672; --line: #d9dee4; --field: #f3f5f7;
  --action: #ffc72c; --action-ink: #111318; --alert: #c6362b; --ok: #1f8a4c; --info: #1c5fa8;
  --radius: 10px; --tap: 56px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-size: 17px; line-height: 1.4; }
body { padding-bottom: calc(var(--tap) + env(safe-area-inset-bottom) + 12px); }
body.plain { padding-bottom: 24px; }
h1 { font-size: 26px; line-height: 1.15; margin: 0 0 12px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 19px; margin: 24px 0 8px; font-weight: 700; }
p { margin: 8px 0; }
a { color: var(--info); }
.muted { color: var(--muted); font-size: 15px; }
.big { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 4px 0 10px; }
.quote { border-left: 4px solid var(--line); padding: 6px 12px; margin: 8px 0 14px; color: var(--ink); }
.sheet, .screen { max-width: 640px; margin: 0 auto; padding: 20px 16px; }
header.top { position: sticky; top: 0; background: var(--paper); border-bottom: 1px solid var(--line); z-index: 5; }
header.top .screen { padding: 12px 16px; }
header.top h1 { margin: 0; font-size: 22px; }
.wordmark { font-weight: 800; letter-spacing: 0.02em; font-size: 20px; }
.wordmark b { background: var(--action); padding: 0 6px; border-radius: 4px; }

/* Boutons : hauteur 56 px, plein largeur par défaut */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 10px 16px;
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); color: var(--ink);
  font: inherit; font-weight: 600; font-size: 17px; text-decoration: none; cursor: pointer; width: 100%; }
.btn.primary { background: var(--action); border-color: var(--action); color: var(--action-ink); }
.btn.small { min-height: 44px; width: auto; font-size: 15px; padding: 6px 12px; }
.btn.quiet { border-color: var(--line); font-weight: 500; }
.btn.danger { border-color: var(--alert); color: var(--alert); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
.row-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
form.eta { display: flex; flex-wrap: wrap; gap: 8px; }
form.eta .btn { width: auto; flex: 1 1 30%; }
form.eta p { flex-basis: 100%; margin: 4px 0; }
.done { flex-basis: 100%; color: var(--ok); font-weight: 600; }

/* Listes */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-bottom: 1px solid var(--line); padding: 14px 0; }
.list > li.row { display: grid; grid-template-columns: 56px 1fr; gap: 8px 12px; }
.list > li.row .eta, .list > li.row .done { grid-column: 1 / -1; }
.when { font-weight: 700; font-variant-numeric: tabular-nums; }
.phone { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.flag { display: inline-block; margin: 6px 0; padding: 4px 8px; border-radius: 6px; background: #fbe9e6; color: var(--alert); font-weight: 600; font-size: 15px; }
.status { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.status button { min-height: 40px; padding: 4px 12px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper);
  color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.status button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.status button[data-s="signe"][aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.status button[data-s="perdu"][aria-pressed="true"] { background: var(--muted); border-color: var(--muted); }
.chips { display: flex; gap: 8px; margin: 12px 0; }
.chips button { min-height: 40px; padding: 4px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); font: inherit; font-size: 15px; }
.chips button[aria-pressed="true"] { border-color: var(--ink); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 4px; }
.stats div { background: var(--field); border-radius: var(--radius); padding: 10px 12px; }
.stats strong { display: block; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: 14px; }
.empty { padding: 32px 0; color: var(--muted); }

/* Formulaires */
label { display: block; font-weight: 600; margin: 16px 0 6px; }
input, select, textarea { width: 100%; min-height: 52px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--field); font: inherit; font-size: 17px; color: var(--ink); }
textarea { min-height: 80px; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch input { width: 28px; min-height: 28px; height: 28px; accent-color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tap) + env(safe-area-inset-bottom) + 20px); transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-weight: 600; max-width: 90vw; z-index: 20; }
.toast.error { background: var(--alert); }

/* Barre d'onglets */
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--paper); border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
nav.tabs a { flex: 1; min-height: var(--tap); display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; }
nav.tabs a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 4px 0 var(--action); }
.hidden { display: none !important; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th, table.grid td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
@media (prefers-reduced-motion: no-preference) { .btn:active { transform: scale(0.98); } }
