/* ══════════════════════════════════════════════════════════
   BLOG — Styles article, auteur, archive
   ADL Constructions — thème REZO 21
   Palette : --mainColor #244D70 | --secondaryColor #DFEAF6
══════════════════════════════════════════════════════════ */

/* ── Article header ────────────────────────────────────── */
.article-header-wrap {
    background: var(--secondaryColor);
    padding: 56px 0 40px;
    text-align: center;
}
.article-cats { margin-bottom: 16px; }
.article-cat-tag {
    display: inline-block;
    background: var(--mainColor);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: opacity .2s;
    margin: 0 3px;
}
.article-cat-tag:hover { opacity: .8; text-decoration: none; color: #fff; }

.article-title {
    font-family: var(--titleFont);
    color: var(--mainColor);
    font-size: clamp(1.55rem, 3vw, 2.3rem);
    line-height: 1.22;
    max-width: 780px;
    margin: 0 auto 22px;
}

.article-meta-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #555;
    flex-wrap: wrap;
}
.meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--mainColor);
    font-weight: 600;
}
.meta-author:hover { text-decoration: underline; }
.meta-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.meta-sep { color: #bbb; }
.meta-reading {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #777;
}

/* ── Hero image ────────────────────────────────────────── */
.article-hero {
    width: 100%;
    max-height: 480px;
    overflow: hidden;
    line-height: 0;
}
.article-hero-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* ── Container article ─────────────────────────────────── */
.article-container {
    max-width: 820px !important;
    padding-top: 50px;
    padding-bottom: 64px;
}

/* ── Bloc "Écouter cet article" ────────────────────────── */
.article-resume-box {
    background: #f6f9fd;
    border-left: 4px solid var(--mainColor);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 36px;
}
.resume-box-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--mainColor);
    margin-bottom: 10px;
    font-size: 0.88rem;
}
.resume-box-content {
    font-size: 0.92rem;
    color: #444;
    line-height: 1.65;
}

/* ── Table des matières ────────────────────────────────── */
.article-toc {
    background: var(--secondaryColor);
    border-radius: 10px;
    padding: 22px 28px;
    margin-bottom: 40px;
}
.toc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--mainColor);
    margin-bottom: 14px;
    font-size: 0.88rem;
}
.toc-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.toc-list li { margin-bottom: 7px; }
.toc-list a {
    display: flex;
    gap: 8px;
    color: #333;
    font-size: 0.87rem;
    text-decoration: none;
    line-height: 1.4;
    transition: color .2s;
}
.toc-list a:hover,
.toc-list a.active { color: var(--mainColor); text-decoration: none; }
.toc-num { color: var(--mainColor); font-weight: 700; min-width: 22px; flex-shrink: 0; }
/* .heading-anchor est la classe ajoutée aux H2/H3 par le JS TOC — ne pas cacher */
a.heading-anchor { display: none; }

