/* Card system centralisé */

.card {
  width: 100%;
  display: block;
  justify-content: center;
  align-items: center;
  color: var(--text-color);
  background-color: var(--app-surface-color, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--app-surface-border, rgba(255, 255, 255, 0.18));
  border-radius: var(--app-card-radius, 4px);
  -webkit-box-shadow: 0.2em 0.2em 1em rgba(128, 128, 128, 0.2), -0.2em -0.2em 1em rgba(128, 128, 128, 0.2);
  box-shadow: 0.2em 0.2em 1em rgba(128, 128, 128, 0.2), -0.2em -0.2em 1em rgba(128, 128, 128, 0.2);
  overflow: hidden;
  position: relative;
  padding: 0;
  transition: transform 0.2s, background-color 0.15s ease, border-color 0.15s ease;
}

.card-content {
  transition: transform 0.2s;
}

.card:hover .card-content {
  transform: scale(1.05);
}

.card-img-top {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  color: var(--text-color);
  opacity: 1;
  transition: opacity 0.2s;
}

.card-title-link {
  text-decoration: none;
  color: #fff;
}

.card-title-link:hover,
.card-title:hover {
  text-decoration: none;
  color: green;
}

.card-title {
  color: #fff;
  margin-bottom: 0;
  text-align: center;
}

/* Cards amis (users/profile.php + _admin/profile.php) */
.friends-box {
  margin-top: 10px;
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px;
}

.friend-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  overflow: hidden;
}

.friend-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.friend-card .card-header {
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.1;
  padding: 6px;
}

.friend-card .card-body {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.friend-card .card-footer {
  text-align: center;
  padding: 6px;
}

.friend-card .card-footer .btn {
  font-size: 0.72rem;
  padding: 2px 8px;
}

.friends-pagination {
  margin-top: 8px;
}