/* =====================================================
   reviews.css — Page des tقييمات (avis)
   Style inspiré Trustpilot — omratok.com
   ===================================================== */

/* ── Garantir le scroll vertical sur la page reviews ── */
html, body {
    overflow-y: auto !important;
    height: auto !important;
}

/* ── Variables (héritées de style.css) ── */
:root {
    --tp-green: #00b67a;
    --tp-green-light: #dff5ed;
    --tp-green-dark: #007a52;
    --tp-star-size: 32px;
    --card-radius: 14px;
}

/* ── Barre de retour navigation ── */
.rv-back-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 62px;   /* = hauteur navbar shared */
    z-index: 90;
}
.rv-back-bar .container {
    display: flex;
    align-items: center;
    gap: 12px;
}
.rv-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    padding: 8px 16px;
    font-family: 'Tajawal', sans-serif;
    font-size: .88rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: var(--trans);
    text-decoration: none;
}
.rv-back-btn:hover {
    background: var(--off-white);
    border-color: var(--green);
    color: var(--green);
}
.rv-back-title {
    font-size: .9rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ── Entité cliquable dans la barre de retour ── */
.rv-back-entity {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 5px 14px 5px 5px;
    border-radius: 50px;
    border: 1.5px solid transparent;
    transition: all .2s ease;
    cursor: pointer;
}
.rv-back-entity:hover {
    background: var(--off-white);
    border-color: var(--green);
}
.rv-back-entity:hover .rv-back-title {
    color: var(--green);
}
.rv-back-entity:hover .rv-back-arrow-icon {
    opacity: 1;
    transform: translateX(-2px);
}
.rv-back-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    background: #00796B;
}
.rv-back-arrow-icon {
    font-size: .7rem;
    color: var(--green);
    opacity: 0;
    transition: opacity .2s, transform .2s;
    margin-right: auto;
}

/* ── Hero entité ── */
.rv-hero {
    background: linear-gradient(160deg, #1a3a4a 0%, #0d2233 100%);
    padding: 36px 0 30px;
    color: #fff;
}
.rv-hero-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.rv-entity-photo {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.25);
    flex-shrink: 0;
}
.rv-entity-avatar {
    display: none !important;
    width: 80px;
    height: 80px;
    border-radius: 14px;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 900;
    color: #fff;
    border: 3px solid rgba(255,255,255,.25);
    flex-shrink: 0;
}
.rv-entity-info {
    flex: 1;
    min-width: 0;
}
.rv-entity-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.85);
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 8px;
}
.rv-entity-name {
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 6px;
    color: #fff;
}
.rv-entity-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: .82rem;
    color: rgba(255,255,255,.7);
}
.rv-entity-meta i { font-size: .78rem; }

/* Bloc score hero */
.rv-hero-score {
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 16px;
    padding: 20px 28px;
    text-align: center;
    flex-shrink: 0;
}
.rv-score-big {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--tp-green);
    line-height: 1;
    font-family: 'Tajawal', sans-serif;
}
.rv-score-max {
    font-size: .9rem;
    color: rgba(255,255,255,.5);
    margin-bottom: 10px;
    display: block;
}
.rv-hero-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}
.rv-hero-stars .tp-star {
    width: var(--tp-star-size);
    height: var(--tp-star-size);
    font-size: .9rem;
    border-radius: 5px;
}
.rv-score-label {
    font-size: .8rem;
    color: var(--tp-green);
    font-weight: 700;
}
.rv-reviews-total {
    font-size: .75rem;
    color: rgba(255,255,255,.55);
    margin-top: 4px;
}

/* ── Stats de satisfaction ── */
.rv-stats-bar {
    background: var(--off-white);
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
}

/* ═══════════════════════════════════════════
   CLUB STRIP — bandeau "أوصِ بها في النادي"
   ═══════════════════════════════════════════ */
