/* === Category listing: alternating 50/50 rows === */

.posts-container .alt-entry{
  display:flex;
  gap:0px;
  align-items:stretch;
  margin-bottom:0px;
}

.posts-container .alt-entry .alt-media,
.posts-container .alt-entry .alt-content{
  flex:0 0 50%;
}

.posts-container .alt-entry .alt-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Alternance: 1 ligne sur 2 inversée */
.posts-container > article:nth-child(even) .alt-entry{
  flex-direction:row-reverse;
}

/* Un peu d’air pour la description */
.category-desc{
  margin-bottom:40px;
}

/* Mobile */
@media (max-width:900px){
  .posts-container .alt-entry,
  .posts-container > article:nth-child(even) .alt-entry{
    flex-direction:column;
  }
  .posts-container .alt-entry .alt-media,
  .posts-container .alt-entry .alt-content{
    flex-basis:auto;
  }
}

/* Étendre la zone listing à pleine largeur écran */
body.category .container.main-content {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.category .post-area.col.span_12 {
  width: 100% !important;
  margin-left: 0 !important;
}

body.category .post-area {
  margin-top:0px;
}

/* Redonne un padding confortable au contenu (sinon collé aux bords) */
body.category .posts-container {
  padding-left: 6vw;
  padding-right: 6vw;
}

.category-desc--after{
  margin-top: 6rem;
}

.post .post-meta {
  display: none;
}
body.category .posts-container {
  padding-left: 0;
  padding-right: 0;
}

/* 1) Padding de 4rem sur le contenu */
.posts-container .alt-entry .alt-content{
  padding: 4rem;
}

/* 2) Centrage vertical du bloc texte par rapport à l'image */
.posts-container .alt-entry{
  display: flex;
  align-items: stretch; /* on garde la hauteur commune */
}

.posts-container .alt-entry .alt-content{
  display: flex;
  flex-direction: column;
  justify-content: center; /* centre verticalement */
}

/* 3) Image/zone média : max 350px de haut sur desktop */
@media (min-width: 901px){
  .posts-container .alt-entry .alt-media{
    max-height: 420px;
    overflow: hidden;
  }

  .posts-container .alt-entry .alt-media img{
    width: 100%;
    height: 420px;       /* force la hauteur */
    object-fit: cover;   /* recadre proprement */
    display: block;
  }
}

/* Supprimer le padding-top ajouté par Salient quand data-bg-header="true" */
body[data-bg-header="true"].category .container-wrap,
body[data-bg-header="true"].author .container-wrap,
body[data-bg-header="true"].date .container-wrap,
body[data-bg-header="true"].blog .container-wrap{
  padding-top: 0 !important;
}

/* Bouton uniquement dans ton listing custom (articles alt rows) */
body.category .alt-row-post .alt-actions{
  margin-top: 1.25rem;
}

/* Rend le bouton "normal" (pas full width) */
body.category .alt-row-post a.alt-more-link{
  display: inline-flex !important;
  width: auto !important;
  max-width: 100%;
  align-self: flex-start;     /* évite l’étirement en flex */
  justify-content: center;
  align-items: center;

  padding: 12px 22px !important;
  border-radius: 999px !important;
  text-decoration: none !important;
  line-height: 1 !important;
  white-space: nowrap;
}

/* Optionnel : hover un peu plus sympa */
body.category .alt-row-post a.alt-more-link:hover{
  opacity: 0.9;
}
