/**
 * Témoignage Single AB - Divi 5 custom module (single testimonial card).
 * Rendu identique à une card du carousel mais standalone (module autonome).
 * Layout adaptatif selon le type du CPT (texte ou vidéo).
 */

.ab-testimonial-single {
  --ab-tss-card-bg: #FCFBF7;
  --ab-tss-card-padding: 40px;
  --ab-tss-card-min-height: 340px;
  --ab-tss-logo-max-height: 40px;
  --ab-tss-logo-max-width: 160px;

  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* Wrapper de scope inséré par le render_callback : doit propager la hauteur
   pour que Divi row en stretch remplisse toute la colonne. */
.ab-testimonial-single > [class*='ab-testimonial-single--i'] {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ab-testimonial-single__card {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.ab-testimonial-single__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: var(--ab-tss-card-bg);
  padding: var(--ab-tss-card-padding);
  min-height: var(--ab-tss-card-min-height);
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
@media (max-width: 767px) {
  .ab-testimonial-single__inner {
    padding: 28px;
    gap: 16px;
  }
}

/* Variante texte : icône de citation en glyphe (comportement du carousel). */
.ab-testimonial-single__quote-icon {
  display: block;
  line-height: 1 !important;
  font-size: 48px;
  font-weight: 700;
  color: #F62E02;
  font-family: inherit;
  margin: -0.15em 0 -0.55em;
}

.ab-testimonial-single__quote {
  color: #222;
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  white-space: pre-line;
}

/* Variante vidéo : media en haut, aspect ratio fixe. */
.ab-testimonial-single__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #111;
}
.ab-testimonial-single__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ab-testimonial-single__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ab-testimonial-single__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: none;
  background-color: #FCFBF7;
  color: #F62E02;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 200ms ease;
  z-index: 2;
}
.ab-testimonial-single__play-icon {
  font-size: 34px;
  line-height: 1;
  margin-left: 4px;
  color: #F62E02;
}
.ab-testimonial-single__play:hover,
.ab-testimonial-single__play:focus-visible {
  transform: translate(-50%, -50%) scale(1.05);
  outline: none;
}

/* Footer : auteur (col) à gauche, logo à droite, aligné en bas. */
.ab-testimonial-single__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: auto;
}
.ab-testimonial-single__author {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ab-testimonial-single__name {
  font-weight: 500;
  color: #222;
  font-size: 16px;
  line-height: 1.3;
}
.ab-testimonial-single__role {
  color: #6b6b6b;
  font-size: 13px;
  line-height: 1.3;
}
.ab-testimonial-single__logo-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}
.ab-testimonial-single__logo {
  max-height: var(--ab-tss-logo-max-height);
  max-width: var(--ab-tss-logo-max-width);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.ab-testimonial-single__logo-placeholder {
  color: #999;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 16px;
  border: 1px dashed #ccc;
}

.ab-testimonial-single__empty {
  padding: 40px;
  text-align: center;
  color: #999;
  font-style: italic;
  background-color: rgba(0, 0, 0, 0.03);
}

/* Lightbox vidéo partagée avec le carousel : réutilise les mêmes classes. */
