/*
Theme Name: Astra BV Child
Theme URI: https://boussole-voyage.fr
Description: Child theme Astra pour Boussole Voyage. Design éditorial voyage pour le réseau PBN.
Author: Geoffrey
Version: 1.1.4
Template: astra
Text Domain: astra-bv-child
*/

/* ─────────────────────────────────────────────────────────────
   Design tokens
   ───────────────────────────────────────────────────────────── */
:root {
    --bv-primary: #15507A;
    --bv-primary-dark: #103D5C;
    --bv-secondary: #1E8C82;
    --bv-accent: #E8A33D;
    --bv-text: #1F3A4D;
    --bv-text-soft: #5C7688;
    --bv-bg: #FCFBF8;
    --bv-bg-soft: #EEF3F5;
    --bv-border: #DCE5EA;
    --bv-card-shadow: 0 4px 16px rgba(38, 70, 83, 0.06);
    --bv-card-shadow-hover: 0 12px 32px rgba(38, 70, 83, 0.14);
    --bv-radius: 16px;
    --bv-radius-small: 8px;
    --bv-font-heading: 'Fraunces', Georgia, serif;
    --bv-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─────────────────────────────────────────────────────────────
   FIX ASTRA WRAPPER : casser TOUT ce qui pourrait contraindre
   notre layout full-width sur home + archive.
   Astra met du box-shadow + padding via ast-separate-container,
   on neutralise tout ça.
   ───────────────────────────────────────────────────────────── */
body.home,
body.archive {
    background: var(--bv-bg) !important;
}

.home #content,
.archive #content {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
}

.home #content > .ast-container,
.archive #content > .ast-container,
.home .site-content > .ast-container,
.archive .site-content > .ast-container {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    display: block;
}