.rv-club-strip {
    background: linear-gradient(135deg, #1a0533 0%, #2D0052 55%, #003D33 100%);
    padding: 16px 0;
    direction: rtl;
    position: relative;
    overflow: hidden;
}
.rv-club-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.rv-club-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.rv-club-strip-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 200px;
}
.rv-club-strip-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(240,208,96,.2);
    border: 1px solid rgba(240,208,96,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #f0d060;
    flex-shrink: 0;
}
.rv-club-strip-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rv-club-strip-text strong {
    font-size: .9rem;
    font-weight: 800;
    color: #fff;
}
.rv-club-strip-text span {
    font-size: .76rem;
    color: rgba(255,255,255,.65);
    line-height: 1.4;
}
.rv-club-strip-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.rv-club-strip-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    background: linear-gradient(135deg, #f0d060, #D4AF37);
    color: #1a1a1a;
    font-size: .84rem;
    font-weight: 800;
    border-radius: 30px;
    text-decoration: none;
    white-space: nowrap;
    transition: all .2s ease;
    box-shadow: 0 3px 14px rgba(212,175,55,.4);
}
.rv-club-strip-btn:hover {
    background: linear-gradient(135deg, #D4AF37, #c49b20);
    box-shadow: 0 5px 20px rgba(212,175,55,.6);
    transform: translateY(-1px);
    color: #1a1a1a;
}
.rv-club-strip-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: rgba(255,255,255,.6);
    text-decoration: none;
    transition: color .2s;
    white-space: nowrap;
}
.rv-club-strip-link:hover {
    color: rgba(255,255,255,.9);
}
@media (max-width: 600px) {
    .rv-club-strip-inner { flex-direction: column; align-items: flex-start; }
    .rv-club-strip-actions { width: 100%; }
    .rv-club-strip-btn { flex: 1; justify-content: center; }
}
.rv-stats-inner {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}
.rv-stat-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 10px 16px;
    border-left: 1px solid var(--border);
}
.rv-stat-item:last-child { border-left: none; }
.rv-stat-num {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--tp-green);
    display: block;
    line-height: 1.1;
}
.rv-stat-label {
    font-size: .72rem;
    color: var(--text-light);
    font-weight: 600;
    margin-top: 2px;
}

/* ── Layout principal ── */
.rv-main {
    padding: 36px 0 60px;
}
.rv-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: start;
}

/* ── Sidebar ── */
.rv-sidebar {
    position: sticky;
    top: 130px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Panel résumé note */
.rv-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.rv-panel-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--tp-green);
    display: flex;
    align-items: center;
    gap: 8px;
}
.rv-panel-title i { color: var(--tp-green); }

/* Distribution des étoiles */
.rv-dist-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    border-radius: 6px;
    padding: 3px 4px;
    transition: background .15s;
}
.rv-dist-row:hover { background: var(--off-white); }
.rv-dist-row.active { background: var(--tp-green-light); }
.rv-dist-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-light);
    width: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 3px;
}
.rv-dist-label i { color: #f5c518; font-size: .7rem; }
.rv-dist-track {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.rv-dist-fill {
    height: 100%;
    background: var(--tp-green);
    border-radius: 4px;
    transition: width .6s ease;
}
.rv-dist-count {
    font-size: .75rem;
    color: var(--text-light);
    width: 26px;
    text-align: left;
    flex-shrink: 0;
}

/* Critères détaillés */
.rv-crit-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: .82rem;
}
.rv-crit-label {
    width: 80px;
    flex-shrink: 0;
    color: var(--text-light);
    font-weight: 600;
}
.rv-crit-track {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.rv-crit-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--tp-green), #73cf11);
    transition: width .6s ease;
}
.rv-crit-val {
    font-size: .8rem;
    font-weight: 800;
    color: var(--text);
    width: 28px;
    text-align: left;
}

/* Bouton ajouter avis (sidebar) */
.rv-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--tp-green), var(--tp-green-dark));
    color: #fff;
    border: none;
    border-radius: var(--card-radius);
    padding: 16px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--trans);
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,182,122,.25);
}
.rv-add-btn:hover {
    background: linear-gradient(135deg, var(--tp-green-dark), #006044);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,182,122,.35);
}

/* ── Liste des avis ── */
.rv-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.rv-list-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.rv-list-badge {
    background: var(--tp-green);
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 50px;
}
.rv-sort-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'Tajawal', sans-serif;
    font-size: .85rem;
    color: var(--text);
    background: #fff;
    cursor: pointer;
    outline: none;
}

/* ── Carte d'avis ── */
.rv-review-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 22px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: box-shadow .2s, transform .2s;
    position: relative;
    overflow: hidden;
}
.rv-review-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 4px;
    height: 100%;
    background: var(--tp-green);
    opacity: 0;
    transition: opacity .2s;
}
.rv-review-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    transform: translateY(-1px);
}
.rv-review-card:hover::before { opacity: 1; }

/* Score bandeau coloré */
.rv-card-score-band {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.rv-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 900;
    font-family: 'Tajawal', sans-serif;
    color: #fff;
    flex-shrink: 0;
}
.rv-score-date {
    font-size: .75rem;
    color: var(--text-light);
}
.rv-card-stars {
    display: flex;
    gap: 3px;
    margin-right: auto;
}
.rv-card-stars .tp-star {
    width: 22px;
    height: 22px;
    font-size: .6rem;
    border-radius: 3px;
}

