/* ==========================================================================
   2M Digital — Blog : page article et liste /blog
   S'appuie sur style.css (titres, pastilles, liste groupée, FAQ, cartes d'article, encart d'appel).
   ========================================================================== */

/* ---------- En-tête de l'article ---------- */

.art-head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 32px;
  text-align: center;
}
.art-head .glow { top: -300px; right: max(-160px, (100% - 1440px) / 2); }
.art-head .crumbs { justify-content: center; font-size: 16px; }
.art-head .crumbs [aria-current] { display: inline-block; max-width: 48ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.art-head .title { max-width: 1200px; }
.art-preview { padding: 8px 16px; border-radius: 999px; background: var(--yellow); color: var(--on-yellow); font-size: 14px; font-weight: 600; }

.art-by { display: flex; align-items: center; gap: 14px; text-align: left; }
.art-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.art-by__name { font-size: 16px; font-weight: 600; }
.art-by__meta { font-size: 14px; color: var(--label-2); }

/* Image à la une */
.art-cover { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.art-cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); background: var(--surface-2); }
.art-cover figcaption { font-size: 13px; color: var(--label-3); text-align: center; }

/* Sommaire */
.art-toc-wrap { margin-top: 32px; }
.art-toc__title { padding: 22px 24px 4px; }
.art-toc .list__row { padding: 14px 24px; --sep-left: 24px; }
.art-toc .list__title { font-size: 17px; font-weight: 500; }
.art-toc .list__row:hover .list__title { color: var(--yellow); }

/* ---------- Corps + encart ---------- */

.art-layout {
  display: grid;
  grid-template-columns: minmax(0, 880px) 346px;
  justify-content: space-between;
  gap: 56px;
  align-items: start;
  margin-top: 72px;
}

.art-body { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.art-intro { font-size: 21px; line-height: 1.6; }
.art-h { scroll-margin-top: 110px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.art-h--1 { margin-top: 16px; font-size: 32px; }
.art-h--2 { margin-top: 8px; font-size: 26px; }
.art-h--3 { font-size: 21px; }
.art-h--4 { font-size: 18px; color: var(--label-2); }

.art-text { display: flex; flex-direction: column; gap: 18px; font-size: 18px; line-height: 1.65; }
.art-text a { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; }
.art-text strong { font-weight: 600; }
.art-text ul, .art-text ol { display: flex; flex-direction: column; gap: 12px; }
.art-text li { position: relative; padding-left: 24px; }
.art-text ul > li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.art-text ol { counter-reset: n; }
.art-text ol > li { counter-increment: n; padding-left: 32px; }
.art-text ol > li::before { content: counter(n) "."; position: absolute; left: 0; font-weight: 700; color: var(--yellow); font-variant-numeric: tabular-nums; }
.art-text li ul, .art-text li ol { margin-top: 10px; }

.art-quote { position: relative; padding: 28px 28px 28px 52px; background: var(--surface); border-radius: var(--r-card); }
.art-quote::before { content: ""; position: absolute; left: 28px; top: 28px; bottom: 28px; width: 4px; border-radius: 2px; background: var(--yellow); }
.art-quote p { font-size: 22px; font-weight: 600; line-height: 1.4; }
.art-quote cite { display: block; margin-top: 12px; font-size: 13px; font-style: normal; letter-spacing: .04em; text-transform: uppercase; color: var(--label-2); }

.art-figure { display: flex; flex-direction: column; gap: 12px; }
.art-figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-card); background: var(--surface-2); }
.art-figure figcaption, .art-table figcaption { font-size: 13px; color: var(--label-3); }

/* Tableau */
.art-table { display: flex; flex-direction: column; gap: 12px; }
.art-table__scroll { overflow-x: auto; background: var(--surface); border-radius: var(--r-card); }
.art-table__grid { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.art-table__grid th, .art-table__grid td { padding: 16px 20px; text-align: left; vertical-align: top; }
.art-table__grid th { background: var(--surface-2); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--label-2); }
.art-table__grid tbody tr + tr td { border-top: 1px solid var(--separator); }
.art-table__grid td:first-child { font-weight: 600; }
.art-table__grid--1 td:first-child { font-weight: 400; }

