/* Customer reviews: honest empty state, then cards rendered by js/reviews.mjs.
   Sizes come from the --fs-* tokens of typography.css, like the rest of the page. */
.reviews-empty {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 32px;
  background: #f4f6f7;
  border: 1px solid #e4e6e8;
  border-radius: 8px;
}
.reviews-empty h3 {
  margin: 0 0 10px;
  font-size: var(--fs-card);
  line-height: 1.2;
  letter-spacing: -.025em;
}
.reviews-empty p {
  margin: 0;
  max-width: 560px;
  font-size: var(--fs-small);
  line-height: 1.5;
}
.reviews-principles {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: #52616c;
}
.reviews-principles li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 12px;
  margin-right: 12px;
  background: var(--orange);
  transform: skew(-24deg);
}
.reviews-cta { display: grid; gap: 14px; justify-items: start; }
.reviews-cta span { font-size: var(--fs-small); line-height: 1.5; font-weight: 700; }
.reviews-cta .outline-action { padding: 13px 18px; }

.reviews-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.reviews-list article {
  height: 100%;
  padding: 18px;
  background: #fff;
  border: 1px solid #e2e6e9;
  border-radius: 8px;
}
.reviews-list header { display: grid; gap: 4px; margin-bottom: 10px; }
.reviews-list b { font-size: var(--fs-body); line-height: 1.4; }
.reviews-list small { font-size: var(--fs-meta); line-height: 1.5; color: #5f6c74; }
.reviews-list p { margin: 0; font-size: var(--fs-small); line-height: 1.55; }

@media (max-width: 1150px) {
  .reviews-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .reviews-empty { grid-template-columns: 1fr; gap: 24px; }
  .reviews-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .reviews-empty { padding: 22px 18px; }
  .reviews-breakdown { gap: 22px; padding: 18px; }
  .reviews-list { grid-template-columns: 1fr; }
}

/* Rating breakdown in the section head: average, stars and count on the left,
   one bar per rating on the right (js/reviews.mjs, renderSummary). */
.reviews-breakdown {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  width: min(100%, 620px);
  padding: 22px 28px;
  background: #fff;
  border: 1px solid #e2e6e9;
  border-radius: 8px;
}
.reviews-breakdown-score { display: grid; justify-items: center; gap: 8px; text-align: center; }
.reviews-breakdown-score strong { font: 800 var(--fs-display)/1 var(--font-display); letter-spacing: -.035em; color: #18232c; }
.reviews-breakdown-score span:last-child { font-size: var(--fs-small); line-height: 1.4; color: #5f6c74; }
.reviews-breakdown-rows { display: grid; gap: 10px; }
.reviews-breakdown-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  font-size: var(--fs-meta);
  line-height: 1.3;
  color: #3b464e;
}
.reviews-breakdown-row > span:nth-child(2) { color: #5f6c74; }
.reviews-breakdown-bar { grid-column: 1 / -1; height: 8px; overflow: hidden; background: #e8ecef; border-radius: 4px; }
.reviews-breakdown-bar > span { display: block; height: 100%; background: var(--orange); border-radius: inherit; }

/* Review details and footer. */
.reviews-list .rating-stars svg { width: 16px; height: 16px; }
/* Long review texts stop at 4 lines; .reviews-expand (js/reviews.mjs) shows the whole text. */
.reviews-list p.reviews-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}
.reviews-list article.is-expanded p.reviews-text { display: block; -webkit-line-clamp: unset; line-clamp: none; }
.reviews-expand {
  margin-top: 8px;
  padding: 0;
  background: none;
  border: 0;
  color: #6b747a;
  font-size: var(--fs-small);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.reviews-expand:hover { color: #18232c; }
.reviews-list p.reviews-no-text { font-style: italic; color: #6b747a; }
.reviews-list p.reviews-reply {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8ebee;
  font-size: var(--fs-meta);
  color: #52616c;
}
.reviews-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 24px; }
.reviews-footer .outline-action { padding: 13px 18px; background: #fff; color: #18232c; cursor: pointer; }

/* Review photos lead the card, edge to edge (each opens #reviewPhotoDialog).
   The photo block is always half as tall as the card is wide, whatever the photo count:
   1 photo fills it, 2 sit side by side, 3 put the first one on the left over two rows, 4 make a 2 x 2 grid.
   Delete button of reviews added in this browser follows. */
.reviews-list article.has-photos { overflow: hidden; }
.reviews-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 3px;
  aspect-ratio: 2 / 1;
  margin: -18px -18px 16px;
  background: #e2e6e9;
}
.reviews-photos[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.reviews-photos[data-count="3"],
.reviews-photos[data-count="4"] { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.reviews-photos[data-count="3"] button:first-child { grid-row: 1 / -1; }
.reviews-photos button {
  position: relative;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #eef1f3;
  border: 0;
  cursor: zoom-in;
}
.reviews-photos img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.reviews-photos button:hover img { transform: scale(1.04); }
.reviews-photos button:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.reviews-photo-count {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 9px;
  background: rgba(9, 16, 21, .78);
  border-radius: 999px;
  font-size: var(--fs-meta);
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}
.reviews-delete {
  margin-top: 14px;
  padding: 0;
  background: none;
  border: 0;
  color: #9a3412;
  font-size: var(--fs-meta);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* Toolbar above the cards: "Laisser un avis" on the left, sort selector aligned right. */
.reviews-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 22px; }
.reviews-open { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; background: #fff; color: #18232c; cursor: pointer; }
.reviews-open svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.reviews-open:hover { border-color: var(--orange); color: var(--orange); }
.reviews-sort { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-small); font-weight: 700; color: #3b464e; }
.reviews-sort select {
  min-height: 44px;
  padding: 0 40px 0 14px;
  border: 1px solid #cfd8de;
  border-radius: 7px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2318232c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  appearance: none;
  font: 600 var(--fs-small)/1.2 var(--font-body);
  color: #18232c;
  cursor: pointer;
}
.reviews-sort select:hover { border-color: #8e9aa3; }
.reviews-sort select:focus-visible { outline: 3px solid #ff9a62; outline-offset: 2px; }

/* The new review is briefly outlined after publishing (js/review-form.mjs). */
.reviews-list article { transition: box-shadow .4s, border-color .4s; }
.reviews-list article.is-new { border-color: var(--orange); box-shadow: 0 0 0 3px #ff640033, 0 14px 30px #0c111618; }

/* "Laisser un avis" dialog. */
.review-dialog { width: min(640px, calc(100% - 24px)); padding: 28px 30px 0; }
.review-form { display: grid; gap: 20px; }
.review-form .dialog-header { margin-bottom: 0; }
.review-required { color: var(--orange); }
.review-rating { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.review-rating legend, .review-label { padding: 0; font-size: var(--fs-small); font-weight: 700; color: #18232c; }
.review-rating legend { margin-bottom: 8px; }
.review-stars { display: flex; align-items: center; gap: 4px; width: max-content; border-radius: 8px; }
.review-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.review-stars label { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 8px; cursor: pointer; transition: transform .12s; }
.review-stars label:hover { transform: scale(1.08); }
.review-stars svg { width: 38px; height: 38px; fill: #dde2e6; transition: fill .12s; }
.review-stars label.is-on svg { fill: var(--orange); }
.review-stars input:focus-visible + label { outline: 3px solid #ff9a62; outline-offset: 1px; }
.review-stars[aria-invalid] svg { fill: #f3c9c4; }
.review-rating-word { font-size: var(--fs-small); font-weight: 600; color: #5f6c74; min-height: 1.5em; }
.review-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.review-field { position: relative; display: grid; align-content: start; gap: 8px; font-size: var(--fs-small); font-weight: 700; color: #18232c; }
.review-field small, .review-label small { font-size: var(--fs-meta); font-weight: 500; color: #6b747a; }
.review-field input, .review-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfd8de;
  border-radius: 7px;
  background: #fff;
  font: 400 var(--fs-body)/1.5 var(--font-body);
  color: #13202a;
  transition: border-color .15s, box-shadow .15s;
}
.review-field textarea { resize: vertical; min-height: 120px; }
.review-field input:focus, .review-field textarea:focus { outline: 0; border-color: var(--orange); box-shadow: 0 0 0 3px #ff640026; }
.review-field input[aria-invalid] { border-color: #c2410c; }
.review-counter { justify-self: end; margin-top: -2px; font-size: var(--fs-meta); font-weight: 500; color: #6b747a; }
.review-error { margin: 0; font-size: var(--fs-meta); font-weight: 600; line-height: 1.4; color: #b42318; }
.review-photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.review-photo-list { display: contents; }
.review-photo-list figure { position: relative; margin: 0; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: #eef1f3; }
.review-photo-list img { width: 100%; height: 100%; object-fit: cover; }
.review-photo-list button {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #091015d9;
  color: #fff;
  font-size: var(--fs-card);
  line-height: 1;
  cursor: pointer;
}
.review-photo-list button:hover { background: #b42318; }
.review-dropzone {
  grid-column: span 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: 120px;
  padding: 14px;
  border: 1.5px dashed #b8c3cb;
  border-radius: 8px;
  background: #f7f9fa;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.review-photo-list:empty + .review-dropzone { grid-column: 1 / -1; }
.review-dropzone:hover, .review-dropzone.is-over { border-color: var(--orange); background: #fff4ec; }
.review-dropzone:focus-within { outline: 3px solid #ff9a62; outline-offset: 2px; }
.review-dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.review-dropzone svg { width: 26px; height: 26px; fill: none; stroke: var(--orange); stroke-width: 1.7; stroke-linejoin: round; }
.review-dropzone b { font-size: var(--fs-small); color: #18232c; }
.review-dropzone span { font-size: var(--fs-meta); font-weight: 500; color: #6b747a; }
.review-local-note { margin: 0; font-size: var(--fs-meta); line-height: 1.5; color: #6b747a; }
.review-status { margin: 0; font-size: var(--fs-small); font-weight: 600; color: #b42318; }
.review-status:empty { display: none; }
.review-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 -30px;
  padding: 16px 30px 20px;
  background: #fff;
  border-top: 1px solid #e2e6e9;
}
.review-actions .outline-action { padding: 12px 18px; background: #fff; color: #18232c; cursor: pointer; }
.review-actions .orangebtn { min-width: 160px; padding: 0 22px; }

@media (max-width: 600px) {
  .reviews-toolbar > * { flex: 1 1 100%; }
  .reviews-open { justify-content: center; }
  .reviews-sort select { flex: 1; }
  .review-dialog { width: 100%; max-width: 100%; max-height: 100dvh; height: 100dvh; margin: 0; padding: 20px 18px 0; border-radius: 0; }
  .review-row { grid-template-columns: 1fr; }
  .review-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-stars label { width: 44px; height: 44px; }
  .review-actions { margin: 0 -18px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
  .review-actions > * { flex: 1; }
}
