/* ───────────────────────────── */
/* BASE                          */
/* ───────────────────────────── */

figure {
  text-align: center;
}

.blog-page {
  width: 100%;
  position: relative;
}

.blog-section {
  padding: 20px;
}

.blog-card-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Liens */
.blog-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ───────────────────────────── */
/* CARTES COMMUNES               */
/* ───────────────────────────── */

.blog-card {
  position: relative;
  border: 1px solid var(--background-color-2);
  border-radius: 8px;
  overflow: hidden;
}

/* Images */
.blog-card img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* Badge */
.blog-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

/* Texte */
.blog-card p {
  padding: 0 16px;
}

.blog-card-date {
  font-size: 0.75rem;
  color: var(--text-color-muted);
  padding-bottom: 16px;
}

/* ───────────────────────────── */
/* ARTICLES (mobile-first)       */
/* ───────────────────────────── */

.blog-article-card img {
  aspect-ratio: 16 / 9;
}

/* Accroche */
.blog-article-accroche {
  margin-top: 12px;
}

/* ───────────────────────────── */
/* CATÉGORIES (mobile-first 2x2) */
/* ───────────────────────────── */

.blog-categories .blog-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.blog-category-card {
  position: relative;
}

/* Cartes catégories */
.blog-category-card img {
  aspect-ratio: 1 / 1;
}

/* Badge plus discret */
.blog-category-badge {
  font-size: 0.8rem;
  padding: 4px 8px;
  /* fond sombre semi-transparent */
}

.blog-detail-header {
  text-align: center;
  padding: 20px;
}

.blog-related-products-grid {
  text-align: center;
  display: flex;
  justify-content: space-evenly;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 20px;
}


/* ───────────────────────────── */
/* TABLETTE ≥ 768px              */
/* ───────────────────────────── */

@media (min-width: 768px) {
  .blog-articles .blog-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .blog-category-badge {
    font-size: 1.8rem;
  }

  .blog-article-card img {
    aspect-ratio: 4 / 3;
  }
}

/* ───────────────────────────── */
/* DESKTOP ≥ 1024px              */
/* ───────────────────────────── */

@media (min-width: 1024px) {
  .blog-articles .blog-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .blog-categories .blog-card-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Hover léger */
  .blog-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  .blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  }
}