/* Avis Google - rendu front, leger, sans JS externe.
   Couleur des etoiles pilotee par --avisg-star (reglage WP). */

.avisg-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  color: inherit;
}
.avisg-note__val { font-weight: 700; }
.avisg-note__count { opacity: .85; }
a.avisg-note:hover .avisg-note__count { text-decoration: underline; }

/* Etoiles : fond gris + calque colore clippe a la largeur de la note */
.avisg-stars {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 2px;
}
.avisg-stars__bg { color: #d9d9d9; }
.avisg-stars__fg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  width: var(--avisg-fill, 0);
  color: var(--avisg-star, #FBBC04);
}

/* Carrousel defilant (auto-scroll CSS, pause au survol) */
.avisg-carousel {
  --avisg-star: #FBBC04;
  position: relative;
  overflow: hidden;
  padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.avisg-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: avisg-scroll 55s linear infinite;
}
.avisg-carousel:hover .avisg-track,
.avisg-carousel:focus-within .avisg-track { animation-play-state: paused; }

@keyframes avisg-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.avisg-card {
  flex: 0 0 320px;
  max-width: 320px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.avisg-card__head { display: flex; align-items: center; gap: 12px; }
.avisg-card__photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 40px;
}
.avisg-card__meta { display: flex; flex-direction: column; }
.avisg-card__author { font-weight: 700; font-size: 14px; }
.avisg-card__date { font-size: 12px; opacity: .6; }
.avisg-card__text { margin: 0; font-size: 14px; line-height: 1.6; color: #444; }
.avisg-card__more { font-size: 13px; }
.avisg-card__more summary { cursor: pointer; color: var(--avisg-star, #FBBC04); font-weight: 600; }
.avisg-card__more[open] summary { margin-bottom: 6px; }

/* Theme sombre */
.avisg-carousel.avisg--sombre .avisg-card { background: #1e1e1e; }
.avisg--sombre .avisg-card__author { color: #fff; }
.avisg--sombre .avisg-card__text { color: #cfcfcf; }
.avisg-note.avisg--sombre { color: #fff; }

/* Accessibilite : pas d'animation si l'utilisateur la refuse */
@media (prefers-reduced-motion: reduce) {
  .avisg-carousel { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .avisg-track { animation: none; width: auto; }
}

@media (max-width: 480px) {
  .avisg-card { flex-basis: 80vw; max-width: 80vw; }
}
