/* Système de design LFC Logistique (V50) — couche unique, chargée en dernier.
   Elle ne touche ni au HTML, ni au JavaScript, ni aux données : elle règle les jetons (couleurs, typographie,
   espacements, rayons, ombres, animations) puis corrige les composants partagés. Aucune règle métier n'est modifiée.

   Pourquoi une couche à part : les 8 feuilles existantes (1110 règles) ont grandi version après version. Les reprendre
   d'un bloc ferait courir un risque de régression sur 15 écrans. Cette couche règle les jetons une seule fois, et tout
   ce qui les utilise suit. */

:root {
  /* ---- Marque : les couleurs relevées sur le nouveau logo LFC ----
     #17334f le marine du sigle et des façades sombres · #0b203d les ombres ·
     #366a95 le bleu acier du cercle et des vitrages · #d3dbdf et #e7ebed les gris de façade.
     Le logo n'a plus d'or : l'accent devient le bleu acier, éclairci pour rester lisible sur le marine
     (le bleu acier brut ne donne que 2,25:1 sur le marine — trop faible pour marquer l'onglet actif). */
  --navy: #17334f;                  /* marine du logo */
  --navy-deep: #0b203d;             /* ombres du logo */
  --navy-2: var(--p-acier-fonce);                /* survol : entre le marine et le bleu acier */
  --steel: #366a95;                 /* bleu acier du logo */
  --accent: var(--p-acier-clair);                /* accent sur fond marine — 6,7:1 */
  --accent-deep: var(--p-acier-fonce);           /* accent sur fond clair — 7,2:1 sur blanc */
  --accent-soft: var(--p-bleu-pale);
  /* Les 627 règles de theme.css nomment encore cet accent « gold » : on garde les noms,
     la valeur suit le nouveau logo. Rien à réécrire ailleurs. */
  --gold: var(--accent);
  --gold-deep: var(--accent-deep);
  --gold-soft: var(--accent-soft);

  /* ---- Neutres : les gris de façade du logo ---- */
  --ink: #14202b;                   /* texte principal — 16,5:1 sur blanc */
  --ink-2: #2f4458;                 /* titres secondaires */
  --muted: #56687a;                 /* texte d'appoint — 5,2:1 sur fond clair (était 4,3 : sous le seuil) */
  --line: var(--p-d3dbdf);                  /* gris de façade du logo */
  --line-strong: #b9c6cf;
  --surface: var(--p-blanc);
  --soft: #f2f5f7;
  --page: #e9eef2;

  /* ---- Couleurs d'état : chaque paire texte/fond atteint le niveau AA (4,5:1) ---- */
  --green: #0a6b4a;  --green-soft: #e3f5ec;   /* 5,8:1 */
  --amber: var(--p-7a4f00);  --amber-soft: var(--p-ambre-pale-2);   /* 6,4:1 */
  --red: var(--p-rouge-fonce);    --red-soft: #fdeae8;     /* 6,3:1 */
  --blue: var(--p-acier-fonce);   --blue-soft: var(--p-bleu-pale);    /* 7,2:1 — le bleu acier du logo */

  /* ---- Typographie : la pile système, assumée (Inter était déclarée mais jamais chargée,
         la police changeait donc d'un appareil à l'autre). Rien à télécharger, rendu natif iPhone. ---- */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, ui-sans-serif, system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --text-xs: 12px;                  /* étiquettes, mentions */
  --text-sm: 13px;                  /* secondaire */
  --text-base: 16px;                /* texte courant — était 15px */
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;

  /* ---- Espacements : une seule trame de 8 px (demi-pas 4 px) ---- */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;

  /* ---- Rayons et ombres : 4 rayons, 3 niveaux d'élévation ---- */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-full: 999px;
  --e1: 0 1px 2px rgba(14, 36, 54, .06), 0 1px 3px rgba(14, 36, 54, .05);
  --e2: 0 2px 4px rgba(14, 36, 54, .05), 0 6px 16px rgba(14, 36, 54, .07);
  --e3: 0 12px 32px rgba(14, 36, 54, .14);
  --shadow: var(--e2);

  /* ---- Animations : courtes et discrètes ---- */
  --t-fast: 120ms; --t-base: 180ms; --t-slow: 260ms;
  --ease: cubic-bezier(.2, .8, .3, 1);
}

/* Un utilisateur qui demande moins d'animations n'en a plus aucune (réglage iPhone « Réduire les animations »). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- base */
body { font-family: var(--font); font-size: var(--text-base); line-height: 1.5; background: var(--page); color: var(--ink); -webkit-font-smoothing: antialiased; }
/* Les titres prenaient l'interligne du texte courant (1,5) : trop lâche en grande taille,
   et le titre de l'en-tête débordait sur deux lignes. */
h1, h2, h3, h4 { text-wrap: balance; color: var(--ink); letter-spacing: -.01em; line-height: 1.2; }
.muted { color: var(--muted); }
.eyebrow { font-size: var(--text-xs); letter-spacing: .12em; }
/* Les chiffres s'alignent en colonne (quantités, stocks, montants). */
.metric-value, table td, table th, .stock-quantity, .count, .bell-count { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- accessibilité : le focus clavier se voit partout */
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--blue); outline-offset: 2px; border-radius: var(--r-sm);
}
.sidebar :where(button, a):focus-visible { outline-color: var(--gold); }

/* ---------------------------------------------------------------- boutons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px;                 /* plancher : WCAG 2.2 AAA et recommandation Apple (40 à 56 px auparavant) */
  padding: 10px var(--s4); border-radius: var(--r-sm);
  font: 600 var(--text-base)/1.2 var(--font); letter-spacing: -.01em;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
/* L'action principale passe à 48 px : c'est la taille Material, et la précision d'un doigt ganté
   tombe à 20-25 mm. Le magasinier travaille souvent avec des gants. */
.button.primary { min-height: 48px; background: var(--navy); color: var(--p-blanc); box-shadow: var(--e1); }
.button.primary:hover { background: var(--navy-2); box-shadow: var(--e2); }
.button.secondary { background: var(--surface); color: var(--ink-2); border-color: var(--line-strong); }
.button.secondary:hover { background: var(--soft); border-color: var(--muted); }
.button:hover { transform: none; }   /* le saut au survol disparaît : il faisait bouger les listes */
.button:active { transform: translateY(1px); }
.button[disabled] { opacity: .5; cursor: not-allowed; }
.icon-button { min-width: 40px; min-height: 40px; border-radius: var(--r-full); transition: background var(--t-fast) var(--ease); }
.icon-button:hover { background: var(--line); }

/* ---------------------------------------------------------------- états (badges) */
.status {
  gap: var(--s2); padding: 5px 10px; border-radius: var(--r-full);
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .01em; border: 1px solid transparent;
}
.status.ready { background: var(--green-soft); color: var(--green); border-color: #bfe6d4; }
.status.pending { background: var(--amber-soft); color: var(--amber); border-color: #f0dcae; }
.status.late, .status.danger { background: var(--red-soft); color: var(--red); border-color: #f3c6c2; }
.status.info { background: var(--blue-soft); color: var(--blue); border-color: #bcd6ee; }

/* ---------------------------------------------------------------- cartes et surfaces */
.operations-card, .return-card, .tour-card, .purchase-card, .metric, .board-card, .site-asset {
  border-radius: var(--r-md); border-color: var(--line); box-shadow: var(--e1);
}
.metric {
  display: grid; grid-template-columns: auto 1fr; align-items: start; gap: var(--s3);
  padding: var(--s4); position: relative;
  transition: box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
/* L'icône laisse la place au texte : la note tient sur une ligne au lieu de trois. */
.metric-icon { width: 44px; height: 44px; }
.metric-icon .ui-icon { width: 22px; height: 22px; }
.metric.is-clickable:hover { box-shadow: var(--e2); border-color: var(--line-strong); }
.metric-body { display: grid; gap: 2px; min-width: 0; }
.metric-label { font-size: var(--text-sm); font-weight: 600; color: var(--muted); padding-right: var(--s5); }  /* réserve la place de la flèche, sans couper le libellé */
.metric-value { font-size: var(--text-3xl); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; color: var(--ink); }
.metric-note { font-size: var(--text-xs); color: var(--muted); }
/* La flèche passe en haut à droite : en bas, elle recouvrait la note sur iPhone. */
.metric-chevron { position: absolute; top: var(--s3); right: var(--s3); bottom: auto; width: 26px; height: 26px; }
.metric.is-clickable:hover .metric-chevron { color: var(--ink-2); }
.metric .metric-value { font-size: var(--text-3xl); margin: var(--s1) 0 0; line-height: 1.05; }
.metric .metric-note { font-size: var(--text-xs); }
.metric.alert .metric-value { color: var(--red); }

/* ---------------------------------------------------------------- tableaux (ordinateur seulement)
   Sur téléphone, mobile.css transforme déjà chaque ligne en carte lisible (libellé au-dessus de la valeur).
   Ces règles doivent donc rester hors du téléphone : sinon elles rendent au tableau sa largeur de 680 px
   et les deux dernières colonnes — l'état et « Ouvrir » — sortent de l'écran. */
@media (min-width: 701px) {
  .table-wrap { overflow-x: auto; border-radius: var(--r-md); }
  table { min-width: 680px; }
  th {
    position: sticky; top: 0; z-index: 1;    /* l'en-tête reste visible quand on fait défiler une longue liste */
    background: var(--soft); color: var(--muted); font-size: var(--text-xs); font-weight: 700;
    letter-spacing: .06em; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line-strong);
  }
  td { padding: var(--s3) var(--s4); font-size: var(--text-base); }
  tbody tr { transition: background var(--t-fast) var(--ease); }
  tbody tr:hover { background: var(--soft); }
  /* Pendant le défilement latéral, la première colonne (l'article, l'opération) reste visible :
     sans elle, on ne sait plus à quelle ligne appartient la valeur lue. */
  th:first-child, td:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); }
  th:first-child { z-index: 3; background: var(--soft); }
  tbody tr:hover td:first-child { background: var(--soft); }
  .table-wrap td:first-child { box-shadow: 1px 0 0 var(--line); }
}

/* ---------------------------------------------------------------- formulaires */
.form-grid { gap: var(--s4); }
.form-grid label { font-size: var(--text-sm); font-weight: 600; color: var(--ink-2); }
.form-grid input, .form-grid select, .form-grid textarea {
  min-height: 44px; padding: 10px var(--s3); border-radius: var(--r-sm); border-color: var(--line-strong);
  font-size: var(--text-base);      /* 16 px : iOS n'agrandit plus la page à la saisie */
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft);
}
.field-hint { font-size: var(--text-xs); color: var(--muted); line-height: 1.4; }
.field-error { font-size: var(--text-sm); }
.photo-field { border-radius: var(--r-md); }

/* ---------------------------------------------------------------- fenêtres */
dialog { border-radius: var(--r-lg); box-shadow: var(--e3); }
dialog > form, .qr-scanner-panel, .email-dialog-panel { padding: var(--s5); }
.dialog-head { padding-bottom: var(--s4); margin-bottom: var(--s5); border-color: var(--line); }
.dialog-head h2 { font-size: var(--text-xl); }
.dialog-actions { gap: var(--s3); margin-top: var(--s5); }   /* 12 px entre deux boutons : moins d'appuis à côté */
dialog::backdrop { background: rgba(14, 36, 54, .5); backdrop-filter: blur(4px); }
dialog[open] { animation: lfc-dialog var(--t-slow) var(--ease); }
@keyframes lfc-dialog { from { opacity: 0; transform: translateY(8px) scale(.99); } }

/* ---------------------------------------------------------------- navigation */
.sidebar { background: var(--navy); }
/* Le bandeau « Commande arrivée » gardait un ambre codé en dur : il passe au bleu de marque.
   L'ambre reste réservé à un état (« en attente »), il ne sert plus de décor. */
.button.delivery-quick { border-color: var(--accent); background: var(--accent-soft); }
.delivery-quick > .ui-icon:first-child { background: #d3e6f7; color: var(--accent-deep); }

/* Sur fond clair, l'accent clair serait trop pâle : l'onglet actif d'une fiche prend l'accent profond. */
.site-tabs button.active { border-bottom-color: var(--accent-deep); color: var(--accent-deep); }
.nav-item {
  min-height: 44px; border-radius: var(--r-sm); font-size: var(--text-base); font-weight: 500;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: var(--p-blanc); }
.nav-item.active { font-weight: 600; }
.topbar { background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); border-color: var(--line); }
.topbar h1 { font-size: var(--text-2xl); letter-spacing: -.02em; }

/* ---------------------------------------------------------------- vides et messages */
.empty-state { padding: var(--s7) var(--s5); border-radius: var(--r-md); }
.empty-state strong { font-size: var(--text-lg); }
/* Au-dessus de tout : un message de confirmation que personne ne voit ne confirme rien. */
.toast { border-radius: var(--r-sm); padding: var(--s3) var(--s4); font-size: var(--text-base); box-shadow: var(--e3); z-index: 60; }

/* ---------------------------------------------------------------- « hidden » cache, sans discussion
   Les composants posent un display (.button est en inline-flex, une grille en grid) et l'emportent ainsi
   sur la règle du navigateur : l'élément marqué « hidden » reste affiché. Trois feuilles corrigeaient déjà
   le cas, élément par élément ; cette règle le ferme pour tous. Mesuré le 8 novembre 2026 : 4 éléments
   sur 37 s'affichaient malgré « hidden », dont un bouton réservé à un profil — la personne cliquait sur
   une action que le serveur allait lui refuser. Le garde-fou de mise en page le vérifie à chaque CI. */
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- téléphone (≤ 700 px) */
@media (max-width: 700px) {
  :root { --text-3xl: 32px; }
  .content { padding: var(--s4) var(--s4) var(--s7); }
  /* Le message de confirmation passe au-dessus de la barre du bas (72 px + encoche), sur toute la largeur.
     Posé à 24 px du bas, il disparaissait derrière elle : l'application paraissait ne rien répondre. */
  .toast { left: var(--s4); right: var(--s4); bottom: calc(94px + env(safe-area-inset-bottom, 0px)); text-align: center; }
  /* V80 : quatre gestes (Sortie, Retour, Entrée, Scanner), deux par ligne ; V165 : « Déplacer » en barre dessous. */
  .quick-movement-actions > div { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
  .metric { padding: var(--s3); }
  .dialog-actions { position: sticky; bottom: 0; background: var(--surface); padding-top: var(--s3); }
  .dialog-actions .button { flex: 1; min-height: 52px; }   /* pleine largeur et bien haut : utilisable au pouce, avec des gants */
  .sidebar nav { padding-bottom: env(safe-area-inset-bottom, 0px); }  /* au-dessus de la barre de l'iPhone */
  .nav-item { font-size: var(--text-xs); line-height: 1.15; }
}

/* ---------------------------------------------------------------- V80 (§193) : design par profil, lot 1
   Les maquettes choisies par Eduardo le 11/11/2026 : le nom du profil en grand, de grandes cartes au pouce
   (icône, libellé, compteur rond, flèche), quatre grands gestes au dépôt, l'onglet actif souligné.
   L'accent reste le bleu acier du logo (V50) : c'est la forme des maquettes qui est reprise, pas leur orange. */
.content .depot-hero h2 { font-family: var(--sans, system-ui, -apple-system, sans-serif); text-transform: uppercase; letter-spacing: .02em; font-weight: 800; }
.depot-hero .hero-grue { color: rgba(160, 196, 230, .42); right: 8px; height: 100%; }
.depot-hero::after { background: linear-gradient(90deg, var(--navy) 38%, rgba(15, 42, 71, .35) 70%, rgba(15, 42, 71, 0) 100%); }
.quick-movement-actions > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.quick-movement-button.quick-scan { background: var(--accent-soft); border-color: var(--accent-deep); color: var(--accent-deep); }
/* V165 (§311) : « Déplacer », geste moins fréquent, sous les quatre grands gestes : une barre pleine largeur. */
.quick-movement-actions .quick-movement-button[data-quick-movement="deplacer"] { grid-column: 1 / -1; }
/* Lot K (nuit des agents du 19/11, M-10 et M-32) : « Au comptoir : … » en tête du dépôt, et « Qui est au comptoir ? » — une personne par
   ligne, 56 px au doigt ; un nom très long passe à la ligne au lieu de déborder. */
.comptoir-bandeau { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); margin: 0 0 var(--s4); padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); overflow-wrap: anywhere; }
.comptoir-bandeau[hidden] { display: none; }
.comptoir-bandeau > span { min-width: 0; }
.comptoir-bandeau .button { min-height: 44px; }
.comptoir-dialog { width: min(480px, calc(100% - 16px)); }
.comptoir-aide { margin: 0; color: var(--muted); }
.comptoir-choix { display: grid; gap: var(--s2); margin: var(--s3) 0 0; }
.comptoir-personne { display: grid; gap: 2px; width: 100%; min-width: 0; min-height: 56px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.comptoir-personne small { color: var(--muted); }
.comptoir-personne[aria-current="true"] { border-color: var(--accent-deep); box-shadow: inset 0 0 0 1px var(--accent-deep); }
.comptoir-dialog .field-error[hidden] { display: none; }
.comptoir-dialog .dialog-actions { grid-template-columns: 1fr; }
.nav-item.active { background: rgba(140, 192, 234, .14); color: var(--accent); }

.home-actions, .home-recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s3); margin: 0 0 var(--s5); }
.home-recent h2 { grid-column: 1 / -1; margin: 0; font-size: var(--text-lg, 18px); color: var(--ink); }
.home-action, .home-recent-item {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: var(--s3); min-height: 64px;
  padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--e1, none);
}
.home-action, .home-recent-item { grid-template-columns: auto 1fr auto; }
.home-action-text .status { justify-self: start; margin-top: var(--s1); }
/* La comptabilité et les achats n'ont rien à faire du dépôt sur leur accueil (V80, brouillon §2). */
body.home-sans-raccourcis #dashboard-view .quick-access, body.home-sans-raccourcis #backup-tools,
body.home-hors-depot #dashboard-view .quick-access, body.home-hors-depot #backup-tools { display: none; }
/* Nuit des agents du 19/11 (constat D-19) : la liste « À traiter maintenant » restait cachée même ouverte par une tuile des Indicateurs
   (« En retard », « Retours », « Réclamations ») : quatre clics sans suite. Fermée, elle est cachée par « hidden » (V148) ; seul son titre
   l'est ici, et seulement tant qu'elle est fermée. Règle à part : un navigateur sans « :has() » garde celle du dessus. */
