/* ===== v510 — Matériel (refonte Balisage, lot D) ============================
   Maquette .impeccable/mocks/balisage/index.html, écran Matériel et feuilles
   Sortie / Entrée. Jetons de design.css SEULEMENT, rayons --r / --r-s ou
   ronds, survol à la souris seulement, transform/opacity seulement. */
.mat-ecran .mat-intro { margin: 2px 0 16px; color: var(--encre-2); font-size: 15px; }
.actions-mat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.amat { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r); padding: 18px;
  text-align: left; display: flex; flex-direction: column; gap: 10px; min-height: 150px; color: var(--encre);
  font: inherit; cursor: pointer; transition: transform 160ms var(--ease-out); }
.amat:active { transform: scale(.97); }
.amat:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }
.amat .ic { width: 44px; height: 44px; border-radius: var(--r); display: grid; place-items: center;
  background: var(--bleu); color: var(--sur-bleu); }
.amat .ic svg.i { width: 22px; height: 22px; }
.amat.so .ic { background: var(--nav); color: var(--nav-txt); }
.amat.en .ic { background: var(--vert); color: var(--sur-couleur); }
.amat .amat-t { display: flex; flex-direction: column; gap: 3px; }
.amat b { font-size: 18px; letter-spacing: -.01em; }
.amat .amat-t span { color: var(--encre-2); font-size: 13.5px; }
@media (hover: hover) and (pointer: fine) { .amat:hover { border-color: var(--bleu); } }

/* derniers mouvements */
.mat-ecran .mv { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  width: 100%; padding: 10px 20px; border: 0; border-top: 1px solid var(--trait); background: none; color: var(--encre);
  font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; }
.mat-ecran .mv:focus-visible { outline: 2px solid var(--bleu); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .mat-ecran .mv:hover { background: var(--surface-2); } }
.mv .tag { font-size: 12px; font-weight: 600; border-radius: var(--r-s); padding: 2px 7px; white-space: nowrap; }
.mv .tag.ar { background: var(--bleu-pale); color: var(--bleu); }
.mv .tag.so { background: var(--actif); color: var(--encre); }
.mv .tag.en { background: var(--vert-pale); color: var(--vert); }
.mv .mv-ph { width: 44px; height: 44px; border-radius: var(--r-s); object-fit: cover; background: var(--actif);
  display: grid; place-items: center; color: var(--encre-3); }
