/* ==========================================================================
   Google Reviews Carousel — style "type Elfsight"
   Toutes les couleurs/espacements sont pilotables via les variables CSS
   ci-dessous : redéfinissez-les dans une règle :root plus spécifique
   pour personnaliser le widget sans toucher au reste du fichier.
   ========================================================================== */

.grc {
  --grc-bg: #ffffff;
  --grc-text: #1f2430;
  --grc-text-muted: #6b7280;
  --grc-border: #e9eaee;
  --grc-radius: 14px;
  --grc-shadow: 0 2px 10px rgba(20, 20, 43, 0.06);
  --grc-shadow-hover: 0 8px 24px rgba(20, 20, 43, 0.1);
  --grc-star: #fbbc04;
  --grc-accent: #1a73e8;
  --grc-gap: 18px;
  --grc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  font-family: var(--grc-font);
  color: var(--grc-text);
  max-width: 100%;
  box-sizing: border-box;
}
.grc * { box-sizing: border-box; }

/* ---------- En-tête (note globale + lien Google) ---------- */
.grc__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.grc__summary { display: flex; align-items: center; gap: 10px; }
.grc__summary-score { font-size: 28px; font-weight: 700; line-height: 1; }
.grc__summary-meta { display: flex; flex-direction: column; gap: 2px; }
.grc__stars { display: inline-flex; gap: 2px; line-height: 0; }
.grc__stars svg { width: 16px; height: 16px; }
.grc__stars--lg svg { width: 20px; height: 20px; }
.grc__star-filled { fill: var(--grc-star); }
.grc__star-empty { fill: #dfe1e6; }
.grc__summary-count { font-size: 13px; color: var(--grc-text-muted); }

.grc__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--grc-border);
  background: var(--grc-bg);
  color: var(--grc-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.grc__cta:hover { box-shadow: var(--grc-shadow-hover); transform: translateY(-1px); }
.grc__google-g { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Viewport / piste du carrousel ---------- */
.grc__viewport {
  position: relative;
  overflow: hidden;
  padding: 0 46px;
}
@media (max-width: 640px) {
  .grc__viewport { padding: 0; }
}
.grc__track {
  display: flex;
  gap: var(--grc-gap);
  will-change: transform;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  touch-action: pan-y;
}
.grc__slide {
  flex: 0 0 calc(100% - var(--grc-gap));
  min-width: 0;
}
.grc[data-per-view="2"] .grc__slide { flex-basis: calc((100% - var(--grc-gap)) / 2); }
.grc[data-per-view="3"] .grc__slide { flex-basis: calc((100% - 2 * var(--grc-gap)) / 3); }

/* ---------- Carte d'avis ---------- */
.grc__card {
  height: 100%;
  background: var(--grc-bg);
  border: 1px solid var(--grc-border);
  border-radius: var(--grc-radius);
  box-shadow: var(--grc-shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s ease;
}
.grc__card:hover { box-shadow: var(--grc-shadow-hover); }

.grc__card-head { display: flex; align-items: center; gap: 12px; }
.grc__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #eef1f5;
  flex-shrink: 0;
}
.grc__avatar-fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, #4285f4, #1a73e8);
}
.grc__author { display: flex; flex-direction: column; min-width: 0; }
.grc__author-name {
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grc__author-time { font-size: 12.5px; color: var(--grc-text-muted); }

.grc__card-body { flex: 1; }
.grc__review-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--grc-text);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grc__review-text.grc--expanded { -webkit-line-clamp: unset; overflow: visible; }
.grc__read-more {
  margin-top: 6px;
  background: none;
  border: none;
  color: var(--grc-accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.grc__read-more:hover { text-decoration: underline; }

.grc__card-foot { display: flex; align-items: center; justify-content: flex-end; opacity: 0.85; }
.grc__card-foot .grc__google-g { width: 18px; height: 18px; }

/* ---------- Flèches de navigation ---------- */
.grc__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--grc-border);
  background: var(--grc-bg);
  box-shadow: var(--grc-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.grc__arrow:hover { box-shadow: var(--grc-shadow-hover); }
.grc__arrow:active { transform: translateY(-50%) scale(0.94); }
.grc__arrow svg { width: 18px; height: 18px; fill: var(--grc-text); }
.grc__arrow--prev { left: 0; }
.grc__arrow--next { right: 0; }
.grc__arrow[disabled] { opacity: 0.35; cursor: default; box-shadow: none; }

/* ---------- Puces (dots) ---------- */
.grc__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.grc__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: #d7dae0;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.grc__dot--active { background: var(--grc-accent); transform: scale(1.25); }

/* ---------- Attribution Google (obligatoire selon les CGU) ---------- */
.grc__attribution {
  margin-top: 14px;
  text-align: center;
  font-size: 11.5px;
  color: var(--grc-text-muted);
}
.grc__attribution a { color: inherit; text-decoration: underline; }

/* ---------- États vides / chargement ---------- */
.grc__loading, .grc__empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--grc-text-muted);
  font-size: 14px;
}
.grc__skeleton {
  display: flex;
  gap: var(--grc-gap);
}
.grc__skeleton-card {
  flex: 1;
  height: 190px;
  border-radius: var(--grc-radius);
  background: linear-gradient(90deg, #f0f1f4 25%, #f7f8fa 37%, #f0f1f4 63%);
  background-size: 400% 100%;
  animation: grc-shimmer 1.4s ease infinite;
}
@keyframes grc-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .grc__arrow { display: none; }
  .grc__summary-score { font-size: 24px; }
}
