/* =========================================================
   Blog — styles dédiés (à charger en plus de style-v2.css)
   ========================================================= */

/* --- Index : hero --- */
.blog-hero {
  padding: 72px 0 40px;
  text-align: center;
}
.blog-hero h1 {
  margin: 12px auto 18px;
  max-width: 880px;
  font-size: clamp(36px, 3vw, 48px);
  line-height: 1.15;
  font-weight: 700;
}
.blog-hero p {
  margin: 0 auto;
  max-width: 720px;
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.55;
  color: #35284a;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--violet);
}

/* --- Filtres catégories --- */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 24px 0 40px;
}
.blog-filter {
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--brown);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.blog-filter:hover { border-color: var(--violet); color: var(--violet); }
.blog-filter.is-active {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

/* --- Grille d'articles --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  padding: 0 0 80px;
}
.article-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e6dfd2;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(24, 7, 44, 0.08);
}
.article-card .cover {
  aspect-ratio: 16 / 10;
  background: var(--lavender);
  background-size: cover;
  background-position: center;
}
.article-card .cover.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--violet);
  font-family: "Redaction35", "IBM Plex Sans", serif;
  font-size: 22px;
  font-weight: 700;
}
.article-card .body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.article-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #6b5e52;
}
.article-card .cat {
  background: var(--mint);
  color: var(--violet-dark);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.article-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--violet-dark);
}
.article-card .excerpt {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #4a3e34;
}
.article-card .read-more {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--violet);
}
.article-card .read-more::after { content: " →"; }

/* --- Page article --- */
.article-hero {
  padding: 48px 0 24px;
}
.breadcrumb {
  font-size: 14px;
  color: #6b5e52;
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--violet); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.article-hero h1 {
  margin: 12px 0 18px;
  max-width: 860px;
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1.15;
  font-weight: 700;
  color: var(--violet-dark);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 14px;
  color: #6b5e52;
  margin-bottom: 28px;
}
.article-meta .cat {
  background: var(--mint);
  color: var(--violet-dark);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
}
.article-cover {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 8px auto 8px;
}
.article-cover.placeholder {
  aspect-ratio: 16 / 9;
  background: var(--lavender);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--violet);
  font-family: "Redaction35", "IBM Plex Sans", serif;
  font-size: 28px;
}

/* --- Layout article : sommaire + corps --- */
.article-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  padding: 40px 0 80px;
  align-items: start;
}
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static !important; }
}
.toc {
  position: sticky;
  top: 24px;
  font-size: 14px;
  border-left: 2px solid var(--lavender);
  padding-left: 18px;
}
.toc h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--violet);
  margin: 0 0 12px;
}
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toc li { counter-increment: toc; }
.toc a {
  text-decoration: none;
  color: #4a3e34;
  display: block;
  line-height: 1.4;
}
.toc a:hover { color: var(--violet); }

