/* =========================================================
   HD Web Digital — blog (refonte 2026)
   Liste des articles ([hd_blog]) et modèle d'article ([hd_post]).
   Inspirations : Leverage (article à la une, filtres, cartes, grand titre)
   et Rozen (sommaire collant avec repère orange).
   Dépend de hd-base.css (variables) et hd-pages.css (.hd-page, .hd-wrap).
   ========================================================= */

/* ---------- En-tête de la liste ---------- */
.hd-blog-hero { background: var(--hd-bg); padding: 88px 0 64px; }
.hd-blog-hero__title {
  margin: 18px 0 0; font-size: clamp(54px, 10.5vw, 160px); line-height: .88; letter-spacing: -.045em;
  font-weight: 700; text-transform: uppercase; color: var(--hd-navy);
}
.hd-blog-hero__title span { color: var(--hd-orange); }
.hd-blog-hero__lead { max-width: 560px; margin: 32px 0 0 auto; font-size: 19px; line-height: 1.6; color: var(--hd-text-2); }

.hd-blog { display: flow-root; background: var(--hd-bg); padding: 0 0 120px; } /* flow-root : évite que la marge des filtres sorte du bloc */
.hd-blog-hero__title--cat { font-size: clamp(40px, 7.4vw, 112px); line-height: .92; }

/* ---------- Éléments communs ---------- */
.hd-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 13px; font-weight: 600; color: var(--hd-text-2); }
.hd-post-meta time { color: var(--hd-navy); }
.hd-post-tag {
  display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 4px;
  background: rgba(11,31,58,.06); color: var(--hd-navy) !important; font-size: 12px; font-weight: 700; line-height: 1.2; text-decoration: none;
}
a.hd-post-tag:hover { background: rgba(237,108,61,.14); color: var(--hd-orange-dark) !important; }
.hd-post-card__go {
  display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 6px;
  background: var(--hd-orange); color: #fff; transition: transform .35s ease, background-color .25s ease;
}
.hd-post-card__go svg { width: 16px; height: 16px; }
.hd-post-noimg { display: grid; place-items: center; width: 100%; height: 100%; background: var(--hd-navy); }
.hd-post-noimg span { font-size: 64px; font-weight: 800; letter-spacing: -.05em; color: var(--hd-orange); }

/* ---------- Article à la une (Leverage) ---------- */
.hd-post-feat { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; margin: 0; }
.hd-post-feat__media { display: block; position: relative; overflow: hidden; border-radius: var(--hd-radius); aspect-ratio: 16 / 11; background: var(--hd-navy); }
.hd-post-feat__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s cubic-bezier(.2,.7,.2,1); }
.hd-post-feat:hover .hd-post-feat__media img { transform: scale(1.04); }
.hd-post-feat__card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 40px; background: #fff; border: 1px solid var(--hd-line); border-radius: var(--hd-radius);
}
.hd-post-feat__badge { padding: 5px 9px; border-radius: 4px; background: var(--hd-orange); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.hd-post-feat__title { margin: 0; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.08; letter-spacing: -.025em; font-weight: 700; text-transform: uppercase; }
.hd-post-feat__title a { color: var(--hd-navy) !important; text-decoration: none; }
.hd-post-feat__title a:hover { color: var(--hd-orange) !important; }
.hd-post-feat__excerpt { margin: 0; font-size: 16px; line-height: 1.65; color: var(--hd-text-2); }
.hd-post-feat__more { display: inline-flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--hd-navy) !important; text-decoration: none; }
.hd-post-feat__more:hover .hd-post-card__go { transform: rotate(45deg); background: var(--hd-orange-dark); }

