/**
 * ISOLUX - Composant Section Avis Clients Premium
 * Conforme WCAG 2.1 AA - Responsive 320px à 1440px - Accessible sans JavaScript
 */

.reviews-section {
  position: relative;
  padding: clamp(3rem, 6vw, 5.5rem) 1rem;
  background-color: #f8fafc;
  color: #0f172a;
  overflow: hidden;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.reviews-section__container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* En-tête de section */
.reviews-section__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.reviews-section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1e40af;
  margin-bottom: 0.5rem;
}

.reviews-section__title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: #0f172a;
  margin: 0 0 1rem 0;
}

/* Badge de note globale Google */
.reviews-section__rating-summary {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  background-color: #ffffff;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
}

.reviews-section__score {
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
}

.reviews-section__stars {
  display: inline-flex;
  gap: 0.2rem;
  color: #f59e0b;
}

.reviews-section__star-icon {
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
}

.reviews-section__rating-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
}

/* Carrousel et Grille */
.reviews-carousel {
  position: relative;
  margin: 0 -0.5rem;
}

.reviews-carousel__track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem 0.5rem 1.5rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.reviews-carousel__track::-webkit-scrollbar {
  height: 6px;
}
.reviews-carousel__track::-webkit-scrollbar-track {
  background: transparent;
}
.reviews-carousel__track::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 9999px;
}

/* Carte d'avis */
.review-card {
  flex: 0 0 calc(100% - 1.5rem);
  max-width: 100%;
  scroll-snap-align: start;
  background-color: #ffffff;
  border-radius: 1rem;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 640px) {
  .review-card {
    flex: 0 0 calc(50% - 1rem);
  }
}

@media (min-width: 1024px) {
  .review-card {
    flex: 0 0 calc(33.333% - 0.85rem);
  }
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

/* En-tête de la carte client */
.review-card__header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1rem;
}

.review-card__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
}

.review-card__author-info {
  flex: 1;
  min-width: 0;
}

.review-card__author {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-card__meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.125rem;
}

.review-card__google-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #166534;
  font-weight: 600;
  font-size: 0.75rem;
}

.review-card__stars {
  display: flex;
  gap: 0.15rem;
  color: #f59e0b;
  margin-bottom: 0.875rem;
}

/* Commentaire */
.review-card__body {
  flex: 1;
  margin-bottom: 1.25rem;
}

.review-card__quote {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #334155;
  margin: 0;
  font-style: normal;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-card__quote::before {
  content: "«\00a0";
  color: #64748b;
  font-weight: 700;
}

.review-card__quote::after {
  content: "\00a0»";
  color: #64748b;
  font-weight: 700;
}

/* Pied de carte avec tags vérifiés */
.review-card__footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.review-card__tag {
  background-color: #eff6ff;
  color: #1e40af;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  border: 1px solid #dbeafe;
}

.review-card__source-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.review-card__source-link:hover {
  color: #1e40af;
  text-decoration: underline;
}

/* Contrôles du carrousel (flèches et dots) */
.reviews-carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.reviews-carousel__btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.reviews-carousel__btn:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
  transform: scale(1.05);
}

.reviews-carousel__btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.reviews-carousel__btn-icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

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

.reviews-carousel__dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background-color: #cbd5e1;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.reviews-carousel__dot[aria-current="true"] {
  background-color: #1e40af;
  transform: scale(1.3);
}

.reviews-carousel__dot:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Boutons d'action finaux */
.reviews-section__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.reviews-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 0.625rem;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 48px;
}

.reviews-button--primary {
  background-color: #1e40af;
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(30, 64, 175, 0.2);
}

.reviews-button--primary:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(30, 64, 175, 0.3);
}

.reviews-button--primary:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.reviews-button--outline {
  background-color: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.reviews-button--outline:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.reviews-button--outline:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.reviews-button__icon {
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
}

/* Accessibilité réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
  .reviews-carousel__track {
    scroll-behavior: auto;
  }
  .review-card,
  .reviews-carousel__btn,
  .reviews-button {
    transition: none;
  }
}
