/* ==========================================================
   AVIS - DESIGN ÉPURÉ (sans violet)
   ========================================================== */

:root {
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --bg-glass: rgba(255, 255, 255, 0.95);
    --border-light: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 8px 25px -8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 30px 60px -15px rgba(0, 0, 0, 0.12);
    --transition-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --primary-neutral: #4a6a8a;
    --primary-neutral-hover: #5a7a9a;
}

/* ===== MODE NUIT - OVERRIDES GLOBAUX ===== */
[data-bs-theme="dark"] {
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --bg-glass: #1a1a24;
    --border-light: rgba(255, 255, 255, 0.06);
    --shadow-sm: 0 8px 25px -8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
}

/* ===== HEADER ===== */
header {
    opacity: 0;
    animation: fadeUp 0.7s ease forwards;
}

header h1 {
    font-size: 2.8rem;
    letter-spacing: -0.02em;
    color: var(--text-primary) !important;
}

header p {
    font-size: 1.2rem;
    color: var(--text-secondary) !important;
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ===== RÉSUMÉ ===== */
.avis-summary {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 50px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.35s ease;
}

.avis-summary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.avis-total {
    display: flex;
    align-items: baseline;
    justify-content: center;
}

@media (min-width: 768px) {
    .avis-total {
        justify-content: flex-start;
    }
}

.avis-count {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.avis-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-left: 8px;
}

.avis-stars {
    font-size: 2.2rem;
    color: #ffc107;
    margin-bottom: 4px;
}

.avis-note {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Bouton principal */
.btn-primary {
    background: #1a1a1a !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 12px 28px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .btn-primary {
    background: #2a2a3a !important;
    color: #f0f0f0 !important;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important;
    background: #2a2a2a !important;
}

[data-bs-theme="dark"] .btn-primary:hover {
    background: #3a3a4a !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3) !important;
}

.btn-primary i {
    margin-right: 8px;
}

/* ===== CARTES AVIS ===== */
.avis-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    height: 100%;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.35s var(--transition-smooth);
    opacity: 0;
    animation: textReveal 0.6s var(--transition-smooth) forwards;
}

.avis-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

@keyframes textReveal {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.avis-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.avis-avatar {
    width: 48px;
    height: 48px;
    background: var(--primary-neutral);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 14px;
    flex-shrink: 0;
}

[data-bs-theme="dark"] .avis-avatar {
    background: var(--primary-neutral-hover);
}

.avis-info h4 {
    margin: 0 0 3px 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.avis-stars-small {
    color: #ffc107;
    font-size: 0.8rem;
}

.avis-date {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.avis-body p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ==========================================================
   MODALE AVIS
   ========================================================== */

.avis-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.avis-modal.active {
    display: flex;
}

.avis-modal-content {
    background: #ffffff;
    border-radius: 28px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    position: relative;
    animation: modalSlideIn 0.35s ease;
}

[data-bs-theme="dark"] .avis-modal-content {
    background: var(--bg-glass);
    border-color: var(--border-light);
    box-shadow: var(--shadow-lg);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.avis-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    z-index: 10;
    font-size: 1.2rem;
}

[data-bs-theme="dark"] .avis-modal-close {
    background: rgba(255, 255, 255, 0.06);
    color: #f0f0f0;
}

.avis-modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    transform: rotate(90deg);
}

.avis-modal-header {
    text-align: center;
    padding: 28px 30px 16px;
    border-bottom: 1px solid var(--border-light);
}

.avis-modal-header i {
    font-size: 2.5rem;
    color: #ffc107;
    margin-bottom: 6px;
}

.avis-modal-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.avis-modal-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.avis-modal-body {
    padding: 24px 28px 28px;
}

/* ===== NOTATION PAR ÉTOILES ===== */
.rating-section {
    text-align: center;
    margin-bottom: 24px;
}

.rating-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
}

.star-rating {
    font-size: 2rem;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .star-rating {
    color: #4b5563;
}

.star-rating:hover,
.star-rating.hover {
    color: #fbbf24;
    transform: scale(1.1);
}

.star-rating.active {
    color: #ffc107;
}

.rating-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-neutral);
}

[data-bs-theme="dark"] .rating-text {
    color: #7a9aba;
}

/* ===== CHAMPS ===== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-label i {
    margin-right: 6px;
    color: var(--primary-neutral);
}

[data-bs-theme="dark"] .form-label i {
    color: #7a9aba;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #d0d0d0;
    border-radius: 12px;
    background: #ffffff;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

[data-bs-theme="dark"] .form-control {
    background: #242433;
    border-color: #3a3a4e;
    color: #f0f0f0;
}

.form-control:focus {
    border-color: var(--primary-neutral);
    box-shadow: 0 0 0 3px rgba(74, 106, 138, 0.12);
}

[data-bs-theme="dark"] .form-control:focus {
    border-color: #5a7a9a;
    box-shadow: 0 0 0 3px rgba(90, 122, 154, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===== STATUS ===== */
.form-status {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    display: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-status.loading {
    display: block;
    background: rgba(74, 106, 138, 0.08);
    color: var(--primary-neutral);
    border: 2px solid rgba(74, 106, 138, 0.15);
}

[data-bs-theme="dark"] .form-status.loading {
    background: rgba(90, 122, 154, 0.08);
    color: #7a9aba;
    border-color: rgba(90, 122, 154, 0.15);
}

.form-status.success {
    display: block;
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
    border: 2px solid rgba(16, 185, 129, 0.15);
}

.form-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 2px solid rgba(239, 68, 68, 0.15);
}

/* ===== ACTIONS ===== */
.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.btn-modal-primary,
.btn-modal-secondary {
    flex: 1;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-modal-primary {
    background: #1a1a1a;
    color: #ffffff;
}

[data-bs-theme="dark"] .btn-modal-primary {
    background: #2a2a3a;
    color: #f0f0f0;
}

.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background: #2a2a2a;
}

[data-bs-theme="dark"] .btn-modal-primary:hover {
    background: #3a3a4a;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.btn-modal-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .btn-modal-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #f0f0f0;
}

.btn-modal-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .btn-modal-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-footer-text {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 18px;
    margin-bottom: 0;
}

.modal-footer-text i {
    color: var(--primary-neutral);
    margin-right: 4px;
}

[data-bs-theme="dark"] .modal-footer-text i {
    color: #7a9aba;
}

/* ==========================================================
   FOOTER EN BAS DE PAGE
   ========================================================== */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }

    .avis-summary {
        padding: 20px;
        margin-bottom: 30px;
    }

    .avis-count {
        font-size: 2.5rem;
    }

    .avis-stars {
        font-size: 1.6rem;
    }

    .avis-modal-content {
        max-width: 100%;
        margin: 10px;
        border-radius: 20px;
    }

    .avis-modal-header h2 {
        font-size: 1.3rem;
    }

    .avis-modal-body {
        padding: 20px;
    }

    .rating-stars {
        gap: 4px;
    }

    .star-rating {
        font-size: 1.6rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .btn-modal-primary,
    .btn-modal-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .avis-card {
        padding: 18px;
    }

    .avis-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-right: 10px;
    }

    .avis-info h4 {
        font-size: 0.95rem;
    }

    .avis-stars-small {
        font-size: 0.7rem;
    }

    .avis-date {
        font-size: 0.65rem;
    }
}