/* LFC Logistique — habillage v0.73 (maquette « Vue dépôt » d'Eduardo, 4 octobre 2026).
   Uniquement de la présentation : aucun comportement ne dépend de ce fichier. */
:root {
  --navy: var(--p-marine-2); --navy-2: #173d63; --navy-3: #1f4f7d;
  --gold: #f2c45f; --gold-deep: #c99a2e; --gold-soft: #fff4d6;
  --page: #f3f6fa; --card-shadow: 0 6px 22px rgba(15,42,71,.07);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
body { background: var(--page); }

/* Pictogrammes au trait */
.nav-icon svg, .ui-icon, .bell-button svg, .date-chip svg, .qa-icon svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}
.sidebar .nav-item span.nav-icon { display: inline-grid; place-items: center; width: 24px; }

/* Barre latérale (ordinateur) */
.sidebar { background: linear-gradient(180deg, var(--navy) 0%, #0b2036 100%); }
.nav-item.active { background: rgba(242,196,95,.14); color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }

/* En-tête */
.topbar-logo { display: none; }
.topbar-title { min-width: 0; }
.bell-button { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--p-blanc); color: var(--navy); display: grid; place-items: center; cursor: pointer; }
.bell-button:hover { box-shadow: 0 5px 14px rgba(16,42,67,.12); }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--gold); color: var(--navy); font: 800 12px/20px var(--police, system-ui, sans-serif); text-align: center; box-shadow: 0 0 0 2px var(--p-blanc); }
#open-create .plus { font-weight: 800; }

/* Bandeau Vue dépôt */
.depot-hero {
  position: relative; overflow: hidden; display: block;
  background: radial-gradient(120% 140% at 100% 0%, var(--navy-3) 0%, var(--navy-2) 35%, var(--navy) 75%);
  color: var(--p-blanc); border-radius: 18px; padding: 30px 32px; margin-bottom: 18px;
  box-shadow: 0 14px 34px rgba(15,42,71,.18);
}
.depot-hero .hero-art { position: absolute; right: -10px; bottom: -6px; height: 112%; width: auto; color: rgba(160,196,230,.16); pointer-events: none; }
.depot-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy) 30%, rgba(15,42,71,.55) 60%, rgba(15,42,71,0) 100%); pointer-events: none; }
.hero-text { position: relative; z-index: 1; max-width: 560px; }
.depot-hero .eyebrow { color: var(--p-blanc); letter-spacing: .2em; font-size: 12px; }
.depot-hero .eyebrow::after { content: ""; display: block; width: 34px; height: 2px; background: var(--gold); margin-top: 10px; }
.content .depot-hero h2 { color: var(--p-blanc); font-family: var(--serif); font-size: 40px; font-weight: 700; letter-spacing: -.01em; margin: 12px 0 6px; }
.hero-sub { margin: 0 0 18px; color: rgba(255,255,255,.86); font-size: 16px; max-width: 420px; }
.depot-hero .date-chip { display: inline-flex; align-items: center; gap: 10px; margin: 0; background: var(--gold); color: var(--navy); border-radius: 999px; padding: 9px 18px; font-size: 15px; font-weight: 700; }
.depot-hero .date-chip svg { width: 20px; height: 20px; }

