/* My Golf Tour – Widgets « Avis Google » (badge flottant + carrousel). Toutes les classes sont préfixées « mgt-avis- ». */

.mgt-avis-badge,
.mgt-avis-carrousel {
  --mgt-avis-navy: #003360;
  --mgt-avis-etoile: #fbbc04;
  --mgt-avis-etoile-vide: #dadce0;
  --mgt-avis-texte: #202124;
  --mgt-avis-gris: #70757a;
  --mgt-avis-fond: #f8f8f8;
  font-family: inherit;
  line-height: 1.4;
  color: var(--mgt-avis-texte);
  text-align: left;
}
.mgt-avis-badge *,
.mgt-avis-carrousel * { box-sizing: border-box; }
.mgt-avis-badge svg,
.mgt-avis-carrousel svg { display: block; }

/* ---------- Étoiles (remplissage proportionnel à la note) ---------- */
.mgt-avis-stars { position: relative; display: inline-block; font-size: 1em; width: 5em; height: 1em; flex: none; }
.mgt-avis-stars__fond,
.mgt-avis-stars__plein { position: absolute; top: 0; left: 0; height: 1em; overflow: hidden; }
.mgt-avis-stars__fond { width: 5em; color: var(--mgt-avis-etoile-vide); }
.mgt-avis-stars__plein { color: var(--mgt-avis-etoile); }
.mgt-avis-stars svg { width: 5em; height: 1em; fill: currentColor; }

