/* blog.css — styles partagés pour tous les articles de blog Velia */

/* ── BARRE PROGRESSION LECTURE ───────────────────────── */
#reading-progress {
  position: fixed; top: 0; left: 0;
  width: 0%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  z-index: 200;
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

/* ── LAYOUT PRINCIPAL ────────────────────────────────── */
.blog-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 60px);
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr 272px;
  gap: 56px;
  align-items: start;
  padding: 48px 0 88px;
}

/* ── HERO ARTICLE ────────────────────────────────────── */
.article-hero {
  position: relative;
  padding: clamp(48px, 7vw, 88px) 0 0;
  overflow: hidden;
}
.article-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,130,196,.09) 0%, transparent 70%);
  pointer-events: none;
}

.article-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--t-xs); color: var(--text-3);
  margin-bottom: 22px; flex-wrap: wrap;
  position: relative; z-index: 1;
}
.article-breadcrumb a {
  color: var(--text-2);
  transition: color var(--ease);
}
.article-breadcrumb a:hover { color: var(--accent); }
.article-breadcrumb i { flex-shrink: 0; opacity: .5; }

.article-category {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 99px;
  background: var(--accent-muted);
  border: 1px solid rgba(59,130,196,.22);
  font-size: var(--t-xs); color: var(--accent); font-weight: 600;
  margin-bottom: 18px;
  position: relative; z-index: 1;
}

.article-h1 {
  font-family: var(--f-disp);
  font-size: clamp(1.875rem, 4vw, 2.875rem);
  font-weight: 400; line-height: 1.15;
  letter-spacing: -.025em; color: var(--text);
  margin-bottom: 20px;
  position: relative; z-index: 1;
}

.article-intro {
  font-size: clamp(.9375rem, 1.4vw, 1.0625rem);
  color: var(--text-2); line-height: 1.8;
  margin-bottom: 28px;
  position: relative; z-index: 1;
}

.article-meta-row {
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
  font-size: var(--t-xs); color: var(--text-3);
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  position: relative; z-index: 1;
}
.meta-item {
  display: flex; align-items: center; gap: 5px;
}
.meta-item i { width: 13px; height: 13px; opacity: .6; flex-shrink: 0; }

/* ── ANSWER BOX (featured snippet) ──────────────────── */
.answer-box {
  background: var(--surf-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin: 32px 0 40px;
}
.answer-box-label {
  font-size: 10px; font-weight: 800; color: var(--accent);
  text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 8px;
}
.answer-box p {
  font-size: var(--t-body); color: var(--text);
  line-height: 1.7; margin: 0;
}

/* ── CORPS ARTICLE ───────────────────────────────────── */
.article-body h2 {
  font-family: var(--f-disp);
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 400; color: var(--text);
  margin: 44px 0 14px; line-height: 1.3;
  letter-spacing: -.015em;
  scroll-margin-top: 80px;
}

.article-body h3 {
  font-size: var(--t-h3); font-weight: 600;
  color: var(--text); margin: 28px 0 10px;
  scroll-margin-top: 80px;
}

.article-body p {
  font-size: var(--t-body); color: var(--text-2);
  line-height: 1.8; margin-bottom: 16px;
}

.article-body ul {
  margin: 14px 0 22px; padding: 0;
  list-style: none;
  display: flex; flex-direction: column; gap: 10px;
}

.article-body ul li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: var(--t-body); color: var(--text-2);
  line-height: 1.7;
}

.article-body ul li::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0; margin-top: 10px;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--ease);
}
.article-body a:hover { color: var(--accent-hover); }

/* ── CALLOUT ─────────────────────────────────────────── */
.callout {
  background: var(--surf-2); border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px; margin: 24px 0;
  display: flex; gap: 14px; align-items: flex-start;
}
.callout-icon {
  width: 34px; height: 34px; border-radius: var(--r-md);
  background: var(--accent-muted);
  display: grid; place-items: center;
  flex-shrink: 0; color: var(--accent);
}
.callout-icon i { width: 16px; height: 16px; }
.callout-body { flex: 1; min-width: 0; }
.callout p {
  margin: 0; font-size: var(--t-sm);
  color: var(--text-2); line-height: 1.65;
}

