/* =========================================================
   BLOG : styles communs à la page Blog et aux articles
   Même charte que rendez-vous.html : navigation et pied sombres,
   lecture sur fond clair.
   ========================================================= */
:root {
    --primary: #2563EB;
    --accent: #FF3366;
    --dark: #0F172A;
    --light: #F8FAFC;
    --success: #10B981;
    --text-primary: #E2E8F0;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --ink: #0F172A;
    --ink-body: #334155;
    --ink-soft: #64748B;
    --line: #E2E8F0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
img, svg, iframe, video { max-width: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--light);
    color: var(--ink-body);
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* NAVBAR */
body > nav {
    position: fixed;
    top: var(--lm-bar-h, 0px); /* sous le bandeau du lead magnet (lead-magnet.css) */
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(203, 213, 225, 0.1);
    z-index: 1000;
    padding: 1rem 2rem;
}
.nav-container { max-width: 1440px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.nav-logo img { height: 65px; width: auto; display: block; }
.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a { color: #E2E8F0; text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: color 0.3s; }
.nav-links a:hover, .nav-links a[aria-current] { color: #60A5FA; }
.nav-links .nav-cta {
    background: linear-gradient(135deg, #2563EB, #FF3366);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}
.nav-links .nav-cta:hover { color: white; }
.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 0.4rem; background: none; border: 0; padding: 0.5rem; }
.hamburger span { width: 24px; height: 2px; background: #E2E8F0; transition: all 0.3s; }

/* EN-TÊTE SOMBRE (page Blog et articles) */
.page-hero {
    background:
        radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.18), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(255, 51, 102, 0.12), transparent 45%),
        var(--dark);
    color: var(--text-primary);
    padding: 9rem 0 3.5rem;
}
.page-hero .container { max-width: 52rem; }
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumb li { min-width: 0; overflow-wrap: anywhere; }
.breadcrumb li + li::before { content: '›'; margin-right: 0.4rem; color: #64748B; }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #FBBF24;
    margin-bottom: 1rem;
}
.page-hero h1 {
    font-size: clamp(1.8rem, 4.2vw, 2.9rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 1.25rem;
    overflow-wrap: break-word;
}
.gradient-text {
    background: linear-gradient(135deg, #60A5FA, #FF3366);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.page-lead { font-size: 1.15rem; color: var(--text-secondary); line-height: 1.65; }
.byline { display: flex; align-items: center; gap: 0.8rem; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid rgba(226, 232, 240, 0.12); }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.25); flex-shrink: 0; }
.byline p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.45; }
.byline strong { color: #fff; }

/* BOUTONS */
.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #2563EB, #FF3366);
    color: #fff;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(255, 51, 102, 0.4); }
.ghost-button {
    display: inline-block;
    background: #fff;
    color: var(--ink);
    border: 2px solid var(--line);
    padding: 0.85rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.3s, color 0.3s;
}
.ghost-button:hover { border-color: var(--primary); color: var(--primary); }

/* ARTICLE */
.article-wrap { max-width: 46rem; margin: 0 auto; padding: 3rem 2rem 1rem; }
.article-cover { margin: 0 0 2.5rem; }
.article-cover img { width: 100%; height: auto; border-radius: 1rem; display: block; background: var(--line); }

.toc { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1.4rem 1.6rem; margin-bottom: 2.5rem; }
.toc-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 0.75rem; }
.toc ol { padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.toc a { color: var(--ink); text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.toc a:hover { color: var(--primary); }

.prose { font-size: 1.075rem; line-height: 1.8; color: var(--ink-body); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.25rem; }
.prose h2 {
    font-size: clamp(1.45rem, 3vw, 1.85rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-top: 2.75rem;
    scroll-margin-top: 110px;
}
.prose h3 { font-size: clamp(1.15rem, 2.4vw, 1.3rem); font-weight: 800; line-height: 1.3; color: var(--ink); margin-top: 2rem; scroll-margin-top: 110px; }
.prose h4 { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin-top: 1.5rem; }
.prose a { color: var(--primary); font-weight: 600; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.5rem; }
.prose li::marker { color: var(--primary); font-weight: 700; }
.prose blockquote {
    border-left: 4px solid var(--primary);
    background: #EFF6FF;
    padding: 1.1rem 1.4rem;
    border-radius: 0 0.75rem 0.75rem 0;
    color: var(--ink);
    font-weight: 500;
}
.prose figure img, .prose > img, .prose p img { width: 100%; height: auto; border-radius: 0.75rem; display: block; }
.prose figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.5rem; text-align: center; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.prose code { background: #F1F5F9; padding: 0.1rem 0.35rem; border-radius: 0.3rem; font-size: 0.92em; }
.prose pre { background: var(--dark); color: var(--text-primary); padding: 1rem 1.2rem; border-radius: 0.75rem; overflow-x: auto; font-size: 0.9rem; }
.prose pre code { background: none; padding: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 0.75rem; background: #fff; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; line-height: 1.5; }
.prose th, .prose td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--light); color: var(--ink); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }

/* ENCART AUTO-DIAGNOSTIC (inséré au milieu de l'article) */
.lb-box {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
    background: #fff;
    border: 2px solid var(--line);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2.5rem 0;
}
.prose .lb-box { margin-top: 2.5rem; }
.lb-box > * { min-width: 0; }
.lb-box-badge {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563EB, #FF3366);
    color: #fff;
    display: grid;
    place-content: center;
    text-align: center;
    font-size: 2.1rem;
    font-weight: 900;
    line-height: 1;
    justify-self: center;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}
.lb-box-badge small { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; margin-top: 0.15rem; }
.lb-box-tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.lb-box-title { font-size: 1.1rem; font-weight: 800; color: var(--ink); line-height: 1.3; margin: 0.3rem 0 0.4rem; }
.lb-box p { font-size: 0.95rem; line-height: 1.55; margin: 0 0 1rem; }

/* BLOC FINAL RENDEZ-VOUS */
.rdv-box {
    background:
        radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.22), transparent 50%),
        radial-gradient(circle at 90% 90%, rgba(255, 51, 102, 0.16), transparent 50%),
        var(--dark);
    color: var(--text-primary);
    border-radius: 1.25rem;
    padding: 2.5rem;
    margin: 3.5rem 0 2.5rem;
}
.rdv-box h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800; color: #fff; line-height: 1.25; margin-bottom: 0.9rem; }
.rdv-box > p { color: var(--text-secondary); margin-bottom: 1.25rem; }
.rdv-list { list-style: none; display: grid; gap: 0.7rem; margin-bottom: 1.75rem; }
.rdv-list li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: 0.6rem; }
.rdv-list li::before {
    content: '✓';
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.18);
    color: #34D399;
    font-weight: 800;
    font-size: 0.8rem;
}
.rdv-list strong { color: #fff; }
.rdv-reassure { display: block; margin-top: 0.9rem; font-size: 0.85rem; color: var(--text-muted); }

/* AUTEUR */
.author { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 1.1rem; align-items: center; padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.author > * { min-width: 0; }
.author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.author p { font-size: 0.95rem; line-height: 1.55; }
.author strong { color: var(--ink); }
.author a { color: var(--primary); font-weight: 600; }

/* LISTES D'ARTICLES (page Blog et « À lire ensuite ») */
section.block { padding: 4rem 0; }
.section-title { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; color: var(--ink); line-height: 1.25; margin-bottom: 1.75rem; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
.post-card {
    background: #fff;
    border: 2px solid var(--line);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.post-card:hover { border-color: var(--primary); box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15); transform: translateY(-5px); }
.post-card-img { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1E3A8A, #0F172A 55%, #831843); overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.post-card-meta { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 0.5rem; }
.post-card h2, .post-card h3 { font-size: 1.15rem; font-weight: 800; color: var(--ink); line-height: 1.3; margin-bottom: 0.6rem; overflow-wrap: break-word; }
.post-card p { font-size: 0.95rem; line-height: 1.55; margin-bottom: 1rem; }
.post-card-more { margin-top: auto; color: var(--primary); font-weight: 700; font-size: 0.9rem; }
.post-grid-empty { background: #fff; border: 2px dashed var(--line); border-radius: 1rem; padding: 2.5rem 2rem; text-align: center; max-width: 46rem; }
.post-grid-empty p + p { margin-top: 0.75rem; }
.post-grid-empty strong { color: var(--ink); }
.related { background: #fff; border-top: 1px solid var(--line); }

/* DOUBLE APPEL (page Blog) */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; }
.duo > * { min-width: 0; }
.duo .lb-box, .duo .rdv-box { margin: 0; height: 100%; }

/* FOOTER */
footer { background: var(--dark); border-top: 1px solid rgba(226, 232, 240, 0.1); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 3rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-grid > * { min-width: 0; }
footer h4 { color: #fff; font-size: 0.9rem; margin-bottom: 1rem; }
footer a { display: block; color: #94A3B8; text-decoration: none; margin-bottom: 0.5rem; font-size: 0.9rem; transition: color 0.3s; }
footer a:hover { color: #fff; }
.footer-logo { height: 60px; width: auto; margin-bottom: 1rem; }
.footer-social { display: flex; gap: 1rem; }
.footer-social a { display: inline-block; }
.copyright { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 1.5rem; text-align: center; color: #64748B; font-size: 0.85rem; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .duo { grid-template-columns: minmax(0, 1fr); }
}

/* Menu à 6 entrées : espacement resserré sur écrans moyens */
@media (min-width: 769px) and (max-width: 1200px) {
    .nav-links { gap: 1.1rem; }
}
@media (min-width: 769px) and (max-width: 960px) {
    .nav-logo img { height: 50px; }
    .nav-links { gap: 0.8rem; }
    .nav-links a { font-size: 0.85rem; white-space: nowrap; }
    .nav-links .nav-cta { padding: 0.55rem 0.8rem; }
}

@media (max-width: 768px) {
    body > nav { padding: 1rem; }
    .nav-logo img { height: 47px; }
    .nav-links {
        display: none;
        position: absolute;
        top: 79px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0.5rem;
        background: rgba(15, 23, 42, 0.98);
        padding: 1.5rem;
        border-bottom: 1px solid rgba(203, 213, 225, 0.1);
    }
    .nav-links.active { display: flex; }
    .nav-links a { display: flex; align-items: center; min-height: 44px; }
    .hamburger { display: flex; }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

    .container { padding: 0 1.5rem; }
    .page-hero { padding: 7.5rem 0 2.75rem; }
    .page-lead { font-size: 1.05rem; }
    .article-wrap { padding: 2.25rem 1.5rem 0.5rem; }
    .prose { font-size: 1.025rem; line-height: 1.75; }
    section.block { padding: 3rem 0; }
    .post-grid { grid-template-columns: minmax(0, 1fr); }
    .rdv-box { padding: 2rem 1.5rem; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    .breadcrumb li[aria-current] { display: none; } /* le titre suit juste en dessous */
    .cta-button { display: block; text-align: center; }
    .ghost-button { display: block; text-align: center; }
    .lb-box { grid-template-columns: minmax(0, 1fr); text-align: center; }
}

@media (max-width: 380px) {
    .container { padding: 0 1rem; }
    .article-wrap { padding-left: 1rem; padding-right: 1rem; }
    .rdv-box { padding: 1.75rem 1.1rem; }
    .lb-box { padding: 1.25rem 1rem; }
    .footer-inner { padding: 2.5rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .cta-button, .post-card { transition: none; }
}