body.home-hors-depot #dashboard-view .section-heading:has(+ #operations-card[hidden]) { display: none; }
.home-action:hover, .home-recent-item:hover { border-color: var(--line-strong); box-shadow: var(--e2); }
.home-action:focus-visible, .home-recent-item:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; }
.home-action .metric-icon, .home-recent-item .metric-icon { display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); }
.home-action-text { display: grid; gap: 2px; min-width: 0; }
.home-other-move > span:last-child { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }  /* V91 lot E (§212) */
.home-other-move small { color: var(--muted); }
.home-other-move .metric-icon { width: 36px; height: 36px; font-weight: 800; }
#home-others > .muted { grid-column: 1 / -1; margin: 0; }
.home-action-text strong { font-size: var(--text-md, 16px); font-weight: 700; overflow-wrap: anywhere; }
.home-action-text small { color: var(--muted); font-size: var(--text-xs); }
.home-action-chevron { width: 22px; height: 22px; color: var(--muted); }
.hidden.home-actions, .hidden.home-recent { display: none; }

@media (max-width: 700px) {
  .content .depot-hero h2 { font-size: 28px; }
  .depot-hero .hero-grue { right: -6px; height: 92%; opacity: 1; }
  .quick-movement-actions > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-movement-actions .quick-movement-button { min-height: 96px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--s2); text-align: center; border-radius: 16px; }
  .quick-movement-button .qm-text { display: grid; justify-items: center; }
  .quick-movement-button .qm-text small, .quick-movement-button .qm-chevron { display: none; }
  .quick-movement-button .qm-text strong { font-size: 20px; }
  .quick-movement-button .qm-icon svg { width: 30px; height: 30px; }
  /* V165 : la barre « Déplacer », plus basse que les quatre grands gestes, l'icône à côté du mot. */
  .quick-movement-actions .quick-movement-button[data-quick-movement="deplacer"] { min-height: 56px; flex-direction: row; }
  .quick-movement-button[data-quick-movement="deplacer"] .qm-text { flex: 0 0 auto; }  /* l'icône et le mot ensemble, au centre */
  .quick-movement-button[data-quick-movement="deplacer"] .qm-text strong { font-size: 18px; }
  .quick-movement-button[data-quick-movement="deplacer"] .qm-icon svg { width: 24px; height: 24px; }
  /* Les compteurs : une carte par ligne, le chiffre dans une pastille ronde, la flèche à droite (au pouce). */
  .metric-grid { grid-template-columns: 1fr; gap: var(--s2); }
  .metric.is-clickable { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s3); min-height: 64px; border-radius: 16px; }
  .metric-body { grid-template-columns: 1fr auto; grid-template-areas: "label value" "note value"; column-gap: var(--s3); align-items: center; }
  .metric-label { grid-area: label; padding-right: 0; color: var(--ink); font-size: var(--text-md, 16px); font-weight: 700; }
  .metric-note { grid-area: note; }
  .metric .metric-value { grid-area: value; margin: 0; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 999px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep); font-size: 18px; letter-spacing: 0; }
  .metric.alert .metric-value { background: var(--red-soft, #fde8e8); color: var(--red); }
  .metric.metric-stock-value .metric-value { height: auto; padding: 0; background: none; border-radius: 0; font-size: 20px; color: var(--ink); }
  .metric-chevron { position: static; width: 22px; height: 22px; }
  .nav-item.active { box-shadow: inset 0 -3px 0 var(--accent); }
  .home-actions, .home-recent { grid-template-columns: 1fr; gap: var(--s2); }
}

/* ---------------------------------------------------------------- V56 (§194) : l'inventaire au scan */
.inv-message { margin: 0 0 var(--s3); padding: var(--s3) var(--s4); border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.inv-ouvrir { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); max-width: 560px; padding: var(--s4); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); margin-bottom: var(--s5); }
.inv-ouvrir label { display: grid; gap: var(--s1); font-weight: 600; min-width: 0; }
/* Revue design du 18/11 : depuis l'inventaire par zone (§311), une option longue (« Zone … · Mezzanine … ») élargissait la liste au-delà
   des 390 px du téléphone ; la liste prend la largeur de la carte, pas celle de sa plus longue option. */