/* --- Corps de l'article --- */
.article-body {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.7;
  color: #2b2118;
}
.article-body h2 {
  margin: 48px 0 14px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--violet-dark);
  scroll-margin-top: 24px;
}
.article-body h3 {
  margin: 32px 0 10px;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--violet-dark);
}
.article-body p { margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.article-body strong { color: var(--violet-dark); }
.article-body blockquote {
  margin: 24px 0;
  padding: 16px 22px;
  border-left: 4px solid var(--violet);
  background: var(--lavender);
  font-style: italic;
}
.article-body .lead {
  font-size: 19px;
  line-height: 1.55;
  color: #35284a;
  margin-bottom: 28px;
}
.article-body .callout {
  background: var(--mint);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0;
  font-size: 16px;
}

/* --- Carte "Exemple de prompt" --- */
.article-body .prompt-card {
  background: var(--lavender);
  border-left: 4px solid var(--violet);
  border-radius: 10px;
  padding: 18px 22px 20px;
  margin: 28px 0;
  position: relative;
}
.article-body .prompt-card .prompt-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 10px;
}
.article-body .prompt-card .prompt-label::before {
  content: "✦ ";
}
.article-body .prompt-card pre {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  font-family: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--violet-dark);
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* --- CTA fin d'article --- */
.article-cta {
  margin-top: 56px;
  padding: 40px 32px;
  background: var(--violet-dark);
  color: #fff;
  border-radius: 14px;
  text-align: center;
}
.article-cta h2 {
  color: #fff;
  margin: 0 0 12px;
  font-size: 26px;
  line-height: 1.2;
}
.article-cta p { margin: 0 0 22px; opacity: 0.9; color: #fff; }
.article-body .article-cta strong { color: #fff; }
.article-body .article-cta a.btn,
.article-body .article-cta a.btn-primary {
  color: #fff;
  background: var(--violet);
  text-decoration: none;
}

/* --- Articles liés --- */
.related {
  padding: 60px 0 80px;
  border-top: 1px solid #e6dfd2;
}
.related h2 {
  font-size: 24px;
  margin: 0 0 28px;
  color: var(--violet-dark);
}

/* =========================================================
   Composants UX / lisibilité article
   ========================================================= */

/* --- Barre de progression de lecture (en haut de page) --- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--violet);
  z-index: 100;
  transition: width 0.08s ease-out;
}

/* --- Date de mise à jour --- */
.article-updated {
  font-size: 13px;
  color: #6b5e52;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.article-updated::before {
  content: "↻";
  color: var(--violet);
  font-weight: 700;
}

/* --- Sommaire actif (scrollspy) --- */
.toc a.is-active {
  color: var(--violet);
  font-weight: 700;
  position: relative;
}
.toc a.is-active::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--violet);
  border-radius: 2px;
}

/* --- TL;DR / À retenir --- */
.tldr {
  background: linear-gradient(135deg, var(--lavender), #fff);
  border: 1.5px solid var(--violet);
  border-radius: 14px;
  padding: 26px 28px;
  margin: 0 0 40px;
}
.tldr-label {
  display: inline-block;
  background: var(--violet);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.tldr h2 {
  margin: 0 0 12px !important;
  font-size: 20px !important;
  color: var(--violet-dark);
}
.tldr ul {
  margin: 0;
  padding-left: 20px;
}
.tldr li {
  margin-bottom: 8px;
  font-size: 15.5px;
  line-height: 1.5;
}
.tldr li strong { color: var(--violet-dark); }

/* --- Lettrine --- */
.article-body .lead.has-dropcap::first-letter {
  font-family: "Redaction35", "IBM Plex Sans", serif;
  font-size: 64px;
  font-weight: 700;
  float: left;
  line-height: 0.9;
  margin: 6px 12px 0 0;
  color: var(--violet);
}

/* --- Statistique mise en exergue --- */
.stat-highlight {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--mint);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
}
.stat-highlight .num {
  font-family: "Redaction35", "IBM Plex Sans", serif;
  font-size: 44px;
  font-weight: 700;
  color: var(--violet-dark);
  line-height: 1;
  flex-shrink: 0;
}
.stat-highlight .lbl {
  font-size: 15px;
  line-height: 1.4;
  color: #2b2118;
}
.stat-highlight .lbl strong { color: var(--violet-dark); }

/* --- Pull-quote (citation marquante) --- */
.pull-quote {
  margin: 36px -16px;
  padding: 0 24px;
  font-family: "Redaction35", "IBM Plex Sans", serif;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.3;
  font-weight: 700;
  color: var(--violet-dark);
  border-left: 4px solid var(--violet);
  font-style: normal;
}
.pull-quote::before { content: "« "; color: var(--violet); }
.pull-quote::after { content: " »"; color: var(--violet); }

/* --- Cartes étapes numérotées --- */
.steps-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 24px 0 !important;
  display: grid;
  gap: 18px;
}
.steps-list li {
  background: #fff;
  border: 1px solid #e6dfd2;
  border-radius: 12px;
  padding: 22px 24px 20px 78px;
  position: relative;
  margin-bottom: 0 !important;
}
.steps-list li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 18px;
  top: 18px;
  width: 44px;
  height: 44px;
  background: var(--violet);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Redaction35", "IBM Plex Sans", serif;
  font-size: 22px;
  font-weight: 700;
}
.steps-list { counter-reset: step; }
.steps-list h3 {
  margin: 0 0 8px !important;
  font-size: 19px !important;
  color: var(--violet-dark);
}
.steps-list p { margin: 0 !important; font-size: 15.5px; }

