/* ============================================
   CAROUSEL
   ============================================ */
.carousel { position: relative; }

.carousel__viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.carousel__track {
  display: flex;
  transition: transform .5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel__slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 45% 1fr;
  align-items: center;
  background: var(--cream-deep);
}

.carousel__img {
  height: 340px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.carousel__content {
  padding: 2.5rem 2.8rem;
}

.carousel__slide-title {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  color: var(--text-dark);
  margin-bottom: .75rem;
  font-weight: 400;
}

.carousel__slide-desc {
  color: var(--text-mid);
  line-height: 1.75;
  font-size: .95rem;
}

/* ── Slide avec carte ── */
.carousel__content--map {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  height: 100%;
  justify-content: center;
}

.carousel__badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sage-deep);
  background: var(--sage-pale);
  border-radius: 20px;
  padding: .25rem .85rem;
  margin-bottom: .3rem;
}

.carousel__text-group { display: flex; flex-direction: column; }

.carousel__map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--linen);
  height: 150px;
  flex-shrink: 0;
}
.carousel__map iframe {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Navigation ── */
.carousel__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.6rem;
}

.carousel__btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--linen);
  color: var(--text-dark);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 2px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .25s, color .25s, border-color .25s;
}
.carousel__btn:hover {
  background: var(--sage-deep);
  color: var(--white);
  border-color: var(--sage-deep);
}

.carousel__dots {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.carousel__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--linen);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .3s, width .3s, border-radius .3s;
}
.carousel__dot--active {
  background: var(--sage-deep);
  width: 24px;
  border-radius: 4px;
}

/* ── Carousel images-only (logement) ── */
.carousel--images-only .carousel__slide {
  display: block;
  background: transparent;
}
.carousel--images-only .carousel__img {
  height: 380px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.carousel--images-only .carousel__nav {
  margin-top: 0;
  padding: .9rem 1rem;
  background: var(--white);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border: 1px solid var(--linen);
  border-top: none;
}

/* ── Carousel dans services ── */
.carousel--services {
  margin-bottom: 3.5rem;
}
.carousel--services .carousel__slide {
  background: var(--white);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .carousel__slide {
    grid-template-columns: 1fr;
  }
  .carousel__img {
    height: 240px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .carousel__content {
    padding: 1.8rem 2rem;
  }
  .carousel--images-only .carousel__img { height: 260px; }
}

@media (max-width: 640px) {
  .carousel__img { height: 200px; }
  .carousel__content { padding: 1.4rem 1.5rem; }
  .carousel__map { height: 130px; }
  .carousel-heading h3 { font-size: 1.25rem; }
  .carousel--images-only .carousel__img { height: 210px; }
}

/* ============================================
   LISTE SYNC (carousel ↔ liste)
   ============================================ */
.studio__details--sync {
  max-height: 450px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--linen) transparent;
}
.studio__details--sync::-webkit-scrollbar { width: 4px; }
.studio__details--sync::-webkit-scrollbar-track { background: transparent; }
.studio__details--sync::-webkit-scrollbar-thumb {
  background: var(--linen);
  border-radius: 2px;
}
.studio__details--sync .studio__spaces {
  margin-bottom: 0;
}
.studio__details--sync .studio__spaces li {
  cursor: pointer;
  border-radius: var(--radius);
  padding: .5rem .7rem;
  margin-inline: -.7rem;
  transition: background .2s var(--ease);
}
.studio__details--sync .studio__spaces li:not(.is-active):hover {
  background: var(--cream-deep);
}

@keyframes fadeToActive {
  0%   { background: rgba(40, 60, 40, 0.22); }
  100% { background: var(--sage-pale); }
}
.studio__details--sync .studio__spaces li.is-active {
  animation: fadeToActive 1s var(--ease) forwards;
}

@media (max-width: 900px) {
  .studio__details--sync { max-height: none; overflow-y: visible; }
}