.mv .mv-ph svg.i { width: 18px; height: 18px; }
.mv .mv-t { min-width: 0; }
.mv .mv-t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv small { display: block; color: var(--encre-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv .mv-h { color: var(--encre-2); font-size: 12.5px; text-align: right; white-space: nowrap; }

/* feuilles Sortie / Entrée */
.mat-flux { display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }
.mat-flux h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; letter-spacing: -.01em; }
.mat-flux h2 svg.i { width: 22px; height: 22px; color: var(--bleu); }
.mat-flux .mat-sous { margin: -10px 0 0; color: var(--encre-2); }
.mat-flux .champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mat-flux .champ[hidden], .mat-flux .cote[hidden] { display: none; }
.mat-flux .champ label, .mat-flux .champ .lab { font-size: 13.5px; font-weight: 600; }
.mat-flux .aide { font-size: 12.5px; color: var(--encre-2); font-weight: 400; }
.mat-flux .oblig { color: var(--rouge); font-weight: 600; }
.mat-flux .inp, .mat-flux select.inp { flex: none; min-height: 44px; border: 1px solid var(--trait-fort); border-radius: var(--r-s); background: var(--surface);
  color: var(--encre); padding: 0 12px; font: inherit; font-size: 15px; width: 100%; }
.mat-flux textarea.inp { min-height: 84px; padding: 10px 12px; resize: vertical; }
.mat-flux .inp:focus { outline: 2px solid var(--bleu); outline-offset: 0; border-color: transparent; }
.mat-flux .cote { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.mat-flux .cote .grow { flex: 1 1 220px; }
.mat-flux .motifs { display: grid; gap: 8px; }
.mat-flux .motif { display: flex; gap: 12px; align-items: center; border: 1px solid var(--trait-fort); border-radius: var(--r-s);
  padding: 12px 14px; text-align: left; font: inherit; font-size: 14.5px; background: var(--surface); color: var(--encre);
  cursor: pointer; transition: transform 160ms var(--ease-out); }
.mat-flux .motif:active { transform: scale(.98); }
.mat-flux .motif small { display: block; color: var(--encre-2); font-size: 12.5px; }
.mat-flux .motif .rond { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--trait-fort); flex: none;
  display: grid; place-items: center; }
.mat-flux .motif[aria-checked="true"] { border-color: var(--bleu); background: var(--bleu-pale); }
.mat-flux .motif[aria-checked="true"] .rond { border-color: var(--bleu); }
.mat-flux .motif[aria-checked="true"] .rond::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--bleu); }
.mat-flux .step { display: flex; align-items: center; border: 1px solid var(--trait-fort); border-radius: var(--r-s); height: 44px; }
.mat-flux .step button { width: 44px; height: 42px; border: 0; background: none; color: var(--encre); display: grid; place-items: center; cursor: pointer; }
.mat-flux .step button { font-size: 20px; line-height: 1; }
.mat-flux .step span { min-width: 34px; text-align: center; font-weight: 700; font-feature-settings: "tnum"; }
.mat-flux .mat-choix { display: flex; flex-direction: column; gap: 4px; }
.mat-flux .mat-choix:empty { display: none; }
.mat-flux .mat-pc { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 1px solid var(--trait);
  border-radius: var(--r-s); padding: 8px 12px; background: var(--surface-2); color: var(--encre); font: inherit; text-align: left; cursor: pointer; }
.mat-flux .mat-pc small { color: var(--encre-2); font-size: 12.5px; }
@media (hover: hover) and (pointer: fine) {
  .mat-flux .motif:hover, .mat-flux .mat-pc:hover { border-color: var(--bleu); }
}
.mat-flux .mat-photo, .pc-photo-champ .mat-photo { position: relative; display: grid; place-items: center; min-height: 150px; border: 2px dashed var(--trait-fort);
  border-radius: var(--r); background: var(--surface-2); text-align: center; cursor: pointer; overflow: hidden; }
.mat-flux .mat-photo input, .pc-photo-champ .mat-photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.mat-flux .mat-photo-vide, .pc-photo-champ .mat-photo-vide { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px; pointer-events: none; }
.mat-flux .mat-photo-vide svg.i, .pc-photo-champ .mat-photo-vide svg.i { width: 28px; height: 28px; color: var(--encre-2); }
.mat-flux .mat-photo.ok, .pc-photo-champ .mat-photo.ok { border-style: solid; border-color: var(--vert); }
.mat-flux .mat-photo img, .pc-photo-champ .mat-photo img { max-width: 100%; max-height: 220px; border-radius: var(--r-s); }
.mat-flux .mat-photo-ok, .pc-photo-champ .mat-photo-ok { display: flex; align-items: center; gap: 6px; color: var(--vert); font-weight: 600; font-size: 13.5px; }
.mat-flux .mat-photo-ok svg.i, .pc-photo-champ .mat-photo-ok svg.i { width: 16px; height: 16px; }
.mat-flux .mat-flou { color: var(--rouge); font-weight: 600; }
.mat-flux .mat-flou:empty { display: none; }
.mat-flux .mat-ia { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-s);
  background: var(--bleu-pale); color: var(--encre); font-size: 13.5px; }
.mat-flux .mat-ia svg.i { width: 18px; height: 18px; flex: none; color: var(--bleu); margin-top: 2px; }
.mat-flux .manque { margin: 0; color: var(--encre-2); font-size: 13.5px; min-height: 1em; }

@media (max-width: 820px) {
  .actions-mat { grid-template-columns: 1fr; gap: 10px; }
  .amat { min-height: 0; flex-direction: row; align-items: center; padding: 14px; }
  .mat-ecran .mv { grid-template-columns: auto minmax(0, 1fr) auto; padding: 10px 14px; }
  .mat-ecran .mv .tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .amat, .mat-flux .motif { transition: none; }
}