.home #primary,
.archive #primary,
.home .site-main,
.archive .site-main {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Astra ajoute parfois un wrapper supplémentaire */
.home .ast-row,
.archive .ast-row,
.home [class^="ast-grid-common"],
.archive [class^="ast-grid-common"] {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Sur les pages internes, garder la largeur Astra normale */
.single .ast-container,
.page .ast-container {
    background: var(--bv-bg);
}

/* ─────────────────────────────────────────────────────────────
   Base
   ───────────────────────────────────────────────────────────── */
body {
    background: var(--bv-bg) !important;
    color: var(--bv-text) !important;
    font-family: var(--bv-font-body) !important;
    font-size: 16px;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.widget-title {
    font-family: var(--bv-font-heading) !important;
    color: var(--bv-text) !important;
    letter-spacing: -0.01em;
    font-weight: 600;
}

a {
    color: var(--bv-primary);
    transition: color 0.2s;
}

a:hover {
    color: var(--bv-primary-dark);
}

/* ─────────────────────────────────────────────────────────────
   Header
   ───────────────────────────────────────────────────────────── */
.site-header {
    background: var(--bv-bg) !important;
    border-bottom: 1px solid var(--bv-border);
}

.main-header-bar {
    padding: 14px 0;
}

.site-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.site-title a,
.site-title a:hover {
    font-family: var(--bv-font-heading) !important;
    color: var(--bv-text) !important;
    font-weight: 700;
    font-size: 26px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

/* Logo monogramme bleu avec rose des vents */
.site-title a::before {
    content: "";
    display: inline-block;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 42 42' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%2315507A'/%3E%3Cstop offset='100%25' stop-color='%23E8A33D'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='21' cy='21' r='21' fill='url(%23g)'/%3E%3Cpath d='M21 8 L23.5 18.5 L34 21 L23.5 23.5 L21 34 L18.5 23.5 L8 21 L18.5 18.5 Z' fill='white'/%3E%3Ccircle cx='21' cy='21' r='2.3' fill='%2315507A'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    box-shadow: 0 4px 12px rgba(21, 80, 122, 0.3);
    border-radius: 50%;
    transition: transform 0.3s;
}

.site-title a:hover::before {
    transform: rotate(-8deg) scale(1.05);
}

/* Sur mobile, logo + texte qui restent alignés */
@media (max-width: 480px) {
    .site-title a {
        font-size: 22px;
    }
    .site-title a::before {
        width: 36px;
        height: 36px;
    }
}

.site-description {
    font-family: var(--bv-font-body) !important;
    color: var(--bv-text-soft) !important;
    font-size: 13px;
    font-style: italic;
}

.main-navigation .main-nav-ul > li > a {
    font-family: var(--bv-font-body) !important;
    font-weight: 500;
    font-size: 15px;
    color: var(--bv-text) !important;
    padding: 10px 16px;
}

.main-navigation .main-nav-ul > li > a:hover,
.main-navigation .main-nav-ul > li.current-menu-item > a {
    color: var(--bv-primary) !important;
}

/* CTA Contact dans le menu */
.main-navigation .main-nav-ul > li.bv-menu-cta {
    margin-left: 16px;
}

.main-navigation .main-nav-ul > li.bv-menu-cta > a {
    background: var(--bv-primary) !important;
    color: #fff !important;
    padding: 10px 22px !important;
    border-radius: 100px !important;
    font-weight: 600 !important;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s !important;
    box-shadow: 0 4px 12px rgba(21, 80, 122, 0.25) !important;
}

.main-navigation .main-nav-ul > li.bv-menu-cta > a:hover {
    background: var(--bv-primary-dark) !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(21, 80, 122, 0.4) !important;
}

/* ─────────────────────────────────────────────────────────────
   Hero homepage avec image de fond
   ───────────────────────────────────────────────────────────── */
.bv-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 140px 20px 160px;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.bv-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(38, 70, 83, 0.62) 0%,
        rgba(21, 80, 122, 0.50) 100%
    );
}

.bv-hero > * {
    position: relative;
    z-index: 1;
}

.bv-hero .eyebrow {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.bv-hero h1 {
    color: #fff !important;
    font-size: clamp(36px, 5.2vw, 60px);
    line-height: 1.1;
    margin: 0 auto 20px;
    max-width: 900px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.18);
}

.bv-hero h1 em {
    color: var(--bv-accent);
    font-style: italic;
}

.bv-hero p {
    font-size: clamp(16px, 1.4vw, 19px);
    color: rgba(255, 255, 255, 0.92);
    max-width: 680px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────
   Section commune
   ───────────────────────────────────────────────────────────── */
.bv-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.bv-section-alt {
    background: var(--bv-bg-soft);
    max-width: none;
}

.bv-section-alt .bv-section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.bv-section-header {
    text-align: center;
    margin-bottom: 48px;
}

.bv-section-header h2 {
    font-size: clamp(28px, 3.5vw, 40px);
    margin: 0 0 12px;
}

.bv-section-header p {
    color: var(--bv-text-soft);
    font-size: 17px;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ─────────────────────────────────────────────────────────────
   Cards catégories (avec image)
   ───────────────────────────────────────────────────────────── */
.bv-cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.bv-cat-card {
    position: relative;
    border-radius: var(--bv-radius);
    overflow: hidden;
    text-decoration: none !important;
    color: #fff;
    aspect-ratio: 4 / 5;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    box-shadow: var(--bv-card-shadow);
}

.bv-cat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(38, 70, 83, 0.1) 30%,
        rgba(38, 70, 83, 0.78) 100%
    );
    transition: background 0.3s;
}

.bv-cat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--bv-card-shadow-hover);
}

.bv-cat-card:hover::before {
    background: linear-gradient(
        180deg,
        rgba(21, 80, 122, 0.15) 30%,
        rgba(21, 80, 122, 0.82) 100%
    );
}

.bv-cat-card > * {
    position: relative;
    z-index: 1;
}

.bv-cat-card .name {
    font-family: var(--bv-font-heading);
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.1;
}

.bv-cat-card .count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

/* ─────────────────────────────────────────────────────────────
   Cards articles (avec image)
   ───────────────────────────────────────────────────────────── */
.bv-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.bv-article-card {
    background: #fff;
    border: 1px solid var(--bv-border);
    border-radius: var(--bv-radius);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.bv-article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--bv-card-shadow-hover);
}

