/* ========================================
   BLOG ARTICLE — SHARED LAYOUT
   ======================================== */

/* body padding-top now in components.css */

/* --- Reading Progress Bar --- */
.reading-progress {
  position: fixed; top: 0; left: 0; z-index: 9999;
  width: 0; height: 3px;
  background: var(--gradient-primary);
  transition: width 50ms linear;
}

/* --- Scroll to Top --- */
.scroll-top {
  position: fixed; bottom: var(--space-8); right: var(--space-8); z-index: 100;
  width: 48px; height: 48px; border-radius: var(--radius-full);
  background: var(--color-primary); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-white); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(20px); pointer-events: none;
  transition: all var(--transition-base);
}
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { background: var(--color-secondary); transform: translateY(-2px); }
.scroll-top .material-symbols-rounded { font-size: 22px; }

/* --- Article Header --- */
.article-header {
  padding: clamp(48px, 6vw, 80px) 0 var(--space-10);
  text-align: center;
  position: relative;
}
.article-header::before {
  content: '';
  position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(137,0,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.article-header__breadcrumb {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-2); font-size: var(--fs-xs); color: var(--color-gray-400);
  margin-bottom: var(--space-6);
}
.article-header__breadcrumb a {
  color: var(--color-gray-400); transition: color var(--transition-fast);
}
.article-header__breadcrumb a:hover { color: var(--color-secondary); }
.article-header__badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: 11px; font-weight: var(--fw-semibold);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 5px 14px; border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}
.article-header__badge .material-symbols-rounded { font-size: 14px; }
/* Badge color variants */
.article-header__badge--live {
  background: rgba(255,0,92,0.08); color: var(--color-live);
}
.article-header__badge--roi {
  background: rgba(18,0,31,0.06); color: var(--color-primary);
}
.article-header__badge--shoppable {
  background: rgba(137,0,255,0.08); color: var(--color-secondary);
}
.article-header__badge--strategie {
  background: rgba(18,0,31,0.06); color: var(--color-primary);
}
.article-header__badge--guides {
  background: rgba(137,0,255,0.08); color: var(--color-secondary);
}
.article-header__badge--engagement {
  background: rgba(255,0,92,0.08); color: var(--color-live);
}
.article-header__badge--casclients {
  background: rgba(0,180,120,0.08); color: #00b478;
}
.article-header__badge--plateforme {
  background: rgba(137,0,255,0.08); color: var(--color-secondary);
}
.article-header__title {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  font-weight: var(--fw-extrabold); line-height: 1.12;
  color: var(--color-primary); max-width: 800px;
  margin: 0 auto var(--space-6); letter-spacing: -0.03em;
}
.article-header__meta {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-6); flex-wrap: wrap;
  font-size: var(--fs-sm); color: var(--color-gray-400);
}
.article-header__meta span {
  display: flex; align-items: center; gap: var(--space-2);
}
.article-header__meta .material-symbols-rounded { font-size: 18px; }

/* --- Share Bar --- */
.share-bar {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-3); padding: var(--space-6) 0;
  border-top: 1px solid var(--color-gray-100);
  border-bottom: 1px solid var(--color-gray-100);
  margin-bottom: var(--space-10);
}
.share-bar__label {
  font-size: var(--fs-xs); font-weight: var(--fw-medium);
  color: var(--color-gray-400); text-transform: uppercase; letter-spacing: 0.06em;
}
.share-bar__btn {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  border: 1.5px solid var(--color-gray-200); background: var(--color-white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition-fast); color: var(--color-gray-500);
}
.share-bar__btn:hover {
  border-color: var(--color-secondary); color: var(--color-secondary);
  transform: translateY(-2px);
}
.share-bar__btn .material-symbols-rounded { font-size: 18px; }

/* --- Article Layout (TOC + Content) --- */
.article-layout {
  display: grid; grid-template-columns: 220px 1fr;
  gap: var(--space-16); max-width: 1060px; margin: 0 auto;
  padding: 0 var(--container-padding) var(--space-20); align-items: start;
}

/* --- Table of Contents --- */
.toc {
  position: sticky; top: 96px; padding: var(--space-6);
  background: var(--color-gray-50); border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-100);
}
.toc__title {
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--color-gray-400); margin-bottom: var(--space-4);
}
.toc__list { list-style: none; }
.toc__list li { margin-bottom: var(--space-2); }
.toc__list a {
  display: block; font-size: 13px; font-weight: var(--fw-medium);
  color: var(--color-gray-500); padding: var(--space-1) var(--space-3);
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: all var(--transition-fast); line-height: 1.4;
}
.toc__list a:hover,
.toc__list a.active {
  color: var(--color-secondary); border-left-color: var(--color-secondary);
  background: rgba(137,0,255,0.04);
}

