/* Bloc avis Google — styles préfixés gr-, héritent des polices/couleurs du site. */
.gr-block {
    --gr-gold: #FBBC04;
    --gr-blue: #4285F4;
    --gr-star-empty: #DADCE0;
    --gr-card-bg: #ffffff;
    --gr-card-border: rgba(0, 0, 0, 0.08);
    --gr-radius: 14px;
    font: inherit;
    color: inherit;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.gr-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}
.gr-rating-value { font-weight: 700; font-size: 1.4rem; }
.gr-count { opacity: 0.8; }
.gr-g { vertical-align: middle; flex: 0 0 auto; }

/* Étoiles avec remplissage partiel */
.gr-stars {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    color: var(--gr-star-empty);
    line-height: 1;
}
.gr-stars::before { content: "\2605\2605\2605\2605\2605"; letter-spacing: 2px; }
.gr-stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: var(--gr-gold);
}
.gr-stars-fill::before { content: "\2605\2605\2605\2605\2605"; letter-spacing: 2px; }

/* Carrousel coverflow */
.gr-carousel {
    position: relative;
    /* Pas d'overflow:hidden : le masque dégradé du .gr-track contient déjà les
       cartes voisines, et les flèches (et leur ombre) ne sont donc plus rognées. */
    overflow: visible;
    padding: 0 48px;
}
.gr-track {
    position: relative;
    height: 225px;
    /* Fondu doux sur les bords : les cartes voisines s'estompent au lieu d'être coupées net. */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 13%, #000 87%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 13%, #000 87%, transparent 100%);
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-size: 100% 320%;
            mask-size: 100% 320%;
    -webkit-mask-position: center;
            mask-position: center;
}
.gr-card {
    position: absolute;
    top: 0;
    left: 50%;
    width: min(420px, 78%);
    box-sizing: border-box;
    padding: 1.5rem 1.65rem;
    background: var(--gr-card-bg);
    border: 1px solid var(--gr-card-border);
    border-radius: var(--gr-radius);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
    text-align: left;
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.45s ease, opacity 0.45s ease, filter 0.45s ease;
}
.gr-card.is-active {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    z-index: 3;
    pointer-events: auto;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.20);
}
.gr-card.is-prev {
    transform: translateX(calc(-50% - 72%)) scale(0.82);
    opacity: 0.92;
    z-index: 2;
    filter: blur(3px) brightness(0.9);
}
.gr-card.is-next {
    transform: translateX(calc(-50% + 72%)) scale(0.82);
    opacity: 0.92;
    z-index: 2;
    filter: blur(3px) brightness(0.9);
}
.gr-card.is-hidden { opacity: 0; }

.gr-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.9rem;
}
.gr-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}
.gr-avatar-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gr-blue);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}
.gr-card-meta { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; }
.gr-author { font-weight: 600; }
.gr-card-head .gr-g { margin-left: auto; }
.gr-text {
    margin: 0 0 1rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gr-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    opacity: 0.85;
}
.gr-card-link { color: var(--gr-blue); text-decoration: none; }
.gr-card-link:hover { text-decoration: underline; }

/* Flèches */
.gr-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    color: #333;
}
.gr-prev { left: 0; }
.gr-next { right: 0; }
.gr-arrow:hover { background: #f3f3f3; }

/* Points */
.gr-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}
.gr-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--gr-star-empty);
    cursor: pointer;
}
.gr-dot.is-on { background: var(--gr-blue); }

/* Bouton CTA */
.gr-cta {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.65rem 1.4rem;
    background: var(--gr-blue);
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
}
.gr-cta:hover { filter: brightness(0.95); }

.gr-fallback { display: flex; align-items: center; justify-content: center; gap: 12px; }

/* Mobile : cartes voisines masquées, une seule carte centrée */
@media (max-width: 640px) {
    .gr-card { width: 86%; }
    .gr-card.is-prev, .gr-card.is-next { opacity: 0; pointer-events: none; }
    .gr-track { height: 250px; }
}

@media (prefers-reduced-motion: reduce) {
    .gr-card { transition: none; }
}