/* ---------- Badge flottant ---------- */
.mgt-avis-badge {
  position: fixed; left: 16px; bottom: 16px; z-index: 9990;
  opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease;
}
.mgt-avis-badge--visible { opacity: 1; transform: none; }
.mgt-avis-badge__lien {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 150px; padding: 16px 22px 14px;
  background: #fff; border-radius: 28px; text-decoration: none; color: inherit;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .18), 0 1px 4px rgba(0, 0, 0, .08);
}
.mgt-avis-badge__lien:hover { box-shadow: 0 6px 28px rgba(0, 0, 0, .24), 0 1px 4px rgba(0, 0, 0, .1); }
.mgt-avis-badge__g svg { width: 30px; height: 30px; }
.mgt-avis-badge__ligne { display: flex; align-items: center; gap: 8px; }
.mgt-avis-badge__note { font-size: 26px; font-weight: 700; color: #000; line-height: 1; }
.mgt-avis-badge .mgt-avis-stars { font-size: 22px; }
.mgt-avis-badge__nb { font-size: 16px; font-weight: 600; color: var(--mgt-avis-gris); }
.mgt-avis-badge__fermer {
  position: absolute; top: -10px; right: -10px; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin: 0; padding: 0;
  border: 0; border-radius: 50%; background: #fff; color: #333;
  font: 700 18px/1 Arial, sans-serif; cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}
.mgt-avis-badge__fermer::after { content: ""; position: absolute; top: -8px; right: -8px; bottom: -8px; left: -8px; } /* zone tactile ≥ 44 px */
.mgt-avis-badge__fermer:hover { background: #f1f3f4; }

/* ---------- Carrousel ---------- */
.mgt-avis-carrousel { --mgt-avis-n: 3; --mgt-avis-gap: 20px; position: relative; width: 100%; max-width: 100%; margin: 0 auto; }
.mgt-avis-titre { margin: 0 0 24px; text-align: center; font-size: 32px; font-weight: 700; line-height: 1.2; color: #111; }

.mgt-avis-bandeau {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin: 0 0 20px; padding: 22px 28px; background: var(--mgt-avis-fond); border-radius: 16px;
}
.mgt-avis-marque { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: #111; }
.mgt-avis-marque svg { width: 28px; height: 28px; }
.mgt-avis-resume { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.mgt-avis-resume__note { font-size: 30px; font-weight: 700; line-height: 1; color: #111; }
.mgt-avis-resume .mgt-avis-stars { font-size: 26px; }
.mgt-avis-resume__nb { font-size: 16px; color: var(--mgt-avis-gris); }
.mgt-avis-bouton {
  display: inline-block; padding: 14px 28px; border-radius: 999px;
  background: var(--mgt-avis-navy); color: #fff !important; text-decoration: none !important;
  font-size: 17px; font-weight: 700; line-height: 1.2; text-align: center;
}
.mgt-avis-bouton:hover { opacity: .9; }

.mgt-avis-zone { position: relative; }
.mgt-avis-piste {
  display: flex; gap: var(--mgt-avis-gap); margin: 0; padding: 0;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain;
}
.mgt-avis-piste::-webkit-scrollbar { display: none; }
.mgt-avis-carte {
  flex: 0 0 calc((100% - (var(--mgt-avis-n) - 1) * var(--mgt-avis-gap)) / var(--mgt-avis-n));
  min-width: 0; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px; background: var(--mgt-avis-fond); border-radius: 16px;
}
.mgt-avis-carte__tete { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mgt-avis-avatar { position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; }
.mgt-avis-avatar__img,
.mgt-avis-avatar__initiale {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover; color: #fff; font-size: 24px; font-weight: 500; line-height: 1;
}
.mgt-avis-pastille {
  position: absolute; right: -6px; bottom: -6px; display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #fff;
}
.mgt-avis-pastille svg { width: 14px; height: 14px; }
.mgt-avis-auteur { min-width: 0; }
.mgt-avis-nom { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 600; color: #111 !important; text-decoration: none !important; }
a.mgt-avis-nom:hover { text-decoration: underline !important; }
.mgt-avis-date { display: block; font-size: 14px; color: var(--mgt-avis-gris); }
.mgt-avis-carte .mgt-avis-stars { font-size: 20px; }
.mgt-avis-texte {
  margin: 0; font-size: 16px; line-height: 1.5; color: var(--mgt-avis-texte);
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow-wrap: anywhere; white-space: pre-line;
}
.mgt-avis-carte--ouverte .mgt-avis-texte { display: block; -webkit-line-clamp: unset; line-clamp: unset; }
.mgt-avis-plus {
  align-self: flex-start; margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 16px; color: var(--mgt-avis-navy); text-decoration: none;
}
.mgt-avis-plus:hover { text-decoration: underline; }
.mgt-avis-plus[hidden] { display: none; }

.mgt-avis-fleche {
  position: absolute; top: 50%; z-index: 2; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin: -24px 0 0; padding: 0; border: 0; border-radius: 50%;
  background: var(--mgt-avis-navy); color: #fff; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.mgt-avis-fleche svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.mgt-avis-fleche--prec { left: -14px; }
.mgt-avis-fleche--suiv { right: -14px; }
.mgt-avis-fleche[hidden] { display: none; }

.mgt-avis-points { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 18px 0 0; padding: 0; }
.mgt-avis-point { width: 8px; height: 8px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: #b8bcc2; cursor: pointer; position: relative; }
.mgt-avis-point::after { content: ""; position: absolute; top: -8px; right: -5px; bottom: -8px; left: -5px; }
.mgt-avis-point--actif { width: 10px; height: 10px; background: #111; }
.mgt-avis-source { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--mgt-avis-gris); }

/* ---------- Tablette : 2 cartes / Mobile : 1 carte ---------- */
@media (max-width: 1023px) {
  .mgt-avis-carrousel { --mgt-avis-n: 2; }
  .mgt-avis-fleche--prec { left: -8px; }
  .mgt-avis-fleche--suiv { right: -8px; }
}
@media (max-width: 639px) {
  .mgt-avis-carrousel { --mgt-avis-n: 1; --mgt-avis-gap: 14px; }
  .mgt-avis-titre { font-size: 24px; margin-bottom: 16px; }
  .mgt-avis-bandeau { flex-direction: column; align-items: stretch; padding: 18px; }
  .mgt-avis-bouton { display: block; padding: 13px 18px; font-size: 16px; }
  .mgt-avis-resume__note { font-size: 26px; }
  .mgt-avis-resume .mgt-avis-stars { font-size: 22px; }
  .mgt-avis-carte { padding: 18px; }
  .mgt-avis-fleche { width: 40px; height: 40px; margin-top: -20px; }
  .mgt-avis-fleche--prec { left: -4px; }
  .mgt-avis-fleche--suiv { right: -4px; }

  .mgt-avis-badge { left: 10px; bottom: 10px; }
  .mgt-avis-badge__lien { min-width: 0; padding: 10px 14px 9px; gap: 3px; border-radius: 22px; }
  .mgt-avis-badge__g svg { width: 22px; height: 22px; }
  .mgt-avis-badge__note { font-size: 20px; }
  .mgt-avis-badge .mgt-avis-stars { font-size: 16px; }
  .mgt-avis-badge__nb { font-size: 13px; }
  .mgt-avis-badge__fermer { top: -12px; right: -12px; width: 32px; height: 32px; font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .mgt-avis-badge { transition: none; }
}