.bv-article-card .thumb {
    aspect-ratio: 16 / 10;
    background-size: cover;
    background-position: center;
    display: block;
    text-decoration: none;
    transition: transform 0.5s;
}

.bv-article-card:hover .thumb {
    transform: scale(1.04);
}

.bv-article-card .body {
    padding: 24px 26px 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.bv-article-card .cat-tag {
    align-self: flex-start;
    background: rgba(21, 80, 122, 0.12);
    color: var(--bv-primary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 12px;
    border-radius: 100px;
    text-decoration: none;
}

.bv-article-card h3 {
    font-size: 20px;
    line-height: 1.3;
    margin: 0;
}

.bv-article-card h3 a {
    color: var(--bv-text) !important;
    text-decoration: none;
}

.bv-article-card h3 a:hover {
    color: var(--bv-primary) !important;
}

.bv-article-card .excerpt {
    color: var(--bv-text-soft);
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.bv-article-card .read-more {
    color: var(--bv-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    margin-top: 4px;
}

.bv-article-card .read-more:after {
    content: " →";
    transition: margin-left 0.2s;
}

.bv-article-card:hover .read-more:after {
    margin-left: 4px;
}

/* ─────────────────────────────────────────────────────────────
   SINGLE ARTICLE — Template custom popschool-style
   ───────────────────────────────────────────────────────────── */

/* Casser la container Astra sur single comme on l'a fait pour home/archive */
body.single {
    background: var(--bv-bg) !important;
}

.single #content,
.single #content > .ast-container,
.single .site-content > .ast-container {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
}

.single #primary,
.single .site-main {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: transparent !important;
    box-shadow: none !important;
    display: block !important;
    float: none !important;
    grid-template-columns: none !important;
}

/* Force block layout pour TOUS les enfants directs de site-main / article */
.single .site-main > *,
.single article.bv-single,
.single article.bv-single > *,
.single > section {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    flex: none !important;
}

/* Astra ast-row sur single */
.single .ast-row,
.single [class^="ast-grid-common"] {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    grid-template-columns: none !important;
}

.bv-single-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Header article (ultra compact, hero au fold) ─── */
.bv-single-header {
    background: var(--bv-bg);
    padding: 20px 0 16px;
    border-bottom: 1px solid var(--bv-border);
}

.bv-breadcrumb {
    font-size: 12px;
    color: var(--bv-text-soft);
    margin-bottom: 8px;
}

.bv-breadcrumb a {
    color: var(--bv-text-soft);
    text-decoration: none;
}

.bv-breadcrumb a:hover {
    color: var(--bv-primary);
}

.bv-breadcrumb span {
    margin: 0 6px;
}

.bv-breadcrumb .current {
    color: var(--bv-text);
}

.bv-single-cat-badge {
    display: inline-block;
    background: var(--bv-primary);
    color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 100px;
    text-decoration: none;
    margin-bottom: 8px;
}

.bv-single-title {
    font-size: clamp(22px, 2.6vw, 30px) !important;
    line-height: 1.2 !important;
    margin: 0 0 8px !important;
    color: var(--bv-text) !important;
    letter-spacing: -0.01em;
    max-width: 820px;
}

.bv-single-excerpt {
    font-size: 15px;
    line-height: 1.5;
    color: var(--bv-text-soft);
    margin: 0 0 14px;
    max-width: 760px;
    /* Limite a 2 lignes max pour garder le hero au fold */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bv-single-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--bv-border);
}

.bv-single-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bv-single-author img {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    border: 2px solid var(--bv-bg-soft);
}

.bv-single-author .name {
    font-size: 14px !important;
}

.bv-single-author .role {
    font-size: 11px !important;
}

.bv-single-meta-right {
    font-size: 13px !important;
}

.bv-single-author .name {
    font-family: var(--bv-font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--bv-text);
}

.bv-single-author .role {
    font-size: 12px;
    color: var(--bv-text-soft);
}

.bv-single-meta-right {
    display: flex;
    gap: 20px;
    color: var(--bv-text-soft);
    font-size: 14px;
}

.bv-single-meta-right .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ─── Hero image (court, visible au fold) ─── */
.bv-single-hero {
    height: 300px;
    background-size: cover;
    background-position: center;
    background-color: var(--bv-bg-soft);
}

@media (max-width: 768px) {
    .bv-single-hero {
        height: 200px;
    }
}

/* ─── Body wrapper avec TOC sticky ─── */
.bv-single-body-wrapper {
    padding: 56px 0;
    background: var(--bv-bg);
}

.bv-single-body-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 56px;
    align-items: start;
}

@media (max-width: 980px) {
    .bv-single-body-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ─── TOC sticky ─── */
.bv-single-toc {
    position: sticky;
    top: 88px;
    align-self: start;
}

.bv-toc-card {
    background: var(--bv-bg-soft);
    border-radius: var(--bv-radius);
    padding: 24px 22px;
    margin-bottom: 20px;
}

.bv-toc-title {
    font-family: var(--bv-font-heading);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bv-primary);
    margin-bottom: 14px;
}

.bv-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bv-toc-list li {
    padding: 6px 0;
    border-left: 2px solid transparent;
    padding-left: 10px;
    margin-left: -10px;
    transition: border-color 0.2s;
}

.bv-toc-list li.sub {
    padding-left: 24px;
    margin-left: -10px;
}

.bv-toc-list li a {
    color: var(--bv-text);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    display: block;
}

.bv-toc-list li a:hover {
    color: var(--bv-primary);
}

.bv-toc-list li.active {
    border-left-color: var(--bv-primary);
}

.bv-toc-list li.active a {
    color: var(--bv-primary);
    font-weight: 600;
}

/* ─── Partage social ─── */
.bv-single-share {
    background: var(--bv-bg-soft);
    border-radius: var(--bv-radius);
    padding: 18px 22px;
}

.bv-single-share .label {
    font-family: var(--bv-font-heading);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bv-primary);
    margin-bottom: 10px;
}

.bv-single-share .links {
    display: flex;
    gap: 10px;
}

.bv-single-share .links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    color: var(--bv-text);
    border: 1px solid var(--bv-border);
    transition: background 0.2s, color 0.2s;
}

