.poc-info,
.poc-warning,
.poc-undo {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 18px;
  background: var(--blue-soft);
  line-height: 1.5;
}
.poc-warning {
  background: var(--mustard-soft);
}
.poc-undo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--sage-soft);
}
.poc-progress {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 20px 0;
}
.poc-progress progress {
  flex: 1;
  accent-color: var(--sage);
  height: 12px;
}
.poc-lines {
  border-top: 1px solid var(--line);
}
.poc-line {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 220px 135px minmax(200px, auto);
  align-items: center;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.poc-line h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.poc-line p {
  font-size: 13px;
}
.poc-quantity {
  font-size: 12px;
  color: var(--ink-soft);
}
.poc-quantity > span {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}
.poc-quantity input {
  width: 150px;
}
.poc-preparation button,
.poc-bottom button,
.poc-option-buttons button,
.poc-undo button {
  min-height: 48px;
}
.poc-preparation input,
.poc-bottom input,
.poc-bottom textarea,
.poc-option-buttons input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  color: var(--ink);
}
.poc-preparation input:disabled {
  background: var(--ivory);
}
.poc-preparation button:disabled,
.poc-bottom button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.poc-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 24px;
}
.poc-bottom p {
  line-height: 1.6;
  font-size: 14px;
}
.poc-bottom label,
.poc-option-buttons label {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}
.poc-bottom textarea {
  min-height: 90px;
  resize: vertical;
}
.poc-actions {
  margin-top: 20px;
}
.poc-stock > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 14px;
}
.poc-history {
  margin-top: 24px;
}
.poc-history summary {
  cursor: pointer;
  padding: 10px 0;
  font-weight: 700;
}
.poc-history article {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.poc-history p {
  font-size: 13px;
  color: var(--ink-soft);
}
.poc-option-buttons {
  display: grid;
  gap: 10px;
}
.poc-label {
  width: 54mm;
  min-height: 54mm;
  margin: 20px auto;
  padding: 3mm;
  border: 1px solid #000;
  color: #000;
  background: white;
  overflow-wrap: anywhere;
  font: 10pt system-ui;
}
.poc-label small {
  font-size: 6pt;
}
.poc-label h2 {
  font-size: 16pt;
  margin: 3mm 0;
}
.poc-label h3 {
  font-size: 12pt;
  margin: 2mm 0;
}
.poc-label p {
  font-size: 9pt;
  margin: 2mm 0;
}
.poc-label-note {
  white-space: pre-wrap;
}
.poc-label strong {
  font-size: 11pt;
}
#poc-print {
  display: none;
}
@media (max-width: 1250px) {
  .poc-line {
    grid-template-columns: 1fr 220px;
  }
  .poc-state {
    grid-column: 1;
  }
  .poc-line .button-row {
    justify-content: flex-end;
  }
  .poc-bottom {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .poc-line {
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) 150px;
  }
  .poc-line .button-row {
    grid-column: 1/-1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .poc-state {
    grid-column: 1/-1;
  }
  .poc-progress {
    flex-wrap: wrap;
  }
  .poc-progress progress {
    flex-basis: 100%;
  }
  .poc-undo {
    align-items: stretch;
    flex-direction: column;
  }
  .prototype-banner {
    height: auto;
    min-height: 48px;
    flex-wrap: wrap;
    gap: 2px;
    padding: 8px;
  }
  .poc-quantity input {
    width: 105px;
  }
}
@media print {
  body > * {
    display: none !important;
  }
  body > #poc-print {
    display: block !important;
  }
  .poc-label {
    margin: 0;
    border: 0;
    padding: 0;
    width: 100%;
    min-height: 0;
  }
  .poc-label-note {
    white-space: pre-wrap;
  }
  body {
    background: white;
  }
}
/* Zone utile exacte d'une étiquette 60 mm, avec 3 mm de marge papier. */
.poc-label {
  height: 54mm;
  min-height: 54mm;
  padding: 2mm;
  font-size: 8pt;
  overflow: auto;
  line-height: 1.2;
}
.poc-label small {
  font-size: 5.5pt;
}
.poc-label h2 {
  font-size: 13pt;
  margin: 1.5mm 0;
  color: #000;
}
.poc-label h3 {
  font-size: 10pt;
  margin: 1mm 0;
  color: #000;
}
.poc-label p {
  font-size: 7.5pt;
  line-height: 1.2;
  margin: 1.5mm 0;
  color: #000;
}
.poc-label strong {
  font-size: 9pt;
}
@media print {
  .poc-label {
    overflow: visible;
    padding: 0;
  }
}
.poc-undo {
  position: sticky;
  top: 84px;
  z-index: 3;
  box-shadow: var(--shadow);
}

