/* ══════════════════════════════════════════════════════════════
   LEA BLOG - blog.css
   Design éditorial sombre/clair cohérent avec le site principal
   ══════════════════════════════════════════════════════════════ */

/* Typographie */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,400;0,600;0,700;1,400;1,600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --blog-serif: 'Crimson Pro', Georgia, serif;
    --blog-mono: 'JetBrains Mono', 'Courier New', monospace;
    --accent: #4ade80;
    --accent-dim: rgba(74, 222, 128, .12);
    --accent-ring: rgba(74, 222, 128, .3);
    --reading-max: 720px;
    --sidebar-w: 300px;
}

/* BLOG HERO (liste) */
.blog-hero {
    background: var(--black);
    padding: 80px 0 72px;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.blog-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.blog-hero-text {
    flex: 1;
    min-width: 280px;
}

.blog-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .6);
    margin-bottom: 20px;
}

.blog-hero-title {
    font-size: clamp(38px, 5.5vw, 66px);
    font-weight: 800;
    line-height: 1.08;
    color: var(--white);
    margin-bottom: 20px;
    animation: fadeSlideUp .9s .1s cubic-bezier(.16, 1, .3, 1) both;
    font-family: 'Pacifico', cursive;
    letter-spacing: 2px;
}

.blog-hero-title em {
    font-style: italic;
    color: var(--accent);
}

.blog-hero-desc {
    font-size: 17px;
    color: rgba(255, 255, 255, .5);
    max-width: 520px;
    line-height: 1.7;
}

.blog-hero-stats {
    display: flex;
    gap: 32px;
    flex-shrink: 0;
}

.bhs-item {
    text-align: center;
}

.bhs-val {
    font-size: 32px;
    font-weight: 900;
    color: var(--white);
    line-height: 1;
}

.bhs-label {
    font-size: 11px;
    color: rgba(255, 255, 255, .4);
    margin-top: 4px;
}

/* BLOG SEARCH BAR */
.blog-search-bar {
    background: var(--g900);
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    position: sticky;
    top: 68px;
    z-index: 90;
    backdrop-filter: blur(16px);
}

.blog-search-inner {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.blog-search-wrap {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.blog-search-wrap svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, .3);
    pointer-events: none;
}

.blog-search-input {
    width: 100%;
    padding: 11px 16px 11px 44px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--r-lg);
    color: var(--white);
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color .2s, background .2s;
}

.blog-search-input::placeholder {
    color: rgba(255, 255, 255, .25);
}

.blog-search-input:focus {
    border-color: var(--accent-ring);
    background: rgba(255, 255, 255, .1);
}

.blog-filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .12);
    background: transparent;
    color: rgba(255, 255, 255, .55);
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, .08);
    color: var(--white);
}

.filter-pill.active {
    background: var(--white);
    color: var(--g900);
    border-color: var(--white);
}

/* BLOG LAYOUT */
#blog-main {
    background: var(--g50);
    min-height: 60vh;
    padding: 60px 0 80px;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-w);
    gap: 48px;
    align-items: start;
}

/* FEATURED ARTICLES */
.featured-section {
    margin-bottom: 52px;
}

.featured-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--g500);
    margin-bottom: 20px;
}

.featured-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--g200);
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
}

/* Article card principal */
.article-card {
    background: var(--white);
    border: 1px solid var(--g200);
    border-radius: var(--r-xl);
    overflow: hidden;
    transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s, border-color .3s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--g300);
}

.article-card.featured-main {
    grid-row: 1 / 3;
}

.card-cover {
    position: relative;
    overflow: hidden;
    background: var(--g100);
}

.article-card.featured-main .card-cover {
    aspect-ratio: 16/10;
}

.article-card.featured-side .card-cover {
    aspect-ratio: 16/8;
}

.article-card.card-regular .card-cover {
    aspect-ratio: 16/9;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}

.article-card:hover .card-cover img {
    transform: scale(1.04);
}

.card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--g100) 0%, var(--g200) 100%);
    color: var(--g400);
}

/* Category badge on cover */
.card-cat-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--white);
    background: var(--g900);
    backdrop-filter: blur(8px);
    letter-spacing: .04em;
}

.card-reading-time {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, .8);
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card.featured-main .card-body {
    padding: 28px 32px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.card-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--g200);
    flex-shrink: 0;
}

.card-author-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--g600);
}

.card-date {
    font-size: 12px;
    color: var(--g400);
}