/* --- Liste d'erreurs avec icône --- */
.mistakes-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 24px 0 !important;
  display: grid;
  gap: 14px;
}
.mistakes-list li {
  padding: 16px 20px 16px 56px !important;
  background: #fdf4f4;
  border-left: 3px solid #d04949;
  border-radius: 8px;
  position: relative;
  margin-bottom: 0 !important;
  font-size: 15.5px;
  line-height: 1.5;
}
.mistakes-list li::before {
  content: "⚠";
  position: absolute;
  left: 20px;
  top: 14px;
  font-size: 20px;
  color: #d04949;
}
.mistakes-list strong { display: block; margin-bottom: 4px; color: var(--violet-dark); }

/* --- Comparaison 2 colonnes --- */
.compare-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 28px 0;
}
@media (max-width: 700px) { .compare-2 { grid-template-columns: 1fr; } }
.compare-2 > div {
  background: #fff;
  border: 1px solid #e6dfd2;
  border-radius: 12px;
  padding: 22px;
}
.compare-2 h3 {
  margin: 0 0 10px !important;
  font-size: 18px !important;
  color: var(--violet);
}
.compare-2 ul { margin: 0; padding-left: 18px; }
.compare-2 li { font-size: 14.5px; line-height: 1.5; margin-bottom: 6px; }

/* --- FAQ en accordéons --- */
.faq-accordion { margin: 24px 0; }
.faq-accordion details {
  border-bottom: 1px solid #e6dfd2;
  padding: 0;
}
.faq-accordion details:first-child { border-top: 1px solid #e6dfd2; }
.faq-accordion summary {
  cursor: pointer;
  padding: 18px 4px;
  font-weight: 700;
  font-size: 17px;
  color: var(--violet-dark);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-accordion summary::-webkit-details-marker { display: none; }
.faq-accordion summary::after {
  content: "+";
  color: var(--violet);
  font-size: 24px;
  font-weight: 400;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-accordion details[open] summary::after { transform: rotate(45deg); }
.faq-accordion details > p,
.faq-accordion details > div {
  padding: 0 4px 18px;
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

/* --- Bloc auteur --- */
.author-bio {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e6dfd2;
  border-radius: 14px;
  padding: 24px;
  margin: 48px 0 0;
}
.author-bio .avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Redaction35", "IBM Plex Sans", serif;
  font-size: 28px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
img.author-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  flex-shrink: 0;
  display: block;
}
.author-bio h3 {
  margin: 0 0 4px !important;
  font-size: 17px !important;
  color: var(--violet-dark);
}
.author-bio .role {
  font-size: 13px;
  color: var(--violet);
  font-weight: 600;
  margin-bottom: 8px;
}
.author-bio p { margin: 0 !important; font-size: 14.5px; line-height: 1.55; color: #4a3e34; }
.author-bio a { color: var(--violet); }

/* --- Lien interne contextuel inline --- */
.article-body .inline-cta {
  display: inline-block;
  background: var(--lavender);
  border-radius: 6px;
  padding: 2px 8px;
  text-decoration: none !important;
  color: var(--violet-dark) !important;
  font-weight: 600;
  border-bottom: 2px solid var(--violet);
}
.article-body .inline-cta:hover { background: var(--violet); color: #fff !important; }
