/* Atelier Latitude — Témoignages (carte + défilement automatique)
   Divi : module Code (contenu de al-avis.html).
   Sans JS ou avec « mouvement réduit » : le 1er témoignage s'affiche, sans défilement auto. */

.al-avis {
  --al-ink: #342E29;
  --al-acc: #AAB1A0;   /* bouton « suivant » */
  --al-ease: cubic-bezier(.2, .7, .2, 1);
  display: flex;
  align-items: stretch;
  gap: clamp(18px, 3vw, 44px);
  max-width: 740px;
  font-family: 'Manrope', system-ui, sans-serif;
  line-height: 1.5;
  color: var(--al-ink);
}

/* Carte + 2 feuilles empilées dessous */
.al-avis__pile {
  position: relative;
  flex: 1;
  min-width: 0;
  isolation: isolate;
}
.al-avis__pile::before,
.al-avis__pile::after {
  content: "";
  position: absolute;
  height: 40px;
}
.al-avis__pile::before {
  left: 26px; right: 26px; bottom: -20px;
  background: #ECE6DD;
  border: 1px solid rgba(52, 46, 41, .08);
}
.al-avis__pile::after {
  left: 13px; right: 13px; bottom: -10px;
  background: #F3EEE7;
  border: 1px solid rgba(52, 46, 41, .1);
}
.al-avis__carte {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: clamp(400px, 31vw, 460px);
  padding: clamp(28px, 4vw, 56px);
  box-sizing: border-box;
  background: #FBF9F5;
  border: 1px solid rgba(52, 46, 41, .12);
}

/* En-tête : guillemet + compteur */
.al-avis__haut {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.al-avis__guillemet {
  height: 50px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 104px;
  line-height: .7;
  color: #8C7B6B;
}
.al-avis__compteur {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .2em;
  color: #6B5F55;
  font-variant-numeric: tabular-nums;
}

/* Témoignages superposés : la carte prend la hauteur du plus long */
.al-avis__slides {
  flex: 1;
  display: grid;
}
.al-avis__slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
}
.al-avis__slide.is-active {
  visibility: visible;
  opacity: 1;
}
.al-avis .al-avis__citation {
  margin: 26px 0 0;
  padding: 0;
  border: 0;
  background: none;
  quotes: none;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-style: normal;
  font-weight: 300;
  font-size: clamp(21px, 1.9vw, 28px);
  line-height: 1.34;
  letter-spacing: -.02em;
  color: var(--al-ink);
  text-wrap: pretty;
}
.al-avis .al-avis__citation::before,
.al-avis .al-avis__citation::after { content: none; }
.al-avis__auteur {
  margin-top: auto;
  padding-top: 34px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.al-avis__initiales {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #DDD2C3;
  display: grid;
  place-items: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--al-ink);
}
.al-avis__initiales--grande { font-size: 18px; }
.al-avis .al-avis__nom {
  margin: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--al-ink);
}
.al-avis .al-avis__detail {
  margin: 2px 0 0;
  padding: 0;
  font-size: 14px;
  color: #5F544B;
}

/* Navigation verticale : flèches + barres de progression */
.al-avis__nav {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.al-avis .al-avis__fleche {
  width: 46px;
  height: 46px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 50%;
  border: 1px solid rgba(52, 46, 41, .28);
  background: transparent;
  color: var(--al-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color .35s, color .35s, border-color .35s;
}
.al-avis .al-avis__suiv {
  border: 0;
  background: var(--al-acc);
}
.al-avis .al-avis__fleche:hover {
  background-color: var(--al-ink);
  border-color: var(--al-ink);
  color: #F5F1EA;
}
.al-avis__fleche svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.al-avis__barres {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.al-avis .al-avis__barre {
  display: grid;
  place-items: center;
  width: 24px;
  height: 38px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.al-avis__piste {
  position: relative;
  display: block;
  width: 2px;
  height: 100%;
  background: rgba(52, 46, 41, .18);
  overflow: hidden;
}
.al-avis__remplissage {
  position: absolute;
  inset: 0;
  background: var(--al-ink);
  transform-origin: 50% 0;
  transform: scaleY(0);
  transition: transform .5s var(--al-ease);
}
.al-avis__barre.is-active .al-avis__remplissage { transform: scaleY(1); }
.al-avis button:focus-visible {
  outline: 2px solid var(--al-ink);
  outline-offset: 3px;
}

/* Apparition de la carte (classes posées par al-avis.js) */
.al-avis__pile.is-pending {
  opacity: 0;
  transform: translateY(26px);
}
.al-avis__pile.is-in {
  transition: opacity 1.1s var(--al-ease) .1s, transform 1.1s var(--al-ease) .1s;
}