.card-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--g300);
    flex-shrink: 0;
}

.card-title {
    font-family: var(--blog-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--g900);
    line-height: 1.3;
    margin-bottom: 10px;
    transition: color .2s;
}

.article-card.featured-main .card-title {
    font-size: 26px;
}

.article-card:hover .card-title {
    color: var(--g700);
}

.card-excerpt {
    font-size: 14px;
    line-height: 1.65;
    color: var(--g600);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card.featured-main .card-excerpt {
    -webkit-line-clamp: 4;
    font-size: 15px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--g100);
}

.card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.card-tag {
    padding: 3px 8px;
    border-radius: var(--r-md);
    font-size: 11px;
    font-weight: 600;
    background: var(--g100);
    color: var(--g600);
    text-decoration: none;
    transition: background .15s, color .15s;
}

.card-tag:hover {
    background: var(--g900);
    color: var(--white);
}

.card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--g400);
}

/* ARTICLES GRID (liste normale) */
.articles-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--g500);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.articles-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--g200);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* PAGINATION */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--r-md);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--g200);
    color: var(--g600);
    background: var(--white);
    transition: all .2s;
}

.page-btn:hover {
    background: var(--g900);
    color: var(--white);
    border-color: var(--g900);
}

.page-btn.active {
    background: var(--g900);
    color: var(--white);
    border-color: var(--g900);
}

.page-btn.disabled {
    opacity: .4;
    pointer-events: none;
}

/* SIDEBAR */
.blog-sidebar {
    position: sticky;
    top: 140px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: var(--white);
    border: 1px solid var(--g200);
    border-radius: var(--r-xl);
    overflow: hidden;
}

.sidebar-widget-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--g100);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--g600);
}

.sidebar-widget-body {
    padding: 16px 20px;
}

/* Popular posts */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.popular-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--g100);
    text-decoration: none;
    transition: opacity .15s;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-item:hover {
    opacity: .75;
}

.popular-num {
    font-size: 22px;
    font-weight: 900;
    color: var(--g200);
    min-width: 28px;
    line-height: 1;
    font-family: var(--blog-serif);
}

.popular-cover {
    width: 52px;
    height: 38px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--g100);
    flex-shrink: 0;
}

.popular-info {
    flex: 1;
    min-width: 0;
}

.popular-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--g800);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 3px;
}

.popular-views {
    font-size: 11px;
    color: var(--g400);
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Categories widget */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: var(--r-md);
    text-decoration: none;
    transition: background .15s;
}

.category-item:hover {
    background: var(--g50);
}

.category-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.category-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--g700);
}

.category-count {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    background: var(--g100);
    border-radius: 999px;
    color: var(--g500);
}

/* Tags cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-cloud-item {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--g50);
    border: 1px solid var(--g200);
    color: var(--g600);
    text-decoration: none;
    transition: all .15s;
}

.tag-cloud-item:hover {
    background: var(--g900);
    color: var(--white);
    border-color: var(--g900);
}

/* Newsletter widget */
.newsletter-widget {
    background: var(--g900);
    border-color: transparent;
}

.newsletter-widget .sidebar-widget-header {
    border-color: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .5);
}

.newsletter-widget .sidebar-widget-body {
    padding: 20px;
}

.newsletter-title {
    font-family: var(--blog-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.newsletter-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
    margin-bottom: 14px;
    line-height: 1.55;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.newsletter-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--r-md);
    color: var(--white);
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: border-color .2s;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, .25);
}

.newsletter-input:focus {
    border-color: var(--accent-ring);
}

/* ARTICLE POST - blog-post.css */

/* Post Hero */
.post-hero {
    background: var(--black);
    padding: 72px 0 0;
    position: relative;
    overflow: hidden;
}

.post-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 48px 48px;
}

.post-hero-inner {
    position: relative;
    z-index: 2;
    max-width: var(--reading-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Breadcrumb */
.post-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, .4);
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.post-breadcrumb a {
    color: rgba(255, 255, 255, .4);
    text-decoration: none;
    transition: color .15s;
}

.post-breadcrumb a:hover {
    color: rgba(255, 255, 255, .8);
}

.post-breadcrumb .bc-sep {
    color: rgba(255, 255, 255, .2);
}

/* Post category + tags */
.post-cats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.post-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--white);
    text-decoration: none;
}

/* Post title */
.post-title {
    font-family: var(--blog-serif);
    font-size: clamp(30px, 5vw, 54px);
    font-weight: 700;
    color: var(--white);
    line-height: 1.15;
    letter-spacing: -.02em;
    margin-bottom: 20px;
}