/* ── CTA INLINE ──────────────────────────────────────── */
.article-cta-inline {
  background: linear-gradient(135deg, var(--surf-2) 0%, var(--surf-3) 100%);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 32px; margin: 44px 0; text-align: center;
}
.article-cta-inline h3 {
  font-family: var(--f-disp); font-size: var(--t-h2);
  font-weight: 400; color: var(--text); margin-bottom: 8px; line-height: 1.3;
}
.article-cta-inline p {
  color: var(--text-2); margin-bottom: 20px; line-height: 1.6;
  font-size: var(--t-body);
}

/* ── FAQ ─────────────────────────────────────────────── */
.article-faq {
  margin-top: 48px; padding-top: 40px;
  border-top: 1px solid var(--border);
}
.article-faq > h2 {
  font-family: var(--f-disp);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 400; color: var(--text);
  margin-bottom: 24px; scroll-margin-top: 80px;
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; display: flex;
  justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; background: none; border: none; cursor: pointer;
  color: var(--text); font-size: var(--t-body); font-weight: 600;
  font-family: var(--f-body); text-align: left;
  transition: color var(--ease);
}
.faq-q:hover { color: var(--accent); }
.faq-chevron {
  width: 16px; height: 16px; flex-shrink: 0;
  transition: transform var(--ease); color: var(--text-3);
}
.faq-q[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg); color: var(--accent);
}
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .35s cubic-bezier(.16,1,.3,1);
}
.faq-a p {
  padding-bottom: 18px; font-size: var(--t-body);
  color: var(--text-2); line-height: 1.75; margin: 0;
}

/* ── AUTEUR / E-E-A-T ────────────────────────────────── */
.article-author {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 24px; background: var(--surf-2);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  margin-top: 48px;
}
.author-logo {
  width: 48px; height: 48px; border-radius: var(--r-lg);
  background: var(--accent-muted);
  border: 1px solid rgba(59,130,196,.2);
  display: grid; place-items: center; flex-shrink: 0;
}
.author-logo img { width: 26px; height: 26px; }
.author-info { flex: 1; min-width: 0; }
.author-name {
  font-size: var(--t-body); font-weight: 700;
  color: var(--text); margin-bottom: 5px;
}
.author-bio {
  font-size: var(--t-sm); color: var(--text-2);
  line-height: 1.65; margin: 0;
}
.author-bio a {
  color: var(--accent); text-decoration: underline;
  text-underline-offset: 2px; transition: color var(--ease);
}
.author-bio a:hover { color: var(--accent-hover); }

/* ── SIDEBAR ─────────────────────────────────────────── */
.blog-sidebar { position: sticky; top: 80px; }
.sidebar-toc {
  background: var(--surf-2); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 20px 22px;
}
.sidebar-toc-title {
  font-size: 10px; font-weight: 800; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px;
}
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li {
  display: block; margin: 0;
}
.toc-list li::before { display: none !important; }
.toc-list a {
  display: block; font-size: var(--t-sm); color: var(--text-2);
  padding: 6px 0 6px 12px;
  border-left: 2px solid var(--border);
  transition: color var(--ease), border-color var(--ease);
  text-decoration: none; line-height: 1.4;
}
.toc-list a:hover, .toc-list a.active {
  color: var(--accent); border-color: var(--accent);
}

/* ── CTA FINAL ───────────────────────────────────────── */
.article-cta-final {
  background: linear-gradient(135deg, var(--surf-2) 0%, rgba(59,130,196,.08) 100%);
  border: 1px solid rgba(59,130,196,.22);
  border-radius: var(--r-xl);
  padding: 48px 40px; text-align: center; margin-top: 56px;
}
.article-cta-final .eyebrow {
  font-size: 10px; font-weight: 800; color: var(--accent);
  text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px;
}
.article-cta-final h2 {
  font-family: var(--f-disp);
  font-size: clamp(1.375rem, 3vw, 2rem);
  font-weight: 400; color: var(--text); margin-bottom: 12px; line-height: 1.25;
}
.article-cta-final p {
  color: var(--text-2); max-width: 480px;
  margin: 0 auto 24px; line-height: 1.65;
  font-size: var(--t-body);
}
.cta-actions {
  display: flex; gap: 10px;
  justify-content: center; flex-wrap: wrap;
}

