/* ================================
   BLOG ARTICLE — GLOBAL STYLES
   Partage les variables de cv.css
================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg:              #050508;
    --surface-1:       #09090F;
    --surface-2:       #0E0E1A;
    --surface-3:       #141428;
    --indigo:          #818CF8;
    --indigo-dark:     #4F46E5;
    --cyan:            #22D3EE;
    --purple:          #A855F7;
    --green:           #10B981;
    --orange:          #FB923C;
    --text-primary:    #F1F5F9;
    --text-secondary:  #8892A4;
    --text-muted:      #4B5568;
    --border:          rgba(255,255,255,0.07);
    --border-bright:   rgba(129,140,248,0.5);
    --gradient:        linear-gradient(135deg,#818CF8,#22D3EE);
    --gradient-vibrant:linear-gradient(135deg,#818CF8 0%,#A855F7 50%,#22D3EE 100%);
    --gradient-subtle: linear-gradient(135deg,rgba(129,140,248,.1),rgba(34,211,238,.07));
    --shadow-card:     0 4px 24px rgba(0,0,0,.5);
    --radius-sm:  8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Navigation ── */
.blog-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(5,5,8,.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    padding: 0 48px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.blog-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88em;
    font-weight: 600;
    transition: color 0.2s;
    font-family: 'Space Grotesk', sans-serif;
}
.blog-nav-back:hover { color: var(--indigo); }
.blog-nav-back i { font-size: 0.9em; }

.blog-logo {
    font-weight: 900;
    font-size: 1.05em;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Space Grotesk', sans-serif;
}

.blog-nav-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    border: 1px solid var(--border-bright);
    color: var(--indigo);
    background: rgba(129,140,248,.08);
}

/* ── Wrapper ── */
.blog-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 28px 96px;
}

/* ── Article Header ── */
.article-header { margin-bottom: 52px; }

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.article-tag {
    display: inline-block;
    padding: 4px 13px;
    border-radius: 100px;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.tag-java    { background: rgba(249,115,22,.12); border: 1px solid rgba(249,115,22,.3); color: #FB923C; }
.tag-angular { background: rgba(239,68,68,.12);  border: 1px solid rgba(239,68,68,.3);  color: #F87171; }
.tag-nodejs  { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3); color: #34D399; }
.tag-lts     { background: rgba(129,140,248,.1); border: 1px solid rgba(129,140,248,.25); color: var(--indigo); }
.tag-new     { background: rgba(168,85,247,.1);  border: 1px solid rgba(168,85,247,.25); color: var(--purple); }
.tag-ts      { background: rgba(34,211,238,.1);  border: 1px solid rgba(34,211,238,.25); color: var(--cyan); }
.tag-arch    { background: rgba(168,85,247,.12); border: 1px solid rgba(168,85,247,.3);  color: var(--purple); }

.article-title {
    font-size: 2.8em;
    font-weight: 900;
    line-height: 1.15;
    background: var(--gradient-vibrant);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-family: 'Space Grotesk', sans-serif;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--text-muted);
    font-size: 0.84em;
    flex-wrap: wrap;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-divider {
    height: 1px;
    background: linear-gradient(to right, var(--indigo-dark), transparent);
    margin: 44px 0;
    opacity: 0.4;
}

/* ── Article Body ── */
.article-body h2 {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--text-primary);
    margin: 44px 0 16px;
    padding-left: 16px;
    border-left: 3px solid var(--indigo);
    font-family: 'Space Grotesk', sans-serif;
}

.article-body h3 {
    font-size: 1.12em;
    font-weight: 700;
    color: var(--cyan);
    margin: 30px 0 12px;
    font-family: 'Space Grotesk', sans-serif;
}

.article-body p {
    color: var(--text-secondary);
    line-height: 1.88;
    margin-bottom: 16px;
    font-size: 0.97em;
}

.article-body ul, .article-body ol {
    color: var(--text-secondary);
    padding-left: 26px;
    margin-bottom: 20px;
}

.article-body li {
    line-height: 1.8;
    margin-bottom: 6px;
    font-size: 0.97em;
}

.article-body li::marker { color: var(--indigo); }

.article-body strong { color: var(--text-primary); font-weight: 700; }

/* Inline code */
.article-body code:not(pre code) {
    background: rgba(129,140,248,.1);
    border: 1px solid rgba(129,140,248,.18);
    color: var(--cyan);
    padding: 2px 7px;
    border-radius: 5px;
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.87em;
}

/* ── Code Blocks ── */
.code-block {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 22px 0;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-3);
}

.code-lang {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--indigo);
    font-family: 'Space Grotesk', sans-serif;
}

