.atelierModuleBody.module-paillePieces {
  padding: 0;
  background: #e9ece8;
}

.paillePieceSearch {
  min-height: calc(100vh - 58px);
  color: #17231f;
  background: #e9ece8;
}

.paillePieceScreen {
  display: grid;
  grid-template-rows: auto auto auto minmax(360px, 1fr) auto;
  min-height: calc(100vh - 58px);
}

.paillePieceControls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  background: #f8f9f6;
  border-bottom: 1px solid #d2d8d4;
}

.paillePieceControls label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.paillePieceControls span {
  font-size: 12px;
  color: #52615c;
}

.paillePieceControls select,
.paillePieceControls input {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  border: 1px solid #bbc7c0;
  border-radius: 6px;
  background: #fff;
  color: #17231f;
  font: inherit;
  font-size: 15px;
}

.paillePieceNumberControl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 6px;
}

.paillePieceNumberControl input {
  min-width: 0;
}

.paillePieceSearchButton {
  min-height: 40px;
  border: 1px solid #9dad9f;
  border-radius: 6px;
  background: #1f332d;
  color: #fff;
  font: inherit;
  font-size: 15px;
}

.paillePieceResult {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 10px;
  border-bottom: 1px solid #d2d8d4;
  background: #fff;
  font-size: 14px;
}

.paillePieceResult span {
  color: #52615c;
}

.paillePieceHint {
  color: #52615c;
}

.paillePieceViewerToolbar {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  background: #eef1ee;
  border-bottom: 1px solid #d2d8d4;
}

.paillePieceViewerToolbar button {
  width: 42px;
  min-height: 38px;
  border: 1px solid #b8c4bd;
  border-radius: 6px;
  background: #fff;
  color: #1f332d;
  font: inherit;
  font-size: 20px;
}

.paillePieceViewer {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  touch-action: none;
  background: #fbfbf8;
}

.paillePieceSchemaSvg,
.paillePieceOverlaySvg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.paillePieceSchemaSvg {
  background: #fbfbf8;
}

.paillePieceOverlaySvg {
  pointer-events: none;
}

.paillePieceHighlight {
  fill: rgba(245, 195, 66, 0.28);
  stroke: #e23f2f;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.paillePieceMeta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: #f8f9f6;
  border-top: 1px solid #d2d8d4;
  color: #52615c;
  font-size: 12px;
}

.paillePieceEmpty,
.paillePieceStatus {
  display: grid;
  gap: 6px;
  margin: 18px;
  padding: 14px;
  border: 1px solid #cfd8d2;
  border-radius: 8px;
  background: #fff;
}

.paillePieceStatus.is-error {
  border-color: #d8aaa5;
  color: #842318;
  background: #fff3f0;
}

@media (max-width: 760px) {
  .paillePieceScreen {
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    min-height: calc(100vh - 58px);
  }

  .paillePieceControls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paillePieceViewer {
    min-height: 48vh;
  }
}

@media (max-width: 430px) {
  .paillePieceControls {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 8px;
  }

  .paillePieceControls select,
  .paillePieceControls input {
    min-height: 38px;
    font-size: 14px;
  }

  .paillePieceNumberControl {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .paillePieceSearchButton {
    min-height: 38px;
  }

  .paillePieceResult {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}