/* Mouvements rapides */
.quick-movement-actions { margin: 0 0 18px; text-align: left; width: 100%; }
.quick-movement-label { display: none; }
.quick-movement-actions > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.button.quick-movement-button { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 14px; border-radius: 14px; text-align: left; box-shadow: var(--card-shadow); }
.button.secondary.quick-movement-button { border-color: var(--p-filet); }
.qm-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--page); color: var(--navy); flex-shrink: 0; }
.button.primary .qm-icon { background: rgba(255,255,255,.12); color: var(--p-blanc); }
.qm-text { display: grid; min-width: 0; flex: 1; }
.qm-text strong { font-size: 18px; line-height: 1.2; }
.qm-text small { font-size: 13px; font-weight: 500; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qm-chevron { width: 18px; height: 18px; opacity: .7; }

/* Indicateurs */
.metric-grid { gap: 14px; }
.metric.is-clickable { position: relative; display: flex; align-items: flex-start; gap: 16px; text-align: left; border: 1px solid #e8eef4; border-radius: 16px; padding: 20px 18px; background: var(--p-blanc); box-shadow: var(--card-shadow); }
.metric-icon { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: #e8f1fc; color: #2f6fba; }
.metric-icon .ui-icon { width: 28px; height: 28px; }
.metric-body { display: grid; min-width: 0; flex: 1; }
.metric .metric-label { color: var(--navy); font-size: 15px; font-weight: 600; }
.metric .metric-value { font-size: 40px; margin: 6px 0 4px; line-height: 1; }
.metric .metric-note { font-size: 13px; }
.metric-chevron { position: absolute; right: 14px; bottom: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #e8f1fc; color: #2f6fba; }
.metric-chevron .ui-icon { width: 16px; height: 16px; stroke-width: 2.4; }
.metric-pending { background: linear-gradient(135deg, var(--p-blanc) 55%, #f1faf5); }
.metric-pending .metric-icon, .metric-pending .metric-chevron { background: #e2f5ec; color: var(--p-1f8a62); }
.metric-late, .metric-lateReturns, .metric-claims { background: linear-gradient(135deg, var(--p-blanc) 45%, #fdf0ef); }
.metric-late .metric-icon, .metric-late .metric-chevron, .metric-lateReturns .metric-icon, .metric-lateReturns .metric-chevron, .metric-claims .metric-icon, .metric-claims .metric-chevron { background: #fbe1df; color: var(--p-rouge); }
.metric.alert .metric-value { color: var(--p-rouge); }
.metric-returns { background: linear-gradient(135deg, var(--p-blanc) 50%, #fff7e6); }
.metric-returns .metric-icon, .metric-returns .metric-chevron { background: #fdefc9; color: var(--p-a7720f); }
.metric.metric-stock-value { background: radial-gradient(120% 160% at 100% 0%, var(--navy-3), var(--navy) 70%); border-color: transparent; color: var(--p-blanc); align-items: center; }
.metric-stock-value .metric-icon { width: 72px; height: 72px; background: rgba(255,255,255,.1); color: var(--p-blanc); }
.metric-stock-value .metric-icon .ui-icon { width: 34px; height: 34px; }
.metric-stock-value .metric-label, .metric-stock-value .metric-value { color: var(--p-blanc); }
.metric-stock-value .metric-note { color: rgba(255,255,255,.8); }
.metric.metric-stock-value.price-missing .metric-note { color: var(--gold); }
.metric-stock-value .metric-chevron { position: static; width: 44px; height: 44px; background: rgba(255,255,255,.14); color: var(--p-blanc); }

/* Accès rapide */
.quick-access { margin: 6px 0 34px; }
.quick-access-head h2 { font-size: 15px !important; letter-spacing: .16em !important; text-transform: uppercase; margin-bottom: 12px !important; }
.quick-access-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick-access-item { display: grid; justify-items: center; gap: 4px; padding: 18px 10px; border: 1px solid var(--p-filet); border-radius: 14px; background: var(--p-blanc); color: var(--navy); font: inherit; cursor: pointer; box-shadow: var(--card-shadow); text-align: center; }
.quick-access-item:hover { border-color: #b9cde0; }
.qa-icon svg { width: 30px; height: 30px; margin-bottom: 6px; }
.quick-access-item strong { font-size: 15px; }
.quick-access-item small { color: var(--muted); font-size: 12px; }

/* Sauvegarde : outils discrets sous l'accès rapide */
#dashboard-view .backup-tools { margin: -14px 0 30px; gap: 6px; }
#dashboard-view .backup-tools .button, #dashboard-view .backup-tools label.button { font-size: 12px; padding: 8px 11px; border-radius: 999px; color: var(--muted); }

/* Cartes des autres vues */
.return-card, .board-column, .operations-card { border-radius: 14px; }
.return-card { box-shadow: var(--card-shadow); border-color: var(--p-filet); }

@media (max-width: 1050px) {
  .quick-access-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Téléphone */
@media (max-width: 700px) {
  body { padding-bottom: 92px; }
  .topbar { min-height: 72px; padding: 10px 14px; background: rgba(255,255,255,.94); }
  .topbar-logo { display: block; }
  .topbar-title { display: none; }
  .top-actions { gap: 10px; margin-left: auto; }
  .top-actions #open-create { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; font-size: 24px; line-height: 1; }
  .top-actions #open-create .label { display: none; }

  .content { padding: 14px 12px 30px; }
  .depot-hero { padding: 24px 22px; border-radius: 16px; }
  .depot-hero .hero-art { right: -60px; opacity: .9; }
  .content .depot-hero h2 { font-size: 34px; }
  .hero-sub { font-size: 15px; }

  .quick-movement-actions > div { gap: 8px; }
  .button.quick-movement-button { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 10px; }
  .qm-icon { width: 38px; height: 38px; }
  .qm-icon .ui-icon { width: 20px; height: 20px; }
  .qm-text strong { font-size: 16px; }
  .qm-text small { font-size: 12px; white-space: normal; }
  .qm-chevron { position: absolute; right: 8px; top: 14px; }
  .button.quick-movement-button { position: relative; }

  .metric-grid { gap: 10px; margin-bottom: 18px; }
  .metric.is-clickable { flex-direction: column; gap: 10px; padding: 14px 12px 16px; border-radius: 14px; }
  .metric-icon { width: 46px; height: 46px; }
  .metric-icon .ui-icon { width: 23px; height: 23px; }
  .metric .metric-label { font-size: 14px; }
  .metric .metric-value { font-size: 32px; }
  .metric .metric-note { font-size: 12px; padding-right: 26px; }
  .metric-chevron { width: 26px; height: 26px; right: 10px; bottom: 12px; }
  .metric.metric-stock-value { flex-direction: row; gap: 14px; padding: 16px 14px; }
  .metric-stock-value .metric-icon { width: 56px; height: 56px; }
  .metric-stock-value .metric-value { font-size: 30px; }
  .metric-stock-value .metric-note { padding-right: 0; }
  .metric-stock-value .metric-chevron { width: 38px; height: 38px; }

  .quick-access-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .quick-access-item { padding: 12px 4px; border-radius: 12px; }
  .qa-icon svg { width: 26px; height: 26px; margin-bottom: 2px; }
  .quick-access-item strong { font-size: 12px; line-height: 1.2; }
  .quick-access-item small { font-size: 12px; line-height: 1.2; }

  /* Barre du bas */
  .sidebar { height: 82px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, var(--navy-2), var(--navy)); }
  .nav-item { color: #c9d6e2; gap: 4px; }
  .nav-item span.nav-icon svg { width: 23px; height: 23px; }
  .nav-item.active { background: rgba(242,196,95,.14); color: var(--gold); box-shadow: inset 0 3px 0 var(--gold); }
}

/* ===== v0.74 — Chantiers, fiche chantier, stock en liste, menu « Plus » ===== */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-more { display: none !important; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid #dbe4ec; background: var(--p-blanc); color: var(--navy); border-radius: 999px; padding: 8px 14px; font: 600 13px/1 var(--police, system-ui, sans-serif); cursor: pointer; }
.chip.active { background: var(--navy); border-color: var(--navy); color: var(--p-blanc); }

/* Liste des chantiers */
.sites-toolbar { display: grid; gap: 12px; margin-bottom: 16px; }
.sites-search { position: relative; display: block; max-width: 520px; }
.sites-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.sites-search input { width: 100%; border: 1px solid #dbe4ec; border-radius: 12px; padding: 12px 14px 12px 42px; font: 15px var(--police, system-ui, sans-serif); background: var(--p-blanc); }
.sites-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.site-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px; border: 1px solid var(--p-filet); border-radius: 14px; background: var(--p-blanc); box-shadow: var(--card-shadow); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.site-row:hover { border-color: #b9cde0; }
.site-thumb, .site-asset-photo { width: 76px; height: 64px; flex-shrink: 0; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy-3), var(--navy)); color: rgba(255,255,255,.85); }
.site-thumb img, .site-asset-photo img, .site-hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.site-thumb svg, .site-asset-photo svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.site-row-body { display: grid; gap: 3px; min-width: 0; flex: 1; }
.site-row-body strong { color: var(--navy); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-row-body small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-row-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.site-row-meta .status { font-size: 12px; padding: 4px 8px; }
.site-count { font-size: 12px; color: var(--muted); background: var(--page); border-radius: 999px; padding: 4px 8px; }
.site-chevron { width: 18px; height: 18px; color: var(--muted); }

/* Fiche chantier */
.sheet-dialog { width: min(720px, calc(100% - 30px)); padding: 0; overflow: hidden; }
.site-detail { max-height: calc(100dvh - 40px); overflow-y: auto; }
.site-hero { position: relative; min-height: 210px; color: var(--p-blanc); display: flex; align-items: flex-end; }
.site-hero-photo { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy-3), var(--navy)); color: rgba(255,255,255,.18); }
.site-hero-photo svg { width: 120px; height: 120px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.site-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,42,71,.15) 30%, rgba(15,42,71,.88)); }
.site-hero-text { position: relative; z-index: 1; padding: 18px 20px; display: grid; gap: 4px; justify-items: start; }
.site-hero-text h2 { margin: 0; color: var(--p-blanc); font-size: 22px; }
.site-hero-text p { margin: 0; color: rgba(255,255,255,.85); font-size: 13px; }
.site-back { position: absolute; z-index: 2; top: 12px; left: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(15,42,71,.55); color: var(--p-blanc); display: grid; place-items: center; cursor: pointer; }
.site-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.site-photo-button { position: absolute; z-index: 2; top: auto; bottom: 12px; right: 12px; min-height: 44px; display: inline-flex; align-items: center; box-sizing: border-box; background: rgba(255,255,255,.92); color: var(--navy); border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.site-tabs { display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); overflow-x: auto; background: var(--p-blanc); position: sticky; top: 0; z-index: 3; }
.site-tabs button { border: 0; background: none; padding: 12px 10px; font: 600 13px var(--police, system-ui, sans-serif); color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; cursor: pointer; }
.site-tabs button.active { color: var(--navy); border-bottom-color: var(--gold); }
.site-panel { padding: 16px 18px 24px; display: grid; gap: 10px; }
.site-info { margin: 0; display: grid; gap: 14px; }
.site-info dt { color: var(--muted); font-size: 12px; }
.site-info dd { margin: 2px 0 0; color: var(--navy); font-weight: 600; font-size: 14px; }
.site-op, .site-asset { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 1px solid var(--p-filet); border-radius: 12px; background: var(--p-blanc); text-align: left; font: inherit; color: inherit; }
.site-op { cursor: pointer; }
.site-op > span:nth-child(2), .site-asset > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.site-op strong, .site-asset strong { color: var(--navy); font-size: 14px; }
.site-op small, .site-asset small { color: var(--muted); font-size: 12px; }
.site-asset-photo { width: 52px; height: 52px; }

/* Stock : petite image et quantité */
.stock-families { margin-bottom: 14px; }
.stock-family-icon { width: 100%; height: 100%; display: grid; place-items: center; background: #eef3f8; color: var(--navy-3); }
.stock-family-icon svg { width: 40%; height: 40%; max-width: 46px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.family-plaques { background: #eef1f5; } .family-profils { background: #e9f0f7; } .family-visserie { background: #f2f0ea; } .family-securite { background: #fdf6d8; }
.family-enduits { background: #f4efe6; } .family-isolation { background: #fbf3dc; color: var(--p-a7720f); }
.stock-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stock-qty { display: grid; justify-items: end; flex-shrink: 0; text-align: right; }
.stock-qty strong { color: var(--navy); font-size: 15px; }
.stock-qty small { font-size: 12px; font-weight: 700; }
.stock-qty.ok small { color: var(--p-1f8a62); } .stock-qty.low small { color: var(--p-a7720f); } .stock-qty.out small { color: var(--p-rouge); }

/* Menu « Plus » */
.more-dialog { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(340px, 86vw); border-radius: 0; padding: 0; background: var(--navy); color: var(--p-blanc); }
.more-dialog::backdrop { background: rgba(10,22,34,.5); }
.more-panel { min-height: 100%; display: flex; flex-direction: column; padding: calc(16px + env(safe-area-inset-top, 0px)) 14px calc(16px + env(safe-area-inset-bottom, 0px)); }
.more-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.more-logo { width: 124px; height: 64px; background: var(--p-blanc) url("assets/logo-lfc.png") no-repeat -3px -15px / 170px auto; border-radius: 8px; }
.more-head .icon-button { background: rgba(255,255,255,.12); color: var(--p-blanc); }
.more-list { display: grid; gap: 4px; }
.more-item { display: flex; align-items: center; gap: 14px; padding: 13px 12px; border: 0; border-radius: 10px; background: transparent; color: #e6eef5; font: 500 15px var(--police, system-ui, sans-serif); text-align: left; cursor: pointer; }
.more-item .nav-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.more-item span:nth-child(2) { flex: 1; }
.more-item.active { background: linear-gradient(90deg, #b8913e, #c9a24e); color: var(--p-blanc); }
.more-chevron { width: 16px; height: 16px; opacity: .7; }
.more-tagline { margin-top: auto; padding: 18px 12px 0; font-family: var(--serif); font-size: 18px; color: rgba(255,255,255,.85); }

@media (max-width: 700px) {
  .sites-list { grid-template-columns: 1fr; gap: 8px; }
  .site-row { padding: 10px; gap: 12px; }
  .site-thumb { width: 72px; height: 60px; }
  .chip { padding: 7px 12px; font-size: 12px; }
  .sheet-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .sheet-dialog > div.site-detail { max-height: 100dvh; height: 100dvh; }
  .site-hero { min-height: 230px; padding-top: env(safe-area-inset-top, 0px); }

  /* Barre du bas : 5 boutons, le reste dans « Plus » */
  .sidebar nav { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .sidebar .nav-secondary { display: none !important; }
  /* V23 : ordre des onglets de la barre du bas propre au profil (§97). */
  .sidebar .nav-item[data-view] { order: var(--phone-order, 5); } .sidebar #nav-more { order: 9; }
  .nav-more { display: flex !important; }
  .nav-item { font-size: 12px !important; }

  /* Stock en lignes avec petite image */
  .stock-grid { gap: 8px; }
  .stock-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 12px; padding: 10px; align-items: start; border-radius: 12px; }
  .stock-card-photo { width: 64px; height: 64px !important; border-radius: 10px; overflow: hidden; font-size: 0; grid-row: 1 / span 2; }
  .stock-card-photo img { width: 100%; height: 100%; object-fit: cover !important; }
  .stock-card-body { padding: 0 !important; min-width: 0; }
  .stock-card h3 { font-size: 14px; line-height: 1.25; }
  .stock-reference { margin: 2px 0 6px !important; font-size: 12px !important; }
  .stock-meta { grid-template-columns: 1fr 1fr; gap: 6px; padding-top: 8px; font-size: 12px; }
  .stock-meta > div:nth-child(1), .stock-meta > div:nth-child(n+4) { display: none; }
  .stock-meta { border-top: 0; padding-top: 0; }
  .stock-summary { grid-template-columns: 1fr 1fr !important; gap: 8px; }
  .stock-summary > div { padding: 10px 12px; }
  .stock-summary strong { font-size: 18px; }
  .stock-card .stock-edit { width: auto; min-height: 0; border: 0; padding: 4px 0; background: none; color: var(--blue); font-weight: 700; box-shadow: none; }
  .stock-card .status, .stock-card .muted { display: none; }
  .stock-card .stock-edit { margin-top: 8px; min-height: 36px; padding: 6px; font-size: 12px; }
}

/* ===== v0.75 — Planning en calendrier ===== */
.planning-calendar { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 16px; margin-bottom: 26px; align-items: start; }
.cal-card, .cal-day { background: var(--p-blanc); border: 1px solid var(--p-filet); border-radius: 16px; box-shadow: var(--card-shadow); padding: 16px; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cal-head strong { color: var(--navy); font-size: 17px; min-width: 150px; text-align: center; }
.cal-nav { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--p-filet); background: var(--p-blanc); color: var(--navy); display: grid; place-items: center; cursor: pointer; }
.cal-nav .ui-icon { width: 16px; height: 16px; }
.ui-icon.flip { transform: scaleX(-1); }
.cal-today { margin-left: auto; padding: 6px 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.cal-dow { font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 0; }
.cal-cell { display: grid; justify-items: center; gap: 2px; padding: 6px 0 4px; border: 0; border-radius: 10px; background: none; font: 600 14px var(--police, system-ui, sans-serif); color: var(--navy); cursor: pointer; min-height: 44px; }
.cal-cell.empty { cursor: default; }
.cal-cell span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.cal-cell:hover span { background: var(--page); }
.cal-cell.today span { background: var(--navy); color: var(--p-blanc); }
.cal-cell.selected span { background: var(--gold); color: var(--navy); }
.cal-cell i { display: flex; gap: 2px; height: 6px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--navy-3); }
.dot.return { background: var(--gold-deep); } .dot.inbound { background: var(--p-1f8a62); } .dot.late { background: var(--p-rouge); } .dot.outbound { background: var(--navy-3); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-day h3 { margin: 0 0 12px; color: var(--navy); font-size: 16px; }
.cal-day { display: grid; gap: 8px; align-content: start; }
.cal-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--p-filet); border-left: 4px solid var(--navy-3); border-radius: 10px; background: var(--p-blanc); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.cal-item.tone-return { border-left-color: var(--gold-deep); } .cal-item.tone-inbound { border-left-color: var(--p-1f8a62); } .cal-item.tone-late { border-left-color: var(--p-rouge); } .cal-item.tone-done { border-left-color: #c9d3dc; opacity: .75; }
.cal-time { width: 46px; flex-shrink: 0; font-weight: 700; color: var(--navy); font-size: 13px; }
.cal-text { display: grid; min-width: 0; flex: 1; }
.cal-text strong { color: var(--navy); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-text small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-title { color: var(--navy); font-size: 15px; margin: 0 0 12px; }
@media (max-width: 900px) { .planning-calendar { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .cal-card, .cal-day { padding: 12px; border-radius: 14px; }
  .cal-item .status { display: none; }
}

/* ===== v0.76 — Fiche chantier : tâches, documents, équipe ===== */
.site-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border: 1px dashed #c9d6e2; border-radius: 12px; background: #f8fafc; }
.site-form input, .site-form select { flex: 1 1 160px; min-width: 0; border: 1px solid #d5dfe8; border-radius: 9px; padding: 10px; font: 14px var(--police, system-ui, sans-serif); background: var(--p-blanc); }
.site-form .button { flex: 0 0 auto; }
.site-file { display: inline-flex; align-items: center; max-width: 220px; overflow: hidden; } .site-file span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.site-task, .site-person { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--p-filet); border-radius: 12px; background: var(--p-blanc); }
.site-task label { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.site-task input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--navy); flex-shrink: 0; }
.site-task span, .site-person > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.site-task strong, .site-person strong { color: var(--navy); font-size: 14px; }
.site-task small, .site-person small { color: var(--muted); font-size: 12px; }
.site-task.done strong { text-decoration: line-through; color: var(--muted); }
.site-person .avatar { width: 40px; height: 40px; font-size: 13px; flex-shrink: 0; }
.site-person a { color: var(--blue); font-size: 12px; text-decoration: none; overflow-wrap: anywhere; }
.site-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.site-doc { margin: 0; border: 1px solid var(--p-filet); border-radius: 12px; overflow: hidden; background: var(--p-blanc); }
.site-doc img { display: block; width: 100%; height: 120px; object-fit: cover; background: #f3f6f8; cursor: zoom-in; }
.site-doc figcaption { display: grid; gap: 2px; padding: 8px 10px; }
.site-doc strong { color: var(--navy); font-size: 13px; }
.site-doc small { color: var(--muted); font-size: 12px; }
.site-doc .row-action { justify-self: start; padding: 2px 0; }
@media (max-width: 700px) { .site-form .button { flex: 1 1 100%; } .site-file { max-width: none; justify-content: center; } }

/* ===== v0.77 — Actualités et notifications ===== */
.news-feed { background: var(--p-blanc); border: 1px solid var(--p-filet); border-radius: 16px; box-shadow: var(--card-shadow); padding: 16px 16px 8px; margin: 0 0 22px; }
.news-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.content .news-head h2 { font-size: 17px; }
.news-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 2px; border: 0; border-top: 1px solid #eef2f6; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.news-item:first-of-type { border-top: 0; }
.news-icon { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: #e8f1fc; color: #2f6fba; }
.news-icon .ui-icon { width: 20px; height: 20px; }
.news-return .news-icon { background: #fdefc9; color: var(--p-a7720f); } .news-inbound .news-icon, .news-decision .news-icon, .news-task .news-icon { background: #e2f5ec; color: var(--p-1f8a62); } .news-claim .news-icon { background: #fbe1df; color: var(--p-rouge); }
.news-text { display: grid; min-width: 0; flex: 1; }
.news-text strong { color: var(--navy); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-text small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-item time { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.side-panel { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(420px, 92vw); border-radius: 0; padding: 0; }
.side-panel::backdrop { background: rgba(10,22,34,.45); }
.side-panel-inner { display: flex; flex-direction: column; height: 100%; }
.side-panel-head { display: flex; align-items: center; justify-content: space-between; padding: calc(16px + env(safe-area-inset-top, 0px)) 18px 14px; background: var(--navy); color: var(--p-blanc); }
.side-panel-head h2 { margin: 0; font-size: 18px; color: var(--p-blanc); }
.side-panel-head .icon-button { background: rgba(255,255,255,.14); color: var(--p-blanc); }
.side-panel-body { overflow-y: auto; padding: 12px 14px calc(20px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; align-content: start; }
.side-panel-body .news-item { border: 1px solid #eef2f6; border-radius: 12px; padding: 10px; }
.notif-item { display: grid; gap: 2px; width: 100%; padding: 12px; border: 1px solid var(--p-filet); border-left: 4px solid var(--navy-3); border-radius: 10px; background: var(--p-blanc); text-align: left; font: inherit; cursor: pointer; }
.notif-item strong { color: var(--navy); font-size: 14px; } .notif-item small { color: var(--muted); font-size: 12px; }
.notif-late { border-left-color: var(--p-rouge); } .notif-claim { border-left-color: var(--p-rouge); background: #fff8f7; } .notif-stock { border-left-color: var(--gold-deep); } .notif-task { border-left-color: var(--p-1f8a62); }
/* V164 (§310) : déjà traité par un autre — filet vert, et la marque (« Déjà validé par … ») lisible, en gras, sur sa ligne */
.notif-deja { border-left-color: var(--p-1f8a62); } .notif-item .notif-marque { color: var(--navy); font-weight: 600; }

/* ===== v0.78 — Achats et indicateurs ===== */
.purchase-summary small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.purchase-group { display: flex; align-items: center; gap: 8px; color: var(--navy); font-size: 15px; margin: 18px 0 10px; }
.purchase-card { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px; margin-bottom: 8px; border: 1px solid var(--p-filet); border-radius: 14px; background: var(--p-blanc); box-shadow: var(--card-shadow); }
.purchase-thumb { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: #eef3f8; }
.purchase-thumb img { width: 100%; height: 100%; object-fit: cover; }
.purchase-body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.purchase-body strong { color: var(--navy); font-size: 14px; }
.purchase-body small { color: var(--muted); font-size: 12px; }
.purchase-actions { display: flex; gap: 8px; flex-basis: 100%; justify-content: flex-end; }
.purchase-form { display: grid; gap: 12px; }
.purchase-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 700; color: var(--navy); }
.purchase-form input { border: 1px solid #d5dfe8; border-radius: 9px; padding: 11px; font: 15px var(--police, system-ui, sans-serif); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--p-blanc); border: 1px solid var(--p-filet); border-radius: 14px; padding: 14px; box-shadow: var(--card-shadow); display: grid; gap: 4px; }
.kpi span { color: var(--muted); font-size: 12px; font-weight: 600; }
.kpi strong { color: var(--navy); font-size: 26px; letter-spacing: -.02em; }
.kpi small { color: var(--muted); font-size: 12px; }
.kpi.warn strong { color: var(--p-a7720f); } .kpi.bad strong { color: var(--p-rouge); }
.kpi-card { background: var(--p-blanc); border: 1px solid var(--p-filet); border-radius: 16px; padding: 16px; margin-bottom: 14px; box-shadow: var(--card-shadow); }
.kpi-card h3 { margin: 0 0 12px; color: var(--navy); font-size: 15px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 200px) 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.bar-label { color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; border-radius: 999px; background: #edf2f7; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--navy-3), var(--navy)); }
.bar-fill.warn { background: var(--gold-deep); }
.bar-row strong { color: var(--navy); font-size: 13px; }
/* Note sous une barre (V51 lot 1) : le détail qui rend le chiffre lisible — part, temps mesuré, zones.
   Un chiffre sans sa cause ne se discute pas, il s'encaisse. Alignée sous le libellé, elle passe à la ligne. */
.bar-note { margin: 0 0 8px; font-size: 12px; line-height: 1.45; }
/* Ce que l'application répond après un import de fournisseurs : visible, et qui reste à l'écran.
   Un message qui s'efface en 3 secondes ne prouve rien à qui regarde la page une minute plus tard. */
.supplier-state { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #f8fafc; color: var(--muted); font-size: 13px; line-height: 1.45; }
.supplier-state.alerte { border-color: #f0c2bd; background: var(--red-soft); color: #9c3430; font-weight: 600; }
@media (max-width: 1050px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .kpi strong { font-size: 22px; } .bar-row { grid-template-columns: 96px 1fr auto; } .purchase-actions .button { flex: 1; } }

/* ===== v0.79 — Arrivée d'une commande chantier ===== */
.button.delivery-quick { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: 14px; border: 1px dashed #c9a24e; background: #fffaf0; color: var(--navy); text-align: left; box-shadow: var(--card-shadow); position: relative; }
.delivery-quick > .ui-icon:first-child { width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: #fdefc9; color: var(--p-a7720f); }
.delivery-quick span { display: grid; flex: 1; min-width: 0; }
.delivery-quick strong { font-size: 16px; } .delivery-quick small { font-size: 12px; color: var(--muted); font-weight: 500; }
.delivery-quick .qm-chevron { position: static; }
.photo-field { padding: 12px; border: 1px dashed #c9d6e2; border-radius: 10px; background: #f8fafc; }
.photo-field .photo-name { display: block; margin-top: 6px; color: var(--p-1f8a62); font-size: 12px; font-weight: 700; }
.site-delivery-button { width: 100%; margin-bottom: 4px; }
#delivery-form { padding: 24px; }

/* ===== v0.80 — lecture automatique du BL (serveur) ===== */
.auto-filled { background: #fff7df !important; border-color: #d9b45c !important; }
.bl-status { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; background: #eef3f8; color: var(--navy); }
.bl-status[data-tone="ok"] { background: #e2f5ec; color: var(--p-1f6e4f); }
.bl-status[data-tone="warn"] { background: #fff4d6; color: #8a5a00; }
.bl-status[data-tone="busy"]::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: lfc-spin .8s linear infinite; }
@keyframes lfc-spin { to { transform: rotate(360deg); } }
.photo-field small.field-hint { display: block; margin: 4px 0 6px; font-weight: 600; color: #8a5a00; }

/* ===== v0.81 — Dotation vêtements ===== */
.clothing-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-bottom: 18px; }
.clothing-card { background: var(--p-blanc); border: 1px solid var(--p-filet); border-radius: 14px; padding: 14px; box-shadow: var(--card-shadow); }
.clothing-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.clothing-card header > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.clothing-card header strong { color: var(--navy); } .clothing-card header small { color: var(--muted); font-size: 12px; }
.clothing-card .avatar { width: 40px; height: 40px; }
.clothing-counters { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.clothing-counters li { display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; border-left: 4px solid var(--p-1f8a62); background: #f4fbf7; font-size: 12px; }
.clothing-counters li.blocked { border-left-color: var(--p-rouge); background: #fff6f5; }
.clothing-counters strong { color: var(--navy); font-size: 13px; } .clothing-counters span { color: var(--muted); }
.clothing-counters em { font-style: normal; font-weight: 700; color: var(--p-1f6e4f); } .clothing-counters li.blocked em { color: var(--p-rouge); }
/* V104 (§236) : vignette du vêtement remis, et photo du vêtement choisi dans « Remettre un vêtement ». */
.clothing-counters li.with-photo { grid-template-columns: 48px minmax(0, 1fr); column-gap: 10px; }
.clothing-counters li.with-photo > img { grid-row: 1 / span 3; width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--p-blanc); cursor: zoom-in; }
.clothing-counters li.with-photo > :not(img) { grid-column: 2; }
.clothing-photo img { display: block; width: 100%; max-width: 220px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--p-filet-2); cursor: zoom-in; }
.clothing-status { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.clothing-status[data-tone="ok"] { background: #e2f5ec; color: var(--p-1f6e4f); }
.clothing-status[data-tone="blocked"] { background: var(--p-rouge-pale); color: var(--p-a12620); }
.clothing-derogation { display: grid; gap: 10px; padding: 12px; border: 1px solid #f0c2bd; border-radius: 12px; background: #fff8f7; }
.clothing-derogation strong { color: var(--p-a12620); }
#clothing-form { padding: 24px; }
@media (max-width: 700px) { .clothing-list { grid-template-columns: 1fr; } }

/* Nature du matériel (registre §72) */
.nature-pill { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 10px; font: 700 12px/16px var(--police, system-ui, sans-serif); vertical-align: middle; white-space: nowrap; }
.nature-aclasser { background: var(--amber-soft, var(--p-ambre-pale)); color: var(--p-936713); }
.nature-outil { background: var(--blue-soft, #e6f0fd); color: #2a5f9f; }
.nature-location { background: var(--green-soft, #e2f5ed); color: var(--p-1f6e4f); }
.nature-consommable { background: #edf1f4; color: #52667a; }
.classify-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: var(--amber-soft, var(--p-ambre-pale)); color: var(--p-7a5410); font-weight: 600; }
.classify-list { display: grid; gap: 10px; margin-top: 14px; }
.classify-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line, var(--p-filet-2)); border-radius: 10px; background: var(--p-blanc); }
.classify-row small { display: block; color: var(--muted, var(--p-gris-texte)); margin-top: 2px; }
.classify-row select { width: 100%; min-height: 44px; padding: 8px; border: 1px solid var(--p-bordure-2); border-radius: 7px; font: inherit; font-size: 16px; }
/* V122 (§265) : le panneau fait 420 px — le nom et la nature sur toute la largeur, « Confirmer » et « Voir la fiche » côte à côte */
.classify-row > div:first-child, .classify-row select { grid-column: 1 / -1; min-width: 0; overflow-wrap: anywhere; }
.classify-row .button { min-height: 44px; }
@media (max-width: 700px) { .classify-row { grid-template-columns: 1fr; } .classify-banner { flex-direction: column; align-items: stretch; } }

/* Demandes des salariés (registre §73) */
.request-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--line, var(--p-filet-2)); border-radius: 12px; background: var(--p-blanc); }
.request-main small, .request-motif { display: block; color: var(--muted, var(--p-gris-texte)); margin-top: 2px; }
.request-state { font-weight: 700; color: var(--navy); text-align: right; }
.request-row.state-refusee .request-state { color: var(--p-a12620); }
.request-row.state-validee .request-state, .request-row.state-approuvee .request-state, .request-row.state-autorisee .request-state { color: var(--p-1f6e4f); }
.request-row.state-annulee, .request-row.state-remise { opacity: .7; }
.request-actions, .request-motif { grid-column: 1 / -1; }
.request-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.request-reason { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.request-reason input { flex: 1 1 220px; min-height: 40px; padding: 8px 10px; border: 1px solid var(--p-bordure-2); border-radius: 7px; font: inherit; }
.request-reason .auth-error { flex: 1 1 100%; margin: 0; }
@media (max-width: 700px) { .request-row { grid-template-columns: 1fr; } .request-state { text-align: left; } }

/* Qui a quoi (registre §74) */
.who-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.who-filters input, .who-filters select { min-height: 40px; padding: 8px 10px; border: 1px solid var(--p-bordure-2); border-radius: 7px; font: inherit; background: var(--p-blanc); }
.who-filters input { flex: 1 1 220px; }
.who-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.who-card { padding: 14px 16px; border: 1px solid var(--line, var(--p-filet-2)); border-radius: 12px; background: var(--p-blanc); }
.who-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.who-types { color: var(--muted, var(--p-gris-texte)); font-size: 12px; font-weight: 700; }
.who-card h4 { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted, var(--p-gris-texte)); }
.who-card ul, .who-out { margin: 0; padding-left: 18px; }
.who-card li { margin: 3px 0; }
.who-flag { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 10px; background: var(--amber-soft, var(--p-ambre-pale)); color: var(--p-936713); font-size: 12px; font-weight: 700; }
.request-wear { grid-column: 1 / -1; color: var(--p-936713); font-weight: 700; }

/* Mode test des e-mails (registre §76) */
.email-test-banner { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--amber-soft, var(--p-ambre-pale)); color: var(--p-7a5410); font-weight: 700; }
.notification-address { font-weight: 600; }

/* Prix à renseigner (registre §79) */
.price-planning { margin: 0 0 22px; padding: 16px; border: 1px solid var(--line, var(--p-filet-2)); border-radius: 12px; background: var(--p-blanc); }
.price-planning h3 { margin: 0; color: var(--navy); }
.price-list { display: grid; gap: 8px; margin-top: 12px; max-height: 70vh; overflow: auto; }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 140px auto; gap: 8px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line, var(--p-filet-2)); border-radius: 10px; }
.price-main small { display: block; color: var(--muted, var(--p-gris-texte)); margin-top: 2px; }
.price-state { padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.price-manquant { background: var(--red-soft, var(--p-rouge-pale)); color: var(--p-a12620); }
.price-a_confirmer { background: var(--amber-soft, var(--p-ambre-pale)); color: var(--p-936713); }
.price-row input { min-height: 40px; padding: 8px 10px; border: 1px solid var(--p-bordure-2); border-radius: 7px; font: inherit; width: 100%; }
.price-row .auth-error { grid-column: 1 / -1; margin: 0; }
@media (max-width: 700px) { .price-row { grid-template-columns: 1fr 1fr; } .price-main { grid-column: 1 / -1; } .price-row input { grid-column: 1 / -1; } .price-row .button { grid-column: 1 / -1; } }

/* Profils sans droit d'écriture sur le dépôt (conducteur, acheteur) : pas de boutons d'entrée, de sortie, de retour ni de classement (registre §83) */
body.depot-readonly #open-create, body.depot-readonly #open-create-2, body.depot-readonly #open-create-3, body.depot-readonly #open-equipment, body.depot-readonly #open-material-park, body.depot-readonly #open-stock, body.depot-readonly #scan-stock-qr,
body.depot-readonly [data-action="equipment-assign"], body.depot-readonly [data-action="equipment-return"], body.depot-readonly [data-action="park-assign"], body.depot-readonly [data-action="park-return"],
body.depot-readonly [data-action="return"], body.depot-readonly [data-action="repair-machine"], body.depot-readonly [data-action="repair-park"], body.depot-readonly [data-action="edit-stock"], body.depot-readonly [data-action="advance"],
body.depot-readonly [data-open-classify], body.depot-readonly .site-delivery-button:not([data-site-return]), body.depot-readonly [data-open-delivery], body.depot-readonly [data-quick-movement] { display: none !important; }
/* v0.288.0 : « Demander un retour au dépôt » (fiche chantier, §123) est un geste du conducteur : la règle ci-dessus ne le cache plus. */

/* Planning des prix : rappel d'une marchandise revenue d'un fournisseur externe (registre §84) */
.price-return { display: block; color: var(--amber-dark, #b45309); font-weight: 600; }

/* Demande d'un matériel que nous n'avons pas : lien et photo du salarié (registre §85) */
.request-free { display: block; color: var(--muted, var(--p-gris-texte)); }
.request-free a { color: var(--blue, #2563eb); word-break: break-all; }
.request-free-photo { display: block; width: 96px; height: 96px; margin-top: 6px; object-fit: cover; border-radius: 10px; }

/* Demandes : fiche du matériel et de la personne qui demande (registre §86) */
.request-main[data-request-sheet] { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.request-main[data-request-sheet] > div { flex: 1; display: grid; gap: 2px; }
.request-thumb { flex: 0 0 64px; width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--line, var(--p-filet-2)); }
.request-who { color: var(--navy, var(--p-marine-2)); }
.request-who-name { font-weight: 700; }
.request-item-summary { color: var(--muted, var(--p-gris-texte)); }
.request-sheet-hint { color: var(--blue, #2563eb); font-weight: 600; }
.request-sheet { display: grid; gap: 10px; }
.request-sheet-photo { width: 100%; max-height: 320px; object-fit: contain; border-radius: 12px; background: var(--line, var(--p-filet-2)); }
.request-sheet-list { display: grid; gap: 6px; margin: 0; }
.request-sheet-list div { display: grid; grid-template-columns: 120px 1fr; gap: 8px; }
.request-sheet-list dt { color: var(--muted, var(--p-gris-texte)); }
.request-sheet-list dd { margin: 0; font-weight: 600; word-break: break-word; }

/* Remise et confirmation de réception (registre §87) */
.request-receipt { display: block; color: var(--muted, var(--p-gris-texte)); }
.stock-last-out { margin: 4px 0 0; font-size: 13px; color: var(--muted, var(--p-gris-texte)); }

/* Fiche du produit : noms cliquables partout (registre §88) */
.item-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.item-link:hover, .item-link:focus-visible { color: var(--blue, #2563eb); text-decoration-style: solid; outline: none; }
.item-moves { display: grid; gap: 4px; margin: 0; padding-left: 18px; }
.item-moves li strong { margin-right: 6px; }

/* Suivi de ce que le salarié détient : reste à la demande, fins d'outils à valider (registre §90) */
.request-remaining { display: block; color: var(--muted, var(--p-gris-texte)); }
.request-remaining.exceptional { color: #b45309; font-weight: 700; }
.ends-section { display: grid; gap: 10px; margin-bottom: 16px; }
.ends-section h3, .ends-section h4 { margin: 0; }
.end-row .request-reason { display: flex; gap: 8px; }
.end-row .request-reason input { flex: 1; }
.who-card header > div { display: grid; gap: 2px; }
.who-email { color: var(--muted, var(--p-gris-texte)); font-size: 12px; word-break: break-all; }

/* V23 — accueil de l'acheteur : bandeau qui dit pour qui est la page (§97). */
.profile-home { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--navy, var(--p-marine-texte)); color: var(--p-blanc); font-weight: 700; letter-spacing: .02em; }

/* V25 — Tournées de livraison, côté dépôt (§99). */
.tour-toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.tour-toolbar label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.tour-toolbar input { min-height: 42px; padding: 6px 10px; border: 1px solid var(--line, var(--p-bordure)); border-radius: 10px; font: inherit; font-size: 16px; }
.tour-card { margin-bottom: 14px; padding: 14px; border-radius: 16px; background: var(--p-blanc); box-shadow: 0 1px 3px rgba(16, 40, 64, .08); }
.tour-card > header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.tour-card > header small { display: block; color: var(--muted, var(--p-gris-texte-2)); }
.tour-actions { display: flex; gap: 8px; }
.tour-stops { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 10px; }
.tour-stops > li small { color: var(--muted, var(--p-gris-texte-2)); }
.tour-stops ul { margin: 4px 0; padding-left: 18px; }
.tour-stop-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.tour-proof { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: 14px; }
.tour-proof img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line, var(--p-bordure)); }
.tour-proof img.tour-signature { width: 120px; object-fit: contain; background: var(--p-blanc); }
.tour-editor { display: grid; gap: 12px; padding: 14px; border-radius: 16px; background: var(--p-blanc); }
.tour-editor label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.tour-editor input, .tour-editor select, .tour-editor textarea { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line, var(--p-bordure)); border-radius: 10px; font: inherit; font-size: 16px; }
.tour-stop-editor { display: grid; gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--line, var(--p-bordure)); border-radius: 14px; }
.tour-stop-editor legend { padding: 0 6px; font-weight: 700; }
.tour-stop-editor[disabled] { opacity: .7; }
.tour-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tour-row > label { flex: 1 1 140px; }

/* V26 — bouton Discussion sur la fiche chantier (§100). */
.site-thread { position: absolute; z-index: 2; top: 12px; right: 12px; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 0; background: rgba(15,42,71,.75); color: var(--p-blanc); font: inherit; font-weight: 700; cursor: pointer; }
.thread-button { margin-left: auto; margin-right: 8px; }

/* V27 — reliquat, récupération fournisseur, message vocal (§102). */
.tour-reliquat { margin: 6px 0 0; padding: 6px 10px; border-radius: 10px; background: var(--p-ambre-pale); color: var(--p-7a5410); font-weight: 700; }
/* V107 (§244) : l'heure d'un geste (téléphone / serveur), et « Répondre » sur un dépôt sans réceptionnaire. */
.tour-heure { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.tour-heure-refusee { padding: 6px 10px; border-radius: 10px; background: var(--p-rouge-pale); color: #8f1d17; font-weight: 700; }
.tour-depose-repondre { min-height: 44px; margin-left: 6px; }
/* V108 (§245) : « Véhicules » — le dernier relevé, les dégâts connus et « Réparé ». */
.tour-vehicule-dernier, .tour-vehicule-clos { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
/* Nuit des agents du 19/11/2026 (C-02) : « Corriger le relevé » (la direction), le journal des corrections sous le camion, et sa fenêtre. */
.tour-vehicule-corrige { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.tour-vehicule-corrige audio { display: block; width: 100%; max-width: 320px; margin-top: 4px; }
.tour-releve-bouton { min-height: 44px; margin: 4px 0; }
.tour-releve-moments { display: grid; gap: 4px; margin: 0 0 8px; padding: 0; border: 0; min-width: 0; }
.motif-dialog .tour-releve-choix { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; }
.motif-dialog .tour-releve-km input { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line, var(--p-bordure)); border-radius: 10px; font: inherit; font-size: 16px; width: 100%; box-sizing: border-box; }
.tour-vehicule-degats { display: grid; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.tour-vehicule-degats li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--p-ambre-pale); color: var(--p-5c3b00); }
.tour-vehicule-degats li > span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.tour-vehicule-degats img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; display: block; }
.tour-vehicule-degats .button { min-height: 44px; }
/* V111 (§248) : le plan du véhicule sous son nom, une croix par dégât connu, numérotée comme sa ligne. */
.tour-plan { max-width: 980px; margin: 8px 0; }
.tour-croix-numero { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #c77700; color: var(--p-blanc); font-weight: 800; font-size: 13px; }
.tour-croix-numero.initiale { background: #5b6b7a; }
.tour-croix-ajout { min-height: 44px; margin: 4px 0; }
.tour-croix-aide { display: block; margin: 2px 0 6px; color: var(--p-5c3b00); font-weight: 600; }
.tour-vehicule-degats li.tour-croix-vue { outline: 3px solid #c77700; outline-offset: 2px; }
.tour-missing { color: #a3261b; font-weight: 600; }
.tour-kind { display: inline-block; padding: 1px 8px; border-radius: 8px; background: var(--p-bleu-glace); color: var(--p-acier-fonce); font-size: 12px; font-weight: 800; vertical-align: middle; }
.tour-proof audio { max-width: 100%; }
/* V110 (§246) : ce que le livreur a dit s'écoute là où le texte se lisait — sur sa propre ligne, jamais plus large que l'écran. */
.tour-chargement audio, .tour-proof audio.tour-dit { display: block; max-width: 100%; margin-top: 4px; }
.tour-vehicule-degats li > span audio { flex: 0 1 360px; max-width: 100%; }

/* V28 — demandes de livraison Cogilog (§103). */
.tour-requests { margin-bottom: 18px; padding: 12px; border-radius: 16px; background: #f1f6fb; }
.tour-requests-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tour-requests-head h3 { margin: 0; }
/* V130 (§275) : proposer une répartition des livraisons — une colonne par chauffeur, ses arrêts dans l'ordre. */
.repartition { border: 2px solid var(--primary, #1d4f7a); border-radius: 12px; padding: 14px; margin: 10px 0 16px; display: grid; gap: 12px; min-width: 0; }
.repart-tete { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; justify-content: space-between; }
.repart-tete h4 { margin: 0; }
.repart-tete label { display: grid; gap: 4px; }
/* V174 (§339) : « Pour quel jour ? » — samedi, dimanche, lundi, avec leur date ; le choisi en plein. Les mêmes boutons pour les besoins et le retour. */
.repart-jours, .besoins-jours, .return-jours { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.repart-jours > span, .besoins-jours > span, .return-jours > span { flex-basis: 100%; font-weight: 600; }
.repart-jours .button, .besoins-jours .button, .return-jours .button { min-height: 44px; }
.return-jours[hidden] { display: none; }
.repart-moyens { display: flex; flex-wrap: wrap; gap: 8px 14px; border: 1px solid var(--line, var(--p-d3dbdf)); border-radius: 10px; padding: 8px 12px; margin: 0; min-width: 0; }
.repart-moyens legend { font-weight: 700; padding: 0 4px; }
.repart-chauffeur { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.repart-chauffeur input, .repart-garder input { width: 22px; height: 22px; }
.repart-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.repart-colonne { border: 1px solid var(--line, var(--p-d3dbdf)); border-radius: 10px; padding: 10px; min-width: 0; }
.repart-colonne header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.repart-trajet { margin: 6px 0; font-size: 14px; overflow-wrap: anywhere; }
.repart-colonne ul, .repart-a-placer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.repart-colonne li { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line, var(--p-d3dbdf)); min-width: 0; }
.repart-colonne li > span { display: grid; overflow-wrap: anywhere; }
.repart-colonne li label { display: grid; gap: 4px; }
.repart-colonne li select { min-height: 44px; max-width: 100%; }
.repart-garder { display: inline-flex !important; grid-auto-flow: column; align-items: center; gap: 6px; min-height: 44px; }
.repart-a-placer { border-left: 4px solid #c0392b; padding-left: 10px; }
.repart-a-placer h5 { margin: 0 0 6px; }
.repart-a-placer li { overflow-wrap: anywhere; }
.repart-actions { flex-wrap: wrap; }
.tour-missing { align-items: center; margin-top: 8px; }
.tour-create { display: grid; gap: 8px; margin-top: 10px; padding: 12px; border: 1px solid #e5b84c; border-radius: 12px; background: #fff8e6; }
.tour-create h4 { margin: 0; }
.tour-create label { display: grid; gap: 4px; font-weight: 600; }
.tour-request ul { margin: 8px 0; padding-left: 20px; }
.tour-import { cursor: pointer; }

/* V34 (registre §110) : préparation au dépôt (« À préparer », chargement), reports, « Mes livraisons » du conducteur. */
.status.danger { background: var(--red-soft); color: var(--red); }
.tour-prepare { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; background: #eef4fb; border: 1px solid #c9daef; }
.tour-prepare > div:first-child { display: grid; gap: 2px; }
.tour-prepare span { color: var(--muted, var(--p-gris-texte-2)); font-size: 14px; }
.tour-load { display: grid; gap: 8px; margin-top: 10px; padding: 12px; border: 1px solid #c9daef; border-radius: 12px; background: #f6f9fd; }
.tour-load p { margin: 0; }
.tour-load-line { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.tour-load-line label { display: flex; gap: 8px; align-items: center; min-height: 40px; flex: 1 1 200px; }
.tour-load-line input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--green); }
.tour-load-line select { flex: 1 1 180px; }
/* V193 (§367) : l'emplacement de l'article sous chaque ligne de la préparation, rangée du premier rack au dernier. */
.tour-load .tour-load-place { flex: 1 1 100%; margin: -2px 0 2px 30px; font-size: 14px; font-weight: 700; color: #17334f; }
.tour-load .tour-load-place.sans { font-weight: 400; color: #5b6b7b; }
.tour-loaded, .tour-history { display: block; margin-top: 4px; color: var(--muted, var(--p-gris-texte-2)); font-size: 12px; }
.delivery-day h3 { margin: 18px 0 8px; color: var(--navy); font-size: 16px; }
.delivery-who { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.delivery-who > span:last-child { display: grid; line-height: 1.2; }
.delivery-who small { color: var(--muted, var(--p-gris-texte-2)); font-size: 12px; }
.delivery-clock { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-weight: 600; color: var(--navy); }
.delivery-clock-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* V145 : « En premier » — la place demandée, la place confirmée, l'écart et sa raison */
.delivery-place { align-items: center; flex-wrap: wrap; }
.delivery-place .muted { flex-basis: 100%; }
.delivery-place-line { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: #f3f5f8; overflow-wrap: anywhere; }
.delivery-place-line.ok { background: #e8f5ec; }
.delivery-place-line.ecart { background: #fdf0e6; border-left: 4px solid #c25e00; }
/* v0.288.0 : sur la carte Livraison du conducteur, « Annuler » s'écarte de « Reporter » (16 px) et se lit en rouge, en contour ;
   « Annuler la livraison » est un bouton de danger en contour, jamais plein marine ; « Discussion » ne colle plus au bouton du dessus. */
.delivery-card [data-mine-cancel] { margin-left: 16px; }
.delivery-card .button.delivery-danger, .delivery-card [data-mine-cancel] { color: var(--red); border-color: var(--red); background: var(--p-blanc); }
.delivery-card [data-open-thread] { margin-top: 8px; }
.delivery-card .field-error { margin: 8px 0 0; }
.delivery-place-line + audio, .decision-place audio { display: block; width: 100%; max-width: 360px; margin-top: 6px; }
.repart-a-arbitrer { border-left-color: #c25e00; }
.delivery-card ul { margin: 8px 0 0; padding-left: 18px; }

/* v0.124.1 : une fenêtre ouverte bloque la page derrière (iPhone : plus de défilement ni de toucher à travers) ;
   sur téléphone, le panneau (notifications…) prend tout l'écran, sans bande de page à gauche. */
html:has(dialog[open]), html:has(dialog[open]) body { overflow: hidden; overscroll-behavior: none; }
.side-panel-body { overscroll-behavior: contain; }
@media (max-width: 640px) {
  .side-panel { width: 100vw; max-width: 100vw; margin: 0; }
}

/* v0.124.2 : en-tête — le bandeau MODE ESSAI ne prend plus toute la place : le titre reste sur une ligne, l'en-tête grandit au besoin. */
@media (min-width: 701px) {
  .topbar { height: auto; min-height: 94px; gap: 16px; }
  .topbar-title { flex: 0 0 auto; }
  .topbar h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top-actions { flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
  .notification-address { flex: 0 1 380px; min-width: 150px; font-size: 12px; line-height: 1.35; }
}
@media (min-width: 701px) and (max-width: 1023px) { .notification-address { display: none !important; } }

/* V35 (registre §111) : « À réutiliser » — retours de chantier encore au dépôt. */
.reuse-block { margin: 0 0 18px; padding: 14px; border: 1px solid #b9dccb; border-radius: 16px; background: #f1faf5; }
.reuse-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.reuse-head h3 { margin: 0; color: var(--navy); }
.reuse-head p { margin: 4px 0 0; }
.reuse-list { display: grid; gap: 8px; margin-top: 10px; }
.reuse-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; background: var(--p-blanc); }
.reuse-item .stock-card-photo { width: 56px; height: 56px; flex: none; }
.reuse-body { display: grid; gap: 6px; min-width: 0; flex: 1; }
.reuse-body small { color: var(--muted, var(--p-gris-texte-2)); }
.reuse-body > .button { justify-self: start; }
.reuse-form { display: grid; gap: 8px; }
.reuse-form label { display: grid; gap: 4px; font-weight: 600; }
.reuse-message { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--p-blanc); font-weight: 600; color: var(--navy); }
.reuse-form input, .reuse-form select { width: 100%; max-width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line, var(--p-filet-2)); border-radius: 10px; background: var(--p-blanc); font: inherit; font-size: 16px; }
.reuse-item, .reuse-block { min-width: 0; max-width: 100%; overflow: hidden; }
.operation-help { grid-column: 1 / -1; flex-basis: 100%; width: 100%; margin: 4px 0 0; font-size: 13px; }

/* V37–V39 (registre §115, §116) : commandes arrivées, étiquettes, surplus. */
.arrival-count { margin: 0 0 8px; color: var(--navy); }
.arrival-card { display: grid; gap: 4px; margin-bottom: 10px; padding: 12px; border: 1px solid var(--line, var(--p-filet-2)); border-radius: 14px; background: var(--p-blanc); }
.arrival-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.arrival-card p { margin: 0; font-weight: 600; }
.arrival-card small { color: var(--muted, var(--p-gris-texte-2)); }
.arrival-photos { display: flex; gap: 8px; margin-top: 4px; }
.arrival-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.arrival-print, .arrival-request { display: grid; gap: 8px; margin: 12px 0; padding: 12px; border-radius: 12px; background: #f6f9fd; border: 1px solid #c9daef; }
.arrival-print { grid-template-columns: 110px 1fr; align-items: end; }
.arrival-print label, .arrival-request label { display: grid; gap: 4px; font-weight: 600; }
.arrival-print input, .arrival-request input { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line, var(--p-filet-2)); border-radius: 10px; font: inherit; font-size: 16px; width: 100%; box-sizing: border-box; }
.surplus-block { margin: 12px 0; padding: 12px; border-radius: 12px; background: #fff8e6; border: 1px solid #e5b84c; }
.surplus-block h4 { margin: 0 0 6px; }
.surplus-block p { margin: 6px 0; }
.qr-engrave { margin-top: 8px; }
#label-sheet { position: fixed; left: -10000px; top: 0; }
@media print {
  body.print-label > *:not(#label-sheet) { display: none !important; }
  body.print-label #label-sheet { position: static; left: 0; }
  body.print-label .print-label { width: 62mm; height: 29mm; box-sizing: border-box; padding: 2mm; display: flex; gap: 2mm; align-items: center; page-break-after: always; break-after: page; overflow: hidden; font-family: Arial, sans-serif; color: #000; }
  body.print-label .print-label img { width: 22mm; height: 22mm; flex: none; image-rendering: pixelated; }
  body.print-label .print-label div { display: grid; gap: 0.6mm; min-width: 0; font-size: 7pt; line-height: 1.15; }
  body.print-label .print-label-title { font-size: 11pt; font-weight: 800; line-height: 1.05; overflow-wrap: anywhere; }
  body.print-label .print-label-code { font-size: 10pt; font-weight: 800; }
}
@media print { body.print-label .print-label:last-child { page-break-after: auto; break-after: auto; } }
@media print { html:has(body.print-label), body.print-label { margin: 0 !important; padding: 0 !important; min-height: 0 !important; height: auto !important; overflow: visible !important; background: var(--p-blanc) !important; } }

/* §119 : concordance du dossier lu sur le BL avec le chantier choisi. */
.dossier-check { grid-column: 1 / -1; margin: 8px 0; padding: 10px 12px; border: 2px solid var(--red, #d84c4c); border-radius: 12px; background: var(--red-soft, var(--p-rouge-pale)); color: #8f1f1a; font-weight: 700; }
.dossier-check p { margin: 0 0 8px; }
.dossier-check p:last-child { margin: 0; }
/* v0.130.3 : champ obligatoire manquant, signalé à côté du champ ; message flottant visible au-dessus d'une fenêtre ouverte */
.form-grid label.invalid input, .form-grid label.invalid select { border-color: var(--red, #d84c4c); outline: 2px solid var(--red-soft, var(--p-rouge-pale)); }
.field-error { display: block; margin-top: 6px; color: #b3261e; font-weight: 700; font-size: 13px; }
dialog .toast { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 10; text-align: center; }
/* v0.131 (V41) : commande à récupérer chez un fournisseur, BL joint */
.tour-pickup { margin: 8px 0; padding: 10px 12px; border: 1px dashed #c9a227; border-radius: 10px; background: #fffaf0; }
.tour-pickup p { margin: 0 0 6px; }
.tour-pickup small { display: block; color: var(--muted, var(--p-gris-texte)); }
.tour-pickup-line { margin: 6px 0; }
.driver-pieces button { font-weight: 700; }
/* v0.132 (V42) : livraisons à préparer rangées par date demandée */
.tour-request-day { margin: 14px 0 6px; font-size: 14px; color: var(--navy, var(--p-102a43)); display: flex; gap: 8px; align-items: center; }
/* v0.133 (V43) : livraisons en retard ; article parti aux achats */
.tour-request-day.late { color: #b3261e; }
/* v0.173.0 (V74, §168) : lecture automatique de logistique@ — état de la lecture, e-mails à reprendre à la main */
.tour-mailbox { margin-bottom: 12px; }
.tour-mailbox-state { margin: 0 0 8px; font-size: 13px; color: var(--navy, var(--p-102a43)); }
.tour-mailbox-state.alert { padding: 8px 12px; border-radius: 10px; background: var(--red-soft, #fdecea); color: #b3261e; font-weight: 700; }
.tour-mail { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; padding: 10px 12px; border: 1px solid #e5b84c; border-radius: 12px; background: #fff8e6; }
.tour-mail > div { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; }
.tour-mail small { color: var(--p-7a5410); }
.tour-mail p { margin: 0; }
/* v0.173.1 (§169) : sur tout l'écran Tournées, un mot très long sans espace — ou un texte ordinaire trop long pour le téléphone — passe
   à la ligne au lieu d'élargir la page. Le chantier, l'adresse, les articles, les consignes, le fournisseur, le nom d'un PDF, l'objet
   d'un e-mail viennent d'ailleurs : rien ne garantit leur longueur. « anywhere » se transmet à tout ce que l'écran dessine. Il n'agit
   ni sur une pastille (d'origine sans retour à la ligne), ni sur une liste déroulante (large comme son choix le plus long) : traitées
   à part. Un champ de saisie garde sa largeur d'origine : elle ne dépend pas de ce qu'il contient. */
#tournees-content { overflow-wrap: anywhere; }
#tournees-content .status { white-space: normal; }
#tournees-content select { max-width: 100%; min-width: 0; }
.tour-card > header > div { min-width: 0; }
/* un champ garde sa largeur d'origine (deux champs trop larges pour tenir côte à côte restent l'un sous l'autre, comme avant), mais ne dépasse jamais sa ligne */
.tour-row > label { max-width: 100%; }
/* une grille prend d'origine la largeur de son contenu le plus large, et une liste déroulante celle de son choix le plus long :
   chaque étage, de la liste des arrêts au formulaire de chargement, laisse rétrécir ce qu'il contient */
.tour-stops, .tour-load { grid-template-columns: minmax(0, 1fr); }
.tour-load-line > * { min-width: 0; }
.delivery-purchase p { margin: 0 0 6px; }
/* v0.134 (V44) : retour au dépôt demandé par le conducteur — contrôle demandé / chargé / reçu */
.return-row { display: grid; grid-template-columns: 1fr 90px 36px; gap: 8px; align-items: end; margin-bottom: 8px; }
.return-control { display: grid; gap: 6px; margin: 8px 0; }
.return-control-row { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line, var(--p-filet-2)); border-radius: 10px; font-size: 13px; }
.return-control-row small { color: var(--muted, var(--p-gris-texte)); }
.return-control-row.return-gap { background: var(--p-rouge-pale); border-color: #f2b8b5; }
.return-control-row .button { justify-self: start; }
.tour-return-photos { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.tour-return-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.tour-return-kind { margin: 6px 0; }
/* v0.135 (V45) : article du stock relié à chaque ligne au chargement */
.tour-load-article { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 8px; margin: 6px 0 4px 26px; }
.tour-load-article p, small.tour-load-article { grid-column: 1 / -1; margin: 0; }
@media (max-width: 700px) { .tour-load-article { margin-left: 0; } }
/* v0.173.1 (§169) : « Article du stock » et « Quantité », le libellé au-dessus de son champ. La règle « .tour-load-line label » (V34, écrite pour
   la case à cocher) mettait par accident ce libellé et son champ côte à côte : dans la colonne de 90 px, le champ « Quantité » sortait de la carte. */
.tour-load-article > label { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 4px; min-height: 0; font-size: 13px; font-weight: 600; }
.tour-load-article :is(select, input) { width: 100%; margin: 0; }
/* §169, choix d'Eduardo du 10/11/2026 : les champs du chargement ont la taille de ceux de « Nouvelle tournée » (44 px de haut depuis v0.288.0, §291 ; texte à 16 px). */
.tour-load :is(select, input:not([type="checkbox"])) { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line, var(--p-bordure)); border-radius: 10px; font: inherit; font-size: 16px; font-weight: 600; }
small.tour-load-article { display: block; }  /* « ✓ Sorti du stock : … » n'est pas une grille à deux colonnes : son texte prend toute la largeur */
/* v0.136 (V49) : retour attendu — champs repris de la sortie, verrouillés */
.locked-field { opacity: .75; }
.locked-field input, .locked-field select, .locked-field textarea { pointer-events: none; background: var(--soft, var(--p-fond-pale)); }
/* v0.139 (V47) : journée du chauffeur, place de la livraison, flèches, journée trop chargée */
.tour-driver-day { margin: 6px 0; padding: 8px 10px; border: 1px solid var(--line, var(--p-filet-2)); border-radius: 10px; background: var(--soft, var(--p-fond-pale)); }
.tour-driver-day ol { margin: 4px 0 6px 18px; padding: 0; }
.tour-move-arrows { display: inline-flex; gap: 4px; margin-left: 6px; }
.tour-request-day .tour-create, .tour-request-day > .button { margin-left: auto; font-size: 13px; }
/* v0.141 (V48) : « À faire » par priorité */
#afaire-dialog { width: min(720px, calc(100% - 24px)); }
.todo-group h3 { margin: 14px 0 6px; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.todo-group.todo-late h3 { color: #b3261e; }
.todo-item { display: grid; gap: 6px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line, var(--p-filet-2)); border-radius: 10px; }
.todo-item small { display: block; color: var(--muted, var(--p-gris-texte)); }
.todo-late .todo-item { border-color: #f2b8b5; background: #fff7f6; }
/* V52 (§139) : l'état photographié au chantier, sous les yeux du magasinier quand il valide le retour.
   C'est la comparaison qui fait le contrôle : la photo d'avant contre ce qu'il a en main. */
.end-photo { display: block; max-width: 220px; width: 100%; margin: 8px 0 4px; border-radius: 10px; border: 1px solid var(--line); }
/* Tâches d'un chantier (V53.3, §141) : un aller-retour qui se termine. L'état se lit d'un coup d'œil. */
.site-task.tache { display: grid; gap: 8px; align-items: start; }
.tache-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tache-actions .button { padding: 8px 12px; font-size: 13px; }
/* v0.356.1 (vu sur le vrai iPhone, 27/11) : sous un besoin, « Impossible… » passait seul sur une deuxième ligne. Le libellé au-dessus, les trois réponses côte à côte, de même largeur. */
.tache-actions[data-besoin-repondre] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.tache-actions[data-besoin-repondre] > small { grid-column: 1 / -1; }
.tache-actions[data-besoin-repondre] .button { min-height: 44px; padding-inline: 6px; white-space: normal; line-height: 1.2; }
.tache strong { display: block; margin-bottom: 2px; }
.tache small { display: block; color: var(--muted); line-height: 1.45; }
.tache-etat { display: inline-block; font-weight: 700; color: var(--navy); }
.tache-precision { border-left: 3px solid var(--amber); padding-left: 10px; }
.tache-faite { border-left: 3px solid var(--blue); padding-left: 10px; }
.tache-validee { opacity: .62; }
.site-task-form select { min-width: 0; }
.site-old-tasks { margin-top: 18px; }
.site-old-tasks summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 0; }
/* Besoins du lendemain (V53.3, §143) : ce qui attend une réponse se voit avant le reste. */
.besoins-section { display: grid; gap: 10px; margin-bottom: 18px; }
.besoins-section .site-task { background: var(--p-blanc); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
/* Conseil F11 (§240) : le message vocal s'écoute sur la ligne, les versions d'une demande se déplient. */
.besoin-ecoute { display: block; width: 100%; max-width: 340px; margin-top: 8px; }
/* V115 (§253) : ce que le collaborateur a dit — ce qu'il cherche, ce qui s'est passé — s'écoute sur la ligne. */
.request-audio { display: block; width: 100%; max-width: 340px; margin: 8px 0 4px; }
.besoin-historique { margin-top: 4px; font-size: 13px; color: var(--muted); }
.besoin-historique summary { cursor: pointer; padding: 12px 0; color: var(--navy); font-weight: 600; }
.besoin-historique ol { margin: 0 0 6px; padding-left: 20px; display: grid; gap: 4px; overflow-wrap: anywhere; }
/* Demande de livraison du conducteur (V53.3 R9, §144) : écrire ou dicter, et confirmer ce qu'on propose. */
.besoin-form { display: grid; gap: 12px; }
.besoin-question { font-weight: 700; color: var(--navy); margin: 4px 0 0; }
/* `.purchase-form label` est en grid : sans cette précision, la case se met au-dessus du texte. */
.besoin-form textarea, .besoin-form input, .besoin-form select { font: inherit; }
.besoin-form textarea { font-size: 16px; }  /* v0.288.0 : « Ce qu’il faut livrer demain » héritait de 13 px : l’iPhone zoomait */
.purchase-form label.besoin-choix { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--p-blanc); cursor: pointer; }
.besoin-choix input { margin-top: 3px; flex-shrink: 0; }
.besoin-choix span { display: grid; min-width: 0; }
.besoin-choix small { color: var(--muted); font-size: 12px; }
.besoin-vocal { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.besoin-vocal small { color: var(--muted); }
/* Fenêtre de confirmation de l'application (V54, §145) : elle remplace celles du navigateur. */
.confirm-dialog { width: min(440px, calc(100% - 32px)); }
.confirm-panel { padding: 22px 24px 20px; }
.confirm-body { margin: 16px 0 4px; color: var(--ink); overflow-wrap: anywhere; }  /* v0.173.1 : la question cite parfois un nom venu d'ailleurs */
.confirm-body p { margin: 0 0 8px; line-height: 1.5; }
.confirm-detail { color: var(--muted); font-size: 13px; }
.button.danger { background: var(--red); color: var(--p-blanc); border-color: transparent; }
.button.danger:hover { box-shadow: 0 5px 14px rgba(216,76,76,.28); }

/* V105 (§242) : demander une benne — une page, des choix au doigt (44 px au moins), et la liste des bennes demandées. */
.benne-quick.benne-retard { border-color: #c0392b; background: #fdecea; }
.benne-form { display: grid; gap: 14px; }
.benne-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.benne-form legend { padding: 0; margin-bottom: 2px; font-weight: 700; color: var(--navy); }
.benne-form > label, .benne-form .benne-jour, .benne-form .benne-autre, .benne-annulation label, .benne-commande label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.benne-form input[type="date"], .benne-form input[type="text"], .benne-form input[type="number"], .benne-annulation input, .benne-commande input { min-height: 44px; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; width: 100%; max-width: 360px; box-sizing: border-box; }
.benne-choix { display: flex; flex-wrap: wrap; gap: 8px; }
.benne-choix label { position: relative; display: inline-flex; }
.benne-choix input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.benne-choix span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--p-blanc); color: var(--navy); font-size: 16px; }
.benne-choix input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--p-blanc); font-weight: 700; }
.benne-choix input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.benne-nombre { display: flex; align-items: center; gap: 14px; }
.benne-nombre .button { width: 48px; min-width: 48px; height: 48px; padding: 0; border-radius: 12px; font-size: 24px; line-height: 1; }
.benne-nombre output { min-width: 2ch; text-align: center; font-size: 24px; font-weight: 700; color: var(--navy); }
.benne-form .button.primary { min-height: 48px; font-size: 16px; }
.benne-erreur, .benne-alerte { color: #a12a1d; font-weight: 700; }
.benne-message { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #eef4fa; color: var(--navy); font-weight: 600; }
.benne-liste { display: grid; gap: 10px; margin-top: 20px; }
.benne-liste h3 { margin: 0; }
.benne { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--p-blanc); overflow-wrap: anywhere; }
.benne.retard { border-color: #c0392b; }
.benne-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.benne small { color: var(--muted); font-size: 13px; }
.benne-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.benne-actions .button { min-height: 44px; }
.benne-annulation, .benne-commande { display: grid; gap: 8px; margin-top: 4px; }  /* V223 : le n° du bon de commande, comme le motif d’annulation */
/* V196 B (§364) : la fiche « Prestataire de bennes » reprend les champs de la demande de benne ; la ligne de la page Achats se lit sur une ligne ou deux. */
.benne-form input[type="email"], .benne-form input[type="tel"], .benne-form textarea { min-height: 44px; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; width: 100%; max-width: 360px; box-sizing: border-box; font-family: inherit; }
.benne-form textarea { resize: vertical; }
.prestataire-resume { margin: 0 0 10px; overflow-wrap: anywhere; }
/* V194 (§368) : le réglage du seuil de décision, dans « Mon compte » : un champ, un bouton, au doigt. */
#seuils-section, #perimetre-section, #relais-section, #agent-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
#seuils-section h3, #perimetre-section h3, #relais-section h3, #agent-section h3 { margin: 0 0 8px; }
#relais-section .button, #agent-section .button, .relais-message .button { min-height: 48px; }
#relais-section code, #agent-section code { overflow-wrap: anywhere; word-break: break-all; }
.relais-message { display: grid; gap: 8px; margin-top: 8px; }
#perimetre-section .perimetre-liste { margin: 6px 0 12px; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; overflow-wrap: anywhere; }
#perimetre-section .button { min-height: 48px; }
.seuil-form { display: grid; gap: 10px; margin-top: 10px; }
.seuil-form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.seuil-form input { min-height: 44px; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; width: 100%; max-width: 200px; box-sizing: border-box; }
.seuil-form .button.primary { min-height: 48px; justify-self: start; }
/* V233 (§425) : la part de main d'œuvre par lot (« Mon compte » de la direction) et l'alerte 🚨 des journées */
#parts-mo-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.parts-mo summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.parts-mo summary h3 { display: inline; margin: 0; }
.parts-mo-form { display: grid; gap: 6px; margin-top: 10px; }
.parts-mo-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; min-height: 44px; border-bottom: 1px solid var(--line); }
.parts-mo-ligne > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.parts-mo-champ { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--muted); }
.parts-mo-champ input { width: 76px; min-height: 44px; font-size: 16px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; text-align: right; box-sizing: border-box; }
.parts-mo-form .button.primary { min-height: 48px; justify-self: start; margin-top: 8px; }
.alerte-journees { border: 0; border-radius: 18px; padding: 0; max-width: min(440px, calc(100vw - 32px)); box-shadow: 0 18px 50px rgba(15, 42, 71, .25); }
.alerte-journees::backdrop { background: rgba(15, 42, 71, .45); }
.alerte-journees-corps { padding: 22px 20px 18px; border-top: 6px solid #c9372c; background: var(--surface, #fff); color: var(--ink, #0f2a47); }
.alerte-journees-corps h2 { margin: 0 0 10px; font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; }
.alerte-journees-corps p { margin: 0 0 16px; font-size: 16px; line-height: 1.45; }
.alerte-journees-corps .dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.alerte-journees-corps .button { min-height: 48px; }
/* V192 (§369) : « Avant / Après » — la photo du départ et celle du retour côte à côte (l'une au-dessus de l'autre à 390 px) ; un toucher agrandit. */
.avant-apres { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 10px 0; }
@media (min-width: 701px) { .avant-apres { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.avant-apres-photo { margin: 0; display: grid; gap: 6px; align-content: start; min-width: 0; }
.avant-apres-photo figcaption { display: grid; gap: 2px; font-size: 15px; color: var(--navy); }
.avant-apres-photo figcaption small { color: var(--muted); font-size: 13px; font-weight: 400; overflow-wrap: anywhere; }
.avant-apres-photo img { display: block; width: 100%; max-height: 320px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: var(--p-blanc); cursor: zoom-in; }
.avant-apres-manque { margin: 0; padding: 18px 12px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; font-size: 14px; }
.machine-dernier-pret { margin: 12px 0; }
.machine-dernier-pret h4 { margin: 0 0 6px; }

/* Critique magasinier v0.286 (I6, §291) : la fiche chantier « au doigt » — retour, Discussion et onglets à 44 px sur écran tactile. */
@media (max-width: 900px), (pointer: coarse) {
  .site-back { width: 44px; height: 44px; }
  .site-thread { min-height: 44px; border-radius: 22px; }
  .site-tabs { gap: 8px; }
  .site-tabs button { min-height: 44px; }
}
/* Critique v0.286 (I5) : à l’ordinateur, le champ « Quantité » ne s’étire plus à la hauteur de sa voisine (ce formulaire seul). */
#operation-form .form-grid { align-items: start; }

/* V143 (§312) : « Je suis passé » — la visite de chantier. Le bouton au doigt (56 px : sur le chantier, souvent d'une main), la liste des
   visites (photo, heure, « sur place »), le suivi de la direction en tête de la page Chantiers, replié. */
.button.primary.visite-passe { width: 100%; min-height: 56px; font-size: 17px; }  /* plus fort que « .button.primary » (48 px) de design-system.css, chargé après */
.visite-passe-infos { margin-bottom: 14px; }
.visites { display: grid; gap: 12px; }
.visite-aide { margin: 0; font-size: 14px; }
.visite-message, .visite-attente { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--p-bleu-pale); color: var(--navy); font-weight: 600; overflow-wrap: anywhere; }
.visite-attente { background: var(--p-ambre-pale); color: var(--p-5c3b00); }
.visite-compte { margin: 4px 0 0; font-weight: 700; color: var(--navy); }
.visites-liste { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.visite { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--p-blanc); }
.visite-photo { width: 96px; height: 96px; border-radius: 8px; object-fit: cover; background: var(--p-fond-pale); cursor: zoom-in; }
span.visite-photo { display: grid; place-items: center; font-size: 12px; color: var(--muted); text-align: center; cursor: default; }
.visite-corps { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.visite-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.visite-corps small { color: var(--muted); font-size: 13px; }
.visite-mot { margin: 0; }
.visite-corps audio { width: 100%; max-width: 320px; height: 40px; }
.visites-suivi { margin: 0 0 14px; }
.visites-suivi details { border: 1px solid var(--line); border-radius: 12px; background: var(--p-blanc); }
.visites-suivi summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; cursor: pointer; color: var(--navy); overflow-wrap: anywhere; list-style: none; }
.visites-suivi summary::-webkit-details-marker { display: none; }
.visites-suivi summary::after { content: ''; flex: 0 0 auto; width: 10px; height: 10px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }  /* la flèche dit qu'il s'ouvre */
.visites-suivi details[open] > summary::after { transform: rotate(-135deg); }
.visites-suivi-titre { display: grid; gap: 2px; min-width: 0; }
.visites-suivi-titre > span { font-size: 15px; }
.visites-suivi details > p { margin: 0 14px 8px; font-size: 14px; }
.visites-suivi-liste { display: grid; gap: 0; border-top: 1px solid var(--line); }
.visites-suivi-ligne { display: grid; gap: 2px; width: 100%; min-height: 56px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: var(--navy); font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.visites-suivi-ligne:last-child { border-bottom: 0; }
.visites-suivi-ligne:hover, .visites-suivi-ligne:focus-visible { background: var(--p-fond-pale); }
.visites-suivi-nom { font-weight: 700; }
.visites-suivi-ligne small { color: var(--muted); font-size: 13px; }
.visite-dialog .visite-apercu { display: block; width: 100%; max-height: 40vh; object-fit: contain; border-radius: 10px; background: var(--p-fond-pale); }
.visite-dialog .visite-label { display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.visite-dialog .visite-label input { min-height: 48px; font-size: 16px; }
.visite-dialog .team-panel { display: grid; gap: 12px; }
.visite-dialog .team-save { min-height: 48px; }

/* V167 (§315) : la preuve de livraison — photo, signature, endroit du dépôt — en vignettes ; touchées, elles s'agrandissent. */
.delivery-preuve { display: grid; gap: 6px; margin: 6px 0 0; }
.delivery-preuve-images { display: flex; flex-wrap: wrap; gap: 10px; }
.delivery-preuve figure { display: grid; gap: 4px; width: 112px; margin: 0; }
.delivery-preuve img { width: 112px; height: 84px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; background: var(--p-blanc); cursor: zoom-in; }
.delivery-preuve img[alt^="Signature"] { object-fit: contain; }
.delivery-preuve figcaption { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.delivery-etat { margin: 0; font-weight: 600; color: var(--p-vert-texte); }
.delivery-etat.alerte { color: var(--p-rouge-texte); }
.delivery-depose { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.delivery-fiche-aide { margin: 0 0 10px; font-size: 14px; }

/* V168 (§316) : une machine en panne au chantier — la fiche le dit, jusqu'à ce que le dépôt la reçoive. */
.item-sheet-panne { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--p-rouge-pale); color: var(--p-rouge-texte); overflow-wrap: anywhere; }
/* V169 (§317) : une entrée dit d'où elle vient — le pourquoi d'une entrée sans commande ; sur la fiche, les entrées « Trouvé » et « Autre ». */
.entry-origin-field .choix-tuiles { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }  /* deux par ligne au téléphone, quatre sur ordinateur */
.entry-motif-field { display: grid; gap: 8px; }
.entry-motif-field[hidden] { display: none; }
.item-sheet-entrees { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--amber-soft, var(--p-ambre-pale)); color: var(--p-7a5410); overflow-wrap: anywhere; }
.item-sheet-entrees ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.item-sheet-entrees li { display: grid; gap: 2px; }
/* V170 (§318) : ce qui a changé sur la fiche (nom, numéros, photo), qui, quand — lu dans le journal du serveur. */
.item-sheet-modifs { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--blue-soft, var(--p-bleu-pale)); overflow-wrap: anywhere; }
.item-sheet-modifs[hidden] { display: none; }
.item-sheet-modifs ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.item-sheet-modifs li { display: grid; gap: 2px; }
.item-sheet-modifs li span:first-child { color: var(--muted); font-size: var(--text-xs, 13px); }
/* Nuit des agents du 19/11 (lot D1, M-31) : la photo du bon de livraison des dernières entrées de commande, sur la fiche de l'article ; une
   vignette à toucher (96 px) l'agrandit. M-30 : « Ouvrir l'entrée de cet article », sous la référence déjà au stock, sur sa propre ligne. */
.item-sheet-bons { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--soft, var(--p-fond-pale)); overflow-wrap: anywhere; }
.item-sheet-bons ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.item-sheet-bons li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: center; }
.item-sheet-bons img { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 8px; cursor: zoom-in; background: var(--p-fond-pale); }
.field-error .reference-prise-entree { display: flex; width: 100%; margin-top: 8px; }
/* Nuit des agents du 19/11/2026 (C-04) : la preuve annulée par le livreur (« Je me suis trompé d'arrêt ») reste visible, barrée, grisée. */
.tour-proof.tour-annule img, .delivery-annulee img { opacity: .55; filter: grayscale(1); }
.tour-proof.tour-annule s, .delivery-annulee s { text-decoration-thickness: 2px; }
