/* ============================================================
   Blog article — styles dédiés (Garder-mes-enfants)
   Chargé uniquement sur /blog/{slug} via contentLayout.html.twig
   Palette : --secondary #f47d3c (orange), --tertiary #47b5c6 (cyan),
             --warning #e14d4d (rouge)
   ============================================================ */

/* ----- Lot 1 : Callouts éditoriaux ------------------------- */

.blog-article-content .callout {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 2rem 0;
    padding: 18px 22px 18px 18px;
    border-left: 4px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    line-height: 1.6;
    font-size: 16px;
    color: #1f2937;
}

.blog-article-content .callout::before {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    margin-top: 2px;
}

.blog-article-content .callout > * {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.blog-article-content .callout > * + * {
    margin-top: 8px;
}

.blog-article-content .callout-title {
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.blog-article-content .callout p {
    margin: 0 0 8px 0;
}

.blog-article-content .callout p:last-child {
    margin-bottom: 0;
}

.blog-article-content .callout a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* TIP — Notre conseil (orange) */
.blog-article-content .callout-tip {
    background: #fff5ec;
    border-left-color: #f47d3c;
    color: #5c3a1e;
}

.blog-article-content .callout-tip::before {
    content: "💡";
}

.blog-article-content .callout-tip .callout-title {
    color: #c45a1c;
}

/* WARNING — Attention (rouge) */
.blog-article-content .callout-warning {
    background: #fdecec;
    border-left-color: #e14d4d;
    color: #5a1f1f;
}

.blog-article-content .callout-warning::before {
    content: "⚠️";
}

.blog-article-content .callout-warning .callout-title {
    color: #b73838;
}

/* KEY — À retenir (cyan) */
.blog-article-content .callout-key {
    background: #eaf6f8;
    border-left-color: #47b5c6;
    color: #1d4a52;
}

.blog-article-content .callout-key::before {
    content: "📌";
}

.blog-article-content .callout-key .callout-title {
    color: #2d8392;
}

/* Mobile */
@media (max-width: 480px) {
    .blog-article-content .callout {
        padding: 14px 16px 14px 14px;
        gap: 10px;
        font-size: 15px;
    }

    .blog-article-content .callout::before {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .blog-article-content .callout-title {
        font-size: 14px;
    }
}

/* ----- Lot 2 : Typographie et rythme général --------------- */

/* Corps de texte */
.blog-article-content {
    font-size: 17px;
    line-height: 1.7;
    color: #2d3137;
    max-width: 720px;
}

.blog-article-content p {
    margin: 0 0 1.1em 0;
}

.blog-article-content strong,
.blog-article-content b {
    color: #181c2f;
    font-weight: 700;
}

/* Neutralise les <p>&nbsp;</p> du WYSIWYG : ne laissent qu'une demi-respiration */
.blog-article-content p:empty,
.blog-article-content p > br:only-child,
.blog-article-content p:has(> br:only-child) {
    margin: 0;
    height: 0.4em;
    line-height: 0;
}

/* ----- H2 chapitres ---------------------------------------- */
.blog-article-content h2 {
    position: relative;
    margin: 4rem 0 1.4rem;
    padding: 0 0 0 18px;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 800;
    color: #181c2f;
    letter-spacing: -0.01em;
    scroll-margin-top: 24px;
}

.blog-article-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 5px;
    border-radius: 3px;
    background: #f47d3c;
}

.blog-article-content h2:first-child {
    margin-top: 1rem;
}

/* ----- H3 sous-sections ------------------------------------ */
.blog-article-content h3 {
    margin: 2.6rem 0 0.9rem;
    font-size: 21px;
    line-height: 1.3;
    font-weight: 700;
    color: #181c2f;
    scroll-margin-top: 24px;
}

.blog-article-content h3::after {
    content: "";
    display: block;
    width: 36px;
    height: 3px;
    margin-top: 8px;
    background: #f47d3c;
    border-radius: 2px;
    opacity: 0.55;
}

/* ----- Liens éditoriaux ------------------------------------ */
.blog-article-content p a,
.blog-article-content li a {
    color: #c45a1c;
    text-decoration: underline;
    text-decoration-color: rgba(244, 125, 60, 0.4);
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    transition: color 0.15s, text-decoration-color 0.15s;
}

.blog-article-content p a:hover,
.blog-article-content li a:hover {
    color: #f47d3c;
    text-decoration-color: #f47d3c;
}

/* ----- Listes à puces avec checkmark orange ---------------- */
.blog-article-content ul:not(.dashed-list) {
    list-style: none;
    padding-left: 0;
    margin: 1.2em 0 1.4em;
}

.blog-article-content ul:not(.dashed-list) > li {
    position: relative;
    padding: 0 0 0 30px;
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.blog-article-content ul:not(.dashed-list) > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f47d3c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Listes imbriquées ou dans les callouts : on ne touche pas */
.blog-article-content .callout ul {
    list-style: disc;
    padding-left: 20px;
}

.blog-article-content .callout ul > li::before {
    content: none;
}

.blog-article-content .callout ul > li {
    padding-left: 0;
}

/* ----- Sommaire (chapters-wrapper en haut d'article) ------- */
.blog-article-content .chapters-wrapper:has(.title) {
    margin: 0 0 3rem 0 !important;
    padding: 22px 26px 18px !important;
    background: linear-gradient(135deg, #fff5ec 0%, #fffaf5 100%) !important;
    border: 1px solid #f4d5b8 !important;
    border-left: 4px solid #f47d3c !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.blog-article-content .chapters-wrapper:has(.title) .title {
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    font-weight: 700 !important;
    color: #c45a1c !important;
}

.blog-article-content .chapters-wrapper:has(.title) p:not(.title) {
    margin: 0 0 6px 0 !important;
    line-height: 1.5 !important;
}

.blog-article-content .chapters-wrapper:has(.title) p:not(.title) a {
    display: inline-block !important;
    color: #181c2f !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    padding: 4px 0 !important;
    transition: color 0.15s, transform 0.15s;
}

.blog-article-content .chapters-wrapper:has(.title) p:not(.title) a::before {
    content: "›" !important;
    color: #f47d3c !important;
    font-weight: 700 !important;
    margin-right: 8px !important;
    display: inline-block !important;
    transition: transform 0.15s;
}

.blog-article-content .chapters-wrapper:has(.title) p:not(.title) a:hover {
    color: #f47d3c !important;
}

.blog-article-content .chapters-wrapper:has(.title) p:not(.title) a:hover::before {
    transform: translateX(3px);
}

/* ----- Cards de ressources Pajemploi (PDF) ----------------- */
/* Wrapper dédié .resource-cards à utiliser autour des liens */
.blog-article-content .resource-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin: 1.6em 0 2em;
    padding: 0;
    background: transparent;
    border: 0;
}

.blog-article-content .resource-cards .resource-group {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.blog-article-content .resource-cards .resource-group:hover {
    border-color: #f4d5b8;
    box-shadow: 0 4px 12px rgba(244, 125, 60, 0.1);
}

.blog-article-content .resource-cards .resource-group-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #c45a1c;
}

.blog-article-content .resource-cards .resource-group a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #181c2f;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px solid #f3f4f6;
}

.blog-article-content .resource-cards .resource-group a:last-child {
    border-bottom: 0;
}

.blog-article-content .resource-cards .resource-group a::before {
    content: "";
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f47d3c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cpath d='M9 13h6M9 17h4' /%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.blog-article-content .resource-cards .resource-group a:hover {
    color: #f47d3c;
}

/* ----- Tableau (indemnités kilométriques) ------------------ */
.blog-article-content table {
    width: 100%;
    margin: 1.6em 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.blog-article-content table thead th {
    background: #fff5ec;
    color: #c45a1c;
    font-weight: 700;
    text-align: left;
    padding: 12px 16px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid #f4d5b8;
}

.blog-article-content table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 15px;
}

.blog-article-content table tbody tr:nth-child(even) td {
    background: #fafafa;
}

.blog-article-content table tbody tr:last-child td {
    border-bottom: 0;
}

.blog-article-content table caption {
    caption-side: bottom;
    padding: 10px 0 0;
    font-size: 13px;
    font-style: italic;
    color: #6b7280;
    text-align: left;
}

/* ----- Blockquote (citation éditoriale) -------------------- */
.blog-article-content blockquote {
    position: relative;
    margin: 2.4em auto;
    padding: 1.2em 1.4em 1.2em 3.2em;
    max-width: 640px;
    font-size: 21px;
    line-height: 1.5;
    font-style: italic;
    color: #181c2f;
    font-weight: 500;
    border: 0;
    border-left: 4px solid #f47d3c;
    background: transparent;
}

.blog-article-content blockquote::before {
    content: "\201C";
    position: absolute;
    left: 12px;
    top: -8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 64px;
    line-height: 1;
    color: #f47d3c;
    opacity: 0.4;
    font-style: normal;
}

.blog-article-content blockquote p {
    margin: 0;
}

.blog-article-content blockquote cite {
    display: block;
    margin-top: 0.6em;
    font-size: 14px;
    font-style: normal;
    color: #6b7280;
    font-weight: 600;
}

/* ----- Images dans l'article ------------------------------- */
.blog-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    display: block;
    margin: 1.4em auto;
}

/* ----- Mobile ---------------------------------------------- */
@media (max-width: 768px) {
    .blog-article-content {
        font-size: 16px;
    }

    .blog-article-content h2 {
        font-size: 24px;
        margin-top: 3rem;
    }

    .blog-article-content h3 {
        font-size: 19px;
        margin-top: 2rem;
    }

    .blog-article-content .chapters-wrapper:has(.title) {
        padding: 18px 20px 14px !important;
    }

    .blog-article-content blockquote {
        font-size: 18px;
        padding-left: 2.4em;
    }

    .blog-article-content blockquote::before {
        font-size: 48px;
        left: 8px;
    }
}

/* ============================================================
   Lot 3 : Progress bar, TOC flottante, CTA final, sidebar
   ============================================================ */

/* ----- Reading progress bar -------------------------------- */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
    z-index: 9999;
    pointer-events: none;
}

.reading-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #f47d3c 0%, #fcc130 100%);
    transition: width 0.05s linear;
    box-shadow: 0 0 8px rgba(244, 125, 60, 0.4);
}

