/* *, *:before, *:after{
  padding: 0;
  margin: 0;
  box-sizing: border-box;
} */

/* 1. Le conteneur principal */
.AVAP {
  margin: 0 auto;
  position: relative;
  width: 50%;
  
  height: 450px; 
  overflow: hidden;
  user-select: none;
  /* Empêche les rebonds bizarres sur mobile pendant le slide */
  touch-action: pan-y; 
  background-color: #eee;
}

/* 2. L'image de fond (APRÈS) */
.afterImg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* L'image remplit le cadre sans se déformer */
}

/* 3. Le volet coulissant (Masque) */
.beforeSlider {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%; /* Position de départ */
  height: 100%;
  overflow: hidden; 
  z-index: 2;
  border-right: 2px solid white; /* La ligne de séparation */
}

/* 4. L'image du dessus (AVANT) */
.beforeImg {
  position: absolute;
  top: 0;
  left: 0;
  
  width: 100%; 
  height: 100%;
  
  
  object-fit: contain;
  
 
}

/* 5. La poignée (Curseur) */
.hand {
  position: absolute;
  top: 0;
  left: 50%; /* Doit correspondre à la largeur de .beforeSlider */
  height: 100%;
  width: 4px;
  background: white;
  z-index: 3;
  transform: translateX(-50%);
  cursor: ew-resize;
}

/* 6. Le cercle décoratif sur la poignée */
.handCircle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  color: #333;
  font-weight: bold;
}

/* 7. La ligne de la poignée */
.handLine {
  width: 100%;
  height: 100%;
  background: white;
}

.label-text{
  position: absolute;
  top: 20px;
  padding: 8px 15px;
  background: rgba(0,0,0,0.6);
  color: #D4AF37;
  font-family: sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  z-index: 10;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.before-label{
  left: 20px;
}

.after-label {
  right: 20px;
}

@media screen and (max-width:650px){

  .beforeImg{
    object-fit: cover;
  }
}