/* MAN Digital — section « Avis Google » (home + pages villes).
   Avis réels issus de la fiche Google Business. Affichage seul : pas de schéma
   Review/AggregateRating (les avis sur sa propre entreprise ne sont pas éligibles
   aux résultats enrichis et peuvent entraîner une action manuelle Google). */

.reviews--section { position: relative; padding: clamp(64px, 9vw, 112px) 0; }
.reviews__wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.loc .reviews__wrap { max-width: none; padding: 0; } /* déjà dans .loc__wrap sur les pages villes */

.reviews .reviews__head { text-align: center; max-width: 640px; margin: 0 auto 34px; }

/* Pastille résumé : avatars + étoiles + note */
.reviews__summary { display: inline-flex; align-items: center; gap: 14px; padding: 7px 18px 7px 8px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-pill); }
.reviews__avatars { display: flex; }
.reviews__avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-brand); font-size: .88rem; font-weight: 600; color: var(--brand-ink); background: linear-gradient(135deg, var(--brand-300), var(--brand)); border: 2px solid var(--panel); margin-left: -10px; }
.reviews__avatar:first-child { margin-left: 0; }
.reviews__score { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.reviews__score-row { display: flex; align-items: center; gap: 7px; color: var(--text); font-family: var(--font-brand); font-weight: 600; font-size: .95rem; }
.reviews__score-sub { color: var(--muted); font-size: .78rem; }

.reviews__stars { display: inline-flex; gap: 2px; color: var(--accent); }
.reviews__stars svg { width: 15px; height: 15px; display: block; }

.reviews .reviews__title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; font-size: clamp(1.8rem, 4.2vw, 2.6rem); color: var(--text); margin: 20px 0 10px; }
.reviews .reviews__sub { color: var(--text-2); font-size: 1.05rem; line-height: 1.6; margin: 0; }

/* Cartes d'avis */
.reviews__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.reviews__card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; transition: border-color .25s ease, transform .25s ease; }
.reviews__card:hover { border-color: var(--line-3); transform: translateY(-3px); }
.reviews__card .reviews__stars { margin-bottom: 14px; }
.reviews .reviews__quote { color: var(--text); font-size: 1rem; line-height: 1.62; margin: 0 0 18px; flex: 1; }
.reviews__by { display: flex; align-items: center; gap: 11px; padding-top: 16px; border-top: 1px solid var(--line); }
.reviews__by .reviews__avatar { margin-left: 0; width: 38px; height: 38px; border-color: var(--panel-2); }
.reviews .reviews__name { color: var(--text); font-family: var(--font-brand); font-weight: 600; font-size: .98rem; margin: 0; }
.reviews .reviews__meta { color: var(--muted); font-size: .8rem; margin: 2px 0 0; }

.reviews__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

.reviews .reviews__title { scroll-margin-top: 150px; } /* ancre de la pastille : garde le résumé visible */

/* ---- Pastille flottante (assets/js/reviews-pill.js), centrée au-dessus du menu du bas ---- */
.rpill {
  position: fixed; left: 50%; bottom: 96px; z-index: 290; /* sous le menu (300) et les cookies (400) */
  display: flex; align-items: center; gap: 6px;
  width: max-content; /* sinon left:50% limite la largeur auto à la moitié de l'écran */
  max-width: min(760px, calc(100vw - 24px));
  padding: 5px 5px 5px 16px;
  background: var(--panel);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  visibility: hidden; opacity: 0; transform: translate(-50%, 14px);
  transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
}
.rpill.is-visible { visibility: visible; opacity: 1; transform: translate(-50%, 0); transition: opacity .3s ease, transform .3s ease, visibility 0s; }
.rpill__link { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 5px 0; color: inherit; text-decoration: none; border-radius: var(--r-pill); }
.rpill__link:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.rpill__score { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--text); font-family: var(--font-brand); font-size: .9rem; white-space: nowrap; }
.rpill__score b { font-weight: 600; }
.rpill__stars { display: inline-flex; gap: 1px; color: var(--accent); }
.rpill__stars svg { width: 13px; height: 13px; display: block; }
.rpill__count { color: var(--muted); font-family: var(--font-sans, inherit); font-size: .82rem; }
.rpill__sep { width: 1px; height: 22px; flex: none; background: var(--line-2); }
.rpill__quote { display: flex; align-items: baseline; gap: 7px; min-width: 0; font-size: .88rem; transition: opacity .28s ease, transform .28s ease; }
.rpill__quote.is-swapping { opacity: 0; transform: translateY(4px); }
.rpill__quote q { min-width: 0; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; quotes: "«\00a0" "\00a0»"; }
.rpill__by { flex: none; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.rpill__close { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); font-size: 1.15rem; line-height: 1; transition: background .2s, color .2s; }
.rpill__close:hover, .rpill__close:focus-visible { background: var(--panel-2); color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .reviews__card, .reviews__card:hover { transition: none; transform: none; }
  .rpill, .rpill.is-visible, .rpill__quote { transition: none; }
}

