/* =========================================================
 * Page : Bilan patrimonial (one-page)
 * Cf. maquette maquettes/01-onepage.png
 * ========================================================= */

.bilan-patrimonial {
    --bp-navy: #0e2a3a;                       /* bleu marine profond du panneau hero */
    --bp-navy-strong: #08202d;
    --bp-title: #D9B898;                      /* beige doré : tous les titres éditoriaux */
    --bp-accent: #BB8E6E;                     /* cuivré : tab épinglé + submit */
    --bp-accent-hover: #a87a5d;
    --bp-sand: #D9B898;                       /* bandeau piliers */
    --bp-text: #004F64;                       /* corps de texte sur fond blanc */
    --bp-text-muted: rgba(0, 79, 100, 0.72);  /* variantes secondaires */
    --bp-rule: #e3dccf;

    color: var(--bp-text);
    font-family: "Raleway", system-ui, sans-serif;
    line-height: 1.55;
    background-color: #fff;
}

.bilan-patrimonial *,
.bilan-patrimonial *::before,
.bilan-patrimonial *::after {
    box-sizing: border-box;
}

.bp-container {
    max-width: 1368px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================================
 * Onglet épinglé "Mon patrimoine gratuit" (badge cuivré)
 * ========================================================= */
.bp-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: linear-gradient(to right, var(--bp-accent), var(--bp-sand));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 0 6px;
    box-shadow: 0 4px 14px rgba(14, 42, 58, 0.22);
    line-height: 1;
    text-shadow: 0 1px 2px rgba(14, 42, 58, 0.25);
    transition: filter .2s ease, box-shadow .2s ease, transform .15s ease;
    white-space: nowrap;
}

.bp-tab:hover,
.bp-tab:focus-visible {
    color: #fff;
    filter: brightness(0.95);
    box-shadow: 0 6px 18px rgba(14, 42, 58, 0.28);
    transform: translateY(-1px);
}

.bp-tab__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bp-tab--inline {
    align-self: flex-end;
    border-radius: 6px 0 0 6px;
    margin-bottom: 18px;
}

/* =========================================================
 * Boutons inline
 * ========================================================= */
.bp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color .2s ease, color .2s ease, transform .15s ease, filter .2s ease;
    font-size: 14px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    line-height: 1.2;
    cursor: pointer;
    align-self: flex-start;
    border: 1px solid transparent;
}

.bp-btn--primary {
    background-color: var(--bp-accent);
    color: #fff;
}

.bp-btn--primary:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

/* Bouton du hero : pastille sable, largeur intrinsèque */
.bp-hero .bp-btn--primary {
    background-color: #D9B898;
    color: #fff;
    border-color: transparent;
    border-radius: 0;
    align-self: flex-start;
    padding: 14px 36px;
    font-size: clamp(16px, 2vw, 23px);
    letter-spacing: 0.3px;
    text-transform: none;
    box-shadow: 0 4px 14px rgba(14, 42, 58, 0.18);
}

.bp-hero .bp-btn--primary:hover {
    background-color: #fff;
    color: #D9B898;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(14, 42, 58, 0.24);
}

.bp-btn__icon {
    display: inline-flex;
    align-items: center;
}

/* =========================================================
 * 1. HERO (split image + panneau bleu nuit)
 * ========================================================= */
.bp-hero {
    position: relative;
    margin-top: 138px;          /* compense la nav fixe (cf. .section--header de la home) */
    margin-bottom: 75px;
    min-height: 620px;
    color: #fff;
    overflow: hidden;
    background-color: var(--bp-navy-strong);
}

/* Image plein écran derrière tout, calée à gauche */
.bp-hero__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.bp-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    display: block;
}

/* Voile sur la moitié droite : #004F64 à 90% (équivalent du gradient cuivré de la home) */
.bp-hero::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 50vw;
    height: 100%;
    background-color: #004F64;
    opacity: 0.9;
    z-index: 1;
}

.bp-hero__container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 620px;
}

.bp-hero__column {
    width: 50%;
    padding: 70px 0 60px clamp(32px, 5vw, 80px);
}

