/*
 * BAM 22/11/2026 — avis produits (productcomments 9 + surcharges themes/bam/modules/productcomments).
 * Chargée par catalog/product.tpl, juste avant la note affichée sous le titre.
 *
 * Étoiles : une seule technique, deux couches de 5 glyphes Font Awesome 6 (déjà chargé par le thème).
 * La couche du dessous est vide (border-soft), celle du dessus est pleine (orange) et rognée à
 * --bam-note (0 à 100 %), ce qui gère les demi-notes. L'ancien rendu superposait l'image du module et
 * l'icône du thème, d'où des étoiles « doublées ».
 * Couleurs : DESIGN.md (orange #e68a00 = non textuel, 2,53:1 suffit au 3:1 des icônes).
 */

.bam-stars {
  --bam-taille: 16px;
  position: relative;
  display: inline-block;
  flex: none;
  font-family: "Font Awesome 6 Free", "FontAwesome";
  font-weight: 900;
  font-style: normal;
  font-size: var(--bam-taille);
  line-height: 1;
  letter-spacing: 2px;
  white-space: nowrap;
  vertical-align: middle;
}
.bam-stars::before {
  content: "\f005\f005\f005\f005\f005";
  color: #e2d6ec;
}
.bam-stars::after {
  content: "\f005\f005\f005\f005\f005";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bam-note, 0%);
  overflow: hidden;
  color: #e68a00;
}
.bam-stars--petites { --bam-taille: 14px; }

/* ---------- Note sous le titre ---------- */
.bam-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 14px;
  color: #1f2937;
  font-size: 0.9375rem;
  line-height: 1.4;
  text-decoration: none;
}
.bam-note:hover,
.bam-note:focus-visible { color: #1f2937; text-decoration: none; }
.bam-note__valeur { font-weight: 700; }
.bam-note__nombre {
  color: #4b5563;
  text-decoration: underline;
  text-decoration-color: #e2d6ec;
  text-underline-offset: 3px;
}
.bam-note:hover .bam-note__nombre { color: #6b3d8f; text-decoration-color: currentColor; }

/* ---------- Bloc des avis ---------- */
.bam-avis-bloc {
  max-width: 880px;
  margin: 48px auto 56px;
  padding: 0 16px;
}
.bam-avis-bloc__titre {
  margin: 0 0 16px;
  color: #4a2a66;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  scroll-margin-top: 110px; /* en-tête collant : le lien « n avis » ne doit pas cacher le titre */
}
.bam-avis-resume {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 16px 20px;
  border: 1px solid #e8e0ef;
  border-radius: 12px;
  background: #faf7fc;
}
.bam-avis-resume__valeur {
  color: #1f2937;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.bam-avis-resume__valeur small {
  margin-left: 2px;
  color: #6b7280;
  font-size: 1rem;
  font-weight: 500;
}
.bam-avis-resume .bam-stars { --bam-taille: 20px; }
.bam-avis-resume__nombre { color: #4b5563; font-size: 0.9375rem; }
.bam-avis-bloc__mention {
  margin: 10px 0 20px;
  color: #6b7280;
  font-size: 0.8125rem;
}

#product-comments-list { display: grid; gap: 12px; }
.bam-avis {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid #e8e0ef;
  border-radius: 12px;
  background: #fcfafd;
}
.bam-avis__entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 8px;
}
.bam-avis__titre {
  margin: 0;
  color: #1f2937;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}
.bam-avis__texte {
  margin: 0 0 12px;
  color: #1f2937;
  font-size: 0.9375rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.bam-avis__pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  color: #6b7280;
  font-size: 0.8125rem;
}
.bam-avis__auteur { color: #4b5563; font-weight: 600; }
.bam-avis__actions { margin-left: auto; display: inline-flex; gap: 4px; }
.bam-avis__actions a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  color: #6b7280;
  cursor: pointer;
  text-decoration: none;
}
.bam-avis__actions a:hover { background: #f3eef7; color: #6b3d8f; }

#empty-product-comment { color: #6b7280; }
#product-comments-list-pagination ul {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 575px) {
  .bam-avis-bloc { margin: 32px auto 40px; padding: 0; }
  .bam-avis-bloc__titre { font-size: 1.25rem; }
  .bam-avis { padding: 16px; }
  .bam-avis__actions { margin-left: 0; }
}
