/* ==========================================================================
   2M/Digital — Blog : page article (maquette « template article ») et liste /blog
   S'appuie sur style.css (tokens, menu, pied de page) et contact.css (.cta-band).
   ========================================================================== */

.art {
  width: min(100% - 2 * var(--gutter), 1064px);
  margin: 0 auto;
  padding: 34px 0 110px;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.art-preview { margin-bottom: 24px; padding: 10px 14px; background: var(--yellow); color: var(--ink); font-weight: 700; }

/* ---------- En-tête ---------- */

.art-crumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); }
.art-crumbs a { transition: color .15s; }
.art-crumbs a:hover { color: var(--paper); }
.art-crumbs__current { color: var(--yellow); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }

.art-head { margin-top: 44px; }
.art-cat { color: var(--yellow); font-size: 12px; }
.art-title {
  max-width: 820px;
  margin-top: 20px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 4.2vw, 60px);
  line-height: .95;
}
.art-by { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.art-avatar { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; background: var(--surface); }
.art-by__name { font-weight: 600; font-size: 16px; }
.art-by__meta { margin-top: 4px; color: var(--muted); }

/* ---------- Couverture ---------- */

.art-cover { margin: 28px 0 0; }
.art-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); }
.art-cover figcaption, .art-figure figcaption { margin-top: 12px; color: var(--muted); }

/* ---------- Sommaire ---------- */

.art-toc { margin-top: 26px; padding: 26px 28px 10px; border: 1px solid var(--line); }
.art-toc__title { color: var(--yellow); }
.art-toc__list { margin-top: 18px; }
.art-toc__list li + li { border-top: 1px solid var(--line); }
.art-toc__list a { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; transition: color .15s; }
.art-toc__num { flex-shrink: 0; color: var(--yellow); font-size: 14px; }
.art-toc__label { flex: 1; font-size: 16px; }
.art-toc__arrow { color: var(--muted); font-size: 13px; transition: transform .15s, color .15s; }
.art-toc__list a:hover .art-toc__label { color: var(--yellow); }
.art-toc__list a:hover .art-toc__arrow { color: var(--yellow); transform: translateX(3px); }

/* ---------- Corps + colonne ---------- */

.art-layout {
  display: grid;
  grid-template-columns: minmax(0, 680px) 320px;
  justify-content: space-between;
  gap: 64px;
  margin-top: 60px;
}
.art-body { min-width: 0; }

.art-intro { margin-bottom: 30px; font-size: 20px; line-height: 1.7; color: var(--paper); }

.art-h {
  scroll-margin-top: 24px;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
}
.art-h--1 { margin: 44px 0 20px; font-size: 38px; }
.art-h--2 { margin: 36px 0 16px; font-size: 30px; }
.art-h--3 { margin: 30px 0 14px; font-size: 24px; }
.art-h--4 { margin: 26px 0 12px; font-size: 20px; color: var(--muted); }
.art-body > .art-h:first-child { margin-top: 0; }

.art-text { font-size: 17px; line-height: 1.72; color: var(--muted); }
.art-text p { margin: 0 0 22px; }
.art-text strong { color: var(--paper); font-weight: 600; }
.art-text a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 3px; }
.art-text a:hover { color: var(--yellow); }
.art-text ul, .art-text ol { margin: 0 0 24px; padding: 0; list-style: none; }
.art-text li { position: relative; margin-bottom: 12px; padding-left: 22px; }
.art-text ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 9px;
  height: 2px;
  background: var(--yellow);
}
.art-text ol { counter-reset: n; }
.art-text ol > li { counter-increment: n; padding-left: 30px; }
.art-text ol > li::before {
  content: counter(n, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: .3em;
  font: 700 12px/1.4 var(--font-mono);
  color: var(--yellow);
}
.art-text li ul, .art-text li ol { margin: 10px 0 0; }

.art-quote { margin: 34px 0; padding: 4px 0 4px 28px; border-left: 3px solid var(--yellow); }
.art-quote p {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.12;
}
.art-quote cite { display: block; margin-top: 14px; font-style: normal; color: var(--muted); font-size: 10px; }

.art-figure { margin: 30px 0; }
.art-figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); }

