/* ===== PAGE LE BLOG — Styles spécifiques (même logique que La Carte pour la nav) ===== */

/* Menu "Blog" actif dans le header (même principe que La Carte) */
.header__nav-link--active {
  color: var(--blue-secondary) !important;
}

.header__nav-link--active::after {
  width: 100%;
}

/* Hero : titre centré "LE BLOG", même principe que La Carte */
.hero--blog {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-image: url('../assets/images/hero/hero_carte.png');
  aspect-ratio: 1024 / 287;
  max-height: 406px;
}

.hero--blog::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.2) 35%,
    rgba(0, 0, 0, 0) 70%
  );
  pointer-events: none;
}

.blog-hero__title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  color: #000;
  text-shadow: 0 0 8px rgba(255, 255, 255, 1), 0 0 16px rgba(255, 255, 255, 0.9), 0 1px 4px rgba(255, 255, 255, 0.8);
  margin: 0;
  pointer-events: none;
}

/* Barre de navigation catégories (sous le hero) — même logique que .carte-nav */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--white);
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.blog-nav__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}

.blog-nav__links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0 20px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.blog-nav__links::-webkit-scrollbar {
  display: none;
}

.blog-nav__link {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--grey-title);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.blog-nav__link:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--grey-body);
}

.blog-nav__link.is-active {
  background: var(--blue-main);
  color: var(--grey-title);
}

/* Sections blog */
.blog-section {
  padding: 48px 0 56px;
  border-bottom: 1px solid #e8e8e8;
}

.blog-section:last-of-type {
  border-bottom: none;
}

.blog-section__title {
  margin-bottom: 28px;
}

/* Grille : 2 petits + 1 grand */
.blog-section__grid--small-small-big {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 24px;
  align-items: start;
}

/* Grille : 1 grand + 2 petits */
.blog-section__grid--big-small-small {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Cartes article — bloc entièrement cliquable (lien sur toute la carte) */
a.blog-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.blog-card {
  cursor: pointer;
  transition: transform 0.25s;
}

.blog-card:hover {
  transform: translateY(-4px);
}

.blog-card__img {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.blog-card--small .blog-card__img {
  height: 180px;
}

.blog-card--big .blog-card__img {
  height: 260px;
}

.blog-card__category {
  display: inline-block;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue-secondary);
  margin-bottom: 8px;
}

.blog-card__title {
  font-family: 'Baloo 2', cursive;
  font-size: 18px;
  color: var(--grey-title);
  margin-bottom: 8px;
}

.blog-card--big .blog-card__title {
  font-size: 20px;
}

.blog-card__excerpt {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
}

.blog-card--big .blog-card__excerpt {
  font-size: 14px;
}

.blog-card__link {
  display: inline-block;
  margin-top: 12px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--grey-title);
  text-decoration: underline;
  transition: color 0.25s;
}

.blog-card__link:hover {
  color: var(--blue-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero--blog {
    aspect-ratio: auto;
    height: 35vh;
    min-height: 224px;
  }

  .blog-section__grid--small-small-big,
  .blog-section__grid--big-small-small {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  /* Sur tablette : premier item en pleine largeur si 1 grand + 2 petits, sinon garder 2+1 */
  .blog-section__grid--big-small-small .blog-card--big {
    grid-column: 1 / -1;
  }

  .blog-section__grid--small-small-big .blog-card--big {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .hero--blog {
    aspect-ratio: auto;
    height: 28vh;
    min-height: 175px;
  }

  .blog-hero__title {
    font-size: 28px;
  }

  .blog-nav {
    padding: 12px 0;
  }

  .blog-nav__link {
    font-size: 13px;
    padding: 10px 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
  }

  .blog-section__grid--small-small-big,
  .blog-section__grid--big-small-small {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .blog-section__grid--big-small-small .blog-card--big,
  .blog-section__grid--small-small-big .blog-card--big {
    grid-column: auto;
  }

  .blog-section {
    padding: 28px 0 36px;
  }

  .blog-section__title {
    margin-bottom: 20px;
  }

  .blog-card--big .blog-card__img {
    height: 220px;
  }
}

@media (max-width: 480px) {
  .hero--blog {
    aspect-ratio: auto;
    height: 25vh;
    min-height: 140px;
  }

  .blog-hero__title {
    font-size: 24px;
  }

  .blog-nav__link {
    font-size: 12px;
    padding: 10px 12px;
  }

  .blog-section {
    padding: 24px 0 32px;
  }

  .blog-section__title {
    margin-bottom: 16px;
  }
}
