/* ============================================================
   4. GRILLES D'ARCHIVES & CARTES
   ============================================================ */
.cp-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.25rem;
  margin-bottom: 4rem;
}

@media (max-width: 640px) {
  .cp-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
  }
}

.cp-card {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid #E2E8F0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cp-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
}

.cp-card-media {
  position: relative;
  height: 210px;
  overflow: hidden;
}

.cp-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cp-card:hover .cp-card-media img {
  transform: scale(1.05);
}

.cp-card-date-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #ffffff;
  color: var(--cp-color-primary);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.cp-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

@media (max-width: 640px) {
  .cp-card-media {
    height: 180px;
  }
  .cp-card-body {
    padding: 1.25rem 1.15rem;
  }
}

.cp-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cp-color-primary);
  margin: 0 0 0.75rem;
  line-height: 1.35;
}

.cp-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cp-card-title a:hover {
  color: var(--cp-color-secondary);
}

.cp-card-excerpt {
  font-size: 1rem;
  color: #475569;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  flex: 1;
}

.cp-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid #F1F5F9;
  font-size: 0.88rem;
}

.cp-card-link {
  color: var(--cp-color-secondary);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.2s ease;
}

.cp-card-link:hover {
  gap: 0.6rem;
}
