.post_thumbnail {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
  margin-bottom: 1rem;
  border-radius: 6px;
}

/* Galerie d'images */
/* container en grille responsive */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: start; /* aligne en haut si hauteurs variables */
}

/* lien qui contient la vignette */
.gallery-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* IMPORTANT : ne pas forcer width:100% ni une height fixe */
.gallery-item img {
  display: inline-block;
  width: auto;         /* conserve proportion */
  height: auto;        /* conserve proportion */
  max-width: 250px;    /* largeur max souhaitée */
  max-height: 180px;   /* hauteur max souhaitée */
  object-fit: contain; /* si les dimensions explicites sont appliquées, garde l'image entière */
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.gallery-item img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* Image principale au centre du texte */

/* Variante plus petite */
.post-image {
  display: block;

}

/* Responsive : sur mobile, les images occupent toute la largeur */
@media (max-width: 768px) {
  .post-image{
    max-width: 20%;
  }
}

.post-gif {
  display: block;
  margin: 1.5rem auto;
  max-width: 400px;
  border-radius: 6px;
}

.gif-small {
  display: block;
  margin: 1.5rem auto;   /* centre horizontalement */
  max-width: 200px;       /* petite taille */
  width: 100%;
}