@charset "utf-8";

#avis-google {
  --gap: 16px;          /* si vous le changez, changez aussi le "+ 16" dans la fonction pas() du JS */
  --par-ligne: 1;       /* nombre d'avis visibles : 1 mobile, 2 tablette, 3 ordinateur */
  --taille-etoile: 18px;
  max-width: 425px;
  margin: clamp(1rem, 4vw, 2rem) auto;
  padding: 0 clamp(.75rem, 3vw, 1rem);
  font-family: "Poppins", sans-serif;
}
/* Tablette : 2 avis */
@media (min-width: 640px) {
  #avis-google { max-width: 800px;--par-ligne: 2; --taille-etoile: 20px; }
}

/* Ordinateur : 3 avis */
@media (min-width: 960px) {
  #avis-google { max-width: 1100px;--par-ligne: 4; }
}

.avis-header {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: .5rem .75rem;
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
}
.avis-header .note { font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 700; }

/* Carrousel */
.avis-carousel { position: relative; }
.avis-liste {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;          /* Firefox */
  padding: 4px 2px;
  align-items: flex-start;        /* les blocs non dépliés gardent leur taille initiale */
}
.avis-liste::-webkit-scrollbar { display: none; } /* Chrome / Safari */

.avis-carte {
  flex: 0 0 calc((100% - (var(--par-ligne) - 1) * var(--gap)) / var(--par-ligne));
  scroll-snap-align: start;
  box-sizing: border-box;
  border: 1px solid #e5e7eb; border-radius: 12px;
  padding: clamp(.8rem, 2.5vw, 1rem); background: #fff;
}
.avis-auteur { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.avis-auteur img { width: 40px; height: 40px; border-radius: 50%; }

/* Étoiles */
.etoiles { position: relative; display: inline-block; line-height: 0; --taille: 20px; }
.etoiles-fond, .etoiles-plein { display: flex; gap: 2px; }
.etoiles-plein { position: absolute; top: 0; left: 0; overflow: hidden; }
.etoiles svg {
  width: var(--taille); height: var(--taille); flex: none;
  fill: currentColor;
  stroke: currentColor; stroke-width: 3.5; stroke-linejoin: round;
  overflow: visible;              /* évite que le contour épais soit coupé */
}
.etoiles-fond  { color: #dadce0; }  /* étoiles vides : gris Google */
.etoiles-plein { color: #fbbc04; }  /* étoiles pleines : jaune Google */

.avis-header .etoiles { --taille: clamp(22px, 5vw, 25px); }  /* note globale */
.avis-carte .etoiles  { margin: .15rem 0; --taille: var(--taille-etoile); } /* avis individuels */

.avis-date { color: #6b7280; font-size: .8rem; }

/* Texte : le clamp est sur .avis-corps uniquement (pas sur la réponse du propriétaire) */
.avis-texte { font-size: .95rem; line-height: 1.5; margin: .5rem 0 0; }
.avis-corps {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;          /* nombre de lignes affichées au départ */
  line-clamp: 6;
  overflow: hidden;
  white-space: pre-line;          /* conserve les retours à la ligne des avis */
}
.avis-corps.ouvert {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}
.avis-suite {
  background: none; border: 0; padding: 0; margin-top: .5rem;
  color: #1a73e8; font-size: .85rem; cursor: pointer; text-align: left;
}
.avis-suite:hover { text-decoration: underline; }

.avis-lien { display: inline-block; margin-top: 1rem; font-size: .85rem; color: #6b7280; }

/* Flèches */
.avis-fleche {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid #e5e7eb; background: #fff; color: #111;
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .2s;
}
.avis-fleche:hover { background: #f3f4f6; }
.avis-fleche:disabled { opacity: 0; pointer-events: none; }
.avis-prev { left: -12px; }
.avis-next { right: -12px; }



/* Mobile : flèches à l'intérieur et plus petites 
@media (max-width: 639px) {
  .avis-fleche { width: 34px; height: 34px; font-size: 1.3rem; }
  .avis-prev { left: 4px; }
  .avis-next { right: 4px; }
  .avis-texte { font-size: .9rem; }
}*/