/* Encart « Un projet similaire » : suit la lecture */
.art-aside { position: relative; height: 100%; }
.art-cta { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 18px; padding: 28px; }
.art-cta__progress { display: flex; flex-direction: column; gap: 8px; padding-bottom: 18px; border-bottom: 1px solid var(--separator); }
.art-cta__progress-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--label-2); font-variant-numeric: tabular-nums; }
.art-cta__bar { display: block; height: 4px; overflow: hidden; border-radius: 2px; background: var(--surface-2); }
.art-cta__fill { display: block; width: 100%; height: 100%; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .15s linear; }
.art-cta__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-md); background: var(--surface-2); }
.art-cta__title { font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
.art-cta__text { font-size: 16px; line-height: 1.5; color: var(--label-2); }
.art-cta__link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--label-2); }
.art-cta__link .icon { width: 16px; height: 16px; }
.art-cta__link:hover { color: var(--yellow); }

/* ---------- Pied d'article : auteur, étiquettes, partage ---------- */

.art-foot { display: grid; grid-template-columns: minmax(0, 616px) minmax(0, 1fr); gap: 48px; align-items: center; margin-top: 80px; }
.section + .art-foot { margin-top: 16px; }
.art-author { display: flex; align-items: flex-start; gap: 20px; padding: 28px; }
.art-author__photo { width: 72px; height: 72px; flex-shrink: 0; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.art-author__kicker { font-size: 13px; font-weight: 600; color: var(--label-2); }
.art-author__name { margin-top: 4px; font-size: 24px; font-weight: 600; }
.art-author__role { margin-top: 2px; font-size: 16px; color: var(--label-2); }
.art-author__bio { margin-top: 8px; font-size: 16px; line-height: 1.5; }
.art-meta { display: flex; flex-direction: column; gap: 16px; }
.art-meta > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.art-meta dt { font-size: 15px; color: var(--label-2); }
.art-meta dd { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.art-meta .pill { border: 0; cursor: pointer; }
.art-meta a.pill:hover, .art-meta button.pill:hover { background: var(--surface-3); color: var(--label); }

/* ---------- Newsletter ---------- */

.news { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 48px 24px; text-align: center; }
.news__text { max-width: 720px; font-size: 22px; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
.news__form { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: min(100%, 600px); margin-top: 8px; }
.news__form input[type="email"] {
  flex: 1 1 280px;
  min-height: 56px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--label);
  font: inherit;
  font-size: 17px;
}
.news__form input::placeholder { color: var(--label-3); }
.news__form input:focus { outline: none; border-color: var(--yellow); }
.art-news__msg { flex-basis: 100%; min-height: 1px; font-size: 15px; }
.art-news__msg--ok { color: var(--green); }
.art-news__msg--ko { color: var(--red); }
.news__legal { max-width: 560px; font-size: 13px; line-height: 1.5; color: var(--label-3); }
.news__legal a { text-decoration: underline; }

/* ---------- Page /blog ---------- */

.blog-hero { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; padding-top: 64px; padding-bottom: 56px; }
.blog-hero .glow { top: -260px; right: max(-160px, (100% - 1440px) / 2); }
.blog-empty { padding: 80px 0; color: var(--label-2); text-align: center; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .art-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: 48px; }
  .art-aside { height: auto; }
  .art-cta { position: static; }
  .art-cta__progress { display: none; }
  .art-foot { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 640px) {
  .art-head { padding-top: 24px; gap: 18px; }
  .art-head .crumbs { font-size: 14px; }
  .art-head .crumbs [aria-current] { max-width: 22ch; }
  .art-cover img { border-radius: var(--r-card); }
  .art-intro { font-size: 19px; }
  .art-text { font-size: 17px; }
  .art-h--1 { font-size: 27px; }
  .art-h--2 { font-size: 23px; }
  .art-quote { padding: 22px 22px 22px 42px; }
  .art-quote::before { left: 22px; top: 22px; bottom: 22px; }
  .art-quote p { font-size: 19px; }
  .art-table__grid th, .art-table__grid td { min-width: 130px; padding: 12px 14px; font-size: 15px; }
  .art-author { flex-direction: column; padding: 24px; }
  .art-meta > div { flex-direction: column; align-items: flex-start; }
  .art-meta dd { justify-content: flex-start; }
  .news { padding: 36px 20px; }
  .news__text { font-size: 19px; }
  .news__form .btn { width: 100%; }
  .blog-hero { padding-top: 40px; padding-bottom: 40px; }
}
