.ba-slider {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 10px auto;
  overflow: hidden;
  user-select: none;
  border-radius: 8px;
}

.ba-slider img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.ba-resize {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  overflow: hidden; /* C'est ce qui cache ce qui dépasse, y compris le texte ! */
}

.ba-resize img {
  max-width: none;
  height: 100%;
  object-fit: cover;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #ffffff;
  cursor: ew-resize;
  transform: translateX(-50%);
  box-shadow: 0 0 5px rgba(0,0,0,0.5);
  z-index: 20;
}

.ba-handle::after {
  content: "↔";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: #ffffff;
  border: 2px solid #333333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  color: #333333;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.ba-text {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  font-weight: bold;
  font-size: 16px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  z-index: 10;
  pointer-events: none;
  white-space: nowrap; /* Empêche le texte de se couper sur plusieurs lignes */
}

.ba-text-left { 
  left: 15px; 
}

.ba-text-right { 
  right: 15px; 
}