/* ====================================
   CAROUSEL CONTAINER
   ==================================== */

.carrousel {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  padding: 20px 0;
}

.carrousel-wrapper {
  display: flex;
  gap: 0;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====================================
   REVIEW CARD - BASE STYLE
   ==================================== */

.previewAvis {
  display: block;
  flex-shrink: 0;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(30, 58, 138, 0.12);
  position: relative;
  min-height: 320px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Card States */
.previewAvis:first-child {
  margin-left: 0;
}

.previewAvis:last-child {
  margin-right: 0;
}

.previewAvis.active {
  display: block;
}

/* Hover Effect */
.previewAvis:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(30, 58, 138, 0.18);
  border-color: rgba(6, 182, 212, 0.3);
}

/* ====================================
   DECORATIVE ELEMENTS
   ==================================== */

/* Decorative Quote Icon */
.previewAvis::before {
  content: "\201C";
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 120px;
  font-family: Georgia, serif;
  color: rgba(6, 182, 212, 0.08);
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}

/* Decorative Corner Element */
.previewAvis::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, transparent 50%, rgba(6, 182, 212, 0.1) 50%);
  border-bottom-left-radius: 20px;
}

/* ====================================
   IDENTITY/NAME SECTION
   ==================================== */

.previewAvis .identite {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 2px solid #e2e8f0;
  position: relative;
  z-index: 1;
  letter-spacing: -0.02em;
  line-height: 1.3;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Animated Underline */
.previewAvis .identite::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #1e3a8a 0%, #06b6d4 100%);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.previewAvis:hover .identite::after {
  width: 120px;
}

/* Empty State */
.previewAvis .identite:empty::before {
  content: "Votre nom apparaitra ici...";
  color: #cbd5e1;
  font-size: 1.2rem;
  font-weight: 500;
  font-style: italic;
  animation: pulseIdentity 2s ease-in-out infinite;
}

@keyframes pulseIdentity {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* ====================================
   COMMENT/REVIEW TEXT SECTION
   ==================================== */

.previewAvis .commantaires {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #475569;
  margin: 25px 0 30px;
  position: relative;
  z-index: 1;
  min-height: 120px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 10px;
  text-align: justify;
  font-weight: 400;
  letter-spacing: 0.01em;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  white-space: pre-wrap !important;
  max-width: 100% !important;
}

/* First Letter Styling */
.previewAvis .commantaires:first-letter {
  font-size: 1.8em;
  font-weight: 700;
  color: #1e3a8a;
  float: left;
  margin: 5px 8px 0 0;
  line-height: 0.9;
}

/* Empty State */
.previewAvis .commantaires:empty::before {
  content: "Votre avis apparaitra ici... Partagez votre experience avec nous!";
  color: #cbd5e1;
  font-style: italic;
  font-size: 0.95rem;
  display: block;
  line-height: 1.6;
  animation: fadeInOut 3s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.8;
  }
}

/* Custom Scrollbar */
.previewAvis .commantaires::-webkit-scrollbar {
  width: 6px;
}

.previewAvis .commantaires::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.previewAvis .commantaires::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1e3a8a 0%, #06b6d4 100%);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.previewAvis .commantaires::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #06b6d4 0%, #1e3a8a 100%);
}

/* ====================================
   RATING STARS SECTION
   ==================================== */

.previewAvis .notes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 32px;
  position: relative;
  z-index: 1;
  padding: 12px 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.2);
  border: 2px solid rgba(251, 191, 36, 0.3);
  transition: all 0.3s ease;
  margin-top: 5px;
}

/* Hover Effect */
.previewAvis .notes:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.3);
}

/* Animation */
.previewAvis .notes:not(:empty) {
  animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* ====================================
   CAROUSEL NAVIGATION BUTTONS
   ==================================== */

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(145deg, #1e3a8a, #06b6d4);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
  transition: all 0.3s ease;
}

.carousel-btn:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-btn.prev {
  left: 15px;
}

.carousel-btn.next {
  right: 15px;
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: translateY(-50%) scale(1);
}

/* ====================================
   CAROUSEL INDICATORS/DOTS
   ==================================== */

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  padding: 10px;
}

.indicator-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cbd5e1;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator-dot:hover {
  background: #94a3b8;
  transform: scale(1.2);
}

.indicator-dot.active {
  background: linear-gradient(135deg, #1e3a8a, #06b6d4);
  width: 32px;
  border-radius: 6px;
  border-color: rgba(30, 58, 138, 0.2);
}

/* ====================================
   CAROUSEL AUTO-PLAY INDICATOR
   ==================================== */

.carousel-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #1e3a8a 0%, #06b6d4 100%);
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

.carousel-progress.active {
  animation: progressBar 5s linear;
}

@keyframes progressBar {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

/* ====================================
   RESPONSIVE DESIGN - TABLET
   ==================================== */

@media (max-width: 768px) {
  .carrousel {
    padding: 40px 60px;
  }

  .previewAvis {
    padding: 30px 25px;
    min-height: 280px;
  }

  .previewAvis::before {
    font-size: 80px;
    top: 10px;
    left: 10px;
  }

  .previewAvis .identite {
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 15px;
  }

  .previewAvis .commantaires {
    font-size: 0.95rem;
    min-height: 100px;
    margin: 20px 0 25px;
  }

  .previewAvis .notes {
    font-size: 26px;
    padding: 10px 16px;
    gap: 4px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

/* ====================================
   RESPONSIVE DESIGN - MOBILE
   ==================================== */

@media (max-width: 480px) {
  .carrousel {
    padding: 30px 50px;
  }

  .previewAvis {
    padding: 25px 20px;
    min-height: 250px;
  }

  .previewAvis .identite {
    font-size: 1.2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .previewAvis .commantaires {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .previewAvis .notes {
    font-size: 24px;
    padding: 8px 14px;
  }

  .carousel-btn {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .carousel-btn.prev {
    left: 10px;
  }

  .carousel-btn.next {
    right: 10px;
  }
}

/* ====================================
   ACCESSIBILITY
   ==================================== */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .previewAvis,
  .carousel-btn,
  .indicator-dot,
  .carrousel-wrapper {
    animation: none;
    transition: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .previewAvis {
    border: 3px solid #000;
  }

  .previewAvis .identite,
  .previewAvis .commantaires {
    color: #000;
  }

  .previewAvis .notes {
    border: 3px solid #000;
    background: #fff;
  }

  .carousel-btn {
    border: 3px solid #000;
  }
}
