/* Système d'étoiles et d'évaluation */

/* Étoiles de base */
.star-icon, .star-clickable {
    transition: all 0.2s ease;
    cursor: default;
}

.star-clickable {
    cursor: pointer;
    transform: scale(1);
}

.star-clickable:hover {
    transform: scale(1.2);
}

.stars-rating {
    margin-bottom: 1rem;
}

.stars-display {
    display: inline-flex;
    align-items: center;
}

/* Animation des étoiles */
@keyframes starGlow {
    0% { text-shadow: 0 0 5px rgba(255, 193, 7, 0.5); }
    50% { text-shadow: 0 0 10px rgba(255, 193, 7, 0.8); }
    100% { text-shadow: 0 0 5px rgba(255, 193, 7, 0.5); }
}

.star-clickable.text-warning:hover {
    animation: starGlow 1s infinite;
}

/* Section d'évaluation */
.rating-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.rating-input {
    background: rgba(255,255,255,0.8);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.comment-input {
    background: rgba(255,255,255,0.8);
    border-radius: 10px;
    padding: 1rem;
}

/* Distribution des étoiles */
.rating-distribution {
    background: rgba(255,255,255,0.8);
    border-radius: 10px;
    padding: 1rem;
}

.progress {
    border-radius: 10px;
    background-color: rgba(0,0,0,0.1);
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, #ffc107, #ffb300);
}

/* Affichage des étoiles dans les listes */
.stars-small .fa-star {
    font-size: 0.7rem;
    margin-right: 1px;
}

/* Étoiles avec effet de brillance */
.star-shine {
    position: relative;
    overflow: hidden;
}

.star-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transition: left 0.5s;
}

.star-shine:hover::before {
    left: 100%;
}

/* Badge de note */
.rating-badge {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .rating-section {
        padding: 1rem;
    }
    
    .star-clickable {
        font-size: 1.2rem;
        margin-right: 3px;
    }
    
    .stars-small .fa-star {
        font-size: 0.6rem;
    }
}

/* Animation de chargement pour les étoiles */
@keyframes starLoading {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    80%, 100% { opacity: 0; }
}

.stars-loading .fa-star:nth-child(1) { animation: starLoading 1.5s infinite 0s; }
.stars-loading .fa-star:nth-child(2) { animation: starLoading 1.5s infinite 0.3s; }
.stars-loading .fa-star:nth-child(3) { animation: starLoading 1.5s infinite 0.6s; }
.stars-loading .fa-star:nth-child(4) { animation: starLoading 1.5s infinite 0.9s; }
.stars-loading .fa-star:nth-child(5) { animation: starLoading 1.5s infinite 1.2s; }

/* Tooltip pour les étoiles */
.star-tooltip {
    position: relative;
}

.star-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

/* Effet de particules pour les étoiles */
.star-particle {
    position: relative;
}

.star-particle.active::after {
    content: '✨';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    animation: particleFloat 1s ease-out forwards;
    pointer-events: none;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
}

/* Barres de progression stylisées */
.rating-bar {
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #ffa500 50%, #4ecdc4 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.rating-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Effet de pulsation pour les nouvelles évaluations */
.rating-pulse {
    animation: ratingPulse 2s infinite;
}

@keyframes ratingPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
}

/* Messages de succès pour les évaluations */
.rating-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    animation: slideInUp 0.5s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Statistiques d'évaluations */
.rating-stats {
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.rating-stats h6 {
    color: #495057;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.rating-stats h6::before {
    content: '📊';
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Hover effects améliorés */
.rating-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

/* Étoiles avec dégradé */
.star-gradient {
    background: linear-gradient(45deg, #ffc107, #ff8f00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
