.google-reviews {
    max-width: 1200px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

.google-reviews-summary {
    background-color: #f4f4f4;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 20px;
}

.google-reviews-summary h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.google-reviews-disclosure {
    margin: 0;
    font-size: 0.85rem;
    color: #5e5e5e;
}

.google-reviews-grid {
    display: grid;
    grid-template-columns: repeat(var(--gr-visible, 3), 1fr);
    gap: 20px;
}

/* ---------------------------------------------------------------
   Carrousel infini
   --------------------------------------------------------------- */

.google-reviews-carousel {
    position: relative;
    overflow: hidden;
    /* Fondu sur les bords pour que l'entrée/sortie des cartes soit douce. */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}

.google-reviews-track {
    display: flex;
    align-items: stretch;
    gap: 20px;
    width: max-content;
    will-change: transform;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.google-reviews-carousel.is-paused .google-reviews-track {
    animation-play-state: paused;
}

.google-reviews-track > .review {
    flex: 0 0 var(--gr-card-width, 320px);
    width: var(--gr-card-width, 320px);
    display: flex;
    flex-direction: column;
}

/* Colle le lien "Voir l'avis" en bas de carte pour aligner les cartes. */
.google-reviews-track > .review .review-source {
    margin-top: auto;
    padding-top: 12px;
}

/* Le hover translateY casse le calcul de hauteur dans le carrousel. */
.google-reviews-track > .review:hover {
    transform: none;
}

@keyframes gr-scroll-left {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(calc(-1 * var(--gr-loop-width, 0px)), 0, 0); }
}

@keyframes gr-scroll-right {
    from { transform: translate3d(calc(-1 * var(--gr-loop-width, 0px)), 0, 0); }
    to   { transform: translate3d(0, 0, 0); }
}

/* Respect des préférences d'accessibilité : pas d'animation forcée. */
@media (prefers-reduced-motion: reduce) {
    .google-reviews-track {
        animation: none !important;
        transform: none !important;
        overflow-x: auto;
    }

    .google-reviews-carousel {
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }
}

.review {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.review-author-photo {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 40px;
}

.review-author-photo-link {
    flex: 0 0 40px;
}

.review-author-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.review-author-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
    text-decoration: none;
}

a.review-author-name:hover {
    text-decoration: underline;
}

.review-date,
.review-visit-date {
    color: #777;
    font-size: 0.8rem;
}

.review-visit-date {
    margin: 0 0 8px;
}

.review-rating {
    color: #FFC107;
    white-space: nowrap;
    line-height: 1.2;
}

.review-text {
    font-style: italic;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.55;
}

.review-source {
    margin: 12px 0 0;
    font-size: 0.85rem;
}

.review-source a {
    color: inherit;
    text-decoration: underline;
}

.google-reviews-attribution {
    margin-top: 12px;
    text-align: right;
}

.google-maps-attribution {
    font-family: Roboto, Arial, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: normal;
    white-space: nowrap;
    color: #5e5e5e;
    text-decoration: none;
}

.google-maps-attribution:hover {
    text-decoration: underline;
}

.google-reviews-error,
.google-reviews-empty {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

@media (max-width: 1024px) {
    .google-reviews-grid {
        grid-template-columns: repeat(min(2, var(--gr-visible, 3)), 1fr);
    }
}

@media (max-width: 768px) {
    .google-reviews-grid {
        grid-template-columns: 1fr;
    }

    .review-header {
        flex-direction: column;
    }

    .google-reviews-carousel {
        -webkit-mask-image: none;
        mask-image: none;
    }
}
