/* Articles de blog Solipose. Chargé uniquement sur les pages /blog/. */

:root {
  --blog-accent: #cea587;
  --blog-ink: #1d1d1d;
  --blog-muted: #5c5752;
  --blog-line: #d8cfc6;
  --blog-paper: #f6f2ee;
  --blog-dark: #252323;
  --blog-text-w: 44rem;   /* largeur de lecture : environ 70 caractères */
  --blog-wide-w: 60rem;   /* images et blocs larges */
}

/* ---------- Barre de progression de lecture ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 1000;
  pointer-events: none;
  background: rgba(255, 255, 255, .08);
}
.reading-progress__bar {
  height: 100%;
  width: 100%;
  background: var(--blog-accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  will-change: transform;
}

/* ---------- En-tête de l'article (fond sombre, sous la navbar fixe) ---------- */
.article-header {
  background: var(--blog-dark);
  color: #fff;
  padding: 11rem 1.25rem 7rem;
}
.article-header__inner { max-width: var(--blog-wide-w); margin: 0 auto; text-align: center; }
.breadcrumb { font-family: Futura LT, Arial, sans-serif; font-size: .875rem; letter-spacing: .02em; color: #cfc8c1; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; opacity: .5; }
.breadcrumb a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .35); }
.breadcrumb a:hover { text-decoration-color: var(--blog-accent); }
.article-tag {
  display: inline-block;
  margin-top: 2rem;
  padding: .45rem .9rem .35rem;
  border: 1px solid var(--blog-accent);
  border-radius: 999px;
  color: var(--blog-accent);
  font-family: Futura LT, Arial, sans-serif;
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.article-header h1 {
  color: #fff;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.05;
  margin: 1.25rem auto 0;
  max-width: 18em;
  text-wrap: balance;
}
.article-lead {
  max-width: 38rem;
  margin: 1.75rem auto 0;
  font-size: 1.1875rem;
  line-height: 1.7;
  color: #e9e3dd;
}
.article-meta {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.5rem;
  font-family: Futura LT, Arial, sans-serif;
  font-size: .9375rem;
  color: #cfc8c1;
}
.article-meta span { display: inline-flex; align-items: center; gap: .4rem; }

/* ---------- Image principale ---------- */
.article-cover {
  max-width: var(--blog-wide-w);
  margin: -4.5rem auto 0;
  padding: 0 1.25rem;
}
.article-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
}

/* ---------- Corps de l'article ---------- */
.article {
  padding: 4rem 1.25rem 6rem;
  font-family: Work Sans, Arial, sans-serif;
  color: var(--blog-ink);
}
.article-body { max-width: var(--blog-text-w); margin: 0 auto; }

