/*
Theme Name: Punaises Editorial
Theme URI: https://www.punaises-lit-devis.fr/
Author: Devis Punaise de Lit
Author URI: https://devis-punaises-de-lit.fr
Description: Thème éditorial premium pour le blog Punaises de Lit. Design magazine avec progression de lecture, sommaire automatique, temps de lecture, dark mode, typographie Fraunces + Inter. Optimisé Core Web Vitals, schema.org Article, AMP-friendly.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: punaises-editorial
Tags: blog, editorial, magazine, custom-colors, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, dark-mode
*/

/* ============================================================
   1. TOKENS — BRAND DNA (extends parent design system)
============================================================ */
:root {
    /* Brand palette — immuable, ne flippe jamais */
    --primary: #0077B6;
    --primary-dark: #005f92;
    --secondary: #90E0EF;
    --dark: #1D3557;
    --ink: #0F1E33;
    --accent: #FF6B6B;
    --gold: #F4B860;

    /* Surfaces & texte — flippent en dark mode */
    --text: #0F1E33;
    --text-soft: #1D3557;
    --paper: #FDFCFA;
    --white: #FFFFFF;
    --light: #F8F9FA;
    --gray: #6C757D;
    --gray-soft: #E5EAF0;
    --gray-line: #EDF1F5;

    --serif: 'Fraunces', 'Iowan Old Style', 'Apple Garamond', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

    --container: 1200px;
    --container-narrow: 760px;
    --container-wide: 1380px;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 32px;

    --shadow-sm: 0 2px 8px rgba(15,30,51,0.06);
    --shadow-md: 0 10px 30px rgba(15,30,51,0.08);
    --shadow-lg: 0 25px 60px rgba(15,30,51,0.14);
    --shadow-glow: 0 0 0 4px rgba(0,119,182,0.12);

    --t-fast: 0.18s cubic-bezier(.4,0,.2,1);
    --t-base: 0.3s cubic-bezier(.4,0,.2,1);
    --t-slow: 0.6s cubic-bezier(.16,1,.3,1);
}

[data-theme="dark"] {
    /* Brand palette inchangée : --primary, --secondary, --dark, --ink restent */
    --text: #F1F5F9;
    --text-soft: #CBD5E1;
    --paper: #0E1822;
    --white: #16222F;
    --light: #1A2735;
    --gray: #94A3B8;
    --gray-soft: #243140;
    --gray-line: #1F2C3B;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.5);
    --shadow-lg: 0 25px 60px rgba(0,0,0,0.6);
}

/* ============================================================
   2. RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--t-base), color var(--t-base);
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary-dark); }

::selection { background: var(--secondary); color: var(--dark); }

/* ============================================================
   3. LAYOUT
============================================================ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 24px; }

/* ============================================================
   4. READING PROGRESS BAR
============================================================ */
.reading-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: transparent;
    z-index: 9999;
    pointer-events: none;
}
.reading-progress__bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: 0 0 12px rgba(0,119,182,0.5);
    transition: width 0.05s linear;
}

/* ============================================================
   5. HEADER / NAV
============================================================ */
.site-header {
    background: rgba(253,252,250,0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--gray-line);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--t-base);
}
[data-theme="dark"] .site-header { background: rgba(14,24,34,0.85); }

.site-header.scrolled { box-shadow: var(--shadow-sm); }

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 32px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.site-brand:hover { color: var(--primary); }
.site-brand svg { color: var(--primary); }

.site-brand__kicker {
    display: block;
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary);
    margin-top: -4px;
}

.primary-menu {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}
.primary-menu a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 4px 0;
}
.primary-menu a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--t-base);
}
.primary-menu a:hover::after,
.primary-menu .current-menu-item a::after { width: 100%; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle, .search-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--gray-line);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all var(--t-fast);
}
.theme-toggle:hover, .search-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: rotate(20deg);
}

