/* ========================================
   SYSTÈME D'AVIS PERSONNALISÉ - AnnuaireMada
   ======================================== */

/* ===== SECTION PRINCIPALE ===== */
.custom-reviews-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    margin-bottom: 2rem;
}

.custom-reviews-section h2 {
    color: #2d3748;
    border-bottom: 3px solid #f093fb;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* ===== FORMULAIRE D'AVIS ===== */
.ams-review-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border: 2px solid #e2e8f0;
}

.ams-review-form h3 {
    margin-bottom: 1.5rem;
    color: #2d3748;
    font-size: 1.3rem;
}

/* Champs du formulaire */
.ams-review-form .ams-field {
    margin-bottom: 1.2rem;
}

.ams-review-form .ams-field label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.ams-review-form .ams-field input,
.ams-review-form .ams-field textarea,
.ams-review-form .ams-field select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
    font-family: inherit;
}

.ams-review-form .ams-field input:focus,
.ams-review-form .ams-field textarea:focus,
.ams-review-form .ams-field select:focus {
    outline: none;
    border-color: #f093fb;
    box-shadow: 0 0 0 3px rgba(240, 147, 251, 0.1);
}

/* ===== ÉTOILES INTERACTIVES ===== */
.star-rating {
    display: flex;
    gap: 0.3rem;
    font-size: 2.5rem;
    cursor: pointer;
    user-select: none;
}

.star-rating .star {
    color: #e2e8f0;
    transition: all 0.2s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.star-rating .star:hover,
.star-rating .star.active {
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
    transform: scale(1.1);
}

.rating-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

/* ===== CRITÈRES DÉTAILLÉS ===== */
.criteria-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.criteria-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.criteria-item label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-weight: 600;
}

.criteria-item select {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95rem;
}

/* ===== BOUTON SOUMETTRE ===== */
.ams-submit-review {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

.ams-submit-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

.ams-submit-review:active {
    transform: translateY(0);
}

/* ===== LISTE DES AVIS ===== */
.ams-reviews-list {
    margin-top: 2rem;
}

.ams-review-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.ams-review-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
}

.review-stars {
    color: #ffd700;
    font-size: 1.3rem;
    letter-spacing: 2px;
}

.reviewer-name {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.05rem;
}

.review-date {
    color: #718096;
    font-size: 0.85rem;
    margin-left: auto;
}

.review-content {
    color: #4a5568;
    line-height: 1.7;
    font-size: 0.95rem;
}

.review-criteria {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.review-criteria span {
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ===== MESSAGE AUCUN AVIS ===== */
.no-reviews {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

/* ===== ALERTES ===== */
.ams-alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.ams-alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.ams-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 768px) {
    .custom-reviews-section {
        padding: 1.5rem 1rem;
    }
    
    .ams-review-form {
        padding: 1.5rem 1rem;
    }
    
    .star-rating {
        font-size: 2rem;
    }
    
    .criteria-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .review-date {
        margin-left: 0;
    }
    
    .review-criteria {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .ams-submit-review {
        padding: 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .star-rating {
        font-size: 1.8rem;
    }
    
    .ams-review-form {
        padding: 1.2rem 0.8rem;
    }
}