/* ══════════════════════════════════════════════════════════
   CALLHELP LTD — Blog
   Charte alignée sur callhelpltd.tech (index.html)
   ══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0057ff;
  --primary-dark: #0040cc;
  --primary-light: #e8efff;
  --dark: #0a0f1e;
  --dark-2: #111827;
  --dark-3: #1e293b;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --white: #ffffff;
  --success: #10b981;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 87, 255, 0.10);
  --shadow-lg: 0 8px 48px rgba(0, 87, 255, 0.16);
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--text); background: var(--white); line-height: 1.6; }

/* ── NAV (identique au site) ── */
/* Scopé sur .site-nav : sinon la règle s'applique aussi au <nav> du fil d'Ariane */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 0; text-decoration: none; }
.logo svg { height: 44px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: 0.9rem; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-cta {
  background: var(--primary); color: white; padding: 10px 22px;
  border-radius: 8px; font-weight: 600; font-size: 0.9rem;
  text-decoration: none; transition: background .2s, transform .1s;
}
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }
.nav-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ── HERO BLOG ── */
.blog-hero {
  padding: 148px 5% 72px;
  background: linear-gradient(135deg, var(--dark) 0%, #0d1b3e 60%, #0a0f1e 100%);
  position: relative; overflow: hidden; text-align: center;
}
.blog-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 30%, rgba(0,87,255,0.22) 0%, transparent 70%);
  pointer-events: none;
}
.blog-hero-inner { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }
.blog-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,87,255,0.18); border: 1px solid rgba(0,87,255,0.4);
  color: #7eb3ff; border-radius: 50px; padding: 6px 18px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  margin-bottom: 24px;
}
.blog-badge span { width: 7px; height: 7px; background: #7eb3ff; border-radius: 50%; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(1.4)} }
.blog-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 800; color: white;
  line-height: 1.15; margin-bottom: 20px; letter-spacing: -1px;
}
.blog-hero h1 em { font-style: normal; color: #4d8eff; }
.blog-hero p { font-size: 1.08rem; color: #94a3b8; max-width: 620px; margin: 0 auto; }

/* ── FILTRES ── */
.blog-filters {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  padding: 34px 5% 0; max-width: 1180px; margin: 0 auto;
}
.filter-btn {
  border: 1px solid var(--border); background: var(--white); color: var(--text-muted);
  padding: 8px 18px; border-radius: 50px; font-family: inherit; font-size: 0.85rem;
  font-weight: 600; cursor: pointer; transition: all .2s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ── GRILLE ARTICLES ── */
.blog-grid {
  max-width: 1180px; margin: 0 auto; padding: 40px 5% 80px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.post-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--white);
  text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(0,87,255,.35); }
.post-thumb {
  height: 148px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--dark) 0%, #14306b 100%);
  position: relative; overflow: hidden;
}
.post-thumb::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 70% 20%, rgba(0,87,255,.35) 0%, transparent 70%);
}
.post-thumb svg { width: 54px; height: 54px; stroke: #7eb3ff; fill: none; stroke-width: 1.6; position: relative; z-index: 1; }
.post-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.chip {
  background: var(--primary-light); color: var(--primary-dark);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: 4px 10px; border-radius: 50px;
}
.post-date { font-size: 0.78rem; color: var(--text-muted); }
.post-card h2 { font-size: 1.08rem; font-weight: 700; line-height: 1.4; margin-bottom: 10px; letter-spacing: -.2px; }
.post-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; flex: 1; }
.post-more { margin-top: 16px; font-size: 0.86rem; font-weight: 700; color: var(--primary); }