.post-excerpt {
    font-size: 19px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .55);
    margin-bottom: 32px;
    font-family: var(--blog-serif);
    font-style: italic;
}

/* Post meta bar */
.post-meta-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
    flex-wrap: wrap;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--g700);
    border: 2px solid rgba(255, 255, 255, .12);
}

.post-author-info {}

.post-author-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
    margin-bottom: 3px;
}

.post-author-role {
    font-size: 11px;
    color: rgba(255, 255, 255, .4);
}

.post-meta-sep {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, .1);
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, .4);
}

.post-meta-item strong {
    color: rgba(255, 255, 255, .7);
    font-weight: 600;
}

/* Cover image */
.post-cover-wrap {
    margin-top: 40px;
    aspect-ratio: 21/9;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    overflow: hidden;
    background: var(--g800);
}

.post-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Post body layout */
#post-main {
    background: var(--white);
    padding: 0 0 80px;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-w);
    gap: 64px;
    align-items: start;
    padding-top: 56px;
}

/* Table of contents (sticky on post) */
.post-toc {
    position: sticky;
    top: 140px;
    background: var(--g50);
    border: 1px solid var(--g200);
    border-radius: var(--r-xl);
    padding: 20px;
    margin-bottom: 24px;
}

.post-toc-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--g500);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.post-toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-toc-list li a {
    display: block;
    padding: 5px 8px;
    font-size: 13px;
    color: var(--g600);
    text-decoration: none;
    border-radius: 6px;
    transition: background .15s, color .15s;
    border-left: 2px solid transparent;
}

.post-toc-list li a:hover {
    background: var(--g100);
    color: var(--g900);
}

.post-toc-list li a.active {
    color: var(--g900);
    font-weight: 600;
    border-left-color: var(--g900);
}

.post-toc-list li.toc-h3 {
    padding-left: 14px;
}

/* Article content */
.post-content {
    font-family: var(--blog-serif);
    font-size: 19px;
    line-height: 1.8;
    color: var(--g800);
    max-width: var(--reading-max);
}

.post-content h2 {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    color: var(--g900);
    margin: 52px 0 18px;
    letter-spacing: -.02em;
    scroll-margin-top: 100px;
}

.post-content h3 {
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 700;
    color: var(--g900);
    margin: 36px 0 14px;
    scroll-margin-top: 100px;
}

.post-content p {
    margin-bottom: 22px;
}

.post-content a {
    color: var(--g900);
    text-decoration: underline;
    text-decoration-color: var(--g300);
    text-underline-offset: 3px;
    transition: text-decoration-color .15s;
}

.post-content a:hover {
    text-decoration-color: var(--g700);
}

.post-content strong {
    font-weight: 700;
    color: var(--g900);
}

.post-content em {
    font-style: italic;
}

.post-content ul,
.post-content ol {
    padding-left: 24px;
    margin-bottom: 22px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content blockquote {
    margin: 32px 0;
    padding: 20px 24px;
    background: var(--g50);
    border-left: 3px solid var(--g900);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    font-style: italic;
    color: var(--g700);
}

.post-content blockquote cite {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    font-style: normal;
    color: var(--g500);
}

.post-content pre {
    background: var(--g900);
    color: #e5e7eb;
    padding: 20px 24px;
    border-radius: var(--r-lg);
    overflow-x: auto;
    margin: 28px 0;
    font-family: var(--blog-mono);
    font-size: 14px;
    line-height: 1.6;
}

.post-content code {
    font-family: var(--blog-mono);
    font-size: 14px;
    padding: 2px 6px;
    background: var(--g100);
    border-radius: 4px;
    color: var(--g800);
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.post-content img {
    max-width: 100%;
    border-radius: var(--r-lg);
    margin: 28px 0;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--g200);
    margin: 40px 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 15px;
}

.post-content th {
    text-align: left;
    padding: 10px 14px;
    background: var(--g900);
    color: var(--white);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.post-content td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--g100);
    color: var(--g700);
}

/* Reactions bar */
.reactions-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: var(--g50);
    border: 1px solid var(--g200);
    border-radius: var(--r-xl);
    margin: 48px 0 32px;
    flex-wrap: wrap;
}

.reactions-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--g600);
    flex: 1;
    min-width: 160px;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: var(--r-lg);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid var(--g200);
    background: var(--white);
    color: var(--g600);
    transition: all .2s;
}