/* Mobile : version condensée, cohérente avec les pages villes */
@media (max-width: 640px) {
  .reviews--section { padding: 56px 0; }
  .reviews__wrap { padding: 0 16px; }
  .reviews .reviews__head { margin-bottom: 22px; }
  .reviews__summary { gap: 10px; padding: 6px 14px 6px 6px; }
  .reviews__avatar { width: 28px; height: 28px; font-size: .76rem; }
  .reviews .reviews__title { font-size: 1.45rem; margin-top: 14px; }
  .reviews .reviews__sub { font-size: .92rem; }
  /* Carrousel horizontal à glisser : une seule hauteur de carte au lieu de 6 empilées */
  .reviews__grid { display: flex; gap: 11px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 0 16px; }
  .reviews__grid::-webkit-scrollbar { display: none; }
  .reviews__card { flex: 0 0 84%; scroll-snap-align: start; padding: 17px; }
  .reviews__card:hover { transform: none; }
  .js .reviews__card.reveal { opacity: 1; transform: none; } /* cartes hors écran : toujours visibles */
  .reviews .reviews__quote { font-size: .92rem; line-height: 1.55; margin-bottom: 13px; }
  .reviews__by { padding-top: 12px; }
  .reviews__by .reviews__avatar { width: 32px; height: 32px; }
  .reviews .reviews__name { font-size: .9rem; }
  .reviews__cta { margin-top: 20px; gap: 10px; }
  .reviews .btn { padding: 12px 18px; font-size: .9rem; }
  /* Pastille discrète sur mobile : note + nombre d'avis, sans extrait */
  .rpill { padding: 2px 3px 2px 13px; gap: 2px; }
  .rpill__sep, .rpill__quote { display: none; }
  .rpill__score { font-size: .82rem; }
  .rpill__stars svg { width: 11px; height: 11px; }
  .rpill__count { font-size: .76rem; }
  .rpill__close { width: 28px; height: 28px; }
}

/* ---- Pastille dorée (jaune MaN), texte encre foncée : le blanc serait illisible sur l'or ---- */
.rpill {
  background: linear-gradient(135deg, var(--accent-300) -40%, var(--accent) 45%, var(--accent-600) 120%);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 18px 40px -16px rgba(201, 138, 29, 0.8);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  text-shadow: none;
}
.rpill__score, .rpill__score b, .rpill__stars, .rpill__quote q { color: var(--accent-ink); }
.rpill__stars svg { filter: none; }
.rpill__count, .rpill__by { color: rgba(42, 32, 6, 0.78); }
.rpill__sep { background: rgba(42, 32, 6, 0.28); }
.rpill__close { color: rgba(42, 32, 6, 0.78); text-shadow: none; }
.rpill__close:hover, .rpill__close:focus-visible { background: rgba(42, 32, 6, 0.12); color: var(--accent-ink); }
.rpill__link:focus-visible { outline-color: var(--accent-ink); }
/* sur ordinateur, la pastille laisse libre le coin droit (bulle WhatsApp) */
@media (min-width: 900px) { .rpill { max-width: min(760px, calc(100vw - 200px)); } }