.inv-ouvrir select { width: 100%; min-width: 0; max-width: 100%; }
.inv-ouvrir select, .inv-outils input, .inv-saisie input, .inv-saisie select { min-height: 44px; font-size: 16px; }
.inv-historique { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.inv-historique li { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.inv-ancien { flex: 1 1 260px; display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s3); align-items: center; min-height: 56px; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.inv-ancien small { grid-column: 1; color: var(--muted); }
.inv-ancien .status { grid-row: 1 / span 2; grid-column: 2; }
.inv-entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.inv-entete h3 { margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.inv-scanner { min-height: 48px; }
.inv-outils { display: grid; gap: var(--s2); margin-bottom: var(--s3); }
.inv-direction { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; padding: var(--s3) var(--s4); margin-bottom: var(--s3); border-radius: 14px; background: var(--accent-soft); }
.inv-direction p { flex: 1 1 260px; margin: 0; }
/* Nuit des agents du 19/11, C-09 : les machines introuvables d'un comptage clôturé (leur fiche ne change pas, §194) */
.inv-introuvables { margin-bottom: var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-left: 6px solid #e08a00; border-radius: 14px; background: var(--surface); color: var(--ink); overflow-wrap: anywhere; }
.inv-introuvables h4 { margin: 0 0 6px; }
.inv-introuvables ul { margin: 0 0 6px; padding-left: 18px; }
.inv-introuvables p { margin: 0; }
.inv-lignes { display: grid; gap: var(--s2); }
.inv-ligne { padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.inv-ligne.inv-surligne { border-color: var(--accent-deep); box-shadow: 0 0 0 3px var(--accent-soft); }
.inv-tete { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); }
.inv-tete strong { display: block; overflow-wrap: anywhere; }
.inv-tete small { display: block; color: var(--muted); }
.inv-prix { color: var(--ink-2, var(--muted)); }
.inv-chiffres { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; font-variant-numeric: tabular-nums; }
.inv-ecart, .inv-ok, .inv-attente { padding: 2px 10px; border-radius: 999px; font-weight: 700; }
.inv-ecart.moins { background: var(--red-soft, #fde8e8); color: var(--red); }
.inv-ecart.plus { background: var(--green-soft, var(--p-e3f5ea)); color: var(--green, var(--p-vert-texte)); }
.inv-ok { background: var(--green-soft, var(--p-e3f5ea)); color: var(--green, var(--p-vert-texte)); }
.inv-attente { background: var(--amber-soft); color: var(--amber); }
.inv-saisie { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: end; margin-top: var(--s3); }
.inv-saisie label { display: grid; gap: 2px; font-size: var(--text-sm); font-weight: 600; }
.inv-saisie input { width: 120px; }
.inv-saisie .button { min-height: 44px; min-width: 64px; }

/* ---------------------------------------------------------------- V80 lot 2 (§195) : tuiles d'état et zone photo */
.choix-source, .photo-source { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0 !important; pointer-events: none; overflow: hidden; }
.choix-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: var(--s2); margin-top: var(--s1); }
.choix-tuile { display: grid; justify-items: center; align-content: center; gap: var(--s1); min-height: 88px; padding: var(--s2); border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-size: var(--text-sm); text-align: center; cursor: pointer; }
.choix-tuile span { overflow-wrap: anywhere; hyphens: none; }  /* critique v0.286 : « Endomma-gée » ne se coupe plus */
.choix-tuile .ui-icon { width: 28px; height: 28px; color: var(--accent-deep); }
.choix-tuile[aria-pressed="true"] { border-color: var(--accent-deep); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }
.choix-tuile[data-choix-valeur="Bon état"] .ui-icon { color: var(--green, var(--p-vert-texte)); }
.choix-tuile[data-choix-valeur="Endommagé"] .ui-icon, .choix-tuile[data-choix-valeur="Réclamation / remboursement"] .ui-icon { color: var(--red); }
.choix-tuile:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; }
.photo-zone { display: grid; justify-items: center; gap: var(--s1); margin-top: var(--s1); padding: var(--s4); border: 2px dashed var(--accent-deep); border-radius: 14px; background: var(--accent-soft); color: var(--accent-deep); text-align: center; cursor: pointer; }
.photo-zone strong { font-size: var(--text-md, 16px); }
.photo-zone small { color: var(--muted); font-weight: 400; }
.photo-zone-icone { width: 36px; height: 36px; }
.photo-zone.has-photo { grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: left; border-style: solid; background: var(--green-soft, var(--p-e3f5ea)); border-color: var(--green, var(--p-vert-texte)); color: var(--green, var(--p-vert-texte)); }
.photo-zone.has-photo img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.photo-zone.has-photo span { display: grid; gap: 2px; }
label:focus-within > .photo-zone { outline: 3px solid var(--accent-deep); outline-offset: 2px; }
.inv-valeur { grid-row: 1 / span 2; grid-column: 2; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- V85 lot A (§198) : le style des maquettes partout */
.page-heading h2 { display: flex; align-items: center; gap: var(--s3); }
.page-icon { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); }
.page-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 700px) {
  /* La barre du haut en marine, comme les maquettes : le logo en blanc, la cloche et « + » en blanc sur marine. */
  .topbar { background: var(--navy) !important; backdrop-filter: none; border-bottom: 0; color: var(--p-blanc); }
  .topbar .bell-button, .topbar .team-me-button { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .35); color: var(--p-blanc); }
  .topbar .bell-button svg { stroke: var(--p-blanc); }
  .top-actions #open-create { background: var(--p-blanc); color: var(--navy); border-color: var(--p-blanc); }
  .topbar :focus-visible { outline-color: var(--accent); }
  .page-heading h2 { font-size: 26px; }
  .page-icon { width: 40px; height: 40px; }
}

/* ---------------------------------------------------------------- V85 lot B (§199) : les cartes du stock, la case « Rechercher ou scanner » */
#stock-grid .stock-card { display: grid !important; grid-template-columns: 1fr !important; gap: 0 !important; padding: 0 !important; border-radius: 16px; overflow: hidden; }
.stock-card-main { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; cursor: pointer; color: inherit; }
.stock-card-main:hover { background: var(--accent-soft); }
.stock-card-main:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: -3px; }
#stock-grid .stock-card-photo { width: 96px !important; height: 96px !important; border-radius: 12px; overflow: hidden; grid-row: auto !important; margin: 0 !important; }
#stock-grid .stock-card-photo img { width: 100%; height: 100%; object-fit: cover !important; }
#stock-grid .stock-card-body { padding: 0 !important; min-width: 0; }
#stock-grid .stock-card-body h3 { margin: 0 0 2px; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
#stock-grid .stock-reference { margin: 0; color: var(--muted); font-size: 13px; }
.stock-card-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 0; }
.stock-etat { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.stock-etat-ok { background: var(--green-soft, var(--p-e3f5ea)); color: var(--green, var(--p-vert-texte)); }
.stock-etat-low { background: var(--amber-soft); color: var(--amber); }
.stock-etat-out { background: var(--red-soft, #fde8e8); color: var(--red); }
.stock-unites { font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
#stock-grid .stock-low-alert { display: inline-block; margin-top: 8px; }
#stock-grid .stock-last-out { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
#stock-grid .stock-purchase-link { box-sizing: border-box; width: auto !important; margin: 0 12px 12px; white-space: normal; }
#stock-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); align-items: start; }
.stock-card-chevron .ui-icon { width: 22px; height: 22px; color: var(--muted); }
.item-sheet-edit { margin: var(--s3) 0; }
.stock-search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stock-search-field { position: relative; display: block; }
.stock-search-field input { width: 100%; padding-right: 56px !important; min-height: 48px; border-radius: 14px; }
.stock-search-scan { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--accent-soft); color: var(--accent-deep); cursor: pointer; }
.stock-search-scan svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stock-search-scan:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; }
body.depot-readonly .stock-search-scan { display: none; }
@media (max-width: 700px) {
  .stock-card-main { grid-template-columns: 84px minmax(0, 1fr) auto; gap: 12px; }
  #stock-grid .stock-card-photo { width: 84px !important; height: 84px !important; }
}

/* ---------------------------------------------------------------- V85 lot C (§200) : la fiche d'un article */
.item-sheet-visuels { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s3); margin-bottom: var(--s3); }
.item-sheet-photo, .item-sheet-qr { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; min-height: 150px; }
.item-sheet-photo .request-sheet-photo { display: block; width: 100%; height: 100%; max-height: none; object-fit: cover; margin: 0; border-radius: 0; }
.item-sheet-sans-photo { display: grid; place-items: center; align-content: center; gap: var(--s1); height: 100%; min-height: 150px; padding: var(--s3); text-align: center; color: var(--muted); background: var(--accent-soft); }
.item-sheet-sans-photo .ui-icon { width: 36px; height: 36px; color: var(--accent-deep); }
.item-sheet-qr { display: grid; justify-items: center; align-content: center; gap: var(--s1); padding: var(--s2); }
.item-sheet-qr span { font-weight: 700; font-size: var(--text-sm); }
.item-sheet-qr img { width: 100%; max-width: 140px; height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.item-sheet h3 { font-size: 24px; margin: var(--s2) 0 var(--s1); overflow-wrap: anywhere; }
.item-sheet-ref { margin: 0 0 var(--s3); padding: var(--s2) var(--s3); border-radius: 10px; background: var(--accent-soft); color: var(--accent-deep); }
.item-sheet-etat { display: grid; gap: var(--s2); padding: var(--s3) var(--s4); border-radius: 14px; margin-bottom: var(--s3); }
.item-sheet-etat strong { font-size: 20px; }
.item-sheet-etat-ok { background: var(--green-soft, var(--p-e3f5ea)); color: var(--green, var(--p-vert-texte)); }
.item-sheet-etat-low { background: var(--amber-soft); color: var(--amber); }
.item-sheet-etat-out { background: var(--red-soft, #fde8e8); color: var(--red); }
.item-sheet-etat-info { background: var(--accent-soft); color: var(--accent-deep); }
.item-sheet-compte { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); color: var(--ink); }
.item-sheet-compte strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.item-sheet-actions { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.item-sheet-actions .button { min-height: 52px; font-size: 17px; border-radius: 14px; }
#item-sheet-historique:focus { outline: none; }

/* ---------------------------------------------------------------- V86 (§201) : les compteurs de l'accueil en tuiles de couleur
   Sur la capture de Rappels d'Eduardo : icône en haut à gauche, chiffre en gros en haut à droite, nom en bas. La couleur dit le sens
   (voir TILE_COLORS dans app.js). V173 lot E (décision 13 d'Eduardo, 19/11/2026 soir ; nuit des agents, D-17 et D-60) : en pastel, au
   style « planning » (§293) — fond clair, filet fin de la même teinte, texte foncé de la couleur du sens, à 4,5:1 au moins (AA). Les
   dégradés saturés et le texte blanc de la V86 s'en vont ; les tailles (112 / 132 px de haut) ne changent pas. */
#metrics.metric-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); }
#metrics.metric-grid { grid-auto-flow: dense; }  /* une tuile large ne laisse pas de trou : les suivantes le comblent */
@media (min-width: 701px) { #metrics .metric[data-couleur].metric-wide { grid-column: auto; } }  /* sur l'ordinateur, des tuiles toutes de même taille */
#metrics .metric[data-couleur] {
  display: grid !important; grid-template-columns: auto 1fr; grid-template-areas: "icone chiffre" "corps corps"; align-items: start; gap: var(--s3);
  min-height: 132px; padding: var(--s4) !important; border: 1px solid var(--tuile-filet) !important; border-radius: 20px; color: var(--tuile-texte); text-align: left;
  background: var(--tuile-fond) !important; box-shadow: none;
}
#metrics .metric[data-couleur="rouge"] { --tuile-fond: var(--p-rouge-pale); --tuile-texte: var(--p-a12620); --tuile-filet: #f5c2bd; }
#metrics .metric[data-couleur="orange"] { --tuile-fond: var(--p-ambre-pale); --tuile-texte: var(--p-7a4f00); --tuile-filet: #f0d68f; }
#metrics .metric[data-couleur="bleu"] { --tuile-fond: var(--p-bleu-pale); --tuile-texte: var(--p-marine-texte); --tuile-filet: #bcd5ec; }
#metrics .metric[data-couleur="vert"] { --tuile-fond: var(--p-e3f5ea); --tuile-texte: var(--p-14532d); --tuile-filet: var(--p-b6e8c8); }
#metrics .metric[data-couleur="gris"] { --tuile-fond: var(--p-fond-pale); --tuile-texte: var(--p-ardoise); --tuile-filet: var(--p-bordure); }
#metrics .metric[data-couleur]:hover { filter: brightness(.98); border-color: var(--tuile-texte) !important; }
#metrics .metric[data-couleur]:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; }
#metrics .metric[data-couleur] .metric-icon { grid-area: icone; width: 40px; height: 40px; background: none !important; color: var(--tuile-texte) !important; border-radius: 0; }
#metrics .metric[data-couleur] .metric-icon .ui-icon { width: 34px; height: 34px; stroke: var(--tuile-texte); }
#metrics .metric[data-couleur] .metric-body { display: contents; }
#metrics .metric[data-couleur] .metric-value { grid-area: chiffre; justify-self: end; margin: 0; padding: 0; min-width: 0; height: auto; background: none !important; color: var(--tuile-texte) !important; font-size: 40px; font-weight: 800; line-height: 1; border-radius: 0; }
#metrics .metric[data-couleur].metric-stock-value .metric-value { font-size: 26px; }
#metrics .metric[data-couleur] .metric-label { grid-area: corps; align-self: end; padding: 0; color: var(--tuile-texte) !important; font-size: 19px; font-weight: 800; }
#metrics .metric[data-couleur] .metric-note { display: none; }
#metrics .metric[data-couleur].metric-stock-value .metric-note { display: block; grid-column: 1 / -1; color: var(--tuile-texte); font-size: 14px; }  /* la valeur garde son évolution (§193) */
#metrics .metric[data-couleur].metric-stock-value { grid-template-areas: "icone chiffre" "corps corps" "note note"; }
#metrics .metric[data-couleur].metric-stock-value .metric-note { grid-area: note; }
#metrics .metric[data-couleur] .metric-chevron { display: none; }
@media (max-width: 700px) {
  #metrics.metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
  #metrics .metric[data-couleur] { min-height: 112px; padding: var(--s3) !important; border-radius: 18px; gap: var(--s2); }
  #metrics .metric[data-couleur] .metric-value { font-size: 34px; }
  #metrics .metric[data-couleur].metric-stock-value .metric-value { font-size: 20px; overflow-wrap: anywhere; }
  #metrics .metric[data-couleur] .metric-label { font-size: 16px; overflow-wrap: anywhere; hyphens: auto; }
}

/* ---------------------------------------------------------------- V87 (§202) : « Mes chantiers » sous les tuiles, comme les listes de Rappels */
.home-chantiers { margin: 0 0 var(--s5); }
.home-chantiers h2 { margin: 0 0 var(--s3); font-size: 22px; color: var(--ink); }
.home-groupe h3 { margin: var(--s3) 0 var(--s2); font-size: var(--text-sm); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.home-liste { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.home-site { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: var(--s3); width: 100%; min-height: 60px; padding: var(--s2) var(--s4); border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.home-liste .home-site:last-child { border-bottom: 0; }
.home-site:hover { background: var(--accent-soft); }
.home-site:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: -3px; }
.home-pastille { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--p-blanc); }
.home-pastille .ui-icon { width: 22px; height: 22px; stroke: var(--p-blanc); }
.home-pastille-rouge { background: var(--p-rouge-texte); }
.home-pastille-bleu { background: var(--p-acier-fonce); }
.home-site-nom { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.home-chiffre { font-size: 17px; color: var(--muted); font-variant-numeric: tabular-nums; }
.home-site-tous { grid-template-columns: 1fr auto; margin-top: var(--s3); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.home-site-tous .home-site-nom { color: var(--accent-deep); font-weight: 700; }
.hidden.home-chantiers { display: none; }

/* ---------------------------------------------------------------- V88 (§203, §204) : chargement, véhicule, sur la page Tournées */
.tour-vehicule { margin: var(--s2) 0; padding: var(--s2) var(--s3); border-radius: 10px; background: var(--accent-soft); color: var(--ink); overflow-wrap: anywhere; }
.tour-vehicule-alerte { color: var(--red); font-weight: 700; }
.tour-vehicule-photos img, .tour-chargement img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; vertical-align: middle; }
.return-tri-choice { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); margin: 0 0 var(--s2); }  /* V91 lot D (§211) */
.return-tri-choice .check { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; }
.return-tri { font-weight: 800; }
.return-tri[data-return-tri="dechet"] { color: var(--red); }
.tour-taches { margin: var(--s1) 0 0; font-size: var(--text-sm); font-weight: 700; overflow-wrap: anywhere; }  /* V91 lot C (§210) */
.tour-taches-editor { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); border: 1px solid var(--line); border-radius: 10px; padding: var(--s2); }
.tour-taches-editor .check { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.tour-taches-editor label:last-child { flex-basis: 100%; }
.tour-chargement { margin: var(--s1) 0 0; font-size: var(--text-sm); color: var(--muted); }
.tour-chargement-secours { color: var(--amber); font-weight: 700; }
.tour-vehicules { margin-top: var(--s5); padding: var(--s4); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.tour-vehicules ul { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; gap: var(--s2); }
.tour-vehicules li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2); }
/* V113 (§250) : à qui est le camion, son étiquette QR */
.tour-vehicule-gestes { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.tour-vehicule-gestes, .tour-vehicule-titulaire { min-width: 0; max-width: 100%; }
.tour-vehicule-titulaire { display: flex; align-items: center; gap: var(--s2); font-weight: 600; white-space: nowrap; }
.tour-vehicule-titulaire select { min-height: 44px; min-width: 0; max-width: min(100%, 20rem); flex: 0 1 auto; text-overflow: ellipsis; }
.tour-vehicule-a-qui { display: inline-block; margin-left: var(--s2); padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.tour-vehicule-form { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tour-heures-corriger { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); width: 100%; }
.tour-heures-corriger input { min-height: 44px; flex: 1 1 140px; min-width: 0; }
.tour-heures-corrigee { color: #a8581a; }
/* V195 (§372) : la date de réception sur la fiche du chantier, et la proposition de l'alerte « Deux chantiers le même jour » */
.site-reception { display: block; margin-top: var(--s1); }
.site-reception input { min-height: 44px; max-width: 100%; }
.mo-reception { display: grid; gap: var(--s2); margin-top: var(--s2); padding: 0 var(--s3) var(--s2); }
.mo-reception small, .mo-reception .mo-proposition { margin: 0; overflow-wrap: anywhere; }
.mo-reception .button { min-height: 44px; max-width: 100%; white-space: normal; text-align: left; justify-self: start; }
/* V190 (§370) : un jour de tournée sans pointage (la direction saisit la journée) ; « Commencer pour lui » (le dépôt, la direction) */
.tour-heures-saisir label { display: grid; gap: 4px; flex: 1 1 120px; font-weight: 600; min-width: 0; }
.tour-heures-saisir .button { min-height: 44px; }
.tour-heures-saisir .voix-champ-erreur { flex: 1 0 100%; margin: 0; }
.tour-journees-jour { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tour-journees-jour h3 { margin: 0 0 var(--s2); }
.tour-journees-jour ul { list-style: none; margin: 0 0 var(--s2); padding: 0; display: grid; gap: var(--s2); }
.tour-journees-jour li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2); }
.tour-journees-jour .button { min-height: 44px; max-width: 100%; white-space: normal; text-align: left; }
.tour-journees-jour p { margin: 0; }
.tour-heures-contestee { color: var(--p-rouge-texte); }
/* V112 (§249) : sous la ligne d'une journée, l'état du camion (avec sa photo) et les repères de la journée */
.tour-heures-camion, .tour-heures-reperes { flex: 1 0 100%; display: block; min-width: 0; overflow-wrap: anywhere; line-height: 1.45; }
.tour-heures-reperes { color: var(--muted); }
.tour-heures-camion img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; vertical-align: middle; margin-left: var(--s2); }
.tour-heures-camion audio { display: block; width: 100%; max-width: 320px; margin-top: var(--s2); }
.heures-confirmer { max-width: min(440px, calc(100vw - 32px)); border: 0; border-radius: 16px; padding: var(--s4); }
.heures-confirmer::backdrop { background: rgba(15, 42, 71, .45); }
.heures-confirmer-boutons { display: flex; flex-wrap: wrap; gap: var(--s2); }
.heures-confirmer-boutons .button { min-height: 44px; flex: 1 1 140px; }
.heures-confirmer-erreur { color: var(--p-rouge-texte); }
.heures-confirmer .heures-non { color: var(--p-rouge-texte); border-color: var(--p-rouge-texte); }
/* V106 (§243) : sorties confirmées par jour et par chantier — la liste d'un groupe, la case « pas pour moi », les cartes de la direction. */
.sorties-jour-ou { margin: 0 0 var(--s2); overflow-wrap: anywhere; }
.sorties-jour-liste { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; gap: 6px; max-height: 44vh; overflow-y: auto; }
.sorties-jour-ligne { display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--soft); }
.sorties-jour-ligne > span { display: grid; gap: 2px; min-width: 0; }
.sorties-jour-ligne strong, .sorties-jour-ligne small { overflow-wrap: anywhere; }
.sorties-jour-ligne strong { color: var(--ink); }
.sorties-jour-ligne small { color: var(--muted); font-size: var(--text-sm); }
.sorties-jour-ligne input[type="checkbox"] { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--red); }
.sorties-jour-choix label.sorties-jour-ligne { cursor: pointer; }
.sorties-jour-choix label.sorties-jour-ligne:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.sorties-jour-champ { display: grid; gap: 6px; margin: var(--s2) 0; font-weight: 700; }
.sorties-jour-champ select { min-height: 44px; width: 100%; font-size: var(--text-base); }
.sorties-jour .heures-confirmer-boutons { margin-top: var(--s3); }
.sorties-jour > p { margin: 0 0 var(--s2); }
.sorties-carte { display: grid; gap: 6px; margin: 0 0 var(--s3); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.sorties-carte > strong, .sorties-carte > small { overflow-wrap: anywhere; }
.sorties-carte > strong { color: var(--navy); }
.sorties-carte > small { color: var(--muted); font-size: var(--text-sm); }
.sorties-carte .operation-confirmation { margin: 0; }
.sorties-carte .sorties-jour-liste { margin: 0; max-height: none; }
.sorties-carte .button { min-height: 44px; justify-self: start; max-width: 100%; white-space: normal; text-align: left; }
.tour-heures-feuilles .button { min-height: 44px; margin-left: var(--s2); }
.tour-vehicule-form input { min-height: 44px; flex: 1 1 180px; }
.tour-vehicule-form label { display: grid; gap: 4px; flex: 1 1 180px; font-weight: 600; }  /* V288 : étiquettes visibles */
.tour-vehicule-form .button { align-self: end; }
.tour-vehicule-form [data-vehicule-erreur] { flex-basis: 100%; margin: 0; }
.tour-bilan { margin: var(--s2) 0; padding: var(--s2) var(--s3); border-radius: 10px; background: var(--green-soft, var(--p-e3f5ea)); color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.tour-couts { align-items: end; margin-bottom: var(--s4); }
.tour-couts label { display: grid; gap: 2px; font-size: var(--text-sm); font-weight: 600; flex: 1 1 120px; }

/* ---------------------------------------------------------------- V89 (§206) : le nombre de messages non lus */
.nav-item .nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--navy); font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.nav-item .nav-badge.hidden, .messages-button.hidden { display: none !important; }
#messages-page { max-width: 760px; }

/* ---------------------------------------------------------------- V91 lot A (§208) : accès et livraison du chantier */
.site-acces { margin-top: var(--s4); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.site-acces h3 { margin: 0 0 var(--s2); }
.site-pictos-liste { display: flex; flex-wrap: wrap; gap: var(--s1); margin: 0 0 var(--s2); }
.site-picto { padding: 3px 10px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: var(--text-sm); font-weight: 700; }
.site-acces-edit summary { cursor: pointer; font-weight: 700; color: var(--accent-deep); min-height: 44px; display: flex; align-items: center; }
.site-acces-edit form { display: grid; gap: var(--s2); }
.site-pictos { display: grid; gap: var(--s1); border: 1px solid var(--line); border-radius: 10px; padding: var(--s2) var(--s3); }
.site-pictos label { display: flex; gap: var(--s2); align-items: center; min-height: 40px; }
/* V91 lot B (§209) : les changements de dernière minute, et la fenêtre du motif */
.tour-changements { margin-top: var(--s5); padding: var(--s4); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.tour-changements ul { margin: var(--s2) 0; padding-left: 1.2em; display: grid; gap: var(--s1); }
.motif-dialog { max-width: 520px; width: calc(100% - 32px); border: 0; border-radius: 16px; padding: var(--s4); }
.motif-dialog textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; min-height: 88px; }
.motif-dialog label { display: grid; gap: var(--s1); font-weight: 700; }
/* V51 lot 2b (§222) : listes « nom · détail … montant » des indicateurs (enlèvements ratés). */
.kpi-list { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; gap: var(--s2); }
.kpi-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); overflow-wrap: anywhere; }
.kpi-list li > span:last-child { font-weight: 700; white-space: nowrap; }
.effic-service { border-top: 1px solid var(--line); padding: var(--s2) 0; }
.effic-service summary { display: grid; gap: 2px; min-height: 44px; cursor: pointer; align-content: center; }
.effic-service summary small { color: var(--muted); overflow-wrap: anywhere; }
.effic-personnes { margin: var(--s2) 0 0 var(--s3); }
.effic-personnes li { display: grid; justify-content: stretch; }
.effic-personnes li > span:last-child, .effic-personnes small { font-weight: 400; white-space: normal; }
.effic-regle { margin-top: var(--s3); }
.effic-service summary::after { content: "Voir le détail par personne"; font-size: 13px; font-weight: 600; color: var(--accent-deep, var(--p-acier-fonce)); }  /* V146 (A2) : --accent est fait pour le fond marine (1,9:1 sur blanc) */
.effic-service[open] summary::after { content: "Masquer le détail"; }
.item-sheet-controle { display: grid; gap: var(--s2); margin: var(--s3) 0; padding: var(--s3); border-radius: 12px; background: #fff4e0; border: 1px solid #e8c48a; color: #7a4a00; }
/* V109 (§247) : le contrôle se fait retour par retour, « N bons / M abîmés » — une carte par retour. */
.controle-retour { display: grid; gap: var(--s2); padding: var(--s3); border: 1px solid #e8c48a; border-radius: 10px; background: var(--p-blanc); color: var(--p-encre); }
.controle-retour-titre { margin: 0; overflow-wrap: anywhere; }
.controle-abimes { display: grid; gap: 6px; font-weight: 700; }
.controle-compteur { display: flex; align-items: center; gap: 8px; }
.controle-compteur input { width: 84px; min-height: 48px; text-align: center; font-size: 18px; font-weight: 800; }
.controle-compteur .button { min-width: 48px; min-height: 48px; padding: 0; font-size: 22px; line-height: 1; }
.controle-sur { color: #56687a; font-weight: 600; }
.controle-casse { display: grid; gap: var(--s2); padding-top: var(--s2); border-top: 1px dashed #e8c48a; }
.controle-autre { display: grid; gap: 6px; }
.controle-casse > label:not(.button), .controle-autre > label { display: grid; gap: 6px; font-weight: 700; }
.controle-casse select, .controle-autre input { width: 100%; min-height: 48px; box-sizing: border-box; padding: 8px 12px; border: 1px solid #c9d3da; border-radius: 10px; background: var(--p-blanc); font: inherit; font-size: 16px; }
.controle-autre .button { min-height: 48px; }
/* Le champ fichier du téléphone (« Choisir le fichier ») reste caché : tout le bouton ouvre l'appareil photo de l'application. */
.controle-photo { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; text-align: center; }
.controle-photo-champ { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.controle-apercu { display: block; max-width: 160px; max-height: 120px; border-radius: 8px; object-fit: cover; }
.controle-casse[hidden], .controle-autre[hidden], .controle-erreur[hidden], .controle-apercu[hidden] { display: none; }
.controle-erreur { margin: 0; color: var(--p-rouge-texte); font-weight: 700; }
.controle-retour > .button { min-height: 48px; }

/* ---------------------------------------------------------------- Audit design du 13/11/2026 (docs/audits/2026-11-13-audit-design.md)
   Validé par Eduardo : « Oui, tout appliquer ». Au doigt : 44 px ; textes : 12 px au moins ; champs : 16 px (sinon l'iPhone zoome).
   Des « !important » ici : ce sont des PLANCHERS, posés après des règles anciennes plus précises (theme.css, mobile.css). */
input, select, textarea { font-size: max(16px, 1em); }
#sites-search, #clothing-search, #stock-search, #qr-search, #who-search, .tour-vehicules input, .tour-vehicules select { font-size: 16px !important; }
.qr-help, .qr-kind, .kpi-now, .nature-pill, .notification-address, .avatar, .quick-access-item small { font-size: 12px !important; }
.status, .site-row-meta .status { font-size: 12px !important; }
.kpi-now { color: #4a5a6a; }
.nature-pill.nature-aclasser, .price-state.price-a_confirmer, .nature-aclasser, .price-a_confirmer { color: var(--p-7a5410); }  /* 4,47:1 → plus de 5:1 */
small { font-size: max(12px, 0.83em); }  /* un <small> sans règle propre ne descend plus sous 12 px */
#open-account, .sidebar a.version { min-height: 44px; display: inline-flex; align-items: center; }
.cal-head { flex-wrap: wrap; }
.cal-head strong { min-width: 0 !important; flex: 1 1 auto; }
.stock-toolbar { flex-wrap: wrap; }
.stock-toolbar .stock-search { min-width: 0; flex: 1 1 240px; max-width: 100%; }
/* v0.235.0 : sur téléphone la barre passe en colonne ; la base de 240 px devenait une hauteur, d'où un grand blanc sous « Rechercher ». */
@media (max-width: 700px) { .stock-toolbar .stock-search { flex: 0 0 auto; } }
/* v0.235.0 : la croix des fenêtres (« Remettre un vêtement »…) à 44 px au doigt, comme celle de la fiche (v0.234.0). */
@media (max-width: 900px), (pointer: coarse) { dialog .dialog-head .icon-button, .more-head .icon-button { width: 44px; height: 44px; } }  /* V288 : la croix du menu « Plus » aussi (40 px) */
#qr-search { max-width: 100%; box-sizing: border-box; }
/* V146 (A4) : « au doigt » se décide par le doigt, pas par la largeur — une tablette en paysage (plus de 900 px) gardait des cibles de 29 px. */
@media (max-width: 900px), (pointer: coarse) {
  .chip, .filter, .qr-filter { display: inline-flex !important; align-items: center; justify-content: center; min-height: 44px !important; }
  .filter-group, .chips, .chip-row { gap: 8px !important; }
  .filter + .filter, .chip + .chip { margin-inline-start: 6px; }
  .row-action { display: inline-flex !important; align-items: center; justify-content: center; min-height: 44px !important; min-width: 44px; padding-inline: 8px !important; }
  .cal-nav { min-width: 44px; min-height: 44px; }
  #team-button, #messages-button, #late-bell { min-width: 44px; min-height: 44px; }
  .item-link { padding-block: 14px; }
}
@media (max-width: 900px) {
  .nav-item, #nav-more { font-size: 12px !important; }
  time { font-size: max(12px, 1em); }
}
@media (max-width: 900px), (pointer: coarse) {
  #qr-search, #who-search, #who-site, #tournees-day, .bar-row.is-clickable { min-height: 44px; }
}
@media (max-width: 900px), (pointer: coarse) {
  .item-link { padding-inline: 6px; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]), select { min-height: 44px; }
  .button { min-width: 44px; min-height: 44px; }
}
/* V101 (§232) : la réponse du Responsable nommé sur une sortie, sur la carte de la sortie et dans l'alerte. */
.operation-confirmation { margin: var(--s2) 0; padding: var(--s2) var(--s3); border-radius: 10px; font-weight: 700; background: #eef3f7; color: #24384c; }
.operation-confirmation.ok { background: #e3f2ea; color: var(--p-14532d); }
.operation-confirmation.attente { background: var(--p-ambre-pale-2); color: var(--p-5c3b00); }
.operation-confirmation.contestee { background: var(--p-rouge-pale); color: #8f1d17; }
@media (prefers-color-scheme: dark) { .operation-confirmation { background: #1d2a36; color: #d7e1ea; } .operation-confirmation.ok { background: var(--p-13321f); color: var(--p-b6e8c8); } .operation-confirmation.attente { background: var(--p-3d3214); color: var(--p-ambre-clair); } .operation-confirmation.contestee { background: #3b1a18; color: #f6c1bc; } }
/* Audit I4 (§233) : le changement de dernière minute vu (ou pas) par le chauffeur, côté dépôt. */
.tour-vu { color: var(--p-14532d); font-weight: 700; }
.tour-pas-vu { color: #8f1d17; font-weight: 700; }
/* Audit I9 (§234) : les deux photos d'une livraison déposée sans réceptionnaire, dans l'alerte du Responsable. */
.depose-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin: var(--s2) 0; }
/* V110 (§246) : « où », dit par le livreur — le Responsable l'écoute avant de répondre. */
.depose-audio { display: block; width: 100%; margin: var(--s2) 0; }
.depose-photo { width: 100%; height: 140px; object-fit: cover; border-radius: 10px; }
/* V103 (§235) : « Modifier la fiche » d'une machine ou d'un matériel durable — champs empilés, au doigt, photo en vrai bouton. */
.fiche-modifier form { display: grid; gap: var(--s3); }
.fiche-modifier h3 { margin: 0; }
.fiche-modifier label { display: grid; gap: 6px; font-weight: 600; }
.fiche-modifier :is(input:not([type="file"]), select, textarea) { width: 100%; min-height: 48px; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; }
.fiche-modifier .fiche-photo { position: relative; display: flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 52px; border: 2px dashed var(--p-acier-fonce); border-radius: 12px; color: var(--p-marine-texte); cursor: pointer; }
.fiche-modifier .fiche-photo input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fiche-modifier .heures-confirmer-boutons .button { flex: 1 1 140px; min-height: 48px; }
@media (max-width: 900px), (pointer: coarse) { #side-panel-dialog .icon-button { min-width: 44px; min-height: 44px; } }

/* V136 (§279) : l'accueil Direction commence par « Mes décisions ». Un seul rouge : le retard. */
.home-decisions { display: grid; gap: var(--s3); margin: 0 0 var(--s5); min-width: 0; }
.home-decisions h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--text-lg, 18px); color: var(--ink); }
.home-decisions .count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--accent-deep); color: var(--p-blanc); font-size: 14px; font-weight: 800; display: inline-grid; place-items: center; }
.decisions-liste { display: grid; gap: var(--s2, 8px); }
.decision-ligne { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-left: 6px solid #e08a00; border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.decision-ligne.decision-retard { border-left-color: #c62828; }
.decision-texte { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.decision-texte small { color: var(--muted, #4f6475); font-size: 14px; }
.decision-consequence { font-weight: 700; }
.decision-raison { font-size: 14px; font-weight: 800; color: #8a5a00; white-space: nowrap; }
.decision-retard .decision-raison { color: #b71c1c; }
.decisions-suite { justify-self: start; min-height: 44px; padding: 0 16px; border: 1px solid var(--accent-deep); border-radius: 999px; background: var(--surface); color: var(--accent-deep); font: inherit; font-weight: 700; cursor: pointer; }
.decisions-vide { margin: 0; padding: var(--s3) var(--s4); border-radius: 14px; background: #e8f5ec; color: #1b5e20; font-weight: 700; }
.decision-indisponible { margin: 0; padding: var(--s3) var(--s4); border-radius: 14px; background: var(--p-ambre-clair); color: #6b3d00; font-weight: 700; }
.decisions-maj { margin: 0; font-size: 13px; }
/* V158 (§304) : « À regarder » — chaque alerte, « Ouvrir » et « Vu, rien à faire » ; le témoin des rappels au pied de « Mes décisions ». */
.alertes-liste { display: grid; gap: var(--s3); }
.alerte-ligne { display: grid; gap: 4px; min-width: 0; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-left: 6px solid #e08a00; border-radius: 14px; background: var(--surface); color: var(--ink); overflow-wrap: anywhere; }
.alerte-ligne small { color: var(--muted); font-size: 14px; white-space: pre-line; }
/* Nuit des agents du 19/11, gestes du lot CD : 24 px entre « Ouvrir » et « Vu, rien à faire » (un toucher de travers rangeait l'alerte) */
.alerte-boutons { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 6px; }
.alerte-boutons .button { min-height: 44px; flex: 1 1 140px; }
.alerte-ligne [data-alerte-erreur] { margin: 0; }
.alerte-sur-fiche { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 0 0 var(--s3, 12px); padding: var(--s2, 8px) var(--s3, 12px); border: 1px solid var(--line); border-left: 6px solid #e08a00; border-radius: 12px; background: var(--surface); color: var(--ink); overflow-wrap: anywhere; }
.alerte-sur-fiche span { flex: 1 1 200px; font-weight: 600; }
.alerte-sur-fiche .button { min-height: 44px; }
.alerte-sur-fiche [data-alerte-erreur] { flex-basis: 100%; margin: 0; }
.decisions-temoin { margin: 0; font-size: 13px; color: var(--muted); }
/* V160 (§306) : « Argent en jeu » — quatre montants sous « Mes décisions », chacun ouvre sa liste triée par euros. */
.home-argent { display: grid; gap: var(--s3); margin: 0 0 var(--s5); min-width: 0; }
.home-argent h2 { margin: 0; font-size: var(--text-lg, 18px); color: var(--ink); }
.argent-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2, 8px); }
@media (min-width: 900px) { .argent-grille { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.argent-carte { display: grid; align-content: start; gap: 4px; min-height: 96px; padding: var(--s3); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; min-width: 0; overflow-wrap: anywhere; }
.argent-carte.argent-carte-retard { border-left: 6px solid #c62828; }
/* V251 point 4 (§454) : « Bilan du vrai inventaire », sous les quatre cartes, toute la largeur. */
.argent-bilan { display: grid; align-content: start; gap: 4px; min-height: 56px; padding: var(--s3); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; min-width: 0; overflow-wrap: anywhere; }
.argent-titre { font-size: 14px; font-weight: 700; color: var(--muted); }
.argent-montant { font-size: 22px; font-weight: 800; line-height: 1.15; }
.argent-sous, .argent-reste { font-size: 13px; color: var(--muted); }
.argent-carte-retard .argent-sous { color: #b71c1c; font-weight: 700; }
.argent-liste { display: grid; gap: var(--s2, 8px); }
.argent-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s3); padding: var(--s2, 8px) var(--s3); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.argent-ligne.argent-ligne-retard { border-left: 6px solid #c62828; }
.argent-ligne-texte { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.argent-ligne-texte small { color: var(--muted); font-size: 14px; }
.argent-ligne-montant { font-weight: 800; white-space: nowrap; }
.argent-ancien { margin: 0; font-weight: 700; color: #b71c1c; }
/* V161 (§307) : « Le lundi » — une page à part, plein écran au téléphone ; huit chiffres et leur flèche (vert : bon signe, rouge : mauvais). */
.lundi-dialog { width: min(960px, 100vw); max-width: 100vw; max-height: 100dvh; margin: auto; padding: var(--s4); border: 0; border-radius: 16px; background: var(--page, #e9eef2); color: var(--ink); box-sizing: border-box; }
@media (max-width: 720px) { .lundi-dialog { width: 100vw; height: 100dvh; border-radius: 0; padding: calc(var(--s3) + env(safe-area-inset-top, 0px)) var(--s3) calc(var(--s4) + env(safe-area-inset-bottom, 0px)); } }
.lundi-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.lundi-tete h2 { margin: 0; font-size: var(--text-xl, 22px); }
.lundi-tete .icon-button { min-width: 44px; min-height: 44px; }
.lundi-sous { margin: 6px 0 var(--s3); }
.lundi-partie { display: grid; gap: var(--s2, 8px); margin: 0 0 var(--s4); }
.lundi-partie h3 { margin: 0; font-size: var(--text-lg, 18px); }
.lundi-chiffres { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2, 8px); }
@media (min-width: 700px) { .lundi-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lundi-chiffre { display: grid; gap: 4px; padding: var(--s3); border: 1px solid var(--line); border-left: 6px solid var(--line-strong, #b9c6cf); border-radius: 14px; background: var(--surface); min-width: 0; overflow-wrap: anywhere; }
.lundi-chiffre.lundi-bon { border-left-color: #2e7d32; }
.lundi-chiffre.lundi-mauvais { border-left-color: #c62828; }
.lundi-titre { font-size: 14px; font-weight: 700; color: var(--muted); }
.lundi-valeur { font-size: 22px; font-weight: 800; line-height: 1.15; }
.lundi-chiffre small { font-size: 13px; color: var(--muted); }
.lundi-bon .lundi-tendance { color: #1b5e20; font-weight: 700; }
.lundi-mauvais .lundi-tendance { color: #b71c1c; font-weight: 700; }
.lundi-liste { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; overflow-wrap: anywhere; }
.lundi-note { font-size: 13px; }
/* V163 (§309) : « Le point du jour » — la même page à part que « Le lundi », des lignes « titre · ce qui s'est passé » ; un filet rouge quand il faut regarder. */
.point-liste { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s2, 8px); }
.point-ligne { display: grid; gap: 2px; padding: var(--s2, 8px) var(--s3); border: 1px solid var(--line); border-left: 6px solid var(--line-strong, #b9c6cf); border-radius: 12px; background: var(--surface); overflow-wrap: anywhere; }
.point-ligne.point-alerte { border-left-color: #c62828; }
.point-ligne strong { font-size: 14px; color: var(--muted); }
.decisions-temoin.decisions-temoin-alerte { color: #b71c1c; font-weight: 700; }
.quick-movement-actions.mouvements-direction { margin-top: var(--s4); }
/* V152 (lot D, maquette 2, §298) : « À répondre » du conducteur — la question, puis le bouton ; un seul rouge : le retard. */
.repondre-liste { display: grid; gap: var(--s2, 8px); }
.repondre-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-left: 6px solid #e08a00; border-radius: 14px; background: var(--surface); color: var(--ink); min-width: 0; }
.repondre-ligne.repondre-retard { border-left-color: #c62828; }
.repondre-texte { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.repondre-texte small { color: var(--muted, #4f6475); font-size: 14px; }
.repondre-boutons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2, 8px); min-width: 0; }
.repondre-boutons .button { min-height: 44px; }
.repondre-ligne [data-repondre-erreur] { grid-column: 1 / -1; margin: 0; }
.repondre-vide { margin: 0 0 var(--s4); color: var(--muted, #4f6475); }
@media (max-width: 720px) { .repondre-ligne { grid-template-columns: minmax(0, 1fr); } .repondre-boutons { justify-content: stretch; } .repondre-boutons .button { flex: 1 1 140px; } }
@media (max-width: 520px) { .decision-ligne { grid-template-columns: 1fr; } .decision-raison { white-space: normal; } }

/* V146 (revue design, lot A) */
/* A3 : « Nouvelle commande à suivre » et « Marquer commandé » restent dans leur panneau ; libellés au-dessus des champs, 44 px, 16 px */
.commande-form, .purchase-form { min-width: 0; display: grid; gap: 10px; }
:is(.commande-form, .purchase-form) > label { display: grid; gap: 4px; font-weight: 600; min-width: 0; }
:is(.commande-form, .purchase-form) :is(input:not([type="radio"]):not([type="checkbox"]), select, textarea) { width: 100%; max-width: 100%; box-sizing: border-box; min-height: 44px; font-size: 16px; }
/* A5 : jamais de champ sous 16 px au téléphone ni sur tablette — l'iPhone zoomait */
@media (max-width: 900px), (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]), select, textarea { font-size: max(16px, 1em); }
  /* V149 : la liste « À qui » de la fiche chantier restait à 14 px (`.site-form select`, theme.css, plus précis que `select`) */
  .site-form select, .site-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { font-size: max(16px, 1em); }
}
/* V149 : fiche chantier au doigt — retour, « Discussion » et onglets à 44 px (ils mesuraient 38 et 43 px) */
@media (pointer: coarse) {
  .site-back { width: 44px; height: 44px; font: inherit; }
  .site-thread { min-height: 44px; border-radius: 22px; }
  .site-tabs button { min-height: 44px; }
}
/* A6 : « Faire une remarque » et les boutons du compte, 44 px */
.account-button { min-height: 44px; }
/* A7 : les étiquettes des emplacements ne chevauchent plus les filtres des étiquettes QR */
.empl-etiquettes { margin: 0 0 16px; padding: 4px 14px; border: 1px solid var(--line, #dfe5ea); border-radius: 12px; }
.empl-etiquettes > summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.empl-etiquettes > :not(summary) { margin: 0 0 12px; }
.empl-etiquettes .empl-choix { display: grid; gap: 4px; max-width: 420px; }
.empl-etiquettes select { min-height: 44px; font-size: 16px; }

/* ================================================================ V147 (C2) : le style « planning »
   Décidé par Eduardo le 17/11/2026, d'après le planning de chantier qu'il a partagé : blanc, aéré, filets fins, pastels, interrupteurs
   en pilule, police étroite pour les titres. Ce qui ne bouge pas : 44 px au doigt, contrastes, champs à 16 px (lot A). */
:root { --page: var(--p-blanc); --font: var(--police); --card-shadow: none; --e1: none; --e2: 0 1px 0 rgba(14, 36, 54, .06); }
body { font-family: var(--police); }
/* V288 : les champs prennent la police de la page (le navigateur leur donne la sienne). La famille SEULE : le raccourci « font »
   remettrait aussi la taille et ramènerait les champs sous 16 px (l’iPhone zoomerait, §291). */
input, select, textarea { font-family: inherit; }
:is(h1, h2, h3, h4, .page-title, #page-title, .metric-value, .kpi strong, .count, .section-heading h2) { font-family: var(--police-titre); letter-spacing: 0; }
.button, .status, .chip, .filter, .qr-filter, .nav-item { font-family: var(--police-titre); letter-spacing: .01em; }
/* Les cartes : un filet fin, plus d'ombre. */
:is(.return-card, .cal-card, .cal-day, .news-feed, .kpi, .kpi-card, .clothing-card, .purchase-card, .site-row, .stock-card, .tour-card, .quick-access-item, .button.quick-movement-button, .metric.is-clickable) { box-shadow: none; border-color: var(--line); }
/* Le bandeau de l'accueil réduit à une ligne : le titre et la date ; le reste de l'écran pour le travail. */
.depot-hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; background: none; color: var(--ink); border-radius: 0; padding: 4px 0 12px; margin-bottom: 16px; box-shadow: none; border-bottom: 1px solid var(--line); }
.depot-hero::after, .depot-hero .hero-art, .depot-hero .hero-sub, .depot-hero .eyebrow::after { display: none; }
.depot-hero .hero-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; max-width: none; }
.depot-hero .eyebrow { color: var(--muted); letter-spacing: .12em; font-size: 12px; order: 2; }
.content .depot-hero h2 { color: var(--ink); font-family: var(--police-titre); text-transform: none; letter-spacing: 0; font-size: 26px; font-weight: 700; margin: 0; }
.depot-hero .date-chip { background: transparent; color: var(--ink-2); border: 1px solid var(--line-strong); padding: 4px 12px; font-size: 14px; font-weight: 600; }
/* Filtres et choix : des pilules ; le choix actif, fond clair et coche (« ✓ »), comme les interrupteurs du planning. */
:is(.chip, .filter, .qr-filter) { border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-weight: 600; }
:is(.chip, .filter, .qr-filter):is(.active, [aria-pressed="true"]) { background: var(--soft); border-color: var(--ink-2); color: var(--ink); }
:is(.chip, .filter, .qr-filter):is(.active, [aria-pressed="true"])::before { content: "✓"; margin-right: 6px; font-weight: 700; }
/* Les pastilles d'état : pastel, arrondies, police étroite. */
.status { border-radius: 999px; font-weight: 600; }
/* (v0.287.0) Le fond sombre posé ici en C2 laissait les titres marine sur fond sombre (1,07:1) : retiré, l'accueil revient à son rendu d'avant en mode sombre. */
/* La police étroite rend un mot court plus étroit : un lien d'un seul mot (« Gant ») garde 44 px de large au doigt. */
@media (max-width: 900px), (pointer: coarse) { .item-link { display: inline-block; min-width: 44px; } }
/* V148 : « Toutes / Urgentes / En retard », trois boutons avec leur nombre ; la liste n'apparaît qu'au toucher. */
#dashboard-view [data-filter] { gap: 8px; }
.filter-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--soft); color: var(--ink); font: 700 13px/1 var(--police-titre); box-sizing: border-box; }
#dashboard-view [data-filter].active .filter-count { background: var(--ink); color: var(--surface); }
#operations-card[hidden] { display: none !important; }

/* v0.288.0 (critique du chef de dépôt) — Tournées.
   ↑ ↓ et la croix du menu « Plus » : 44 px là où l'on touche (§291), 8 px entre les deux flèches. */
@media (max-width: 900px), (pointer: coarse) {
  .tour-move-arrows .icon-button { min-width: 44px; min-height: 44px; }
  .tour-move-arrows .icon-button + .icon-button { margin-inline-start: 8px; }
  .more-head .icon-button { min-width: 44px; min-height: 44px; }
}
/* L'immatriculation ne se coupe pas (classe propre : une description de dégât, texte libre, doit pouvoir passer à la ligne). */
.tour-immat { white-space: nowrap; }
/* Journée du chauffeur : la place se compte parmi les chantiers ; le passage chez un fournisseur n'a pas de numéro. */
.tour-driver-supplier { list-style: none; }
/* Un refus en tête de Tournées : en rouge, sur plusieurs lignes (une pastille .status ne passe pas à la ligne). */
#tournees-content .status.tour-message { display: block; white-space: normal; border-radius: var(--r-sm); padding: var(--s2) var(--s3); }
/* À l'ordinateur, les listes et la date de Tournées ont la police et l'arrondi de l'application (au doigt, la règle des 44 px vaut déjà). */
@media (min-width: 901px) and (pointer: fine) {
  :where(#tournees-view select, #tournees-view input[type="date"]) { font: inherit; font-size: 16px; border-radius: 10px; min-height: 36px; }
}
/* V150 : le QR de la fiche est un bouton (il imprime l'étiquette) ; « Imprimer l'étiquette » dessous. */
.item-sheet-qr-bouton { display: grid; place-items: center; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; }
.item-sheet-qr-bouton:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; }
.item-sheet-qr-imprimer { width: 100%; min-height: 44px; font-size: 14px; padding-inline: 8px; }

/* V153 (lot D, maquette 3, §301) : Tournées en trois onglets (pilules) et le planning du jour — une ligne par chauffeur, ses arrêts en
   pastilles pastel dans l'ordre (style « planning », §293). 44 px au doigt ; au téléphone, les pastilles passent à la ligne. */
.tour-onglets { display: flex; flex-wrap: wrap; gap: var(--s2, 8px); margin: var(--s3, 12px) 0; }
.tour-onglet { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.tour-onglet[aria-selected="true"] { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--p-blanc); }
.tour-onglet .count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fdf0d2; color: #5c3b00; font-size: 13px; font-weight: 800; display: inline-grid; place-items: center; }
.tour-onglet-alerte { color: #a14400; }
.tour-onglet[aria-selected="true"] .tour-onglet-alerte { color: inherit; }
.tour-planning { display: grid; gap: 0; margin: 0 0 var(--s4, 16px); padding: var(--s3, 12px) var(--s4, 16px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0; }
.tour-planning h3 { margin: 0 0 var(--s2, 8px); font-size: 16px; }
.tour-planning-ligne { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); align-items: center; gap: var(--s3, 12px); padding: var(--s2, 8px) 0; border-top: 1px solid var(--line); min-width: 0; }
.tour-planning-qui { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.tour-planning-qui small { color: var(--muted, #4f6475); font-size: 13px; }
.tour-planning-arrets { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.tour-planning-arrets li { min-width: 0; max-width: 100%; }
.tour-pastille { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 100%; padding: 4px 12px 4px 6px; border: 2px solid transparent; border-radius: 999px; background: #e3eefc; color: #12385f; font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.tour-pastille-rang { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #ffffff; color: inherit; font-size: 12px; font-weight: 800; }
.tour-pastille-nom { min-width: 0; overflow-wrap: anywhere; }
.tour-pastille.enlevement { background: #fbefd5; color: #5c3b00; }
.tour-pastille.retour { background: #e2f3e8; color: #1b4d2b; }
.tour-pastille.fait { background: #eef1f4; color: #3f4b57; }
.tour-pastille.probleme { background: #fbe4e1; color: #8e241d; }
.tour-pastille.premier { border-color: #c62828; }
.tour-pastille-premier { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #a3221b; }
.tour-pastille-etat { flex: none; font-weight: 800; }
.tour-planning-ligne.arbitrer .tour-planning-qui strong { color: #a3221b; }
.tour-stop-vise { outline: 3px solid var(--accent-deep); outline-offset: 2px; border-radius: 10px; }
.tour-plan-repli > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-weight: 700; color: var(--accent-deep); }
@media (max-width: 720px) { .tour-planning-ligne { grid-template-columns: minmax(0, 1fr); gap: var(--s2, 8px); } }

/* V156 (§302) : « Entrée » — « Quel article entre ? » : le nouveau produit en grand, la recherche, la liste ; 44 px au doigt. */
.entree-choix .entree-nouveau { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; text-align: left; }
.entree-choix .entree-nouveau span { display: grid; gap: 2px; min-width: 0; }
.entree-choix .entree-nouveau small { font-weight: 500; }
.entree-recherche { display: grid; gap: 6px; margin-top: var(--s4, 16px); font-weight: 700; color: var(--ink); }
.entree-recherche input { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; font-weight: 400; }
.entree-liste { display: grid; gap: 6px; margin: var(--s3, 12px) 0; max-height: 46vh; overflow-y: auto; }
/* §314 (retour d'Eduardo du 18/11) : toute la liste, rangée par famille. Les familles en pilules au doigt (44 px), le titre de la famille reste en haut pendant qu'on fait défiler. */
.entree-familles { margin-top: var(--s3, 12px); }
.entree-familles .chip { min-height: 44px; font-size: 14px; }
.entree-famille-titre { position: sticky; top: 0; z-index: 1; margin: 6px 0 0; padding: 6px 4px; background: var(--surface, #fff); color: var(--navy); font-size: 14px; font-weight: 700; }
.entree-famille-titre:first-child { margin-top: 0; }
.entree-produit { display: grid; gap: 2px; min-height: 52px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; min-width: 0; }
.entree-produit small { color: var(--muted, #4f6475); }
/* §314 : la photo du produit (ou l'icône de sa famille) à gauche de chaque ligne, 48 px. */
.entree-produit { grid-template-columns: 48px minmax(0, 1fr); column-gap: 12px; align-items: center; }
.entree-produit-texte { display: grid; gap: 2px; min-width: 0; }
.entree-vignette { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--p-fond-pale, #f5f8fa); }
span.entree-vignette { overflow: hidden; }

/* ---- Revue design du magasinier (19/11/2026) ---- */
/* 2. Tablette et petit ordinateur : quatre tuiles de 113 px ne laissent aucune place au mot (la flèche passait dessus) ; un sous-titre reste coupé jusqu'à 1263 px. Deux par ligne sous 1280 px. */
@media (min-width: 701px) and (max-width: 1279px) { .quick-movement-actions > div { grid-template-columns: repeat(2, minmax(0, 1fr)); } .quick-movement-button .qm-text small { white-space: normal; } }
/* 6. Demandes : « Refuser » à l'écart de « Valider ». */
.request-actions .request-refuser { margin-left: auto; }
/* 7. « Quel article entre ? » au téléphone : un seul défilement (la liste), les familles sur une ligne, les boutons du bas hors de la liste. */
@media (max-width: 700px) {
  .entree-choix .qr-scanner-panel { display: flex; flex-direction: column; height: calc(100dvh - 16px); overflow: hidden; }
  .entree-choix .qr-scanner-panel > * { flex: none; }
  .entree-choix .entree-liste { flex: 1 1 0; min-height: 0; max-height: none; margin-bottom: 0; grid-auto-rows: max-content; }  /* max-content : une ligne garde sa hauteur, même dans une liste à hauteur fixe */
  .entree-choix .dialog-actions { position: static; }
  .entree-choix .entree-familles { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .entree-choix .entree-familles .chip { flex: none; }
}
/* 8. Le compteur du contrôle d'un retour : le même dessin que les autres champs (filet fin, coins arrondis) ; ceux de l'inventaire : plus bas, revue du chef de dépôt. */
.controle-compteur input { padding: 10px var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-sm); background-color: var(--surface); color: var(--ink); }
/* 8. « Réclamation / remboursement » : sur deux colonnes, le mot n'est plus coupé (« remboursem-ent »). */
.choix-tuile[data-choix-valeur="Réclamation / remboursement"] { grid-column: span 2; }

/* ---- Revue design du chef de dépôt (19/11/2026) : écran Tournées, tâches, inventaire ---- */
/* ---- Défaut 1 (avec correctif-js.patch) : le champ en cause d'un refus reste marqué en rouge, même quand on en sort. */
#tournees-content [aria-invalid="true"] { border-color: var(--red, #b3261e); box-shadow: 0 0 0 2px var(--red-soft, #fdeae8); }

/* ---- Défaut 2 : « Je ne peux pas », « Retirer ma demande » (vocal.js) dans une tâche — la question au-dessus du champ.
   « .site-task label { display: flex } » et « .site-task span { flex: 1 1 0 ; min-width: 0 } » (theme.css) sont écrites pour la
   case à cocher d'une tâche ; elles écrasaient la question à 0 px de large, le champ posé dessus. */
.site-task .voix-motif-label { display: grid; gap: 4px; align-items: stretch; }
.site-task .voix-motif-label > span { display: block; flex: none; min-width: 0; }

/* ---- Défaut 5 : Tournées — les rangées de commandes d'une livraison à répartir et d'un arrêt ne se touchent plus (0 px mesuré
   entre la liste « Chauffeur », « Ajouter à sa tournée » et « Reporter / Annuler » ; 0 px entre « Charger » et « Discussion »). */
.tour-request > .tour-row, .tour-request > .tour-driver-day, .tour-request > .tour-create,
.tour-stops > li > .tour-row, .tour-stops > li > .thread-button { margin-top: var(--s2, 8px); }
/* Le libellé au-dessus de sa liste, comme dans « Modifier la tournée » ; à l'ordinateur, la liste ne s'étire pas sur toute la carte. */
.tour-request .tour-row > label, .tour-driver-day > label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; max-width: min(100%, 26rem); }
/* Les listes et les champs de Tournées et d'Inventaire qui gardaient le cadre du navigateur (1 px gris foncé à angles droits, ou
   « inset ») prennent celui de l'éditeur de tournée (theme.css, « .tour-editor input »). */
:is(.tour-request, .tour-driver-day, .tour-create, .repartition, .tour-vehicule-titulaire) :is(select, input:not([type="checkbox"]):not([type="radio"]):not([type="file"])),
:is(.inv-ouvrir, .inv-outils, .inv-saisie) :is(select, input:not([type="checkbox"]):not([type="radio"]):not([type="file"])) {
  min-height: 44px; padding: 8px 10px; border: 1px solid var(--line-strong, #b9c6cf); border-radius: 10px;
  background-color: var(--surface, #fff); color: var(--ink, #14202b); font: inherit; font-size: 16px; box-sizing: border-box; max-width: 100%;
}

/* ---- Défaut 6 : « Modifier la tournée » / « Nouvelle tournée » — « Annuler · Enregistrer la tournée » restent en vue pendant
   qu'on défile (pour quatre arrêts, le formulaire fait 4 013 px à 390 px : cinq écrans avant d'atteindre « Enregistrer »). */
#tour-editor > .tour-row:last-child {
  position: sticky; bottom: 0; z-index: 2; margin: 0 -14px -14px; padding: 10px 14px;
  background: var(--surface, #fff); border-top: 1px solid var(--line, #d3dbdf); border-radius: 0 0 16px 16px;
}
/* Au téléphone, au-dessus de la barre du bas (82 px + encoche). */
@media (max-width: 700px) { #tour-editor > .tour-row:last-child { bottom: calc(82px + env(safe-area-inset-bottom, 0px)); } }

/* ---- Défaut 8 : finitions de Tournées et du Planning. */
/* Une flèche ↑ ↓ (ou tout bouton rond) désactivée se voit : elle avait la même teinte qu'une flèche active. */
.icon-button:disabled { opacity: .35; cursor: not-allowed; }
/* À 390 px, les trois onglets tiennent sur une ligne, même avec leurs compteurs (« Véhicules » passait seul dessous). */
@media (max-width: 480px) {
  .tour-onglets { flex-wrap: nowrap; gap: 6px; }
  .tour-onglet { flex: 1 1 auto; justify-content: center; min-width: 0; padding: 0 8px; white-space: nowrap; }
}
/* La pastille d'état ne flotte plus au milieu de la ligne (trois éléments écartés par « space-between » la posaient à un endroit
   différent selon la longueur du nom) : le nom prend la place, la pastille et les flèches se rangent à droite. */
.tour-card > header, .tour-stop-head { justify-content: flex-start; }
.tour-card > header > div:first-child, .tour-stop-head > strong { flex: 1 1 14rem; min-width: 0; }
.tour-stop-head > .tour-move-arrows { margin-left: auto; }
/* Véhicules : un filet entre deux véhicules (leurs commandes se suivaient sans séparation). */
.tour-vehicules li + li { padding-top: var(--s3, 12px); border-top: 1px solid var(--line, #d3dbdf); }
/* Menu de gauche sur tablette (701 à 900 px) : 12 px était la taille de la barre du bas du téléphone. */
@media (min-width: 701px) and (max-width: 900px) { .sidebar .nav-item { font-size: 15px !important; } }
/* Planning, « Photos produits à compléter » : ces boutons gardaient la police du navigateur (Arial 13 px). */
.planning-photo-item { font: inherit; }
/* Deux cibles que la mesure n'avait pas vues, parce qu'elles ne sont à l'écran qu'une fenêtre ou un formulaire ouvert :
   la croix qui ferme une fenêtre (40 × 44 px au doigt) et la ligne à cocher du chargement (40 px de haut). */
@media (max-width: 900px), (pointer: coarse) { .dialog-head .icon-button { min-width: 44px; min-height: 44px; } }
.tour-load-line label { min-height: 44px; }
/* ================================================================ Revue design « conducteur de travaux » (19/11/2026)
   À ajouter à la fin de LFC-AUTOMAT/dist/design-system.css (chargée en dernier, par index.html seulement). Aucune règle métier ne change.
   Les numéros sont ceux du rapport. Chaque bloc a été posé sur une copie de l'application et mesuré au banc d'essai
   (390, 820 et 1 280 px ; écran simulé, pas un vrai iPhone). */

/* 1. Fiche chantier : un panneau ne dépasse plus de l'écran quand un champ est plus large que lui. La liste « À qui ? » de l'onglet
      Tâches prend la largeur de sa plus longue option (« Nom · Profil », 406 px mesurés) : la colonne de la grille la suivait. */
.site-panel { grid-template-columns: minmax(0, 1fr); }
.site-form select { max-width: 100%; }
.site-docs > .muted { grid-column: 1 / -1; }  /* « Aucun document… » sur toute la largeur, plus dans une demi-colonne */

/* 2. « Il me faut… » : « Envoyer au dépôt » reste à l'écran quand les propositions d'articles s'ajoutent sous le texte
      (dans une grille, un élément collant ne sort pas de sa case : le formulaire passe en colonne). */
.besoin-form { display: flex; flex-direction: column; }
.besoin-form > button[type="submit"] { position: sticky; bottom: calc(var(--s2) + env(safe-area-inset-bottom, 0px)); z-index: 1; box-shadow: 0 0 0 var(--s3) var(--surface), 0 calc(var(--s3) * 2) 0 var(--s3) var(--surface); }

/* 3. Deux réponses contraires ne sont plus à 8 px l'une de l'autre (« Oui » / « Ce n'est pas pour moi », « Il me faut… » / « Rien »). */
.repondre-boutons, .besoins-section .tache-actions { gap: var(--s4); }

/* 4. Fiche chantier, « Accès et livraison » : l'étiquette au-dessus de son champ, tous les champs de la même largeur ; les consignes
      au doigt (44 px, 8 px entre deux), la case contre son libellé (`.site-form input` l'étirait à 160 px). */
.site-acces-edit form > label { display: grid; gap: 6px; font-weight: 600; min-width: 0; }
.site-acces-edit form > label > input { flex: none; width: 100%; box-sizing: border-box; min-height: 48px; }
.site-pictos { gap: var(--s2); min-width: 0; }
.site-pictos label { min-height: 44px; }
.site-pictos input[type="checkbox"] { flex: none; width: 24px; height: 24px; margin: 0; padding: 0; accent-color: var(--navy); }

/* 5. Livraisons : un choix déjà fait a l'air d'un choix — fond clair et coche, comme les filtres (V147) — et non du bouton à toucher ;
      « Annuler » retrouve le rouge que theme.css lui donne (`.button.secondary`, de même précision et chargée après, l'effaçait). */
.delivery-card :is([data-mine-place][aria-pressed="true"], [data-mine-priority].primary) { background: var(--soft); color: var(--ink); border-color: var(--ink-2); box-shadow: none; }
.delivery-card :is([data-mine-place][aria-pressed="true"], [data-mine-priority].primary)::before { content: "✓"; margin-right: 6px; font-weight: 700; }
.delivery-card .button[data-mine-cancel] { color: var(--red); border-color: var(--red); }

/* 6. Onglets de la fiche : une ombre du côté où il reste des onglets (elle s'efface quand on arrive au bout). */
.site-tabs { background:
    linear-gradient(90deg, var(--p-blanc) 40%, rgba(255, 255, 255, 0)) left / 44px 100% no-repeat local,
    linear-gradient(270deg, var(--p-blanc) 40%, rgba(255, 255, 255, 0)) right / 44px 100% no-repeat local,
    linear-gradient(90deg, rgba(23, 51, 79, .3), rgba(23, 51, 79, 0)) left / 16px 100% no-repeat scroll,
    linear-gradient(270deg, rgba(23, 51, 79, .3), rgba(23, 51, 79, 0)) right / 16px 100% no-repeat scroll,
    var(--p-blanc); }

/* 7. Fiche chantier, Équipe : le téléphone et l'e-mail se touchent au doigt (18 px de haut, collés, avant). */
.site-person a { display: flex; align-items: center; min-height: 44px; font-size: var(--text-base); }
.site-person a[href^="tel:"] { font-weight: 700; }

/* 8. Les champs restés au style du navigateur (bord gris en creux, coins carrés) prennent celui de l'application ;
      la croix des fenêtres « équipe » (Je suis passé, Discussion) et les croix « Retirer » (Équipe, ligne d'un retour) passent de 40 à 44 px au doigt. */
.delivery-card .tour-create :is(input:not([type="checkbox"]):not([type="radio"]), select), .visite-dialog .visite-label input, .besoin-form textarea {
  padding: 10px var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-weight: 400; }
@media (max-width: 900px), (pointer: coarse) {
  .team-close { width: 44px; height: 44px; }
  .site-person .icon-button, .return-row .icon-button { min-width: 44px; min-height: 44px; }
  .return-row { grid-template-columns: minmax(0, 1fr) 90px 44px; }  /* la colonne de la croix faisait 36 px : la croix dépassait du formulaire */
}

/* ================================================================ Revue design de la direction (19/11/2026) — nuit des agents du 19/11, lot DD
   Constats D-53 à D-57 et D-59 à D-61 du registre de la nuit (numéros de bloc : ceux du rapport de l'agent « direction »).
   Mesuré au banc d'essai à 390, 820 et 1 280 px, en apparence claire et sombre (écran simulé, pas un vrai iPhone). Aucune règle métier ne change.
   Pas ici : les barres des Indicateurs (bloc 6 ; D-58 = D-06 et D-23, corrigé par un autre lot) ni les tuiles en pastel (bloc 8 bis, §201 : à décider). */

/* D-53 (bloc 1) — apparence sombre : le dépôt et le bureau restent clairs (§295). Les règles « sombre » qui ne changeaient que la couleur du
   texte (raison du rang, témoin en alarme, retards d'« Argent en jeu », tendances du lundi, « vu / pas vu ») sont retirées plus haut : sur la
   page restée blanche, elles tombaient à 1,4–1,6:1. Même défaut, hors liste : « Ajouter une photo » de « Modifier la fiche » (1,2:1), retiré
   aussi. Reste « .team-empty », pâli par equipe.css pour le fond sombre de « Famille LFC » et de la discussion, mais posé aussi sur le fond
   blanc de « Messages » (2,2:1). */
@media (prefers-color-scheme: dark) { .team-empty { color: var(--p-gris-texte-2); } .team-dialog .team-empty { color: var(--p-9db0c0); } }
/* Nuit des agents du 19/11/2026 (lot F, point 5, suite de D-53) — apparence sombre : le dépôt reste clair (§295.2). equipe.css, partagé avec
   le livreur et le collaborateur (qui gardent leur sombre), assombrissait les cartes de « Messages » sur la page restée blanche : elles
   gardent ici leurs couleurs claires (design-system.css n'est chargé que par le dépôt). « Rien n'attend votre décision » et
   « … indisponible » de « Mes décisions » n'ont plus de règle sombre. La discussion et « Famille LFC », fenêtres entières, restent sombres. */
@media (prefers-color-scheme: dark) {
  .conversation { background: var(--p-blanc); border-color: var(--p-bordure); color: var(--p-marine-texte); }
  .conversation:hover, .conv-icone { background: var(--p-bleu-pale); }
  .conversation.non-lue { border-color: var(--p-acier-fonce); box-shadow: 0 0 0 1px var(--p-acier-fonce) inset; }
  .conv-texte small, .conv-cote { color: var(--p-gris-texte-2); }
  .conversation.non-lue .conv-texte strong, .conversation.non-lue .conv-texte small { color: var(--p-marine-texte); }
  .conv-genre, .conv-compte { background: #dbe9f6; color: var(--p-marine-texte); }
  .conv-remarque .conv-genre { background: #fde8c8; color: #6b3d00; }
  .conv-suite, .conv-ranger { color: var(--p-acier-fonce); }
  .conv-filtre { background: var(--p-blanc); border-color: #b9cde0; color: var(--p-marine-texte); }
  .conv-filtre.active { background: var(--p-acier-fonce); border-color: var(--p-acier-fonce); color: var(--p-blanc); }
}

/* D-54 (bloc 2) — « Mon compte » : le code provisoire (« affiché une seule fois ») et le message d'erreur s'écrivent au-dessus de la liste
   des comptes, alors que le geste se fait 1 500 px plus bas : ils restent en vue pendant qu'on parcourt la liste, jusqu'à
   « J'ai noté le code » (auth-ui.js). */
#accounts-section > #account-secret,
#accounts-section > #accounts-error { position: sticky; top: var(--s2); z-index: 3; box-shadow: var(--e2); }
#account-secret [data-secret-note] { margin-top: var(--s2); }

/* D-55 (bloc 3) — « Mon compte » au téléphone : deux règles générales du téléphone débordaient sur cette fenêtre.
   a) Plus aucun pied de boutons collé en bas : « Se déconnecter » flottait sur toute la liste, recouvrait « Peut déroger » et déconnectait
      sans confirmation sous le pouce ; il est rangé avec ce qui est à soi, avant « Comptes de l'application » (index.html). */
@media (max-width: 700px) {
  .account-panel .dialog-actions { position: static; margin: var(--s4) 0 0; padding: 0; border-top: 0; }
}
.account-panel > .dialog-actions { margin-bottom: 22px; }
/* b) « Créer plusieurs comptes » : chaque valeur sous son vrai nom. Les intitulés « Chantier / Créneau / Responsable / Affecté à » de
      mobile.css ne valent plus que pour le tableau des opérations ; ici, le code provisoire était rangé sous « Responsable ». */
@media (max-width: 700px) {
  .accounts-batch tr[data-lot-ligne] td:nth-child(1)::before { content: 'Ligne '; }
  .accounts-batch tr[data-lot-ligne] td:nth-child(2)::before { content: 'Identifiant'; }
  .accounts-batch tr[data-lot-ligne] td:nth-child(3)::before { content: 'Nom'; }
  .accounts-batch tr[data-lot-ligne] td:nth-child(4)::before { content: 'Profil'; }
  .accounts-batch tr[data-lot-ligne] td:nth-child(5)::before { content: 'Aperçu'; }
  .accounts-batch tr[data-lot-resultat] td:nth-child(1) { font-weight: 700; }
  .accounts-batch tr[data-lot-resultat] td:nth-child(2)::before { content: 'Identifiant'; }
  .accounts-batch tr[data-lot-resultat] td:nth-child(3)::before { content: 'Profil'; }
  .accounts-batch tr[data-lot-resultat] td:nth-child(4)::before { content: 'Code provisoire'; }
  .accounts-batch tr[data-lot-resultat] td:nth-child(5)::before { content: 'Résultat'; }
}
/* c) Les champs de ce bloc prennent la police et le filet des autres champs (ils restaient au style du navigateur) ; ses deux actions
      sont des boutons principaux (comptes-lot.js : « button » seul était gris, comme désactivé). */
.accounts-batch textarea, .accounts-batch input[data-lot-commun] {
  width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px var(--s3);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-family: inherit;
}
.accounts-batch input[type="file"] { font: inherit; min-height: 44px; }
.accounts-batch .lot-choix input { width: 22px; height: 22px; flex: none; }

/* D-56 (bloc 4) — Demandes : la demande touchée dans « Mes décisions » se voit (anneau à 7:1 au lieu de 1,9:1 ; la mise en avant tient
   désormais d'un dessin de la liste à l'autre : decisions.js, tacheMarkup d'app.js), et la réponse attendue se distingue des autres boutons. */
.commande-visee { border-color: var(--accent-deep) !important; box-shadow: 0 0 0 3px var(--accent-deep); }
.tache-actions .button:is([data-tache-action="faite"], [data-tache-action="valider"], [data-tache-action="repondre"]) {
  background: var(--navy); border-color: var(--navy); color: var(--p-blanc);
}

/* D-57 (bloc 5) — réclamation : les deux champs de la décision étaient à 13 px ; sous 16 px, Safari sur iPhone zoome à la saisie
   et ne revient pas. */
.claim-decision select, .claim-decision textarea { font-size: max(16px, 1em); min-height: 44px; }
/* C-13 : le montant pris en charge, comme les autres champs de la décision (16 px : pas de zoom sur iPhone) */
.claim-decision input[name="decisionMontant"] { font: inherit; font-weight: 400; font-size: max(16px, 1em); min-height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }

/* D-59 (bloc 7) — cloche : le texte d'un message à la taille du reste (16 et 14 px au lieu de 14 et 12) ; ce qu'un autre dirigeant a déjà
   fait se lit d'abord, en pastille verte (5,8:1) en tête de sa carte, la carte en retrait. §310 tenu : la marque garde sa ligne, le filet
   reste vert. */
.notif-item strong { font-size: var(--text-base); }
.notif-item small { font-size: 14px; }
.notif-deja { background: var(--soft); }
.notif-deja strong { font-weight: 600; color: var(--ink-2); }
.notif-item .notif-marque {
  order: -1; justify-self: start; padding: 2px 10px; border-radius: var(--r-full);
  background: var(--green-soft); color: var(--green); font-size: 13px; font-weight: 700;
}

/* V185 (§359) — troisième ligne de chaque ligne de la cloche : le verbe de ce que le toucher fait, en petites capitales, suivi d'une
   flèche décorative. Bleu marine sur blanc comme le titre ; le texte passe à la ligne plutôt que de sortir de la carte. */
.notif-item .notif-verbe { margin-top: 6px; color: var(--navy); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; overflow-wrap: anywhere; }

/* D-60 (bloc 8) — accueil de la direction au téléphone : des lignes de décision moins hautes (56 px au moins), pour une décision entière
   de plus dans le premier écran ; « Voir la dernière » au lieu de « Voir les 1 autres » (decisions.js, a-repondre.js). */
@media (max-width: 520px) {
  .decision-ligne { gap: 2px; padding-block: 10px; }
  .decision-texte strong { line-height: 1.3; }
}

/* D-61 — à l'ordinateur. « Le point du jour » en trois colonnes : « Trois choses pour vous » finissait à 899 px pour un écran de 800. */
@media (min-width: 900px) { .point-dialog .point-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* « Comptes » : un compte par rangée. Dans la fenêtre de 680 px, « Désactiver » passait sous le nom : 138 à 206 px par compte, et la liste
   d'une douzaine de comptes faisait près de 2 000 px. (La croix de « Mon compte » fait déjà 44 px au doigt : « .dialog-head .icon-button »
   de la revue du conducteur, plus haut.) */
@media (min-width: 1000px) {
  .account-dialog { width: min(920px, calc(100% - 30px)); }
  .account-row { display: flex; flex-wrap: wrap; }
  .account-row .account-who { flex: 1 1 220px; }
  .account-row :is(.account-droit, .account-remplacant, .account-remplacant-note) { flex: 1 0 100%; }
}

/* ================================================================ Revue design du bureau (19/11/2026) — nuit des agents du 19/11, lot DB
   Écrans de l'acheteuse et de la comptabilité (constats D-01 à D-08, D-18 à D-25), mesurés à 390, 820 et 1 280 px par les agents design
   « acheteur » et « comptable ». Posées ici, à la fin de la feuille chargée en dernier : là où elles ont été essayées. Aucune règle métier
   ne change. La règle de l'accueil « hors dépôt » (D-19) est corrigée à sa place, plus haut. Écran simulé : pas un vrai iPhone. */

/* D-01 — « Commandes à suivre » : la liste « Le bon chantier » d'une commande à corriger prenait la largeur de son plus long nom (545 px
   de contenu dans un panneau de 420 ; « Corriger le chantier », « Annuler… » coupés). Les champs suivent leur colonne ; un panneau ne
   s'élargit plus pour un contenu. */
.commande-champ { min-width: 0; }
.commande-champ select, .commande-champ input { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.side-panel-body { grid-template-columns: minmax(0, 1fr); }

/* D-02 — Prix à renseigner : le champ à 44 px, les chiffres à droite. De 701 à 1 100 px, la barre latérale ne laisse que 448 px à la ligne
   (le nom tombait à un mot par ligne, 24 à 75 px) : deux lignes, le nom et l'état, puis le prix et son bouton ; la liste défile avec la page. */
.price-row input { min-height: 44px; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) {
  .price-row { grid-template-columns: minmax(0, 1fr) auto; }
  .price-row .price-state { justify-self: end; align-self: start; }
  .price-list { max-height: none; overflow: visible; }
}
@media (max-width: 700px) {  /* téléphone : une chose par ligne, comme avant (la règle du dessus, plus loin dans la cascade, l'aurait défait) */
  .price-row { grid-template-columns: 1fr 1fr; }
  .price-main, .price-row input, .price-row .button { grid-column: 1 / -1; }
  .price-row .price-state { justify-self: start; }
}
/* Nuit des agents du 19/11, critique « bureau » (C-32, C-36) : la question d'un prix douteux porte son bouton « Oui, … » ; « Garder » et
   « Prendre » le prix Cogilog tiennent ensemble à la place du champ, sous le nom en dessous de 1 100 px. */
.price-row .auth-error .button, .item-sheet-prix .auth-error .button { margin: 6px 0 0 8px; }
.price-cogilog-choix { grid-column: 3 / -1; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 1100px) { .price-cogilog-choix { grid-column: 1 / -1; justify-content: flex-start; } }
/* C-32 d : « Corriger le prix » sur la fiche — le champ en 16 px (pas de zoom de l'iPhone), des boutons de 44 px, rien ne dépasse. */
.item-sheet-prix { display: grid; gap: 8px; margin: 8px 0 12px; }
.item-sheet-prix p { margin: 0; }
.item-sheet-prix label { display: grid; gap: 4px; font-weight: 600; }
.item-sheet-prix input { width: 100%; max-width: 100%; box-sizing: border-box; min-height: 44px; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; }
.item-sheet-prix-boutons { display: flex; flex-wrap: wrap; gap: 8px; }

/* D-03 — Achats : le travail d'abord. Sur cette page seulement, le bonjour de l'acheteuse devient une ligne discrète (un bandeau marine
   passait avant ses demandes) ; les imports et exports Cogilog ont leur bloc, après les prix (index.html). */
#purchases-profile.profile-home { margin: 0 0 12px; padding: 0; border-radius: 0; background: none; color: var(--muted); font-size: var(--text-sm); font-weight: 600; letter-spacing: .04em; }
.purchase-outils { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.purchase-outils h3 { margin: 0 0 12px; font-size: var(--text-lg); color: var(--navy); }
.purchase-outils-boutons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
@media (max-width: 700px) { .purchase-outils-boutons .button { width: 100%; } }
/* En consultation seule, les imports restent inertes, comme dans l'en-tête qu'ils quittent (metric-click.css, « .page-heading .button »). */
.consultation-only .purchase-outils-boutons .button { pointer-events: none; opacity: .45; }

/* D-04 — Cartes d'achat : à l'ordinateur, « Marquer commandé » occupait seul une ligne (142 px par carte) ; au téléphone, le texte n'avait
   que 149 px (le nom sur 3 à 6 lignes). Le texte prend la largeur, le bouton se range à côté de l'état ; quantité et fournisseur en 14 px. */
.purchase-body { flex: 1 1 min(300px, calc(100% - 68px)); }  /* 68 px : la vignette (56) et son écart (12) */
.purchase-body strong { font-size: 16px; }
.purchase-body small { font-size: 14px; }
.purchase-actions { flex-basis: auto; margin-left: auto; }
@media (max-width: 700px) { .purchase-actions { flex: 1 1 auto; } }

/* D-06, D-23 — Des contrôles gardaient le dessin du navigateur (fond gris, bord noir en relief ou en creux, coins carrés, Arial 13 px) :
   la tuile « À commander » du Stock, les lignes cliquables des Indicateurs, les champs de « Commandes à suivre » et de « Marquer
   commandé », les cases « Livraison » de 13 px. Ils prennent celui de leurs voisins (tuiles du Stock, champs de « .form-grid »). */
.stock-summary > button { background: var(--p-blanc); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.stock-summary > button:hover { border-color: #9bb8cc; }
@media (max-width: 700px) { .stock-summary > button { padding: 10px 12px; } }
:is(.commande-form, .purchase-form, .commande-champ) :is(input:not([type="radio"]):not([type="checkbox"]), select, textarea) {
  padding: 10px var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-family: inherit;
}
:is(.commande-form, .purchase-form, .commande-champ) :is(input, select, textarea):focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.commande-lieu .check-line { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 600; }
.commande-lieu .check-line input { width: 22px; height: 22px; flex: none; margin: 0; }
/* Indicateurs : le nom du chantier se lit en entier (« ESSAI · Cha… » : Alpha et Bravo s'écrivaient pareil) ; une ligne cliquable n'a plus
   le gris du navigateur, elle se teinte au survol. Au téléphone, le nom sur sa ligne, la barre et le montant dessous (comme « Ce que les
   retours ont coûté », dont la règle propre est plus précise et ne change pas). */
.bar-row.is-clickable { background: none; border: 0; border-radius: 8px; color: inherit; padding: 6px 8px; margin-inline: -8px; width: calc(100% + 16px); }
.bar-row.is-clickable:hover { background: var(--p-fond-pale, #f4f7f9); }
.bar-row { grid-template-columns: minmax(120px, 45%) 1fr auto; }
.bar-label { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.25; }
.bar-row strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 700px) {
  .bar-row { grid-template-columns: 1fr auto; grid-template-areas: "label label" "track value"; row-gap: 4px; }
  .bar-label { grid-area: label; }
  .bar-track { grid-area: track; }
  .bar-row strong { grid-area: value; }
}

/* D-07 — Demandes : une demande « matériel que nous n'avons pas », avec son lien, écrasait le texte (133 px sur une carte de 948) : ses
   lignes d'appoint (lien, réception, son du motif, discussion) passent sur toute la largeur de la carte, comme ses boutons. */
.request-row > small, .request-row > audio, .request-thread { grid-column: 1 / -1; }

/* D-08 — Aperçu d'un import : « Importer N produits » restait sous le panneau (bas du bouton à 1 319 px pour 800) ; il reste en vue.
   Étiquettes QR, à la souris : quatre filtres à 2 px l'un de l'autre (au doigt, 8 px depuis V146). */
.product-import .dialog-actions { position: sticky; bottom: 0; background: var(--surface); padding: var(--s3) 0 var(--s2); margin-top: var(--s3); border-top: 1px solid var(--line); }
.filter-group { gap: 8px; }

/* D-21 — À l'ordinateur et sur tablette, la barre latérale reste en place : elle partait avec la page (« Mon compte » à 2 764 px sur
   Chantiers ; plus aucun menu après 1 200 px de défilement). Elle défile seule si l'écran est bas. */
@media screen and (min-width: 701px) {
  .sidebar { position: sticky; top: 0; align-self: flex-start; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .28) transparent; }
}
/* Portable 1 280 × 800 : les quatorze menus tiennent sans défiler, à 44 px chacun. */
@media screen and (min-width: 701px) and (max-height: 900px) {
  .sidebar { padding-top: 14px; }
  .sidebar .brand { margin-bottom: 14px; }
  .sidebar nav { gap: 2px; }
  .sidebar .nav-item { padding-block: 9px; }
}
/* Au téléphone, la barre du bas a autant de colonnes que de boutons : celle de la comptabilité (trois onglets et « Plus ») laissait une
   case vide de 76 px à droite. Les barres de cinq boutons ne changent pas. */
@media (max-width: 700px) {
  .sidebar nav { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}

/* D-24 — Fiche chantier à l'ordinateur : 1 040 px au lieu de 720 (quatre onglets sur onze étaient cachés) ; dans « Tâches », la phrase
   prend toute la ligne (218 px pour l'écrire), l'échéance garde sa largeur. */
@media (min-width: 1100px) { .sheet-dialog { width: min(1040px, calc(100% - 30px)); } }
.site-task-form input[name="text"] { flex: 1 1 100%; }
.site-task-form input[name="due"] { flex: 0 1 190px; }

/* D-25 — Une tâche : « Demandée à … » et la suite sur une même ligne (« .site-task span { display: grid } » l'emportait sur
   « .tache-etat » : le « · » commençait une ligne) ; « en retard » se voit. Qui a quoi : « Retour prévu dépassé » à 6:1 (4,47:1). */
.site-task.tache small span { display: inline; }
.tache-retard { color: var(--p-rouge-texte); font-weight: 700; }
.who-flag { color: var(--p-7a5410); }
/* La réponse à un avancement : chaque champ porte son nom, visible (le texte gris dans le champ était coupé à 390 px). */
.avancement-champ { display: grid; gap: 4px; flex: 0 1 190px; font-size: 13px; font-weight: 700; color: var(--navy); }
.avancement-champ-large { flex: 1 1 220px; }
.avancement-champ select, .avancement-champ input { width: 100%; }
.avancement-action > .button { align-self: flex-end; }
@media (max-width: 700px) { .avancement-champ, .avancement-champ-large { flex: 1 1 100%; } }
/* V204 (recette sur un vrai iPhone, 24/11/2026) : un champ « date », « date et heure » ou « heure » est un champ comme les autres. Safari iOS ignore la largeur d'un champ
   à l'aspect natif : un champ « date » fait 382 pt dans un cadre de 362 (mesuré sur un iPhone 14 Pro Max, iOS 27.2) et dépasse de 20 pt dans « Demander une benne » et
   « Demander un retour au dépôt », où le bord le coupe ; « Date et heure » de « Nouvelle opération » et un champ « heure » font 374 pt dans un cadre de 352 (22 pt de trop).
   Sans l'aspect natif, ils obéissent à la largeur du cadre (0 pt de trop, mesuré, vides comme remplis) et s'habillent comme les champs texte. Sur téléphone seulement. */
@media (max-width: 700px) {
  input[type="date"], input[type="datetime-local"], input[type="time"] { -webkit-appearance: none; appearance: none; box-sizing: border-box; min-width: 0; max-width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line, #dce5eb); border-radius: 10px; background: var(--p-blanc, #fff); color: var(--p-encre, #1f2933); -webkit-text-fill-color: var(--p-encre, #1f2933); font: inherit; font-size: 16px; font-weight: 400; }
  input[type="date"]::-webkit-date-and-time-value, input[type="datetime-local"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; }
}

/* ---------------------------------------------------------------- V200 (§374) : la barre du bas, la même sur tous les téléphones
   Dépôt, conducteur, collaborateur et livreur : même hauteur (72 px, la zone de sécurité de l'iPhone en plus), même ombre au-dessus, des onglets d'au moins 56 px (44 px est le minimum),
   un libellé d'une seule ligne, l'onglet actif qui se voit (libellé en gras, icône remplie, couleur de l'application) et la pastille de nombre au même endroit. */
@media (max-width: 700px) {
  .sidebar { height: 72px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 255, 255, .84); -webkit-backdrop-filter: saturate(170%) blur(22px); backdrop-filter: saturate(170%) blur(22px); border-radius: 26px 26px 0 0; box-shadow: 0 -1px 0 rgba(15, 42, 71, .08), 0 -10px 30px rgba(15, 42, 71, .16); }
  .sidebar nav { gap: 4px; padding-bottom: 0; }
  .sidebar .nav-item { position: relative; min-height: 56px; padding: 6px 2px; gap: 3px; border-radius: 22px; font-size: 12px; font-weight: 600; line-height: 1.15; white-space: nowrap; color: #4d6073; }
  .sidebar .nav-item.active { background: var(--p-bleu-pale, #e7f1fa); color: var(--p-marine-texte, #17324d); box-shadow: none; font-weight: 800; }
  .sidebar .nav-item.active .nav-icon svg { fill: currentColor; fill-opacity: .22; }
  .sidebar .nav-item .nav-badge { position: absolute; top: 2px; right: 14%; margin: 0; min-width: 18px; height: 18px; padding: 0 5px; font-size: 12px; line-height: 18px; background: var(--p-rouge, #c0302b); color: #fff; box-shadow: 0 0 0 2px #fff; }
}
/* V207 lot A (§381, décisions d'Eduardo du 25/11/2026 : « iPhone d'abord », maquette validée) : la barre du bas est en verre (la page se devine derrière, onglet actif en pastille) ; « Plus » est dans l'en-tête ;
   le dépôt a « Scanner » au centre : un grand disque qui dépasse du haut de la barre. La barre garde son emprise (72 px, zone de sécurité en plus) : rien d'autre ne bouge. */
.nav-scan { display: none !important; }
.bell-button.menu-button { display: none; }
@media (max-width: 700px) {
  .sidebar #nav-more { display: none !important; }
  .bell-button.menu-button { display: grid; }
  .sidebar .nav-scan:not([hidden]) { display: grid !important; order: 2; align-content: end; justify-items: center; gap: 2px; padding: 0 0 4px; overflow: visible; background: none !important; box-shadow: none !important; color: var(--p-marine-texte, #17324d); font-weight: 700; }
  .sidebar .nav-scan .nav-scan-disque { display: grid; place-items: center; width: 62px; height: 62px; margin-top: -34px; border-radius: 50%; color: #fff; background: linear-gradient(150deg, var(--p-acier-fonce, #2b5b84), var(--p-marine-2, #0f2a47)); box-shadow: 0 10px 22px rgba(15, 42, 71, .38), 0 0 0 5px rgba(255, 255, 255, .92); }
  .sidebar .nav-scan svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .topbar-logo.lfc-logo { width: 88px; height: 51px; border-radius: 10px; background-size: 119px auto; background-position: 3px -8px; }  /* V207 (Eduardo, 25/11) : le vrai logo, comme chez le livreur et le collaborateur, réduit pour laisser la place aux cinq boutons */
  @media (max-width: 374px) { .topbar-logo.lfc-logo { width: 66px; height: 38px; background-size: 89px auto; background-position: 2px -6px; } }
}
@media (max-width: 700px) and (prefers-color-scheme: dark) {
  .sidebar { background: rgba(15, 42, 71, .86); box-shadow: 0 -1px 0 rgba(255, 255, 255, .1), 0 -10px 30px rgba(0, 0, 0, .4); }
  .sidebar .nav-item { color: #c3d4e6; }
  .sidebar .nav-item.active { background: rgba(255, 255, 255, .14); color: #f2c75c; }
  .sidebar .nav-item .nav-badge { box-shadow: 0 0 0 2px #0f2a47; }
  .sidebar .nav-scan:not([hidden]) { color: #e8eef3; }
  .sidebar .nav-scan .nav-scan-disque { box-shadow: 0 10px 22px rgba(0, 0, 0, .5), 0 0 0 5px rgba(15, 42, 71, .92); }
}

/* V207 lot A (§381) : le logo LFC reste derrière chaque page, en filigrane — sans son QR code (l'image fait 360 px, le QR est à droite d'un filet : on n'en montre que les 256 premiers, comme l'en-tête
   d'avant). `multiply` fait disparaître le fond blanc de l'image, en clair comme en sombre ; jamais touchable. */
body::before { content: ''; position: fixed; left: 50%; bottom: 150px; width: 380px; height: 300px; margin-left: -190px; background: url("assets/logo-lfc.png") 0 0 / 534px auto no-repeat; opacity: .08; mix-blend-mode: multiply; pointer-events: none; z-index: -1; }
@media (min-width: 701px) { body::before { left: auto; right: 60px; margin-left: 0; bottom: 40px; width: 640px; height: 507px; background-size: 900px auto; opacity: .06; } }
/* V209 (§384) : les chantiers que le bon peut désigner (touchez le bon) */
.chantier-propositions { display: grid; gap: var(--s2, 8px); margin: 4px 0 12px; }
.chantier-propositions p { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted, #4f5d6b); }
.chantier-propositions button { justify-content: flex-start; min-height: 48px; text-align: left; }
/* V209 (§385) : « Je ne connais pas le chantier » et le bloc qui identifie le chantier d'une arrivée */
.sans-chantier { width: 100%; justify-content: center; margin: 4px 0 12px; }
.sans-chantier[hidden] { display: none !important; }
.arrival-identify { display: grid; gap: 8px; margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft, #f4f7f9); min-width: 0; }
.arrival-identify > * { min-width: 0; }
.arrival-identify label { display: grid; gap: 4px; }
.arrival-identify select, .arrival-identify .button { width: 100%; max-width: 100%; box-sizing: border-box; }
.arrival-identify select { min-height: 48px; padding: 8px 10px; border: 1px solid var(--line, var(--p-bordure)); border-radius: 10px; background: var(--p-blanc, #fff); font: inherit; font-size: 16px; }  /* 16 px : l'iPhone ne zoome pas au toucher */
.arrival-identify p { margin: 0; }

/* V210 (§387) : la demande de débarras */
.debarras-groupe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md, 12px); min-width: 0; }
.debarras-choix { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.debarras-choix input[type="radio"] { flex: none; width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; }
.debarras-choix:has(input:checked) { border-color: var(--accent-deep, #1f4e7a); box-shadow: inset 0 0 0 1px var(--accent-deep, #1f4e7a); }

/* V210 (§388) : le plan du chantier et ses zones */
.plan-cadre { position: relative; display: block; width: 100%; margin: 8px 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line, #d3dbdf); }
.plan-cadre img { display: block; width: 100%; height: auto; }
.plan-repere { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; display: grid; place-items: center; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .5); color: #fff; font-weight: 700; pointer-events: none; }
.plan-repere-livraison { background: #1f4e7a; }
.plan-repere-debarras { background: #8a4210; border-radius: 8px; }
.plan-legende { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0; font-size: 14px; }
.plan-legende i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-style: normal; font-weight: 700; }
.plan-legende i.plan-repere-debarras { border-radius: 6px; }
.plan-manque { margin: 6px 0; padding: 10px 12px; border-radius: 10px; background: #fdf1dc; color: #6b3f06; font-weight: 600; }
.plan-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.plan-sources { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-sources .button { flex: 1 1 200px; }
.plan-pages { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0 0; font-weight: 600; }
.plan-pages .button { min-width: 48px; }
.plan-zone-choix { display: flex; gap: 6px; }
@media (max-width: 560px) { .plan-zones { grid-template-columns: 1fr; } }  /* à 390 px, « Livraison · Effacer · Débarras · Effacer » sur une ligne coupait le dernier bouton (capture du parcours, 26/11) */
.plan-zone-choix > [data-plan-zone] { flex: 1 1 auto; }
.plan-outils { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0; }
.plan-defile { border-radius: 12px; }
.plan-cadre[data-plan-toucher] { cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#plan-chantier-dialog.plan-grand { width: 100vw; max-width: 100vw; max-height: 100dvh; margin: 0; border-radius: 0; }
#plan-chantier-dialog.plan-grand .plan-defile { overflow: auto; max-height: calc(100dvh - 280px); -webkit-overflow-scrolling: touch; }
#plan-chantier-dialog.plan-grand .plan-defile .plan-cadre { width: 220%; margin: 0; }
#plan-chantier-dialog.plan-main .plan-cadre[data-plan-toucher] { cursor: grab; touch-action: pan-x pan-y; }
/* V218 (§401) : les zones dessinées. Livraison : vert, trait plein ; débarras : rouge, hachuré ; chacune avec son nom (lisible sans les couleurs). */
.plan-zone { position: absolute; box-sizing: border-box; border: 3px solid #1a7f37; border-radius: 4px; background: rgba(26, 127, 55, .16); pointer-events: none; }
.plan-zone b { position: absolute; left: -3px; top: -3px; padding: 1px 6px; border-radius: 4px 0 4px 0; background: #1a7f37; color: #fff; font-size: 12px; line-height: 18px; font-weight: 700; white-space: nowrap; }
.plan-zone-debarras { border: 3px dashed #c62828; background: repeating-linear-gradient(45deg, rgba(198, 40, 40, .24) 0 6px, rgba(198, 40, 40, .06) 6px 12px); }
.plan-zone-debarras b { background: #c62828; }
.plan-zone-apercu { opacity: .85; }
.plan-legende i.plan-zone-legende { width: 26px; height: 16px; border-radius: 3px; box-sizing: border-box; vertical-align: -3px; border: 3px solid #1a7f37; background: rgba(26, 127, 55, .16); }
.plan-legende i.plan-zone-legende.plan-zone-debarras { border: 3px dashed #c62828; background: repeating-linear-gradient(45deg, rgba(198, 40, 40, .3) 0 4px, transparent 4px 8px); }
.plan-maj { margin: 4px 0 8px; font-size: 14px; color: var(--muted, #52616b); }
.driver-plan.plan-recent > summary { color: #8a4210; font-weight: 700; }

/* V193 (§390) : le plan du dépôt et les photos des zones */
#plan-depot-dialog { width: min(900px, 96vw); }
.plan-depot-panneau { padding: 16px; }
.plan-depot-bloc { display: grid; gap: 8px; margin: 10px 0; }
.plan-depot-photo { padding: 0; border: 0; background: none; border-radius: 12px; overflow: hidden; cursor: pointer; }
.plan-depot-photo img { display: block; width: 100%; max-height: 180px; object-fit: cover; }
.plan-depot-etages { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.plan-depot-cadre { overflow: auto; max-height: 52vh; border: 1px solid var(--line, #d3dbdf); border-radius: 12px; margin: 8px 0; background: #fff; -webkit-overflow-scrolling: touch; }
.plan-depot-image { position: relative; width: 1100px; }
.plan-depot-cadre.entier .plan-depot-image { width: 100%; }
.plan-depot-image img { display: block; width: 100%; height: auto; }
.plan-depot-repere { position: absolute; width: 64px; height: 34px; margin: -17px 0 0 -32px; border: 4px solid #d3122a; border-radius: 10px; background: rgba(211, 18, 42, .12); pointer-events: none; }
.plan-depot-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.plan-depot-zones .button { min-height: 56px; display: grid; justify-content: start; justify-items: start; text-align: left; white-space: normal; }
.plan-depot-zones small { font-size: 13px; font-weight: 400; }
.plan-depot-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.plan-depot-photos img { display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: 12px; background: #f2f4f5; }
.plan-depot-racks, .plan-depot-racks ul { list-style: none; margin: 0; padding: 0; }
.plan-depot-racks summary { min-height: 48px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.plan-depot-racks > li { border-bottom: 1px solid var(--line, #d3dbdf); }
.plan-depot-racks > li.actif > details > summary { color: #a50f22; }
.plan-depot-racks ul li { padding: 6px 0 6px 12px; overflow-wrap: anywhere; }
.tour-load .plan-depot-ou { min-height: 44px; min-width: 64px; margin-left: 30px; padding: 0 14px; border: 1px solid #1f4e7a; border-radius: 10px; background: #fff; color: #1f4e7a; font: inherit; font-weight: 700; cursor: pointer; }
.tour-load .plan-depot-ou[hidden] { display: none; }

/* V210 livraison 3 (§391) : un chantier sans plan — le compte, le blocage, la décision */
.blocage-etat { display: grid; gap: 8px; margin: 6px 0; padding: 10px 12px; border-left: 4px solid #b7791f; border-radius: 8px; background: #fff8ea; color: #4a2f05; }
.blocage-etat.bloque { border-left-color: #a50f22; background: #fdeeee; color: #6d0c18; }
.blocage-etat p { margin: 0; overflow-wrap: anywhere; }
.blocage-etat .button { justify-self: start; min-height: 48px; white-space: normal; text-align: left; }
.blocage-dialog { max-height: 92vh; overflow: auto; }
.blocage-dialog h3 { margin: 0 0 8px; }
.blocage-choix { display: grid; gap: 8px; margin: 10px 0; padding: 0; border: 0; }
.blocage-choix legend { font-weight: 700; margin-bottom: 6px; }
.motif-dialog .blocage-choix label { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border: 1px solid #8a8f98; border-radius: 12px; font-weight: 400; cursor: pointer; }
.motif-dialog .blocage-choix input { width: 22px; height: 22px; min-height: 0; flex: none; }
.blocage-choix span { display: grid; gap: 2px; }
.blocage-choix small { font-size: 14px; color: #4b5a66; }
.plan-historique { margin: 8px 0; }
.plan-historique ul { margin: 6px 0; padding-left: 18px; }
.plan-historique li { margin: 4px 0; overflow-wrap: anywhere; }
.plan-historique audio { display: block; width: 100%; max-width: 360px; margin-top: 4px; }

/* V212 (§393) : la rentabilité par dossier et par lot — d'abord le téléphone (390 px), des chiffres lisibles, rien qui dépasse. */
.renta-etat { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; color: var(--muted); }
.renta-etat.renta-erreur { color: var(--red); }
.renta-actualiser { min-height: 44px; }
.renta-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.renta-dossier { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.renta-dossier.renta-sans { padding: 12px 14px; display: grid; gap: 4px; }
.renta-dossier small { color: var(--muted); }
.renta-ouvrir { all: unset; box-sizing: border-box; display: grid; gap: 4px; width: 100%; padding: 12px 14px; cursor: pointer; min-height: 44px; }
.renta-ouvrir:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: -2px; }
.renta-ouvrir strong, .renta-dossier.renta-sans strong { color: var(--ink); overflow-wrap: anywhere; }
.renta-chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.renta-chiffre { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); min-width: 0; }
.renta-chiffre span { font-size: .8rem; color: var(--muted); }
.renta-chiffre strong { font-size: 1rem; color: var(--ink); overflow-wrap: anywhere; }
.renta-chiffre.renta-depasse { background: var(--red-soft); }
.renta-chiffre.renta-depasse strong { color: var(--red); }
.renta-detail { border-top: 1px solid var(--line); padding: 10px 14px 12px; display: grid; gap: 8px; }
.renta-tableau { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.renta-tableau table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .9rem; }
.renta-tableau th, .renta-tableau td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.renta-tableau th[scope="row"], .renta-tableau thead th:first-child { text-align: left; white-space: normal; }
.renta-hors { margin: 0; color: var(--muted); font-size: .9rem; }
.renta-fiche { margin-bottom: 10px; display: grid; gap: 8px; }
.renta-chiffre small { font-size: .75rem; color: var(--muted); }
.renta-chiffre.renta-vert { background: var(--green-soft); } .renta-chiffre.renta-vert strong { color: var(--green); }
.renta-chiffre.renta-orange { background: var(--amber-soft); } .renta-chiffre.renta-orange strong { color: var(--amber); }
.renta-chiffre.renta-rouge { background: var(--red-soft); } .renta-chiffre.renta-rouge strong { color: var(--red); }
.renta-tableau td.renta-vert, .renta-legende .renta-vert { color: var(--green); }
.renta-tableau td.renta-orange, .renta-legende .renta-orange { color: var(--amber); }
.renta-tableau td.renta-rouge, .renta-legende .renta-rouge { color: var(--red); }
.renta-legende { margin: 0 0 12px; color: var(--muted); font-size: .85rem; }
.renta-alertes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.renta-alerte { padding: 4px 8px; border-radius: 999px; background: var(--amber-soft); color: var(--ink); font-size: .8rem; }
@media (min-width: 900px) { .renta-chiffres { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Idée 30 : le contact du sous-traitant dans la fiche d'une affectation du tableau de la main d'œuvre. */
.tmo-fiche-contact { display: grid; gap: 6px; margin: 4px 0 8px; }
.tmo-fiche-contact p { margin: 0; }
.tmo-fiche-contact-boutons { display: flex; flex-wrap: wrap; gap: 8px; }
.tmo-fiche-contact-boutons .button { min-height: 44px; }

/* V214 (§395) : « Mes absences » dans « Mon compte » — la liste, le formulaire, les chantiers gardés. */
#absences-section { display: grid; gap: 10px; }
.absences-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.absence { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.absence.absence-active { border-color: var(--accent-deep); }
.absence small { color: var(--muted); }
.absence .button { justify-self: start; min-height: 44px; }
.absence-form { display: grid; gap: 10px; }
.absence-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
/* Correction du 26/11/2026 (vue sur le vrai iPhone, « figer les profils ») : sur iPhone, un champ de date VIDE n'a pas de largeur à lui et se réduit
   à une petite case (« Date de réception » de la fiche chantier, « Dernier jour » de « Mes absences »). Une largeur minimale pour tous. */
input[type="date"], input[type="time"], input[type="datetime-local"] { min-width: 9.5em; max-width: 100%; box-sizing: border-box; }
/* Correction du 26/11/2026 (vue sur le vrai iPhone) : les libellés n'avaient pas de mise en page ; un champ de date vide se réduisait à rien
   (« Dernier jour ») et la liste « Suppléant » gardait l'aspect brut d'iOS. Le libellé au-dessus, le champ sur toute la largeur. */
.absence-form label { display: grid; gap: 4px; min-width: 0; font-size: .9rem; }
.absence-form input[type="date"], .absence-form select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; font-size: 16px; padding: 8px 10px;
  border: 1px solid var(--line-strong, var(--line)); border-radius: 10px; background: var(--surface); color: var(--ink); -webkit-appearance: none; appearance: none; }
.absence-form select { background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.absence-sauf { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; display: grid; gap: 6px; }
.absence-sauf label { display: flex; gap: 8px; align-items: center; min-height: 44px; overflow-wrap: anywhere; }

/* Réécouter son message vocal avant d'envoyer (recette iPhone du 26/11/2026). */
.vocal-reecoute { display: block; width: 100%; max-width: 360px; height: 44px; margin-top: 6px; }

/* V228 suite (§421) : les devis validés d'un chantier, lot par lot. */
.devis-par-lot { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.devis-par-lot li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.devis-total { margin: 8px 0; }
.devis-piece { border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; margin: 8px 0; }
.devis-piece summary { min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; cursor: pointer; overflow-wrap: anywhere; }
.devis-piece summary small { flex-basis: 100%; }
.devis-sections { list-style: none; margin: 0 0 8px; padding: 0; }
.devis-section { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.devis-titre { font-weight: 600; }
.devis-lot { grid-column: 1; }
.devis-montant { grid-column: 2; grid-row: 1 / span 2; align-self: center; white-space: nowrap; }
.devis-inconnu { color: var(--danger, #b42318); }
.devis-choix { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.devis-choix label { display: grid; gap: 4px; flex: 1 1 200px; }
.devis-choix select { min-height: 44px; font-size: 16px; }
.devis-choix .button { min-height: 44px; }

/* V248 (§440) : « Aujourd'hui sur les chantiers » — une ligne par chantier, touchable en entier ; la bordure dit l'état. */
.equipes-ligne { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 56px; border-left-color: var(--line); }
.equipes-ligne.equipes-ok { border-left-color: #1f8a62; }
.equipes-ligne.equipes-ecart, .equipes-ligne.equipes-retard { border-left-color: #e08a00; }
.equipes-ligne.equipes-retard .equipes-pointe { color: #8a4b00; font-weight: 700; }
.equipes-ecart { color: #8a4b00 !important; font-weight: 700; }
.equipes-resp { font-weight: 400; color: var(--muted, #4f6475); }
.equipes-resume, .equipes-rien { margin: 0; color: var(--muted, #4f6475); }