/* Rythme vertical : un seul système d'espacement, les titres « collent » à leur contenu */
.article-body > * + * { margin-top: 1.5rem; }
.article-body p,
.article-body li { font-size: 1.125rem; line-height: 1.8; }
.article-body h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.375rem);
  line-height: 1.15;
  margin-top: 4.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--blog-line);
  scroll-margin-top: 8rem;
}
.article-body h3 {
  font-family: Playfairdisplay, Georgia, serif;
  font-weight: 800;
  text-transform: none;
  font-size: 1.375rem;
  line-height: 1.3;
  margin-top: 2.75rem;
  scroll-margin-top: 8rem;
}
.article-body h2 + *,
.article-body h3 + * { margin-top: 1rem; }
.article-body a:not(.button):not(.toc a) {
  color: var(--blog-ink);
  text-decoration: underline;
  font-weight: 600;
  text-decoration-color: var(--blog-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: background-color .2s;
}
.article-body a:not(.button):hover { background-color: rgba(206, 165, 135, .18); }
.article-body strong { font-weight: 600; }
.article-body ul,
.article-body ol { padding-left: 1.4rem; }
.article-body li + li { margin-top: .5rem; }
.article-body ul li::marker { color: var(--blog-accent); }
.article-body ol li::marker { color: var(--blog-accent); font-weight: 600; }

/* Sommaire */
.toc {
  background: var(--blog-paper);
  border: 1px solid var(--blog-line);
  border-radius: 6px;
  padding: 1.5rem 1.75rem;
}
.toc__title { font-family: Futura LT, Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: .875rem; color: var(--blog-muted); }
.toc ol { margin: .75rem 0 0; padding-left: 1.2rem; }
.toc li { font-size: 1rem !important; line-height: 1.5 !important; }
.toc li + li { margin-top: .4rem !important; }
.toc a { color: var(--blog-ink); text-decoration: none; }
.toc a:hover, .toc a.is-active { color: #9a6f50; text-decoration: underline; text-underline-offset: 3px; }

/* Encadré « À retenir » / « Conseil d'artisan » */
.callout {
  border-left: 4px solid var(--blog-accent);
  background: var(--blog-paper);
  padding: 1.25rem 1.5rem;
  border-radius: 0 6px 6px 0;
}
.callout__title { font-family: Futura LT, Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: .8125rem; color: #9a6f50; margin: 0 0 .5rem !important; }
.callout p { margin: 0; }
.callout p + p { margin-top: .75rem; }

/* Citation */
.pullquote {
  margin: 3rem 0 !important;
  padding: 0 0 0 1.5rem;
  border-left: 2px solid var(--blog-ink);
}
.pullquote p { font-family: Playfairdisplay, Georgia, serif; font-size: 1.5rem !important; line-height: 1.45 !important; font-style: italic; }
.pullquote cite { display: block; margin-top: .75rem; font-family: Futura LT, Arial, sans-serif; font-style: normal; font-size: .9375rem; color: var(--blog-muted); }

/* Images dans le texte */
.article-figure { margin-left: 0; margin-right: 0; }
.article-figure img { display: block; width: 100%; height: auto; border-radius: 6px; }
.article-figure figcaption { margin-top: .6rem; font-size: .9375rem; line-height: 1.5; color: var(--blog-muted); }
.article-figure--wide { width: min(var(--blog-wide-w), calc(100vw - 2.5rem)); position: relative; left: 50%; transform: translateX(-50%); }
.article-figure--pair .pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.article-figure--pair img { height: auto; aspect-ratio: 3 / 4; object-fit: cover; }

/* Tableau */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.5; min-width: 32rem; }
.article-body th, .article-body td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--blog-line); vertical-align: top; }
.article-body thead th { font-family: Futura LT, Arial, sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: .06em; font-size: .8125rem; color: var(--blog-muted); border-bottom: 2px solid var(--blog-ink); }

