.metric.is-clickable {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: .18s ease;
}
.stock-photo-preview { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px; border-radius: 10px; color: var(--muted); background: #edf3f7; font-size: 12px; }
.stock-photo-preview img { width: 90px; height: 70px; object-fit: cover; border-radius: 8px; background: var(--p-blanc); }
.stock-photo-preview small { line-height: 1.4; }

.metric.is-clickable:hover,
.metric.is-clickable:focus-visible {
  border-color: #9bb8cc;
  transform: translateY(-2px);
  box-shadow: 0 9px 22px rgba(16, 42, 67, .1);
  outline: 2px solid #b6d4ed;
  outline-offset: 2px;
}

.operation-assignment-fields,
.operation-return-field {
  display: none;
}

.material-park-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 15px;
}

.material-park-card {
  background: var(--p-blanc);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 5px 18px rgba(16, 42, 67, .035);
}

.material-park-card h3 { margin: 0; color: var(--navy); font-size: 16px; }
.material-park-card .park-reference { color: var(--blue); font-size: 12px; font-weight: 700; margin: 4px 0 14px; }
.material-park-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 12px; }
.material-park-meta span { display: block; color: var(--muted); margin-bottom: 2px; }
.material-park-meta strong { color: var(--navy); }

.stock-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.stock-search { color: var(--navy); font-size: 12px; font-weight: 700; min-width: 260px; }
.stock-search input { display: block; width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 7px; padding: 9px 11px; font-family: inherit; }
@media (max-width: 700px) { .stock-toolbar { align-items: stretch; flex-direction: column; } .stock-search { min-width: 0; } }
.stock-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stock-summary > div { background: var(--p-blanc); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stock-summary span { display: block; color: var(--muted); font-size: 12px; }
.stock-summary strong { display: block; color: var(--navy); font-size: 21px; margin-top: 4px; }
.stock-alert-summary strong { color: var(--p-7a5410); }
.stock-alert-summary small { display: block; color: var(--p-7a5410); font-size: 12px; margin-top: 3px; }
.stock-low-alert { display: inline-flex; margin-top: 12px; padding: 6px 9px; border-radius: 20px; background: var(--amber-soft); color: var(--p-7a5410); font-size: 12px; font-weight: 800; }
.stock-purchase-link { width: 100%; margin-top: 8px; }
.scan-qr-button { display: block; margin-top: 8px; }
.qr-scanner-panel { padding: 26px; }
#stock-qr-video { display: block; width: min(100%, 420px); aspect-ratio: 4 / 3; object-fit: cover; background: var(--p-102a43); border-radius: 10px; margin: 0 auto; }
.stock-scan-photo { display: block; width: 100%; max-width: 220px; max-height: 150px; object-fit: cover; border-radius: 8px; margin-top: 9px; border: 1px solid var(--line); }
.stock-scan-photo-empty { display: block; color: var(--muted); font-size: 12px; margin-top: 7px; }
.photo-missing { display: grid; place-items: center; min-height: 110px; padding: 14px; color: var(--muted); font-size: 12px; text-align: center; background: #edf3f7; }
.planning-photo-alert { margin: 0 0 20px; padding: 18px; border: 1px solid #f1d38a; border-radius: 14px; background: #fff9e8; }
.planning-photo-alert > div:first-child strong { color: #946200; font-size: 16px; }
.planning-photo-alert p { margin: 5px 0 0; color: #7a6330; font-size: 13px; }
.planning-photo-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 8px; margin-top: 14px; }
.planning-photo-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid #ead9a7; border-radius: 10px; background: var(--p-blanc); color: var(--ink); text-align: left; cursor: pointer; }
.planning-photo-item > span:first-child { font-size: 18px; }
.planning-photo-item > span:nth-child(2) { min-width: 0; flex: 1; }
.planning-photo-item strong, .planning-photo-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planning-photo-item small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.planning-photo-item em { color: var(--blue); font-size: 12px; font-style: normal; font-weight: 800; }
.stock-edit { margin-top: 14px; width: 100%; }
@media (max-width: 700px) { .stock-summary { grid-template-columns: 1fr; } }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.qr-card { display: flex; align-items: center; gap: 16px; background: var(--p-blanc); border: 1px solid var(--line); border-radius: 12px; padding: 14px; break-inside: avoid; }
.qr-code-image { width: 150px; height: 150px; flex: 0 0 150px; object-fit: contain; background: var(--p-blanc); }
.qr-help { color: var(--muted); font-size: 12px; line-height: 1.35; }
/* V104 (§236) : à l'écran, la photo de l'article (reconnaître le produit d'un coup d'œil) ; le QR n'est que pour l'impression. */
.qr-card .qr-code-image { display: none; }
.qr-photo { display: grid; place-items: center; width: 150px; height: 150px; flex: 0 0 150px; border-radius: 10px; overflow: hidden; background: #eef2f5; }
.qr-photo img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.qr-no-photo { padding: 8px; color: #4a5866; font-size: 13px; font-weight: 600; text-align: center; }
@media print { .qr-photo { display: none !important; } .qr-card .qr-code-image { display: block !important; } }
.qr-card-body { min-width: 0; }
.qr-kind { color: var(--blue); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.qr-card h3 { color: var(--navy); font-size: 15px; line-height: 1.25; margin: 5px 0 8px; }
.qr-card strong, .qr-card small { display: block; }
.qr-card strong { color: var(--ink); font-size: 14px; }
.qr-card small { color: var(--muted); margin-top: 5px; }
@media print {
  body.print-qr { background: var(--p-blanc); }
  body.print-qr .sidebar, body.print-qr .topbar, body.print-qr #dashboard-view, body.print-qr #planning-view, body.print-qr #returns-view, body.print-qr #equipment-view, body.print-qr #material-park-view, body.print-qr #stock-view { display: none !important; }
  body.print-qr #qr-view { display: block !important; padding: 12mm; max-width: none; }
  body.print-qr #qr-view .section-heading { margin-bottom: 10mm; }
  body.print-qr #qr-view .section-heading .button, body.print-qr #qr-view .stock-toolbar { display: none; }
  body.print-qr .qr-grid { grid-template-columns: repeat(3, 1fr); gap: 6mm; }
  body.print-qr .qr-card { border: 1px solid #999; padding: 4mm; }
  body.print-qr .qr-code-image { width: 32mm; height: 32mm; }
}

/* v0.41 — alerte mémoire pleine, sauvegarde, photo de retour */
.storage-warning { position: sticky; top: 0; z-index: 1000; display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 12px 16px; background: var(--p-rouge-texte); color: var(--p-blanc); font-size: 14px; }
.backup-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.backup-tools .button { cursor: pointer; }
.return-photo img { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: 10px; margin-top: 12px; }

/* v0.46 — consultation seule quand le serveur est injoignable à l'ouverture */
.consultation-only .top-actions .button, .consultation-only .page-heading .button, .consultation-only [data-action], .consultation-only .backup-tools label { pointer-events: none; opacity: .45; }
.sync-card[data-state="offline"] .live-dot, .sync-card[data-state="error"] .live-dot, .sync-card[data-state="readonly"] .live-dot, .sync-card[data-state="consultation"] .live-dot { background: var(--p-rouge-texte); }
.sync-card[data-state="pending"] .live-dot, .sync-card[data-state="syncing"] .live-dot { background: #d97706; }

/* v0.48 — photos entières dans les vignettes, agrandissement au clic */
.equipment-photo img, .stock-card-photo img, .return-photo img, .park-photo img, .stock-scan-photo, .stock-photo-preview img { object-fit: contain; background: #f3f6f8; cursor: zoom-in; }
.equipment-photo, .stock-card-photo { grid-template: 100% / 100%; height: 170px; }
.equipment-photo img, .stock-card-photo img { min-width: 0; min-height: 0; }
.park-photo { height: 140px; margin-top: 12px; border-radius: 10px; overflow: hidden; background: #f3f6f8; }
.park-photo img { display: block; width: 100%; height: 100%; }
#photo-viewer { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
#photo-viewer::backdrop { background: rgba(10, 22, 34, .88); }
#photo-viewer img { display: block; max-width: 94vw; max-height: 84vh; object-fit: contain; border-radius: 10px; background: var(--p-blanc); }
.photo-viewer-caption { margin: 10px 0 0; color: var(--p-blanc); font-size: 14px; text-align: center; }
.photo-viewer-close { position: absolute; top: -14px; right: -14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--p-blanc); color: var(--navy); font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
@media (max-width: 700px) { .photo-viewer-close { top: 6px; right: 6px; } }

/* v0.51 — e-mail prêt à envoyer */
#email-dialog { width: min(640px, 94vw); }
.email-meta { display: grid; gap: 6px; margin: 0 0 12px; font-size: 13px; }
.email-meta div { display: grid; grid-template-columns: 60px 1fr; gap: 8px; }
.email-meta dt { color: var(--muted); }
.email-meta dd { margin: 0; color: var(--navy); font-weight: 700; overflow-wrap: anywhere; }
.email-meta small { color: var(--muted); font-weight: 400; }
.email-preview { max-height: 42vh; overflow: auto; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f6f9fb; font-family: inherit; white-space: pre-wrap; }
.email-actions { flex-wrap: wrap; }
.email-actions a.button { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.email-dialog-panel { padding: 22px; }
.quick-movement-actions { margin-left: auto; text-align: right; }
.quick-movement-label { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.quick-movement-actions > div { display: flex; gap: 8px; }
.quick-movement-button { min-width: 104px; }
.qr-manual-fallback { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.qr-manual-fallback label { color: var(--navy); font-size: 12px; font-weight: 700; }
.qr-manual-fallback input, .qr-manual-fallback select { display: block; width: 100%; margin-top: 5px; padding: 9px; border: 1px solid var(--p-bordure-2); border-radius: 7px; background: var(--p-blanc); font-family: inherit; }
.operation-simplified .dialog-head { margin-bottom: 14px; }
.operation-simplified .form-grid { gap: 12px; }
@media(max-width:700px){.quick-movement-actions{width:100%;text-align:left}.quick-movement-actions > div{display:grid;grid-template-columns:repeat(3,1fr)}.quick-movement-button{min-width:0;padding:11px 8px}}
.movement-context { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f3f7fb; color: var(--navy); font-size: 13px; overflow-wrap: anywhere; }
.movement-context .field-hint { margin: 8px 0 0; line-height: 1.5; }
.movement-context > strong { display: block; margin-bottom: 10px; }
.park-loans, .park-history ul { padding-left:18px; font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.park-history { margin:12px 0; }
.park-history summary { cursor:pointer; color:var(--navy); }

/* v0.70 — valeur du stock sur la Vue dépôt */
.metric.metric-wide { grid-column: 1 / -1; }
.metric.price-missing .metric-note { color: #8a5a00; }

/* v0.72 — réclamations en attente de décision */
.claim-card { border-left: 4px solid var(--p-rouge-texte); }
.claim-decision { display: grid; gap: 10px; padding: 0; margin-top: 14px; }
.claim-decision label { display: grid; gap: 5px; font-weight: 700; font-size: 13px; }
.claim-decision select, .claim-decision textarea { font: inherit; font-weight: 400; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }

/* v0.166 (V66, lot 2) — « Valider ce motif » et « Changer le motif » côte à côte ; sur téléphone, ils se partagent
   la largeur, et passent l'un sous l'autre, pleine largeur, si la place manque. */
.reason-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
@media (max-width: 700px) { .reason-actions .button { flex: 1 1 auto; min-height: 44px; } }

/* v0.157 (§147) — les cartes et les lignes des Indicateurs mènent à leur détail */
.kpi.is-clickable, .bar-row.is-clickable {
  position: relative;
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: .18s ease;
}
.kpi.is-clickable { padding-right: 34px; }
.kpi-chevron { position: absolute; top: 50%; right: 12px; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); }
.kpi-chevron svg { width: 100%; height: 100%; }
.kpi.is-clickable:hover, .kpi.is-clickable:focus-visible,
.bar-row.is-clickable:hover, .bar-row.is-clickable:focus-visible {
  border-color: #9bb8cc;
  outline: 2px solid #b6d4ed;
  outline-offset: 2px;
}
.kpi.is-clickable:hover, .kpi.is-clickable:focus-visible { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(16, 42, 67, .1); }

/* v0.158 (§148) — « à l'instant » sur les cartes qui ne dépendent pas de la période */
.kpi-now {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 6px;
  border-radius: 20px;
  background: var(--line, #e2e8ee);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .02em;
  vertical-align: 1px;
  white-space: nowrap;
}

/* v0.159 (§149) — ce qui est immobilisé faute de motif se voit */
.reuse-blocked {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #f1d38a;
  border-radius: 12px;
  background: #fff9e8;
  color: #7a6330;
  font-size: 13px;
}
.reuse-blocked strong { display: block; color: #946200; font-size: 15px; }
.reuse-blocked span { display: block; margin-top: 4px; line-height: 1.45; }
.reuse-blocked ul { margin: 10px 0 0; padding-left: 18px; line-height: 1.6; }
.reuse-blocked-only .reuse-head, .reuse-blocked-only .reuse-list { display: none; }

/* v0.161 (§151) — « Ce que les retours ont coûté » : des libellés longs (sept motifs, des noms de dossier)
   et une précision sous chaque ligne. Les barres ordinaires tronquent à 96 px sur téléphone : ici le
   libellé prend toute la largeur et la barre passe dessous. Vu tronqué à l'écran avant d'être corrigé. */
#indicator-return-cost .bar-row {
  grid-template-columns: 1fr auto;
  grid-template-areas: "label label" "track value";
  row-gap: 4px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line, #e2e8ee);
}
#indicator-return-cost .bar-row:last-of-type { border-bottom: 0; }
#indicator-return-cost .bar-label {
  grid-area: label;
  overflow: visible;
  white-space: normal;
  font-weight: 700;
  line-height: 1.3;
}
#indicator-return-cost .bar-label small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
#indicator-return-cost .bar-track { grid-area: track; }
#indicator-return-cost .bar-row strong { grid-area: value; }

/* v0.162 (§152) — « Ce qui ne bouge pas » */
.stuck-row { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: start; padding: 11px 0; border-bottom: 1px solid var(--line, #e2e8ee); font-size: 13px; }
.stuck-row:last-child { border-bottom: 0; }
.stuck-service { padding: 2px 8px; border-radius: 20px; background: #edf3f7; color: var(--navy); font-size: 12px; font-weight: 800; white-space: nowrap; }
.stuck-body { min-width: 0; }
.stuck-body strong { display: block; color: var(--navy); line-height: 1.3; }
.stuck-body small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.stuck-age { color: var(--muted); font-size: 12px; font-weight: 700; text-align: right; white-space: nowrap; }
.stuck-age em { display: block; margin-top: 2px; color: #946200; font-style: normal; }
.stuck-unread { color: var(--p-rouge-texte); font-style: normal; font-weight: 700; }
.stuck-row.is-escalated .stuck-service { background: #fff2cf; color: #946200; }
@media (max-width: 700px) {
  .stuck-row { grid-template-columns: 1fr auto; grid-template-areas: "service age" "body body"; }
  .stuck-service { grid-area: service; justify-self: start; }
  .stuck-age { grid-area: age; }
  .stuck-body { grid-area: body; }
}

/* v0.165 (§157) — main d’œuvre de la semaine : une ligne par lot dans le formulaire */
.mo-ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin: 0 0 12px; padding: 12px; border: 1px solid var(--line, #e2e8ee); border-radius: 10px; }
.mo-ligne label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--navy); }
.mo-ligne select, .mo-ligne input { font: inherit; font-weight: 400; padding: 9px; border: 1px solid var(--p-bordure-2); border-radius: 8px; background: var(--p-blanc); min-width: 0; }
.mo-ligne label:first-child, .mo-ligne .mo-precision { grid-column: 1 / -1; }

/* v0.171 (V71, §165) — demandes d'avancement : fiche chantier et page Demandes */
.avancements-block { margin-bottom: 24px; }
.avancements-block h3 { margin: 0 0 8px; color: var(--navy); }
.avancement-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.avancement-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--navy); }
.avancement-form .full, .avancement-form button { grid-column: 1 / -1; }
/* 44 px et 16 px (V76, §179) : en dessous, l'iPhone zoome à la saisie et le champ se touche mal. « font: inherit » seul
   donnait 13 px et 41 px au téléphone. */
.avancement-form input, .avancement-form select, .avancement-action input, .avancement-action select { box-sizing: border-box; min-height: 44px; font: inherit; font-size: 16px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.avancement { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 10px; background: var(--p-blanc); }
.avancement-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.avancement small { display: block; color: var(--muted); margin-top: 4px; }
.avancement p { margin: 6px 0 0; }
/* v0.184 (V77, §180) — un bouton d'impression qui ne peut pas imprimer le dit, à côté de lui. */
.print-refus { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--red-soft, var(--p-rouge-pale)); color: var(--red, var(--p-rouge-fonce)); font-size: 14px; font-weight: 700; line-height: 1.35; text-align: left; overflow-wrap: anywhere; }
/* v0.185 (V77, §181) — et celui qui passe par la feuille de partage de l'iPhone dit quoi y toucher. */
.print-aide { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--gold-soft, #f6efdd); color: var(--navy, #14233b); font-size: 14px; font-weight: 700; line-height: 1.35; text-align: left; overflow-wrap: anywhere; }
@media print { .print-refus, .print-aide { display: none; } }
/* v0.193 (V83, §192) — le tableau vu par personne : absences en gris, formulaire d'absence. */
.tmo .tmo-barre.tmo-absence, .tmo-legende i.tmo-absence { background: repeating-linear-gradient(135deg, #e6ebef, #e6ebef 6px, #d6dde3 6px, #d6dde3 12px); color: #2f3d4a; border-color: #b9c6cf; }
.tmo-legende i.tmo-absence { display: inline-block; width: 18px; height: 12px; border: 1px solid #b9c6cf; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.tmo-absence-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line, var(--p-d3dbdf)); border-radius: 12px; background: var(--surface, var(--p-blanc)); }
.tmo-absence-form strong { width: 100%; }
.tmo-absence-form label { display: grid; gap: 4px; font-size: 14px; }
.tmo-absence-form select, .tmo-absence-form input { min-height: 44px; font-size: 16px; }
.tmo-absence-form .tmo-fiche-jours { display: flex; gap: 10px; }
/* v0.190 (V79, §188) — la cloche : « Nouveautés » puis « À faire ». */
.notif-titre { margin: 14px 0 6px; font-size: 15px; color: var(--navy, #17334f); }
.notif-titre:first-child { margin-top: 0; }
.notif-tout-lu { width: 100%; margin: 6px 0 4px; min-height: 44px; }
/* v0.186 (V78 lot 1, §184) — sans réseau, un bandeau en haut de la page, visible aussi sur téléphone. */
.offline-banner { position: sticky; top: 0; z-index: 900; margin: 0; padding: 10px 16px; background: var(--amber-soft, var(--p-ambre-pale-2)); color: var(--amber, var(--p-7a4f00)); border-bottom: 1px solid #f0dcae; font-size: 14px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.offline-banner { display: grid; gap: 6px; }
.offline-refusees { color: var(--red, var(--p-rouge-fonce)); font-weight: 700; }
.offline-refusees .button { margin-left: 6px; min-height: 36px; padding: 4px 10px; font-size: 14px; }
@media print { .offline-banner { display: none; } }
/* v0.185.1 (§183) — l'étiquette imprimée est une seule image de 62 × 29 mm (v0.375.0, §434), en noir pur. */
#label-sheet .print-label-image img { image-rendering: pixelated; }
@media print { body.print-label .print-label.print-label-image { padding: 0; gap: 0; } body.print-label .print-label.print-label-image img { width: 62mm; height: 29mm; } body.print-label .print-label.print-label-grand { height: 100mm; } body.print-label .print-label.print-label-grand img { width: 62mm; height: 100mm; } body.print-label .print-label.print-label-moyenne { height: 60mm; } body.print-label .print-label.print-label-moyenne img { width: 62mm; height: 60mm; } }
/* V245 (§436) — « Quelle taille ? » : trois gros boutons, la taille habituelle mise en avant. */
.taille-etiquette { width: min(420px, calc(100vw - 32px)); padding: 20px; border: 0; border-radius: 16px; box-sizing: border-box; }
.taille-etiquette h2 { margin: 0 0 4px; font-size: 20px; }
.taille-etiquette p { margin: 0 0 12px; }
.taille-choix { display: grid; gap: 2px; width: 100%; min-height: 64px; margin: 0 0 10px; padding: 10px 14px; text-align: left; border: 2px solid var(--line, #d6dde6); border-radius: 12px; background: var(--p-blanc, #fff); color: var(--navy, #17334f); font: inherit; cursor: pointer; }
.taille-choix strong { font-size: 18px; }
.taille-choix span { font-size: 14px; color: var(--muted, #4b5b6b); overflow-wrap: anywhere; }
.taille-choix.proposee { border-color: var(--navy, #17334f); background: var(--p-acier-pale, #eef4fa); }
.taille-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--navy, #17334f); color: #fff !important; font-size: 12px !important; vertical-align: middle; }
.taille-annuler { width: 100%; min-height: 48px; }
/* v0.181 (V75, §177) — archiver un chantier en étapes : fiche chantier et page Demandes. Les cartes reprennent celles de l'avancement. */
.archivages-block { margin-bottom: 24px; }
.archivage-reste { margin: 8px 0 0; font-weight: 700; color: var(--navy); }
.archivage-ouverts { margin: 6px 0 0; padding-left: 18px; }
.archivage-ouverts li { margin: 2px 0; overflow-wrap: anywhere; }
.archivage-form p { margin: 0; }
/* Au téléphone : un champ de 44 px, écrit en 16 px (en dessous, l'iPhone zoome à la saisie). */
.archivage-form input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
.archivage-form .button { min-height: 44px; }
.archivage-action { display: grid; gap: 8px; margin-top: 10px; }
.archivage-action label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--navy); }
.archivage-action input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 16px; }
.archivage-boutons { display: flex; flex-wrap: wrap; gap: 8px; }
.archivage-action .button { flex: 1 1 160px; width: auto; min-height: 44px; white-space: normal; }
.avancement-action { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.avancement-action input { flex: 1 1 160px; }
.avancement-action .field-error { flex: 1 1 100%; margin: 0; }  /* V149 : l’erreur sous la réponse, sur sa propre ligne */
.avancement-message { font-weight: 700; color: var(--navy); }
@media (max-width: 700px) { .avancement-form { grid-template-columns: 1fr; } .avancement-action .button { flex: 1 1 100%; min-height: 44px; } }

/* v0.172 (V72, §166) — planning de la main d'œuvre : la réunion du mercredi.
   Mesuré dans Chromium à 390, 820 et 1280 px : rien ne dépasse, chaque bouton fait au moins 44 px de haut au doigt,
   et les champs sont à 16 px (en dessous, l'iPhone agrandit la page dès qu'on touche un champ). */
.mo-semaine { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.mo-semaine strong { color: var(--navy); }
.mo-bloc { margin-bottom: 20px; }
.mo-bloc h3 { margin: 0 0 8px; color: var(--navy); }
.mo-alertes { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.mo-alerte { padding: 10px 12px; border-radius: 8px; background: var(--amber-soft, var(--p-ambre-pale)); }
/* V188 (§362) : l'alerte se touche (bouton pleine largeur, 44 px au moins), dit ce qu'elle ouvre en petites capitales ; « Qui proposer ? » : une carte par sous-traitant. */
.mo-alerte:has(.mo-alerte-ouvrir) { padding: 0; }
.mo-alerte-ouvrir { display: grid; gap: 4px; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.mo-alerte-verbe { color: var(--navy, #17334f); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.mo-props { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.mo-prop { display: grid; gap: 2px; padding: 12px; border: 1px solid var(--p-filet, #d3dbdf); border-left: 4px solid var(--gold-deep, #366a95); border-radius: 10px; background: var(--p-blanc, #fff); overflow-wrap: anywhere; }
.mo-prop small { font-size: 14px; color: var(--muted); }
.mo-prop .mo-prop-complet { color: var(--red, #b3261e); font-weight: 600; }
.mo-prop-contact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.mo-prop-contact .button { min-height: 44px; }
.mo-double { background: var(--red-soft, var(--p-rouge-pale)); }
.mo-lots { border: 1px solid var(--line); border-radius: 10px; background: var(--p-blanc); overflow: hidden; }
.mo-lot { display: grid; grid-template-columns: minmax(0, 1fr) 84px 84px; gap: 8px; padding: 9px 12px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.mo-lot:first-child { border-top: 0; }
.mo-lot span { min-width: 0; overflow-wrap: anywhere; }
.mo-lots-tete { background: var(--soft, var(--p-fond-pale)); color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mo-lot.mo-manque { color: var(--red, var(--p-rouge-fonce)); font-weight: 700; }
.mo-chantier { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 10px; background: var(--p-blanc); }
.mo-chantier header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mo-chantier h3 { margin: 0; font-size: 16px; }
.mo-liste { list-style: none; margin: 4px 0 8px; padding: 0; }
.mo-liste li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.mo-liste li:first-child { border-top: 0; }
.mo-liste li > span { min-width: 0; overflow-wrap: anywhere; }
/* Le texte garde la place ; quand elle manque (téléphone), les boutons de la ligne passent dessous, à droite. */
.mo-liste li > span:first-child { flex: 1 1 12em; }
.mo-actions { display: flex; flex: none; gap: 6px; margin-left: auto; }
/* Un formulaire ouvert depuis une ligne se pose sous elle, sur toute la largeur : on voit à quoi il répond. */
.mo-liste li > .mo-affecter { flex: 1 1 100%; margin: 2px 0 6px; padding: 10px; border-radius: 10px; background: var(--soft, var(--p-fond-pale)); }
.mo-qui { flex: 1 1 100%; margin: 0; color: var(--navy); }
.mo-liste .row-action, .mo-muets .row-action { flex: none; min-height: 36px; padding: 6px 10px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
.mo-affecter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: end; }
.mo-affecter select, .mo-affecter input { box-sizing: border-box; min-width: 0; max-width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--p-blanc); font: inherit; font-size: 16px; }
.mo-affecter label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--navy); }
.mo-message { font-weight: 700; color: var(--navy); }
.mo-erreur { flex: 1 1 100%; margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--red-soft, var(--p-rouge-pale)); color: var(--red, var(--p-rouge-fonce)); font-weight: 700; }
.mo-muets { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.mo-muets li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 4px 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--p-blanc); }
.mo-muets span { min-width: 0; overflow-wrap: anywhere; }
/* « À reprendre de la semaine précédente » : une proposition, pas encore le planning — d'où le fond à part. */
.mo-reprise { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft, var(--p-fond-pale)); }
.mo-reprise p { margin: 0 0 6px; }
.mo-reprise-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
@media (max-width: 700px) { .mo-affecter > * { flex: 1 1 100%; } .mo-reprise-actions .button { flex: 1 1 auto; } .mo-lot { grid-template-columns: minmax(0, 1fr) 72px 64px; } }
/* Les boutons ordinaires (.button) font déjà 44 px partout : c'est le plancher du système graphique. Seuls les petits
   boutons de ligne (36 px à la souris) ont besoin d'une règle : 44 px sur téléphone, et sur tablette dès qu'on la tient au doigt. */
@media (max-width: 700px), (pointer: coarse) { .mo-liste .row-action, .mo-muets .row-action { min-height: 44px; } }

/* v0.174 (V73, §170) — Tableau de la réunion du mercredi, en lecture (tableau-mo.js). Une fenêtre en plein écran, sans le
   menu : l'en-tête, le résumé de la semaine, puis le tableau qui défile seul dans son cadre (la ligne des jours et celle
   du total restent en vue), la légende dessous. Les règles générales des fenêtres (largeur, marges, coins, animation)
   sont toutes redites ici, sinon le tableau reprendrait la forme d'une petite fenêtre.
   Mesuré dans Chromium à 820 × 1180 (au doigt), 1180 × 820 et 1280 × 900 : des écrans simulés, pas un vrai iPad. */
dialog.tmo { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; overflow: hidden; background: var(--page); color: var(--ink); }
dialog.tmo[open] { animation: none; }
dialog.tmo::backdrop { background: var(--page); backdrop-filter: none; }
.tmo > .tmo-page { display: flex; flex-direction: column; gap: 10px; height: 100%; max-height: none; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); overflow-y: auto; }
.tmo-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: none; }
.tmo-tete h2 { margin: 0 4px; font-size: 20px; color: var(--navy); }
.tmo-semaine { display: flex; align-items: center; gap: 6px; margin-left: auto; font-weight: 700; color: var(--navy); white-space: nowrap; }
/* Sur un écran étroit, les boutons de l'application prennent toute la largeur : pas ceux du tableau. */
.tmo .button { flex: none; width: auto; }
.tmo .button.tmo-carre { width: 44px; padding: 0; font-size: 22px; }
.tmo-message, .tmo-page > .muted { flex: none; margin: 0; }
.tmo-message { font-weight: 700; color: var(--navy); }
/* Le résumé de la semaine : s'il est très long, il défile dans son bandeau au lieu de chasser le tableau. */
.tmo-alertes { display: flex; flex: none; flex-wrap: wrap; gap: 8px; max-height: 132px; margin: 0; padding: 0; list-style: none; overflow-y: auto; }
.tmo-alerte { max-width: 100%; padding: 7px 10px; border-radius: 8px; font-size: 13px; overflow-wrap: anywhere; }
.tmo-alerte.tmo-manque, .tmo-alerte.tmo-double { background: var(--red-soft); color: var(--red); }
.tmo-alerte.tmo-muet, .tmo-alerte.tmo-averifier { background: var(--amber-soft); color: var(--amber); }
.tmo-alerte.tmo-ok { background: var(--green-soft); color: var(--green); }
.tmo-alerte.tmo-rien { background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.tmo .tmo-cadre { align-self: start; min-width: 0; min-height: 0; max-height: 100%; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tmo-page[aria-busy="true"] .tmo-cadre { opacity: .5; transition: opacity .2s ease .3s; }
.tmo-table { min-width: 660px; }
.tmo-rang { display: grid; grid-template-columns: 196px minmax(0, 1fr); border-top: 1px solid var(--line); }
.tmo-rang:first-child { border-top: 0; }
.tmo-jours, .tmo-total { position: sticky; z-index: 3; background: var(--soft); }
.tmo-jours { top: 0; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.tmo-total { bottom: 0; color: var(--navy); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tmo-jours > div:first-child, .tmo-total > div:first-child { min-width: 0; padding: 10px 8px 10px 12px; overflow-wrap: anywhere; }
.tmo-six { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); min-width: 0; }
.tmo-six > span { min-width: 0; padding: 10px 8px; border-left: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; }
.tmo-total .tmo-six > span { text-align: center; }
.tmo-chantier { display: grid; align-content: start; gap: 3px; min-width: 0; padding: 9px 8px 9px 12px; }
.tmo-chantier strong { color: var(--navy); font-size: 14px; overflow-wrap: anywhere; }
.tmo-resp { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.tmo-besoins { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; margin-top: 2px; }
.tmo-besoin { max-width: 100%; padding: 2px 7px; border-radius: 10px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tmo-besoin.tmo-ok { background: var(--green-soft); color: var(--green); }
.tmo-besoin.tmo-manque { background: var(--red-soft); color: var(--red); }
.tmo-besoin.tmo-muet { background: var(--amber-soft); color: var(--amber); }
.tmo-besoin.tmo-rien { background: var(--soft); color: var(--muted); }
/* La grille des six jours : les traits des cases dessous, les barres dessus, posées sur leurs colonnes. */
.tmo-grille { position: relative; min-width: 0; min-height: 64px; }
.tmo-fin .tmo-grille { min-height: 36px; }
/* Un chantier où il ne se passe rien : une ligne fine, le nom seul (§172). */
.tmo-fine .tmo-chantier { align-content: center; padding-top: 6px; padding-bottom: 6px; }
.tmo-fine .tmo-chantier strong { font-weight: 600; }
.tmo-cases { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tmo-cases i { border-left: 1px solid var(--line); }
.tmo-barres { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: row dense; row-gap: 6px; padding: 8px 0; }
.tmo .tmo-barre { position: relative; display: grid; align-content: center; gap: 1px; width: auto; height: auto; min-width: 0; min-height: 48px; margin: 0 4px; padding: 4px 10px; border: 1px solid; border-radius: 10px; overflow: hidden; font: inherit; text-align: left; white-space: normal; cursor: pointer; appearance: none; -webkit-appearance: none; }
.tmo .tmo-barre:focus-visible { outline-offset: 1px; }
.tmo-nom, .tmo-detail { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tmo-nom { font-size: 13px; font-weight: 700; }
.tmo-detail { font-size: 12px; }
.tmo-barre.tmo-st, .tmo-legende i.tmo-st { background: var(--blue-soft); border-color: #9cc1e0; color: var(--navy); }
.tmo-barre.tmo-sal, .tmo-legende i.tmo-sal { background: var(--green-soft); border-color: #93cdb4; color: #0b4f38; }
.tmo-barre.tmo-averifier { box-shadow: 0 0 0 2px #b97a00; }
.tmo-barre.tmo-double { box-shadow: 0 0 0 2px var(--red); }
.tmo-legende { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0; color: var(--muted); font-size: 13px; }
.tmo-legende span { display: inline-flex; align-items: center; gap: 6px; }
.tmo-legende i { flex: none; width: 22px; height: 14px; border: 1px solid; border-radius: 4px; }
.tmo-legende i.tmo-double { background: var(--p-blanc); border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.tmo-legende i.tmo-averifier { background: var(--p-blanc); border-color: #b97a00; box-shadow: 0 0 0 1px #b97a00; }
/* La fiche d'une affectation : une petite fenêtre posée à côté de sa barre (le code lui donne sa place). Son fond,
   transparent, couvre l'écran : toucher à côté la ferme. */
dialog.tmo-fiche { position: fixed; inset: auto; width: 356px; max-width: calc(100vw - 16px); height: auto; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; color: var(--ink); }
dialog.tmo-fiche[open] { animation: none; }
dialog.tmo-fiche::backdrop { background: transparent; backdrop-filter: none; }
.tmo-fiche > .tmo-fiche-corps { max-height: calc(100dvh - 16px); padding: 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); box-shadow: 0 14px 34px rgba(11, 32, 61, .26); overflow-y: auto; overflow-wrap: anywhere; }
.tmo-fiche h3 { margin: 0; font-size: 16px; color: var(--navy); }
.tmo-fiche-ou { margin: 2px 0 10px; color: var(--muted); font-size: 13px; }
.tmo-fiche dl { display: grid; gap: 6px; margin: 0 0 12px; }
.tmo-fiche dl > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; }
.tmo-fiche dt { color: var(--muted); font-size: 13px; }
.tmo-fiche dd { margin: 0; font-weight: 600; }
.tmo-fiche-alerte { margin: 0 0 12px; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.tmo-fiche-alerte.tmo-double { background: var(--red-soft); color: var(--red); }
.tmo-fiche-alerte.tmo-averifier { background: var(--amber-soft); color: var(--amber); }
.tmo .tmo-fiche .button { width: 100%; }
/* ---- Celui qui affecte (§171) : le panneau « Qui » à côté du tableau, les jours qui se touchent, les fiches où l'on saisit ---- */
.tmo-corps { flex: 0 1 auto; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 12px; min-height: 160px; }
.tmo-corps.tmo-avec-qui { flex: 1 1 auto; grid-template-columns: minmax(0, 1fr) 232px; min-height: 280px; }
.tmo-qui { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tmo-qui h3 { margin: 0; font-size: 16px; color: var(--navy); }
.tmo-qui p { margin: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.tmo-qui .tmo-qui-aide { flex: none; min-height: 5.4em; font-size: 13px; line-height: 1.35; font-weight: 700; color: var(--navy); }
.tmo-qui input { box-sizing: border-box; flex: none; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 8px 10px; border: 1px solid var(--line-strong, var(--line)); border-radius: 10px; background: var(--p-blanc); font: inherit; font-size: 16px; }
/* La liste des noms défile dans le panneau : la recherche reste sous les yeux. */
.tmo-qui-noms { flex: 1 1 0; display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.tmo-qui h4 { margin: 6px 0 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tmo .tmo-nomq { flex: none; display: block; box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 6px 10px; border: 1px solid; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.25; text-align: left; white-space: normal; overflow-wrap: anywhere; cursor: pointer; appearance: none; -webkit-appearance: none; }
.tmo-nomq.tmo-st { background: var(--blue-soft); border-color: #9cc1e0; color: var(--navy); }
.tmo-nomq.tmo-sal { background: var(--green-soft); border-color: #93cdb4; color: #0b4f38; }
.tmo .tmo-nomq[aria-pressed="true"] { border-color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.tmo-page[aria-busy="true"] .tmo-qui { opacity: .5; transition: opacity .2s ease .3s; }
/* Une ligne vide se touche aussi : elle garde la hauteur d'un doigt pour celui qui affecte. */
.tmo-ecrit .tmo-fin .tmo-grille { min-height: 48px; }
/* Un nom est choisi : chaque jour de chaque chantier est un bouton. Les barres s'estompent et laissent passer le
   toucher : toute la case se touche, même sous une barre. */
.tmo .tmo-case { display: block; box-sizing: border-box; width: auto; height: auto; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; cursor: pointer; appearance: none; -webkit-appearance: none; }
.tmo .tmo-case:hover, .tmo .tmo-case:focus-visible { background: var(--blue-soft); outline: 2px dashed var(--steel, var(--p-486581)); outline-offset: -3px; }
.tmo-pose .tmo-barres, .tmo-pose .tmo-barre { pointer-events: none; }
.tmo-pose .tmo-barre { opacity: .55; }
/* La barre en pointillés : ce que la fiche « Affecter » enregistrera. */
.tmo .tmo-barre.tmo-provisoire { background: var(--p-blanc); border: 2px dashed var(--steel, var(--p-486581)); color: var(--navy); cursor: default; }
/* Le glisser (§173) : les bouts d'une barre se tirent, un fantôme suit le pointeur, les jours visés s'éclairent. */
.tmo-ecrit .tmo-barre, .tmo .tmo-nomq { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tmo-bout { position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize; }
.tmo-bout-debut { left: 0; }
.tmo-bout-fin { right: 0; }
@media (pointer: coarse) { .tmo-bout { width: 18px; } }
.tmo-glisse, .tmo-glisse * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.tmo-fantome { position: fixed; z-index: 6; max-width: 240px; padding: 6px 10px; border-radius: 10px; background: var(--navy); color: var(--p-blanc); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; box-shadow: 0 10px 24px rgba(11, 32, 61, .3); pointer-events: none; }
.tmo-cible { position: absolute; top: 0; bottom: 0; z-index: 2; background: rgba(72, 101, 129, .16); outline: 2px dashed var(--steel, var(--p-486581)); outline-offset: -3px; pointer-events: none; }
/* Les fiches où l'on saisit. */
.tmo-fiche [hidden] { display: none; }
.tmo-fiche form { display: grid; gap: 10px; }
.tmo-fiche form > h3, .tmo-fiche form > p, .tmo-fiche form > dl { margin: 0; }
.tmo-fiche label { display: grid; gap: 4px; min-width: 0; font-size: 13px; font-weight: 700; color: var(--navy); }
.tmo-fiche select, .tmo-fiche input { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 44px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--p-blanc); color: var(--ink); font: inherit; font-size: 16px; font-weight: 400; }
.tmo-fiche-jours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tmo-pas { display: flex; align-items: center; gap: 10px; }
.tmo-pas-titre { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 700; color: var(--navy); }
.tmo-pas output { min-width: 2ch; font-size: 18px; font-weight: 700; text-align: center; color: var(--navy); }
.tmo .tmo-fiche .tmo-pas .button { flex: none; width: 44px; height: 44px; min-height: 44px; }
/* « Aussi les semaines suivantes : 1 · 2 · 3 » (§174). */
.tmo-suite { display: flex; align-items: center; gap: 8px; }
.tmo-suite-titre { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 700; color: var(--navy); }
.tmo .tmo-fiche .tmo-suite .button { flex: none; width: 44px; height: 44px; min-height: 44px; font-size: 16px; }
.tmo .tmo-fiche .tmo-suite .button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--p-blanc); }
.tmo-fiche-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tmo-fiche form[data-tmo-modifier] .tmo-fiche-actions .primary { grid-column: 1 / -1; }
.tmo-fiche .mo-erreur { margin: 0; }
/* Tablette tenue debout : le tableau garde toute la largeur, « Qui » passe dessous et ses noms se rangent en lignes. */
@media (max-width: 960px) {
  .tmo-corps.tmo-avec-qui { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(160px, 1fr) minmax(0, auto); }
  .tmo-qui { max-height: 34vh; }
  .tmo-qui .tmo-qui-aide { min-height: 0; }
  .tmo-qui-noms { flex: 1 1 auto; flex-direction: row; flex-wrap: wrap; align-content: flex-start; }
  .tmo-qui h4, .tmo-qui-noms p { flex: 1 1 100%; }
  .tmo .tmo-nomq { flex: 0 1 auto; width: auto; max-width: 100%; }
}
/* ---- L'échelle « 1 semaine | 4 semaines » et la vue de quatre semaines, en lecture seule (§175) ---- */
.tmo-echelle { display: inline-flex; flex: none; margin-left: auto; }
.tmo-echelle + .tmo-semaine { margin-left: 0; }
.tmo .tmo-echelle .button:first-child { border-radius: 10px 0 0 10px; }
.tmo .tmo-echelle .button:last-child { margin-left: -1px; border-radius: 0 10px 10px 0; }
.tmo .tmo-echelle .button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--p-blanc); }
/* 980 px : un jour garde 32 px au moins. Sur un écran plus étroit (tablette tenue debout), la grille défile de côté
   et la colonne des chantiers reste en place. */
.tmo-quatre { min-width: 980px; }
.tmo-quatre .tmo-rang > :first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); }
.tmo-quatre .tmo-jours > :first-child, .tmo-quatre .tmo-total > :first-child { z-index: 4; background: var(--soft); }
.tmo-quatre .tmo-jours > :first-child { display: flex; align-items: flex-end; }
.tmo-quatre .tmo-jours { text-transform: none; letter-spacing: 0; }
.tmo-24 { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); min-width: 0; }
.tmo-semaines { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-width: 0; }
/* « Ouvrir › » passe à la ligne s'il ne tient pas à côté du titre : rien n'est coupé, quelle que soit la police. */
.tmo .tmo-sem { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: baseline; gap: 2px 6px; box-sizing: border-box; width: auto; height: auto; min-width: 0; min-height: 56px; margin: 0; padding: 8px 8px 6px; border: 0; border-left: 2px solid var(--line-strong); border-radius: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; text-align: left; white-space: normal; cursor: pointer; appearance: none; -webkit-appearance: none; }
.tmo .tmo-sem:hover { background: var(--blue-soft); }
.tmo-sem strong { flex: 1 1 auto; color: var(--navy); font-size: 14px; white-space: nowrap; }
.tmo-sem em { flex: none; font-style: normal; font-weight: 700; color: var(--steel, var(--p-486581)); white-space: nowrap; }
.tmo-sem small { flex: 1 1 100%; min-width: 0; font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
.tmo-sem small.tmo-sem-manque { color: var(--red); font-weight: 700; }
.tmo-jour { display: grid; justify-items: center; min-width: 0; padding: 4px 0 6px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); font-weight: 700; }
.tmo-jour b { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tmo-jour span { color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.tmo-jour:nth-child(6n+1), .tmo-quatre .tmo-cases > :nth-child(6n+1), .tmo-quatre .tmo-total .tmo-24 > span:nth-child(6n+1) { border-left: 2px solid var(--line-strong); }
.tmo-quatre .tmo-cases, .tmo-quatre .tmo-barres { grid-template-columns: repeat(24, minmax(0, 1fr)); }
.tmo-quatre .tmo-cases > :nth-child(6n) { background: #f7f9fa; }
/* V137 (§280) : un jour d'un chantier actif se touche, et ouvre sa semaine. Les barres restent touchables par-dessus. */
.tmo .tmo-case4 { display: block; box-sizing: border-box; width: auto; height: auto; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; cursor: pointer; appearance: none; -webkit-appearance: none; }
.tmo .tmo-quatre .tmo-cases > .tmo-case4:nth-child(6n) { background: #f7f9fa; }
.tmo .tmo-case4:hover, .tmo .tmo-case4:focus-visible { background: var(--blue-soft); outline: 2px dashed var(--steel, var(--p-486581)); outline-offset: -3px; }
.tmo-quatre .tmo-barres { pointer-events: none; }
.tmo-quatre .tmo-barres .tmo-barre { pointer-events: auto; }
/* Arrivé d'un jour des quatre semaines : la ligne du chantier et le jour sont soulignés un instant. */
@keyframes tmo-vise { from { background: var(--blue-soft); } to { background: transparent; } }
.tmo-rang.tmo-vise > *, .tmo-jours .tmo-jour-vise { animation: tmo-vise 2.5s ease-out; }
.tmo-jours .tmo-jour-vise { box-shadow: inset 0 -3px 0 var(--steel, var(--p-486581)); }
.tmo-quatre .tmo-grille { min-height: 50px; }
.tmo-quatre .tmo-fin .tmo-grille { min-height: 36px; }
.tmo-quatre .tmo-barres { row-gap: 4px; padding: 6px 0; }
/* Deux lignes, comme sur le tableau d'une semaine : le nom, puis le nombre et le lot. Ce qui ne tient pas est coupé ;
   le détail complet se lit au survol. */
.tmo .tmo-quatre .tmo-barre { min-height: 36px; margin: 0 3px; padding: 2px 6px; border-radius: 7px; cursor: pointer; }
.tmo-quatre .tmo-nom { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmo-quatre .tmo-detail { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmo .tmo-quatre .tmo-barre.tmo-etroite { justify-items: center; padding: 2px 1px; }
.tmo-quatre .tmo-etroite .tmo-nom, .tmo-quatre .tmo-etroite .tmo-detail { text-overflow: clip; }
.tmo-quatre .tmo-barres > .tmo-besoin { justify-self: start; align-self: center; max-width: calc(100% - 8px); margin: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmo-quatre .tmo-total .tmo-24 > span { min-width: 0; padding: 10px 0; border-left: 1px solid var(--line); text-align: center; }
.tmo-quatre .tmo-zero { color: var(--muted); font-weight: 400; }
/* Le tableau demande de la place : sur un téléphone (ou un écran très bas), la page garde la liste, sans le bouton. */
@media (max-width: 700px), (max-height: 500px) { .mo-semaine .button[data-mo-tableau] { display: none; } }

/* V93 (§214) — « L'équipe du chantier » et « Demandes des conducteurs » dans le tableau de la réunion. */
.tmo-chantier-nom { display: block; width: calc(100% + 6px); min-height: 44px; margin: -10px 0 -6px -6px; padding: 6px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tmo-chantier-nom:hover, .tmo-chantier-nom:focus-visible { background: var(--blue-soft, #e6f0fd); }
.tmo-chantier-nom strong { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.tmo-chantier-nom:hover strong { text-decoration-color: currentColor; }
.tmo-ecrit:not(.tmo-pose) .tmo-grille { cursor: pointer; }
dialog.tmo-fiche.tmo-fiche-large { width: 460px; }
.tmo-equipe, .tmo-demandes { display: grid; gap: 12px; }
.tmo-equipe h4, .tmo-demandes h4 { margin: 0 0 6px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.tmo-eq-bloc { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.tmo-eq-bloc ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.tmo-eq-besoin { padding: 10px 12px; border: 0; border-radius: 10px; background: var(--p-bleu-pale); }
.tmo-eq-muet { padding: 10px 12px; border: 0; border-radius: 10px; background: var(--p-ambre-pale-2); color: var(--p-5c3b00); }
ul.tmo-eq-deja { padding: 0; list-style: none; }
.tmo-eq-barre { display: grid; width: 100%; min-height: 44px; gap: 2px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tmo-eq-barre.tmo-st { background: #e9f1fb; } .tmo-eq-barre.tmo-sal { background: #e6f5ec; }
.tmo-eq-barre span { font-size: 13px; color: var(--muted); }
.tmo-eq-noms { display: grid; gap: 6px; max-height: 38vh; overflow-y: auto; padding: 2px; }
.tmo-eq-noms h4 { margin-top: 6px; }
.tmo-eq-nom { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; }
.tmo-eq-nom.tmo-eq-coche { border-color: var(--p-acier-fonce); box-shadow: inset 0 0 0 1px var(--p-acier-fonce); }
.tmo-eq-nom label { display: flex; flex: 1 1 200px; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.tmo-eq-nom input[type="checkbox"] { width: 22px; height: 22px; flex: none; accent-color: var(--p-acier-fonce); }
.tmo-eq-qui { display: grid; gap: 1px; min-width: 0; }
.tmo-eq-qui small { color: var(--muted); font-size: 12px; }
.tmo-eq-qui small.tmo-libre { color: #0a6b4a; font-weight: 700; }
.tmo-eq-qui small.tmo-plein { color: var(--p-rouge-fonce); font-weight: 700; }
.tmo-eq-nom .tmo-pas { margin-left: auto; }
.tmo-demandes ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.tmo-dem-chantier { display: grid; gap: 4px; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tmo-dem-chantier small { color: var(--muted); }
.tmo-dem-chantier span { font-size: 13px; }
.tmo-dem-muets .tmo-dem-chantier { min-height: 36px; padding: 6px 10px; }
.tmo-demandes .count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--line); color: var(--ink); text-align: center; }
.tmo-nomq small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tmo-nomq small.tmo-libre, .tmo-eff-etat.tmo-libre { color: #0a6b4a; }
.tmo-nomq small.tmo-plein, .tmo-eff-etat.tmo-plein { color: var(--p-rouge-fonce); }
.tmo-eff-ligne { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 4px 8px; align-items: end; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.tmo-eff-ligne strong { grid-column: 1 / -1; font-size: 14px; }
.tmo-eff-ligne label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.tmo-eff-ligne input, .tmo-eff-ligne select { min-height: 44px; font-size: 16px; }
.tmo-eff-etat { grid-column: 1 / -1; min-height: 1em; font-weight: 700; }
.tmo-eq-lot { display: flex; align-items: center; gap: 6px; flex: 1 1 180px; font-size: 12px; color: var(--muted); }
.tmo-eq-lot select { flex: 1; min-width: 0; min-height: 44px; font-size: 16px; }
.tmo-nomq small.tmo-occ::after { content: attr(data-tmo-occ); }

/* V188 : la fenêtre « Qui proposer ? » défile (le corps prend la hauteur restante) et chaque nom a son bouton de 44 px. */
#side-panel-dialog .side-panel-body { flex: 1 1 auto; min-height: 0; -webkit-overflow-scrolling: touch; }
.mo-prop > .button { min-height: 44px; margin-top: 8px; }
/* V225 (§414) : le nom du chantier se touche et ouvre sa main d'œuvre sur quatre semaines ; 44 px au doigt, lu comme un lien, les longs noms vont à la ligne */
.mo-chantier-nom { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; min-height: 44px; padding: 4px 0; cursor: pointer; color: var(--blue, #1f4e79); text-decoration: underline; text-decoration-color: rgba(31, 78, 121, .35); text-underline-offset: 3px; overflow-wrap: anywhere; font: inherit; text-align: left; }
.mo-chantier-nom:focus-visible { outline: 2px solid var(--blue, #1f4e79); outline-offset: 2px; border-radius: 4px; }
.mo-muets li .mo-chantier-nom { flex: 1 1 auto; min-width: 0; }

/* V247 (§438) — les lignes de « Ce qui ne bouge pas » et d'« Argent en jeu » ouvrent ce qu'elles désignent. */
button.stuck-row { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line, #e2e8ee); font: inherit; color: inherit; cursor: pointer; min-height: 44px; }
button.stuck-row:hover, button.stuck-row:focus-visible { background: var(--p-acier-pale, #eef4fa); }
.stuck-fleche { display: block; font-size: 20px; line-height: 1; color: var(--muted, #4b5b6b); text-align: right; }
button.argent-ligne { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 44px; }
button.argent-ligne:hover, button.argent-ligne:focus-visible { background: var(--p-acier-pale, #eef4fa); }
