/* ============================================
   Widget Avis Google - AutoTrade Performance
   ============================================ */

/* Container principal */
.google-reviews-widget {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Loader */
.reviews-loader {
    text-align: center;
    padding: 60px 20px;
}

.loader-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #E31E24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.reviews-loader p {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.6);
}

/* Header avec note moyenne */
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rating-score {
    font-size: 3rem;
    font-weight: 800;
    color: #E31E24;
    line-height: 1;
}

.rating-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 4px;
}

.star {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.3);
}

.star.filled {
    color: #FFA500;
}

.rating-info {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Lien Google */
.google-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.google-logo:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.google-icon {
    width: 20px;
    height: 20px;
}

/* Carrousel */
.reviews-carousel {
    overflow: hidden;
    position: relative;
}

.reviews-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Cartes d'avis */
.review-card {
    flex: 0 0 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .review-card {
        flex: 0 0 50%;
    }
}

@media (min-width: 1024px) {
    .review-card {
        flex: 0 0 33.333%;
    }
}

.review-card > div:first-child,
.review-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.review-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
}

/* Header de la carte */
.review-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E31E24 0%, #ff4d4d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}

.reviewer-avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.reviewer-info {
    flex: 1;
    min-width: 0;
}

.reviewer-name {
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-stars {
    display: flex;
    gap: 1px;
    margin-bottom: 4px;
}

.review-stars .star {
    font-size: 0.875rem;
}

.review-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Texte de l'avis */
.review-text {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Badge vérifié */
.review-source {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto;
}

.review-source svg {
    flex-shrink: 0;
}

/* Controles du carrousel */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 10px;
}

.reviews-carousel {
    position: relative;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: rgba(227, 30, 36, 0.8);
    border-color: #E31E24;
    transform: scale(1.1);
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
}

/* Points de navigation */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.4);
}

.dot.active {
    background: #E31E24;
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 767px) {
    .google-reviews-widget {
        padding: 30px 15px;
    }

    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .rating-score {
        font-size: 2.5rem;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
    }

    .review-card {
        padding: 0 5px;
    }
}

/* Section titre (optionnel) */
.reviews-section-title {
    text-align: center;
    margin-bottom: 40px;
}

.reviews-section-title .section-eyebrow {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(227, 30, 36, 0.1);
    border: 1px solid rgba(227, 30, 36, 0.2);
    border-radius: 30px;
    color: #E31E24;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.reviews-section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px 0;
}

.reviews-section-title p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

@media (max-width: 767px) {
    .reviews-section-title h2 {
        font-size: 1.75rem;
    }

    .reviews-section-title p {
        font-size: 1rem;
    }
}