.bv-single-share .links a:hover {
    background: var(--bv-primary);
    color: #fff;
    border-color: var(--bv-primary);
}

/* ─── Body article ─── */
.bv-single-body {
    font-size: 17px;
    line-height: 1.8;
    color: var(--bv-text);
}

.bv-single-body > * {
    margin-bottom: 1.4em;
}

.bv-single-body p {
    margin-bottom: 1.4em;
}

.bv-single-body h2 {
    font-family: var(--bv-font-heading);
    font-size: clamp(24px, 2.6vw, 30px);
    line-height: 1.25;
    margin-top: 2.2em;
    margin-bottom: 0.6em;
    color: var(--bv-text);
    scroll-margin-top: 80px;
}

.bv-single-body h2:first-child {
    margin-top: 0;
}

.bv-single-body h3 {
    font-family: var(--bv-font-heading);
    font-size: clamp(20px, 2vw, 23px);
    line-height: 1.3;
    margin-top: 1.8em;
    margin-bottom: 0.5em;
    color: var(--bv-text);
    scroll-margin-top: 80px;
}

.bv-single-body a {
    color: var(--bv-primary);
    border-bottom: 1px solid rgba(21, 80, 122, 0.3);
    text-decoration: none;
    transition: border-color 0.2s;
}

.bv-single-body a:hover {
    border-bottom-color: var(--bv-primary);
}

.bv-single-body strong {
    color: var(--bv-text);
}

.bv-single-body ul,
.bv-single-body ol {
    margin-bottom: 1.4em;
    padding-left: 24px;
}

.bv-single-body ul li,
.bv-single-body ol li {
    margin-bottom: 0.6em;
    line-height: 1.7;
}

.bv-single-body ul {
    list-style: none;
    padding-left: 0;
}

.bv-single-body ul li {
    position: relative;
    padding-left: 24px;
}

.bv-single-body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 8px;
    height: 8px;
    background: var(--bv-primary);
    border-radius: 50%;
}