.btn-cta {
    background: var(--ink);
    color: #fff;
    padding: 11px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all var(--t-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-cta:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
}

/* ============================================================
   6. SEARCH OVERLAY
============================================================ */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,30,51,0.6);
    backdrop-filter: blur(8px);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base);
    display: grid;
    place-items: start center;
    padding-top: 18vh;
}
.search-overlay.is-open { opacity: 1; pointer-events: auto; }
.search-overlay__inner {
    width: min(640px, 90vw);
    background: var(--paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 28px;
    transform: translateY(-20px);
    transition: transform var(--t-base);
}
.search-overlay.is-open .search-overlay__inner { transform: translateY(0); }
.search-overlay input[type="search"] {
    width: 100%;
    border: none;
    background: transparent;
    font-family: var(--serif);
    font-size: 1.8rem;
    color: var(--text);
    padding: 8px 0;
    outline: none;
    border-bottom: 2px solid var(--gray-line);
}
.search-overlay input[type="search"]:focus { border-bottom-color: var(--primary); }

/* ============================================================
   7. HERO (homepage blog)
============================================================ */
.blog-hero {
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
}
.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(800px circle at 20% 10%, rgba(0,119,182,0.10), transparent 50%),
        radial-gradient(700px circle at 85% 20%, rgba(144,224,239,0.18), transparent 55%);
    z-index: -1;
}
.blog-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(0,119,182,0.08);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.blog-hero h1 {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.025em;
    font-weight: 500;
    max-width: 900px;
    margin-bottom: 24px;
    font-variation-settings: "SOFT" 50, "WONK" 1;
}
.blog-hero h1 em {
    font-style: italic;
    color: var(--primary);
    font-variation-settings: "SOFT" 100;
}
.blog-hero p.lede {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 620px;
    line-height: 1.55;
}

/* ============================================================
   8. FEATURED POST (magazine layout)
============================================================ */
.featured-post {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    align-items: center;
    margin: 60px 0;
    padding: 0;
}
.featured-post__image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-lg);
}
.featured-post__image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}
.featured-post:hover .featured-post__image img { transform: scale(1.04); }
.featured-post__badge {
    position: absolute;
    top: 18px; left: 18px;
    background: var(--ink);
    color: #fff;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.featured-post__category {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 14px;
    display: block;
}
.featured-post h2 {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 3.4vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 500;
    margin-bottom: 18px;
}
.featured-post h2 a { color: var(--text); background-image: linear-gradient(var(--primary),var(--primary)); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size var(--t-slow); }
.featured-post h2 a:hover { background-size: 100% 2px; }
.featured-post__excerpt { color: var(--gray); font-size: 1.08rem; margin-bottom: 22px; }

/* ============================================================
   9. ARTICLE CARDS (grid)
============================================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 32px;
    margin: 60px 0;
}
.posts-grid--two { grid-template-columns: repeat(2, 1fr); }

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--gray-line);
    transition: all var(--t-base);
    position: relative;
}
.post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.post-card__media {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}
.post-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}
.post-card:hover .post-card__media img { transform: scale(1.08); }
.post-card__category {
    position: absolute;
    top: 14px; left: 14px;
    background: var(--paper);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    z-index: 1;
}
.post-card__body { padding: 24px 26px 28px; flex: 1; display: flex; flex-direction: column; }
.post-card h3 {
    font-family: var(--serif);
    font-size: 1.35rem;
    line-height: 1.25;
    letter-spacing: -0.015em;
    font-weight: 500;
    margin-bottom: 12px;
}
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--primary); }
.post-card__excerpt {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 18px;
    flex: 1;
}
.post-card__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.82rem;
    color: var(--gray);
    padding-top: 14px;
    border-top: 1px solid var(--gray-line);
}
.post-card__meta time { font-variant-numeric: tabular-nums; }
.post-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }

/* Stagger animation */
.post-card { opacity: 0; transform: translateY(20px); animation: fadeUp 0.6s var(--t-slow) forwards; }
.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.3s; }
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   10. SINGLE ARTICLE
============================================================ */
.single-hero {
    padding: 70px 0 50px;
    text-align: center;
    position: relative;
}
.single-hero__category {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 22px;
}
.single-hero h1 {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    font-weight: 500;
    max-width: 880px;
    margin: 0 auto 24px;
}
.single-hero__lede {
    font-family: var(--serif);
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--gray);
    max-width: 640px;
    margin: 0 auto 32px;
    font-weight: 400;
    font-style: italic;
}
.single-hero__meta {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 0.92rem;
    color: var(--gray);
}
.single-hero__avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: grid;
    place-items: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