/* ---------- Filtres par catégorie ---------- */
.hd-blog__cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 72px 0 40px; }
.hd-blog__cats a {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border: 1px solid var(--hd-line); border-radius: 8px;
  background: transparent; color: var(--hd-navy) !important; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.hd-blog__cats a small { font-size: 12px; font-weight: 700; color: var(--hd-text-2); }
.hd-blog__cats a:hover { border-color: var(--hd-orange); }
.hd-blog__cats a[aria-current="page"] { background: #fff; border-color: #fff; box-shadow: 0 10px 30px -18px rgba(11,31,58,.45); }
.hd-blog__cats a[aria-current="page"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hd-orange); }

/* ---------- Grille d'articles ---------- */
.hd-blog__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hd-post-card {
  display: flex; flex-direction: column; padding: 10px; background: #fff; border: 1px solid var(--hd-line); border-radius: var(--hd-radius);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .25s ease, box-shadow .35s ease;
}
.hd-post-card:hover { transform: translateY(-4px); border-color: rgba(237,108,61,.6); box-shadow: 0 24px 48px -30px rgba(11,31,58,.45); }
.hd-post-card__media { display: block; overflow: hidden; border-radius: 8px; aspect-ratio: 16 / 10; background: var(--hd-navy); }
.hd-post-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s cubic-bezier(.2,.7,.2,1); }
.hd-post-card:hover .hd-post-card__media img { transform: scale(1.05); }
.hd-post-card__body { display: flex; flex-direction: column; gap: 14px; flex: 1; padding: 20px 14px 10px; }
.hd-post-card__title { margin: 0; font-size: 19px; line-height: 1.25; letter-spacing: -.01em; font-weight: 700; text-transform: uppercase; }
.hd-post-card__title a { color: var(--hd-navy) !important; text-decoration: none; }
.hd-post-card__title a::after { content: ""; position: absolute; inset: 0; } /* toute la carte est cliquable */
.hd-post-card { position: relative; }
.hd-post-card__title a:hover { color: var(--hd-orange) !important; }
.hd-post-card__excerpt { margin: 0; font-size: 15px; line-height: 1.6; color: var(--hd-text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hd-post-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--hd-line); }
.hd-post-card:hover .hd-post-card__go { transform: rotate(45deg); background: var(--hd-orange-dark); }

/* ---------- Pagination ---------- */
.hd-blog__pager { margin: 56px 0 0; }
.hd-blog__pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; }
.hd-blog__pager li { padding: 0 !important; }
.hd-blog__pager a, .hd-blog__pager span {
  display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 14px; border: 1px solid var(--hd-line); border-radius: 8px;
  background: #fff; color: var(--hd-navy) !important; font-size: 14px; font-weight: 700; text-decoration: none;
}
.hd-blog__pager a:hover { border-color: var(--hd-orange); color: var(--hd-orange) !important; }
.hd-blog__pager .current { background: var(--hd-navy); border-color: var(--hd-navy); color: #fff !important; }
.hd-blog__pager .dots { border: 0; background: none; }

/* ---------- Aucun article ---------- */
.hd-blog-empty { max-width: 640px; margin: 0 auto; padding: 48px; background: #fff; border: 1px solid var(--hd-line); border-radius: var(--hd-radius); text-align: center; color: var(--hd-text-2); font-size: 17px; line-height: 1.6; }
.hd-blog-empty p { margin: 0 0 20px; }
.hd-blog-empty__title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--hd-navy); }

/* =========================================================
   ARTICLE
   ========================================================= */
.hd-article { background: var(--hd-bg); color: var(--hd-text); font-family: var(--hd-font); }
.hd-article *, .hd-article *::before, .hd-article *::after { box-sizing: border-box; }
.hd-article__hero { padding: 72px 0 56px; text-align: center; }
.hd-crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 28px; font-size: 13px; color: var(--hd-text-2); }
.hd-crumbs a { color: var(--hd-text-2) !important; text-decoration: none; }
.hd-crumbs a:hover { color: var(--hd-orange) !important; }
.hd-crumbs [aria-current] { color: var(--hd-navy); font-weight: 600; }
.hd-article__meta { justify-content: center; }
.hd-article__title {
  max-width: 1120px; margin: 22px auto 0; padding: 0; font-size: clamp(34px, 4.8vw, 70px); line-height: 1.02; letter-spacing: -.035em;
  font-weight: 700; text-transform: uppercase; color: var(--hd-navy);
}
.hd-article__lead { max-width: 720px; margin: 28px auto 0; padding: 0; font-size: 19px; line-height: 1.6; color: var(--hd-text-2); }
.hd-article__cover { margin: 0 0 88px; overflow: hidden; border-radius: var(--hd-radius); aspect-ratio: 16 / 7; background: var(--hd-navy); }
.hd-article__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

.hd-article__layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; padding-bottom: 120px; }
.hd-article__aside { padding-right: 56px; }
.hd-article__sticky { position: sticky; top: calc(var(--hd-header-h, 72px) + 48px); }
body.admin-bar .hd-article__sticky { top: calc(var(--hd-header-h, 72px) + 80px); }
.hd-article__body { min-width: 0; padding-left: 64px; border-left: 1px dashed #CBD2DD; }

/* Sommaire (Rozen) */
.hd-toc__label { margin: 0 0 8px; padding: 0 0 12px; border-bottom: 1px solid var(--hd-line); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hd-text-2); }
.hd-toc ol { margin: 0; padding: 0; list-style: none; }
.hd-toc li { padding: 0 !important; list-style: none; }
.hd-toc a {
  display: block; padding: 8px 0 8px 14px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.45;
  color: var(--hd-text-2) !important; text-decoration: none; transition: color .2s ease, border-color .2s ease;
}
.hd-toc a:hover { color: var(--hd-navy) !important; }
.hd-toc a.is-active { border-left-color: var(--hd-orange); color: var(--hd-navy) !important; font-weight: 600; }