.bp-hero__inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bp-hero__title {
    font-family: "Libre Bodoni", "Times New Roman", serif;
    font-weight: 400;
    color: var(--bp-title);
    font-size: clamp(30px, 4vw, 45px);
    line-height: 1.22;
    margin: 0;
    letter-spacing: 0.2px;
}

.bp-hero__subtitle {
    font-size: clamp(18px, 2.1vw, 25px);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
    margin-top: -4px;
    font-weight: 400;
}

/* WYSIWYG court au-dessus du bouton.
 * Mise en forme (gras / italique) gérée par l'éditeur ; le CSS ne force rien.
 * Séparateur 76×3 cuivré au-dessus. */
.bp-hero__pre-cta {
    position: relative;
    padding-top: 22px;
    font-size: clamp(15px, 1.7vw, 20px);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 400;
}

.bp-hero__pre-cta::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 76px;
    height: 3px;
    background-color: #BB8E6E;
}

.bp-hero__pre-cta p {
    margin: 0;
}

/* WYSIWYG riche sous le bouton (paragraphes + bullets + mention).
 * `.bp-hero__inner` a un `gap: 20px` ; on ajoute 20px ici pour atteindre
 * un écart total de 40px entre le bouton et ce bloc. */
.bp-hero__wysiwyg {
    font-size: clamp(15px, 1.7vw, 20px);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 20px;
}

.bp-hero__wysiwyg > *:first-child {
    margin-top: 0;
}

.bp-hero__wysiwyg > *:last-child {
    margin-bottom: 0;
}

.bp-hero__wysiwyg p {
    margin: 0 0 14px;
}

/* Pas d'espace entre un paragraphe et la liste qui suit immédiatement. */
.bp-hero__wysiwyg p:has(+ ul) {
    margin-bottom: 0;
}

.bp-hero__wysiwyg ul {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bp-hero__wysiwyg ul li {
    position: relative;
    padding-left: 18px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
}

.bp-hero__wysiwyg ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.6em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #fff;
}

/* Dernière ligne (mention / réassurance) : style "disclaimer" */
.bp-hero__wysiwyg p:last-child em,
.bp-hero__wysiwyg p em:only-child {
    display: block;
    padding-top: 14px;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}

/* =========================================================
 * TWO COLUMNS — fond blanc (audience+bénéfices / process+urgence)
 * ========================================================= */
.bp-twocols {
    background-color: #fff;
    padding: 0 0 60px;
}

.bp-twocols__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 5vw, 84px);
}

.bp-twocols__col {
    position: relative;
    display: flex;
    flex-direction: column;
}

.bp-twocols__title {
    font-family: "Libre Bodoni", "Times New Roman", serif;
    font-weight: 400;
    font-style: normal;
    color: var(--bp-title);
    font-size: clamp(28px, 3.8vw, 45px);
    line-height: 1.18;
    margin: 0 0 22px;
}

/* =========================================================
 * WYSIWYG — rendu unifié du contenu rédactionnel des colonnes
 * (paragraphes + listes à puces stylisées chevron beige)
 * ========================================================= */
.bp-wysiwyg {
    font-size: clamp(15px, 1.7vw, 20px);
    line-height: 1.6;
    color: var(--bp-text);
}

.bp-wysiwyg > *:first-child {
    margin-top: 0;
}

.bp-wysiwyg > *:last-child {
    margin-bottom: 0;
}

/* Sous-titres internes (ex. étapes du process) en serif italique beige */
.bp-wysiwyg h2,
.bp-wysiwyg h3,
.bp-wysiwyg h4 {
    font-family: "Libre Bodoni", "Times New Roman", serif;
    font-weight: 500;
    font-style: italic;
    color: var(--bp-title);
    line-height: 1.25;
    margin: 22px 0 6px;
}

.bp-wysiwyg h2 { font-size: clamp(20px, 2.4vw, 28px); }
.bp-wysiwyg h3 {
    font-size: clamp(18px, 2.1vw, 24px);
    font-style: normal;
}
.bp-wysiwyg h4 { font-size: clamp(16px, 1.8vw, 21px); }

