/* ================================================
   SLIDER AVANT / APRÈS
   Chemin : /css/slider.css
   Importer sur : index.html et concept.html
================================================ */

.before-after-container {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}

/* Image AVANT (fond) */
.before-after-container > img {
  width: 100%;
  display: block;
  height: 500px;
  object-fit: cover;
  pointer-events: none;
}

/* Couche APRÈS */
.after-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: none;
  will-change: width;
}

.after-layer img {
  width: 700px;
  max-width: none;
  height: 500px;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Barre verticale */
.slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: white;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none;
  will-change: left;
}

/* Bouton ◀ ▶ */
.slider-handle::after {
  content: "◀ ▶";
  background: white;
  color: #1F3D2B;
  font-size: 11px;
  padding: 8px 10px;
  position: absolute;
  white-space: nowrap;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Labels AVANT / APRÈS */
.ba-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  font-size: 13px;
  color: #6E6A66;
  text-transform: uppercase;
  letter-spacing: 2px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ================================================
   RESPONSIVE — slider.css
   ================================================ */

/* ── Tablette (max 900px) ── */
@media (max-width: 900px) {

  .before-after-container {
    max-width: 100%;
  }

  .before-after-container > img,
  .after-layer img {
    height: 380px;
  }

  .after-layer img {
    width: 100%;
  }
}

/* ── Mobile (max 600px) ── */
@media (max-width: 600px) {

  .before-after-container > img,
  .after-layer img {
    height: 260px;
  }

  .slider-handle::after {
    font-size: 9px;
    padding: 6px 8px;
  }

  .ba-labels {
    font-size: 11px;
    letter-spacing: 1px;
    margin-top: 10px;
  }
}

/* ── Petit mobile (max 380px) ── */
@media (max-width: 380px) {

  .before-after-container > img,
  .after-layer img {
    height: 200px;
  }

  .slider-handle::after {
    font-size: 8px;
    padding: 5px 6px;
  }
}
