/* =========================================
   2-ICA — Système de témoignages vidéo
   Utilisé sur : index.html (aperçu) + temoignages.html (complet)
   ========================================= */

/* Grille de cartes */
.testimonials-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 0 auto;
  max-width: 1100px;
}
@media (max-width: 980px){
  .testimonials-grid{ grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 640px){
  .testimonials-grid{ grid-template-columns: 1fr; gap: 18px; max-width: 420px; }
}

/* Carte témoignage */
.testimonial-card{
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 45px -22px rgba(10,22,40,.35), 0 0 0 1px rgba(10,22,40,.05);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  color: inherit;
}
.testimonial-card:hover,
.testimonial-card:focus-visible{
  transform: translateY(-4px);
  box-shadow: 0 28px 55px -22px rgba(10,22,40,.45), 0 0 0 1px rgba(197,165,90,.4);
  outline: none;
}

/* Miniature (poster) avec bouton play */
.testimonial-thumb{
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--navy);
  overflow: hidden;
}
.testimonial-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.testimonial-card:hover .testimonial-thumb img{ transform: scale(1.04); }
.testimonial-thumb::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,22,40,0) 50%, rgba(10,22,40,.55) 100%);
  pointer-events: none;
}
.testimonial-play{
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(10,22,40,.35);
  transition: transform .3s ease, background .3s ease;
  z-index: 2;
}
.testimonial-card:hover .testimonial-play{
  background: var(--gold);
  transform: translate(-50%, -50%) scale(1.08);
}
.testimonial-play svg{ width: 24px; height: 24px; fill: var(--navy); margin-left: 3px; }

/* Badge catégorie */
.testimonial-badge{
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.95);
  color: var(--navy);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Corps de carte */
.testimonial-body{
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.testimonial-name{
  font-family: var(--font-display);
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}
.testimonial-role{
  color: var(--muted);
  font-size: .88rem;
  margin: 0;
}
.testimonial-quote{
  color: var(--navy);
  font-size: .94rem;
  font-style: italic;
  line-height: 1.55;
  margin: 6px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Bouton "voir tous" sous le carrousel d'accueil */
.testimonials-cta{
  text-align: center;
  margin-top: 36px;
}

/* ============ Filtres (page dédiée) ============ */
.testimonials-filters{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 36px;
  max-width: 720px;
}
.filter-btn{
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(10,22,40,.12);
  background: #fff;
  color: var(--navy);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
  font-family: inherit;
}
.filter-btn:hover{ border-color: var(--gold); color: var(--gold); }
.filter-btn.active{
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* État vide */
.testimonials-empty{
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-style: italic;
}

/* ============ Modale lecteur vidéo ============ */
.video-modal{
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 4000;
  padding: 20px;
  opacity: 0;
  transition: opacity .25s ease;
}
.video-modal.is-open{ display: flex; opacity: 1; }
.video-modal-inner{
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy);
  box-shadow: 0 40px 80px rgba(0,0,0,.5);
}
.video-modal-media{
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: var(--navy);
}
.video-modal-media iframe,
.video-modal-media video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--navy);
}
.video-modal-close{
  position: absolute;
  top: 12px; right: 12px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: var(--navy);
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 10;
  transition: background .2s ease, transform .2s ease;
  font-size: 1.4rem;
  line-height: 1;
}
.video-modal-close:hover{ background: var(--gold); transform: scale(1.08); }
.video-modal-caption{
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 18px 22px 22px;
  background: linear-gradient(0deg, rgba(10,22,40,.95) 0%, rgba(10,22,40,0) 100%);
  color: #fff;
  pointer-events: none;
}
.video-modal-caption strong{ display: block; font-size: 1rem; margin-bottom: 4px; }
.video-modal-caption span{ font-size: .85rem; color: rgba(255,255,255,.75); }
