/* V2.5.19 — résultat visible et comparateur tactile */
.studio-compare-frame { cursor: ew-resize; touch-action: none; user-select: none; }
.studio-compare-frame.studio-result-view { cursor: default; box-shadow: 0 0 0 3px #14b8a6, 0 10px 28px rgba(15,23,42,.14); }
.studio-compare-frame.studio-result-view .studio-label-before,
.studio-compare-frame.studio-result-view .studio-compare-handle { display: none; }
.studio-compare-frame.studio-result-view .studio-label-after { left: 12px; background: #0f766e; }
.studio-compare-control.result-visible span { display: inline-block; padding: 7px 11px; border-radius: 999px; background: #ccfbf1; color: #115e59; }
.studio-confirm-button { background: linear-gradient(135deg,#0f766e,#115e59) !important; }
.studio-approved-preview { display: block; width: 100%; max-height: 280px; object-fit: contain; margin: 0 0 14px; border-radius: 13px; background: #fff; box-shadow: 0 6px 18px rgba(15,23,42,.12); }
.studio-processing-note { margin: 9px 0 0; color: #854d0e; font-size: .9rem; line-height: 1.4; }
.studio-eraser.active { background: #0f766e; color: #fff; border-color: #0f766e; }
.studio-pan.active { background:#0f766e; color:#fff; border-color:#0f766e; }
.studio-compare-frame.studio-zoomed:not(.studio-erasing) { cursor:grab; }
.studio-compare-frame.studio-zoomed:not(.studio-erasing):active { cursor:grabbing; }
.studio-eraser-help { width: 100%; margin: 8px 0 0; color: #115e59; font-weight: 650; line-height: 1.4; }
.studio-compare-frame.studio-erasing { cursor: crosshair; touch-action: none; box-shadow: 0 0 0 4px #f59e0b, 0 10px 28px rgba(15,23,42,.14); }
.studio-brush-control { width: 100%; margin-top: 10px; color: #115e59; font-weight: 700; }
.studio-brush-control input { width: 100%; margin-top: 7px; }
.studio-zoom-surface { position:absolute; inset:0; transform-origin:50% 50%; will-change:transform; }
.studio-zoom-surface>.studio-compare-image,
.studio-zoom-surface>.studio-improved-layer { position:absolute; inset:0; width:100%; height:100%; }
.studio-zoom-surface>.studio-compare-image,
.studio-zoom-surface .studio-canvas { display:block; width:100%; height:100%; object-fit:contain; margin:0; border-radius:0; box-shadow:none; }
.studio-compare-frame.studio-zoomed { box-shadow:0 0 0 4px #14b8a6,0 10px 28px rgba(15,23,42,.14); }

/* V2.8.26: controls precede the preview; comparisons require a real edit. */
.studio-no-compare .studio-compare-handle { display:none; }
.studio-no-compare { cursor:default; touch-action:pan-y; }
.studio-no-compare.studio-erasing,.studio-no-compare.studio-zoomed { touch-action:none; }
body.studio-flow-active #studioWorkspace { display:flex; flex-direction:column; }
body.studio-flow-active #studioWorkspace.hidden { display:none; }
.studio-photo-manager { display:none; }
body.studio-flow-active .studio-photo-manager { display:block; }
body.studio-flow-active .studio-presets { order:1; grid-template-columns:repeat(3,minmax(0,1fr)); }
body.studio-flow-active .studio-presets button { min-width:0; font-size:.82rem; }
body.studio-flow-active .studio-compare-wrap { order:3; }
body.studio-flow-active .studio-controls { order:4; }
body.studio-flow-active .studio-background-tools { order:2; }
body.studio-flow-active .studio-recovery { order:5; }
body.studio-flow-active .studio-actions,body.studio-flow-active .safe-note,body.studio-flow-active .studio-next { order:6; }
body.studio-flow-active #photoStudio:not([data-flow-step="3"]) .studio-compare-frame { height:clamp(220px,36vh,400px); min-height:220px; }
body.studio-flow-active #photoStudio[data-flow-step="3"] #studioPan { display:none; }
body.studio-flow-active #photoStudio[data-flow-step="3"] .studio-eraser-invitation { display:none; }
body.studio-flow-active #photoStudio[data-flow-step="3"] .studio-background-choices { gap:6px; }

body.studio-flow-active .studio-photo-manager-head {
  flex-wrap: wrap;
  gap: 6px;
}
body.studio-flow-active #studioPhotoCount {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.creative-tools, .creative-comparison { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.7rem; }
.creative-tools button { min-height:3rem; overflow-wrap:anywhere; }
.creative-tools [aria-pressed="true"] { box-shadow:0 0 0 3px #5eead4; }
#creativeFields { display:grid; gap:.65rem; min-width:0; border:0; padding:0; }
#creativeBackgroundFields, #creativeGhostFields { display:grid; gap:.35rem; }
.creative-comparison { margin-top:.8rem; }
.creative-comparison figure { margin:0; min-width:0; }
.creative-comparison figcaption { margin-bottom:.35rem; font-weight:700; }
.creative-preview { position:relative; overflow:hidden; background:#eef2f6; border-radius:12px; }
.creative-preview img { width:100%; aspect-ratio:1; object-fit:contain; display:block; }
.creative-download { display:inline-block; margin-top:.5rem; }
.photo-scanning::after {
  content:"";
  position:absolute;
  z-index:20;
  pointer-events:none;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:linear-gradient(to bottom, transparent 35%, #39ffb644 45%, #39ffb6 49%, #eafff8 50%, #39ffb6 51%, transparent 57%);
  animation:photo-scan 1.65s linear infinite;
}
@keyframes photo-scan { from { transform:translateY(-55%); } to { transform:translateY(55%); } }
@media (prefers-reduced-motion:reduce) {
  .photo-scanning::after { animation:none; }
}
