/* VISION V5 — feuille unique, embarquée (plus de Tailwind ni de CDN). Clair par défaut, sombre au choix ou selon
   le système ; les couleurs de la vue client sont celles de la V4. */
:root {
  --bg: #f6f7f8; --surface: #ffffff; --fg: #17202a; --muted: #5d6874; --line: #e3e7eb; --soft: #eef1f4;
  --accent: #157a5a; --accent-fg: #ffffff;
  --travail: #1f9d74; --attente: #e0a526; --vide: #dfe4e9; --pose: #3b6fd8; --depose: #c2413a; --calib: #8a5cd0;
  --up: #1b7f5c; --down: #b23a32;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1317; --surface: #14181d; --fg: #e8edf1; --muted: #98a3ae; --line: #252c33; --soft: #1b2127;
  --accent: #4fd1a5; --accent-fg: #0f1317;
  --travail: #27a07a; --attente: #bb8616; --vide: #2a3138; --pose: #5f8de6; --depose: #d75a52; --calib: #9a76e0;
  --up: #4fd1a5; --down: #f08a82; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0f1317; --surface: #14181d; --fg: #e8edf1; --muted: #98a3ae; --line: #252c33; --soft: #1b2127;
  --accent: #4fd1a5; --accent-fg: #0f1317;
  --travail: #27a07a; --attente: #bb8616; --vide: #2a3138; --pose: #5f8de6; --depose: #d75a52; --calib: #9a76e0;
  --up: #4fd1a5; --down: #f08a82; color-scheme: dark }

* { box-sizing: border-box; }
[hidden] { display: none !important; }      /* un display posé par une classe ne doit jamais l'emporter sur hidden */
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 var(--body); }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(1.4rem, 3.2vw, 2rem); font-weight: 800; }
.sous { color: var(--muted); margin: 6px 0 0; max-width: 72ch; }
.num { font-variant-numeric: tabular-nums; }

/* barre du haut : curseur client / dev à gauche, menu, compte à droite */
.barre { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.barre-dedans { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); }
.curseur { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; padding: 2px; text-decoration: none;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.curseur span { padding: 1px 8px; border-radius: 99px; color: var(--muted); }
.curseur span.on { background: var(--accent); color: var(--accent-fg); }
.curseur:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* quatre applis, un seul code (11/11) : le sélecteur d'applis du bandeau, pour un admin */
.applis { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: 99px; padding: 2px; font-size: .72rem; }
.applis a { padding: 1px 8px; border-radius: 99px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.applis a.on { background: var(--accent); color: var(--accent-fg); }
.applis a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 720px) { .applis { order: 9; } }
.marque { font-family: var(--display); font-weight: 800; letter-spacing: .06em; text-decoration: none; }
.marque span { color: var(--accent); }
.barre nav { display: flex; gap: 4px 14px; flex-wrap: wrap; font-weight: 600; font-size: .92rem; }
.barre nav a { text-decoration: none; color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; }
.barre nav a.actif { color: var(--fg); border-bottom-color: var(--accent); }
.droite { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: .85rem; color: var(--muted); }
.droite a { color: var(--muted); }
.droite button { background: none; border: 0; color: var(--muted); font-size: 1rem; cursor: pointer; }

.page { max-width: 1200px; margin: 0 auto; display: grid; gap: 22px;
  padding: 24px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)); }
.pied { text-align: center; font-size: .75rem; color: var(--muted); padding: 0 16px 24px; }

/* connexion */
body.seul { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.connexion { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; width: min(360px, 100%);
  display: grid; gap: 8px; }
.connexion .marque { font-size: 1.3rem; margin-bottom: 8px; }
.connexion label { font-size: .85rem; color: var(--muted); }
.connexion input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
.connexion button { margin-top: 8px; font: inherit; font-weight: 700; padding: 9px; border: 0; border-radius: 8px;
  background: var(--accent); color: var(--accent-fg); cursor: pointer; }
.erreur { color: var(--down); margin: 4px 0 0; font-size: .9rem; }

:root { --panel: var(--surface); --panel-2: var(--soft); --ink: var(--fg); }   /* noms de la V3 / V4 */

/* petites classes reprises de la V3 (blocs portés tels quels : carte d'activité, commentaire, jugement) */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.p-3 { padding: 12px; } .p-4 { padding: 16px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; } .gap-2 { gap: 8px; }
.ml-auto { margin-left: auto; }
.kicker { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.font-normal { font-weight: 400; } .normal-case { text-transform: none; letter-spacing: 0; }
.text-sm { font-size: .875rem; } .mono { font-family: var(--mono); }
.btn { font: inherit; font-weight: 600; font-size: .9rem; min-height: 2.3rem; padding: 0 .8rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; }
.btn-sm { min-height: 2rem; font-size: .85rem; }
.btn-go { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.input { font: inherit; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.text-xs { font-size: .75rem; } .text-lg { font-size: 1.1rem; } .text-2xl { font-size: 1.5rem; }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; }
.block { display: block; } .w-full { width: 100%; } .overflow-x-auto { overflow-x: auto; } .min-w-0 { min-width: 0; }
.flex-1 { flex: 1; } .shrink-0 { flex-shrink: 0; } .cursor-pointer { cursor: pointer; }
.items-baseline { align-items: baseline; } .items-end { align-items: flex-end; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.pr-3 { padding-right: 12px; } .pr-4 { padding-right: 16px; } .py-1 { padding-top: 4px; padding-bottom: 4px; }
.p-5 { padding: 20px; } .mb-1 { margin-bottom: 4px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 20px; }
.mt-3 { margin-top: 12px; } .mr-4 { margin-right: 16px; }
.jalons { position: relative; height: 14px; font-size: 11px; } .jalons span { position: absolute; transform: translateX(-50%); }
.heures span { position: absolute; transform: translateX(-50%); }
.c-flotte { color: var(--up); } .c-client { color: var(--down); } .btn-xs { min-height: 1.7rem; font-size: .8rem; padding: 0 .6rem; }
.range { width: 100%; accent-color: var(--accent); } .select { font: inherit; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); }
.grid { display: grid; } .gap-4 { gap: 16px; } .rounded { border-radius: 6px; } .hairline { border-top: 1px solid var(--line); }
.badge { font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.badge-sm { font-size: .72rem; } .whitespace-pre-wrap { white-space: pre-wrap; } .mt-3 { margin-top: 12px; }
@media (min-width: 768px) { .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .md\:col-span-2 { grid-column: span 2 / span 2; } }
