@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Variables — identiques à classepulse.be ─────────────────── */
:root {
    --primary:       #b66dff;
    --primary-dark:  #a855ff;
    --primary-light: #d8a8ff;
    --success:       #1bcfb4;
    --text-primary:  #343a40;
    --text-secondary:#6c757d;
    --text-muted:    #9c9fa6;
    --bg-white:      #ffffff;
    --bg-light:      #f2f7f8;
    --bg-content:    #f2edf3;
    --border:        #ebedf2;
    --shadow-sm:     0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md:     0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg:     0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl:     0 20px 25px -5px rgba(0,0,0,0.1);
    --radius:        12px;
    --radius-sm:     8px;
    --max-w:         1200px;
    --transition:    0.3s ease;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Nav ─────────────────────────────────────────────────────── */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    gap: 2rem;
}
.site-logo {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.site-logo img { height: 32px; width: auto; }
.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}
.nav-menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    display: block;
}
.nav-menu a:hover { color: var(--primary); background: var(--bg-content); }
.nav-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    color: white !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
    transition: transform var(--transition), box-shadow var(--transition) !important;
}
.nav-cta:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-lg) !important;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
}

/* ── Hero homepage ───────────────────────────────────────────── */
.site-hero {
    background: linear-gradient(135deg, var(--bg-light) 0%, rgba(182,109,255,0.05) 100%);
    padding: 64px 20px 56px;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.site-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(182,109,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-inner { max-width: 680px; margin: 0 auto; position: relative; z-index: 1; }
.hero-label {
    display: inline-block;
    background: var(--bg-content);
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 20px;
}
.site-hero h1 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.site-hero .hero-desc {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 540px;
    margin: 0 auto;
}

/* ── Posts grid ──────────────────────────────────────────────── */
.site-main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 48px 20px 80px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
}
.posts-feed { min-width: 0; }
.posts-feed h2 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Post card */
.post-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 24px;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.post-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-content);
}
.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.post-card:hover .post-card-image img { transform: scale(1.04); }
.post-card-body { padding: 24px; }
.post-card-tag {
    display: inline-block;
    background: var(--bg-content);
    border-left: 3px solid var(--primary);
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 0 4px 4px 0;
    margin-bottom: 12px;
}
.post-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 10px;
    transition: color var(--transition);
}
.post-card:hover .post-card-title { color: var(--primary); }
.post-card-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}
.post-card-meta .dot { color: var(--border); }
.read-more {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap var(--transition);
}
.post-card:hover .read-more { gap: 8px; }

/* Featured post (1er) */
.post-card.featured {
    flex-direction: row;
    margin-bottom: 32px;
    border-left: 4px solid var(--primary);
}
.post-card.featured .post-card-image {
    width: 280px;
    flex-shrink: 0;
    aspect-ratio: auto;
    min-height: 200px;
}
.post-card.featured .post-card-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.post-card.featured .post-card-title { font-size: 21px; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar { position: sticky; top: 86px; }
.sidebar-widget {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}
.sidebar-widget h3 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.sidebar-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: white;
}
.sidebar-cta h3 { color: rgba(255,255,255,0.6); }
.sidebar-cta p {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255,255,255,0.88);
    margin-bottom: 16px;
}
.btn-white {
    display: inline-block;
    background: white;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    width: 100%;
    text-align: center;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tags-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
    background: var(--bg-content);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 999px;
    transition: all var(--transition);
}
.tag-pill:hover {
    background: var(--bg-content);
    border-color: var(--primary-light);
    color: var(--primary);
}
.recent-post {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.recent-post:last-child { border-bottom: none; }
.recent-post-img {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-content);
}
.recent-post-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color var(--transition);
}
.recent-post:hover .recent-post-title { color: var(--primary); }
.recent-post-date { font-size: 11px; color: var(--text-muted); }