.hd-article__help { margin-top: 32px; padding: 24px; border-radius: var(--hd-radius); background: var(--hd-navy); color: rgba(255,255,255,.8); font-size: 14px; line-height: 1.6; }
.hd-article__help p { margin: 0 0 16px; padding: 0; }
.hd-article__help-title { font-size: 18px; font-weight: 700; color: #fff; }
.hd-article__help a { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 13px; letter-spacing: .02em; text-transform: uppercase; color: #FF9B70 !important; text-decoration: none; }
.hd-article__help a svg { width: 14px; height: 14px; transition: transform .3s ease; }
.hd-article__help a:hover svg { transform: rotate(45deg); }

/* Texte de l'article */
.hd-prose { max-width: 760px; font-size: 18px; line-height: 1.75; color: var(--hd-text); }
.hd-prose > *:first-child { margin-top: 0; }
.hd-prose p { margin: 0 0 22px; padding: 0; }
.hd-prose h2 {
  margin: 64px 0 20px; padding: 0; scroll-margin-top: 120px; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.1;
  letter-spacing: -.025em; font-weight: 700; text-transform: uppercase; color: var(--hd-navy);
}
.hd-prose h3 { margin: 40px 0 14px; padding: 0; scroll-margin-top: 120px; font-size: 22px; line-height: 1.3; letter-spacing: -.01em; font-weight: 700; color: var(--hd-navy); }
.hd-prose h4 { margin: 28px 0 10px; padding: 0; font-size: 18px; font-weight: 700; color: var(--hd-navy); }
.hd-prose a { color: var(--hd-orange-dark) !important; text-decoration: underline; text-underline-offset: 3px; }
.hd-prose a:hover { color: var(--hd-orange) !important; }
.hd-prose strong { color: var(--hd-navy); font-weight: 700; }
.hd-prose ul, .hd-prose ol { margin: 0 0 26px; padding: 0 !important; list-style: none !important; }
.hd-prose li { position: relative; margin: 0 0 10px; padding: 0 0 0 30px !important; list-style: none !important; line-height: 1.65; }
.hd-article .hd-prose ul > li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--hd-orange); }
.hd-prose ol { counter-reset: hd-ol; }
.hd-article .hd-prose ol > li { counter-increment: hd-ol; }
.hd-article .hd-prose ol > li::before { content: counter(hd-ol) "."; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--hd-orange); }
.hd-prose blockquote {
  margin: 36px 0; padding: 26px 30px; border: 0; border-left: 3px solid var(--hd-orange); border-radius: 0 var(--hd-radius) var(--hd-radius) 0;
  background: #fff; font-size: 20px; line-height: 1.55; font-weight: 600; font-style: normal; color: var(--hd-navy);
}
.hd-prose blockquote p:last-child { margin-bottom: 0; }
.hd-prose img { max-width: 100%; height: auto; border-radius: var(--hd-radius); }
.hd-prose figure { margin: 36px 0; }
.hd-prose figcaption { margin-top: 10px; font-size: 14px; color: var(--hd-text-2); text-align: center; }
.hd-prose hr { margin: 48px 0; border: 0; border-top: 1px dashed #CBD2DD; }
.hd-prose table { width: 100%; margin: 0 0 28px; border-collapse: collapse; font-size: 16px; background: #fff; border-radius: var(--hd-radius); overflow: hidden; }
.hd-prose th { padding: 14px 16px; background: var(--hd-navy); color: #fff; text-align: left; font-weight: 700; }
.hd-prose td { padding: 14px 16px; border-top: 1px solid var(--hd-line); }
.hd-prose .wp-block-table { margin: 0 0 28px; overflow-x: auto; }
.hd-prose code { padding: 2px 6px; border-radius: 4px; background: rgba(11,31,58,.07); font-size: .9em; }

/* Points clés en cartes (Leverage) : <ul class="hd-keypoints"> */
.hd-prose ul.hd-keypoints { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.hd-prose ul.hd-keypoints > li { margin: 0; padding: 18px 18px 18px 46px !important; background: #fff; border: 1px solid var(--hd-line); border-radius: 10px; font-size: 16px; }
.hd-article .hd-prose ul.hd-keypoints > li::before { left: 20px; top: 26px; }

/* Encadré « à retenir » : <div class="hd-callout"> */
.hd-prose .hd-callout { margin: 36px 0; padding: 26px 28px; border-radius: var(--hd-radius); background: var(--hd-navy); color: rgba(255,255,255,.85); }
.hd-prose .hd-callout strong, .hd-prose .hd-callout h3 { color: #fff; }
.hd-prose .hd-callout p:last-child { margin-bottom: 0; }

/* Questions fréquentes : <details><summary> */
.hd-prose details { margin: 0 0 10px; padding: 0 22px; background: #fff; border: 1px solid var(--hd-line); border-radius: 10px; }
.hd-prose summary { padding: 18px 0; cursor: pointer; font-weight: 700; color: var(--hd-navy); }
.hd-prose details[open] { border-color: rgba(237,108,61,.6); }

/* Pied d'article */
.hd-article__foot { max-width: 760px; margin-top: 64px; padding-top: 40px; border-top: 1px dashed #CBD2DD; display: grid; gap: 24px; }
.hd-article__author { display: flex; gap: 18px; align-items: flex-start; padding: 24px; background: #fff; border: 1px solid var(--hd-line); border-radius: var(--hd-radius); font-size: 15px; line-height: 1.6; color: var(--hd-text-2); }
.hd-article__author p { margin: 0; padding: 0; }
.hd-article__author-logo { display: grid; place-items: center; flex-shrink: 0; width: 64px; height: 64px; border-radius: 12px; background: var(--hd-bg); border: 1px solid var(--hd-line); }
.hd-article__author-logo img { width: 40px; height: auto; }
.hd-article__author-name { margin-bottom: 4px !important; font-size: 16px; font-weight: 700; color: var(--hd-navy); }
.hd-article__share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hd-article__share > span { margin-right: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hd-text-2); }
.hd-article__share a, .hd-article__share button {
  padding: 10px 14px; border: 1px solid var(--hd-line); border-radius: 6px; background: #fff; cursor: pointer;
  font: 700 13px/1 var(--hd-font); color: var(--hd-navy) !important; text-decoration: none; transition: border-color .2s ease, color .2s ease;
}
.hd-article__share a:hover, .hd-article__share button:hover { border-color: var(--hd-orange); color: var(--hd-orange) !important; }

/* À lire aussi */
.hd-related { background: var(--hd-bg); padding: 100px 0 120px; border-top: 1px solid var(--hd-line); }
.hd-related__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.hd-related__title { margin: 0; font-size: clamp(42px, 6.4vw, 96px); line-height: .92; letter-spacing: -.04em; font-weight: 700; text-transform: uppercase; color: var(--hd-navy); }
.hd-related__title span { color: var(--hd-orange); }
.hd-related__all { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--hd-navy) !important; text-decoration: none; }
.hd-related__all svg { width: 16px; height: 16px; color: var(--hd-orange); transition: transform .3s ease; }
.hd-related__all:hover svg { transform: rotate(45deg); }

/* ---------- Tablette ---------- */
@media (max-width: 980px) {
  .hd-blog-hero { padding: 64px 0 48px; }
  .hd-blog-hero__lead { margin-left: 0; }
  .hd-post-feat { grid-template-columns: 1fr; }
  .hd-post-feat__card { padding: 28px; }
  .hd-blog__grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .hd-blog__cats { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: 48px -20px 32px; padding: 0 20px 6px; scrollbar-width: none; }
  .hd-blog__cats::-webkit-scrollbar { display: none; }
  .hd-article__hero { padding: 56px 0 40px; }
  .hd-article__cover { margin-bottom: 48px; aspect-ratio: 16 / 9; }
  .hd-article__layout { grid-template-columns: 1fr; padding-bottom: 80px; }
  .hd-article__aside { padding-right: 0; margin-bottom: 40px; }
  .hd-article__sticky { position: static; }
  .hd-toc { padding: 20px 22px; background: #fff; border: 1px solid var(--hd-line); border-radius: var(--hd-radius); }
  .hd-article__help { display: none; }
  .hd-article__body { padding-left: 0; border-left: 0; }
  .hd-related { padding: 72px 0 80px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .hd-blog-hero__title { font-size: 12.4vw; }
  .hd-blog-hero__title--cat { font-size: 9vw; }
  .hd-blog-hero__lead { font-size: 17px; }
  .hd-blog { padding-bottom: 80px; }
  .hd-blog__grid { grid-template-columns: 1fr; }
  .hd-post-feat__card { padding: 22px; gap: 20px; }
  .hd-article__title { font-size: 9vw; }
  .hd-article__lead { font-size: 17px; }
  .hd-prose { font-size: 17px; }
  .hd-prose ul.hd-keypoints { grid-template-columns: 1fr; }
  .hd-article__author { flex-direction: column; }
}
/* Article à la une : la photo prend la même hauteur que la carte (24/10) */
@media (min-width: 981px) { .hd-post-feat__media { aspect-ratio: auto; height: 100%; min-height: 340px; } }
