/* =============================================
   AVIS.CSS — page d'avis, même thème que l'accueil
   ============================================= */

:root {
    --bg-dark: #0f111a;
    --primary-blue: #00d2ff;
    --secondary-blue: #3a7bd5;
    --accent-green: #4ade80;
    --text-gray: #a0aec0;
    --star: #fbbf24;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body { background-color: var(--bg-dark); }

body {
    color: #fff;
    position: relative;
    isolation: isolate;
}

/* Même halo lumineux que l'accueil */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(
        ellipse 1200px 800px at 50% 0%,
        rgba(0, 210, 255, 0.14) 0%,
        rgba(0, 210, 255, 0.06) 35%,
        rgba(15, 17, 26, 0) 75%
    );
}

.avis-page { padding: 70px 20px 100px; }
.container-avis { max-width: 820px; margin: 0 auto; }

/* --- Titre --- */
.avis-hero { text-align: center; margin-bottom: 2.5rem; }
.avis-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: .8rem;
}
.avis-hero p { color: var(--text-gray); font-size: 1.1rem; line-height: 1.6; }

.text-gradient {
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue), var(--accent-green), var(--primary-blue));
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: flowColors 5s linear infinite;
}
@keyframes flowColors {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Moyennes --- */
.avis-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}
.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.4rem 2rem;
    text-align: center;
    backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
    min-width: 200px;
    flex: 1;
}
.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 210, 255, 0.3);
    background: rgba(0, 210, 255, 0.05);
}
.stat-card h3 {
    font-size: .85rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 .4rem;
    font-weight: 600;
}
.stat-card p {
    font-size: 2.6rem;
    font-weight: 900;
    margin: 0;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-card p small { font-size: 1rem; opacity: .7; }

.stars { color: var(--star); font-size: .95rem; letter-spacing: 2px; }
.stars .far { color: rgba(255, 255, 255, .2); }

/* --- Cartes --- */
.avis-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(12px);
    margin-bottom: 1.2rem;
}
.avis-card h2 { font-size: 1.4rem; margin: 0 0 1.4rem; }

/* --- Alertes --- */
.avis-alert {
    padding: 1rem 1.4rem;
    border-radius: 14px;
    margin-bottom: 1.2rem;
    font-weight: 600;
}
.avis-alert.success {
    background: rgba(74, 222, 128, .1);
    border: 1px solid rgba(74, 222, 128, .35);
    color: var(--accent-green);
}
.avis-error { color: #ff6b81; font-size: .9rem; margin: -.4rem 0 1rem; }

/* --- Formulaire --- */
.rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 1.2rem;
}
.rating-label { font-weight: 700; display: block; margin-bottom: .5rem; }
.rating-row .rating-label { margin: 0; }

/* Étoiles cliquables 100 % CSS : radios dans l'ordre inverse */
.star-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: .25rem;
}
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label {
    font-size: 1.9rem;
    color: rgba(255, 255, 255, .18);
    cursor: pointer;
    transition: color .15s ease, transform .15s ease;
}
.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label { color: var(--star); }
.star-input label:hover { transform: scale(1.15); }
.star-input input:focus-visible + label { outline: 2px solid var(--primary-blue); border-radius: 6px; }

textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    padding: .9rem 1rem;
    font: inherit;
    resize: vertical;
    margin-bottom: 1rem;
    transition: border-color .3s ease;
}
textarea:focus { outline: none; border-color: var(--primary-blue); }

/* --- Bouton (même style que le CTA de l'accueil) --- */
.avis-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .9rem 2.4rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff !important;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    cursor: pointer;
    background: linear-gradient(90deg, #3b82f6, #2dd4bf, #3b82f6);
    background-size: 200% auto;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
    transition: var(--transition-smooth);
    animation: flowColors 3s linear infinite;
}
.avis-btn:hover { transform: translateY(-3px) scale(1.04); filter: brightness(1.2); }

.avis-login { text-align: center; }
.avis-login i { font-size: 2rem; color: var(--primary-blue); margin-bottom: .6rem; }
.avis-login p { color: var(--text-gray); margin: 0 0 1.2rem; }

/* --- Liste --- */
.review header { display: flex; align-items: center; gap: .9rem; margin-bottom: .9rem; }
.review-avatar {
    position: relative;
    width: 42px; height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: #1e2230;
    font-weight: 800;
    border: 2px solid #3b82f6;
}
.review-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.review-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.review-meta span { color: var(--text-gray); font-size: .85rem; }
.review-delete {
    background: none; border: none; cursor: pointer;
    color: var(--text-gray);
    padding: .4rem .6rem;
    border-radius: 8px;
    transition: color .2s ease, background .2s ease;
}
.review-delete:hover { color: #ff4757; background: rgba(255, 71, 87, .1); }

.review-ratings {
    display: flex; flex-wrap: wrap; gap: .6rem 1.6rem;
    color: var(--text-gray); font-size: .9rem;
    margin-bottom: .8rem;
}
.review-comment {
    margin: 0;
    line-height: 1.6;
    color: #e2e8f0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.avis-empty { text-align: center; color: var(--text-gray); padding: 2rem 0; }

.rating-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rating-label small {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.65;
}

@media (max-width: 600px) {
    .avis-card { padding: 1.4rem; }
    .rating-row { flex-direction: column; align-items: flex-start; }
}
