.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* TITRE & INTRO */
h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1rem;
}

.intro {
  text-align: center;
  max-width: 100%;
  margin: 0 auto 2rem;
  color: var(--text-subtle);
  font-size: 1rem;
}

/* GRILLE DES POSTS */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 0 auto 2.5rem;
}

.post-card {
  background: var(--card-bg);
  box-shadow: 0 4px 12px var(--shadow);
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
  /* ajout d'un padding global */
  padding: 0; /* on gère le padding dans .post-content */
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--shadow);
  text-decoration: none;
}

/* Image garde sa structure */
.image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* ratio 16:9 */
  overflow: hidden;
}

.post-image {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Contenu avec padding et espacement */
.post-content {
  padding: 1.2rem 1.5rem; /* padding confortable autour */
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.5rem; /* espace uniforme entre titre, extrait, meta */
}

/* TITRE */
.post-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  margin: 0;
  color: var(--accent-dark);
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

/* Au hover sur la carte, seul le titre change */
.post-card:hover .post-title {
  color: #393be5;
  text-decoration: underline;
}

/* EXCERPT */
.post-excerpt {
  margin: 0;
  color: var(--text-subtle);
  font-size: 0.95rem;
  flex-grow: 0; /* ne prend pas tout l'espace */
}

/* META */
.post-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-subtle);
  align-self: flex-start; /* évite d'être étiré */
}

.post-card:hover .post-excerpt,
.post-card:hover .post-meta {
  text-decoration: none !important; /* annule underline sur ces 2 */
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 1.2rem;              /* espace entre les boutons */
  margin-top: 2.5rem;
  flex-wrap: wrap;    
}

.pagination a {
  padding: 0.5rem 1rem;
  background-color: #393be5;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.pagination a:hover {
  background-color: #2f32b3; /* une teinte plus foncée de ta couleur */
  text-decoration: underline;
}

.pagination .btn-prev {
  align-self: flex-start;
}

.pagination .btn-next {
  align-self: flex-end;
}




footer.site-footer {
  min-height: 150px; /* ou adapte selon ton contenu réel */
}


/* TABLETTE (768px à 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  h1 {
    font-size: 2.4rem;
  }

  .intro {
    font-size: 1.05rem;
    max-width: 90%;
  }

  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 90%;
  }

  .post-image {
    height: 180px;
  }

  .post-title {
    font-size: 1.3rem;
  }
  /* Footer */


 footer.site-footer {
    min-height: 60px;
  }

}

/* DESKTOP (à partir de 1025px) */
@media (min-width: 1025px) {
  h1 {
    font-size: 2.8rem;
  }

  .intro {
    font-size: 1.1rem;
    max-width: 700px;
  }

  .posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
  }

  .post-image {
    height: 180px;
  }

  .post-title {
    font-size: 1.4rem;
  }

  footer.site-footer {
    min-height: 60px;
  }

}
