/* ============================================================
   Vue « Bord de ligne » (core/types/ligne.js) — 27/10/2026, brief docs/briefs/MOTEUR-vue-bord-de-ligne.md.
   D'après la page d'essai du 26/10/2026 (docs/briefs/stellantis/maquette-bord-de-ligne.html).
   Le panneau ne prend que les variables de base.css, plus UNE couleur propre : le bleu du choix en cours (les cartes choisies),
   déclaré ici pour les trois cas comme dans base.css (même teinte que la ligne de tri). Rien ne dit juste ou faux pendant la
   matinée : ni vert plein, ni rouge en aplat ; l'arrêt de la ligne est un texte rouge dans un cadre, jamais un aplat.
   La SCÈNE est une image (comme le quai et le tri) : son fond papier reste le sien en thème sombre.
   ============================================================ */

:root, .theme-papier{ --lg-choix:#2f5f9e }
:root[data-theme="sombre"]{ --lg-choix:#8fb8f0 }
@media (prefers-color-scheme: dark){
  :root:not([data-theme="clair"]){ --lg-choix:#8fb8f0 }
}

.lg{ display:grid; gap:6px; color:var(--encre); max-width:1300px }
.lg-tete{ display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; font-size:14px }
.lg-tete > span{ color:var(--encre-douce); font-size:13px }
.lg-compteurs{ margin-left:auto; display:flex; gap:8px }
.lg-compteurs span{ font:600 13px var(--mono); color:var(--encre); border:1px solid var(--filet); border-radius:6px; padding:2px 9px }
.lg-consigne{ margin:0; background:var(--panneau); border:1px solid var(--filet); border-left:4px solid var(--terre);
  border-radius:6px; padding:5px 10px; font-size:13.5px; line-height:1.4 }
.lg-consigne > b:first-child{ font-size:12.5px; color:var(--encre-douce); margin-right:6px }
.lg-grille{ display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:10px }
@media (max-width:900px){ .lg-grille{ grid-template-columns:minmax(0,1fr) } }
.lg-zone{ background:var(--panneau); border:1px solid var(--filet); border-radius:var(--r); padding:8px 10px; min-width:0 }
.lg-zone h3{ font-size:13.5px; margin:0 0 6px; display:flex; align-items:center; gap:8px }
.lg-zone h3 small{ font-weight:400; color:var(--encre-douce) }
.lg-droite{ display:flex; flex-direction:column; gap:10px }
.lg-barre{ display:flex; align-items:center; gap:8px; margin-bottom:4px; font-size:12.5px; color:var(--encre-douce) }
.lg-barre .lg-pause{ margin-left:auto; padding:2px 10px }

/* --- la scène (une image : ses couleurs sont les siennes) ---------------- */
.lg-scene{ display:block; width:100%; height:auto; background:#f4f1ea; border:1px solid var(--filet); border-radius:8px }
.lg-scene text{ font-family:Inter,system-ui,"Segoe UI",sans-serif }
.lg-scene .lg-lbl{ font-size:12px; fill:#555047 }
.lg-scene .lg-lblf{ font-size:13px; font-weight:700; fill:#1a1915 }
.lg-scene .lg-num{ font:700 13px ui-monospace,Consolas,monospace; fill:#1a1915 }
.lg-scene .lg-trait{ fill:none; stroke:#1a1915; stroke-width:1.5 }
.lg-scene .lg-doux{ fill:none; stroke:#8b857a; stroke-width:1.2 }
.lg-scene .lg-p{ fill:#fdfbf7; stroke:#1a1915; stroke-width:1.3 }
.lg-scene .lg-pf{ fill:#1a1915 }
.lg-scene .lg-case{ fill:#fdfbf7; stroke:#8b857a; stroke-width:1 }
.lg-scene .lg-case.lg-pleine{ fill:#d8cfbf; stroke:#1a1915 }
.lg-scene .lg-voiture{ fill:#fdfbf7; stroke:#1a1915; stroke-width:1.6 }
.lg-scene .lg-vitre{ fill:#c9d3df; stroke:#1a1915; stroke-width:1 }
.lg-scene .lg-pneu{ fill:#1a1915 }
.lg-scene .lg-robot{ fill:#fdfbf7; stroke:#1a1915; stroke-width:1.6 }
.lg-scene .lg-alerte{ fill:#9d2727; font-weight:700 }
.lg-scene .lg-bas{ fill:#9c620a; font-weight:600 }
.lg-scene .lg-carte-vol{ fill:#fbf8f1; stroke:#1a1915; stroke-width:1.2 }

.lg-arret{ min-height:0; font-weight:600; font-size:14px; color:var(--rouge) }
.lg-arret:not(:empty){ margin-top:6px; border:2px solid var(--rouge); border-radius:6px; padding:5px 10px }
.lg-sequence{ display:flex; gap:4px; flex-wrap:wrap; align-items:center; margin-top:8px; font-size:12.5px; color:var(--encre-douce) }
.lg-sequence span{ border:1px solid var(--filet); border-radius:4px; padding:1px 6px; font:600 12px var(--mono); color:var(--encre); background:var(--panneau) }
.lg-sequence span.lg-long{ border:1.5px solid var(--encre) }
.lg-depart{ margin-top:8px; border:1px solid var(--filet); border-left:4px solid var(--ardoise); border-radius:6px; padding:6px 10px; font-size:13.5px }
.lg-depart p{ margin:0 0 6px }
.lg-coach{ display:none; border:1px solid var(--filet); border-left:4px solid var(--ardoise); border-radius:6px; background:var(--panneau);
  padding:6px 10px; margin-top:8px; font-size:13.5px }
.lg-coach.lg-ouv{ display:block }
.lg-coach .btn{ margin-top:6px }
.lg-evt{ display:none; border:2px solid var(--terre); border-radius:8px; background:var(--panneau); padding:8px 12px; margin-top:8px }
.lg-evt.lg-ouv{ display:block }
.lg-evt h3{ margin:2px 0 6px; font-size:15.5px }
.lg-evt p{ margin:4px 0; font-size:13.5px }
.lg-de{ font-size:12.5px; color:var(--encre-douce) }
.lg-choix{ display:flex; flex-direction:column; gap:6px; margin-top:8px }
.lg-choix-l{ flex-direction:row; flex-wrap:wrap }
.lg-choix button{ text-align:left; border:1.5px solid var(--encre); background:var(--fond); border-radius:6px; padding:6px 10px; cursor:pointer;
  color:var(--encre); font:inherit; font-size:13.5px }
.lg-choix button:hover{ background:var(--survol) }
.lg-choix button:focus-visible{ outline:3px solid var(--lg-choix); outline-offset:2px }
.lg-choix button:disabled{ cursor:default; opacity:.7 }
.lg-evt-retour{ margin:8px 0 6px; font-size:13.5px }

/* --- la boîte kanban, les robots ----------------------------------------- */
.lg-cartes{ display:flex; flex-direction:column; gap:5px; min-height:48px }
.lg-vide{ color:var(--encre-douce); font-size:13px; padding:6px 0 }
.lg-carte{ display:flex; gap:8px; align-items:center; text-align:left; border:1.5px solid var(--encre); background:var(--fond); border-radius:4px;
  padding:5px 8px; cursor:pointer; color:var(--encre); font:inherit }
.lg-carte:hover{ background:var(--survol) }
.lg-carte:focus-visible{ outline:3px solid var(--lg-choix); outline-offset:2px }
.lg-carte[aria-pressed="true"]{ border:3px solid var(--lg-choix); padding:3.5px 6.5px }
.lg-carte:disabled{ cursor:default; opacity:.6 }
.lg-carte svg{ width:30px; height:22px; flex:none; background:#fdfbf7; border-radius:3px }
.lg-carte svg .lg-p{ fill:#fdfbf7; stroke:#1a1915; stroke-width:1.3 }
.lg-carte svg .lg-pf{ fill:#1a1915 }
.lg-d{ flex:1; font-size:13px; line-height:1.2 }
.lg-d small{ display:block; color:var(--encre-douce); font-size:11.5px }
.lg-age{ font:600 12px var(--mono); color:var(--encre-douce) }
.lg-age.lg-vieux{ color:var(--terre) }
.lg-charge{ font-size:12.5px; color:var(--encre-douce); margin:6px 0 4px }
.lg-charge.lg-trop{ color:var(--rouge); font-weight:600 }
.lg-robots{ display:flex; flex-direction:column; gap:4px; margin-top:4px; font-size:13px }
.lg-robot-l{ display:flex; align-items:center; gap:8px; color:var(--encre-douce) }
.lg-nom{ font:700 12px var(--mono); border:1px solid var(--filet); border-radius:4px; padding:1px 5px; color:var(--encre) }
.lg-actions{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:8px }
.lg-urg{ font-size:13px; display:flex; gap:5px; align-items:center; white-space:nowrap }
.lg-retour{ font-size:13px; min-height:18px; margin-top:4px }
.lg-mag{ width:100%; border-collapse:collapse; font-size:13px }
.lg-mag td{ padding:2px 4px; border-bottom:1px solid var(--filet) }
.lg-mag td.lg-n{ text-align:right; font:600 13px var(--mono) }
.lg-camion{ font-size:12.5px; color:var(--encre-douce); margin-top:4px }
.lg-camion.lg-retard{ color:var(--terre); font-weight:600 }

/* --- le bilan ------------------------------------------------------------- */
.lg-bilan{ background:var(--panneau); border:1px solid var(--filet); border-radius:var(--r); padding:8px 12px }
.lg-bilan h3{ margin:0 0 6px; font-size:15px }
.lg-tab{ width:100%; border-collapse:collapse; font-size:13.5px }
.lg-tab th{ text-align:left; font-size:12.5px; color:var(--encre-douce); font-weight:600; border-bottom:1px solid var(--filet); padding:3px 6px }
.lg-tab td{ padding:4px 6px; border-bottom:1px solid var(--filet) }
.lg-ok{ color:var(--vert); font-weight:600 }
.lg-ko{ color:var(--rouge); font-weight:600 }
.lg-ligne{ display:flex; gap:8px; flex-wrap:wrap; margin:8px 0 0 }