.single-featured {
    margin: 40px 0;
}
.single-featured img {
    border-radius: var(--radius-lg);
    width: 100%;
    aspect-ratio: 21/9;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

/* Article layout w/ sidebar */
.article-layout {
    display: grid;
    grid-template-columns: 1fr min(720px, 100%) 1fr;
    gap: 0 40px;
    margin: 60px 0;
}
.article-layout > * { grid-column: 2; }
.article-layout > .wide { grid-column: 1 / -1; }

.article-aside-left {
    grid-column: 1;
    grid-row: 1 / span 999;
    position: sticky;
    top: 100px;
    align-self: start;
    padding-right: 20px;
}
.article-aside-right {
    grid-column: 3;
    grid-row: 1 / span 999;
    position: sticky;
    top: 100px;
    align-self: start;
    padding-left: 20px;
}

/* ============================================================
   SHARE — vertical rail + horizontal inline
============================================================ */
.share-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    background: var(--white);
    border-radius: 999px;
    border: 1px solid var(--gray-line);
    box-shadow: var(--shadow-sm);
    width: fit-content;
    margin: 0 auto;
}
.share-rail__label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gray);
    padding: 10px 0 4px;
    margin: 0;
}
.share-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-soft);
    display: grid; place-items: center;
    transition: all var(--t-fast);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}
.share-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: currentColor;
    transform: scale(0);
    transition: transform var(--t-fast);
    z-index: 0;
}
.share-btn svg { position: relative; z-index: 1; transition: color var(--t-fast); }
.share-btn:hover { transform: translateY(-2px); }
.share-btn:hover::before { transform: scale(1); }
.share-btn:hover svg, .share-btn:hover { color: #fff; }

.share-btn--twitter   { color: #0F1419; }
.share-btn--facebook  { color: #1877F2; }
.share-btn--linkedin  { color: #0A66C2; }
.share-btn--copy      { color: var(--primary); }
.share-btn--copy.is-copied::before { transform: scale(1); background: #16a34a; }
.share-btn--copy.is-copied svg { color: #fff; }

/* Inline horizontal share (mobile + below article) */
.share-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 22px;
    margin: 50px 0 30px;
    background: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
}
.share-inline__label {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gray);
    margin-right: 6px;
}
.share-inline .share-btn {
    width: 42px; height: 42px;
    background: var(--light);
}

/* Table of contents */
.toc {
    background: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius-md);
    padding: 24px 22px;
}
.toc__title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; margin-bottom: 8px; line-height: 1.4; }
.toc li::before {
    content: counter(toc, decimal-leading-zero);
    color: var(--primary);
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    margin-right: 10px;
}
.toc a {
    color: var(--text);
    font-size: 0.92rem;
    border-left: 2px solid transparent;
    padding-left: 0;
    transition: all var(--t-fast);
    display: inline-block;
}
.toc a:hover, .toc a.is-active {
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 8px;
    margin-left: -10px;
}
.toc li.lvl-3 { padding-left: 18px; font-size: 0.88em; }

/* ============================================================
   11. ARTICLE CONTENT — EDITORIAL TYPOGRAPHY
============================================================ */
.article-content {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--text);
}
.article-content > * + * { margin-top: 1.4em; }

.article-content > p:first-of-type::first-letter {
    font-family: var(--serif);
    float: left;
    font-size: 5em;
    line-height: 0.85;
    font-weight: 500;
    color: var(--primary);
    padding: 6px 12px 0 0;
    margin-top: 4px;
}

.article-content h2 {
    font-family: var(--serif);
    font-size: 2rem;
    line-height: 1.2;
    letter-spacing: -0.018em;
    font-weight: 500;
    margin-top: 2.4em !important;
    margin-bottom: 0.6em;
    position: relative;
    scroll-margin-top: 100px;
}
.article-content h2::before {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 999px;
    margin-bottom: 18px;
}
.article-content h3 {
    font-family: var(--serif);
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 500;
    margin-top: 1.8em !important;
    margin-bottom: 0.4em;
    scroll-margin-top: 100px;
}
.article-content h4 {
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 1.6em !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
}

.article-content p { color: var(--text); }

.article-content a {
    color: var(--primary);
    border-bottom: 1px solid currentColor;
    transition: all var(--t-fast);
}
.article-content a:hover {
    background: var(--secondary);
    color: var(--dark);
    border-bottom-color: transparent;
}

.article-content ul, .article-content ol {
    padding-left: 1.6em;
}
.article-content li { margin-bottom: 0.6em; }
.article-content ul li::marker { color: var(--primary); }
.article-content ol li::marker { color: var(--primary); font-weight: 700; }

.article-content blockquote {
    margin: 2.5em -20px;
    padding: 24px 32px;
    border-left: 4px solid var(--primary);
    background: linear-gradient(90deg, rgba(0,119,182,0.05), transparent);
    font-family: var(--serif);
    font-size: 1.4rem;
    line-height: 1.4;
    font-style: italic;
    color: var(--text);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    position: relative;
}
.article-content blockquote::before {
    content: '"';
    position: absolute;
    top: -10px; left: 20px;
    font-family: var(--serif);
    font-size: 5rem;
    color: var(--secondary);
    line-height: 1;
}
.article-content blockquote cite {
    display: block;
    margin-top: 14px;
    font-size: 0.92rem;
    font-style: normal;
    color: var(--gray);
    font-family: var(--sans);
}

.article-content img, .article-content figure {
    margin: 2.4em auto;
    border-radius: var(--radius-md);
    display: block;
    max-width: 100%;
    height: auto;
}
.article-content figure img { border-radius: var(--radius-md); margin: 0 auto; }
.article-content .wp-block-image { text-align: center; margin: 2.4em auto; }
.article-content .wp-block-image img { margin: 0 auto; display: block; }
.article-content .alignleft  { float: left;  margin: 0.5em 1.4em 1em 0; }
.article-content .alignright { float: right; margin: 0.5em 0 1em 1.4em; }
.article-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.article-content .alignwide,
.article-content .alignfull { margin-left: auto; margin-right: auto; }
.article-content figcaption {
    text-align: center;
    font-size: 0.88rem;
    color: var(--gray);
    margin-top: 12px;
    font-style: italic;
}

.article-content code {
    font-family: var(--mono);
    font-size: 0.88em;
    background: var(--gray-line);
    padding: 2px 8px;
    border-radius: 5px;
    color: var(--primary-dark);
}
.article-content pre {
    background: var(--ink);
    color: #E2E8F0;
    padding: 22px 26px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-size: 0.92rem;
    line-height: 1.5;
}
.article-content pre code { background: transparent; padding: 0; color: inherit; }

.article-content hr {
    border: none;
    margin: 3em auto;
    width: 80px;
    text-align: center;
    overflow: visible;
}
.article-content hr::after {
    content: '· · ·';
    display: block;
    color: var(--primary);
    font-size: 1.5rem;
    letter-spacing: 0.5em;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 0.95rem;
}
.article-content th, .article-content td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--gray-line);
    text-align: left;
}
.article-content th {
    background: var(--light);
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.02em;
}