/* Quand la TOC flottante est active (créée par JS sur ≥ 1280px),
   on décale le hero et le contenu article vers la droite pour éviter
   que la TOC vienne par-dessus. Largeur TOC ~220px + 20px gap = 240px. */
@media (min-width: 1280px) {
    body.has-floating-toc > .blog-hero > .container {
        padding-left: 240px !important;
    }

    body.has-floating-toc .main-content-section > .container {
        padding-left: 240px;
    }
}

/* ----- Floating TOC (sticky à gauche, desktop large) ------- */
.floating-toc {
    display: none;
}

@media (min-width: 1280px) {
    .floating-toc {
        display: block;
        position: fixed;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        max-width: 200px;
        max-height: 70vh;
        overflow-y: auto;
        padding: 16px 12px 16px 18px;
        font-size: 13px;
        z-index: 100;
        border-left: 2px solid #e5e7eb;
        background: transparent;
    }

    .floating-toc-title {
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        font-weight: 700;
        color: #6b7280;
        margin: 0 0 12px 0;
    }

    .floating-toc ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .floating-toc li {
        margin: 0;
        padding: 0;
    }

    .floating-toc a {
        display: block !important;
        padding: 6px 0 6px 12px !important;
        color: #6b7280 !important;
        text-decoration: none !important;
        font-weight: 500 !important;
        line-height: 1.4 !important;
        border-left: 2px solid transparent !important;
        margin-left: -14px !important;
        transition: color 0.15s, border-color 0.15s, transform 0.15s;
    }

    .floating-toc a:hover {
        color: #f47d3c !important;
    }

    .floating-toc a.is-active {
        color: #f47d3c !important;
        font-weight: 700 !important;
        border-left-color: #f47d3c !important;
        transform: translateX(2px);
    }
}

