/* ========== PAGE BLOG GÉNÉRAL ========== */
body {
  background-color: #f7f9fc;
}

.blog-list {
  padding-bottom: 60px;
}

/* ========== EN-TÊTE DE LA PAGE BLOG ========== */
.blog-header {
  background: linear-gradient(90deg, #0c2442, #4f7492);
  color: white;
  text-align: center;
  padding: 50px 20px;
  margin-bottom: 30px;
}

.blog-header h1 {
  font-size: 38px;
  color: white;
  margin: 0;
}

.blog-header p {
  font-size: 18px;
  color: #eee;
  max-width: 600px;
  margin: 10px auto 0;
}

/* On cache l'ancien titre simple */
.page-title {
  display: none;
}

/* ========== CONTRÔLES : RECHERCHE ET FILTRES ========== */
.blog-controls {
    max-width: 1200px;
    margin: 0 auto 50px auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
}

.search-container {
    flex-grow: 1;
    min-width: 250px;
}

.search-container input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #4f7492;
    box-shadow: 0 0 0 3px rgba(79, 116, 146, 0.2);
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background-color: #fff;
    color: #0c2442;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #f0f4f8;
    border-color: #ccc;
}

.filter-btn.active {
    background-color: #0c2442;
    color: #fff;
    border-color: #0c2442;
}

/* ========== GRILLE DES ARTICLES ========== */
.blog-container {
  display: grid;
  /* MODIFIÉ : auto-fit est remplacé par auto-fill pour empêcher l'étirement */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  /* AJOUTÉ : Centre les cartes si la ligne n'est pas complète */
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== CARTE D'ARTICLE ========== */
.blog-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 64, 128, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 64, 128, 0.12);
}

/* ========== IMAGE DE L'ARTICLE ========== */
.blog-image-link {
  display: block;
}

.blog-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* ========== CONTENU DE L'ARTICLE ========== */
.blog-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* ========== MÉTA-DONNÉES (Catégorie, Date) ========== */
.blog-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #555;
}

.blog-category {
  background-color: #f0f4f8;
  color: #4f7492;
  padding: 4px 10px;
  border-radius: 50px;
  font-weight: 600;
}

/* ========== TITRE, DESCRIPTION ET LIEN ========== */
.blog-title {
  font-size: 20px;
  color: #0c2442;
  margin: 0 0 10px 0;
}

.blog-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.blog-title a:hover {
  color: #4f7492;
}

.blog-desc {
  color: #444;
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: 20px;
}

.blog-link {
  display: inline-block;
  text-decoration: none;
  color: #0c2442;
  font-weight: 600;
  transition: color 0.3s ease;
  align-self: flex-start;
}

.blog-link:hover {
  color: #4f7492;
}

/* ========== BOUTONS AFFICHER PLUS/MOINS & MESSAGE ========== */
.load-more-container {
    text-align: center;
    margin-top: 40px;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.load-btn {
    background-color: #0c2442;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.load-btn:hover {
    background-color: #4f7492;
    transform: translateY(-2px);
}

.no-results-message {
    text-align: center;
    color: #555;
    font-size: 18px;
    margin-top: 40px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}