/* Repris à l'identique de l'ancien pages/jeux/partials/card_home.php */
/* Style général pour cartes compactes */
.small-card {
  max-width: 320px;
  height: 370px;
  font-size: 0.85rem;
  flex: 0 0 auto;
}

.small-card .card-img-top {
  height: 170px;
  object-fit: cover;
}

.small-card .author-avatar {
  width: 30px !important;
  height: 30px !important;
}

.small-card .card-body {
  padding: 0.75rem;
  height: 180px;
}

.small-card h5.card-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.small-card .stats {
  font-size: 0.6rem;
}

/* R19 V1.2 : informations violettes à l'intérieur de la carte. */
.small-card.pm-card-contextual {
  height: 410px;
}

.small-card.pm-card-contextual .card-body {
  height: 220px;
}

.pm-card-contextual-reasons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 100%;
  margin-top: 8px;
  padding: 0 4px;
}

.pm-card-contextual-reason {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid rgba(109, 94, 252, .34);
  border-radius: 999px;
  color: #d4d1ff;
  background: rgba(109, 94, 252, .13);
  font-size: .57rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.pm-card-contextual-reason i {
  font-size: .55rem;
}

/* R11 — informations de tendance, affichées uniquement sur /tendances. */
.small-card.pm-card-trend {
  height: 430px;
}

.small-card.pm-card-trend .card-body {
  height: 240px;
}

.pm-card-trend-panel {
  display: grid;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 0 4px;
}

.pm-card-trend-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 5px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid rgba(249, 115, 22, .35);
  border-radius: 999px;
  color: #ffd6b6;
  background: rgba(249, 115, 22, .13);
  font-size: .60rem;
  font-weight: 900;
  line-height: 1;
}

.pm-card-trend-badge.is-hot {
  border-color: rgba(239, 68, 68, .38);
  color: #ffd0d0;
  background: rgba(239, 68, 68, .14);
}

.pm-card-trend-badge.is-new {
  border-color: rgba(34, 197, 94, .35);
  color: #c6f7d8;
  background: rgba(34, 197, 94, .12);
}

.pm-card-trend-metrics {
  color: #aeb6c0;
  font-size: .57rem;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
}

/* ✅ Responsive : écran petit = carte plus large pour le confort */
@media (max-width: 768px) {
  .small-card {
    max-width: 100%;      /* Carte prend toute la largeur en mobile */
    font-size: 1rem;      /* Texte plus lisible */
  }

  .small-card .card-img-top {
    height: 160px;
  }

  .small-card .card-body {
    padding: 1rem;
  }

  .small-card .stats {
    font-size: 0.85rem;
  }

  .small-card.pm-card-contextual {
    height: auto;
    min-height: 410px;
  }

  .small-card.pm-card-contextual .card-body {
    height: auto;
    min-height: 220px;
  }

  .pm-card-contextual-reason {
    font-size: .68rem;
    white-space: normal;
    text-align: center;
  }

  .small-card.pm-card-trend {
    height: auto;
    min-height: 430px;
  }

  .small-card.pm-card-trend .card-body {
    height: auto;
    min-height: 240px;
  }

  .pm-card-trend-badge,
  .pm-card-trend-metrics {
    font-size: .68rem;
  }
}