/* ── Article (post.hbs) ──────────────────────────────────────── */
.article-wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px 80px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
}
.article { min-width: 0; }
.article-header { padding: 48px 0 32px; }
.article-tag {
    display: inline-block;
    background: var(--bg-content);
    border-left: 3px solid var(--primary);
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 0 4px 4px 0;
    margin-bottom: 16px;
}
.article-title {
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 20px;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.article-meta .dot { color: var(--border); }
.article-author-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.article-feature-image {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 40px;
    aspect-ratio: 16/9;
}
.article-feature-image img { width: 100%; height: 100%; object-fit: cover; }

/* Contenu article */
.gh-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}
.gh-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 40px 0 16px;
    border-left: 4px solid var(--primary);
    padding-left: 16px;
}
.gh-content h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 32px 0 12px;
}
.gh-content p { margin-bottom: 20px; color: var(--text-secondary); }
.gh-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.gh-content a:hover { color: var(--primary-dark); }
.gh-content ul, .gh-content ol {
    margin: 0 0 20px 24px;
    color: var(--text-secondary);
}
.gh-content li { margin-bottom: 8px; }
.gh-content blockquote {
    border-left: 4px solid var(--primary);
    background: var(--bg-content);
    padding: 20px 24px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 28px 0;
    font-style: italic;
    color: var(--text-secondary);
}
.gh-content code {
    background: var(--bg-content);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--primary-dark);
}
.gh-content pre {
    background: #1e1e2e;
    border-radius: var(--radius-sm);
    padding: 24px;
    overflow-x: auto;
    margin: 24px 0;
}
.gh-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: #cdd6f4;
    font-size: 14px;
}
.gh-content img {
    border-radius: var(--radius-sm);
    margin: 28px 0;
    box-shadow: var(--shadow-md);
}
.gh-content hr {
    border: none;
    border-top: 2px solid var(--border);
    margin: 40px 0;
}

/* Tags article */
.article-tags { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.article-tags span { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── CTA fin d'article ───────────────────────────────────────── */
.article-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    padding: 36px 32px;
    text-align: center;
    margin-top: 48px;
    color: white;
}
.article-cta h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.article-cta p { font-size: 14px; opacity: 0.88; margin-bottom: 20px; line-height: 1.6; }
.btn-primary {
    display: inline-block;
    background: white;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-primary);
    transition: all var(--transition);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); background: var(--bg-content); }
.pagination .current { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border-color: transparent; }

/* ── Page 404 / erreur ───────────────────────────────────────── */
.error-page {
    text-align: center;
    padding: 100px 20px;
    max-width: 520px;
    margin: 0 auto;
}
.error-code {
    font-size: 80px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}
.error-page h1 { font-size: 24px; margin-bottom: 12px; }
.error-page p { color: var(--text-secondary); margin-bottom: 32px; }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
    background: #3e4b5b;
    color: white;
    padding: 50px 20px 20px;
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-brand .logo { font-size: 20px; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.7; margin-top: 10px; }
.footer-col h4 { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 13px; color: rgba(255,255,255,0.65); transition: color var(--transition); }
.footer-col a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    text-align: center;
    line-height: 1.8;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .site-main, .article-wrap { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .post-card.featured { flex-direction: column; }
    .post-card.featured .post-card-image { width: 100%; min-height: auto; aspect-ratio: 16/9; }
}
@media (max-width: 600px) {
    .nav-menu { display: none; }
    .site-hero { padding: 48px 20px 40px; }
    .site-main, .article-wrap { padding: 24px 16px 60px; }
}

/* ── Koenig editor — classes requises par Ghost ──────────────── */
.kg-width-wide {
    margin-left: calc(50% - 45vw);
    margin-right: calc(50% - 45vw);
    max-width: 90vw;
}
.kg-width-full {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
}
.kg-image { width: 100%; border-radius: var(--radius-sm); }
.kg-gallery-container { display: flex; flex-direction: column; gap: 8px; margin: 24px 0; }
.kg-gallery-row { display: flex; gap: 8px; }
.kg-gallery-image { flex: 1; }
.kg-gallery-image img { border-radius: var(--radius-sm); width: 100%; height: 100%; object-fit: cover; }
.kg-bookmark-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 24px 0;
    display: flex;
    background: var(--bg-white);
    transition: box-shadow var(--transition);
}
.kg-bookmark-card:hover { box-shadow: var(--shadow-md); }
.kg-bookmark-content { padding: 20px; flex: 1; }
.kg-bookmark-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; color: var(--text-primary); }
.kg-bookmark-description { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.kg-bookmark-metadata { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--text-muted); }
.kg-bookmark-thumbnail { width: 160px; flex-shrink: 0; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.kg-callout-card {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    background: var(--bg-content);
    border-left: 4px solid var(--primary);
    margin: 24px 0;
}
.kg-callout-emoji { font-size: 22px; flex-shrink: 0; }
.kg-callout-text { font-size: 15px; line-height: 1.7; color: var(--text-secondary); }
.kg-video-card { margin: 24px 0; border-radius: var(--radius-sm); overflow: hidden; }
.kg-video-card video { width: 100%; display: block; }
.kg-audio-card { margin: 24px 0; }
.kg-file-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin: 24px 0;
    background: var(--bg-white);
}
.kg-file-card-title { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.kg-file-card-caption { font-size: 12px; color: var(--text-muted); }
.kg-toggle-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 24px 0;
}
.kg-toggle-heading { padding: 16px 20px; font-weight: 600; cursor: pointer; background: var(--bg-content); }
.kg-toggle-content { padding: 16px 20px; font-size: 15px; color: var(--text-secondary); }