/* ── TABLEAU BLOG ────────────────────────────────────── */
.blog-table {
  width: 100%; border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: var(--t-body);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.blog-table thead {
  background: var(--surf-2);
}
.blog-table thead th {
  padding: 13px 18px;
  text-align: left; font-weight: 700;
  font-size: var(--t-sm); color: var(--text);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.blog-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--ease);
}
.blog-table tbody tr:last-child { border-bottom: none; }
.blog-table tbody tr:hover { background: var(--surf-2); }
.blog-table td {
  padding: 14px 18px;
  color: var(--text-2); line-height: 1.6;
  vertical-align: top;
}
.blog-table td:first-child {
  font-weight: 600; color: var(--text);
  white-space: nowrap;
}
.blog-table .price-cell {
  font-weight: 700; color: var(--accent);
  white-space: nowrap;
}

/* ── STEPS LIST ──────────────────────────────────────── */
.steps-list {
  list-style: none; padding: 0; margin: 20px 0 28px;
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.steps-list li {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  font-size: var(--t-body); color: var(--text-2);
  line-height: 1.65;
  background: transparent;
  transition: background var(--ease);
}
.steps-list li::before { display: none; }
.steps-list li:last-child { border-bottom: none; }
.steps-list li:hover { background: var(--surf-2); }
.step-num {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-muted);
  border: 1px solid rgba(59,130,196,.3);
  color: var(--accent); font-weight: 800;
  font-size: var(--t-sm);
  display: grid; place-items: center;
  margin-top: 1px;
}
.step-content strong {
  display: block; font-weight: 700;
  color: var(--text); margin-bottom: 4px;
}

/* ── ARTICLES CONNEXES ───────────────────────────────── */
.related-articles {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.related-articles h2 {
  font-family: var(--f-disp);
  font-size: var(--t-h2);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 28px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.related-card {
  background: var(--surf-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
  text-decoration: none;
  display: block;
}
.related-card:hover {
  border-color: rgba(59,130,196,.35);
  transform: translateY(-2px);
  box-shadow: var(--s2);
}
.related-card-cat {
  font-size: var(--t-xs);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.related-card h3 {
  font-size: var(--t-h4);
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 8px;
}
.related-card p { font-size: var(--t-sm); color: var(--text-2); margin: 0; line-height: 1.55; }

/* ── MOBILE 860px ────────────────────────────────────── */
@media (max-width: 860px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 36px 0 64px;
  }
  .blog-sidebar { display: none; }
}

/* ── MOBILE 640px ────────────────────────────────────── */
@media (max-width: 640px) {
  .article-hero { padding: 36px 0 0; }

  .article-h1 { font-size: clamp(1.5rem, 7vw, 1.875rem); }

  .article-meta-row { gap: 10px; }

  .article-body h2 { margin: 36px 0 12px; }

  .callout { flex-direction: column; gap: 12px; }
  .callout-icon { width: 30px; height: 30px; }

  .article-cta-inline { padding: 24px 20px; margin: 36px 0; }
  .article-cta-inline h3 { font-size: var(--t-h3); }
  .article-cta-inline p { margin-bottom: 16px; }

  .article-cta-final { padding: 32px 20px; }
  .article-cta-final h2 { font-size: clamp(1.25rem, 6vw, 1.625rem); }

  .cta-actions { flex-direction: column; }
  .cta-actions .btn { justify-content: center; width: 100%; }

  .article-author { flex-direction: column; gap: 14px; }

  .faq-q { font-size: var(--t-sm); padding: 14px 0; }

  .answer-box { padding: 16px 18px; }

  /* tableaux responsive */
  .blog-table thead { display: none; }
  .blog-table, .blog-table tbody, .blog-table tr, .blog-table td {
    display: block; width: 100%;
  }
  .blog-table tr {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
  }
  .blog-table tr:last-child { border-bottom: none; }
  .blog-table td {
    padding: 4px 16px;
    white-space: normal;
  }
  .blog-table td:first-child {
    font-size: var(--t-sm); text-transform: uppercase;
    letter-spacing: .05em; color: var(--accent);
    padding-bottom: 2px;
  }
  .blog-table td.price-cell {
    padding-top: 6px; font-size: var(--t-body);
  }
  .steps-list li { gap: 14px; padding: 16px; }
  .step-num { width: 26px; height: 26px; font-size: 11px; }
}

/* ── MOBILE 420px ────────────────────────────────────── */
@media (max-width: 420px) {
  .article-breadcrumb { display: none; }
  .article-meta-row { gap: 8px; font-size: 11px; }
}