/* Bloc d'appel à l'action */
.cta-box {
  margin: 3.5rem 0 !important;
  background: var(--blog-dark);
  color: #fff;
  border-radius: 8px;
  padding: 2.25rem 2rem;
  text-align: center;
}
.cta-box__title { font-family: Made Mirage, Arial, sans-serif; text-transform: uppercase; font-size: 1.75rem; line-height: 1.15; color: #fff; }
.cta-box p { color: #e9e3dd; margin: .75rem auto 0; max-width: 32rem; }
.cta-box .button-group { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.5rem; }
.cta-box .button { margin: 0; }

/* Encadré de maillage vers l'accueil */
.link-card {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.25rem;
  align-items: center;
  border: 1px solid var(--blog-line);
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  text-decoration: none !important;
  transition: box-shadow .25s, transform .25s;
}
.link-card:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, .08); transform: translateY(-2px); background: #fff !important; }
.link-card img { width: 7rem; height: 7rem; object-fit: cover; border-radius: 4px; }
.link-card__kicker { font-family: Futura LT, Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: #9a6f50; }
.link-card__title { font-family: Playfairdisplay, Georgia, serif; font-weight: 800; font-size: 1.1875rem; line-height: 1.3; margin-top: .25rem; color: var(--blog-ink); }
.link-card__text { font-size: .9375rem; line-height: 1.5; color: var(--blog-muted); margin-top: .35rem; }

/* FAQ de l'article */
.article-faq details { border-bottom: 1px solid var(--blog-line); }
.article-faq details:first-of-type { border-top: 1px solid var(--blog-line); }
.article-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  font-family: Playfairdisplay, Georgia, serif;
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.4;
}
.article-faq summary::-webkit-details-marker { display: none; }
.article-faq summary::after { content: "+"; font-family: Futura LT, Arial, sans-serif; font-weight: 400; font-size: 1.5rem; line-height: 1; transition: transform .25s; }
.article-faq details[open] summary::after { transform: rotate(45deg); }
.article-faq details p { padding-bottom: 1.25rem; margin: 0; }

/* Auteur */
.author-box {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-top: 4.5rem !important;
  padding-top: 2rem;
  border-top: 1px solid var(--blog-line);
}
.author-box img { width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; background: #fff; border: 1px solid var(--blog-line); padding: .5rem; flex: none; }
.author-box p { font-size: 1rem !important; line-height: 1.6 !important; margin: 0; }
.author-box strong { font-family: Futura LT, Arial, sans-serif; font-weight: 400; font-size: 1.0625rem; }

/* Articles liés */
.related { max-width: var(--blog-wide-w); margin: 0 auto; padding: 0 1.25rem 6rem; }
.related h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); text-align: center; margin-bottom: 2.25rem; }
.related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.related-card { display: block; background: #fff; border-radius: 8px; overflow: hidden; color: var(--blog-ink); transition: box-shadow .25s, transform .25s; }
.related-card:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.related-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.related-card__body { padding: 1rem 1.1rem 1.25rem; }
.related-card__tag { font-family: Futura LT, Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: #9a6f50; }
.related-card__title { font-family: Playfairdisplay, Georgia, serif; font-weight: 800; font-size: 1.125rem; line-height: 1.35; margin-top: .35rem; }

/* ---------- Mobile ---------- */
@media screen and (max-width: 767px) {
  .article-header { padding: 9.5rem 1.25rem 5.5rem; }
  .article-lead { font-size: 1.0625rem; }
  .article-cover { margin-top: -3rem; }
  .article { padding-top: 3rem; }
  .article-body p, .article-body li { font-size: 1.0625rem; }
  .article-body h2 { margin-top: 3.5rem; padding-top: 1.5rem; }
  .article-body h3 { margin-top: 2.25rem; font-size: 1.25rem; }
  .pullquote p { font-size: 1.3125rem !important; }
  .cta-box { padding: 1.75rem 1.25rem; }
  .cta-box .button { width: 100%; }
  .link-card { grid-template-columns: 5rem 1fr; }
  .link-card img { width: 5rem; height: 5rem; }
  .related__grid { grid-template-columns: 1fr; }
  .author-box { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .link-card, .related-card, .article-faq summary::after { transition: none; }
}

/* Les titres de blocs sont des <p> : on passe devant la règle générale .article-body p */
.article-body .cta-box__title { font-size: 1.75rem; line-height: 1.15; }
.article-body .callout__title,
.article-body .toc__title { font-size: .8125rem; line-height: 1.4; }
.article-body .cta-box p:not(.cta-box__title) { font-size: 1.0625rem; }
@media screen and (max-width: 767px) { .article-body .cta-box__title { font-size: 1.5rem; } }

/* ---------- Pages services ---------- */
.service-header-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 2rem; }
.service-header-cta .button { margin: 0; }
.proof-link { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .35); }
.hero-proof_stars { color: #f5c04e; letter-spacing: 1px; }
.article-body .service-list { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.article-body .service-list li { margin: 0; }
.article-body .service-list a { display: block; padding: 1rem 1.25rem; border: 1px solid var(--blog-line); border-radius: 8px; background: #fff; text-decoration: none; font-family: Playfairdisplay, Georgia, serif; font-weight: 800; }
.article-body .service-list a:hover { background: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .08); }
@media screen and (max-width: 767px) {
  .article-body .service-list { grid-template-columns: 1fr; }
  .service-header-cta .button { width: 100%; }
}
.link-card__kicker, .link-card__title, .link-card__text { display: block; }