.bv-single-body blockquote {
    margin: 2em 0;
    padding: 22px 28px;
    background: var(--bv-bg-soft);
    border-left: 4px solid var(--bv-primary);
    border-radius: 0 var(--bv-radius) var(--bv-radius) 0;
    font-family: var(--bv-font-heading);
    font-style: italic;
    font-size: 19px;
    line-height: 1.6;
    color: var(--bv-text);
}

.bv-single-body img {
    border-radius: var(--bv-radius);
    margin: 1.6em 0;
    max-width: 100%;
    height: auto;
}

.bv-single-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    border-radius: var(--bv-radius);
    overflow: hidden;
    box-shadow: var(--bv-card-shadow);
}

.bv-single-body table th {
    background: var(--bv-primary);
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 14px 18px;
    font-size: 14px;
}

.bv-single-body table td {
    padding: 14px 18px;
    border-top: 1px solid var(--bv-border);
    background: #fff;
}

.bv-single-body table tr:nth-child(even) td {
    background: var(--bv-bg-soft);
}

/* ─── Bio auteur fin d'article ─── */
.bv-single-author-bio {
    padding: 32px 0 48px;
    background: var(--bv-bg);
    border-top: 1px solid var(--bv-border);
}

.bv-single-author-bio .bio-card {
    display: flex;
    gap: 24px;
    background: var(--bv-bg-soft);
    border-radius: var(--bv-radius);
    padding: 28px 32px;
    align-items: flex-start;
}

.bv-single-author-bio .bio-card img {
    border-radius: 50%;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border: 3px solid #fff;
}

.bv-single-author-bio .label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bv-primary);
    margin-bottom: 6px;
}

.bv-single-author-bio .bio-name {
    font-family: var(--bv-font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--bv-text);
    margin-bottom: 8px;
}

.bv-single-author-bio p {
    color: var(--bv-text-soft);
    line-height: 1.6;
    margin: 0;
}

/* ─────────────────────────────────────────────────────────────
   Archive (catégorie)
   ───────────────────────────────────────────────────────────── */
.bv-cat-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 100px 20px 110px;
    text-align: center;
    color: #fff;
    margin-bottom: 0;
}

.bv-cat-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(38, 70, 83, 0.72) 0%,
        rgba(21, 80, 122, 0.55) 100%
    );
}

.bv-cat-hero > * {
    position: relative;
    z-index: 1;
}

.bv-cat-hero h1 {
    color: #fff !important;
    font-size: clamp(32px, 4.5vw, 52px);
    margin: 0 0 12px;
    text-shadow: 0 2px 18px rgba(0,0,0,0.18);
}

.bv-cat-hero .desc {
    color: rgba(255, 255, 255, 0.92);
    font-size: 17px;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

.bv-cat-hero .count-chip {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 18px;
    backdrop-filter: blur(8px);
}

/* ─────────────────────────────────────────────────────────────
   Page institutionnelle (mon-parcours, contact, etc.)
   ───────────────────────────────────────────────────────────── */
.page .ast-container,
.page-template-default .ast-container {
    max-width: 760px;
}

.page .entry-header {
    text-align: center;
    margin: 40px 0 32px;
}

.page .entry-title {
    font-size: clamp(28px, 4vw, 44px);
    margin: 0;
}

.page .entry-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--bv-text);
}

.page .entry-content h2 {
    font-size: 26px;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
}

.page .entry-content a {
    color: var(--bv-primary);
}

/* Contact email mis en avant */
.bv-contact-block {
    text-align: center;
    background: var(--bv-bg-soft);
    border-radius: var(--bv-radius);
    padding: 40px 28px;
    margin: 32px 0;
}

.bv-contact-block .label {
    color: var(--bv-text-soft);
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 10px;
}

.bv-contact-block a {
    display: inline-block;
    color: var(--bv-primary);
    font-family: var(--bv-font-heading);
    font-size: 28px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.bv-contact-block a:hover {
    border-bottom-color: var(--bv-primary);
}

/* ─────────────────────────────────────────────────────────────
   Section Réassurance ("Pourquoi nous suivre")
   ───────────────────────────────────────────────────────────── */
.bv-trust {
    background: var(--bv-bg);
    padding: 80px 20px;
    border-top: 1px solid var(--bv-border);
    border-bottom: 1px solid var(--bv-border);
}

.bv-trust-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.bv-trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
}

