/* ============================================================
   BLOG — page liste des articles (blog.html)
   Sections : hero bleu à vague, article vedette, catégories,
   grille des derniers articles, pagination.
   Aucune couleur en dur : tout vient de tokens.css.
   ============================================================ */

/* Conteneur plus étroit que le conteneur global (1232px de contenu,
   comme le « container-page » de l'original). */
.container--blog { max-width: 1256px; }

/* ---------- Hero bleu ---------- */
.blog-hero {
  position: relative;
  height: 448px;
  padding-top: 92px;
  background: var(--grad-primary);
  color: var(--white);
  text-align: center;
  overflow: hidden;
}
/* Vague blanche : demi-ellipse posée sur le bas du hero */
.blog-hero::after {
  content: "";
  position: absolute; left: -2%; right: -2%; bottom: -1px;
  height: 40px;
  background: var(--white);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.blog-hero__copy { position: relative; z-index: 2; }
.blog-hero__title {
  font-size: 44px; line-height: 1.2;   /* 48px sur l'original (Trueno plus étroite que Montserrat : 44px tient sur une ligne) */
  letter-spacing: -0.03em;
  color: var(--white);
}
.blog-hero__sub {
  margin-top: 39px;
  font-family: var(--font-heading); font-weight: 500;
  font-size: 16px; line-height: 1.2;
  color: var(--white);
}
/* Le grand L orange du haut est un peu plus large que la forme standard */
.blog-hero__l { width: 64px; height: 64px; }

/* ---------- Article vedette ---------- */
.featured { position: relative; z-index: 2; margin-top: -192px; }
.featured__card {
  width: 600px; max-width: 100%; margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.featured__pic { display: block; height: 200px; overflow: hidden; }
.featured__pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform var(--dur) var(--ease); }
.featured__card:hover .featured__pic img { transform: scale(1.03); }
.featured__body { padding: 27px 30px 27px; }
.featured__title {
  font-size: 18px; line-height: 1.2; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.featured__title a:hover { color: var(--primary); }
/* Extrait tronqué à 6 lignes (deux paragraphes), points de suspension en fin */
.featured__excerpt {
  margin-top: 24px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6;
  overflow: hidden;
  font-size: 16px; line-height: 24px; color: var(--ink-strong);
}
.featured__excerpt p { font-weight: 300; }
.featured__meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 24px; padding-right: 24px;
}
.featured__date { font-size: 16px; font-weight: 300; color: var(--ink); }

/* Auteur (avatar rond + nom en gras), partagé vedette / cartes */
.author { display: inline-flex; align-items: center; gap: 8px; }
.author__avatar { width: 32px; height: 32px; }
.author__name { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 24px; }

/* ---------- Catégories ---------- */
.categories { margin-top: 110px; }
.categories__title {
  font-size: 28px; line-height: 1.2; font-weight: 600; text-align: center; color: var(--ink);
  letter-spacing: -0.02em;
  padding-bottom: 16px;
}
.categories__list { display: flex; flex-wrap: wrap; gap: 16px; padding: 8px 16px 0; }
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; padding: 5px 10px;
  background: var(--grey-100); border: 1px solid var(--grey-100);
  border-radius: var(--radius-pill);
  font-size: 14.4px; line-height: 1; font-weight: 300; color: var(--ink-strong);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.chip:hover { background: var(--primary-soft); color: var(--primary); }
/* Puce active = filtre en cours (bleu plein, re-clic pour tout afficher) */
.chip.is-active, .chip.is-active:hover { background: var(--primary); border-color: var(--primary); color: var(--white); font-weight: 500; }

/* ---------- Derniers articles ---------- */
.articles { margin-top: 138px; }
.articles__title { font-size: 18px; line-height: 1.2; color: var(--ink-strong); }
.articles__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 40px;
  padding: 18px 20px 0;
}
.post {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), var(--shadow-soft);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.post:hover { transform: translateY(-2px); }
.post__pic { position: relative; display: block; height: 160px; overflow: hidden; background: var(--grey-50); }
.post__pic img { width: 100%; height: 100%; object-fit: cover; }
.post__badge {
  position: absolute; left: 20px; top: 20px;
  display: inline-flex; align-items: center; height: 22px; padding: 4px 8px;
  background: var(--grey-100); border: 1px solid var(--grey-100);
  border-radius: var(--radius-pill);
  font-size: 12px; line-height: 1; font-weight: 700; color: var(--ink-strong);
}
.post__body {
  flex: 1; display: flex; flex-direction: column; justify-content: space-between;
  padding: 24px 16px 15px;
  color: var(--ink-strong);
}
.post__title { font-size: 14.4px; line-height: 1.2; color: var(--ink-strong); }
.post__title a:hover { color: var(--primary); }
/* Extrait tronqué à 3 lignes */
.post__excerpt {
  margin-top: 16px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 16px; line-height: 20px; font-weight: 300;
}
.post__excerpt strong { font-weight: 400; }
.post__meta { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.post__date { font-size: 16px; line-height: 24px; font-weight: 400; color: var(--ink-strong); }
/* Grille vide (catégorie sans article) */
.articles__empty { grid-column: 1 / -1; padding: 32px 0; text-align: center; color: var(--grey-700); }

/* ---------- Pagination (Angular Material) ---------- */
.paginator {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 0;
  min-height: 56px; margin-top: 8px; padding: 0 20px 16px;
  font-size: 12px; line-height: 20px; letter-spacing: .4px; color: var(--ink);
}
.paginator__size { position: relative; display: inline-flex; align-items: center; gap: 8px; }
/* Menu déroulant des tailles de page (3 / 6 / 10), ouvert par js/blog.js */
.paginator__menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20;
  min-width: 72px; padding: 8px 0; display: none;
  background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow-soft);
}
.paginator__menu.is-open { display: block; }
.paginator__menu li { padding: 10px 16px; font-size: 14px; line-height: 1; color: var(--ink); cursor: pointer; }
.paginator__menu li:hover { background: var(--grey-100); }
.paginator__menu li[aria-selected="true"] { color: var(--primary); font-weight: 600; background: var(--primary-soft); }
.paginator__select {
  display: inline-flex; align-items: center; gap: 56px;
  padding: 4px 8px 4px 0; font-size: 12px; font-weight: 500; letter-spacing: .45px;
  cursor: pointer;
}
.paginator__caret { width: 18px; height: 18px; color: var(--grey-700); }
.paginator__range { margin: 0 32px; }
.paginator__nav { display: inline-flex; }
.paginator__btn {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%;
  color: var(--ink);
  transition: background var(--dur) var(--ease);
}
.paginator__btn svg { width: 24px; height: 24px; transform: rotate(90deg); }
.paginator__btn--next svg { transform: rotate(-90deg); }
.paginator__btn:hover:not(:disabled) { background: var(--grey-100); }
.paginator__btn:disabled { color: var(--grey-200); cursor: default; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .articles__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
  .blog-hero { height: auto; min-height: 360px; padding: 48px 0 150px; }
  .blog-hero__title { font-size: 34px; letter-spacing: -0.03em; }
  .blog-hero__sub { margin-top: 24px; }
  .featured { margin-top: -120px; }
}
@media (max-width: 767px) {
  /* Hero compact : la carte vedette ne mord que sur le bas du hero (~80px) */
  .blog-hero { min-height: 0; padding: 70px 0 180px; }
  .blog-hero::after { height: 30px; }
  .blog-hero__title { font-size: 26px; line-height: 1.25; }
  .blog-hero__sub { font-size: 13px; line-height: 1.3; margin-top: 22px; padding: 0 12px; }
  .featured { margin-top: -80px; }
  .featured__card { width: 100%; }
  .featured__pic { height: 170px; }
  .featured__body { padding: 20px 24px 22px; }
  .featured__title { font-size: 16px; }
  .featured__excerpt { margin-top: 18px; font-size: 14px; line-height: 22px; }
  .featured__meta { margin-top: 18px; padding-right: 0; }
  .categories { margin-top: 80px; }
  .categories__title { font-size: 22px; padding-bottom: 8px; }
  .categories__list { justify-content: center; gap: 10px 12px; padding: 8px 0 0; }
  .articles { margin-top: 90px; }
  .articles__grid { grid-template-columns: 1fr; gap: 20px; padding: 16px 8px 0; }
  .post__pic { height: 140px; }
  .paginator { justify-content: flex-end; padding: 0 8px 8px; }
  .paginator__size { flex-basis: 100%; justify-content: flex-end; }
  .paginator__range { margin: 0 8px 0 0; }
}
