/* Bloc Avant / Après */
.ams-ba {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
  overflow: hidden;
  margin: 10px 0;
}

.ams-ba__viewport {
  position: relative;
  aspect-ratio: 16/9;
  background: #f3f3f3;
  overflow: hidden;
}

/* Images */
.ams-ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* L'image AVANT est au-dessus et recouverte à 50% par défaut */
.ams-ba__img.before {
  clip-path: inset(0 50% 0 0);
  transition: clip-path .08s linear;
  z-index: 2;
}

.ams-ba__img.after {
  z-index: 1;
}

/* Badges */
.ams-ba__badge {
  position: absolute;
  top: 10px;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  z-index: 3;
}

.ams-ba__badge--before {
  left: 10px;
}

.ams-ba__badge--after {
  right: 10px;
  background: #d6b25e;
  color: #111;
}

/* Slider invisible mais accessible */
.ams-ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 4;
}

/* Poignée */
.ams-ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .2);
  z-index: 3;
}

.ams-ba__handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

/* Métadonnées */
.ams-ba__meta {
  padding: 12px 16px;
}

.ams-ba__title {
  display: block;
  margin: 0 0 6px;
  font-size: 16px;
}

.ams-ba__desc {
  margin: 0;
  color: #666;
  font-size: 14px;
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
  .ams-ba__img.before {
    transition: none;
  }
}
.ams-ba__more {
  display: block;
  font-weight: bold;
  margin: 8px 0;
  font-size: 14px;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s ease;
}

.ams-ba__more:hover {
  color: #555;
}