/**
 * Home Staging Component
 * ======================
 * Slider comparaison avant/après avec curseur interactif
 */

.home-staging {
  padding: 6rem 2rem;
  background: linear-gradient(135deg, #0a192f 0%, #1a2942 100%);
  overflow: hidden;
}

.home-staging__container {
  max-width: 1200px;
  margin: 0 auto;
}

.home-staging__header {
  text-align: center;
  margin-bottom: 4rem;
}

.home-staging__subtitle {
  color: #64ffda;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.home-staging__title {
  font-size: 2.5rem;
  color: #ffffff;
  margin-bottom: 1rem;
}

.home-staging__description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto;
}

.home-staging__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

/* Comparateur individuel */
.staging-comparator {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.staging-comparator__title {
  font-size: 1.5rem;
  color: #64ffda;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.staging-comparator__subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
}

/* Container du slider */
.staging-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  cursor: col-resize;
  user-select: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Image avant (fond) */
.staging-slider__before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.staging-slider__before img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Image après (dessus avec clip) */
.staging-slider__after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  transition: clip-path 0.05s ease-out;
}

.staging-slider__after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Ligne de séparation */
.staging-slider__divider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: #64ffda;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 20px rgba(100, 255, 218, 0.5);
}

/* Curseur de contrôle */
.staging-slider__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  background: #64ffda;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: col-resize;
  box-shadow: 0 4px 20px rgba(100, 255, 218, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 10;
}

.staging-slider__handle:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 30px rgba(100, 255, 218, 0.6);
}

.staging-slider__handle::before,
.staging-slider__handle::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: solid #0a192f;
  border-width: 0 3px 3px 0;
}

.staging-slider__handle::before {
  left: 15px;
  transform: rotate(135deg);
}

.staging-slider__handle::after {
  right: 15px;
  transform: rotate(-45deg);
}

/* Labels avant/après */
.staging-slider__label {
  position: absolute;
  top: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(5px);
  pointer-events: none;
  z-index: 5;
}

.staging-slider__label--before {
  left: 20px;
}

.staging-slider__label--after {
  right: 20px;
}

/* État actif (en train de glisser) */
.staging-slider.is-dragging {
  cursor: col-resize;
}

.staging-slider.is-dragging .staging-slider__handle {
  transform: translate(-50%, -50%) scale(1.15);
}

/* Responsive */
@media (max-width: 768px) {
  .home-staging {
    padding: 4rem 1rem;
  }

  .home-staging__title {
    font-size: 2rem;
  }

  .staging-comparator {
    padding: 1.5rem;
  }

  .staging-comparator__title {
    font-size: 1.25rem;
  }

  .staging-slider {
    aspect-ratio: 4 / 3;
  }

  .staging-slider__handle {
    width: 50px;
    height: 50px;
  }

  .staging-slider__label {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    top: 10px;
  }

  .staging-slider__label--before {
    left: 10px;
  }

  .staging-slider__label--after {
    right: 10px;
  }
}

/* Instructions utilisateur */
.staging-instructions {
  text-align: center;
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  font-style: italic;
}

.staging-instructions svg {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 0.5rem;
}
/* Disclaimer */
.home-staging__disclaimer {
  margin-top: 3rem;
  padding: 1.25rem 1.75rem;
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  border: 1px solid #fde047;
  border-left: 4px solid #facc15;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.08);
}

.home-staging__disclaimer svg {
  display: none;
}

.home-staging__disclaimer-content {
  width: 100%;
}

.home-staging__disclaimer-content strong {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #854d0e;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.home-staging__disclaimer-content strong::before {
  content: '⚠️';
  font-size: 1rem;
}

.home-staging__disclaimer-content p {
  color: #713f12;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .home-staging__disclaimer {
    padding: 1rem 1.25rem;
  }
  
  .home-staging__disclaimer-content strong {
    font-size: 0.9rem;
  }
  
  .home-staging__disclaimer-content p {
    font-size: 0.8rem;
  }
}