.reaction-btn:hover {
    border-color: var(--g900);
    color: var(--g900);
}

.reaction-btn.active-like {
    background: rgba(74, 222, 128, .1);
    border-color: rgba(74, 222, 128, .4);
    color: #16a34a;
}

.reaction-btn.active-dislike {
    background: rgba(239, 68, 68, .08);
    border-color: rgba(239, 68, 68, .3);
    color: #dc2626;
}

.reactions-sep {
    width: 1px;
    height: 24px;
    background: var(--g200);
}

/* Share buttons */
.share-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.share-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--g500);
    text-transform: uppercase;
    letter-spacing: .07em;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--r-md);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid var(--g200);
    background: var(--white);
    color: var(--g600);
    text-decoration: none;
    transition: all .2s;
}

.share-btn:hover {
    background: var(--g900);
    color: var(--white);
    border-color: var(--g900);
}

.share-btn.share-copied {
    background: rgba(74, 222, 128, .1);
    border-color: rgba(74, 222, 128, .4);
    color: #16a34a;
}

/* Lang switcher (post) */
.post-lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--r-lg);
    margin-bottom: 28px;
}

.post-lang-switch p {
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
    flex: 1;
}

.lang-alt-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: var(--r-md);
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    transition: background .2s;
}

.lang-alt-link:hover {
    background: rgba(255, 255, 255, .18);
}

/* Author card */
.author-card {
    background: var(--g50);
    border: 1px solid var(--g200);
    border-radius: var(--r-xl);
    padding: 28px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.author-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--g200);
    flex-shrink: 0;
}

.author-card-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--g900);
    margin-bottom: 2px;
}

.author-card-role {
    font-size: 12px;
    color: var(--g500);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 600;
}

.author-card-bio {
    font-size: 14px;
    line-height: 1.65;
    color: var(--g600);
}

/* Related articles */
.related-section {
    margin-top: 56px;
    padding-top: 48px;
    border-top: 1px solid var(--g200);
}

.related-title {
    font-family: var(--blog-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--g900);
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* COMMENTS */
.comments-section {
    margin-top: 56px;
    padding-top: 48px;
    border-top: 1px solid var(--g200);
    max-width: var(--reading-max);
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.comments-title {
    font-family: var(--blog-serif);
    font-size: 26px;
    font-weight: 700;
    color: var(--g900);
}

.comments-count {
    padding: 4px 12px;
    background: var(--g100);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: var(--g600);
}

/* Comment form */
.comment-form-wrap {
    background: var(--g50);
    border: 1px solid var(--g200);
    border-radius: var(--r-xl);
    padding: 28px;
    margin-bottom: 40px;
}

.comment-form-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--g900);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.comment-form input,
.comment-form textarea {
    padding: 11px 14px;
    background: var(--white);
    border: 1px solid var(--g200);
    border-radius: var(--r-md);
    color: var(--g800);
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color .2s;
    resize: none;
}

.comment-form label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--g500);
    margin-bottom: 4px;
    display: block;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--g400);
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
    color: var(--g300);
}

.comment-success {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(74, 222, 128, .08);
    border: 1px solid rgba(74, 222, 128, .25);
    border-radius: var(--r-lg);
    color: #16a34a;
    font-size: 14px;
    font-weight: 600;
}

.comment-success.show {
    display: flex;
}

/* Comment list */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comment-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--g100);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item.is-reply {
    padding-left: 52px;
    border-left: 2px solid var(--g100);
    margin-left: 20px;
    border-bottom: none;
    padding-top: 16px;
    padding-bottom: 16px;
}

.comment-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--g200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--g600);
    flex-shrink: 0;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-author-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--g900);
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-verified {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    background: rgba(74, 222, 128, .1);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #16a34a;
    letter-spacing: .04em;
}

.comment-date {
    font-size: 12px;
    color: var(--g400);
    margin-top: 1px;
}

.comment-text {
    font-size: 15px;
    line-height: 1.65;
    color: var(--g700);
    margin-left: 48px;
    margin-bottom: 10px;
}

.comment-actions {
    margin-left: 48px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.comment-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--g400);
    transition: color .15s;
    padding: 0;
}

.comment-action-btn:hover {
    color: var(--g700);
}

.comment-action-btn.liked {
    color: #16a34a;
}

/* Reply form inline */
.reply-form-inline {
    margin-left: 48px;
    margin-top: 14px;
    padding: 14px;
    background: var(--g50);
    border: 1px solid var(--g200);
    border-radius: var(--r-lg);
    display: none;
}

