/* ──────────────────────────────────────────────────────────────────────
 * Avis produit — distribution, formulaire, étoiles près du H1.
 * Le tab "Avis" lui-même est stylé par product-tabs.src.css (.reviews-summary,
 * .review-item, .review-stars). Ce fichier ajoute la couche multi-tenant :
 * distribution, formulaire, hints, et le mini-rating à côté du H1.
 * ────────────────────────────────────────────────────────────────────── */

/* ─── Mini-rating à côté du H1 ──────────────────────────────────────── */
.product-h1-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 1rem;
  padding: 4px 10px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 18px;
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  text-decoration: none;
  color: #1a1a1a;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.product-h1-rating:hover {
  background: #f3eee0;
  border-color: #d4af37;
}
.product-h1-rating-stars { display: inline-flex; gap: 2px; line-height: 1; }
.h1-star { font-size: 1rem; line-height: 1; }
.h1-star-filled { color: #d4af37; }
.h1-star-empty  { color: #d1d5db; }
.product-h1-rating-value {
  font-weight: 700;
  color: #1a1a1a;
  font-size: 0.9rem;
}
.product-h1-rating-count {
  color: #6b7280;
  font-size: 0.8rem;
}

/* ─── Distribution des notes ────────────────────────────────────────── */
.reviews-distribution {
  max-width: 420px;
  margin: 1rem auto 2rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.reviews-distribution-row {
  display: grid;
  grid-template-columns: 40px 1fr 32px;
  align-items: center;
  gap: 10px;
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  color: #4b5563;
}
.reviews-distribution-label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
  color: #1a1a1a;
}
.star-tiny {
  color: #d4af37;
  font-size: 0.85em;
  line-height: 1;
}
.reviews-distribution-bar {
  position: relative;
  width: 100%;
  height: 8px;
  background: #f1f1f1;
  border-radius: 4px;
  overflow: hidden;
}
.reviews-distribution-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #e0c068, #d4af37);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.reviews-distribution-count {
  text-align: right;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

/* ─── Avis individuels — extensions ─────────────────────────────────── */
.review-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #fff;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.review-verified {
  display: inline-block;
  padding: 2px 8px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.review-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  margin: 0.4rem 0 0.3rem;
  color: #1a1a1a;
}

/* ─── Bouton "Charger plus" ─────────────────────────────────────────── */
.reviews-load-more {
  display: block;
  margin: 1.5rem auto 0;
  padding: 10px 24px;
  background: transparent;
  color: #1a1a1a;
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.reviews-load-more:hover:not(:disabled) {
  background: #1a1a1a;
  color: #d4af37;
}
.reviews-load-more:disabled { opacity: 0.6; cursor: not-allowed; }

/* ─── Formulaire de dépôt ───────────────────────────────────────────── */
.reviews-form {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 8px;
}
.reviews-form-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  margin: 0 0 1rem;
  color: #1a1a1a;
  text-align: center;
  letter-spacing: 0.04em;
}
.reviews-form-rating {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 0 0 1rem;
}
.reviews-form-rating .star-btn {
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: #d1d5db;
  cursor: pointer;
  padding: 4px 6px;
  transition: color 0.1s ease, transform 0.1s ease;
}
.reviews-form-rating .star-btn:hover,
.reviews-form-rating .star-btn.active {
  color: #d4af37;
  transform: scale(1.1);
}
.reviews-form-label {
  display: block;
  margin: 0 0 0.8rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a1a;
}
.reviews-form-optional {
  font-weight: 400;
  color: #6b7280;
  font-size: 0.8rem;
}
.reviews-form-input,
.reviews-form-textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: #1a1a1a;
  background: #fff;
  box-sizing: border-box;
}
.reviews-form-input:focus,
.reviews-form-textarea:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}
.reviews-form-textarea { resize: vertical; min-height: 90px; }
.reviews-form-submit {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 12px 24px;
  background: #1a1a1a;
  color: #d4af37;
  border: none;
  border-radius: 4px;
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background 0.15s ease;
}
.reviews-form-submit:hover:not(:disabled) { background: #2d2d2d; }
.reviews-form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.reviews-form-msg {
  margin: 0.8rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  min-height: 1.2em;
}
.reviews-form-msg.success { color: #047857; font-weight: 600; }
.reviews-form-msg.error   { color: #dc2626; font-weight: 600; }

/* ─── Hint connexion ────────────────────────────────────────────────── */
.reviews-login-hint {
  margin-top: 1.5rem;
  padding: 0.8rem 1rem;
  background: #faf8f5;
  border: 1px dashed #e8e0d4;
  border-radius: 4px;
  text-align: center;
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  color: #6b7280;
}

@media (max-width: 640px) {
  .reviews-distribution { max-width: 100%; }
  .reviews-form { padding: 1rem; }
  .reviews-form-rating .star-btn { font-size: 1.7rem; padding: 2px 4px; }
}