/* Tableau */
.art-table { margin: 30px 0; }
.art-table figcaption { margin-top: 12px; color: var(--muted); }
.art-table__scroll { overflow-x: auto; border: 1px solid var(--line); }
.art-table__grid { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.art-table__grid th, .art-table__grid td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.art-table__grid th { background: var(--surface); color: var(--yellow); font: 700 11px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.art-table__grid tbody tr:last-child td { border-bottom: 0; }
.art-table__grid td:first-child { font-weight: 700; }
.art-table__grid--1 td:first-child { font-weight: 400; }
.art-table__grid th + th, .art-table__grid td + td { border-left: 1px solid var(--line); }
@media (max-width: 640px) { .art-table__grid th, .art-table__grid td { min-width: 130px; padding: 12px 14px; font-size: 14px; } }

/* Encadré « Un projet similaire » */
.art-aside { position: relative; }
.art-cta {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px;
  background: var(--surface);
  border: 1px dashed var(--yellow);
}
.art-cta__title { font-family: var(--font-display); font-weight: 900; font-size: 32px; line-height: .92; }
.art-cta__text { font-size: 15px; line-height: 1.55; color: var(--muted); }
.art-cta__btn {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: var(--yellow);
  color: var(--ink);
  font: 700 12px/1 var(--font-mono);
  letter-spacing: .06em;
  transition: transform .15s, box-shadow .15s;
}
.art-cta__btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--paper); }
.art-cta__btn:focus-visible, .art-cta__link:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.art-cta__link {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line);
  transition: color .15s, text-decoration-color .15s;
}
.art-cta__link:hover { color: var(--yellow); text-decoration-color: var(--yellow); }
.art-cta__progress { display: flex; flex-direction: column; gap: 8px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.art-cta__progress-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.art-cta__bar { display: block; height: 3px; background: var(--line); }
.art-cta__fill { display: block; width: 100%; height: 100%; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .15s linear; }

/* ---------- FAQ de fin d'article (accordéon natif) ---------- */

.art-faq { margin-top: 90px; }
.art-faq__title { font-family: var(--font-display); font-weight: 900; font-size: clamp(36px, 4.4vw, 56px); line-height: .9; }
.art-faq__list { margin-top: 34px; border-top: 1px solid var(--line); }
.art-qa { border-bottom: 1px solid var(--line); }
.art-qa summary {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 32px;
  align-items: center;
  padding-block: 22px;
  cursor: pointer;
  list-style: none;
}
.art-qa summary::-webkit-details-marker { display: none; }
.art-qa summary:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.art-qa__num { color: var(--yellow); font-size: 11px; }
.art-qa__q { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.15; transition: color .15s; }
.art-qa summary:hover .art-qa__q { color: var(--yellow); }
.art-qa__toggle { position: relative; width: 28px; height: 28px; border: 1px solid var(--line); transition: border-color .15s; }
.art-qa__toggle::before, .art-qa__toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: var(--paper);
  transform: translate(-50%, -50%);
  transition: transform .2s, opacity .2s, background-color .15s;
}
.art-qa__toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.art-qa[open] .art-qa__toggle { border-color: var(--yellow); }
.art-qa[open] .art-qa__toggle::before { background: var(--yellow); }
.art-qa[open] .art-qa__toggle::after { transform: translate(-50%, -50%) rotate(0deg); opacity: 0; }
.art-qa__a { padding: 0 44px 24px 56px; font-size: 16px; line-height: 1.6; color: var(--muted); }
@media (max-width: 640px) {
  .art-faq { margin-top: 60px; }
  .art-qa summary { grid-template-columns: 34px minmax(0, 1fr) 28px; }
  .art-qa__q { font-size: 18px; }
  .art-qa__a { padding: 0 8px 20px 34px; font-size: 15px; }
}

/* ---------- Tags + partage ---------- */

