/* ============================================================
   BLOG.CSS — styles partagés pour les pages articles
   Complète style.css (qui doit être chargé en premier)
   ============================================================ */

/* === NAV pour pages blog — pill opaque dès le chargement === */
.site-nav--solid { /* override handled by style.css .site-nav--solid .nav-pill */ }

/* === LAYOUT ARTICLE === */
.blog-page {
  background: var(--bg);
  min-height: 100dvh;
}
.blog-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

/* === HERO ARTICLE === */
.article-hero {
  background: linear-gradient(155deg, #0F172A 0%, #1E293B 55%, #FF5A5F 100%);
  padding: calc(80px + var(--safe-t)) 24px 48px;
}
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.78);
  margin-bottom: 20px;
}
.article-breadcrumb a {
  color: rgba(255,255,255,.78);
  text-decoration: none;
}
.article-breadcrumb a:hover { color: rgba(255,255,255,.8); }
.article-breadcrumb span { color: rgba(255,255,255,.3); }
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.article-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(46,154,88,.25);
  border: 1px solid rgba(46,154,88,.4);
  color: #2DD4BF;
  padding: 3px 10px;
  border-radius: 99px;
}
.article-date {
  font-size: 12px;
  color: rgba(255,255,255,.78);
}
.article-read-time {
  font-size: 12px;
  color: rgba(255,255,255,.78);
}
.article-hero h1 {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -.02em;
}
.article-hero .article-intro {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,.72);
  max-width: 720px;
  margin: 0;
}

/* === ARTICLE BODY === */
.article-body {
  padding: 40px 0 60px;
}
.article-body h2 {
  font-size: clamp(18px, 3.5vw, 22px);
  font-weight: 800;
  color: var(--text);
  margin: 40px 0 14px;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
}
.article-body p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-2);
  margin-bottom: 16px;
}
.article-body p strong { color: var(--text); }
.article-body ul, .article-body ol {
  padding-left: 20px;
  margin-bottom: 16px;
}
.article-body li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-2);
  margin-bottom: 6px;
}
.article-body li strong { color: var(--text); }

/* === INFO BOX === */
.info-box {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 14px 16px;
  margin: 20px 0;
}
.info-box p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}
.warning-box {
  background: rgba(208,50,62,.08);
  border-left: 3px solid var(--red);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 14px 16px;
  margin: 20px 0;
}
.warning-box p { margin: 0; font-size: 14px; color: var(--text); }

/* === TABLE OF CONTENTS === */
.toc {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 32px;
}
.toc-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}
.toc ol {
  padding-left: 16px;
  margin: 0;
}
.toc li {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 6px;
}
.toc a {
  color: var(--accent-dark);
  text-decoration: none;
}
.toc a:hover { text-decoration: underline; }

/* === ARTICLE TABLE === */
.article-body .table-wrapper {
  margin: 20px 0;
}
.article-body .benchmark-table th {
  background: var(--surface-2);
}

/* === HIGHLIGHT STAT === */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 16px;
  text-align: center;
}
.stat-card .stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-dark);
  letter-spacing: -.02em;
  display: block;
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

/* === ARTICLE CTA === */
.article-cta {
  background: linear-gradient(135deg, var(--accent-dark) 0%, #E94046 100%);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  margin: 40px 0 0;
  text-align: center;
}
.article-cta h3 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.article-cta p {
  font-size: 14px;
  color: rgba(255,255,255,.72);
  margin-bottom: 18px;
}
.article-cta .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--accent-dark);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: var(--r-full);
  text-decoration: none;
  transition: opacity .15s, transform .15s;
}
.article-cta .btn-cta:hover { opacity: .92; transform: translateY(-1px); }

/* === RELATED ARTICLES === */
.related-section {
  border-top: 1px solid var(--border-2);
  padding: 40px 0 60px;
}
.related-section h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.related-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 18px;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.related-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.related-card .related-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.related-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
}
.related-card p {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
  margin: 0;
}

/* === BLOG LISTING PAGE === */
.blog-hero {
  background: linear-gradient(155deg, #0F172A 0%, #1E293B 55%, #FF5A5F 100%);
  padding: calc(90px + var(--safe-t)) 24px 48px;
  text-align: center;
}
.blog-hero h1 {
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.blog-hero p {
  font-size: 16px;
  color: rgba(255,255,255,.65);
  max-width: 480px;
  margin: 0 auto;
}
.blog-listing {
  padding: 48px 0 80px;
}
.blog-listing h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
}
.blog-grid {
  display: grid;
  gap: 20px;
}
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  padding: 24px;
  text-decoration: none;
  display: block;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.blog-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-colored);
  transform: translateY(-2px);
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.blog-card-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 10px;
  border-radius: 99px;
}
.blog-card-date {
  font-size: 12px;
  color: var(--text-3);
}
.blog-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
  letter-spacing: -.02em;
}
.blog-card p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 14px;
}
.blog-card-arrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.blog-cta-strip {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
}
.blog-cta-strip p {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.blog-cta-strip a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--r-full);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .15s;
}
.blog-cta-strip a:hover { opacity: .88; }

/* === BLOG FOOTER === */
.blog-footer {
  background: #0F172A;
  color: rgba(255,255,255,.78);
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
}
.blog-footer a { color: rgba(255,255,255,.78); text-decoration: none; }
.blog-footer a:hover { color: rgba(255,255,255,.8); }
.blog-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.blog-footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 640px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid .blog-card:first-child { grid-column: 1 / -1; }
}