/* Callout box */
.article-content .wp-block-quote.is-style-callout,
.article-content .callout {
    background: linear-gradient(135deg, rgba(0,119,182,0.06), rgba(144,224,239,0.12));
    border: 1px solid rgba(0,119,182,0.18);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    font-family: var(--sans);
    font-style: normal;
    font-size: 1.02rem;
}

/* ============================================================
   12. CTA INLINE — convert blog readers to leads
============================================================ */
.inline-cta {
    margin: 3em 0;
    padding: 40px 36px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.inline-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(500px circle at 80% 0%, rgba(144,224,239,0.3), transparent 40%);
}
.inline-cta__eyebrow {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 18px;
    position: relative;
}
.inline-cta h3 {
    font-family: var(--serif);
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 12px;
    position: relative;
}
.inline-cta p {
    opacity: 0.92;
    margin-bottom: 22px;
    position: relative;
}
.inline-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: var(--primary);
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 700;
    transition: all var(--t-base);
    position: relative;
}
.inline-cta .btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* ============================================================
   13. TAGS / AUTHOR BIO / RELATED
============================================================ */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 40px 0;
}
.article-tags a {
    padding: 7px 14px;
    background: var(--light);
    color: var(--text);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--t-fast);
}
.article-tags a:hover { background: var(--primary); color: white; }

.author-bio {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    padding: 32px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-line);
    margin: 50px 0;
}
.author-bio__avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: grid;
    place-items: center;
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: var(--serif);
}
.author-bio__kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary);
}
.author-bio h4 {
    font-family: var(--serif);
    font-size: 1.4rem;
    margin: 4px 0 8px;
}
.author-bio p { color: var(--gray); font-size: 0.96rem; }