/* ----- CTA final ------------------------------------------- */
.blog-article-cta {
    margin: 3.5rem 0 2rem;
    padding: 32px 36px;
    background: linear-gradient(135deg, #f47d3c 0%, #e9651f 100%);
    border-radius: 14px;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(244, 125, 60, 0.25);
    position: relative;
    overflow: hidden;
}

.blog-article-cta::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.blog-article-cta-title {
    margin: 0 0 8px 0;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.blog-article-cta-text {
    margin: 0 0 20px 0;
    font-size: 16px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
}

.blog-article-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    background: #ffffff;
    color: #c45a1c;
    font-weight: 700;
    font-size: 15px;
    border-radius: 30px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, color 0.15s;
}

.blog-article-cta-button:hover {
    color: #181c2f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.blog-article-cta-button::after {
    content: "→";
    font-size: 18px;
    line-height: 1;
}

@media (max-width: 600px) {
    .blog-article-cta {
        padding: 24px 22px;
    }

    .blog-article-cta-title {
        font-size: 20px;
    }
}

/* ----- Share row bas d'article ----------------------------- */
.blog-article-share {
    margin: 2.5rem 0;
    padding: 22px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.blog-article-share-label {
    font-size: 15px;
    font-weight: 700;
    color: #181c2f;
    margin-right: 6px;
}

.blog-article-share a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.15s, opacity 0.15s;
}

.blog-article-share a:hover {
    transform: translateY(-1px);
    opacity: 0.92;
    text-decoration: none;
    color: #ffffff;
}

.blog-article-share a.share-twitter { background: #41B7D8; }
.blog-article-share a.share-twitter:hover { background: #279EBF; }
.blog-article-share a.share-facebook { background: #3B5997; }
.blog-article-share a.share-facebook:hover { background: #2D4372; }
.blog-article-share a.share-link { background: #181c2f; }

/* ----- Sidebar repensée (côté right-content) --------------- */
.right-content .sidebar-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 22px 20px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.right-content .sidebar-card h3 {
    margin: 0 0 14px 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b7280;
    text-align: left;
}

.right-content .sidebar-card.sidebar-author {
    text-align: center;
}

.right-content .sidebar-card.sidebar-author h3 {
    text-align: center;
}

.right-content .sidebar-card.sidebar-author img {
    width: 84px;
    height: 84px;
    margin: 0 auto 12px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.right-content .sidebar-card.sidebar-author h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #181c2f;
}

.right-content .sidebar-card.sidebar-author p {
    font-size: 14px;
    line-height: 1.55;
    color: #4b5563;
    margin: 0;
}

.right-content .sidebar-card.sidebar-author .big-quote {
    color: #f47d3c;
    opacity: 0.4;
    font-size: 24px;
    margin-right: 4px;
}

/* Articles liés en cards */
.right-content .sidebar-card.sidebar-related .related-link {
    display: block;
    padding: 12px 14px;
    margin: 0 0 8px 0;
    background: #f8fafc;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #181c2f;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.right-content .sidebar-card.sidebar-related .related-link:hover {
    background: #fff5ec;
    border-color: #f4d5b8;
    color: #c45a1c;
    text-decoration: none;
    transform: translateX(2px);
}

.right-content .sidebar-card.sidebar-related .related-link::before {
    content: "›";
    color: #f47d3c;
    font-weight: 700;
    margin-right: 8px;
}

.right-content .sidebar-card.sidebar-related .related-link:last-child {
    margin-bottom: 0;
}

/* Bloc "Besoin d'une garde" - plus contrasté */
.right-content .sidebar-card.sidebar-cta {
    background: linear-gradient(135deg, #181c2f 0%, #282d48 100%);
    border: 0;
    color: #ffffff;
}

.right-content .sidebar-card.sidebar-cta h3 {
    color: #fcc130;
    text-align: center;
    margin-bottom: 16px;
}

.right-content .sidebar-card.sidebar-cta ul {
    list-style: none;
    padding: 0;
    margin: 0 0 18px 0;
}

.right-content .sidebar-card.sidebar-cta ul li {
    position: relative;
    padding: 6px 0 6px 26px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    line-height: 1.5;
}

.right-content .sidebar-card.sidebar-cta ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fcc130' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.right-content .sidebar-card.sidebar-cta ul li strong {
    color: #ffffff;
}

.right-content .sidebar-card.sidebar-cta .sidebar-cta-btn {
    display: block;
    width: 100%;
    padding: 12px 18px;
    background: #f47d3c;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}

.right-content .sidebar-card.sidebar-cta .sidebar-cta-btn:hover {
    background: #e9651f;
    transform: translateY(-1px);
    color: #ffffff;
    text-decoration: none;
}

/* ============================================================
   Page blog : override container largeur pour aligner sur landingV6
   ============================================================
   DOM réel : body > header > div.container. Le </header> orphelin
   du layout parent est ignoré par le navigateur. On cible le DOM
   tel qu'il est, pas tel que Twig le déclare. */

body > header > .container,
body > .blog-hero > .container,
.blog-hero > .container {
    width: 100% !important;
    max-width: 1440px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 12px 16px !important;
    box-sizing: border-box !important;
}

/* Force le layout flex du _visitor_header (au cas où le bundle l'écrase) */
body > header > .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Bootstrap legacy ajoute .container::before/::after { content: " "; display: table }
   pour le clearfix. Dans un flex container, ces pseudo-éléments deviennent
   des enfants flex et décalent justify-content (le logo se retrouve au centre).
   On les neutralise. */
body > header > .container::before,
body > header > .container::after,
body > .blog-hero > .container::before,
body > .blog-hero > .container::after {
    content: none !important;
    display: none !important;
}

/* Hamburger : caché en desktop (force au cas où) */
@media (min-width: 768px) {
    body > header .hamburger-btn {
        display: none !important;
    }
}

/* Le hero n'a pas besoin du padding vertical du container header :
   il a son propre padding via .blog-hero { padding: 3rem 0 3.5rem } */
body > .blog-hero > .container,
.blog-hero > .container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Boutons du _visitor_header : matcher indexV2/landingV6 (130 × 40) */
body > header .public-buttons {
    gap: 14px !important;
}

body > header .public-buttons .btn {
    padding: 11px 22px !important;
    border-radius: 999px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    transition: background 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
    border: 1px solid transparent !important;
}

body > header .public-buttons .btn.btn-secondary {
    background: transparent !important;
    color: #475569 !important;
    border-color: #e5e7eb !important;
}

body > header .public-buttons .btn.btn-secondary:hover {
    background: #f8fafc !important;
    color: #181c2f !important;
    border-color: #cbd5e1 !important;
    text-decoration: none !important;
}

body > header .public-buttons .btn:not(.btn-secondary) {
    background: #f47d3c !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(244, 125, 60, 0.25);
}

body > header .public-buttons .btn:not(.btn-secondary):hover {
    background: #e9651f !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 125, 60, 0.35);
    text-decoration: none !important;
}

/* Logo : un peu plus grand pour matcher landingV6 */
body > header .header-logo-v4 .header-logo-text-v4 {
    font-size: 20px !important;
    font-weight: 800 !important;
}

/* ============================================================
   Override toutes les valeurs rem du _connected_header
   sur la page blog (html font-size: 10px du bundle => 1rem=10px
   au lieu de 16px). On force tout en px pour matcher indexV2.
   ============================================================ */

body > header.site-header-v4 {
    height: 75px !important;
}

body > header.site-header-v4 .header-container-v4 {
    padding: 14px clamp(16px, 3vw, 32px) !important;
}

body > header.site-header-v4 .header-logo-v4 {
    gap: 8px !important;
}

body > header.site-header-v4 .header-logo-v4 img {
    height: 36px !important;
}

body > header.site-header-v4 .header-logo-text-v4 {
    font-size: 18px !important;
    font-weight: 700 !important;
}

body > header.site-header-v4 .header-nav-v4 {
    gap: 4px !important;
}

body > header.site-header-v4 .nav-link-v4 {
    padding: 8px 16px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
}

body > header.site-header-v4 .header-right-v4 {
    gap: 8px !important;
}

body > header.site-header-v4 .header-icon-btn-v4 {
    width: 40px !important;
    height: 40px !important;
}

body > header.site-header-v4 .header-icon-btn-v4 svg {
    width: 20px !important;
    height: 20px !important;
}

body > header.site-header-v4 .header-icon-btn-v4 .notif-badge-v4 {
    min-width: 16px !important;
    height: 16px !important;
    padding: 0 4px !important;
    font-size: 10px !important;
}

body > header.site-header-v4 .header-profile-v4 {
    gap: 12px !important;
    padding: 6px 12px 6px 6px !important;
}

body > header.site-header-v4 .header-profile-avatar-v4 {
    width: 32px !important;
    height: 32px !important;
}

body > header.site-header-v4 .header-profile-name-v4 {
    font-size: 14px !important;
}

body > header.site-header-v4 .header-profile-chevron-v4 {
    width: 16px !important;
    height: 16px !important;
}

body > header.site-header-v4 .dropdown-menu-v4 {
    top: calc(100% + 8px) !important;
    border-radius: 12px !important;
    padding: 8px !important;
}

body > header.site-header-v4 .dropdown-item-v4 {
    gap: 12px !important;
    padding: 12px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
}

body > header.site-header-v4 .dropdown-item-v4 svg {
    width: 18px !important;
    height: 18px !important;
}

body > header.site-header-v4 .dropdown-divider-v4 {
    margin: 8px 0 !important;
}

/* Padding-top du body : le _connected_header est fixed à 75px de
   hauteur. Le bundle ne sait pas qu'il y a ce header (--v4-header-height
   est défini dans le scope du _connected_header inline). On force le
   padding pour éviter que le contenu passe sous le header fixed. */
body:has(> header.site-header-v4) {
    padding-top: 75px !important;
}

/* ============================================================
   Blog hero (peach background, breadcrumb, titre, méta auteur)
   Cohérent avec landingV6 (fond peach orange clair)
   ============================================================ */

.blog-hero {
    position: relative;
    background: linear-gradient(135deg, #fff5ec 0%, #fffaf5 60%, #ffffff 100%);
    border-bottom: 1px solid #f4d5b8;
    padding: 3rem 0 3.5rem;
    overflow: hidden;
}

.blog-hero::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(244, 125, 60, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.blog-hero::after {
    content: "";
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(252, 193, 48, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.blog-hero .container {
    position: relative;
    z-index: 1;
}

/* Tag catégorie au-dessus du titre */
.blog-hero-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    margin-bottom: 1rem;
    background: #ffffff;
    color: #c45a1c;
    border: 1px solid #f4d5b8;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 1px 3px rgba(244, 125, 60, 0.1);
}

.blog-hero-category::before {
    content: "";
    width: 6px;
    height: 6px;
    background: #f47d3c;
    border-radius: 50%;
}

.blog-hero-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 1rem;
}

.blog-hero-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s;
}

.blog-hero-breadcrumb a:hover {
    color: #f47d3c;
    text-decoration: underline;
}

.blog-hero-breadcrumb-sep {
    color: #f4d5b8;
    font-weight: 600;
}

.blog-hero-breadcrumb-current {
    color: #181c2f;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-hero-title {
    margin: 0 0 1rem 0;
    font-size: clamp(26px, 3.4vw, 36px);
    line-height: 1.2;
    font-weight: 800;
    color: #181c2f;
    letter-spacing: -0.02em;
    max-width: 750px;
}

.blog-hero-subtitle {
    margin: 0 0 1.6rem 0;
    font-size: clamp(15px, 1.6vw, 17px);
    line-height: 1.55;
    color: #475569;
    max-width: 680px;
    font-weight: 400;
}

.blog-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 14px;
    color: #475569;
}

.blog-hero-meta strong {
    color: #181c2f;
    font-weight: 700;
}

.blog-hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-hero-meta-sep {
    color: #f4d5b8;
    font-weight: 600;
}

.blog-hero-meta-icon {
    width: 16px;
    height: 16px;
    color: #f47d3c;
    flex: 0 0 auto;
}

.blog-hero-author-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
    border: 2px solid #ffffff;
}

@media (max-width: 600px) {
    .blog-hero {
        padding: 2rem 0 2.2rem;
    }

    .blog-hero::before,
    .blog-hero::after {
        width: 160px;
        height: 160px;
    }

    .blog-hero-breadcrumb {
        font-size: 12px;
    }

    .blog-hero-breadcrumb-current {
        max-width: 180px;
    }

    .blog-hero-meta {
        gap: 8px 12px;
        font-size: 13px;
    }
}

/* ============================================================
   Lot 4 : Hero image, polish mobile, UX globale
   ============================================================ */

/* ----- Hero image en haut d'article ------------------------ */
/* Convention : insérer <img class="hero" src="..." alt="..."> en première
   ligne du contenu pour un visuel pleine largeur. */
.blog-article-content img.hero {
    width: 100%;
    max-width: 100%;
    height: clamp(220px, 32vw, 380px);
    object-fit: cover;
    margin: 0 0 2.2rem 0;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

/* ----- Smooth scroll global (clic sur ancre #) ------------- */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* ----- Focus visible (accessibilité) ----------------------- */
.blog-article-content a:focus-visible,
.right-content .sidebar-card a:focus-visible,
.blog-article-cta-button:focus-visible,
.floating-toc a:focus-visible {
    outline: 2px solid #f47d3c;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ----- Polish mobile (sidebar, share, CTA, sommaire) ------- */
@media (max-width: 991px) {
    /* La sidebar passe sous l'article (Bootstrap col-md-3 -> col-xs-12).
       On lui donne un peu d'air et on bride la largeur. */
    .right-content {
        margin-top: 2rem;
    }

    .right-content .sidebar-card {
        padding: 18px 18px;
    }

    .right-content .sidebar-card.sidebar-author img {
        width: 72px;
        height: 72px;
    }

    .right-content .sidebar-card.sidebar-related .related-link {
        padding: 14px 16px;
    }
}

@media (max-width: 600px) {
    .blog-article-content {
        font-size: 16px;
        line-height: 1.65;
    }

    /* Sommaire d'entrée : compact mais cliquable */
    .blog-article-content .chapters-wrapper:has(.title) {
        padding: 16px 18px 12px !important;
        margin-bottom: 2rem !important;
    }

    .blog-article-content .chapters-wrapper:has(.title) p:not(.title) a {
        font-size: 14px !important;
    }

    /* CTA final : compact mais punchy */
    .blog-article-cta {
        margin-top: 2.5rem;
        padding: 22px 20px;
        border-radius: 12px;
    }

    .blog-article-cta-title {
        font-size: 19px;
    }

    .blog-article-cta-text {
        font-size: 15px;
    }

    .blog-article-cta-button {
        display: flex;
        justify-content: center;
        width: 100%;
        padding: 14px 20px;
    }

    /* Share bar : label sur sa ligne, boutons en pleine largeur */
    .blog-article-share {
        gap: 10px;
        padding: 18px 0;
    }

    .blog-article-share-label {
        flex: 1 1 100%;
        margin-bottom: 4px;
    }

    .blog-article-share a {
        flex: 1 1 auto;
        justify-content: center;
        padding: 10px 16px;
    }

    /* Resource cards : une seule colonne, compact */
    .blog-article-content .resource-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Tableau : scroll horizontal si besoin */
    .blog-article-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Hero plus compact */
    .blog-article-content img.hero {
        height: 200px;
        border-radius: 10px;
        margin-bottom: 1.6rem;
    }
}
