/* === Bibliothèque : grille responsive === */
.cpx-grid {
  display: grid !important;
  gap: 14px !important; /* espace entre affiches */
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  justify-content: center;
}

.cpx-grid .cpx-card {
  width: 100%;
  max-width: 100%;
  background: #111;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cpx-grid .cpx-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.cpx-grid .cpx-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.cpx-grid .cpx-title {
  font-size: 0.9rem;
  text-align: center;
  padding: 6px;
  color: #fff;
  background: #000;
}

/* --- Breakpoints pour ajuster le nombre de colonnes --- */
@media (min-width: 480px)  { .cpx-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important; } }
@media (min-width: 768px)  { .cpx-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important; } }
@media (min-width: 1024px) { .cpx-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important; } }
@media (min-width: 1440px) { .cpx-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; } }