.bv-trust-card {
    text-align: center;
    padding: 8px;
}

.bv-trust-card .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(21, 80, 122, 0.12);
    color: var(--bv-primary);
    font-size: 28px;
    margin-bottom: 16px;
}

.bv-trust-card h3 {
    font-size: 19px;
    margin: 0 0 8px;
}

.bv-trust-card p {
    color: var(--bv-text-soft);
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0;
}

/* Stats bar */
.bv-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    padding: 32px 0 0;
    margin-top: 48px;
    border-top: 1px solid var(--bv-border);
}

.bv-stat {
    text-align: center;
}

.bv-stat .num {
    font-family: var(--bv-font-heading);
    font-size: 36px;
    font-weight: 600;
    color: var(--bv-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.bv-stat .label {
    font-size: 13px;
    color: var(--bv-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────
   Newsletter CTA (avant footer)
   ───────────────────────────────────────────────────────────── */
.bv-newsletter {
    background: linear-gradient(135deg, var(--bv-primary) 0%, var(--bv-accent) 100%);
    padding: 64px 20px;
    text-align: center;
    color: #fff;
}

.bv-newsletter h2 {
    color: #fff !important;
    font-size: clamp(26px, 3vw, 36px);
    margin: 0 0 12px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.bv-newsletter p {
    color: rgba(255,255,255,0.92);
    font-size: 16px;
    max-width: 560px;
    margin: 0 auto 32px;
}

.bv-newsletter-form {
    max-width: 460px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
}

.bv-newsletter-form input[type="email"] {
    flex: 1;
    padding: 14px 20px;
    border-radius: 100px;
    border: none;
    font-size: 15px;
    font-family: var(--bv-font-body);
    color: var(--bv-text);
}

.bv-newsletter-form button {
    background: var(--bv-text);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 100px;
    font-family: var(--bv-font-body);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.bv-newsletter-form button:hover {
    background: #142A38;
}

/* ─────────────────────────────────────────────────────────────
   Footer custom
   ───────────────────────────────────────────────────────────── */
.bv-footer {
    background: var(--bv-text);
    color: rgba(255,255,255,0.85);
    padding: 64px 20px 24px;
    font-family: var(--bv-font-body);
}

.bv-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.bv-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 920px) {
    .bv-footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 36px;
    }
}

@media (max-width: 540px) {
    .bv-footer-grid {
        grid-template-columns: 1fr;
    }
}

.bv-footer-col h4 {
    color: #fff !important;
    font-family: var(--bv-font-heading) !important;
    font-size: 18px;
    margin: 0 0 18px;
}

.bv-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bv-footer-col ul li {
    padding: 5px 0;
}

.bv-footer-col a {
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-size: 14.5px;
    transition: color 0.2s;
}

.bv-footer-col a:hover {
    color: var(--bv-accent);
}

.bv-footer-brand .bv-footer-logo {
    display: inline-block;
    font-family: var(--bv-font-heading);
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    margin-bottom: 14px;
}

.bv-footer-tagline {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 24px;
    max-width: 340px;
}

.bv-social {
    display: flex;
    gap: 12px;
    align-items: center;
}

.bv-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #fff !important;
    transition: background 0.2s, transform 0.2s;
}

.bv-social a:hover {
    background: var(--bv-primary);
    transform: translateY(-2px);
}

.bv-footer-bottom {
    padding-top: 24px;
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
}

.bv-footer-bottom p {
    margin: 4px 0;
}

.bv-footer-credits {
    font-style: italic;
    opacity: 0.7;
}

/* ─────────────────────────────────────────────────────────────
   Boutons
   ───────────────────────────────────────────────────────────── */
.bv-btn {
    display: inline-block;
    background: var(--bv-primary);
    color: #fff !important;
    padding: 15px 32px;
    border-radius: 100px;
    font-family: var(--bv-font-body);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 4px 14px rgba(21, 80, 122, 0.3);
}

.bv-btn:hover {
    background: var(--bv-primary-dark);
    color: #fff !important;
    transform: translateY(-2px);
}

.bv-btn-light {
    background: #fff;
    color: var(--bv-primary) !important;
}

.bv-btn-light:hover {
    background: rgba(255, 255, 255, 0.92);
    color: var(--bv-primary) !important;
}

.bv-btn-secondary {
    background: transparent;
    color: var(--bv-primary) !important;
    border: 2px solid var(--bv-primary);
    box-shadow: none;
}

.bv-btn-secondary:hover {
    background: var(--bv-primary);
    color: #fff !important;
}

/* ─────────────────────────────────────────────────────────────
   Responsive — mobile + tablette
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .bv-hero {
        padding: 80px 20px 100px;
    }
    .bv-cat-hero {
        padding: 64px 20px 72px;
    }
    .bv-section {
        padding: 56px 16px;
    }

    /* Single article : header padding réduit */
    .bv-single-header {
        padding: 32px 0 24px;
    }
    .bv-single-container {
        padding: 0 16px;
    }
    .bv-single-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .bv-single-meta-right {
        flex-direction: column;
        gap: 8px;
    }
    .bv-single-body-wrapper {
        padding: 32px 0;
    }
    .bv-single-author-bio .bio-card {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }
    .bv-single-author-bio .bio-card img {
        margin: 0 auto;
    }

    /* Newsletter form sur mobile */
    .bv-newsletter-form {
        flex-direction: column;
        gap: 12px;
    }
    .bv-newsletter-form button {
        width: 100%;
    }
}

/* ─────────────────────────────────────────────────────────────
   MENU MOBILE — hamburger + drawer Astra
   ───────────────────────────────────────────────────────────── */

/* Hamburger button — visible sous 921px */
.menu-toggle,
.ast-mobile-menu-trigger-minimal,
.ast-mobile-menu-trigger-fill,
.ast-mobile-menu-buttons-minimal,
.ast-mobile-menu-buttons-fill {
    background: transparent !important;
    color: var(--bv-text) !important;
    border: none !important;
    padding: 10px !important;
    box-shadow: none !important;
}

.menu-toggle .menu-toggle-icon,
.menu-toggle svg {
    fill: var(--bv-text) !important;
    color: var(--bv-text) !important;
    width: 28px !important;
    height: 28px !important;
}

.menu-toggle:hover,
.menu-toggle:focus {
    background: rgba(21, 80, 122, 0.08) !important;
    border-radius: 8px !important;
}

.menu-toggle:hover svg,
.menu-toggle:focus svg {
    fill: var(--bv-primary) !important;
}

/* Drawer mobile (panel qui s'ouvre) */
.ast-mobile-popup-drawer {
    background: var(--bv-bg) !important;
}

.ast-mobile-popup-content,
#ast-hf-mobile-menu {
    background: var(--bv-bg) !important;
    padding: 24px !important;
}

/* Liens du menu mobile */
#ast-hf-mobile-menu .menu-item > a,
.ast-mobile-popup-content .menu-item > a {
    font-family: var(--bv-font-heading) !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--bv-text) !important;
    padding: 14px 8px !important;
    border-bottom: 1px solid var(--bv-border) !important;
    display: block !important;
}