/* La quantité est le premier repère opérationnel de chaque ligne. */
.poc-quantity {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.poc-quantity > span {
  padding: 8px;
  background: var(--blue-soft);
  border-radius: 8px;
  gap: 8px;
}
.poc-quantity input {
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  min-width: 0;
  padding: 6px;
  background: white;
  border-color: transparent;
}
.poc-quantity b {
  font-size: 22px;
  color: var(--ink);
}
.poc-preparation .poc-quantity input:disabled {
  color: var(--ink);
  opacity: 1;
  -webkit-text-fill-color: var(--ink);
  background: transparent;
}
.poc-line[data-state="done"] .poc-quantity > span {
  background: var(--sage-soft);
}
@media (max-width: 600px) {
  .poc-quantity input {
    font-size: 26px;
  }
  .poc-quantity b {
    font-size: 20px;
  }
  .poc-quantity > span {
    padding: 6px;
    gap: 4px;
  }
}
/* Atelier partagé : les commandes restent indépendantes et visibles ensemble. */
.main-column {
  min-width: 0;
}
.desktop-menu {
  white-space: nowrap;
  min-height: 44px;
}
@media (min-width: 781px) {
  body.sidebar-collapsed .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  body.sidebar-collapsed .sidebar {
    display: none;
  }
}
@media (max-width: 780px) {
  .desktop-menu {
    display: none;
  }
}
.poc-board-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.poc-board-toolbar label {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 700;
}
.poc-orders {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(480px, calc((100% - 22px) / 2));
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  gap: 22px;
  align-items: start;
}
.poc-orders-single {
  grid-auto-columns: 100%;
}
.poc-order {
  min-width: 0;
  container-type: inline-size;
  scroll-snap-align: start;
}
.poc-order .poc-line h3 {
  font-size: 20px;
  line-height: 1.3;
}
.poc-order .poc-progress progress {
  height: 20px;
}
.poc-order .poc-lines {
  max-height: 62vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-gutter: stable;
}
.poc-order .poc-bottom {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 16px;
}
.poc-order-tools {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--ivory);
}
.poc-order-tools > summary {
  font-weight: 750;
  cursor: pointer;
  min-height: 30px;
  line-height: 30px;
}
.poc-order-footer {
  margin-top: 14px;
  flex-wrap: wrap;
}
.poc-order .poc-undo {
  top: 0;
}
@container (max-width: 850px) {
  .poc-line {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 14px;
  }
  .poc-line .button-row {
    grid-column: 2;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .poc-quantity {
    width: 170px;
    justify-self: end;
  }
  .poc-line .button-row > button {
    flex-shrink: 0;
  }
  .poc-state {
    grid-column: 1;
  }
  .poc-quantity input {
    width: 116px;
    font-size: 28px;
  }
  .poc-preparation .card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .poc-preparation .card-head h2 {
    font-size: 21px;
  }
  .poc-progress {
    flex-wrap: wrap;
    gap: 10px;
  }
  .poc-progress progress {
    flex-basis: 100%;
  }
  .poc-actions {
    flex-wrap: wrap;
  }
}
@container (max-width: 380px) {
  .poc-line {
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 10px;
  }
  .poc-line .button-row {
    grid-column: 1/-1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .poc-quantity {
    width: 140px;
  }
  .poc-quantity input {
    width: 90px;
    font-size: 25px;
  }
  .poc-quantity b {
    font-size: 19px;
  }
}
@media (max-width: 780px) {
  .poc-order .poc-lines {
    max-height: 65vh;
  }
  .poc-board-toolbar select {
    max-width: 100%;
  }
}
.poc-order .poc-progress progress {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 8px;
  background: var(--ivory);
  overflow: hidden;
}
.poc-order progress::-webkit-progress-bar {
  background: var(--ivory);
  border-radius: 8px;
}
.poc-order progress::-webkit-progress-value {
  background: var(--sage);
  border-radius: 8px;
}
.poc-order progress::-moz-progress-bar {
  background: var(--sage);
  border-radius: 8px;
}

@media (max-width: 780px) {
  .poc-orders {
    grid-auto-columns: 100%;
  }
}
