/* Étape 4 : la charge de l'atelier, une barre par machine et par jour. */
.atelier__grille { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.atelier__cote { display: grid; gap: 14px; position: sticky; top: 132px; }

.legende { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--encre-2); }
.legende li { display: flex; align-items: center; gap: 6px; }
.legende span { width: 12px; height: 12px; border-radius: 2px; }
.legende__fermes { background: #b7b4b2; }
.legende__devis { background: repeating-linear-gradient(135deg, #f7b393 0 3px, #fde3d6 3px 6px); }
.legende__couvertine { background: var(--orange); }

.plan { width: 100%; border-collapse: collapse; min-width: 760px; }
.plan th, .plan td { padding: 0; }
.plan thead th { font-size: 12px; font-weight: 600; color: var(--encre-2); padding: 10px 4px 6px; text-align: center; white-space: nowrap; }
.plan thead th:first-child { text-align: left; padding-left: 18px; }
.plan tbody th { text-align: left; padding: 8px 12px 8px 18px; border-top: 1px solid var(--filet); width: 132px; }
.plan tbody th strong { display: block; font-size: 14px; font-weight: 600; }
.plan tbody th span { display: block; font-size: 12px; font-weight: 400; color: var(--encre-2); }
.plan .plan__semaine, .plan td:nth-child(7) { border-left: 2px solid var(--filet-fort); }

.charge { border-top: 1px solid var(--filet); height: 76px; vertical-align: bottom; position: relative; padding: 4px 6px 8px; }
.charge__total { position: absolute; top: 6px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--encre-2); }
.charge__barre {
  display: flex; flex-direction: column-reverse; width: 22px; height: 46px; margin: 18px auto 0;
  background: var(--papier); border-radius: 3px; overflow: hidden;
}
.charge__fermes { background: #b7b4b2; }
.charge__devis { background: repeating-linear-gradient(135deg, #f7b393 0 3px, #fde3d6 3px 6px); }
.charge__couvertine { background: var(--orange); }
.charge--aujourdhui { background: rgba(253, 78, 13, 0.05); }
.charge--vedette .charge__total { color: var(--orange-texte); font-weight: 700; }
.charge--tension .charge__total { color: var(--alerte); font-weight: 700; }
.charge--tension .charge__barre { box-shadow: 0 0 0 2px var(--alerte); }

.tension { border-left: 4px solid var(--alerte); }
.tension h2 { color: var(--alerte); }
.tension p { font-size: 14px; }
.tension .bouton { justify-self: start; }
.tension--resolue { border-left-color: var(--ok); }
.tension--resolue h2 { color: var(--ok); }

.delais { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.delais li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.delais li > span:first-child { display: grid; }
.delais strong { font-weight: 600; }
.delais .muet { font-size: 12px; }
.delais__date { white-space: nowrap; font-weight: 600; color: var(--ok); }
.delais__date::before { content: '✓ '; }
.delais__vedette { background: var(--orange-voile); margin: 0 -8px; padding: 4px 8px; border-radius: var(--rayon-petit); }

@media (max-width: 1080px) {
  .atelier__grille { grid-template-columns: minmax(0, 1fr); }
  .atelier__cote { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .atelier__cote .bouton { grid-column: 1 / -1; }
}