.related-posts {
    margin: 80px 0;
    padding-top: 60px;
    border-top: 1px solid var(--gray-line);
}
.related-posts__title {
    font-family: var(--serif);
    font-size: 2rem;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

/* ============================================================
   14. SIDEBAR / WIDGETS
============================================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.widget {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 26px;
    border: 1px solid var(--gray-line);
}
.widget__title {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}
.widget ul { list-style: none; }
.widget li { padding: 8px 0; border-bottom: 1px dashed var(--gray-line); }
.widget li:last-child { border: none; }
.widget a { color: var(--text); font-size: 0.95rem; transition: all var(--t-fast); }
.widget a:hover { color: var(--primary); padding-left: 4px; }

.widget-newsletter {
    background: linear-gradient(135deg, var(--dark), var(--ink));
    color: white;
    border: none;
}
.widget-newsletter .widget__title { color: white; border-color: var(--secondary); }
.widget-newsletter p { font-size: 0.9rem; opacity: 0.85; margin-bottom: 14px; }
.widget-newsletter input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    color: white;
    font: inherit;
    margin-bottom: 10px;
}
.widget-newsletter input::placeholder { color: rgba(255,255,255,0.55); }
.widget-newsletter button {
    width: 100%;
    padding: 12px;
    background: var(--secondary);
    color: var(--dark);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t-base);
}
.widget-newsletter button:hover { background: white; }

/* ============================================================
   15. PAGINATION
============================================================ */
.pagination,
.nav-links.pagination,
.wp-pagenavi {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 80px auto 40px;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}
.pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.pagination .page-numbers,
.wp-pagenavi a,
.wp-pagenavi span {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    border-radius: 12px;
    transition: all var(--t-fast);
    text-decoration: none;
    position: relative;
}
.pagination .page-numbers:hover,
.wp-pagenavi a:hover {
    background: var(--light);
    color: var(--primary);
}
.pagination .page-numbers.current,
.wp-pagenavi span.current {
    background: var(--ink);
    color: #fff;
    box-shadow: 0 6px 16px rgba(15,30,51,0.18);
}
.pagination .page-numbers.dots {
    color: var(--gray);
    pointer-events: none;
    letter-spacing: 2px;
}
.pagination .prev,
.pagination .next {
    background: var(--white);
    border: 1px solid var(--gray-line);
    padding: 0 18px;
    gap: 8px;
    font-size: 0.92rem;
}
.pagination .prev:hover,
.pagination .next:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.pagination .prev { margin-right: 6px; }
.pagination .next { margin-left: 6px; }
.pagination .screen-reader-text { display: none; }

@media (max-width: 540px) {
    .pagination .page-numbers { min-width: 40px; height: 40px; padding: 0 10px; font-size: 0.9rem; }
    .pagination .prev span,
    .pagination .next span { display: none; }
    .pagination .prev,
    .pagination .next { padding: 0 14px; }
}

/* ============================================================
   16. FOOTER
============================================================ */
.site-footer {
    background: var(--ink);
    color: rgba(255,255,255,0.8);
    padding: 80px 0 30px;
    margin-top: 100px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 50px;
    margin-bottom: 50px;
}
.footer-brand h3 {
    font-family: var(--serif);
    font-size: 1.6rem;
    color: white;
    margin-bottom: 14px;
}
.footer-brand p { font-size: 0.95rem; line-height: 1.6; }
.footer-col h4 {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.95rem; }
.footer-col a:hover { color: var(--secondary); }
.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    flex-wrap: wrap;
    gap: 12px;
}

/* ============================================================
   16b. COMMENTS
============================================================ */
.comments-area {
    margin: 80px auto 40px;
    padding-top: 60px;
    border-top: 1px solid var(--gray-line);
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}
.comments-header__count {
    display: grid;
    place-items: center;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--dark));
    color: #fff;
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 10px 24px rgba(0,119,182,0.25);
    flex-shrink: 0;
}
.comments-header__title {
    font-family: var(--serif);
    font-size: 1.8rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 500;
    margin: 0 0 4px;
    color: var(--text);
}
.comments-header__sub { color: var(--gray); margin: 0; font-size: 0.95rem; }

