/* Partivest V2 — page d'accueil (thème apex). Tout est scopé sous .pvh.
   Thème clair par défaut ; :root[data-theme="dark"] redéfinit les jetons pour le mode nuit. */

.pvh {
    --p-paper: #F5FAFD;
    --p-card: #FFFFFF;
    --p-ink: #10243A;
    --p-ink-2: #3D5269;          /* texte secondaire, 8:1 sur papier */
    --p-ink-3: #5A6E84;          /* notes, 5:1 */
    --p-line: #D6E6F0;
    --p-line-2: #B9CFDE;
    --p-leaf: #4FD18B;
    --p-leaf-ink: #13995A;       /* contours et grands textes (3,5:1) */
    --p-leaf-text: #0B7A45;      /* petit texte vert (5,1:1) */
    --p-leaf-tint: #E4F8EE;
    --p-ember: #F2A365;
    --p-ember-hover: #E99550;
    --p-ember-text: #B04A12;     /* petit texte orange (5:1) */
    --p-ember-tint: #FFF0E6;
    --p-sky: #7CCBF5;
    --p-sky-ink: #1C8DD6;
    --p-sky-text: #1572B0;       /* petit texte bleu (4,9:1) */
    --p-sky-tint: #E6F4FC;
    --p-bear: #10243A;
    --p-btn-ink: #10243A;
    --p-final-bg: #10243A;
    --p-final-ink: #F5FAFD;
    --p-final-mute: #B9C9D8;
    --p-shadow: 0 1px 0 rgba(16, 36, 58, .04), 0 28px 56px -36px rgba(16, 36, 58, .38);

    background: var(--p-paper);
    color: var(--p-ink);
    font-family: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    font-feature-settings: 'kern' 1;
    overflow-x: clip;
}

