/* Témoignages — avis clients */

.testimonials {
  padding: 4.5rem 0 5rem;
  background: var(--color-bg);
}

.testimonials__header {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 3rem;
}

.testimonials__eyebrow {
  margin: 0 0 0.875rem;
  color: var(--color-accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.testimonials__title {
  margin: 0 0 1rem;
  color: var(--color-primary-dark);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.testimonials__subtitle {
  margin: 0;
  color: color-mix(in srgb, var(--color-text) 85%, transparent);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.testimonials__carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonials__track-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.testimonials__track-wrapper::before,
.testimonials__track-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.5rem;
  z-index: 2;
  pointer-events: none;
}

.testimonials__track-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--color-bg), transparent);
}

.testimonials__track-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--color-bg), transparent);
}

.testimonials__track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.25rem 0.5rem 0.75rem;
}

.testimonials__track::-webkit-scrollbar {
  display: none;
}

.testimonial-card {
  flex: 0 0 calc(100% - 1rem);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  min-height: 16rem;
  padding: 1.75rem 1.5rem;
  border-radius: 0.75rem;
  background: var(--color-bg);
  border: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--color-text) 8%, transparent);
}

.testimonial-card__stars {
  display: flex;
  gap: 0.125rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1;
}

.testimonial-card__star {
  color: var(--color-accent);
}

.testimonial-card__star--empty {
  color: color-mix(in srgb, var(--color-text) 22%, transparent);
}

.testimonial-card__quote {
  flex: 1;
  margin: 0 0 1.5rem;
  color: var(--color-text);
  font-size: 0.9375rem;
  font-style: italic;
  line-height: 1.65;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-top: auto;
}

.testimonial-card__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-bg);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.testimonial-card__info {
  min-width: 0;
}

.testimonial-card__name {
  margin: 0 0 0.25rem;
  color: var(--color-text);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}

.testimonial-card__meta {
  margin: 0;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.testimonials__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-primary);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.testimonials__nav:hover {
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
  border-color: var(--color-primary);
}

.testimonials__nav svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* --- Responsive --- */

@media (max-width: 575px) {
  .testimonials {
    padding: 3.5rem 0 4rem;
  }

  .testimonials__carousel {
    gap: 0;
  }

  .testimonials__nav {
    display: none;
  }

  .testimonials__track-wrapper::before,
  .testimonials__track-wrapper::after {
    width: 1.5rem;
  }
}

@media (min-width: 576px) and (max-width: 991px) {
  .testimonial-card {
    flex: 0 0 calc(50% - 0.625rem);
  }
}

@media (min-width: 992px) {
  .testimonial-card {
    flex: 0 0 calc((100% - 2.5rem) / 3);
  }
}

@media (min-width: 576px) {
  .testimonials__track-wrapper::before,
  .testimonials__track-wrapper::after {
    opacity: 1;
  }
}
