/* =============================================================
   Section Dernières actualités — Page d'accueil
   ============================================================= */

/* ── Wrapper section ── */
.latest-posts {
  padding: 120px 0;
  background: #fff;
}

/* ── Conteneur interne ── */
.latest-posts__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* ── En-tête ── */
.latest-posts__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.latest-posts__title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 40px;
  line-height: 1.15;
  color: #003c3d;
  margin: 0;
  letter-spacing: -0.5px;
  text-align: center;
  width: 100%;
}

/* ── Grille 3 colonnes ── */
.latest-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 28px;
}

/* ── Carte ── */
.latest-posts__card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px 0 rgba(18, 17, 39, 0.08);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.latest-posts__card:hover {
  box-shadow: 0 28px 64px 0 rgba(18, 17, 39, 0.14);
  transform: translateY(-4px);
}

/* ── Image ── */
.latest-posts__card-img-wrap {
  width: 100%;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
}

.latest-posts__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.latest-posts__card:hover .latest-posts__card-img {
  transform: scale(1.04);
}

.latest-posts__card-img-placeholder {
  width: 100%;
  height: 100%;
  background: #e8f0ef;
}

/* ── Corps carte ── */
.latest-posts__card-body {
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 24px 28px 28px;
  flex: 1;
}

/* ── Meta (tag + date sur une ligne) ── */
.latest-posts__card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Tag catégorie ── */
.latest-posts__card-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 2px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.4;
}

/* ── Date ── */
.latest-posts__card-date {
  font-family: 'Work Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #003c3d;
  line-height: 1;
}

/* ── Titre ── */
.latest-posts__card-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  color: #122735;
  margin: 0;
}

/* ── Extrait ── */
.latest-posts__card-excerpt {
  font-family: 'Work Sans', sans-serif;
  font-size: 17.5px;
  font-weight: 400;
  line-height: normal;
  color: #025253;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Lien "Lire le..." ── */
.latest-posts__card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #21b593;
  text-decoration: none;
  transition: gap 0.3s ease;
}

.latest-posts__card-link-label {
  text-decoration: underline;
  text-decoration-color: #21b593;
  text-underline-offset: 3px;
  transition: letter-spacing 0.3s ease;
}

.latest-posts__card:hover .latest-posts__card-link-label {
  letter-spacing: 0.4px;
}

.latest-posts__card-link-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

/* ── Footer (bouton CTA) ── */
.latest-posts__footer {
  display: flex;
  justify-content: center;
}

/* ── Bouton CTA (même style que method-btn / refs-featured__cta) ── */
.latest-posts__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #025253;
  color: #fefefe;
  border-radius: 40px;
  padding: 0 35px;
  height: 55px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.1875rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.latest-posts__cta:hover {
  background: #013e3f;
  color: #fefefe;
}

.latest-posts__cta__icon {
  color: #21b593;
  display: inline-flex;
  align-items: center;
}

/* =============================================================
   Responsive — ≤ 1280px
   ============================================================= */

@media (max-width: 1280px) {
  .latest-posts__title {
    font-size: 34px;
  }
}

/* =============================================================
   Responsive — ≤ 991px (mobile)
   ============================================================= */

@media (max-width: 991px) {
  .latest-posts {
    padding: 64px 0;
  }

  .latest-posts__inner {
    gap: 40px;
  }

  .latest-posts__title {
    font-size: 26px;
  }

  /* Colonne unique */
  .latest-posts__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Masquer l'extrait en mobile */
  .latest-posts__card-excerpt {
    display: none;
  }

  .latest-posts__cta {
    width: 100%;
    justify-content: center;
  }
}