/* v527 (MODULES_CONTRAT, Matériel) — Arrivée : UN seul bouton bleu (Scanner), « Arrivé » secondaire,
   en-tête d'une commande sur une ligne, état de lecture fournisseur derrière un « i » */
.rcp2-scan { background: var(--bleu); border-color: var(--bleu); color: var(--sur-bleu); }
.rcp2-scan-ic { background: transparent; color: var(--sur-bleu); border-radius: var(--r-s); }
.rcp2-scan-ic svg.i { width: 30px; height: 30px; }
.rcp2-ctete, .rcp2-ctete a { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; font-weight: 700; color: var(--encre); }
@media (hover: hover) and (pointer: fine) { .rcp2-ctete a:hover, a.rcp2-ctete:hover { color: var(--bleu); } }
.rcp2-csous { margin-top: 2px; color: var(--encre-2); }
.rcp-cmd .rcp-ok, .rcp-cmd .rcp-valider { min-height: 40px; }
.rcp2-acmd svg.i { width: 14px; height: 14px; }
.rcp2-code svg.i, .rcp2-multi svg.i, .rcp2-sansref svg.i, .rcp2-stockbox svg.i, .rcp2-alerte svg.i, .rcp2-fin svg.i,
.rcp2-qui svg.i, .rcp2-gtete svg.i { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.rcp2-lecture { display: inline-block; }
.rcp2-lecture > summary { list-style: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--trait-fort); color: var(--encre-2); font-weight: 700; font-size: 13px; cursor: pointer; }
.rcp2-lecture > summary::-webkit-details-marker { display: none; }
.rcp2-lecture[open] > summary { background: var(--bleu-pale); color: var(--bleu); border-color: var(--bleu); }
.rcp2-lecture > div { margin-top: 6px; }

/* v527 — écran Matériel : phrase chiffrée, deux colonnes au PC, trois grandes actions au téléphone */
.mat-phrase { margin: 0 0 14px; color: var(--encre-2); font-size: 15px; }
.mat-outils .btn svg.i { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.mat-ecran .actions-mat { display: none; }
.mat-grille { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.mat-cote { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mat-mv #matFiltres { padding: 0 20px 10px; }
.mat-li { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 20px; border: 0; border-top: 1px solid var(--trait);
  background: none; color: var(--encre); font: inherit; text-align: left; cursor: pointer; }
.mat-li-t { flex: 1; min-width: 0; }
.mat-li-t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.mat-li-t small { display: block; color: var(--encre-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-li-act { flex: none; min-height: 36px; font-size: 13px; }
.mat-tout { display: block; margin: 8px 20px 12px; }
.mat-li:focus-visible { outline: 2px solid var(--bleu); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) { .mat-li:hover { background: var(--surface-2); } }
@media (max-width: 820px) {
  .mat-outils { display: none !important; }
  .mat-ecran .actions-mat { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px; }
  .mat-ecran .amat { flex-direction: row; align-items: center; min-height: 72px; padding: 12px 16px; }
  .mat-grille { grid-template-columns: 1fr; }
}
/* Sortie / Entrée (P7) : stepper de 44 px, commandes proposées, bouton collant en bas */
.mat-flux .mat-step { height: auto; }
.mat-flux .mat-step button { width: 44px; height: 44px; min-height: 44px; font-size: 20px; }
.mat-flux .mat-pied { position: sticky; bottom: calc(-22px - env(safe-area-inset-bottom)); z-index: 2; display: flex; flex-direction: column; gap: 6px;
  margin: 0 -20px calc(-22px - env(safe-area-inset-bottom)); padding: 10px 20px calc(env(safe-area-inset-bottom) + 22px); background: var(--surface); border-top: 1px solid var(--trait); }
.mat-flux .mat-pied .manque { margin: 0; }
.mat-flux .mat-pied #matOk { width: 100%; }