/* --- Article Content --- */
.article-content { max-width: 720px; }
.article-content h2 {
  font-size: var(--fs-2xl); font-weight: var(--fw-bold);
  color: var(--color-primary); margin: var(--space-12) 0 var(--space-4);
  line-height: var(--lh-snug); letter-spacing: -0.02em; scroll-margin-top: 100px;
}
.article-content h2:first-child { margin-top: 0; }
.article-content h3 {
  font-size: var(--fs-xl); font-weight: var(--fw-semibold);
  color: var(--color-primary); margin: var(--space-8) 0 var(--space-3);
  line-height: var(--lh-snug);
}
.article-content p {
  font-size: var(--fs-base); line-height: 1.8;
  color: var(--color-gray-700); margin-bottom: var(--space-5);
}
.article-content p strong { font-weight: var(--fw-semibold); color: var(--color-primary); }
.article-content ul,
.article-content ol {
  margin: var(--space-4) 0 var(--space-6); padding-left: var(--space-6);
}
.article-content ul { list-style: none; padding-left: 0; }
.article-content ul li {
  position: relative; padding-left: var(--space-6); margin-bottom: var(--space-3);
  font-size: var(--fs-base); line-height: 1.7; color: var(--color-gray-700);
}
.article-content ul li::before {
  content: ''; position: absolute; left: 0; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gradient-primary);
}
.article-content ol li {
  margin-bottom: var(--space-3); font-size: var(--fs-base);
  line-height: 1.7; color: var(--color-gray-700);
}
/* Styled ordered list (shoppable video article) */
.article-content ol.styled-steps {
  counter-reset: steps; padding-left: var(--space-6);
}
.article-content ol.styled-steps li {
  margin-bottom: var(--space-4); counter-increment: steps;
  list-style: none; position: relative; padding-left: var(--space-8);
}
.article-content ol.styled-steps li::before {
  content: counter(steps);
  position: absolute; left: 0; top: 2px;
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(137,0,255,0.1), rgba(240,0,185,0.08));
  color: var(--color-secondary); font-size: 13px; font-weight: var(--fw-bold);
  display: flex; align-items: center; justify-content: center;
}
.article-content blockquote {
  margin: var(--space-8) 0; padding: var(--space-6) var(--space-8);
  background: linear-gradient(135deg, rgba(137,0,255,0.04), rgba(240,0,185,0.03));
  border-left: 3px solid var(--color-secondary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-size: var(--fs-lg); font-style: italic;
  color: var(--color-primary); line-height: 1.7;
}
.article-content .highlight-box {
  margin: var(--space-8) 0; padding: var(--space-6) var(--space-8);
  background: var(--color-gray-50); border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-100);
}
.article-content .highlight-box__title {
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-secondary); margin-bottom: var(--space-3);
  display: flex; align-items: center; gap: var(--space-2);
}
.article-content .highlight-box__title .material-symbols-rounded { font-size: 18px; }

/* --- Formula Box (ROI article) --- */
.formula-box {
  margin: var(--space-8) 0; padding: var(--space-8);
  background: var(--color-primary); border-radius: var(--radius-xl);
  text-align: center;
}
.formula-box__label {
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--color-soft); margin-bottom: var(--space-6);
}
.formula-box__formula {
  font-size: var(--fs-xl); font-weight: var(--fw-bold);
  color: var(--color-white); line-height: 1.6;
  font-family: 'Plus Jakarta Sans', monospace;
}
.formula-box__formula span {
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.formula-box__note {
  font-size: var(--fs-xs); color: var(--color-gray-400);
  margin-top: var(--space-4); line-height: var(--lh-relaxed);
}

/* --- Benchmark Table (ROI article) --- */
.benchmark-table {
  width: 100%; margin: var(--space-8) 0;
  border-collapse: collapse; border-radius: var(--radius-xl);
  overflow: hidden; border: 1px solid var(--color-gray-100);
}
.benchmark-table thead { background: var(--color-primary); }
.benchmark-table th {
  padding: var(--space-4) var(--space-5); font-size: var(--fs-xs);
  font-weight: var(--fw-semibold); text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--color-white); text-align: left;
}
.benchmark-table td {
  padding: var(--space-4) var(--space-5); font-size: var(--fs-sm);
  color: var(--color-gray-700); border-bottom: 1px solid var(--color-gray-100);
}
.benchmark-table tbody tr:last-child td { border-bottom: none; }
.benchmark-table tbody tr:nth-child(even) { background: var(--color-gray-50); }
.benchmark-table tbody tr:hover { background: rgba(137,0,255,0.03); }
.benchmark-table td:first-child { font-weight: var(--fw-semibold); color: var(--color-primary); }
.table-wrapper {
  overflow-x: auto; margin: var(--space-8) 0; border-radius: var(--radius-xl);
}

