/* [dpm_articles] — grille d'articles Du Parc Monnet (préfixe dpm-art-)
   Approche visuelle proche de la grille WPBakery /actualites/ et du shortcode [encheres_liste] :
   3 colonnes, image en tête, titre, date, extrait, lien. Couleurs du thème De Jure (#00328c, #101010, #6b6b6b, #e0e0e0).
   Ne dépend pas des classes vc_*. */

.dpm-art {
  margin: 0 0 2em;
}

.dpm-art__titre {
  margin: 0 0 1em;
  text-align: left;
}

/* Filtres : même rendu que l'ancienne grille WPBakery (style « default », couleur grise) :
   texte gris simple, survol et filtre actif = pastille gris clair arrondie. */
.dpm-art__filtres {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.dpm-art .dpm-art__filtres .dpm-art__filtre {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 4px 10px;
  border: 0;
  border-radius: 30px;
  background: transparent;
  box-shadow: none;
  color: #666;
  font-family: inherit;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.1s linear;
}

.dpm-art .dpm-art__filtres .dpm-art__filtre:hover,
.dpm-art .dpm-art__filtres .dpm-art__filtre.is-active,
.dpm-art .dpm-art__filtres .dpm-art__filtre[aria-pressed="true"] {
  background: #ebebeb;
  color: #666;
}

.dpm-art .dpm-art__filtres .dpm-art__filtre:focus-visible {
  outline: 2px solid #00328c;
  outline-offset: 2px;
}

/* Articles masqués par le JavaScript (affichage limité / filtre).
   Le HTML serveur n'a jamais cette classe : sans JS, tout reste visible. */
.dpm-art__item.dpm-art__item--masque,
.dpm-art__item[hidden] {
  display: none !important;
}

/* « Voir plus » : bouton gris clair arrondi, comme « Consultez plus d'actualités ». */
.dpm-art__suite {
  margin: 30px 0 0;
  text-align: center;
}

.dpm-art .dpm-art__voir-plus,
.dpm-art .dpm-art__tout {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  margin: 0;
  padding: 12px 24px;
  border: 0;
  border-radius: 5px;
  background: #ededed;
  box-shadow: none;
  color: #666 !important;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  text-transform: none;
  text-decoration: none !important;
  cursor: pointer;
}

.dpm-art .dpm-art__voir-plus:hover,
.dpm-art .dpm-art__tout:hover {
  background: #666;
  color: #fff !important;
}

.dpm-art .dpm-art__voir-plus:focus-visible,
.dpm-art .dpm-art__tout:focus-visible {
  outline: 2px solid #00328c;
  outline-offset: 2px;
}

.dpm-art .dpm-art__voir-plus[hidden] {
  display: none;
}

/* Annonces pour lecteurs d'écran uniquement. */
.dpm-art__statut {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dpm-art__liste {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dpm-art__item {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
}

.dpm-art__media {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f1f1f1;
}

.dpm-art__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dpm-art__media--vide {
  min-height: 0;
}

.dpm-art__corps {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 16px 18px 18px;
}

.dpm-art__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.dpm-art__cat {
  margin: 0;
  padding: 2px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  color: #6b6b6b;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dpm-art__title {
  margin: 0 0 0.35em;
  font-size: 1.15em;
  line-height: 1.3;
}

.dpm-art__title a {
  color: #101010;
  text-decoration: none;
}

.dpm-art__title a:hover,
.dpm-art__title a:focus-visible {
  color: #00328c;
  text-decoration: underline;
}

.dpm-art__date {
  display: block;
  margin: 0 0 0.6em;
  color: #6b6b6b;
  font-size: 0.9em;
  line-height: 1.4;
}

.dpm-art__extrait {
  margin: 0 0 1em;
  color: #6b6b6b;
  font-size: 15px;
  line-height: 22px;
}

.dpm-art__extrait p {
  margin: 0 0 0.5em;
}

.dpm-art__extrait p:last-child {
  margin-bottom: 0;
}

.dpm-art__plus {
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
  padding: 8px 18px;
  border-radius: 4px;
  background: #00328c;
  color: #fff !important;
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none !important;
}

.dpm-art__plus:hover,
.dpm-art__plus:focus-visible {
  background: #00256a;
  color: #fff !important;
  outline: none;
}

.dpm-art__plus:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 50, 140, 0.25);
}

@media (max-width: 992px) {
  .dpm-art__liste {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .dpm-art__liste {
    grid-template-columns: 1fr;
  }
}
