.mfs-tp-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: .3rem .6rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  flex-wrap: wrap;        /* permet le retour à la ligne */
  max-width: 100%;        /* empêche le débordement */
}

.mfs-tp-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: 14px;
  color: #111827;
  flex-wrap: wrap;        /* idem */
}

.mfs-tp-label {
  font-weight: 700;
}

.mfs-tp-note {
  font-weight: 500;
}

.mfs-tp-outof {
  opacity: .7;
}

.mfs-tp-count {
  opacity: .7;
  margin-left: .1rem;
}

.mfs-tp-brand {
  font-weight: 600;
  margin-left: .2rem;
}

.mfs-tp-stars {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
  flex-shrink: 0;         /* garde les étoiles compactes */
}

.mfs-tp-star {
  width: 14px;
  height: 14px;
  fill: #10b981;
}

.mfs-tp-starwrap {
  position: relative;
  display: inline-block;
}

.mfs-tp-starwrap .mfs-tp-star {
  opacity: .25;
}

.mfs-tp-starwrap[data-fill="1"] .mfs-tp-star {
  opacity: 1;
}

/* Partial fill fallback: show half if frac >= .5 */
.mfs-tp-starwrap[data-fill="0.5"] .mfs-tp-star {
  opacity: 1;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .mfs-tp-link {
    padding: .25rem .5rem;
    font-size: 13px;
    gap: .3rem;
  }

  .mfs-tp-badge {
    font-size: 13px;
    gap: .25rem;
  }

  .mfs-tp-label,
  .mfs-tp-note,
  .mfs-tp-count,
  .mfs-tp-brand {
    font-size: 12px;
  }

  .mfs-tp-star {
    width: 12px;
    height: 12px;
  }
}

/* Version très compacte pour écrans <360px */
@media (max-width: 360px) {
  .mfs-tp-link {
    flex-direction: column;   /* pile en colonne */
    align-items: flex-start;
    border-radius: 12px;
    padding: .4rem;
  }
  .mfs-tp-badge {
    flex-direction: column;
    align-items: flex-start;
  }
}
