/* =========================================================
   CONTAINER PRINCIPAL
   ========================================================= */

.florian-ba-pro {
  width: 100%;
  display: block;
}

/* =========================================================
   STAGE (boîte de référence)
   ========================================================= */

.florian-ba-stage {
  position: relative;
  overflow: hidden;
  user-select: none;
  cursor: pointer;
  width: 100%;
  height: 500px; /* hauteur par défaut, peut être surchargée */
  min-height: 200px;
}

/* =========================================================
   IMAGES (empilement parfait)
   ========================================================= */

.florian-ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none !important;
  display: block;
  object-fit: cover; /* ⚠️ IMPORTANT pour alignement parfait */
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* AFTER = fond */
.florian-ba-img-after {
  z-index: 1;
}

/* =========================================================
   BEFORE WRAPPER (zone révélée)
   ========================================================= */

.florian-ba-before-wrap {
  position: absolute;
  inset: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
  will-change: width;
}

/* =========================================================
   HANDLE (ligne + poignée)
   ========================================================= */

.florian-ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  transform: translateX(-50%);
  z-index: 3;
  cursor: ew-resize;
  touch-action: none;
}

/* ligne centrale fine */
.florian-ba-handle::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #ffffff;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}

/* poignée ronde premium */
.florian-ba-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}

/* icône sur le handle */
.florian-ba-handle-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #333;
  pointer-events: none;
}

.florian-ba-handle-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* =========================================================
   ÉTAT DRAG (optionnel mais pro)
   ========================================================= */

.florian-ba-pro.is-dragging {
  cursor: ew-resize;
}

.florian-ba-pro.is-dragging .florian-ba-handle::after {
  transform: translate(-50%, -50%) scale(1.05);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 767px) {

  .florian-ba-handle::after {
    width: 36px;
    height: 36px;
  }

  .florian-ba-stage {
    height: 300px; /* hauteur réduite sur mobile */
  }
}