/* ═══════════════════════════════════════════════
   Avis Clients Pro — Front (fiche produit, dépôt d'avis, compte client)
   @author captainlinux.io
═══════════════════════════════════════════════ */
.pr-block { --pr-yellow: #ffc107; --pr-star: #f5a623; --pr-text: #1a1a1a; --pr-muted: #6b7280; --pr-border: #ececec;
  margin: 30px 0; color: var(--pr-text); font-size: 14px; clear: both; }
.pr-block .pr-star { color: #d1d5db; }
.pr-block .pr-star--full { color: var(--pr-star); }
.pr-block .pr-star--half { background: linear-gradient(90deg, var(--pr-star) 50%, #d1d5db 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Résumé : bloc note moderne + barres ── */
.pr-summary { display: flex; gap: 32px; align-items: center; margin-bottom: 28px; background: #fafbfc; border: 1px solid #f0f2f5; border-radius: 12px; padding: 20px 24px; }
.pr-score-box { background: #fff; border: 1px solid #eef0f3; border-radius: 12px; width: 130px; padding: 14px 10px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: #1a1a1a; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.pr-score-value { font-size: 34px; font-weight: 800; line-height: 1; color: #111827; }
.pr-score-stars { font-size: 15px; letter-spacing: 2px; margin: 6px 0 4px; }
.pr-score-stars .pr-star--full { color: #f59e0b; }
.pr-score-stars .pr-star--half { background: linear-gradient(90deg, #f59e0b 50%, #e5e7eb 50%); -webkit-background-clip: text; background-clip: text; }
.pr-score-stars .pr-star--empty { color: #e5e7eb; }
.pr-score-count { font-size: 11px; font-weight: 600; color: #6b7280; }
.pr-bars { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pr-bar-row { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #4b5563 !important; text-decoration: none !important; border-radius: 4px; }
.pr-bar-row:hover .pr-bar-track, .pr-bar-row.is-active .pr-bar-track { box-shadow: 0 0 0 2px rgba(245,158,11,.35); }
.pr-bar-label { width: 30px; flex-shrink: 0; font-weight: 600; color: #374151; }
.pr-bar-label .pr-star { font-size: 11px; color: #f59e0b; }
.pr-bar-track { flex: 1; height: 8px; background: #e5e7eb; border-radius: 8px; overflow: hidden; }
.pr-bar-fill { display: block; height: 100%; background: #f59e0b; border-radius: 8px; min-width: 0; }
.pr-bar-pct { width: 38px; text-align: right; flex-shrink: 0; font-weight: 500; font-size: 11px; color: #9ca3af; }

/* ── Liste ── */
.pr-heading { font-size: 17px; font-weight: 700; margin: 0 0 16px; color: #111827; }
.pr-list { display: flex; flex-direction: column; gap: 14px; transition: opacity .2s; }
.pr-list.is-loading { opacity: .4; }
.pr-review { display: flex; gap: 14px; background: #fff; border: 1px solid #eef0f3; border-radius: 12px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.02); }
.pr-review-body { flex: 1; min-width: 0; }
.pr-review-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.pr-review-author { font-weight: 700; font-size: 14px; color: #111827; }
.pr-review-meta { display: flex; align-items: center; gap: 8px; }
.pr-review-date { font-size: 12px; color: #9ca3af; }
.pr-verified { background: #ecfdf5; color: #059669; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.pr-review-stars { font-size: 14px; letter-spacing: 1.5px; margin-bottom: 8px; }
.pr-review-stars .pr-star--full { color: #f59e0b; }
.pr-review-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; color: #111827; }
.pr-review-text { margin: 0; font-size: 13.5px; line-height: 1.6; color: #374151; word-wrap: break-word; }
.pr-photos { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pr-photo { display: block; width: 64px; height: 64px; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; transition: transform .15s; }
.pr-photo:hover { transform: scale(1.04); }
.pr-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pr-photo:focus-visible { outline: 2px solid #f59e0b; outline-offset: 2px; }

/* ── Réponse boutique (style soigné et discret) ── */
.pr-response { background: #f8fafc; border-left: 3px solid #3b82f6; border-radius: 0 8px 8px 0; padding: 12px 16px; margin-top: 14px; }
.pr-response-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pr-response-avatar { width: 22px; height: 22px; border-radius: 50%; }
.pr-response-author { color: #1e40af; font-weight: 700; font-size: 12px; }
.pr-response-text { color: #334155; font-size: 13px; margin: 0; line-height: 1.55; }

.pr-empty { color: var(--pr-muted); padding: 12px 0; }
.pr-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pr-page { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--pr-border);
  border-radius: 8px; color: var(--pr-text) !important; text-decoration: none !important; font-weight: 600; font-size: 13px; }
.pr-page.is-active, .pr-page:hover { background: #f59e0b; border-color: #f59e0b; color: #fff !important; }

/* ── Lightbox ── */
.pr-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 100000; display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.pr-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.pr-lightbox button { position: absolute; top: 16px; right: 20px; background: none; border: 0; color: #fff; font-size: 34px; cursor: pointer; }

/* ── Page de dépôt d'avis ── */
.pr-form-page { max-width: 860px; margin: 0 auto; }
.pr-form-intro { margin-bottom: 20px; color: var(--pr-muted, #6b7280); }
.pr-order-summary { background: #f9fafb; border: 1px solid #ececec; border-radius: 12px; padding: 16px; margin-bottom: 18px; }
.pr-order-summary ul { margin: 8px 0 0; padding-left: 18px; }
.pr-product-card { background: #fff; border: 1px solid #ececec; border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.pr-product-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.pr-product-head img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid #ececec; }
.pr-product-name { font-weight: 700; font-size: 15px; }
.pr-product-attr { color: #6b7280; font-size: 12px; }
.pr-state { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 10px; }
.pr-state--todo { background: #fff7e0; color: #a16207; }
.pr-state--pending { background: #e0ecff; color: #1e40af; }
.pr-state--approved { background: #e8f8ef; color: #15803d; }
.pr-state--rejected { background: #fee2e2; color: #b91c1c; }
.pr-field { margin-bottom: 12px; }
.pr-field label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 13px; }
.pr-field input[type=text], .pr-field textarea { width: 100%; border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 9px 12px; font-size: 14px; }
.pr-field input[type=text]:focus, .pr-field textarea:focus { border-color: #ffc107; outline: none; box-shadow: 0 0 0 3px rgba(255,193,7,.2); }
.pr-rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.pr-rating-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pr-rating-input label { font-size: 30px; color: #d1d5db; cursor: pointer; margin: 0; line-height: 1; transition: color .1s; }
.pr-rating-input input:checked ~ label, .pr-rating-input label:hover, .pr-rating-input label:hover ~ label { color: #f5a623; }
.pr-rating-input input:focus-visible + label { outline: 2px solid #ffc107; border-radius: 4px; }
.pr-photo-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pr-photo-previews img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid #e5e7eb; }
.pr-submit { background: #1a1a1a; color: #fff; border: 0; border-radius: 8px; padding: 10px 22px; font-weight: 700; cursor: pointer; }
.pr-submit:hover { background: #000; }
.pr-alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.pr-alert--ok { background: #e8f8ef; color: #15803d; }
.pr-alert--error { background: #fee2e2; color: #b91c1c; }
.pr-table { width: 100%; border-collapse: collapse; }
.pr-table th, .pr-table td { padding: 10px; border-bottom: 1px solid #ececec; text-align: left; }

@media (max-width: 640px) {
  .pr-summary { flex-direction: column; align-items: stretch; gap: 18px; }
  .pr-score-box { width: 100%; height: 110px; }
  .pr-review { padding: 12px; gap: 10px; }
}

/* ── Étoiles et avis sur les vignettes produits (listes / catégories / accueil) ── */
.pr-list-rating { display: inline-flex; align-items: center; justify-content: center; gap: 7px; margin: 6px 0 8px; font-size: 14px; line-height: 1; vertical-align: middle; }
.pr-list-stars { display: inline-flex; gap: 2px; font-size: 16px; letter-spacing: 0.5px; }
.pr-list-stars .pr-star { color: #d1d5db; line-height: 1; }
.pr-list-stars .pr-star--full { color: #f59e0b; }
.pr-list-stars .pr-star--half { background: linear-gradient(90deg, #f59e0b 50%, #d1d5db 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pr-list-score { font-weight: 700; color: #111827; font-size: 14px; margin-left: 2px; }
.pr-list-count { color: #4b5563; font-size: 13px; font-weight: 600; }