.reply-form-inline.open {
    display: block;
}

/* ERROR PAGES */
.error-page {
    background: var(--black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    position: relative;
    overflow: hidden;
}

.error-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
    background-size: 48px 48px;
}

.error-code {
    font-family: var(--blog-serif);
    font-size: clamp(100px, 20vw, 200px);
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .1);
    line-height: 1;
    position: relative;
    z-index: 1;
    user-select: none;
    letter-spacing: -.04em;
}

.error-title {
    font-family: var(--blog-serif);
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 700;
    color: var(--white);
    margin: 16px 0 14px;
    position: relative;
    z-index: 1;
}

.error-desc {
    font-size: 17px;
    color: rgba(255, 255, 255, .45);
    max-width: 440px;
    line-height: 1.65;
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
}

.error-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* RESPONSIVE */
@media (max-width: 1024px) {

    .blog-layout,
    .post-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar,
    .post-toc {
        position: static;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .article-card.featured-main {
        grid-row: auto;
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-hero-inner {
        flex-direction: column;
    }

    .blog-hero-stats {
        justify-content: center;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .comment-form .form-row {
        grid-template-columns: 1fr;
    }

    .comment-text,
    .comment-actions,
    .reply-form-inline {
        margin-left: 0;
    }

    .comment-item.is-reply {
        padding-left: 20px;
        margin-left: 0;
    }

    .reactions-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .post-cover-wrap {
        aspect-ratio: 16/9;
    }
}

@media (max-width: 480px) {
    .blog-search-inner {
        flex-direction: column;
    }

    .blog-search-wrap {
        width: 100%;
    }
}

/* ── COMMENT FORM REDESIGN ─────────────────────── */
.cf-card {
    background: var(--g50);
    border: 1px solid var(--g200);
    border-radius: var(--r-xl);
    padding: 28px 28px 24px;
    margin-bottom: 40px;
}

.cf-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--g900);
    margin-bottom: 20px;
}

.cf-reply-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(249, 115, 22, .07);
    border: 1px solid rgba(249, 115, 22, .2);
    border-radius: var(--r-md);
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--g600);
}

.cf-reply-indicator svg { color: #f97316; flex-shrink: 0 }

.cf-cancel-reply {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--g400);
    padding: 0;
    transition: color .15s;
    white-space: nowrap;
}
.cf-cancel-reply:hover { color: var(--g700) }

.cf-feedback {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--r-lg);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    line-height: 1.4;
}
.cf-feedback--ok {
    background: rgba(74, 222, 128, .08);
    border: 1px solid rgba(74, 222, 128, .25);
    color: #16a34a;
}
.cf-feedback--err {
    background: rgba(239, 68, 68, .07);
    border: 1px solid rgba(239, 68, 68, .2);
    color: #dc2626;
}

.cf-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.cf-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cf-field label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--g500);
}

.cf-counter {
    font-size: 11px;
    font-weight: 500;
    color: var(--g300);
    letter-spacing: 0;
    text-transform: none;
}
.cf-counter.warn { color: #f97316 }

.cf-field input,
.cf-field textarea {
    padding: 11px 14px;
    background: var(--white);
    border: 1px solid var(--g200);
    border-radius: var(--r-md);
    color: var(--g800);
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    resize: none;
}
.cf-field input:focus,
.cf-field textarea:focus {
    border-color: var(--g400);
    box-shadow: 0 0 0 3px rgba(0,0,0,.04);
}
.cf-field input::placeholder,
.cf-field textarea::placeholder { color: var(--g300) }

.cf-field.has-error input,
.cf-field.has-error textarea {
    border-color: #fca5a5;
    box-shadow: 0 0 0 3px rgba(239,68,68,.06);
}

.cf-error-msg {
    font-size: 12px;
    color: #dc2626;
    font-weight: 500;
    min-height: 16px;
}

.cf-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.cf-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--g400);
}

/* no-comments empty state */
.no-comments {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 0 32px;
    color: var(--g300);
    text-align: center;
}
.no-comments p { font-size: 15px; font-weight: 600; color: var(--g400) }

@media (max-width: 600px) {
    .cf-row { grid-template-columns: 1fr }
    .cf-footer { flex-direction: column-reverse; align-items: stretch }
    .cf-footer .btn { justify-content: center; width: 100% }
    .cf-card { padding: 20px 16px }
}