/* Styles du plugin "Articles par Catégorie" */

.apc-grille-section {
  max-width: 1400px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.apc-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}

@media (min-width: 900px) {
  .apc-grille {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .apc-grille {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
  }
}

.apc-carte {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.apc-carte:hover {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
  transform: translateY(-2px);
}

.apc-carte__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.apc-carte__image--vide {
  background: #eeeeee;
}

.apc-carte__contenu {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.9rem 1rem 0.9rem 1rem;
}

.apc-carte__titre {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.35rem 0;
  line-height: 1.3;
}

.apc-carte__texte {
  font-size: 0.8rem;
  color: #5a5a5a;
  line-height: 1.4;
  margin: 0;
  flex: 1;
}

.apc-carte__fleche {
  align-self: flex-end;
  margin-top: 0.7rem;
  color: #c8102e;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}

/* ---------- Panneau de filtres ---------- */

.apc-filtre-wrapper {
  margin-bottom: 1.2rem;
}

.apc-filtre-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.apc-filtre-toggle:hover {
  border-color: #c8102e;
}

.apc-filtre-icone {
  font-size: 0.75rem;
  color: #c8102e;
}

.apc-filtre-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.apc-filtre-pill {
  background: #f4f4f4;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  color: #444;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.apc-filtre-pill:hover {
  background: #ebebeb;
}

.apc-filtre-pill--active {
  background: #c8102e;
  color: #fff;
}

.apc-filtre-vide {
  color: #777;
  font-size: 0.9rem;
  padding: 1rem 0;
}
