/* Défilé des avis clients (src/lib/avis.ts). */
.esl-avis {
  --encre: #0f1430;
  --ligne: #e6e8ee;
  --carte: 340px;
  --ecart: 20px;
  padding: clamp(56px, 8vw, 104px) 0;
  font-family: "Montserrat", sans-serif;
  color: var(--encre);
  overflow: hidden;
  /* Fond à lui : sur les articles, le bloc est posé dans un conteneur bleu foncé. */
  background: #fff;
}

.esl-avis__tete {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 20px 48px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.esl-avis__titre {
  margin: 0;
  color: #000;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.esl-avis__titre span {
  color: #e8482f;
}

/* Note de la fiche Google, comme Google l'affiche. */
.esl-avis a.esl-avis__google {
  display: grid;
  gap: 14px;
  min-width: 220px;
  padding: 16px 18px;
  border: 1px solid #e3e5e8;
  border-radius: 16px;
  background: #fff;
  color: #1f2124;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.esl-avis a.esl-avis__google:hover,
.esl-avis a.esl-avis__google:focus-visible { border-color: #c9ccd1; box-shadow: 0 6px 20px rgb(0 0 0 / 0.06); }
.esl-avis__google-haut,
.esl-avis__google-bas { display: flex; align-items: center; gap: 10px; }
.esl-avis__google-haut { font-size: 1rem; }
.esl-avis a.esl-avis__google :is(.esl-avis__google-haut, strong) { color: #1f2124; }
.esl-avis__logo-g { width: 22px; height: 22px; flex: none; }
.esl-avis__fleche { width: 18px; height: 18px; margin-left: auto; fill: none; stroke: #54595f; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.esl-avis__google-bas { justify-content: space-between; align-items: baseline; }
.esl-avis__google-bas strong { font-size: 1.75rem; font-weight: 600; line-height: 1; }
.esl-avis a.esl-avis__google .esl-avis__google-bas span { color: #54595f; font-size: 0.875rem; }

/* Toute la largeur de l'écran, avec un fondu sur les deux bords. */
.esl-avis__piste {
  margin-top: 36px;
  /* De l'air en haut et en bas : le bord des cartes n'est jamais rogné, même avec un zoom d'écran. */
  padding-block: 8px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.esl-avis__rang {
  display: flex;
  gap: var(--ecart);
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: esl-avis-defiler calc(var(--n) * 7s) linear infinite;
}

.esl-avis__piste:hover .esl-avis__rang,
.esl-avis__piste:focus-within .esl-avis__rang {
  animation-play-state: paused;
}

/* La moitié de la piste, plus la moitié d'un écart : la copie prend la place de l'original sans saut. */
@keyframes esl-avis-defiler {
  to {
    transform: translateX(calc(-50% - var(--ecart) / 2));
  }
}

.esl-avis__carte {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: var(--carte);
  margin: 0;
  padding: 26px 26px 22px;
  border: 1px solid var(--ligne);
  border-radius: 20px;
  background: #fff;
}

.esl-avis__etoiles {
  display: flex;
  gap: 2px;
  color: #fbbb1c;
}

.esl-avis__etoiles svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.esl-avis__carte blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--encre);
  font-size: 0.92rem;
  font-style: normal;
  line-height: 1.55;
}

.esl-avis__carte p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: auto 0 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.esl-avis__carte small {
  color: #6b7076;
  font-size: 0.78rem;
  font-weight: 500;
}

.esl-avis__note {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 20px;
  color: #8a909b;
  font-size: 0.7rem;
  line-height: 1.5;
}

@media (max-width: 767px) {
  .esl-avis {
    --carte: 280px;
    --ecart: 14px;
  }

  .esl-avis__piste {
    margin-top: 24px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  }
}

/* Sans animation : la piste se fait défiler à la main. */
@media (prefers-reduced-motion: reduce) {
  .esl-avis__rang {
    animation: none;
  }

  .esl-avis__piste {
    overflow-x: auto;
  }

  .esl-avis__carte[aria-hidden="true"] {
    display: none;
  }
}
