/* Styles pour la section des avis */
.reviews-section {
    width: 100%;
    padding: 2rem 0;
    background-color: var(--warm-bg);
}

/* Styles pour le résumé des avis */
.reviews-summary {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.summary-stats {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.average-rating {
    text-align: center;
    min-width: 150px;
}

.big-rating {
    font-size: 48px;
    font-weight: bold;
    color: #2c5530;
}

.stars {
    color: #ffd700;
    margin: 10px 0;
}

.total-reviews {
    color: #666;
    font-size: 14px;
}

.rating-bars {
    flex-grow: 1;
    max-width: 600px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    margin: 8px 0;
    gap: 10px;
}

.rating-label {
    width: 80px;
    text-align: right;
    font-size: 14px;
    color: #666;
}

.rating-bar {
    flex-grow: 1;
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background-color: #2c5530;
    transition: width 0.3s ease;
}

.rating-count {
    width: 30px;
    text-align: right;
    font-size: 14px;
    color: #666;
}

/* Résumé des avis */
.reviews-summary {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.summary-rating {
    text-align: center;
    margin-bottom: 1.5rem;
}

.average-rating {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.rating-stars {
    color: #ffd700;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.total-reviews {
    color: #666;
    font-size: 1rem;
}

.rating-bars {
    max-width: 400px;
    margin: 0 auto;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.rating-label {
    width: 30px;
    text-align: right;
    margin-right: 1rem;
}

.rating-bar {
    flex-grow: 1;
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background-color: #ffd700;
    transition: width 0.3s ease;
}

/* Bouton Ajouter un avis */
.add-review {
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: right;
}

.btn-add-review {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.btn-add-review:hover {
    background-color: var(--secondary-color);
}

/* Container des avis */
.reviews-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Style pour chaque avis */
.review {
    background-color: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

/* Bouton de suppression pour admin */
.delete-review {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 5px;
    margin-left: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.delete-review:hover {
    opacity: 1;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
}

.review-info {
    flex-grow: 1;
}

.review-author {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.review-rating {
    color: #ffd700; /* Jaune doré */
    font-size: 1.2rem;
}

.review-date {
    color: #666;
    font-size: 0.9rem;
}

.review-content {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Style pour la réponse du propriétaire */
.owner-response {
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    margin-top: 1rem;
    padding: 1rem;
}

.owner-response-header {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: var(--white);
    margin: 10% auto;
    padding: 2rem;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

/* Formulaire */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rating-input .star {
    cursor: pointer;
    font-size: 30px;
    color: #ddd;
    padding: 5px;
    transition: color 0.2s ease;
}

.rating-input .star:hover,
.rating-input .star:hover ~ .star,
.rating-input .star.active {
    color: #ffd700;
}

.btn-submit {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    transition: background-color 0.3s ease;
}

.btn-submit:hover {
    background-color: var(--secondary-color);
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .reviews-container,
    .reviews-summary,
    .add-review {
        padding: 0 15px;
    }

    .modal-content {
        margin: 20% auto;
        padding: 1.5rem;
    }

    .review {
        padding: 1rem;
    }
}
