/* Styles of resources/views/collections/blog/article.antlers.html, moved out of the template so the browser
   caches them and the design token guards read them. Values come from the
   tokens in style.css :root. */

/* ── ARTICLE SPECIFIC CSS ── */
/* ── HERO ── */
.blog-hero { position: relative; height: 520px; margin-top: var(--r2e-space-16); }
.blog-hero > .hero-photo { object-position: center; }
.blog-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(var(--bs-secondary-rgb), 0.25) 0%, rgba(var(--bs-secondary-rgb), 0.75) 100%); }
.blog-hero-content { position: absolute; bottom: 0; left: 0; right: 0; padding: var(--r2e-space-8) 0 var(--r2e-section-y); }
.reading-meta span, .reading-meta time { font-size: var(--r2e-text-sm); color: rgba(255,255,255,0.75); }
.reading-meta .sep { margin: 0 var(--r2e-space-2); opacity:0.4; }

/* ── READING PROGRESS BAR ── */
.reading-progress { position: fixed; top: 75px; left: 0; width: 0%; height: 3px; background: linear-gradient(to right, var(--bs-primary), var(--bs-info)); z-index: 1000; transition: width 0.1s linear; }

/* ── HERO BADGES ── */
.hero-badge { display: inline-block; font-weight: 600; font-size: var(--r2e-text-xs); padding: var(--r2e-space-2) var(--r2e-space-3); border-radius: var(--r2e-radius-pill); text-decoration: none; line-height: var(--r2e-leading-tight); transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease; }
.hero-badge-primary { background: var(--bs-info); color: #fff; }
.hero-badge-primary:hover { background: var(--bs-info); color: #fff; transform: translateY(-2px); box-shadow: var(--r2e-shadow-hover); }
.hero-badge-ghost { background: rgba(255,255,255,0.2); color: #fff; }
.hero-badge-ghost:hover { background: rgba(255,255,255,0.4); color: #fff; transform: translateY(-2px); }

/* Bannière location non pertinente sur les articles Conseils */
.is-conseils .blog-cta-banner { display: none; }

/* ── ARTICLE TYPOGRAPHY ── */
.blog-main-content { font-size: var(--r2e-text-base); line-height: var(--r2e-leading-body); color: var(--r2e-ink); }
.blog-main-content h2 { font-size: var(--r2e-text-xl); font-weight: 600; color: var(--bs-secondary); margin-top: var(--r2e-space-12); margin-bottom: var(--r2e-space-4); padding-top: var(--r2e-space-2); border-top: 3px solid var(--bs-primary); display: inline-block; scroll-margin-top: 100px; }
.blog-main-content h3 { font-size: var(--r2e-text-lg); font-weight: 600; color: var(--bs-secondary); margin-top: var(--r2e-space-8); margin-bottom: var(--r2e-space-3); }
.blog-main-content p { margin-bottom: var(--r2e-space-6); }
.blog-main-content ul, .blog-main-content ol { margin-bottom: var(--r2e-space-6); padding-left: var(--r2e-space-6); }
.blog-main-content li { margin-bottom: var(--r2e-space-2); }
/* The editor wraps a list item's text in a paragraph; the hand-written articles do not, so it adds no space of its own. */
.blog-main-content li > p:last-child { margin-bottom: 0; }
.blog-main-content strong { color: var(--bs-secondary); font-weight: 600; }
.blog-main-content a { color: var(--bs-primary); text-decoration: underline; text-underline-offset: 3px; }
.blog-main-content a:hover { color: var(--bs-secondary); }

/* ── INFO BOXES ── */
.blog-infobox { background: rgba(var(--bs-primary-rgb), 0.07); border-left: 4px solid var(--bs-primary); border-radius: 0 var(--r2e-radius) var(--r2e-radius) 0; padding: var(--r2e-space-6) var(--r2e-space-6); margin: var(--r2e-space-8) 0; }
.blog-infobox.warning { background: rgba(var(--bs-warning-rgb), 0.12); border-left-color: var(--bs-warning); }
.blog-infobox.alert { background: rgba(var(--bs-danger-rgb), 0.12); border-left-color: var(--bs-danger); }

/* Article photos and their captions live in css/content-blocks.css, shared with every page that has photo blocks. */

/* ── TAGS ── */
.tag-badge { display: inline-block; background: rgba(var(--bs-primary-rgb), 0.1); color: var(--bs-primary); border-radius: var(--r2e-radius-pill); padding: var(--r2e-space-1) var(--r2e-space-3); font-size: var(--r2e-text-xs); font-weight: 500; text-decoration: none; margin-right: var(--r2e-space-2); margin-bottom: var(--r2e-space-2); transition: all 0.2s; }
.tag-badge:hover { background: var(--bs-primary); color: white; }

/* ── SHARE BAR ── */
.share-bar { background: var(--bs-gray-100); border-radius: var(--r2e-radius); padding: var(--r2e-space-4) var(--r2e-space-6); display: flex; align-items: center; gap: var(--r2e-space-4); flex-wrap: wrap; margin-top: var(--r2e-space-12); }
.share-bar span { font-weight: 600; color: var(--bs-secondary); font-size: var(--r2e-text-sm); }
.share-btn { display: inline-flex; align-items: center; gap: var(--r2e-space-2); padding: var(--r2e-space-2) var(--r2e-space-4); border-radius: var(--r2e-radius-pill); font-size: var(--r2e-text-sm); font-weight: 500; text-decoration: none; transition: background 0.2s; color: white !important; border: none; cursor: pointer; }
.share-btn.facebook, .share-btn.whatsapp { background: var(--bs-primary); }
.share-btn.copy { background: var(--bs-secondary); }
.share-btn:hover { background: var(--bs-secondary); color: white !important; }
.share-btn.copy:hover { background: var(--bs-primary); }

/* ── NEWSLETTER ── */
.newsletter-cta { background: linear-gradient(135deg, var(--bs-secondary) 0%, var(--bs-primary) 100%); padding: var(--r2e-section-y) var(--r2e-space-4); }
.newsletter-inner { max-width: 640px; margin: 0 auto; }
.newsletter-title { color: #fff; font-weight: 700; font-size: var(--r2e-text-2xl); margin-bottom: var(--r2e-space-3); }
.newsletter-text { color: rgba(255,255,255,0.9); font-size: var(--r2e-text-base); margin-bottom: var(--r2e-space-8); }
.newsletter-form { display: flex; gap: var(--r2e-space-2); flex-wrap: wrap; justify-content: center; }
.newsletter-input { flex: 1 1 280px; min-width: 0; border: none; border-radius: var(--r2e-radius); padding: var(--r2e-space-3) var(--r2e-space-4); font-size: var(--r2e-text-base); }
.newsletter-input:focus { outline: 3px solid rgba(255,255,255,0.5); }
.newsletter-btn { background: var(--bs-info); color: #fff; border: none; border-radius: var(--r2e-radius); padding: var(--r2e-space-3) var(--r2e-space-6); font-weight: 700; font-size: var(--r2e-text-base); cursor: pointer; transition: background 0.2s; white-space: nowrap; }
.newsletter-btn:hover { background: var(--bs-info); }
@media (max-width: 575px) { .newsletter-form { flex-direction: column; } .newsletter-btn { width: 100%; } }

 /* ── INFO BOXES ── */
    .info-box {
        background: rgba(var(--bs-primary-rgb), 0.07);
        border-left: 4px solid var(--bs-primary);
        border-radius: 0 var(--r2e-radius) var(--r2e-radius) 0;
        padding: var(--r2e-space-6) var(--r2e-space-6);
        margin: var(--r2e-space-8) 0;
    }
    .info-box.warning { background: rgba(var(--bs-warning-rgb), 0.12); border-left-color: var(--bs-warning); }
    .info-box.alert   { background: rgba(var(--bs-danger-rgb), 0.12); border-left-color: var(--bs-danger); }
    .info-box-title {
        font-weight: 600;
        color: var(--bs-secondary);
        font-size: var(--r2e-text-sm);
        text-transform: uppercase;
        letter-spacing: var(--r2e-tracking-caps);
        margin-bottom: var(--r2e-space-2);
        display: flex;
        align-items: center;
        gap: var(--r2e-space-2);
    }

/* ── AUTHOR CARD ── */
.author-card { border: 1px solid var(--bs-gray-200); border-radius: var(--r2e-radius); padding: var(--r2e-space-6); display: flex; gap: var(--r2e-space-6); align-items: flex-start; margin: var(--r2e-space-12) 0; }
.author-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-name { font-weight: 600; color: var(--bs-secondary); margin-bottom: var(--r2e-space-1); }
.author-bio { font-size: var(--r2e-text-sm); color: var(--r2e-ink-muted); margin: 0; }

/* ── SIDEBAR & TOC ── */
.toc-card { position: static; }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list > li { border-bottom: 1px solid var(--bs-gray-200); }
.toc-list > li:last-child { border-bottom: none; }
.toc-list a { display: block; padding: var(--r2e-space-2) var(--r2e-space-3); font-size: var(--r2e-text-sm); color: var(--r2e-ink-muted); text-decoration: none; transition: color 0.2s, background 0.2s, border-color 0.2s; border-left: 3px solid transparent; line-height: var(--r2e-leading-snug); }
.toc-list > li > a { font-weight: 600; color: var(--r2e-ink); }
.toc-list a:hover, .toc-list a.active { color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), 0.06); border-left-color: var(--bs-primary); }
.toc-sublist { list-style: none; padding: 0; margin: 0; }
.toc-sublist a { padding: var(--r2e-space-1) var(--r2e-space-3) var(--r2e-space-1) var(--r2e-space-8); font-size: var(--r2e-text-sm); color: var(--r2e-ink-muted); font-weight: 400; line-height: var(--r2e-leading-snug); }
.toc-sublist a::before { content: ""; position: absolute; }

.cta-hub { margin-bottom: var(--r2e-space-6); }
.cta-hub-link { display: flex; align-items: center; justify-content: space-between; gap: var(--r2e-space-2); background: linear-gradient(135deg, var(--bs-secondary) 0%, var(--bs-primary) 100%); border-radius: var(--r2e-radius); padding: var(--r2e-space-3) var(--r2e-space-4); color: #fff; text-decoration: none; font-weight: 600; font-size: var(--r2e-text-sm); line-height: var(--r2e-leading-snug); transition: filter 0.2s; }
.cta-hub-link:hover { filter: brightness(1.08); color: #fff; }
.cta-hub-text i { margin-right: var(--r2e-space-2); opacity: 0.95; }
.cta-hub-arrow { flex-shrink: 0; font-size: var(--r2e-text-xs); }

/* ── IN-CONTENT CTA BANNER ── */
.blog-cta-banner { background: linear-gradient(135deg, var(--bs-secondary) 0%, var(--bs-primary) 100%); border-radius: var(--r2e-radius-lg); padding: var(--r2e-space-6) var(--r2e-space-8); margin: var(--r2e-space-12) 0; box-shadow: var(--r2e-shadow); }
.blog-cta-banner-label { text-transform: uppercase; letter-spacing: var(--r2e-tracking-caps); font-size: var(--r2e-text-xs); font-weight: 700; color: rgba(255,255,255,0.7); margin-bottom: var(--r2e-space-2) !important; }
.blog-cta-banner h3 { color: #fff !important; font-weight: 700; font-size: var(--r2e-text-lg); margin: 0 0 var(--r2e-space-2) !important; }
.blog-cta-banner p:not(.blog-cta-banner-label) { color: rgba(255,255,255,0.9); font-size: var(--r2e-text-sm); line-height: var(--r2e-leading-body); margin: 0 !important; }
.blog-cta-banner .btn { background: var(--bs-info); border: none; color: #fff !important; text-decoration: none !important; border-radius: var(--r2e-radius); font-weight: 700; font-size: var(--r2e-text-sm); white-space: normal !important; line-height: var(--r2e-leading-snug); box-shadow: none; }
.blog-cta-banner .btn:hover { background: var(--r2e-info-600); color: #fff !important; }
.blog-cta-banner .btn i { margin-left: var(--r2e-space-2); }

/* ── RELATED CARDS ── */
.related-card { position: relative; border: none; border-radius: var(--r2e-radius); overflow: hidden; box-shadow: var(--r2e-shadow); transition: transform 0.2s, box-shadow 0.2s; height: 100%; }
.related-card:hover { transform: translateY(-4px); box-shadow: var(--r2e-shadow-hover); }
.related-card .card-title a { color: var(--bs-secondary); text-decoration: none; font-weight: 600; font-size: var(--r2e-text-base); }
.related-card .card-title a:hover { color: var(--bs-primary); }

.text-muted { color: var(--r2e-ink-muted) !important; }
