.background-maker-shell { overflow:hidden; }
.source-step { margin-bottom:22px; }
.step-heading { display:flex; align-items:center; gap:12px; margin:0 0 12px; }
.step-heading > div { display:grid; gap:2px; }
.step-heading strong { color:#26384c; font-size:1rem; }
.step-heading small { color:#718096; }
.step-number {
  width:34px; height:34px; border-radius:50%; display:grid; place-items:center;
  background:#fff1a8; color:#26384c; font-weight:900; flex:0 0 auto;
}
.compact-dropzone {
  position:relative;
  min-height:150px;
  overflow:hidden;
}

/* Le vrai champ fichier couvre toute la zone, mais reste invisible.
   Cela évite l'affichage du bouton natif "Choisir un fichier". */
.compact-dropzone > input[type="file"] {
  position:absolute !important;
  inset:0 !important;
  z-index:3 !important;
  display:block !important;
  width:100% !important;
  height:100% !important;
  margin:0 !important;
  padding:0 !important;
  opacity:0 !important;
  cursor:pointer !important;
  border:0 !important;
  font-size:0 !important;
}
.compact-dropzone > div {
  position:relative;
  z-index:1;
  pointer-events:none;
}
.compact-dropzone.is-disabled { opacity:.48; pointer-events:none; }
.subject-info {
  display:grid; grid-template-columns:86px minmax(0,1fr) auto; align-items:center;
  gap:14px; padding:12px; background:#fff; border:1px solid rgba(35,47,62,.1); border-radius:18px;
}
.subject-info[hidden] { display:none !important; }
.smooth-toggle {
  grid-column:1 / -1;
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:#f7f9fc;
  border:1px solid rgba(35,47,62,.08);
  cursor:pointer;
}
.smooth-toggle input { margin-top:3px; accent-color:#4678e8; }
.smooth-toggle span { display:grid; gap:2px; }
.smooth-toggle strong { color:#26384c; font-size:.92rem; }
.smooth-toggle small { color:#718096; line-height:1.35; }
.subject-thumb { width:86px; height:86px; border-radius:14px; overflow:hidden; display:grid; place-items:center; }
.subject-thumb img { max-width:100%; max-height:100%; object-fit:contain; }
.checker {
  background-color:#fff;
  background-image:linear-gradient(45deg,#eceff3 25%,transparent 25%,transparent 75%,#eceff3 75%),linear-gradient(45deg,#eceff3 25%,transparent 25%,transparent 75%,#eceff3 75%);
  background-size:20px 20px; background-position:0 0,10px 10px;
}
.subject-meta { min-width:0; display:grid; gap:4px; }
.subject-meta strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.subject-meta small { color:#718096; }
.background-list { display:grid; gap:18px; }
.montage-card-body { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(260px,.75fr); gap:18px; align-items:start; }
.montage-preview-wrap {
  position:relative; min-width:0; width:100%; min-height:300px; display:grid; place-items:center;
  background:#eef1f5; border-radius:20px; overflow:hidden; touch-action:none; user-select:none;
}
.montage-preview { display:block; max-width:100%; max-height:620px; width:auto; height:auto; cursor:grab; touch-action:none; }
.montage-preview.is-dragging { cursor:grabbing; }
.drag-hint {
  position:absolute; left:50%; bottom:10px; transform:translateX(-50%); pointer-events:none;
  padding:6px 10px; border-radius:999px; background:rgba(18,32,48,.72); color:#fff; font-size:.78rem;
  opacity:.88;
}
.montage-settings { display:grid; gap:18px; min-width:0; }
.size-control { display:grid; gap:10px; }
.setting-row-title { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.setting-title { font-weight:800; color:#26384c; }
.scale-value { color:#345fbe; }
.subject-scale { width:100%; accent-color:#4678e8; }
.range-labels { display:flex; justify-content:space-between; gap:12px; color:#718096; font-size:.78rem; }
.montage-meta { display:grid; gap:8px; color:#59697c; }
.montage-actions { justify-content:flex-start; }
.error-message { margin:0; padding:10px 12px; border-radius:12px; color:#a32920; background:#fff1ef; }
@media (max-width:860px) {
  .montage-card-body { grid-template-columns:minmax(0,1fr); }
  .montage-preview-wrap { min-height:240px; }
  .montage-preview { max-height:480px; }
}
@media (max-width:560px) {
  .subject-info { grid-template-columns:66px minmax(0,1fr); }
  .subject-thumb { width:66px; height:66px; }
  .subject-info .secondary { grid-column:1/-1; width:100%; }
  .montage-preview-wrap { min-height:190px; border-radius:16px; }
  .montage-preview { max-height:360px; }
  .drag-hint { bottom:7px; font-size:.72rem; }
}