/* ── Corps de l'article ────────────────────────────────── */
.article-body {
    font-size: 1.0rem;
    line-height: 1.78;
    color: #2a2a2a;
}
.article-body h2 {
    font-family: var(--titleFont);
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    color: var(--mainColor);
    margin-top: 44px;
    margin-bottom: 14px;
    scroll-margin-top: 80px;
}
.article-body h3 {
    font-size: 1.05rem;
    color: #1f3a52;
    margin-top: 30px;
    margin-bottom: 10px;
    font-weight: 700;
}
.article-body p { margin-bottom: 18px; }
.article-body ul,
.article-body ol { padding-left: 24px; margin-bottom: 20px; }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: #1a1a1a; }
.article-body a { color: var(--mainColor); text-decoration: underline; }
.article-body a:hover { opacity: .8; }
.article-body blockquote {
    margin: 28px 0;
    padding: 18px 24px;
    background: var(--secondaryColor);
    border-left: 4px solid var(--mainColor);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #444;
}
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 28px;
    font-size: 0.9rem;
}
.article-body th {
    background: var(--mainColor);
    color: #fff;
    padding: 11px 16px;
    text-align: left;
    font-size: 0.85rem;
}
.article-body td {
    padding: 11px 16px;
    border-bottom: 1px solid #e8ecf2;
}
.article-body tr:nth-child(even) td { background: #f5f8fb; }

/* ── Navigation préc / suiv ────────────────────────────── */
.article-nav-posts {
    display: flex;
    gap: 14px;
    margin: 52px 0 44px;
    border-top: 1px solid #e4eaf0;
    padding-top: 36px;
}
.article-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px 20px;
    background: #f5f8fb;
    border-radius: 8px;
    text-decoration: none;
    transition: background .2s;
    border: 1px solid #e4eaf0;
}
.article-nav-link:hover { background: var(--secondaryColor); text-decoration: none; }
.article-nav-next { text-align: right; }
.nav-direction { font-size: 0.78rem; color: #888; }
.nav-title { font-weight: 600; color: var(--mainColor); font-size: 0.88rem; line-height: 1.4; }

/* ── Author box ────────────────────────────────────────── */
.article-author-box {
    display: flex;
    gap: 26px;
    align-items: flex-start;
    background: var(--secondaryColor);
    border-radius: 12px;
    padding: 28px 32px;
    margin-top: 52px;
}
.author-box-avatar { flex-shrink: 0; }
.author-box-img {
    width: 84px !important;
    height: 84px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.author-box-info { flex: 1; }
.author-box-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #888;
    margin-bottom: 4px;
}
.author-box-name {
    font-family: var(--titleFont);
    font-size: 1.1rem;
    color: var(--mainColor);
    margin: 0 0 10px;
}
.author-box-name a { color: var(--mainColor); text-decoration: none; }
.author-box-name a:hover { text-decoration: underline; }
.author-box-bio {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.65;
    margin: 0 0 16px;
}
.author-box-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Boutons sociaux ───────────────────────────────────── */
.btn-social {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
}
.btn-social:hover { opacity: .88; text-decoration: none; transform: translateY(-1px); }
.btn-linkedin { background: #0a66c2; color: #fff !important; }
.btn-social-sm { padding: 6px 13px; font-size: 0.79rem; }

/* ── Articles liés ─────────────────────────────────────── */
.related-articles-section {
    background: #f5f8fb;
    padding: 60px 0;
    margin-top: 16px;
}
.related-articles-title {
    text-align: center;
    font-family: var(--titleFont);
    color: var(--mainColor);
    font-size: 1.6rem;
    margin-bottom: 36px;
}
.article-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(0,0,0,.06);
    transition: transform .22s, box-shadow .22s;
    display: flex;
    flex-direction: column;
    border: 1px solid #eaeef3;
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,.10);
}
.article-card-img-wrap {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--secondaryColor);
}
.article-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .38s;
}
.article-card-img-wrap:hover .article-card-img { transform: scale(1.05); }
.article-card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.article-card-title {
    font-size: 0.97rem;
    margin: 8px 0 10px;
    line-height: 1.42;
    flex: 1;
}
.article-card-title a { color: var(--mainColor); text-decoration: none; }
.article-card-title a:hover { text-decoration: underline; }
.article-card-date { font-size: 0.78rem; color: #888; margin: 0; }

/* ── Archive / Listing articles ────────────────────────── */
.blog-archive-header {
    background: var(--secondaryColor);
    padding: 50px 0 36px;
    text-align: center;
}
.blog-archive-title {
    font-family: var(--titleFont);
    color: var(--mainColor);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0 0 10px;
}
.blog-archive-desc {
    font-size: 1rem;
    color: #555;
    max-width: 560px;
    margin: 0 auto;
}
.blog-archive-grid {
    padding: 60px 0;
}
.blog-archive-cat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--mainColor);
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

/* ── Page auteur ───────────────────────────────────────── */
.author-page-hero {
    background: var(--secondaryColor);
    padding: 60px 0 52px;
}
.author-page-inner {
    display: flex;
    align-items: center;
    gap: 36px;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
}
.author-page-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 4px 18px rgba(0,0,0,.13);
    flex-shrink: 0;
    object-fit: cover;
}
.author-page-info { flex: 1; }
.author-page-name {
    font-family: var(--titleFont);
    color: var(--mainColor);
    font-size: 2rem;
    margin: 0 0 4px;
}
.author-page-jobtitle {
    font-size: 0.85rem;
    color: #666;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 14px;
}
.author-page-bio {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.68;
    margin: 0 0 18px;
    max-width: 600px;
}
.author-articles-section { padding: 60px 0; }
.author-articles-title {
    font-family: var(--titleFont);
    color: var(--mainColor);
    font-size: 1.5rem;
    margin-bottom: 36px;
}
.author-no-articles {
    text-align: center;
    color: #777;
    padding: 60px 0;
}

/* ── Header — dans le flux sur pages blog (pas fixed, pas sticky) ──
   Le header reprend son positionnement statique comme sur les pages
   non-blog. Main n'a plus besoin de padding-top compensatoire.
──────────────────────────────────────────────────────────────────── */
body.single header[role="banner"],
body.archive header[role="banner"],
body.author header[role="banner"],
body.category header[role="banner"],
body.tag header[role="banner"] {
    position: static !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.12) !important;
}

/* Le thème a header { position: fixed } sur TOUS les <header>.
   article-header-wrap est un <header> sans role=banner → override nécessaire. */
body.single header.article-header-wrap {
    position: relative !important;
    top: auto !important;
}

