/* Base modal */
.modal-dialog {
    max-width: 800px;
    width: 90%;
    margin: 2rem auto;
}

.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 15px 15px 0 0;
}

.modal-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.btn-close {
    font-size: 1.2rem;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    padding: 0.5rem;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.9);
}

.btn-close i {
    font-size: 1rem;
    color: white;
}

.modal-body {
    padding: 1.5rem;
}

/* Layout principal */
.review-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Titre centré */
.swim-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #333;
}

/* Zone upload image */
.image-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-preview {
    width: 100%;
    height: 200px;
    background: #333;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1rem;
    text-align: center;
}

.upload-preview p {
    color: white;
    font-size: 1rem;
    margin: 0;
    margin-top: 1rem;
}

.upload-btn {
    background: #0d6efd;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-btn:hover {
    background: #0b5ed7;
}

/* Zone des critères d'évaluation */
.rating-criteria {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Critères d'évaluation */
.criteria-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
    min-height: 60px;
}

.criteria-labels {
    flex: 1;
    padding-right: 1rem;
}

.criteria-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.criteria-desc {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

.criteria-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    flex-shrink: 0;
}

.criteria-feedback {
    font-size: 0.75rem;
    color: #ff6b6b;
    text-align: center;
    min-height: 16px;
    margin-bottom: 0.3rem;
}

.criteria-stars {
    display: flex;
    gap: 0.25rem;
    font-size: 1.2rem;
}

.criteria-stars i {
    color: #cfcfcf;
    cursor: pointer;
    transition: color .15s ease, transform .15s ease, filter .15s ease, opacity .15s ease;
    font-size: 1.6rem;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255,255,255,.4), 0 2px 3px rgba(0,0,0,.12);
}

.criteria-stars i.fas {
    color: #ffd700;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,.18));
}

.criteria-stars:hover i { opacity: .95; }
.criteria-stars i:hover { transform: translateY(-1px) scale(1.05); filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
.criteria-stars i:hover ~ i { opacity: .55; }

@media (max-width: 420px) {
    .criteria-stars i { font-size: 1.8rem; }
}

/* Zone commentaire */
.comment-area textarea {
    width: 100%;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.75rem;
    resize: vertical;
    font-size: 0.9rem;
}

.comment-area textarea:focus {
    outline: none;
    border-color: #0d6efd;
}

/* Footer avec boutons */
.modal-footer {
    padding: 1.5rem 2rem;
    border-top: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.recommend-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.recommend-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #ccc;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
}

.recommend-btn:hover {
    border-color: #0d6efd;
    background: #f0f8ff;
}

.recommend-btn.active {
    border-color: #0d6efd;
    background: #0d6efd;
    color: white;
}

.recommend-action span {
    font-size: 0.9rem;
    color: #666;
}

.submit-review-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-review-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Responsive Styling */

@media (max-width: 768px) {
    .modal-dialog {
        width: 95%;
        margin: 1rem auto;
        max-width: none;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .review-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .swim-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .upload-preview {
        height: 150px;
    }
    
    .criteria-item {
        align-items: center;
        padding: 0.75rem;
    }
    
    .criteria-rating {
        min-width: 120px;
    }
    
    .modal-actions {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .recommend-action {
        gap: 0.5rem;
    }
    
    .recommend-action span {
        font-size: 0.8rem;
    }
    
    .submit-review-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal-dialog {
        width: 98%;
        margin: 0.5rem auto;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 0.75rem;
    }
    
    .criteria-stars {
        font-size: 1.4rem;
        gap: 0.5rem;
    }
    
    .recommend-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .recommend-action span {
        font-size: 0.75rem;
    }
    
    .submit-review-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}
