/* Masquer la liste de commentaires WooCommerce par défaut */
#comments {
    display: none !important;
}

/* Masquer la pagination WooCommerce */
.woocommerce-pagination {
    display: none !important;
}

/* Styles pour l'affichage des avis selon la maquette */

.reviews-container {
    display: flex;
    gap: 30px;
    margin: 20px 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* Panneau gauche - Note moyenne */
.reviews-summary {
    flex: 0 0 300px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.reviews-summary:hover {
    transform: translateY(-1px);
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 2px 4px rgba(0,0,0,0.16), 0 2px 3px rgba(0,0,0,0.28);
}

.average-rating {
    text-align: center;
    margin-bottom: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.average-score {
    font-size: 48px;
    font-weight: bold;
    color: #1d2327;
    margin: 0;
    line-height: 1;
}

.stars-display {
    margin: 10px 0;
}

.stars-display .star {
    color: #ffc107;
    font-size: 24px;
    margin: 0 2px;
}

.average-label {
    font-size: 14px;
    font-weight: bold;
    color: #1d2327;
    text-transform: uppercase;
    margin-top: 10px;
}

/* Graphique de distribution */
.rating-distribution {
    margin-top: 20px;
    flex: 0 0 auto;
    width: 100%;
}

.distribution-bar {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-number {
    width: 20px;
    font-weight: bold;
    color: #1d2327;
    font-size: 14px;
}

.bar-container {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    margin: 0 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #ffc107;
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Panneau droit - Avis individuels avec scroll infini */
.reviews-list {
    flex: 1;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Quand il n'y a pas de panneau de résumé (moins de 5 avis) */
.reviews-list-full {
    flex: 1;
    max-width: 100%;
    margin-left: 0;
}

/* Scrollbar personnalisée */
.reviews-list::-webkit-scrollbar {
    width: 6px;
}

.reviews-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.reviews-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.reviews-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.review-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.review-card:last-child {
    margin-bottom: 0;
}

.review-card:hover {
    transform: translateY(-1px);
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 2px 4px rgba(0,0,0,0.16), 0 2px 3px rgba(0,0,0,0.28);
    transition: all 0.3s ease;
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.review-stars {
    margin-right: 10px;
}

.review-stars .star {
    color: #ffc107;
    font-size: 16px;
    margin: 0 1px;
}

.reviewer-info {
    font-weight: bold;
    color: #1d2327;
    font-size: 14px;
}

.review-text {
    color: #495057;
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 14px;
}

.review-image {
    margin-top: 10px;
}

.review-image img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 4px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.review-image img:hover {
    transform: scale(1.05);
}

/* Indicateur de chargement */
.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    margin: 10px 0;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}


/* Responsive */
@media (max-width: 768px) {
    .reviews-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .reviews-summary {
        flex: none;
    }
    
    .average-score {
        font-size: 36px;
    }
}

/* S'assurer que le formulaire reste visible */
.woocommerce-Reviews .comment-respond {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
}

.woocommerce-Reviews .comment-respond h3 {
    margin-bottom: 20px;
    color: #1d2327;
    font-size: 18px;
}

/* Animation pour les barres */
@keyframes fillBar {
    from { width: 0; }
    to { width: var(--fill-width); }
}

.bar-fill {
    animation: fillBar 1s ease-out;
}