.comment-list {
    list-style: none;
    margin: 0 0 50px;
    padding: 0;
}
.comment-list ol.children {
    list-style: none;
    margin: 20px 0 0;
    padding: 0 0 0 30px;
    border-left: 2px solid var(--gray-line);
}
.comment-item { margin-bottom: 24px; }
.comment-body {
    background: var(--white);
    border: 1px solid var(--gray-line);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    transition: all var(--t-fast);
}
.comment-body:hover { border-color: rgba(0,119,182,0.25); box-shadow: var(--shadow-sm); }
.comment-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.comment-avatar img {
    border-radius: 50%;
    width: 48px; height: 48px;
    object-fit: cover;
    border: 2px solid var(--paper);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.comment-author {
    display: block;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 2px;
}
.comment-time {
    font-size: 0.82rem;
    color: var(--gray);
    font-variant-numeric: tabular-nums;
}
.comment-content { color: var(--text); font-size: 1rem; line-height: 1.65; }
.comment-content p { margin-bottom: 0.8em; }
.comment-content p:last-child { margin-bottom: 0; }
.comment-pending {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(244,184,96,0.12);
    color: #8b5e1c;
    font-size: 0.82rem;
    font-style: italic;
}
.comment-actions {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--gray-line);
    font-size: 0.88rem;
}
.comment-actions a {
    color: var(--primary);
    font-weight: 600;
    margin-right: 8px;
}
.comment-actions a:hover { text-decoration: underline; }
.bypostauthor > .comment-body {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(0,119,182,0.04), transparent);
}
.bypostauthor > .comment-body::before {
    content: "Auteur";
    display: inline-block;
    padding: 3px 8px;
    margin-bottom: 10px;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Comment form */
.comments-closed {
    color: var(--gray);
    text-align: center;
    padding: 24px;
    background: var(--light);
    border-radius: var(--radius-md);
}

#respond {
    background: linear-gradient(180deg, var(--white), var(--paper));
    border: 1px solid var(--gray-line);
    border-radius: var(--radius-lg);
    padding: 32px 30px;
    margin-top: 30px;
}
.comment-reply-title {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.comment-reply-title small a {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.comment-reply-title small a:hover { color: var(--accent); }
.comment-notes {
    color: var(--gray);
    font-size: 0.88rem;
    margin-bottom: 24px;
}
.comment-form {
    display: grid;
    gap: 16px;
}
.comment-form-author,
.comment-form-email { margin: 0; }
.comment-form-author,
.comment-form-email { display: inline-block; width: calc(50% - 8px); }
.comment-form-author { margin-right: 12px; }
.comment-form-comment { margin: 0; }
.comment-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--gray-line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--text);
    font: inherit;
    font-size: 0.98rem;
    transition: all var(--t-fast);
    box-sizing: border-box;
}
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0,119,182,0.12);
}
.comment-form textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.5;
    font-family: var(--sans);
}
.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.comment-form-cookies-consent input { width: 18px; height: 18px; accent-color: var(--primary); }
.comment-form-cookies-consent label {
    margin: 0;
    font-weight: 400;
    font-size: 0.88rem;
    color: var(--gray);
    letter-spacing: 0;
}
.comment-submit,
.form-submit input[type="submit"] {
    background: var(--ink);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--t-base);
    margin-top: 6px;
}
.comment-submit:hover,
.form-submit input[type="submit"]:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.logged-in-as { color: var(--gray); font-size: 0.88rem; margin-bottom: 18px; }
.logged-in-as a { color: var(--primary); font-weight: 600; }

@media (max-width: 640px) {
    .comments-header__count { width: 52px; height: 52px; font-size: 1.3rem; }
    .comments-header__title { font-size: 1.4rem; }
    .comment-form-author,
    .comment-form-email { width: 100%; margin-right: 0; }
    .comment-body { padding: 18px; }
    .comment-list ol.children { padding-left: 14px; }
    #respond { padding: 22px 18px; }
}

/* ============================================================
   17. UTILS
============================================================ */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px; width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    word-wrap: normal !important;
}

.reveal { opacity: 0; transform: translateY(24px); transition: all 0.7s var(--t-slow); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* ============================================================
   18. RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
    .article-layout { grid-template-columns: 1fr; gap: 0; }
    .article-aside-left, .article-aside-right { display: none; }
    .featured-post { grid-template-columns: 1fr; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
    .primary-menu { display: none; }
    .menu-toggle { display: grid; place-items: center; }
    .btn-cta span { display: none; }
    .posts-grid { grid-template-columns: 1fr; }
    .blog-hero { padding: 50px 0 30px; }
    .single-hero { padding: 40px 0 30px; }
    .article-content { font-size: 1.05rem; }
    .article-content > p:first-of-type::first-letter { font-size: 4em; }
    .article-content blockquote { margin: 2em 0; padding: 18px 22px; font-size: 1.15rem; }
    .author-bio { grid-template-columns: 1fr; text-align: center; }
    .author-bio__avatar { margin: 0 auto; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

/* Print */
@media print {
    .site-header, .site-footer, .reading-progress, .article-aside-left, .article-aside-right, .inline-cta, .related-posts { display: none; }
    body { background: white; color: black; }
    .article-content { font-size: 12pt; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
