/* ===================================
   MODE FIXE : Layout 1 grande + 2 petites
   =================================== */

.rosefly-home-wrapper {
  width: 95%;
  max-width: 1200px;
  margin: 1rem auto;
  box-sizing: border-box;
}

/* Layout grille 2 colonnes */
.rosefly-home-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 15px;
  align-items: stretch;
}

.rosefly-home-container a {
  display: block;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.rosefly-home-container a:hover {
  opacity: 0.9;
}

/* Grande image à gauche */
.rosefly-home-container > a.big {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  max-height: 500px;
}

.rosefly-home-container > a.big img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 300px;
}

/* Colonne de droite : 2 images carrées */
.rosefly-home-container > .small-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 100%;
}

.rosefly-home-container > .small-container a.small {
  position: relative;
  flex: 1;
  overflow: hidden;
  border-radius: 8px;
  min-height: 0;
}

.rosefly-home-container > .small-container a.small img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===================================
   MODE CARROUSEL
   =================================== */

.rosefly-carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #f5f5f5;
}

.rosefly-carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.rosefly-carousel-slide {
  min-width: 100%;
  position: relative;
}

.rosefly-carousel-slide a,
.rosefly-carousel-slide > img {
  display: block;
  width: 100%;
}

.rosefly-carousel-img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  display: block;
}
.rosefly-carousel-img{
  transition: transform 0.45s cubic-bezier(.4,0,.2,1);
}

.rosefly-carousel-img:hover{
  transform: scale(1.08);
}

/* Boutons de navigation */
.rosefly-carousel-prev,
.rosefly-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgb(197 123 144);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.rosefly-carousel-prev:hover,
.rosefly-carousel-next:hover {
  background: rgba(0, 0, 0, 0.8);
}

.rosefly-carousel-prev {
  left: 20px;
}

.rosefly-carousel-next {
  right: 20px;
}

/* Indicateurs (dots) */
.rosefly-carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.rosefly-carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.rosefly-carousel-dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.rosefly-carousel-dot.active {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.3);
}

/* ===================================
   RESPONSIVE - MOBILE
   =================================== */

@media (max-width: 768px) {
  .rosefly-home-wrapper {
    width: 100%;
    padding: 0 12px;
    margin: 1rem auto;
  }

  /* MODE FIXE : passage en colonne unique */
  .rosefly-home-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .rosefly-home-container > a.big {
    border-radius: 6px;
  }

  .rosefly-home-container > a.big img {
    height: auto;
  }

  /* Les 2 petites images côte à côte */
  .rosefly-home-container > .small-container {
    flex-direction: row;
    height: auto;
    gap: 12px;
  }

  .rosefly-home-container > .small-container a.small {
    border-radius: 6px;
    aspect-ratio: 1/1;
  }

  /* MODE CARROUSEL : boutons plus petits */
  .rosefly-carousel-prev,
  .rosefly-carousel-next {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .rosefly-carousel-prev {
    left: 10px;
  }

  .rosefly-carousel-next {
    right: 10px;
  }

  .rosefly-carousel-dots {
    bottom: 10px;
    gap: 8px;
  }

  .rosefly-carousel-dot {
    width: 10px;
    height: 10px;
  }

  .rosefly-carousel-img {
    max-height: 350px;
  }
}

/* Très petits écrans */
@media (max-width: 480px) {
  .rosefly-carousel-prev,
  .rosefly-carousel-next {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }

  .rosefly-carousel-img {
    max-height: 300px;
  }
  
  .rosefly-home-container > a.big {
    max-height: 300px;
  }
}

/* ===================================
   ACCESSIBILITÉ
   =================================== */

.rosefly-carousel-prev:focus,
.rosefly-carousel-next:focus,
.rosefly-carousel-dot:focus {
  outline: 3px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

/* Réduction de mouvement pour accessibilité */
@media (prefers-reduced-motion: reduce) {
  .rosefly-carousel-track {
    transition: none;
  }
  
  .rosefly-home-container a,
  .rosefly-carousel-prev,
  .rosefly-carousel-next,
  .rosefly-carousel-dot {
    transition: none;
  }
}

/* ===================================
   LIMITATION HAUTEUR HERO DESKTOP
   =================================== */

@media (min-width: 1024px) {

  /* Mode fixe */
  .rosefly-home-container > a.big {
    max-height: 60vh;
  }

  .rosefly-home-container > a.big img {
    height: 100%;
    max-height: none;
  }

  /* Mode carrousel */
  .rosefly-carousel-img {
    max-height: 60vh;
  }

}