/**
 * Styles pour la section Avis clients
 */

/* Section principale */
.shop-reviews {
 
    padding: 60px 0;
    margin-top: 40px;
    clear: both;
}

.shop-reviews .container {
    display: block;
    clear: both;
}

.reviews-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 40px;
    text-align: left;
    display: block;
    clear: both;
    width: 100%;
}

body.lang-ar .reviews-title {
    text-align: right;
}

/* Résumé des avis */
.reviews-summary-section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    clear: both;
      display: inline-block;
    width: 100%;
}

.average-rating-box {
    text-align: center;
    padding: 20px;
}

.rating-number {
    font-size: 72px;
    font-weight: 800;
    color: #8B7355;
    line-height: 1;
    margin-bottom: 15px;
}

.rating-stars {
    margin-bottom: 15px;
}

.rating-stars i {
    color: #FFC107;
    font-size: 32px;
}

.review-count-text {
    font-size: 18px;
    color: #666;
    font-weight: 500;
}

/* Distribution des notes */
.rating-distribution {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px 0;
}

.rating-bar-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rating-label {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 70px;
    font-size: 16px;
    font-weight: 600;
    color: #2c2c2c;
}

.rating-label i {
    font-size: 20px;
    color: #FFC107;
}

.rating-bar {
    flex: 1;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #8B7355 0%, #6d5a43 100%);
    transition: width 0.3s ease;
    min-width: 2px;
}

.rating-count {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    color: #666;
    font-size: 15px;
}

/* Section action (bouton avis) */
.review-action-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    text-align: center;
}

.review-login-prompt,
.review-no-order,
.review-call-to-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.review-login-prompt i,
.review-no-order i {
    font-size: 48px;
    color: #8B7355;
}

.review-login-prompt p,
.review-no-order p,
.review-call-to-action p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

.review-call-to-action button,
.review-login-prompt a {
    min-width: 200px;
}

/* Avis déjà posté */
.review-already-posted {
    text-align: left;
}

.existing-review-header {
    display: block;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.existing-review-header i {
    font-size: 28px;
    color: #28a745;
}

.existing-review-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.existing-review-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #8B7355;
}

.existing-review-rating {
    margin-bottom: 10px;
}

.existing-review-rating i {
    color: #FFC107;
    font-size: 24px;
}

.existing-review-comment {
    font-size: 16px;
    color: #555;
    font-style: italic;
    line-height: 1.6;
}

.existing-review-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.existing-review-actions button {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Liste des avis */
.reviews-list-section {
    margin-top: 30px;
}

.reviews-list-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 25px;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-item {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.review-item:hover {
    box-shadow: 0 4px 25px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.review-author-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.author-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8ddd1 0%, #d4c4b0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-avatar i {
    font-size: 36px;
    color: #8B7355;
}

.review-author {
    font-weight: 700;
    font-size: 17px;
    color: #2c2c2c;
    margin-bottom: 3px;
}

.review-date {
    font-size: 14px;
    color: #999;
}

.review-rating i {
    color: #FFC107;
    font-size: 22px;
}

.review-comment {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    line-height: 1.7;
    color: #555;
    font-size: 15px;
    border-left: 4px solid #8B7355;
}

/* Modale */
.review-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.review-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.review-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid #f0f0f0;
}

.review-modal-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0;
}

.review-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.review-modal-close:hover {
    background: #f0f0f0;
}

.review-modal-close i {
    font-size: 28px;
    color: #666;
}

.review-modal-body {
    padding: 30px;
}

.review-modal-body .form-group {
    margin-bottom: 25px;
}

.review-modal-body label {
    display: block;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 10px;
    font-size: 15px;
}

.review-modal-body .required {
    color: #dc3545;
}

/* Étoiles interactives */
.star-rating-input {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.star-input {
    font-size: 40px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-input:hover,
.star-input.active {
    color: #FFC107;
    transform: scale(1.1);
}

.review-modal-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.review-modal-footer button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    font-weight: 600;
}

/* Boutons */
.btn-primary {
    background: linear-gradient(135deg, #8B7355 0%, #6d5a43 100%);
    border: none;
    color: white;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6d5a43 0%, #5a4a36 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.3);
}

.btn-secondary {
    background: #6c757d;
    border: none;
    color: white;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-outline-danger {
    background: white;
    border: 2px solid #dc3545;
    color: #dc3545;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .shop-reviews {
        padding: 40px 0;
    }

    .reviews-title {
        font-size: 26px;
        margin-bottom: 30px;
    }

    .reviews-summary-section {
        padding: 25px;
    }

    .rating-number {
        font-size: 56px;
    }

    .rating-stars i {
        font-size: 26px;
    }

    .review-action-section {
        padding: 20px;
    }

    .review-item {
        padding: 20px;
    }

    .review-header {
        flex-direction: column;
        gap: 15px;
    }

    .existing-review-actions {
        flex-direction: column;
    }

    .existing-review-actions button {
        width: 100%;
        justify-content: center;
    }

    .review-modal-content {
        width: 95%;
    }

    .review-modal-header {
        padding: 20px;
    }

    .review-modal-body {
        padding: 20px;
    }

    .star-input {
        font-size: 32px;
    }

    .review-modal-footer {
        flex-direction: column-reverse;
    }

    .review-modal-footer button {
        width: 100%;
        justify-content: center;
    }
}

/* RTL Support */
body.lang-ar .review-header {
    flex-direction: row-reverse;
}

body.lang-ar .review-author-info {
    flex-direction: row-reverse;
}

body.lang-ar .rating-bar-item {
    flex-direction: row-reverse;
}

body.lang-ar .existing-review-actions {
    flex-direction: row-reverse;
}

body.lang-ar .review-modal-header {
    flex-direction: row-reverse;
}

body.lang-ar .review-modal-footer {
    flex-direction: row-reverse;
}

body.lang-ar .star-rating-input {
    flex-direction: row-reverse;
}

body.lang-ar .review-comment,
body.lang-ar .existing-review-content {
    border-left: none;
    border-right: 4px solid #8B7355;
}
