/* Projet 17, chantier 5 (le flux) : ce qui n'existe que dans ce chantier. Charge apres styles/jeu.css,
   que ce fichier ne modifie pas. Les couleurs viennent des variables de la marque. */

/* La marche du flux : la photo de l'arret, ses releves ; les cartes deja gagnees. */
.photo-arret { width: 100%; max-width: 836px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--rayon); display: block; margin: 0 0 14px; }
.journal { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.pas-journal { background: var(--feuille); border: 1px solid var(--filet); border-left: 5px solid var(--filet); border-radius: var(--rayon-piece); padding: 10px 14px; }
.pas-journal.juste { border-left-color: var(--signal); }
.pas-journal.faux { border-left-color: var(--or); }
.pas-journal p { margin: 4px 0; }
.bloc-bilan { background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 14px 18px; margin: 18px 0; }

/* Les cartes : un poste est un rectangle, un stock un triangle d'or, le flux d'information un cadre pointille. */
.main-cartes { margin: 18px 0; }
.main-cartes .cartes { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.carte-flux { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border-radius: var(--rayon-piece);
  border: 2px solid var(--encre-douce); background: #FFFFFF; color: var(--encre); font: inherit; font-size: 16px; line-height: 1.25; text-align: center; }
.carte-flux.stock { border-color: var(--or); background: #FFF6E2; }
.carte-flux.stock::before { content: ""; width: 0; height: 0; margin-right: 8px; flex: none;
  border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 14px solid var(--or); }
.carte-flux.info { border-style: dashed; border-color: var(--signal); }
button.carte-flux { cursor: grab; }
button.carte-flux:hover { box-shadow: 0 0 0 2px var(--filet); }
button.carte-flux.choisie { border-color: var(--signal); background: #E6EDF8; box-shadow: 0 0 0 2px var(--signal); }
button.carte-flux:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

/* La carte de l'etat actuel : Marc et le flux d'information en haut, la bande des neuf cases en bas. */
.carte-vsm { background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 16px; margin: 16px 0; overflow-x: auto; }
.ligne-information { display: flex; gap: 12px; align-items: stretch; justify-content: center; margin-bottom: 16px; }
.boite-marc, .boite-extremite { display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px 12px;
  border: 2px solid var(--encre-douce); border-radius: var(--rayon-piece); background: var(--fond-profond); font-weight: 600; min-width: 110px; }
.case-information { min-width: 220px; border: 2px dashed var(--signal); border-radius: var(--rayon-piece); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.rang-flux { display: flex; gap: 8px; align-items: stretch; min-width: 1080px; }
.rang-flux .boite-extremite { min-width: 96px; max-width: 124px; font-size: 15px; overflow-wrap: anywhere; hyphens: auto; }
.tableau .indicateurs, .miroir .indicateurs { margin-bottom: 22px; }
.bande-flux { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(9, minmax(96px, 1fr)); gap: 6px; flex: 1; }
.case-flux { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: space-between; padding: 8px 6px; min-height: 120px;
  border: 2px solid var(--filet); border-radius: var(--rayon-piece); background: #FFFFFF; }
.case-flux.stock { background: #FFF6E2; }
.case-flux.posee { border-color: var(--encre-douce); }
.case-flux.pousse::before { content: "\2192"; position: absolute; left: -9px; top: 6px; color: var(--or-encre); font-weight: 700; }
.carte-posee { margin: 0; font-weight: 600; text-align: center; font-size: 15px; line-height: 1.25; max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }
.case-flux .carte-posee, .ligne-temps .carte-posee { font-size: 14px; }
.case-flux .poser, .case-information .poser { font-size: 14px; padding: 6px 8px; }
.case-flux.survol, .case-information.survol { outline: 3px solid var(--signal); outline-offset: 2px; }
.lecteur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* La ligne du temps : un escalier, les jours en haut sous les triangles, les secondes en bas sous les postes. */
.ligne-temps { margin: 16px 0; background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 14px; overflow-x: auto; }
.ligne-temps .marches { list-style: none; padding: 0; margin: 8px 0; display: grid; grid-template-columns: repeat(9, minmax(84px, 1fr)); min-width: 820px; }
.ligne-temps .marche { display: grid; grid-template-rows: auto 44px 44px; text-align: center; border-right: 1px dotted var(--filet); padding: 0 4px; }
.ligne-temps .marche .haut, .ligne-temps .marche .bas { margin: 0; display: flex; align-items: center; justify-content: center; font-family: var(--instrument); font-size: 17px; }
.ligne-temps .marche.stock .haut { border-top: 3px solid var(--or); color: var(--or-encre); font-weight: 600; }
.ligne-temps .marche.poste .bas { border-bottom: 3px solid var(--signal); color: var(--signal); font-weight: 600; }
.ligne-temps .totaux { margin: 8px 0 0; font-weight: 600; }

/* La reunion : cases a cocher, retours, triangles a toucher. */
.cases { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.cases li { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 12px; background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon-piece); }
.cases input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--signal); }
.cases input:disabled + label { color: var(--encre-douce); }
.cases input:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.retours { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.retours li { padding: 10px 14px; border-radius: var(--rayon-piece); background: var(--feuille); border-left: 5px solid var(--filet); }
.retours li.juste { border-left-color: var(--signal); }
.retours li.faux { border-left-color: var(--or); }
.retours li.non-choisi { color: var(--encre-douce); }
.stocks-a-toucher { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 10px; }
.stocks-a-toucher li { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 6px 14px; align-items: center; }
.stocks-a-toucher li p { margin: 0; }
.triangle-stock { min-height: 44px; padding: 8px 12px; border-radius: var(--rayon-piece); border: 2px solid var(--or); background: #FFF6E2; color: var(--encre);
  font: inherit; text-align: left; cursor: pointer; }
.triangle-stock:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.triangle-stock[disabled] { cursor: default; }
.triangle-stock.touche.probleme { border-color: var(--signal); background: #E6EDF8; font-weight: 600; }
.triangle-stock.touche.precaution, .triangle-stock.touche.sansExplication { border-style: dashed; }
.reunion-carte .carte-imprevu + .carte-imprevu { margin-top: 18px; }
@media (max-width: 720px) {
  .stocks-a-toucher li { grid-template-columns: 1fr; }
}

.photo-cas { width: 100%; max-width: 836px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--rayon); display: block; margin: 8px 0 14px; }
tr.maintenant th, tr.maintenant td { font-weight: 600; }
@media (prefers-reduced-motion: no-preference) { .carte-flux, .poser, .triangle-stock { transition: border-color 0.15s, box-shadow 0.15s; } }
