/* Import de la police Alfa Slab One */
@import url("https://fonts.googleapis.com/css2?family=Alfa+Slab+One&display=swap");

/* Styles pour les avis clients */
.avis-clients-container {
  font-family: "Alfa Slab One", cursive;
  padding: 40px 20px;
  margin: 20px 0;
}

.avis-clients-title {
  text-align: center;
  color: #333;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  font-weight: bold;
}

.avis-clients-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 3rem;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.avis-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 280px;
  height: 350px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Carte centrale (avis le plus long) */
.avis-card:nth-child(2) {
  max-width: 340px;
  padding: 2.5rem;
  height: 400px;
  transform: scale(1.05);
}

.avis-card:nth-child(2) .avatar {
  width: 100px;
  height: 100px;
}

.avis-card:nth-child(2) .customer-name {
  font-size: 1.3rem;
}

.avis-card:nth-child(2) .review-text {
  font-size: 1rem;
}

.avis-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

/* Hover pour la carte centrale */
.avis-card:nth-child(2):hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

.decorative-stars {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.decorative-stars .star {
  position: absolute;
  color: #fbbf24;
  font-size: 1.8rem;
  font-weight: bold;
}

.decorative-stars .top-left {
  top: 15px;
  left: 15px;
}

.decorative-stars .top-right {
  top: 15px;
  right: 15px;
}

.decorative-stars .bottom-left {
  bottom: 15px;
  left: 15px;
}

.decorative-stars .bottom-right {
  bottom: 15px;
  right: 15px;
}

.profile-icon {
  margin-bottom: 1rem;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #333;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar::before {
  content: "👤";
  font-size: 2rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* Masquer l'emoji quand il y a une image */
.avatar:has(img)::before {
  display: none;
}

.customer-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.2rem;
}

.rating-stars {
  margin-bottom: 1.5rem;
}

.rating-stars .star {
  color: #fbbf24;
  font-size: 1.8rem;
  margin: 0 0.1rem;
}

.review-text {
  color: #333;
  line-height: 1.6;
  text-align: left;
  font-size: 0.95rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Carte centrale avec plus de lignes de texte */
.avis-card:nth-child(2) .review-text {
  -webkit-line-clamp: 7;
}

/* Design responsive */
@media (max-width: 768px) {
  .avis-clients-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .avis-card {
    max-width: 100%;
    padding: 1.5rem;
    height: auto;
    min-height: 280px;
  }

  /* Réinitialiser la carte centrale sur mobile */
  .avis-card:nth-child(2) {
    max-width: 100%;
    padding: 1.5rem;
    height: auto;
    min-height: 320px;
    transform: none;
  }

  .avis-card:nth-child(2) .avatar {
    width: 80px;
    height: 80px;
  }

  .avis-card:nth-child(2) .customer-name {
    font-size: 1.1rem;
  }

  .avis-card:nth-child(2) .review-text {
    font-size: 0.95rem;
  }

  .avis-clients-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .avis-clients-container {
    padding: 20px 10px;
  }

  .avis-card {
    padding: 1rem;
    height: auto;
    min-height: 300px;
  }

  .avatar {
    width: 60px;
    height: 60px;
  }

  .customer-name {
    font-size: 1.1rem;
  }

  .review-text {
    font-size: 0.9rem;
    -webkit-line-clamp: 4;
  }

  /* Carte centrale sur mobile */
  .avis-card:nth-child(2) .review-text {
    -webkit-line-clamp: 5;
  }
}
