
/* === OC News EKit CSS — uniformiser les cartes Elementskit Post Grid === */

/* Wrapper grille 3 / 2 / 1 */
.oc-news-ekit .ekit-post-grid .row{
  display:grid !important;
  grid-template-columns:repeat(3,1fr) !important;
  gap:24px !important;
  align-items:stretch !important;
}
@media (max-width:1024px){
  .oc-news-ekit .ekit-post-grid .row{ grid-template-columns:repeat(2,1fr) !important; }
}
@media (max-width:767px){
  .oc-news-ekit .ekit-post-grid .row{ grid-template-columns:1fr !important; gap:16px !important; }
}

/* Colonnes étirables */
.oc-news-ekit .ekit-post-grid .row > [class*="col"]{ display:flex !important; }

/* Carte pleine hauteur */
.oc-news-ekit .ekit-post-card{
  display:flex !important;
  flex-direction:column !important;
  height:100% !important;
  background:#fff;
  border:1px solid #EDEDED;
  border-radius:12px;
  overflow:hidden;
}

/* Vignette 16:9 (OK <img> ou background) */
.oc-news-ekit .ekit-post-card .elementskit-entry-thumb,
.oc-news-ekit .ekit-post-card .post-thumbnail,
.oc-news-ekit .ekit-post-card .ekit-post-thumb,
.oc-news-ekit .ekit-post-card .thumb{
  position:relative !important;
  width:100% !important;
  padding-top:56.25% !important; /* 16:9 */
  overflow:hidden !important;
  background-size:cover !important;
  background-position:center !important;
  background-repeat:no-repeat !important;
}
.oc-news-ekit .ekit-post-card .elementskit-entry-thumb img,
.oc-news-ekit .ekit-post-card .post-thumbnail img,
.oc-news-ekit .ekit-post-card .ekit-post-thumb img,
.oc-news-ekit .ekit-post-card .thumb img{
  position:absolute !important;
  top:0; left:0;
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}

/* Corps + titres/extraits clampés */
.oc-news-ekit .ekit-post-card .ekit-post-body{
  flex:1 1 auto !important;
  display:flex !important;
  flex-direction:column !important;
  padding:16px !important;
}
.oc-news-ekit .ekit-post-card h3{
  margin:8px 0 6px !important;
  font-size:18px !important;
  line-height:1.25 !important;
  display:-webkit-box !important;
  -webkit-line-clamp:2 !important;
  -webkit-box-orient:vertical !important;
  overflow:hidden !important;
  min-height:calc(1.25em * 2) !important;
}
.oc-news-ekit .ekit-post-card .ekit-post-excerpt,
.oc-news-ekit .ekit-post-card .entry-summary,
.oc-news-ekit .ekit-post-card .post-content{
  color:#4E4E4E !important;
  font-size:15px !important;
  margin:0 0 10px !important;
  display:-webkit-box !important;
  -webkit-line-clamp:3 !important;
  -webkit-box-orient:vertical !important;
  overflow:hidden !important;
  min-height:calc(1.5em * 3) !important;
}
.oc-news-ekit .ekit-post-card .read-more,
.oc-news-ekit .ekit-post-card .more-link{
  margin-top:auto !important;
  align-self:flex-start !important;
}

/* Sécurité : masquer >3 items si le widget en sort plus */
.oc-news-ekit .ekit-post-grid .ekit-post-col:nth-child(n+4),
.oc-news-ekit .ekit-post-grid .ekit-post-item:nth-child(n+4){
  display:none !important;
}