/* Reset du padding-top que le JS du thème injecte sur main (prévu pour header fixed) */
body.single main,
body.archive main,
body.author main,
body.category main,
body.tag main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Liens de navigation — couleur visible sur fond blanc */
body.single header[role="banner"] .navigation .menu li a,
body.archive header[role="banner"] .navigation .menu li a,
body.author header[role="banner"] .navigation .menu li a,
body.category header[role="banner"] .navigation .menu li a,
body.tag header[role="banner"] .navigation .menu li a {
    color: var(--mainColor) !important;
}
/* Exception : bouton "Contactez-nous" — reste blanc sur fond coloré */
body.single header[role="banner"] .navigation .menu li.bouton a,
body.archive header[role="banner"] .navigation .menu li.bouton a,
body.author header[role="banner"] .navigation .menu li.bouton a,
body.category header[role="banner"] .navigation .menu li.bouton a,
body.tag header[role="banner"] .navigation .menu li.bouton a {
    color: #fff !important;
}


/* ── Date de mise à jour ────────────────────────────────── */
.meta-updated {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 0.82rem;
    font-style: italic;
}
.meta-updated time { font-style: normal; font-weight: 500; }

/* ── Bouton secondaire auteur ───────────────────────────── */
.btn-social-secondary {
    background: #f0f4f8;
    color: var(--mainColor) !important;
}
.btn-social-secondary:hover {
    background: var(--secondaryColor);
    opacity: 1;
}

/* ── Tableau pp-table (responsive card mobile) ──────────── */
.pp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 28px;
    table-layout: fixed;
}
.pp-table thead th {
    background: var(--mainColor);
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid var(--mainColor);
}
.pp-table tbody td {
    padding: 12px 16px;
    border: 1px solid #dde3eb;
    vertical-align: top;
    word-wrap: break-word;
}
.pp-table tbody tr:nth-child(even) td { background: #f5f8fb; }
.pp-table tbody tr:hover td { background: var(--secondaryColor); }

/* ── Blocs éditoriaux ───────────────────────────────────── */

/* [bon_a_savoir] */
.callout-bon-a-savoir {
    background: #f0f8ff;
    border-left: 4px solid #2a8fd4;
    border-radius: 0 10px 10px 0;
    padding: 20px 24px;
    margin: 32px 0;
    position: relative;
}
.callout-bon-a-savoir::before {
    content: "💡 Bon à savoir";
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #2a8fd4;
    margin-bottom: 10px;
}
.callout-bon-a-savoir p { margin: 0; font-size: 0.93rem; color: #2a3a4a; }
.callout-bon-a-savoir p + p { margin-top: 10px; }

/* [expert] */
.callout-expert {
    background: var(--secondaryColor);
    border-left: 4px solid var(--mainColor);
    border-radius: 0 10px 10px 0;
    padding: 20px 24px;
    margin: 32px 0;
}
.callout-expert::before {
    content: "🔨 Parole d'expert";
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--mainColor);
    margin-bottom: 10px;
}
.callout-expert p { margin: 0; font-size: 0.93rem; color: #2a3a4a; font-style: italic; }
.callout-expert p + p { margin-top: 10px; font-style: normal; }

/* ── FAQ accordéon (details/summary) ────────────────────── */
.faq-list { margin: 0 0 32px; }
.faq-item {
    border: 1px solid #dde3eb;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}
.faq-item[open] { border-color: var(--mainColor); }
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.97rem;
    color: var(--mainColor);
    background: #f7f9fc;
    list-style: none;
    user-select: none;
    gap: 12px;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-item[open] .faq-question { background: var(--secondaryColor); }
.faq-question::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--mainColor);
    flex-shrink: 0;
    line-height: 1;
}
.faq-item[open] .faq-question::after { content: '−'; }
.faq-answer {
    padding: 16px 20px;
    font-size: 0.93rem;
    color: #333;
    border-top: 1px solid #eaeef4;
    background: #fff;
}
.faq-answer p { margin: 0; line-height: 1.65; }
.faq-answer p + p { margin-top: 10px; }

/* ── CTA maillage (bas d'article) 
/* ── CTA maillage (bas d'article) ───────────────────────── */
.article-cta-box {
    background: var(--mainColor);
    color: #fff;
    border-radius: 12px;
    padding: 28px 32px;
    margin: 44px 0 20px;
    text-align: center;
}
.article-cta-box p {
    margin: 0 0 20px;
    font-size: 1rem;
    line-height: 1.65;
    color: #e8f0f8;
}
.article-cta-box strong { color: #fff; }
.article-cta-box .cta-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.article-cta-box .cta-links a {
    display: inline-block;
    background: rgba(255,255,255,.15);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 0.87rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background .2s;
}
.article-cta-box .cta-links a:hover {
    background: rgba(255,255,255,.28);
    text-decoration: none !important;
}

/* ── Grid articles liés (Bootstrap absent sur blog) ─────── */
.related-articles-section .row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-right: -12px;
    margin-left: -12px;
}
.related-articles-section .col-md-4 {
    width: 33.333%;
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding-right: 12px;
    padding-left: 12px;
    box-sizing: border-box;
    margin-bottom: 24px;
}
@media (max-width: 768px) {
    .related-articles-section .col-md-4 {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
    .article-cta-box { padding: 22px 18px; }
    .article-cta-box .cta-links a { font-size: 0.82rem; padding: 7px 14px; }
}