/* Corps de l'avis */
.rv-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.rv-card-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}
.rv-card-info { flex: 1; }
.rv-card-name {
    font-size: .95rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 2px;
}
.rv-card-meta {
    font-size: .75rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}
.rv-card-meta i { font-size: .68rem; }

.rv-card-text {
    font-size: .9rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 12px;
}

.rv-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e8f8f2;
    color: var(--tp-green);
    font-size: .72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 50px;
    border: 1px solid rgba(0,182,122,.2);
}

/* ── Pagination ── */
.rv-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}
.rv-page-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: .88rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: var(--trans);
    display: flex;
    align-items: center;
    justify-content: center;
}
.rv-page-btn:hover,
.rv-page-btn.active {
    background: var(--tp-green);
    border-color: var(--tp-green);
    color: #fff;
}
.rv-page-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

/* ── Empty state ── */
.rv-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}
.rv-empty i {
    font-size: 3.5rem;
    margin-bottom: 14px;
    display: block;
    opacity: .3;
}
.rv-empty h3 { font-size: 1.1rem; margin-bottom: 8px; }

/* ── Titre de l'avis ── */
.rv-card-title {
    font-size: .92rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.4;
}

/* ── Badge utilisateur (vs badge "موثق") ── */
.rv-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff8e1;
    color: #e65100;
    font-size: .72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 50px;
    border: 1px solid rgba(230,81,0,.2);
}

/* ── Badge recommandation ── */
.rv-rec-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 50px;
    flex-shrink: 0;
}
.rv-rec-badge.rv-rec-yes {
    background: #e8f8f2;
    color: var(--tp-green);
    border: 1px solid rgba(0,182,122,.2);
}
.rv-rec-badge.rv-rec-no {
    background: #fff0f0;
    color: #c62828;
    border: 1px solid rgba(198,40,40,.2);
}

/* ── Carte utilisateur (bordure distincte) ── */
.rv-user-card {
    border-color: rgba(255,160,0,.3);
    background: #fffef8;
}
.rv-user-card::before {
    background: #ff9800;
}

/* ── Loading skeleton ── */
.rv-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: rv-shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes rv-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.rv-skeleton-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 22px;
    margin-bottom: 14px;
}
.rv-sk-line { height: 14px; margin-bottom: 10px; }
.rv-sk-line.short { width: 40%; }
.rv-sk-line.medium { width: 65%; }
.rv-sk-line.long { width: 90%; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .rv-layout {
        grid-template-columns: 280px 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .rv-hero { padding: 24px 0 20px; }
    .rv-hero-inner { gap: 14px; }
    .rv-entity-photo,
    .rv-entity-avatar { width: 62px; height: 62px; border-radius: 10px; font-size: 1.2rem; }
    .rv-entity-name { font-size: 1.2rem; }
    .rv-hero-score {
        padding: 14px 20px;
        flex-direction: row;
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        text-align: right;
    }
    .rv-hero-score-left { text-align: center; }
    .rv-score-big { font-size: 2.8rem; }
    .rv-hero-stars .tp-star { width: 26px; height: 26px; font-size: .75rem; }

    .rv-stats-inner { gap: 0; }
    .rv-stat-item { min-width: calc(50% - 1px); padding: 10px 12px; }

    .rv-layout {
        grid-template-columns: 1fr;
    }
    .rv-sidebar {
        position: static;
        order: -1;
    }
    .rv-panel { padding: 16px; }

    .rv-back-bar { top: 62px; margin-top: 62px; }

    .rv-review-card { padding: 16px; }
    .rv-score-badge { font-size: .9rem; padding: 4px 10px; }
    .rv-card-avatar { width: 40px; height: 40px; font-size: .8rem; }
    .rv-card-name { font-size: .88rem; }
    .rv-card-text { font-size: .85rem; }
}

@media (max-width: 480px) {
    .rv-entity-name { font-size: 1.05rem; }
    .rv-score-big { font-size: 2.4rem; }
    .rv-hero-stars .tp-star { width: 22px; height: 22px; font-size: .64rem; }
    .rv-stat-item { min-width: 50%; }
    .rv-stat-num { font-size: 1.2rem; }
    .rv-card-score-band { flex-wrap: wrap; gap: 6px; }
    .rv-card-stars { margin-right: 0; }
    .rv-list-header { flex-direction: column; align-items: flex-start; }
    .rv-sort-select { width: 100%; }
}
