/* Stand Reviews - Styles globaux */
:root {
    --sdr-star-color: #f8c200;
    --sdr-btn-color: #e30613;
    --sdr-btn-color-dark: #b5040e;
}

/* ═══ LAYOUT AVIS ═══ */
.sdr-reviews-wrap { padding: 20px 0; }

.sdr-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.sdr-sidebar {
    flex: 0 0 220px;
    min-width: 180px;
}

.sdr-main { flex: 1; min-width: 0; }

/* ═══ CARTE RÉSUMÉ ═══ */
.sdr-summary-card {
    background: #f9f9f9;
    border: 1px solid #e8e8ed;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    margin-bottom: 12px;
}

.sdr-big-score {
    font-size: 2.4rem;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1;
}
.sdr-big-label { font-size: 1rem; color: #7a7a7a; }

.sdr-summary-count { font-size: .82rem; color: #6e6e82; margin-top: 6px; }

/* ═══ DISTRIBUTION ═══ */
.sdr-distribution { margin-top: 12px; }
.sdr-dist-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    background: none;
    border: none;
    padding: 3px 4px;
    cursor: pointer;
    border-radius: 4px;
    font-size: .78rem;
    transition: background .15s;
}
.sdr-dist-row:hover, .sdr-dist-row.active { background: #f0f0f5; }
.sdr-dist-label { min-width: 28px; color: #555; }
.sdr-dist-bar {
    flex: 1;
    height: 6px;
    background: #e8e8ed;
    border-radius: 3px;
    overflow: hidden;
}
.sdr-dist-fill {
    display: block;
    height: 100%;
    background: var(--sdr-star-color, #f8c200);
    border-radius: 3px;
    transition: width .3s;
}
.sdr-dist-count { min-width: 20px; text-align: right; color: #7a7a7a; }

/* ═══ BOUTONS ═══ */
.sdr-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 5px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .15s;
    text-decoration: none;
}
.sdr-btn-primary {
    background: var(--sdr-btn-color, #e30613);
    color: #fff;
    width: 100%;
    justify-content: center;
}
.sdr-btn-primary:hover {
    background: var(--sdr-btn-color-dark, #b5040e);
    color: #fff;
}
.sdr-btn-secondary {
    background: #f5f5f7;
    color: #333;
    border: 1px solid #ddd;
}
.sdr-btn-outline {
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
}
.sdr-btn-write { margin-top: 10px; }

/* ═══ TOOLBAR ═══ */
.sdr-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: none !important;
}
.sdr-sort label { font-size: .82rem; color: #6e6e82; margin-right: 4px; }
.sdr-sort select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: .82rem;
}
.sdr-filter-chip {
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font-size: .78rem;
    cursor: pointer;
    transition: all .15s;
}
.sdr-filter-chip.active {
    background: var(--sdr-btn-color, #e30613);
    color: #fff;
    border-color: var(--sdr-btn-color, #e30613);
}

/* ═══ CARTES AVIS ═══ */
.sdr-review-card {
    border-bottom: 1px solid #f0f0f5;
    padding: 16px 0;
}
.sdr-review-card:last-child { border-bottom: none; }

.sdr-review-header { margin-bottom: 6px; }
.sdr-review-score { font-size: .8rem; color: #6e6e82; margin-left: 6px; }
.sdr-review-card h4.sdr-review-title,
h4.sdr-review-title,
.sdr-review-title {
    font-size: .95rem !important;
    font-weight: 700 !important;
    margin: 4px 0 8px 0 !important;
    color: #444444 !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-family: inherit !important;
}
.sdr-review-content {
    font-size: .88rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* ═══ IMAGES AVIS ═══ */
.sdr-review-images { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sdr-review-img-link img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: opacity .2s;
}
.sdr-review-img-link img:hover { opacity: .85; }

/* ═══ FOOTER AVIS ═══ */
.sdr-review-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.sdr-review-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: .78rem;
    color: #6e6e82;
}
.sdr-review-author { font-weight: 600; color: #333; }
.sdr-sep { color: #ccc; }
.sdr-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: .7rem;
}
.sdr-badge-verified { background: #e8f5e9; color: #2e7d32; }

.sdr-review-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
}
.sdr-helpful-label { color: #9e9e9e; }
.sdr-btn-vote, .sdr-btn-report {
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    font-size: .78rem;
    cursor: pointer;
    transition: all .15s;
}
.sdr-btn-vote:hover { background: #f5f5f5; }
.sdr-btn-vote.voted { background: #e8f5e9; color: #2e7d32; }
.sdr-btn-report { color: #9e9e9e; }
.sdr-btn-report:hover { color: #e53935; }

/* ═══ RÉPONSE MARCHAND ═══ */
.sdr-merchant-reply {
    background: #f0f4ff;
    border-left: 3px solid var(--sdr-btn-color, #e30613);
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    margin-top: 10px;
    font-size: .82rem;
}
.sdr-merchant-badge { font-weight: 700; margin-bottom: 4px; color: #333; }
.sdr-merchant-reply p { margin: 0; color: #444; line-height: 1.5; }

/* ═══ LOAD MORE ═══ */
.sdr-load-more { text-align: center; padding: 20px 0; }

/* ═══ ÉTAT VIDE ═══ */
.sdr-empty-state { text-align: center; padding: 40px 20px; }
.sdr-empty-state p { color: #888; font-size: .9rem; margin-bottom: 8px; }

/* ═══ MODAL ═══ */
.sdr-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sdr-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.5);
}
.sdr-modal-content {
    position: relative;
    background: #fff;
    border-radius: 10px;
    padding: 28px;
    max-width: 560px;
    width: 94%;
    max-height: 88vh;
    overflow-y: auto;
    z-index: 1;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.sdr-modal-close {
    position: absolute;
    top: 12px; right: 14px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
}
.sdr-modal-content h3 { margin: 0 0 18px 0; font-size: 1.1rem; }

/* ═══ FORMULAIRE ═══ */
.sdr-form-group { margin-bottom: 14px; }
.sdr-form-label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 5px; color: #333; }
.sdr-form-group input[type="text"],
.sdr-form-group textarea,
.sdr-form-group select {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px 10px;
    font-size: .88rem;
    font-family: inherit;
    box-sizing: border-box;
}
.sdr-form-group textarea { resize: vertical; min-height: 100px; }

.sdr-star-rating-input { display: inline-flex; gap: 4px; }
.sdr-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
}
.sdr-star-btn svg { fill: #ddd; transition: fill .15s; }
.sdr-star-btn.active svg { fill: var(--sdr-star-color, #f8c200); }

.sdr-upload-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sdr-upload-preview img { width: 70px; height: 70px; object-fit: cover; border-radius: 5px; border: 1px solid #ddd; }

.sdr-form-consent { font-size: .82rem; color: #555; }
.sdr-form-actions { text-align: right; margin-top: 16px; }

.sdr-form-message {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 5px;
    font-size: .85rem;
}
.sdr-form-message.success { background: #e8f5e9; color: #2e7d32; }
.sdr-form-message.error { background: #ffebee; color: #c62828; }

.sdr-alert { background: #fff3e0; color: #e65100; padding: 12px; border-radius: 5px; margin-bottom: 12px; font-size: .88rem; }
.sdr-alert a { color: #e65100; font-weight: 700; }

/* ═══ ÉTOILES MINI (listings) ═══ */
.sdr-list-rating { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; text-decoration: none; }
.sdr-list-count { font-size: .75rem; color: #7a7a7a; margin-left: 4px; }

/* ═══ LIGHTBOX ═══ */
.sdr-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.sdr-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 4px; }

/* ═══ SPINNER ═══ */
.sdr-spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sdr-spin .6s linear infinite;
}
@keyframes sdr-spin { to { transform: rotate(360deg); } }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 700px) {
    .sdr-layout { flex-direction: column; }
    .sdr-sidebar { flex: none; width: 100%; }
    .sdr-review-footer { flex-direction: column; align-items: flex-start; }
}