.code-dots { display: flex; gap: 6px; align-items: center; }
.code-dots span { width: 9px; height: 9px; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #EF4444; }
.code-dots span:nth-child(2) { background: #F59E0B; }
.code-dots span:nth-child(3) { background: #10B981; }

.code-block pre {
    padding: 22px 24px;
    overflow-x: auto;
    margin: 0;
}

.code-block code {
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.875em;
    line-height: 1.75;
    color: #CBD5E1;
    white-space: pre;
}

/* Syntax color helpers */
.kw  { color: #A78BFA; } /* keyword */
.cl  { color: #34D399; } /* class/type */
.fn  { color: #60A5FA; } /* function */
.st  { color: #86EFAC; } /* string */
.cm  { color: #475569; font-style: italic; } /* comment */
.nu  { color: #FB923C; } /* number */
.an  { color: #FBBF24; } /* annotation */

/* ── Feature Grid ── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 24px 0;
}

.feature-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: border-color .25s, transform .25s;
}

.feature-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-2px);
}

.feature-icon { font-size: 1.6em; margin-bottom: 10px; line-height: 1; }

.feature-card h4 {
    font-size: 0.93em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-family: 'Space Grotesk', sans-serif;
}

.feature-card p {
    font-size: 0.84em !important;
    margin-bottom: 0 !important;
    color: var(--text-secondary);
    line-height: 1.55 !important;
}

/* ── Info / Warning Boxes ── */
.info-box, .warn-box {
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 22px 0;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.info-box {
    background: rgba(129,140,248,.06);
    border: 1px solid rgba(129,140,248,.2);
}
.warn-box {
    background: rgba(249,115,22,.06);
    border: 1px solid rgba(249,115,22,.2);
}

.info-box i { color: var(--indigo); font-size: 1.05em; margin-top: 3px; flex-shrink: 0; }
.warn-box i { color: var(--orange); font-size: 1.05em; margin-top: 3px; flex-shrink: 0; }

.info-box p, .warn-box p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9em;
    line-height: 1.7;
}

/* ── Comparison Table ── */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    font-size: 0.88em;
}

.compare-table th {
    background: var(--surface-3);
    color: var(--indigo);
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    font-family: 'Space Grotesk', sans-serif;
}

.compare-table td {
    padding: 11px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: rgba(129,140,248,.04); }

/* ── Article Footer ── */
.article-footer-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 72px;
    padding-top: 44px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 30px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.92em;
    text-decoration: none;
    transition: all .35s;
    font-family: 'Space Grotesk', sans-serif;
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 18px rgba(129,140,248,.35);
}

.btn-back-home:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(129,140,248,.5);
}

.btn-outline-blog {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 28px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.92em;
    text-decoration: none;
    transition: all .3s;
    font-family: 'Space Grotesk', sans-serif;
    background: transparent;
    border: 1px solid rgba(129,140,248,.3);
    color: var(--indigo);
}

.btn-outline-blog:hover {
    background: rgba(129,140,248,.08);
    border-color: var(--indigo);
    transform: translateY(-2px);
}

/* ── Sources ── */
.sources-section {
    margin-top: 56px;
    padding: 28px 32px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--indigo);
    border-radius: var(--radius-md);
}

.sources-section h3 {
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--indigo);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sources-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sources-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.88em;
    color: var(--text-secondary);
}

.sources-list li::before {
    content: '↗';
    color: var(--indigo);
    font-size: 0.82em;
    flex-shrink: 0;
}

.sources-list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color .2s;
    word-break: break-all;
}

.sources-list a:hover {
    color: var(--indigo);
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .blog-nav { padding: 0 18px; }
    .blog-logo { display: none; }
    .blog-wrapper { padding: 88px 16px 60px; }
    .article-title { font-size: 1.85em; }
    .article-body h2 { font-size: 1.25em; }
    .feature-grid { grid-template-columns: 1fr; }
    .article-footer-nav { flex-direction: column; align-items: center; }
    .btn-back-home, .btn-outline-blog { width: 100%; max-width: 280px; justify-content: center; }
}