.bp-wysiwyg p {
    margin: 0 0 16px;
    color: var(--bp-text);
}

/* Pas d'espace entre un paragraphe et la liste qui suit immédiatement. */
.bp-wysiwyg p:has(+ ul),
.bp-wysiwyg p:has(+ ol) {
    margin-bottom: 0;
}

.bp-wysiwyg a {
    color: var(--bp-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bp-wysiwyg a:hover {
    color: var(--bp-accent-hover);
}

.bp-wysiwyg strong {
    color: var(--bp-text);
    font-weight: 700;
}

.bp-wysiwyg em {
    font-style: italic;
}

.bp-wysiwyg ul {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bp-wysiwyg ul li {
    position: relative;
    padding-left: 22px;
    color: var(--bp-text);
    line-height: 1.55;
}

.bp-wysiwyg ul li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0.6em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #004F64;
}

.bp-wysiwyg ol {
    margin: 0 0 18px;
    padding-left: 22px;
    color: var(--bp-text);
}

.bp-wysiwyg ol li {
    margin-bottom: 8px;
    line-height: 1.55;
}

.bp-wysiwyg ol li::marker {
    color: var(--bp-title);
    font-weight: 700;
}

/* =========================================================
 * 6. PILIERS — bandeau sable
 * ========================================================= */
.bp-pillars {
    background: linear-gradient(to right, #BB8E6E, #D9B898);
    padding: clamp(52px, 6vw, 80px) 0;
    margin-top: 15px;
}

.bp-pillars__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.bp-pillars__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.bp-pillars__circle {
    width: 155px;
    height: 155px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(14, 42, 58, 0.12);
    color: var(--bp-text); /* hook pour les SVG en currentColor */
}

/* On laisse le SVG à sa taille intrinsèque, plafonnée à 90% de la bulle. */
.bp-pillars__circle svg {
    max-width: 90%;
    max-height: 90%;
    display: block;
}

.bp-pillars__label {
    font-family: "Libre Bodoni", "Times New Roman", serif;
    font-weight: 400;
    font-style: normal;
    font-size: clamp(18px, 2.4vw, 30px);
    color: #fff;
    line-height: 1.25;
    max-width: 260px;
}

/* =========================================================
 * 7. CONTACT — formulaire RDV
 * ========================================================= */
.bp-contact {
    background-color: #fff;
    padding: 75px 0 80px;
    scroll-margin-top: 138px;   /* aligne le scroll d'ancre sur la hauteur de nav */
}

.bp-contact__header {
    text-align: center;
    margin-bottom: 44px;
}

.bp-contact__title {
    font-family: "Libre Bodoni", "Times New Roman", serif;
    font-weight: 400;
    color: var(--bp-text);
    font-size: clamp(28px, 3.8vw, 45px);
    line-height: 1.2;
    margin: 0 0 16px;
}

.bp-contact__text {
    color: var(--bp-text-muted);
    font-size: clamp(15px, 1.7vw, 20px);
    line-height: 1.55;
}

.bp-contact__form {
    max-width: 911px;
    margin: 0 auto;
    position: relative;
}

/* --- Layout du markup .form / .form__row -------------------------------- */
.bp-contact__form .form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bp-contact__form .form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 75px;
    margin-bottom: 20px;
}

/* Pas d'espace sous la dernière row : elle est immédiatement suivie de
 * la mention RGPD (`.form__copyrights`). Override de la règle globale
 * `form .form__row { margin-bottom: 40px }` (assets/css/form.css). */
.bp-contact__form .form__row:has(+ .form__copyrights) {
    margin-bottom: 0;
}

.bp-contact__form .form__row .form__group,
.bp-contact__form .form__group {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.bp-contact__form .form__group--full {
    grid-column: 1 / -1;
}

/* --- Floating label -----------------------------------------------------
 * Au repos : le label se superpose à la zone de texte du champ (même
 * position que le placeholder).
 * Au focus ou si le champ a une valeur (classe `.has-value` posée en JS) :
 * le label remonte au-dessus + rétrécit.
 */
.bp-contact__form .form__group label {
    position: absolute;
    left: 0;
    top: 0;                     /* aligné sur le haut du champ */
    padding: 0;
    margin: 0;
    font-size: 20px;
    color: var(--bp-text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 51px;          /* aligne la baseline du label sur celle des inputs */
    pointer-events: none;
    transform-origin: left top;
    transition: transform .2s ease, color .2s ease;
    will-change: transform;
}

.bp-contact__form .form__group:focus-within > label,
.bp-contact__form .form__group.has-value > label {
    transform: translateY(-18px) scale(0.7);
    color: var(--bp-accent);
}

.bp-contact__form .form__group label span {
    color: var(--bp-accent);
    margin-left: 2px;
}

.bp-contact__form .wpcf7-form-control-wrap {
    display: block;
}

/* Tant que le label n'a pas remonté, on masque le placeholder pour éviter
 * la superposition visuelle. Il réapparaît dès que le label est levé. */
.bp-contact__form .form__group:not(:focus-within):not(.has-value) .wpcf7-form-control::placeholder {
    color: transparent;
}

.bp-contact__form .wpcf7-form-control:not(.wpcf7-submit) {
    width: 100%;
    padding: 0;
    border: none;
    border-bottom: 1px solid var(--bp-rule);
    border-radius: 0;
    font-family: inherit;
    font-size: 20px;
    background-color: transparent;
    color: var(--bp-text);
    transition: border-color .15s ease;
}

.bp-contact__form .wpcf7-form-control::placeholder {
    font-size: 20px;
    color: var(--bp-text-muted);
    opacity: 0.7;
}

.bp-contact__form .wpcf7-form-control:not(.wpcf7-submit):focus {
    outline: none;
    border-bottom-color: var(--bp-accent);
}

/* Spécificité explicite via `:not(.wpcf7-submit)` pour battre la règle
 * générique `.bp-contact__form .wpcf7-form-control:not(.wpcf7-submit)` qui
 * pose `padding: 0`. */
.bp-contact__form textarea.wpcf7-form-control:not(.wpcf7-submit) {
    min-height: 110px;
    resize: none;
    padding-top: 10px;
}

.bp-contact__form .wpcf7-not-valid-tip {
    font-size: 14px;
    color: #c0392b;
    margin-top: 6px;
}

/* --- Mention RGPD centrée sous le message ------------------------------- */
.bp-contact__form .form__copyrights {
    margin: 35px auto 0;
    max-width: 760px;
    text-align: center;
    font-size: 10px;
    line-height: 1.6;
    color: var(--bp-text-muted);
}

.bp-contact__form .form__copyrights p {
    margin: 0;
}

/* --- Bouton centré ------------------------------------------------------
 * Le form.css global pose `flex-direction: column; align-items: flex-start;`
 * sur .form__controls, ce qui décale le bouton à gauche : on rétablit ici un
 * centrage horizontal explicite.
 */
.bp-contact__form .form__controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-top: 35px;
}

.bp-contact__form .form__btns {
    position: relative;
}

.bp-contact__form .btn--submit {
    position: relative;
    display: inline-block;
    background: var(--bp-accent);
    border-radius: 0;
    overflow: hidden;
    transition: filter .2s ease, transform .15s ease, box-shadow .2s ease;
}

/* Override de `form .form__controls .btn--submit:hover` défini dans
 * assets/css/form.css : on remonte à `.form__controls` pour égaler/dépasser
 * sa spécificité (0,3,1) et imposer le fond navy + texte blanc. */
.bp-contact__form .form__controls .btn--submit:hover {
    background: #004F64;
    box-shadow: none;
    transform: none;
}

.bp-contact__form .form__controls .btn--submit:hover .wpcf7-submit,
.bp-contact__form .form__controls .btn--submit:hover input {
    color: #fff;
}

.bp-contact__form .btn--submit > span {
    display: block;
}

.bp-contact__form .wpcf7-submit {
    /* `appearance: none` retire le rendu natif Safari/iOS sur <input type="submit">. */
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    color: #fff;
    border: none;
    padding: 14px 42px;
    font-weight: 600;
    font-size: 23px;
    letter-spacing: 0.3px;
    text-transform: none;
    border-radius: 0;
    cursor: pointer;
    font-family: inherit;
    min-width: 240px;
    line-height: 1.2;
}

.bp-contact__form .wpcf7-submit:disabled {
    cursor: progress;
    color: transparent;   /* on cache le label, le loader prend la place */
}

/* --- Loader custom (anneau qui tourne) --------------------------------- */
.bp-contact__form .btn--submit::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.bp-contact__form.is-submitting .btn--submit {
    pointer-events: none;
    filter: none;
}

.bp-contact__form.is-submitting .btn--submit::after {
    opacity: 1;
    animation: bpSpin .7s linear infinite;
}

@keyframes bpSpin {
    to { transform: rotate(360deg); }
}

/* --- Spinner natif CF7 : on le neutralise (le nôtre prend la main) ----- */
.bp-contact__form .wpcf7-spinner {
    display: none !important;
}

/* --- Message de réponse ------------------------------------------------- */
.bp-contact__form .wpcf7-response-output {
    margin: 24px 0 0 !important;
    padding: 16px 20px !important;
    border: none !important;
    border-left: 3px solid var(--bp-accent) !important;
    background: rgba(187, 142, 110, 0.08);
    color: #004F64 !important;
    font-size: 20px;
    line-height: 1.5;
    text-align: center;
    border-radius: 0 4px 4px 0;
}

/* État d'erreur (validation, spam, échec d'envoi) — message en rouge.
 * CF7 expose deux jeux de classes selon la version : .invalid/.failed/.spam
 * ainsi que data-status="invalid|failed|spam". On couvre les deux.
 */
.bp-contact__form form.invalid .wpcf7-response-output,
.bp-contact__form form.failed .wpcf7-response-output,
.bp-contact__form form.spam .wpcf7-response-output,
.bp-contact__form form.unaccepted .wpcf7-response-output,
.bp-contact__form form.payment-required .wpcf7-response-output,
.bp-contact__form form[data-status="invalid"] .wpcf7-response-output,
.bp-contact__form form[data-status="failed"] .wpcf7-response-output,
.bp-contact__form form[data-status="spam"] .wpcf7-response-output {
    color: #c0392b !important;
    border-left-color: #c0392b !important;
    background: rgba(192, 57, 43, 0.06);
}

/* --- État succès : on masque les champs du formulaire, on garde le message
 * `.wpcf7-response-output` est un enfant direct de `<form class="wpcf7-form">`,
 * donc masquer le `<form>` masque aussi le message. On cache uniquement les
 * autres enfants directs (champs, controls, copyrights, spinners…).
 */
.bp-contact__form.is-sent .wpcf7-form > *:not(.wpcf7-response-output) {
    display: none !important;
}

.bp-contact__form.is-sent .wpcf7-response-output {
    margin: 0 !important;
    padding: 28px 24px !important;
    font-size: 20px;
    border-left-width: 4px !important;
    background: rgba(187, 142, 110, 0.1);
}

/* =========================================================
 * Responsive
 * ========================================================= */
@media (max-width: 1024px) {
    .bp-hero {
        margin-top: 80px;
        min-height: 0;
        display: flex;
        flex-direction: column-reverse;
    }

    .bp-hero__image {
        position: relative;
        width: 100%;
        height: 350px;
    }

    .bp-hero::after {
        width: 100%;
        height: calc(100% - 350px);
    }

    .bp-hero__container {
        min-height: 0;
        justify-content: center;
    }

    .bp-hero__column {
        width: 100%;
        padding: 64px 0;
    }

    .bp-twocols__grid {
        grid-template-columns: 1fr;
    }

    .bp-tab--inline {
        align-self: flex-start;
        border-radius: 6px;
        margin-bottom: 18px;
    }

    .bp-pillars__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .bp-contact__form .form__row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Override de `form .form__row .form__group:nth-child(1) { margin: 0 0 40px 0 }`
     * défini dans assets/css/form.css en max-width: 900px. */
    .bp-contact__form .form__row .form__group:nth-child(1) {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .bp-pillars__grid {
        grid-template-columns: 1fr;
    }
    .bp-btn {
        width: 100%;
    }
}