/* --- Stats Grid (Shoppable video article) --- */
.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4); margin: var(--space-8) 0;
}
.stat-card {
  text-align: center; padding: var(--space-6);
  background: var(--color-white); border: 1px solid var(--color-gray-100);
  border-radius: var(--radius-xl);
}
.stat-card__value {
  font-size: var(--fs-3xl); font-weight: var(--fw-extrabold);
  line-height: 1; margin-bottom: var(--space-2);
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-card__label {
  font-size: var(--fs-xs); color: var(--color-gray-500); line-height: var(--lh-normal);
}

/* --- Links in article content --- */
.article-content a:not(.btn) {
  color: var(--color-secondary);
  font-weight: var(--fw-semibold);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(137, 0, 255, 0.3);
  transition: text-decoration-color 0.2s ease;
}
.article-content a:not(.btn):hover {
  text-decoration-color: var(--color-secondary);
}

/* --- CTA Block --- */
.article-cta {
  margin: var(--space-12) 0; padding: var(--space-10);
  background: var(--color-primary); border-radius: 20px;
  text-align: center; position: relative; overflow: hidden;
}
.article-cta::before {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 50%;
  background: linear-gradient(135deg, transparent, rgba(137,0,255,0.3)); pointer-events: none;
}
.article-content .article-cta h3 {
  font-size: var(--fs-2xl); font-weight: var(--fw-bold);
  color: var(--color-white); margin-bottom: var(--space-3); position: relative;
}
.article-content .article-cta p {
  font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-6); position: relative;
}
.article-cta .btn { position: relative; }

/* --- Related Articles --- */
.related { padding: var(--space-20) 0; background: var(--color-gray-50); }
.related__title {
  font-size: var(--fs-2xl); font-weight: var(--fw-bold);
  color: var(--color-primary); margin-bottom: var(--space-8); letter-spacing: -0.02em;
}
.related__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8); }
.related-card {
  display: flex; background: var(--color-white);
  border: 1px solid var(--color-gray-100); border-radius: 16px;
  overflow: hidden; transition: all var(--transition-base);
}
.related-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--color-light); }
.related-card__image {
  width: 200px; min-height: 160px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.related-card__image--1 { background: linear-gradient(135deg, #8B4DFF, #F000B9, #FF005C); }
.related-card__image--2 { background: linear-gradient(135deg, #12001F, #8B4DFF, #D6BFFF); }
.related-card__image--3 { background: linear-gradient(135deg, #F000B9, #8B4DFF, #12001F); }
.related-card__image .material-symbols-rounded { font-size: 32px; color: rgba(255,255,255,0.6); }
.related-card__body { padding: var(--space-6); display: flex; flex-direction: column; justify-content: center; }
.related-card__badge {
  font-size: 11px; font-weight: var(--fw-semibold); text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--color-secondary); margin-bottom: var(--space-2);
}
.related-card__title {
  font-size: var(--fs-base); font-weight: var(--fw-bold);
  color: var(--color-primary); line-height: var(--lh-snug); margin-bottom: var(--space-2);
}
.related-card__meta { font-size: var(--fs-xs); color: var(--color-gray-400); }

/* --- Featured Image --- */
.article-featured-image {
  margin: 0 auto var(--space-8); border-radius: var(--radius-xl); overflow: hidden;
  max-height: 480px;
}
.article-featured-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* --- Video Embed --- */
.video-embed {
  position: relative; padding-bottom: 56.25%; height: 0;
  overflow: hidden; margin: 32px 0; border-radius: var(--radius-xl);
}
.video-embed iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: none; border-radius: var(--radius-xl);
}

/* --- Inline images in article content --- */
.article-content img {
  max-width: 100%; height: auto; border-radius: var(--radius-lg);
  margin: var(--space-6) 0; display: block;
}

/* --- Newsletter --- */
.article-newsletter { padding: var(--space-16) 0; }
.article-newsletter__inner { max-width: 600px; margin: 0 auto; text-align: center; }
.article-newsletter__title {
  font-size: var(--fs-2xl); font-weight: var(--fw-bold);
  color: var(--color-primary); margin-bottom: var(--space-3); letter-spacing: -0.02em;
}
.article-newsletter__subtitle {
  font-size: var(--fs-sm); color: var(--color-gray-500);
  margin-bottom: var(--space-6); line-height: var(--lh-relaxed);
}
.article-newsletter__form { display: flex; gap: var(--space-3); max-width: 440px; margin: 0 auto; }
/* .article-newsletter__input & __btn base styles via .newsletter-input/.newsletter-btn in components.css */

/* --- Responsive --- */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; max-width: 720px; }
  .toc { position: static; margin-bottom: var(--space-8); }
  .toc__list { display: flex; flex-wrap: wrap; gap: var(--space-1); }
  .toc__list li { margin-bottom: 0; }
  .toc__list a {
    border-left: none; padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full); font-size: 12px; white-space: nowrap;
  }
  .toc__list a:hover, .toc__list a.active { background: rgba(137,0,255,0.08); border-left: none; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .related__grid { grid-template-columns: 1fr; }
  .related-card { flex-direction: column; }
  .related-card__image { width: 100%; min-height: 120px; }
  .share-bar { flex-wrap: wrap; }
  .article-newsletter__form { flex-direction: column; }
  .formula-box__formula { font-size: var(--fs-base); }
  .stats-grid { grid-template-columns: 1fr; }
}
