/* Section principale */
.mtest-section {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 40px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Slider Container */
.mtest-slider-container {
  position: relative;
  width: 100%;
}

/* Slider Wrapper */
.mtest-slider-wrapper {
  overflow: hidden;
  border-radius: 24px;
  width: 100%;
}

.mtest-cards-container {
  display: flex;
  transition: transform 0.6s ease;
  width: calc(300% + 120px);
  gap: 30px;
}

/* Chaque card testimonial */
.mtest-card-regular {
  flex: 0 0 calc((100vw - 140px) / 3);
  max-width: calc((1400px - 140px) / 3);
  height: 460px;
  cursor: pointer;
  position: relative;
  perspective: 1000px;
  transition: all 0.4s ease;
}

.mtest-card-regular:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Container pour l'effet flip */
.mtest-card-regular .mtest-card-default,
.mtest-card-regular .mtest-card-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  background: white;
}

/* FACE AVANT - Carte par défaut */
.mtest-card-default {
  transform: rotateY(0deg);
  z-index: 2;
}

/* FACE ARRIÈRE - Carte de hover */
.mtest-card-hover {
  transform: rotateY(-180deg);
  z-index: 1;
}

/* Animation FLIP au hover */
.mtest-card-regular:hover .mtest-card-default {
  transform: rotateY(180deg);
}

.mtest-card-regular:hover .mtest-card-hover {
  transform: rotateY(0deg);
}

/* === FACE AVANT - PREVIEW === */
.mtest-card-default {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.mtest-card-default::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f91e5a, #5ce1e6);
  border-radius: 24px 24px 0 0;
  z-index: 1;
}

.mtest-quote-icon {
  padding: 30px 30px 20px;
  text-align: center;
}

.mtest-testimonial-preview {
  flex-grow: 1;
  padding: 0 30px 20px;
  display: flex;
  align-items: center;
}

.mtest-testimonial-text-preview {
  font-size: 16px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
  text-align: center;
  font-style: italic;
  position: relative;
}

.mtest-testimonial-text-preview::before,
.mtest-testimonial-text-preview::after {
  content: '"';
  font-size: 24px;
  color: #f91e5a;
  font-weight: bold;
  position: absolute;
  top: -5px;
}

.mtest-testimonial-text-preview::before {
  left: -15px;
}

.mtest-testimonial-text-preview::after {
  right: -15px;
}

.mtest-author-info {
  background: #f8fafc;
  padding: 25px 30px;
  border-radius: 0 0 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.mtest-author-details {
  flex-grow: 1;
}

.mtest-author-name {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 5px;
}

.mtest-author-role {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 3px;
  font-weight: 500;
}

.mtest-company-name {
  font-size: 14px;
  color: #0f172a;
  margin: 0;
  font-weight: 600;
}

.mtest-company-logo {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mtest-company-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.mtest-card-regular:hover .mtest-company-logo img {
  transform: scale(1.1);
}

/* === FACE ARRIÈRE - TESTIMONIAL COMPLET === */
.mtest-card-hover {
  overflow: hidden;
  position: relative;
}

.mtest-card-hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f91e5a, #5ce1e6);
  border-radius: 24px 24px 0 0;
  z-index: 1;
}

.mtest-hover-content {
  height: 100%;
  padding: 44px 35px 35px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

/* Rating avec étoiles */
.mtest-hover-header {
  text-align: center;
  opacity: 0;
  transform: translateY(-20px);
  animation: slideInDown 0.6s ease 0.3s forwards;
}

.mtest-rating {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-bottom: 20px;
}

.mtest-star {
  font-size: 20px;
  color: #e2e8f0;
  transition: all 0.3s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.mtest-star.active {
  background: linear-gradient(45deg, #f91e5a, #fbbf24, #5ce1e6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Corps avec témoignage complet */
.mtest-hover-body {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  animation: scaleIn 0.6s ease 0.5s forwards;
}

.mtest-quote-full {
  position: relative;
  text-align: center;
}

.mtest-quote-mark {
  font-size: 60px;
  color: #f91e5a;
  font-weight: bold;
  line-height: 0.5;
  opacity: 0.3;
  font-family: Georgia, serif;
}

.mtest-quote-end {
  color: #5ce1e6;
  float: right;
  margin-top: 10px;
}

.mtest-testimonial-text-full {
  font-size: 15px;
  line-height: 1.7;
  color: #334155;
  margin: 20px 0;
  font-style: italic;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* Footer avec signature */
.mtest-hover-footer {
  opacity: 0;
  transform: translateY(20px);
  animation: slideInUp 0.6s ease 0.7s forwards;
}

.mtest-author-signature {
  text-align: center;
  padding-top: 20px;
  border-top: 2px solid;
  border-image: linear-gradient(90deg, #f91e5a, #5ce1e6) 1;
}

.mtest-hover-author {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 5px;
}

.mtest-hover-role {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 15px;
  font-weight: 500;
}

.mtest-hover-company {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.mtest-hover-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.mtest-hover-company-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

/* Animations */
@keyframes slideInDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === SYSTÈME DE PAGINATION === */
.mtest-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  gap: 12px;
}

.mtest-pagination-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: #e2e8f0;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mtest-pagination-dot:hover {
  background: #cbd5e1;
  transform: scale(1.2);
}

.mtest-pagination-dot.active {
  width: 32px;
  border-radius: 16px;
  background: linear-gradient(90deg, #f91e5a, #5ce1e6);
}

.mtest-pagination-dot.active:hover {
  transform: scale(1.1);
}

/* Animation pour le point actif */
.mtest-pagination-dot.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.3), transparent, rgba(255,255,255,0.3));
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .mtest-card-regular {
    flex: 0 0 calc((100vw - 110px) / 2);
    max-width: calc((1200px - 110px) / 2);
    height: 420px;
  }
}

@media (max-width: 768px) {
  .mtest-section {
    padding: 0 20px;
  }

  .mtest-card-regular {
    flex: 0 0 calc(100vw - 40px);
    max-width: calc(768px - 40px);
    height: 400px;
  }
  
  .mtest-cards-container {
    gap: 20px;
    width: calc(300% + 40px);
  }

  .mtest-pagination {
    margin-top: 30px;
    gap: 6px;
  }

  .mtest-pagination-dot {
    width: 5px;
    height: 5px;
  }

  .mtest-pagination-dot.active {
    width: 10px;
    height: 10px;
  }

  .mtest-hover-content {
    padding: 44px 25px 25px;
  }

  .mtest-testimonial-text-full {
    font-size: 14px;
  }

  .mtest-quote-mark {
    font-size: 45px;
  }
}

@media (max-width: 480px) {
  .mtest-section {
    margin: 20px auto;
    padding: 0 15px;
  }

  .mtest-card-regular {
    flex: 0 0 calc(100vw - 30px);
    max-width: calc(480px - 30px);
    height: 380px;
  }
  
  .mtest-cards-container {
    gap: 15px;
    width: calc(300% + 30px);
  }

  .mtest-pagination {
    margin-top: 25px;
    gap: 5px;
  }

  .mtest-pagination-dot {
    width: 4px;
    height: 4px;
  }

  .mtest-pagination-dot.active {
    width: 8px;
    height: 8px;
  }

  .mtest-hover-content {
    padding: 44px 20px 20px;
  }

  .mtest-testimonial-text-preview {
    font-size: 14px;
  }

  .mtest-author-name {
    font-size: 16px;
  }

  .mtest-testimonial-text-full {
    font-size: 13px;
    line-height: 1.6;
  }

  .mtest-quote-mark {
    font-size: 40px;
  }
}