.art-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 90px;
  padding: 24px 0;
  border-block: 1px solid var(--line);
}
.art-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.art-tags li { padding: 7px 12px; border: 1px solid var(--line-strong, #55554f); font-size: 14px; }
.art-share { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.art-share span { color: var(--muted); }
.art-share a, .art-share button { padding: 0; background: none; border: 0; color: var(--paper); font: inherit; letter-spacing: inherit; cursor: pointer; transition: color .15s; }
.art-share a:hover, .art-share button:hover { color: var(--yellow); }

/* ---------- Auteur ---------- */

.art-author {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 24px;
  margin-top: 50px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.art-author__photo { width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; }
.art-author__kicker { color: var(--muted); font-size: 10px; }
.art-author__name { margin-top: 8px; font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; }
.art-author__role { margin-top: 10px; color: var(--yellow); font-size: 15px; }
.art-author__bio { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* ---------- Cartes d'articles (« À lire aussi » et /blog) ---------- */

.art-related { margin-top: 70px; }
.art-related__title { font-family: var(--font-display); font-weight: 900; font-size: 44px; line-height: 1; }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; margin-top: 30px; }
.blog-card[hidden] { display: none; }
.blog-card__link { display: block; }
.blog-card__visual {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color .15s;
}
.blog-card__visual:not(.blog-card__visual--img)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(125deg, transparent 0 38.3px, var(--line) 38.3px 39.3px);
}
.blog-card__visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.blog-card__link:hover .blog-card__visual { border-color: var(--muted); }
.blog-card__link:hover img { transform: scale(1.02); }
.blog-card__cat { margin-top: 16px; color: var(--yellow); }
.blog-card__title { margin-top: 10px; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.05; transition: color .15s; }
.blog-card__link:hover .blog-card__title { color: var(--yellow); }
.blog-card__meta { margin-top: 10px; color: var(--muted); font-size: 10px; }

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

.art-news {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: 70px;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.art-news__title { font-family: var(--font-display); font-weight: 900; font-size: 30px; line-height: 1; }
.art-news__text { max-width: 380px; margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.art-news__form { position: relative; display: flex; flex-wrap: wrap; flex: 0 1 390px; }
.art-news__form input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 0;
  color: var(--paper);
  font: 400 15px var(--font-body);
}
.art-news__form input[type="email"]:focus { outline: none; border-color: var(--yellow); }
.art-news__form button {
  height: 48px;
  padding: 0 20px;
  background: var(--yellow);
  border: 0;
  color: var(--ink);
  font: 700 12px/1 var(--font-mono);
  letter-spacing: .06em;
  cursor: pointer;
}
.art-news__msg { flex-basis: 100%; min-height: 1.2em; margin-top: 10px; font-size: 14px; color: var(--muted); }
.art-news__legal { flex-basis: 100%; margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.art-news__legal a { color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }
.art-news__msg--ok { color: var(--yellow); }
.art-news__msg--ko { color: #ff6b4a; }

/* ---------- Bandeau final ---------- */

.cta-band--art { padding-block: 80px; }
.cta-band--art .cta-band__title { font-size: clamp(36px, 3.5vw, 50px); line-height: .92; }

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

.blog-hero { padding-top: 26px; }
.blog-hero__title { font-family: var(--font-display); font-weight: 900; font-size: clamp(60px, 8.4vw, 122px); line-height: .86; }
.blog-hero__lead { max-width: 720px; margin-top: 36px; font-size: 19px; line-height: 1.5; color: var(--muted); }
.blog-grid--list { margin-top: 56px; }
.blog-empty { padding: 80px 0; color: var(--muted); text-align: center; }

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

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

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .art-cover img, .art-figure img, .blog-card__visual { aspect-ratio: 3 / 5; }
  .art { padding-bottom: 80px; }
  .art-head { margin-top: 28px; }
  .art-toc { padding: 20px 18px 6px; }
  .art-intro { font-size: 18px; }
  .art-h--1 { font-size: 30px; }
  .art-h--2 { font-size: 25px; }
  .art-quote p { font-size: 23px; }
  .art-foot { margin-top: 60px; }
  .art-author { grid-template-columns: 1fr; padding: 24px 20px; }
  .art-related__title { font-size: 36px; }
  .blog-grid { grid-template-columns: 1fr; }
  .art-news { padding: 26px 20px; }
  .art-news__form { flex-basis: 100%; }
  .art-news__form button { padding: 0 14px; }
}
