/* ============================================================
   references.css - /references/ : PREUVES / TESTIMONIALS / QUOTES
   Narratif : "Nos clients ne nous quittent pas". Crédibilité,
   discrétion (clients anonymisés), témoignages.

   Effets distincts : pulse radial concentrique, guillemets qui
   scale autour, count-up sur facts, 3 testimonials chacun avec
   son anim (blur, slide, scale-rotate) pour variete interne.
   ============================================================ */

.page-references { --r-ease-out: cubic-bezier(.23, 1, .32, 1); }

/* Mesh : pulse radial concentrique (signal/echo) */
.page-references .idx3-page-hero__mesh::before {
  animation: refPulseRadial 6s ease-in-out infinite;
}
@keyframes refPulseRadial {
  0%, 100% { transform: scale(1); opacity: .8; }
  50%      { transform: scale(1.15); opacity: 1; }
}

/* Title + em avec guillemets ouvrants/fermants en pseudos */
.page-references .idx3-page-hero__title {
  opacity: 0; transform: translateY(10px);
  animation: refTitleIn .9s var(--r-ease-out) 200ms forwards;
}
@keyframes refTitleIn { to { opacity: 1; transform: translateY(0); } }

.page-references .idx3-page-hero__title em {
  position: relative;
  display: inline-block;
  font-style: italic;
  color: var(--lume-1);
}
/* Guillemets typographiques (signature) - scale-in apres le mot */
.page-references .idx3-page-hero__title em::before,
.page-references .idx3-page-hero__title em::after {
  position: absolute;
  font-family: var(--font-display);
  font-size: 1.4em;
  color: var(--lume-1);
  opacity: 0;
  transform: scale(.4);
  transition: opacity .5s var(--r-ease-out), transform .5s var(--r-ease-out);
}
.page-references .idx3-page-hero__title em::before {
  content: "«";
  left: -.5em; top: -.05em;
}
.page-references .idx3-page-hero__title em::after {
  content: "»";
  right: -.5em; bottom: 0;
}
.page-references .idx3-page-hero__title em {
  margin: 0 .5em;
}
.page-references .idx3-page-hero__title em::before { animation: refQuoteIn .6s var(--r-ease-out) 1300ms forwards; }
.page-references .idx3-page-hero__title em::after  { animation: refQuoteIn .6s var(--r-ease-out) 1500ms forwards; }
@keyframes refQuoteIn { to { opacity: 1; transform: scale(1); } }

.page-references .idx3-page-hero__lead {
  opacity: 0;
  animation: refFade 1s var(--r-ease-out) 700ms forwards;
}
@keyframes refFade { to { opacity: 1; } }

.page-references .idx3-page-hero__meta > div {
  opacity: 0; transform: scale(.96);
  animation: refMetaIn .55s var(--r-ease-out) forwards;
}
.page-references .idx3-page-hero__meta > div:nth-child(1) { animation-delay: 1100ms; }
.page-references .idx3-page-hero__meta > div:nth-child(2) { animation-delay: 1200ms; }
.page-references .idx3-page-hero__meta > div:nth-child(3) { animation-delay: 1300ms; }
.page-references .idx3-page-hero__meta > div:nth-child(4) { animation-delay: 1400ms; }
@keyframes refMetaIn { to { opacity: 1; transform: scale(1); } }

/* Facts row : count-up via data-count quand possible */
.page-references .idx3-facts-row > div {
  opacity: 0; transform: translateY(8px);
  transition: opacity .55s var(--r-ease-out), transform .55s var(--r-ease-out);
}
.page-references .idx3-facts-row.in > div { opacity: 1; transform: translateY(0); }
.page-references .idx3-facts-row.in > div:nth-child(1) { transition-delay: 100ms; }
.page-references .idx3-facts-row.in > div:nth-child(2) { transition-delay: 200ms; }
.page-references .idx3-facts-row.in > div:nth-child(3) { transition-delay: 300ms; }
.page-references .idx3-facts-row.in > div:nth-child(4) { transition-delay: 400ms; }

/* Section title + num */
.page-references .idx3-page-section.reveal .idx3-page-section__num,
.page-references .idx3-page-section.reveal .idx3-page-section__title,
.page-references .idx3-page-section.reveal .idx3-page-section__lead {
  opacity: 0; transform: translateY(8px);
  transition: opacity .65s var(--r-ease-out), transform .65s var(--r-ease-out);
}
.page-references .idx3-page-section.reveal.in .idx3-page-section__num { opacity: 1; transform: translateY(0); transition-delay: 60ms; }
.page-references .idx3-page-section.reveal.in .idx3-page-section__title { opacity: 1; transform: translateY(0); transition-delay: 160ms; }
.page-references .idx3-page-section.reveal.in .idx3-page-section__lead { opacity: 1; transform: translateY(0); transition-delay: 280ms; }

/* TESTIMONIALS - 3 anims differentes pour variete interne
   (anti slop "tout pareil"). 1er=blur-in, 2e=slide-left, 3e=scale-rotate */
.page-references #temoignages.reveal .idx3-testimonial {
  opacity: 0;
  transition: opacity .8s var(--r-ease-out), transform .8s var(--r-ease-out), filter .8s var(--r-ease-out);
}
/* 1er : blur-in */
.page-references #temoignages.reveal .idx3-testimonial:nth-of-type(1) {
  filter: blur(8px);
}
.page-references #temoignages.reveal.in .idx3-testimonial:nth-of-type(1) {
  opacity: 1; filter: blur(0);
  transition-delay: 200ms;
}
/* 2e : slide depuis la gauche */
.page-references #temoignages.reveal .idx3-testimonial:nth-of-type(2) {
  transform: translateX(-30px);
}
.page-references #temoignages.reveal.in .idx3-testimonial:nth-of-type(2) {
  opacity: 1; transform: translateX(0);
  transition-delay: 500ms;
}
/* 3e : scale-rotate */
.page-references #temoignages.reveal .idx3-testimonial:nth-of-type(3) {
  transform: scale(.92) rotate(-1deg);
}
.page-references #temoignages.reveal.in .idx3-testimonial:nth-of-type(3) {
  opacity: 1; transform: scale(1) rotate(0);
  transition-delay: 800ms;
}

/* Modules sectoriels - mosaic varie */
.page-references #presence.reveal .idx3-modules > .idx3-module {
  opacity: 0;
  transform: scale(.92);
  transition: opacity .55s var(--r-ease-out), transform .55s var(--r-ease-out);
}
.page-references #presence.reveal.in .idx3-modules > .idx3-module {
  opacity: 1; transform: scale(1);
}
.page-references #presence.reveal.in .idx3-modules > .idx3-module:nth-child(1) { transition-delay: 100ms; }
.page-references #presence.reveal.in .idx3-modules > .idx3-module:nth-child(2) { transition-delay: 220ms; }
.page-references #presence.reveal.in .idx3-modules > .idx3-module:nth-child(3) { transition-delay: 160ms; }
.page-references #presence.reveal.in .idx3-modules > .idx3-module:nth-child(4) { transition-delay: 320ms; }
.page-references #presence.reveal.in .idx3-modules > .idx3-module:nth-child(5) { transition-delay: 260ms; }

.page-references .idx3-finalcta.reveal {
  opacity: 0; transform: translateY(10px);
  transition: opacity .7s var(--r-ease-out), transform .7s var(--r-ease-out);
}
.page-references .idx3-finalcta.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .page-references *, .page-references *::before, .page-references *::after {
    animation: none !important; transition: none !important;
    opacity: 1 !important; transform: none !important; filter: none !important;
  }
}
