/**
 * BC Google Reviews - front
 * Variables surchargeables dans le thème : .bcgr { --bcgr-accent: #xxx; }
 */
.bcgr {
  --bcgr-star: #fbbc04;
  --bcgr-star-off: #dadce0;
  --bcgr-accent: #1a73e8;
  --bcgr-text: #202124;
  --bcgr-muted: #5f6368;
  --bcgr-card-bg: #fff;
  --bcgr-border: #e3e5e8;
  --bcgr-radius: 12px;
  --bcgr-gap: 16px;
  color: var(--bcgr-text);
}

/* Étoiles */
.bcgr-stars {
  position: relative;
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 2px;
  white-space: nowrap;
  vertical-align: middle;
}
.bcgr-stars__bg { color: var(--bcgr-star-off); }
.bcgr-stars__fg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  color: var(--bcgr-star);
}

/* Badge */
.bcgr-badge__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--bcgr-border);
  border-radius: 999px;
  background: var(--bcgr-card-bg);
  color: var(--bcgr-text);
  text-decoration: none;
  font-size: .875rem;
}
a.bcgr-badge__link:hover { border-color: var(--bcgr-accent); text-decoration: none; }
.bcgr-badge__g {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bcgr-accent);
  color: #fff;
  font-weight: 700;
  font-size: .75rem;
}
.bcgr-badge__rating { font-weight: 700; }
.bcgr-badge__count { color: var(--bcgr-muted); }

/* Carrousel */
.bcgr-carousel { margin: 2rem 0; }
.bcgr-carousel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--bcgr-gap);
  margin-bottom: var(--bcgr-gap);
}
.bcgr-carousel__summary { display: flex; align-items: center; gap: 12px; }
.bcgr-carousel__rating { font-size: 2.5rem; font-weight: 700; line-height: 1; }
.bcgr-carousel__summary .bcgr-stars { font-size: 1.25rem; }
.bcgr-carousel__count { margin: 4px 0 0; color: var(--bcgr-muted); font-size: .875rem; }
.bcgr-carousel__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.bcgr-btn {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--bcgr-accent);
  border-radius: 999px;
  background: var(--bcgr-accent);
  color: #fff;
  font-size: .875rem;
  text-decoration: none;
  transition: opacity .2s;
}
.bcgr-btn:hover, .bcgr-btn:focus { color: #fff; opacity: .88; text-decoration: none; }
.bcgr-btn--ghost { background: transparent; color: var(--bcgr-accent); }
.bcgr-btn--ghost:hover, .bcgr-btn--ghost:focus { color: var(--bcgr-accent); }

.bcgr-carousel__viewport { position: relative; }
.bcgr-carousel__track {
  display: flex;
  gap: var(--bcgr-gap);
  margin: 0;
  padding: 4px 2px 12px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.bcgr-carousel__track::-webkit-scrollbar { display: none; }
.bcgr-carousel__track:focus-visible { outline: 2px solid var(--bcgr-accent); outline-offset: 2px; }

.bcgr-card {
  flex: 0 0 calc((100% - 2 * var(--bcgr-gap)) / 3);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--bcgr-border);
  border-radius: var(--bcgr-radius);
  background: var(--bcgr-card-bg);
  scroll-snap-align: start;
  min-width: 0;
}
@media (max-width: 991px) {
  .bcgr-card { flex-basis: calc((100% - var(--bcgr-gap)) / 2); }
}
@media (max-width: 575px) {
  .bcgr-card { flex-basis: 85%; }
}

.bcgr-card__author { display: flex; align-items: center; gap: 10px; }
.bcgr-card__avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.bcgr-card__avatar--initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bcgr-accent);
  color: #fff;
  font-weight: 700;
}
.bcgr-card__name {
  display: block;
  color: var(--bcgr-text);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.bcgr-card__name:hover { text-decoration: underline; }
.bcgr-card__date { display: block; color: var(--bcgr-muted); font-size: .8125rem; }

.bcgr-card__text {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.bcgr-card.is-expanded .bcgr-card__text { -webkit-line-clamp: unset; display: block; }
.bcgr-card__more {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bcgr-accent);
  font-size: .875rem;
  cursor: pointer;
}
.bcgr-card__more:hover { text-decoration: underline; }
.bcgr-card__source {
  margin-top: auto;
  color: var(--bcgr-muted);
  font-size: .75rem;
  text-decoration: none;
}
a.bcgr-card__source:hover { text-decoration: underline; }

.bcgr-carousel__navs { display: flex; gap: 8px; }
.bcgr-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0 0 3px;
  border: 1px solid var(--bcgr-border);
  border-radius: 50%;
  background: var(--bcgr-card-bg);
  color: var(--bcgr-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s;
}
.bcgr-nav:hover, .bcgr-nav:focus-visible { border-color: var(--bcgr-accent); }
/* Flèche masquée mais place conservée : le groupe ne bouge pas */
.bcgr-nav[hidden] { display: inline-flex; visibility: hidden; }
@media (max-width: 575px) {
  .bcgr-carousel__navs { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bcgr-carousel__track { scroll-behavior: auto; }
}
