/* Shortcode: [av_recent_posts]
   Fichier: assets/css/shortcodes/recent-posts.css
------------------------------------------------------------------ */

/* Grille */
.av-recent {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 8px 0;
}

@media (min-width: 768px){
  .av-recent.av-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .av-recent.av-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

/* Carte (conteneur visuel) */
.av-card {
  background: #f8fafc;             /* gris très clair */
  border: 1px solid #e5e7eb;       /* léger contour */
  border-radius: 14px;
  padding: 0;                      /* le padding passe sur le lien interne */
  transition: box-shadow .2s ease, transform .2s ease;
}

/* Lien pleine carte */
.av-card__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 18px;
  width: 100%;
  height: 100%;
  text-decoration: none;           /* pas de souligné */
  color: inherit;                  /* hérite la couleur du texte */
  border-radius: 14px;             /* pour focus ring propre */
}

/* Hover/Focus (sur toute la carte) */
.av-card__link:hover,
.av-card__link:focus-visible {
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
  transform: translateY(-1px);
  outline: none;
}

/* Vignette (image mise en avant) */
.av-card-thumb {
  display: block;
  width: 100%;
  max-width: 120px;
  border-radius: 10px;
  overflow: hidden;
}
.av-card-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

/* Placeholder si pas d’image */
.av-thumb-placeholder {
  display: block;
  width: 100%;
  max-width: 120px;
  aspect-ratio: 1/1;
  border-radius: 10px;
  background: #eef2f7;
  border: 1px dashed #d1d5db;
}

/* Titre (non souligné) */
.av-card-title {
  margin: 0;
  font-size: 14px;                 /* "pas trop gros" */
  line-height: 1.35;
  font-weight: 600;
  color: #111827;
}

/* Petits ajustements responsive (optionnels) */
@media (min-width: 1024px){
  .av-card__link { padding: 20px; }
}
