/* === product-reviews.css === */
/* ---------------------------------------------------------------------------
   Product page: rating link under the title and the "Avis clients" section.
   Served as the `css.productReviews` bundle. Replaces public/css/reviews.css,
   whose review form no longer exists (reviews come from the /avis/ link).
   --------------------------------------------------------------------------- */

:root {
  --pr-star: #f5a623;
  --pr-star-off: #d9dce1;
  --pr-ink: #1f2933;
  --pr-muted: #6b7280;
  --pr-line: #e6e8eb;
  --pr-surface: #fff;
  --pr-navy: #002b58;
  --pr-verified: #137a3a;
  --pr-verified-bg: #e8f5ec;
}

/* Stars: a grey row of five with a gold copy on top, clipped to a width.
   One element shows any average (4.3 = 86%) without per-star markup. */
.pr-stars {
  position: relative;
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 2px;
  color: var(--pr-star-off);
  white-space: nowrap;
  vertical-align: middle;
}
.pr-stars::before {
  content: '★★★★★';
}
.pr-stars > span {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  overflow: hidden;
  color: var(--pr-star);
}
.pr-stars > span::before {
  content: '★★★★★';
}
.pr-stars--lg {
  font-size: 22px;
}

/* Under the product title */
/* Under the product title. The h1 keeps its 25px bottom margin otherwise,
   which left the stars floating halfway to the price. */
h1.pr-title-rated {
  margin-bottom: 6px;
}
.pr-rating-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 10px;
  font-size: 14px;
  color: var(--pr-ink);
  text-decoration: none;
}
.pr-rating-link__score {
  font-weight: 600;
}
.pr-rating-link__count {
  color: var(--pr-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pr-rating-link:hover .pr-rating-link__count {
  text-decoration-thickness: 2px;
}

/* Section */
.pr-reviews {
  margin-top: 24px;
  scroll-margin-top: 90px; /* the sticky header covers the anchor otherwise */
}
.pr-reviews h2 {
  margin-bottom: 16px;
}

.pr-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 360px);
  justify-content: start;
  gap: 16px 56px;
  align-items: center;
  padding: 20px 24px;
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: 12px;
}
.pr-summary__value {
  margin: 0 0 4px;
  color: var(--pr-muted);
  font-size: 14px;
}
.pr-summary__value strong {
  color: var(--pr-ink);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.pr-summary__count {
  margin: 6px 0 0;
  color: var(--pr-muted);
  font-size: 14px;
}

.pr-split {
  margin: 0;
  padding: 0;
  list-style: none;
}
.pr-split li {
  display: grid;
  grid-template-columns: 70px 1fr 24px;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 3px 0;
  font-size: 13px;
  color: var(--pr-muted);
  list-style: none;
}
.pr-split__bar {
  height: 8px;
  border-radius: 4px;
  background: var(--pr-line);
  overflow: hidden;
}
.pr-split__bar > span {
  display: block;
  height: 100%;
  background: var(--pr-star);
}
.pr-split__count {
  text-align: end;
}

.pr-review-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.pr-review {
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--pr-line);
  list-style: none;
}
.pr-review:last-child {
  border-bottom: 0;
}
.pr-review__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 6px;
}
.pr-review__name {
  font-weight: 600;
  color: var(--pr-ink);
}
.pr-review__verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pr-verified-bg);
  color: var(--pr-verified);
  font-size: 12px;
  font-weight: 600;
}
.pr-review__date {
  color: var(--pr-muted);
  font-size: 13px;
}
.pr-review__date::before {
  content: '·';
  margin-inline-end: 10px;
}
.pr-review__comment {
  margin: 8px 0 0;
  color: var(--pr-ink);
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.pr-review__images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.pr-review__images img {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--pr-line);
}

@media (max-width: 600px) {
  .pr-summary {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .pr-review__date {
    flex-basis: 100%;
    order: 3;
  }
  .pr-review__date::before {
    content: none;
  }
}