#ast-hf-mobile-menu .menu-item > a:hover,
#ast-hf-mobile-menu .menu-item.current-menu-item > a,
.ast-mobile-popup-content .menu-item > a:hover {
    color: var(--bv-primary) !important;
    background: rgba(21, 80, 122, 0.06) !important;
    padding-left: 16px !important;
}

/* CTA Nous contacter dans le menu mobile */
#ast-hf-mobile-menu .menu-item.bv-menu-cta > a,
.ast-mobile-popup-content .menu-item.bv-menu-cta > a {
    background: var(--bv-primary) !important;
    color: #fff !important;
    border-radius: 100px !important;
    text-align: center !important;
    border-bottom: none !important;
    margin-top: 20px !important;
    padding: 14px 24px !important;
    box-shadow: 0 4px 12px rgba(21, 80, 122, 0.25) !important;
}

#ast-hf-mobile-menu .menu-item.bv-menu-cta > a:hover {
    background: var(--bv-primary-dark) !important;
    color: #fff !important;
    padding-left: 24px !important;
}

/* Bouton close du drawer */
.ast-close-menu .menu-toggle-icon,
.close-menu-icon {
    color: var(--bv-text) !important;
    fill: var(--bv-text) !important;
}

/* Sur mobile : masquer le CTA desktop dans le header pour pas de doublon */
@media (max-width: 920px) {
    .main-header-menu .bv-menu-cta {
        display: none;
    }
}