/* ── ARTICLE ── */
.article-hero {
  padding: 140px 5% 60px;
  background: linear-gradient(135deg, var(--dark) 0%, #0d1b3e 60%, #0a0f1e 100%);
  position: relative; overflow: hidden;
}
.article-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 80% at 30% 20%, rgba(0,87,255,0.22) 0%, transparent 70%);
  pointer-events: none;
}
.article-hero-inner { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }
.breadcrumb { font-size: 0.82rem; color: #64748b; margin-bottom: 20px; }
.breadcrumb a { color: #7eb3ff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.article-hero h1 {
  font-size: clamp(1.8rem, 3.8vw, 2.7rem); font-weight: 800; color: white;
  line-height: 1.2; margin: 14px 0 18px; letter-spacing: -.8px;
}
.article-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; color: #94a3b8; font-size: 0.86rem; }
.article-meta .chip { background: rgba(0,87,255,.2); color: #7eb3ff; }

article.post {
  max-width: 820px; margin: 0 auto; padding: 52px 5% 40px;
  font-size: 1.045rem; line-height: 1.82; color: #334155;
}
article.post > p { margin-bottom: 1.3em; }
article.post .lead { font-size: 1.16rem; color: var(--text); font-weight: 500; line-height: 1.7; margin-bottom: 1.6em; }
article.post h2 {
  font-size: 1.6rem; font-weight: 800; color: var(--dark); letter-spacing: -.5px;
  margin: 2.4em 0 .8em; padding-left: 16px; border-left: 4px solid var(--primary);
  line-height: 1.3;
}
article.post h3 { font-size: 1.18rem; font-weight: 700; color: var(--dark-3); margin: 1.9em 0 .6em; }
article.post ul, article.post ol { margin: 0 0 1.4em 1.3em; }
article.post li { margin-bottom: .55em; }
article.post a { color: var(--primary); text-decoration: none; border-bottom: 1px solid rgba(0,87,255,.3); }
article.post a:hover { border-bottom-color: var(--primary); }
article.post strong { color: var(--dark); font-weight: 650; }
article.post code {
  background: #f1f5f9; border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 6px; font-size: .9em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--primary-dark);
}
article.post pre {
  background: var(--dark); color: #cbd5e1; border-radius: 10px;
  padding: 18px 20px; overflow-x: auto; margin-bottom: 1.5em;
  font-size: .86rem; line-height: 1.7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
article.post pre code { background: none; border: none; color: inherit; padding: 0; }

/* Sommaire */
.toc {
  background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 26px; margin-bottom: 2.4em;
}
.toc h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 12px; }
.toc ol { margin: 0 0 0 1.1em; }
.toc li { margin-bottom: .35em; font-size: .94rem; }
.toc a { color: var(--dark-3); border-bottom: none; }
.toc a:hover { color: var(--primary); }

/* Encadrés */
.note, .warn, .tip {
  border-radius: var(--radius); padding: 18px 22px; margin: 1.8em 0;
  font-size: .96rem; line-height: 1.7;
}
.note { background: var(--primary-light); border-left: 4px solid var(--primary); }
.warn { background: #fff7ed; border-left: 4px solid #f59e0b; }
.tip  { background: #f0fdf4; border-left: 4px solid var(--success); }
.note b, .warn b, .tip b { display: block; margin-bottom: 5px; color: var(--dark); }
.note p + p, .warn p + p, .tip p + p { margin-top: .7em; }

/* Tableaux */
.table-wrap { overflow-x: auto; margin: 1.8em 0; border: 1px solid var(--border); border-radius: var(--radius); }
article.post table { border-collapse: collapse; width: 100%; font-size: .92rem; }
article.post th {
  background: #f8fafc; text-align: left; padding: 13px 16px;
  font-weight: 700; color: var(--dark); border-bottom: 1px solid var(--border); white-space: nowrap;
}
article.post td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
article.post tr:last-child td { border-bottom: none; }

/* CTA fin d'article */
.article-cta {
  max-width: 820px; margin: 20px auto 0; padding: 0 5%;
}
.article-cta-inner {
  background: linear-gradient(135deg, var(--dark) 0%, #14306b 100%);
  border-radius: 16px; padding: 42px 40px; text-align: center;
  position: relative; overflow: hidden;
}
.article-cta-inner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(0,87,255,.35) 0%, transparent 70%);
}
.article-cta-inner > * { position: relative; z-index: 1; }
.article-cta h3 { color: white; font-size: 1.45rem; font-weight: 800; margin-bottom: 12px; letter-spacing: -.4px; }
.article-cta p { color: #94a3b8; font-size: .98rem; max-width: 500px; margin: 0 auto 26px; }
.btn-primary {
  display: inline-block; background: var(--primary); color: white; padding: 14px 30px;
  border-radius: 10px; font-weight: 700; font-size: 1rem;
  text-decoration: none; transition: all .2s; box-shadow: 0 4px 20px rgba(0,87,255,0.4);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,87,255,0.5); }

/* Articles liés */
.related { max-width: 1180px; margin: 0 auto; padding: 70px 5% 80px; }
.related h3 { font-size: 1.35rem; font-weight: 800; color: var(--dark); margin-bottom: 24px; letter-spacing: -.4px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* ── FOOTER (identique au site) ── */
footer { background: var(--dark); color: #94a3b8; padding: 60px 5% 30px; }
.footer-top {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .logo { color: white; margin-bottom: 16px; display: inline-flex; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; color: #64748b; }
.footer-col h4 { color: white; font-size: 0.9rem; font-weight: 700; margin-bottom: 18px; text-transform: uppercase; letter-spacing: .5px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { color: #64748b; text-decoration: none; font-size: 0.88rem; transition: color .2s; }
.footer-col ul a:hover { color: #94a3b8; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 0.82rem; }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: #64748b; font-size: 0.82rem; text-decoration: none; }
.footer-legal a:hover { color: #94a3b8; }

/* ── RESPONSIVE ── */
@media (max-width: 980px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; position: fixed;
    top: 68px; left: 0; right: 0; background: white;
    padding: 20px 5%; border-bottom: 1px solid var(--border);
    gap: 1rem; z-index: 99;
  }
  .blog-grid, .related-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .blog-hero { padding: 120px 5% 54px; }
  .article-hero { padding: 116px 5% 48px; }
  article.post { font-size: 1rem; padding: 40px 6% 30px; }
  article.post h2 { font-size: 1.35rem; }
  .article-cta-inner { padding: 34px 24px; }
}