:root[data-theme="dark"] .pvh {
    --p-paper: var(--ax-ink, #05070C);
    --p-card: var(--ax-surface, #0C111C);
    --p-ink: #EAF2F8;
    --p-ink-2: #B4C3D2;
    --p-ink-3: #94A6B8;
    --p-line: rgba(255, 255, 255, .1);
    --p-line-2: rgba(255, 255, 255, .2);
    --p-leaf-ink: #4FD18B;
    --p-leaf-text: #5FDC97;
    --p-leaf-tint: rgba(79, 209, 139, .12);
    --p-ember: #D99A6C;
    --p-ember-hover: #C9895B;
    --p-ember-text: #E8B08A;
    --p-ember-tint: rgba(217, 154, 108, .12);
    --p-sky-ink: #7CCBF5;
    --p-sky-text: #8ED3F7;
    --p-sky-tint: rgba(124, 203, 245, .1);
    --p-bear: #C9D6E3;
    --p-final-bg: var(--ax-surface, #0C111C);
    --p-final-ink: #EAF2F8;
    --p-final-mute: #A7B6C6;
    --p-shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 30px 60px -30px rgba(0, 0, 0, .8);
}

.pvh *, .pvh *::before, .pvh *::after { box-sizing: border-box; }
/* Remises à zéro sans spécificité, pour que les classes de composant l'emportent toujours. */
:where(.pvh) a { color: inherit; }
:where(.pvh) :is(h1, h2, h3) { color: var(--p-ink); font-family: inherit; margin: 0; }
:where(.pvh) p { margin: 0; }
:where(.pvh) :is(ul, ol) { margin: 0; padding: 0; list-style: none; }
:where(.pvh) figure { margin: 0; }
.pvh :focus-visible { outline: 3px solid var(--p-sky-ink); outline-offset: 3px; border-radius: 4px; }

.pvh-wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .pvh-wrap { padding-inline: 32px; } }

/* ── Typographie ─────────────────────────────────────────────── */
.pvh-h1 {
    font-size: clamp(2.25rem, 1.35rem + 3.6vw, 4.1rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.035em;
    text-wrap: balance;
    max-width: 15ch;
}
.pvh-h2 {
    font-size: clamp(1.75rem, 1.25rem + 1.8vw, 2.6rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.028em;
    text-wrap: balance;
    max-width: 22ch;
}
.pvh h3 { font-size: 1.1875rem; font-weight: 700; line-height: 1.25; letter-spacing: -.012em; }
.pvh-lead { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); color: var(--p-ink-2); max-width: 46ch; margin-top: 22px; }
.pvh-sub { color: var(--p-ink-2); max-width: 58ch; margin-top: 14px; }
.pvh-body { color: var(--p-ink-2); max-width: 58ch; margin-top: 14px; }
.pvh-note { color: var(--p-ink-3); font-size: .875rem; line-height: 1.5; }

/* ── Boutons et liens ────────────────────────────────────────── */
.pvh-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 50px; padding: 0 24px;
    border-radius: 10px; border: 1.5px solid transparent;
    font-size: 1rem; font-weight: 600; line-height: 1.2; letter-spacing: -.005em;
    text-decoration: none; text-align: center;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pvh-btn--primary { background: var(--p-ember); color: var(--p-btn-ink); }
.pvh-btn--primary:hover { background: var(--p-ember-hover); color: var(--p-btn-ink); }
:root[data-theme="dark"] .pvh-btn--primary { background: var(--ax-accent, #D4A64A); color: #1A1206; }
:root[data-theme="dark"] .pvh-btn--primary:hover { background: #C2963F; color: #1A1206; }
.pvh-btn--ghost { border-color: var(--p-ink); color: var(--p-ink); background: transparent; }
.pvh-btn--ghost:hover { background: var(--p-ink); color: var(--p-paper); }

.pvh-link {
    display: inline-flex; align-items: center; min-height: 44px;
    font-weight: 600; color: var(--p-ink);
    text-decoration: underline; text-decoration-color: var(--p-leaf-ink);
    text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.pvh-link:hover { color: var(--p-leaf-text); }

/* ── Sections ────────────────────────────────────────────────── */
.pvh-sec { padding-block: clamp(64px, 8vw, 116px); }
.pvh-sec--tight { padding-block: clamp(48px, 6vw, 80px); }
.pvh-sec--card { background: var(--p-card); border-block: 1px solid var(--p-line); }
.pvh-head { margin-bottom: clamp(32px, 4vw, 52px); }

/* Engagements */
.pvh-pledges { display: grid; margin-top: clamp(28px, 4vw, 44px); }
.pvh-pledges li { padding: 16px 0; border-bottom: 1px solid var(--p-line); }
.pvh-pledges li:last-child { border-bottom: 0; }
.pvh .pvh-pledge-title { font-size: 1.0625rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.pvh-pledges p { color: var(--p-ink-2); font-size: .9375rem; margin-top: 4px; max-width: 40ch; }
@media (min-width: 768px) {
    .pvh-pledges { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
    .pvh-pledges li { border-bottom: 0; padding: 0; }
}

/* ── Graphiques SVG ──────────────────────────────────────────── */
.pvh-grid line { stroke: var(--p-line); stroke-width: 1; }
.pvh-c-up line { stroke: var(--p-leaf-ink); stroke-width: 1.4; }
.pvh-c-up rect { fill: var(--p-leaf); stroke: var(--p-leaf-ink); stroke-width: 1; }
.pvh-c-dn line { stroke: var(--p-bear); stroke-width: 1.4; }
.pvh-c-dn rect { fill: var(--p-bear); stroke: var(--p-bear); stroke-width: 1; }
.pvh-zone { fill: var(--p-sky); fill-opacity: .28; stroke: var(--p-sky-ink); stroke-width: 1; stroke-dasharray: 4 3; }
.pvh-box-risk { fill: var(--p-ember); fill-opacity: .12; }
.pvh-box-gain { fill: var(--p-leaf); fill-opacity: .14; }
.pvh-l-target { stroke: var(--p-leaf-ink); stroke-width: 1.5; }
.pvh-l-entry { stroke: var(--p-ink); stroke-width: 1.5; stroke-dasharray: 5 4; }
.pvh-l-stop { stroke: var(--p-ember); stroke-width: 1.5; }
.pvh-tag text { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pvh-tag--target rect { fill: var(--p-leaf); }
.pvh-tag--target text { fill: #10243A; }
.pvh-tag--entry rect { fill: var(--p-ink); }
.pvh-tag--entry text { fill: var(--p-paper); }
.pvh-tag--stop rect { fill: var(--p-ember); }
.pvh-tag--stop text { fill: #10243A; }
.pvh-t-label { font-size: 12px; font-weight: 600; fill: var(--p-ink); }
.pvh-t-muted { font-size: 11.5px; font-weight: 500; fill: var(--p-ink-2); }
.pvh-reached rect { fill: var(--p-leaf); }
.pvh-reached text { font-size: 11.5px; font-weight: 700; fill: #10243A; }
.pvh-card rect { fill: var(--p-card); stroke: var(--p-line-2); }
.pvh-card circle { fill: var(--p-leaf); }
.pvh-card-title { font-size: 12px; font-weight: 700; fill: var(--p-ink); }
.pvh-card-side { font-size: 12px; font-weight: 600; fill: var(--p-leaf-text); }
.pvh-card-meta { font-size: 11px; fill: var(--p-ink-3); font-variant-numeric: tabular-nums; }

/* Méthode : graphique annoté */
.pvh-process { display: grid; gap: 40px; align-items: start; }
@media (min-width: 992px) { .pvh-process { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; } }
.pvh-proc-chart { border: 1px solid var(--p-line); border-radius: 14px; background: var(--p-paper); padding: 12px 12px 14px; }
.pvh-proc-chart .pvh-note { padding: 10px 6px 0; }
.pvh-stroke { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pvh-zig { stroke: var(--p-sky-ink); stroke-width: 2.2; }
.pvh-ring { stroke: var(--p-ink); stroke-width: 1.8; stroke-dasharray: none; }
.pvh-m circle { fill: var(--p-paper); stroke: var(--p-ink); stroke-width: 1.6; }
.pvh-m text { font-size: 13px; font-weight: 700; fill: var(--p-ink); }
@media (max-width: 575.98px) {
    .pvh-proc-chart { padding: 8px 4px 10px; }
    .pvh-m-label { display: none; }
    .pvh-m { transform-box: fill-box; transform-origin: center; transform: scale(1.7); }
}

/* Dessin unique à l'entrée dans l'écran (uniquement quand le script a armé la figure). */
.pvh-proc-chart.is-armed .pvh-step > :not(.pvh-stroke) { opacity: 0; }
.pvh-proc-chart.is-armed .pvh-stroke { stroke-dasharray: 1; stroke-dashoffset: 1; }
.pvh-proc-chart.is-drawn .pvh-step > :not(.pvh-stroke) { opacity: 1; transition: opacity .5s ease calc(var(--d) + .35s); }
.pvh-proc-chart.is-drawn .pvh-stroke { stroke-dashoffset: 0; transition: stroke-dashoffset .8s cubic-bezier(.4, 0, .2, 1) var(--d); }

.pvh-steps { display: grid; gap: 4px; counter-reset: none; }
.pvh-steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-top: 1px solid var(--p-line); }
.pvh-steps li:first-child { border-top: 0; padding-top: 4px; }
.pvh-step-n {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    border: 1.6px solid var(--p-ink); font-weight: 700; font-size: .9375rem; font-variant-numeric: tabular-nums;
}
.pvh-steps p { color: var(--p-ink-2); margin-top: 6px; font-size: 1rem; }

/* ── Journal ─────────────────────────────────────────────────── */
.pvh-journal { border: 1px solid var(--p-line-2); border-radius: 14px; background: var(--p-card); overflow: hidden; }
.pvh-journal-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
    padding: 14px 18px; border-bottom: 1px solid var(--p-line); background: var(--p-sky-tint);
}
.pvh-journal-bar p { font-size: .875rem; color: var(--p-ink-2); }
.pvh-badge {
    display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 6px;
    background: var(--p-ink); color: var(--p-paper); font-size: .8125rem; font-weight: 700;
}
.pvh-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.pvh-table th, .pvh-table td { padding: 14px 18px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--p-line); color: var(--p-ink); }
.pvh-table thead th { font-size: .8125rem; font-weight: 600; color: var(--p-ink-3); background: transparent; white-space: nowrap; }
.pvh-table tbody tr:last-child > * { border-bottom: 0; }
.pvh-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pvh-table .c-time { font-variant-numeric: tabular-nums; color: var(--p-ink-2); white-space: nowrap; }
.pvh-table .c-market { font-weight: 700; }
.pvh-table .c-side--buy { color: var(--p-leaf-text); font-weight: 600; }
.pvh-table .c-side--sell { color: var(--p-ember-text); font-weight: 600; }
.pvh-table .c-res { font-weight: 700; }
.pvh-table .c-res--up { color: var(--p-leaf-text); }
.pvh-table .c-res--down { color: var(--p-ember-text); }
.pvh-status { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: .8125rem; font-weight: 600; white-space: nowrap; border: 1px solid var(--p-line-2); color: var(--p-ink-2); }
.pvh-status--tp { background: var(--p-leaf-tint); border-color: transparent; color: var(--p-leaf-text); }
.pvh-status--sl { background: var(--p-ember-tint); border-color: transparent; color: var(--p-ember-text); }
.pvh-status--active { background: var(--p-sky-tint); border-color: transparent; color: var(--p-sky-text); }

@media (max-width: 767.98px) {
    .pvh-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .pvh-table, .pvh-table tbody, .pvh-table tr { display: block; width: 100%; }
    .pvh-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 16px; padding: 16px; border-bottom: 1px solid var(--p-line); }
    .pvh-table tbody tr:last-child { border-bottom: 0; }
    .pvh-table th, .pvh-table td { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 0; border: 0; text-align: right; }
    .pvh-table th::before, .pvh-table td::before { content: attr(data-label); font-size: .8125rem; font-weight: 500; color: var(--p-ink-3); text-align: left; }
    .pvh-table .c-time, .pvh-table .c-market { grid-column: 1 / -1; }
    .pvh-table .c-market { order: -1; font-size: 1.0625rem; justify-content: flex-start; }
    .pvh-table .c-market::before { display: none; }
    .pvh-table .c-time { order: -1; border-bottom: 1px solid var(--p-line); padding-bottom: 10px; margin-bottom: 4px; }
}
@media (max-width: 767.98px) {
    .pvh-table td { flex-wrap: wrap; }
}
@media (max-width: 359.98px) {
    .pvh-table tr { grid-template-columns: minmax(0, 1fr); }
}

/* ── Offres ──────────────────────────────────────────────────── */
.pvh-prices { border-top: 1px solid var(--p-ink); }
.pvh-prices li { display: grid; gap: 10px 40px; padding: 22px 0; border-bottom: 1px solid var(--p-line); }
.pvh-price-name { display: grid; gap: 4px; }
.pvh-price-name strong { font-size: 1.22rem; font-weight: 700; letter-spacing: -.015em; }
.pvh-price-name span { color: var(--p-ink-2); max-width: 62ch; }
.pvh-price-amount { color: var(--p-ink-2); }
.pvh-price-amount b { font-family: 'Martian Mono', ui-monospace, Consolas, monospace; font-size: 1.3rem; font-weight: 500; letter-spacing: -.07em; color: var(--p-ink); }
.pvh-price-amount small { display: block; font-size: .875rem; font-weight: 600; color: var(--p-leaf-text); }
@media (min-width: 768px) { .pvh-prices li { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } .pvh-price-amount { text-align: right; } }
.pvh-after { margin-top: 24px; }
.pvh-table .c-market a { color: inherit; text-decoration: underline; text-decoration-color: var(--p-line-2); text-underline-offset: 4px; }

/* ── Desk ────────────────────────────────────────────────────── */
.pvh-split { display: grid; gap: 40px; align-items: start; }
@media (min-width: 992px) { .pvh-split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 72px; } }
.pvh-criteria { border-left: 3px solid var(--p-leaf); padding: 4px 0 4px 24px; }
.pvh-criteria ul { margin-top: 16px; display: grid; gap: 14px; }
.pvh-criteria li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: var(--p-ink); }
.pvh-criteria svg { width: 20px; height: 20px; margin-top: 3px; fill: none; stroke: var(--p-leaf-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pvh-criteria .pvh-note { margin-top: 22px; }

/* ── Prop firm ───────────────────────────────────────────────── */
.pvh-offers { display: grid; gap: 0; border-top: 1px solid var(--p-ink); }
.pvh-offer { padding: 24px 0; }
.pvh-offer + .pvh-offer { border-top: 1px solid var(--p-line); }
.pvh-offer h3 { font-size: 1.375rem; }
.pvh-offer p { color: var(--p-ink-2); margin-top: 8px; max-width: 48ch; }
@media (min-width: 768px) {
    .pvh-offers { grid-template-columns: 1fr 1fr; }
    .pvh-offer { padding: 28px 40px 28px 0; }
    .pvh-offer + .pvh-offer { border-top: 0; border-left: 1px solid var(--p-line); padding-left: 40px; }
}
.pvh-offers--one { grid-template-columns: minmax(0, 1fr) !important; }
.pvh-warning {
    display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 14px;
    margin: 12px 0 32px; padding: 18px 20px; border-radius: 12px;
    background: var(--p-ember-tint); color: var(--p-ink);
}
.pvh-warning svg { width: 24px; height: 24px; fill: none; stroke: var(--p-ember-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pvh-warning h3 { font-size: 1rem; }
.pvh-warning p { margin-top: 4px; font-size: .9375rem; color: var(--p-ink); max-width: 75ch; }

/* ── Investisseurs ───────────────────────────────────────────── */
.pvh-invest {
    display: grid; gap: 24px; align-items: end;
    padding: clamp(24px, 4vw, 40px); border: 1px solid var(--p-line-2); border-radius: 14px; background: var(--p-card);
}
@media (min-width: 768px) { .pvh-invest { grid-template-columns: minmax(0, 1fr) auto; gap: 48px; } }
.pvh-risk { margin-top: 16px; font-size: .9375rem; color: var(--p-ink-2); max-width: 64ch; padding-left: 14px; border-left: 2px solid var(--p-ember); }

/* ── FAQ ─────────────────────────────────────────────────────── */
.pvh-faq { display: grid; gap: 28px; }
.pvh-faq .pvh-link { margin-top: 12px; }
@media (min-width: 992px) { .pvh-faq { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; } }
.pvh-faq-list { border-top: 1px solid var(--p-line-2); }
.pvh-faq-list details { border-bottom: 1px solid var(--p-line); }
.pvh-faq-list summary {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    min-height: 60px; padding: 14px 0; cursor: pointer; list-style: none;
    font-size: 1.0625rem; font-weight: 600; line-height: 1.35;
}
.pvh-faq-list summary::-webkit-details-marker { display: none; }
.pvh-faq-list summary::after {
    content: ''; flex: none; width: 14px; height: 14px;
    background:
        linear-gradient(var(--p-ink), var(--p-ink)) center / 14px 2px no-repeat,
        linear-gradient(var(--p-ink), var(--p-ink)) center / 2px 14px no-repeat;
    transition: transform .2s ease;
}
.pvh-faq-list details[open] summary::after { transform: rotate(45deg); }
.pvh-faq-list details p { padding: 0 0 20px; color: var(--p-ink-2); max-width: 64ch; }

/* ── Appel final ─────────────────────────────────────────────── */
.pvh-final { background: var(--p-final-bg); color: var(--p-final-ink); padding-block: clamp(64px, 8vw, 112px); }
:root[data-theme="dark"] .pvh-final { border-top: 1px solid var(--p-line); }
.pvh-final .pvh-h2 { color: var(--p-final-ink); max-width: 20ch; }
.pvh-final .pvh-sub { color: var(--p-final-mute); }
.pvh-final .pvh-btn { margin-top: 28px; }
.pvh-final :focus-visible { outline-color: var(--p-sky); }
.pvh-disclaimer { margin-top: clamp(48px, 6vw, 72px); padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .16); max-width: 82ch; }
.pvh-disclaimer h3 { color: var(--p-final-ink); font-size: .9375rem; }
.pvh-disclaimer p { color: var(--p-final-mute); font-size: .875rem; line-height: 1.6; margin-top: 6px; }

/* ── Mobile : boutons pleine largeur ─────────────────────────── */
@media (max-width: 575.98px) {
    .pvh-actions { flex-direction: column; }
    .pvh .pvh-btn { width: 100%; }
    .pvh-actions > * { width: 100%; }
}

/* ── Moment orchestré du chargement : titre puis graphique ───── */
@media (prefers-reduced-motion: no-preference) {
    html.ax-motion .pvh-in { animation: pvh-rise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--n, 0) * 110ms + 80ms); }
    html.ax-motion .pvh-in-frame { animation: pvh-frame 1s cubic-bezier(.2, .7, .2, 1) .3s both; }
}
@keyframes pvh-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pvh-frame {
    from { opacity: 0; transform: translateY(18px); clip-path: inset(0 0 22% 0 round 14px); }
    to { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 14px); }
}