/* ─────────────────────────────────────────────────────────────
   Petits écrans (≤ 480px) — derniers ajustements
   ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .bv-hero h1,
    .bv-cat-hero h1 {
        font-size: 32px;
    }
    .bv-section-header h2 {
        font-size: 26px;
    }
    .bv-single-title {
        font-size: 28px !important;
    }
    .bv-single-excerpt {
        font-size: 16px;
    }
    .bv-cat-card .name {
        font-size: 22px;
    }
    .bv-article-card .body {
        padding: 18px 20px 20px;
    }
    .bv-single-share .links {
        flex-wrap: wrap;
    }
    .bv-footer-grid {
        gap: 28px;
    }
}

/* ─────────────────────────────────────────────────────────────
   Maillage interne — bloc "Pour aller plus loin" (3 clics max)
   ─────────────────────────────────────────────────────────── */
.bv-internal-linkage {
    margin: 48px 0 24px;
    padding: 26px 30px;
    background: var(--bv-bg-soft);
    border-radius: var(--bv-radius);
    border-left: 4px solid var(--bv-accent);
}
.bv-linkage-title {
    font-family: var(--bv-font-heading);
    font-size: 22px;
    color: var(--bv-text);
    margin: 0 0 18px;
    font-weight: 700;
}
.bv-linkage-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.bv-linkage-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(38, 70, 83, 0.08);
}
.bv-linkage-item:last-child { border-bottom: none; }
.bv-linkage-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: var(--bv-primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-top: 2px;
}
.bv-linkage-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bv-linkage-link {
    font-weight: 600;
    color: var(--bv-text);
    text-decoration: underline;
    text-decoration-color: rgba(38, 70, 83, 0.25);
    text-underline-offset: 3px;
    font-size: 16px;
    line-height: 1.4;
    transition: color 0.15s;
}
.bv-linkage-link:hover {
    color: var(--bv-primary);
    text-decoration-color: var(--bv-primary);
}
.bv-linkage-cat {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bv-text-soft);
    font-weight: 600;
}





/* ─────────────────────────────────────────────────────────────
   BV-FIX-MENU-WRAP v4 — header full-width, logo collé à gauche
   ───────────────────────────────────────────────────────────── */
@media (min-width: 921px) {
    /* Header en pleine largeur */
    #masthead .ast-container,
    #masthead .site-primary-header-wrap {
        max-width: 1320px !important;
        width: 100% !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    /* Grid : logo collé à gauche, menu collé à droite, full-width */
    #masthead .ast-builder-grid-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
    }
    #masthead .site-header-primary-section-left {
        justify-content: flex-start !important;
        text-align: left !important;
        flex: 0 0 auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
    }
    #masthead .site-header-primary-section-right {
        justify-content: flex-end !important;
        flex: 0 0 auto !important;
        margin-left: auto !important;
        padding-right: 0 !important;
    }
    /* Titre du site reste sur 1 ligne */
    .site-title,
    .site-title a {
        white-space: nowrap !important;
    }
    .site-branding,
    .ast-site-identity {
        flex-shrink: 0 !important;
        text-align: left !important;
    }
    /* Menu : sur 1 ligne */
    .main-header-menu {
        flex-wrap: nowrap !important;
    }
    .main-header-menu > li,
    .main-navigation .main-nav-ul > li {
        white-space: nowrap;
    }
    .main-navigation .main-nav-ul > li > a {
        padding: 10px 12px;
    }
    .main-navigation .main-nav-ul > li.bv-menu-cta {
        margin-left: 8px;
    }
    .main-navigation .main-nav-ul > li.bv-menu-cta > a {
        padding: 9px 18px !important;
    }
}
