/* ================================================================
   Avis clients — composant carte + bandeau défilant
   Chargé par la vitrine (`views/auth/login.php`) ET par l'écran
   super-admin (`$pageStyles` → /admin/testimonials) : l'aperçu de la
   console doit rendre exactement ce que verra le visiteur, donc les deux
   partagent cette feuille comme ils partagent `TestimonialCard::render()`.

   La carte porte ses PROPRES jetons (`--tstc-*`) : elle s'affiche à
   l'identique hors de la page d'accueil, dont la palette (`--ink`, `--gray`…)
   n'existe pas dans la coquille applicative.
   ================================================================ */

/* ── Carte (le composant, autonome) ──────────────────────────────── */
.tst-card {
  --tstc-ink:    #1D1D1F;
  --tstc-gray:   #6E6E73;
  --tstc-gray2:  #86868B;
  --tstc-line:   #E8E8ED;
  --tstc-surface:#FFFFFF;
  --tstc-soft:   #F5F5F7;
  --tstc-star:   #F5A623;
  --tstc-link:   #E8513A;

  width: 356px;
  flex: 0 0 auto;
  text-align: left;
  background: var(--tstc-surface);
  border: 1px solid var(--tstc-line);
  border-radius: 20px;
  padding: 22px 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-shadow: 0 1px 2px rgba(11,18,32,.04), 0 16px 34px -22px rgba(11,18,32,.30);
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--tstc-ink);
  line-height: 1.5;
}
.tst-c-top { display: flex; align-items: center; gap: 10px; min-height: 18px; }
.tst-stars { display: flex; gap: 2px; color: var(--tstc-star); }
.tst-stars svg { width: 14px; height: 14px; display: block; fill: currentColor; stroke: currentColor; stroke-width: 1.4; }
.tst-quote {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.58;
  letter-spacing: -.15px;
  color: var(--tstc-ink);
  flex: 1;
}
.tst-who {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-top: 13px;
  border-top: 1px solid var(--tstc-line);
  margin: 0;
}
.tst-av {
  width: 38px; height: 38px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; color: #fff; letter-spacing: .4px;
}
.tst-av--img { object-fit: cover; background: var(--tstc-soft); box-shadow: 0 0 0 1px rgba(11,18,32,.06); }
.tst-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tst-name {
  display: block; font-size: 13px; font-weight: 700; letter-spacing: -.1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tst-role {
  display: block; font-size: 12px; color: var(--tstc-gray);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tst-src {
  margin-left: auto; flex: 0 0 auto;
  font-size: 10.5px; font-weight: 600; color: var(--tstc-gray2);
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  background: var(--tstc-soft); border-radius: 100px; padding: 4px 9px;
  text-decoration: none;
}
.tst-src svg { width: 11px; height: 11px; display: block; }
a.tst-src:hover { color: var(--tstc-link); }

/* ── Bandeau (vitrine uniquement) ────────────────────────────────── */
.tst { padding: 100px 0 96px; background: #fff; text-align: center; overflow: hidden; }
.tst h2 { font-size: 52px; font-weight: 800; letter-spacing: -2.4px; line-height: 1.06; margin-top: 10px; }
.tst .sub { font-size: 18px; color: #6E6E73; letter-spacing: -.2px; margin: 18px auto 0; max-width: 600px; line-height: 1.5; }
.tst-rail {
  margin-top: 52px;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.tst-track { display: flex; gap: 18px; width: max-content; padding: 6px 0; animation: tstScroll var(--tst-dur, 64s) linear infinite; }
.tst-half { display: flex; gap: 18px; }
.tst-rail:hover .tst-track, .tst-track:focus-within { animation-play-state: paused; }
.tst-static { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; padding: 0 28px; margin-top: 52px; }

/* La piste contient deux moitiés identiques séparées par le même gap : le point
   de bouclage est à 50 % + la moitié du gap, sinon un saut d'un gap à chaque tour. */
@keyframes tstScroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(calc(-50% - 9px), 0, 0); }
}

/* Mouvement réduit : le bandeau devient une rangée qu'on fait défiler soi-même. */
@media (prefers-reduced-motion: reduce) {
  .tst-rail { overflow-x: auto; -webkit-mask-image: none; mask-image: none; scroll-snap-type: x mandatory; }
  .tst-track { animation: none; width: auto; padding-bottom: 12px; }
  .tst-card { scroll-snap-align: center; }
  .tst-dup { display: none; }
}

@media (max-width: 640px) {
  .tst { padding: 72px 0 68px; }
  .tst h2 { font-size: 30px; letter-spacing: -1.2px; }
  .tst .sub { font-size: 15px; }
  .tst-rail {
    margin-top: 34px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  }
  .tst-card { width: 290px; padding: 19px 20px 16px; }
  .tst-quote { font-size: 13.5px; }
}
