/* ============================================================
   Landing Fineas — « L'euro qui voyage »
   Structure narrative, DA Fineas : tokens UI-Kit uniquement
   (violet, Poppins/Barlow, rayons, ombres, dégradés).
   ============================================================ */

html {
    scroll-behavior: smooth;
}

body.landing-page {
    --lp-gutter: clamp(20px, 5vw, 64px);
    --lp-header: 84px;

    display: block !important;
    height: auto !important;
    min-height: 100vh;
    padding: 0 !important;
    overflow-x: clip;
    overflow-y: auto !important;
    color: var(--text-primary);
    background: var(--bg-body) !important;
    font-family: var(--font-body);
    font-size: var(--text-base-size);
    line-height: 1.6;
}

.landing-page::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    content: '';
    background:
        radial-gradient(circle at 8% 5%, var(--color-primary-glow), transparent 28%),
        radial-gradient(circle at 92% 38%, rgba(var(--base-color-for-secondary-glow), .18), transparent 26%),
        var(--bg-body);
}

.landing-page main {
    display: block !important;
}

.landing-page ul,
.landing-page ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.landing-page .lp-actions .btn,
.landing-page .lp-nav .btn {
    min-height: 44px;
}

/* ── En-tête ─────────────────────────────────────────────── */

.lp-header {
    position: fixed;
    z-index: 20;
    top: 0;
    left: 0;
    right: 0;
    height: var(--lp-header);
    padding-inline: var(--lp-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--border-light);
    background: rgba(30, 31, 47, .88);
    backdrop-filter: blur(12px);
}

.lp-brand {
    display: inline-flex !important;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-family: var(--font-brand);
    font-size: 1.25rem;
    font-weight: 700;
}

.lp-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.lp-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.lp-nav > a:not(.btn) {
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: .86rem;
    font-weight: 500;
    transition: color var(--duration-fast) var(--easing-default);
}

.lp-nav > a:not(.btn):hover {
    color: var(--text-primary);
}

/* ── Hero narratif ───────────────────────────────────────── */

.journey {
    position: relative;
}

.journey__stage {
    position: sticky;
    top: 0;
    height: 100svh;
    overflow: hidden;
    padding: calc(var(--lp-header) + 8px) var(--lp-gutter) 36px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: clamp(12px, 2vw, 32px);
}

.journey__spawn {
    position: absolute;
    left: -12vw;
    top: 52%;
    width: 1px;
    height: 1px;
}

.journey__rail {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding-left: 4%;
}

.journey__beam {
    position: absolute;
    left: -8%;
    right: -6%;
    top: 52%;
    height: 2px;
    border-radius: var(--radius-pill);
    background: var(--border-light);
    overflow: hidden;
    pointer-events: none;
}

.journey__beam-fill {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: var(--gradient-primary);
    box-shadow: 0 0 16px var(--color-primary-glow);
}

.journey__node {
    position: relative;
    z-index: 2;
    width: min(186px, 22%);
    opacity: .38;
    transform: scale(.92);
    filter: saturate(.55);
    transition:
        opacity .45s var(--easing-smooth),
        transform .45s var(--easing-smooth),
        filter .45s var(--easing-smooth);
}

.journey__node.is-reached {
    opacity: 1;
    transform: scale(1);
    filter: none;
}

.journey__node.is-current {
    transform: scale(1.06);
    z-index: 3;
}

.journey__node-index {
    display: block;
    margin-bottom: 10px;
    color: var(--text-hint);
    font-family: var(--font-display);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .18em;
}

.journey__node.is-reached .journey__node-index {
    color: var(--color-primary-light);
}

.journey__card,
.journey__pockets {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-2xl);
    background:
        linear-gradient(165deg, rgba(255,255,255,.07), transparent 42%),
        var(--bg-card);
    box-shadow: var(--shadow-lg);
}

.journey__node.is-reached .journey__card,
.journey__node.is-reached .journey__pockets {
    border-color: var(--color-primary-light);
    box-shadow:
        var(--shadow-2xl),
        0 0 0 1px rgba(157, 107, 255, .25),
        0 0 36px var(--color-primary-glow);
}

.journey__card {
    min-height: 148px;
    padding: 20px 18px 18px;
    display: grid;
    align-content: end;
    gap: 4px;
}

.journey__card strong {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.journey__card b {
    color: var(--text-secondary);
    font-size: .78rem;
    font-weight: 600;
}

.journey__card small {
    color: var(--text-dim);
    font-size: .7rem;
}

.journey__card-chip {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 28px;
    height: 20px;
    border-radius: 4px;
    background: var(--gradient-primary);
    box-shadow: 0 0 12px var(--color-primary-glow);
}

.journey__card .fa-wand-magic-sparkles {
    position: absolute;
    top: 18px;
    left: 18px;
    color: var(--color-primary-light);
    font-size: 1.05rem;
}

.journey__scan {
    position: absolute;
    inset: 0 auto 0 0;
    width: 38%;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .22), transparent);
    opacity: 0;
}

.journey__node--ai.is-current .journey__scan {
    opacity: 1;
    animation: lp-scan 1.6s linear infinite;
}

@keyframes lp-scan {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(280%); }
}

.journey__pockets {
    min-height: 148px;
    padding: 16px 14px;
    display: grid;
    gap: 8px;
}

.journey__pockets span {
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    background: var(--bg-subtle-hover);
    font-size: .78rem;
    font-weight: 600;
    transform: translateX(-6px);
    opacity: .5;
    transition: transform .4s var(--easing-smooth) var(--pocket-delay, 0s), opacity .4s var(--easing-smooth) var(--pocket-delay, 0s);
}

.journey__pockets span:nth-child(2) { --pocket-delay: .08s; }
.journey__pockets span:nth-child(3) { --pocket-delay: .16s; }

.journey__node.is-reached .journey__pockets span {
    transform: none;
    opacity: 1;
}

.journey__node--envelopes > small {
    display: block;
    margin-top: 10px;
    color: var(--text-dim);
    font-size: .7rem;
}

.journey__node--life .journey__card strong {
    color: var(--color-success-light);
}

.journey__brand {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    z-index: 2;
    padding-right: 8px;
    opacity: .28;
    filter: saturate(.4);
    transform: translateX(8px);
    transition:
        opacity .7s var(--easing-smooth),
        filter .7s var(--easing-smooth),
        transform .7s var(--easing-smooth);
}

.journey.is-complete .journey__brand,
.journey--static .journey__brand {
    opacity: 1;
    filter: none;
    transform: none;
}

.journey__brand-kicker {
    margin: 0 0 10px;
    color: var(--color-primary-light);
    font-family: var(--font-heading);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.journey__title {
    margin: 0;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: clamp(3.4rem, 8vw, 7.2rem);
    font-weight: 700;
    line-height: .92;
    letter-spacing: -.05em;
    transition: color .5s var(--easing-smooth), text-shadow .5s var(--easing-smooth);
}

.journey.is-complete .journey__title,
.journey--static .journey__title {
    color: #fff;
    text-shadow:
        0 0 12px rgba(196, 181, 253, .95),
        0 0 28px rgba(157, 107, 255, .85),
        0 0 64px rgba(157, 107, 255, .55),
        0 0 110px rgba(75, 192, 192, .35);
}

.journey.is-complete .journey__title {
    animation: lp-neon .9s var(--easing-smooth);
}

@keyframes lp-neon {
    0% { text-shadow: none; filter: brightness(.6); }
    40% { text-shadow: 0 0 8px #fff, 0 0 40px var(--color-primary), 0 0 80px var(--color-teal); }
    100% { filter: none; }
}

.journey__lead {
    margin: 18px 0 0;
    max-width: 22ch;
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.5;
}

.lp-close h2 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.journey__coin {
    position: absolute;
    z-index: 6;
    top: 0;
    left: 0;
    width: 72px;
    height: 72px;
    margin: -36px 0 0 -36px;
    pointer-events: none;
    will-change: transform;
}

.journey__coin-halo {
    position: absolute;
    inset: -10px;
    border: 2px dashed var(--color-primary-light);
    border-radius: 50%;
    opacity: .85;
    animation: lp-spin 8s linear infinite;
}

.journey__coin-disc {
    position: absolute;
    inset: 8px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--text-on-primary);
    background:
        radial-gradient(circle at 32% 28%, #c4b5fd, var(--color-primary) 46%, var(--color-primary-darker));
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, .45),
        0 0 28px var(--color-primary-glow),
        inset 0 1px 0 rgba(255,255,255,.45);
}

.journey.is-complete .journey__coin-disc {
    animation: lp-coin-burst .85s var(--easing-smooth);
}

@keyframes lp-spin {
    to { transform: rotate(360deg); }
}

@keyframes lp-coin-burst {
    0% { transform: scale(1); }
    45% { transform: scale(1.28); }
    100% { transform: scale(1); }
}

.journey__hint {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dim);
    font-family: var(--font-heading);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    opacity: clamp(0, calc((.05 - var(--journey-progress, 0)) * 20), 1);
    transition: opacity var(--duration-normal) var(--easing-default);
}

.journey__hint span {
    width: 1px;
    height: 22px;
    background: var(--color-primary-light);
    animation: lp-hint 1.9s ease-in-out infinite;
}

@keyframes lp-hint {
    0%, 100% { transform: scaleY(.35); transform-origin: top; opacity: .4; }
    50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
}

.journey__track {
    height: 420vh;
}

.journey--static .journey__track {
    display: none;
}

.journey--static .journey__stage {
    position: static;
    height: auto;
    min-height: 100svh;
}

.journey--static .journey__hint {
    display: none;
}

.journey--static .journey__node {
    opacity: 1;
    transform: none;
    filter: none;
}

.journey--static .journey__beam-fill {
    transform: scaleX(1);
}

.journey--static .journey__coin {
    display: none;
}

/* ── Reveal au scroll ────────────────────────────────────── */

.lp-reveal.is-waiting {
    opacity: 0;
    transform: translateY(36px);
}

.lp-reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity .75s var(--easing-smooth), transform .75s var(--easing-smooth);
}

/* ── Sections ────────────────────────────────────────────── */

.lp-section {
    width: min(1120px, calc(100% - var(--lp-gutter) * 2));
    margin-inline: auto;
    padding-block: clamp(72px, 11vw, 140px);
    border-top: 1px solid var(--border-light);
    scroll-margin-top: var(--lp-header);
}

.lp-section--split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
    align-items: start;
    gap: clamp(40px, 6vw, 96px);
}

.lp-kicker {
    margin: 0 0 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-primary-light);
    font-family: var(--font-heading);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.lp-kicker::before {
    width: 28px;
    height: 2px;
    content: '';
    border-radius: var(--radius-pill);
    background: var(--gradient-primary);
}

.lp-head h2,
.lp-close h2 {
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.2vw, 3.4rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -.035em;
}

.lp-head--wide {
    max-width: 60ch;
    margin-bottom: clamp(40px, 5vw, 64px);
}

.lp-text {
    margin: 22px 0 0;
    max-width: 48ch;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

.lp-note {
    margin: 28px 0 0;
    color: var(--text-muted);
    font-size: 1rem;
}

/* ── Cartes / registres ──────────────────────────────────── */

.lp-sheet {
    position: relative;
    padding: 26px 28px 28px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-2xl);
    background: var(--gradient-card);
    box-shadow: var(--shadow-2xl), 0 0 40px var(--color-primary-glow);
    overflow: hidden;
}

.lp-sheet::before {
    position: absolute;
    inset: 0;
    content: '';
    pointer-events: none;
    background: linear-gradient(135deg, var(--bg-subtle-strong), transparent 42%);
}

.lp-sheet > * {
    position: relative;
}

.lp-sheet__title {
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.ledger__row,
.ledger__total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
}

.ledger__row {
    padding-block: 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: .9rem;
}

.ledger__row b,
.ledger__total b {
    color: var(--text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ledger__row .is-out {
    color: var(--text-muted);
}

.ledger__row .is-in {
    color: var(--color-success-light);
}

.ledger__total {
    margin: 22px 0 0;
    padding: 16px 18px;
    border: 1px solid var(--color-success-border);
    border-radius: var(--radius-lg);
    color: var(--color-success-light);
    background: var(--color-success-bg);
    font-family: var(--font-heading);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ledger__total b {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.55rem;
    letter-spacing: -.02em;
}

.lp-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(20px, 3vw, 40px);
}

.lp-columns__sign {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--text-on-primary);
    background: var(--gradient-primary);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: var(--shadow-primary);
}

/* ── Todo ────────────────────────────────────────────────── */

.lp-todo {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.lp-todo__item {
    position: relative;
    min-height: 260px;
    padding: 28px 24px;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.lp-todo__item::after {
    position: absolute;
    right: -40px;
    bottom: -50px;
    width: 140px;
    height: 140px;
    content: '';
    border-radius: 50%;
    background: var(--color-primary-glow);
    filter: blur(35px);
}

.lp-todo__n {
    display: block;
    color: var(--text-hint);
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 700;
}

.lp-todo__item h3 {
    position: relative;
    margin: 28px 0 0;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
}

.lp-todo__item p {
    position: relative;
    margin: 12px 0 0;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ── IA ──────────────────────────────────────────────────── */

.lp-ai {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.lp-ai__card {
    padding: 28px 24px;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
}

.lp-ai__icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    color: var(--color-primary-light);
    background: var(--bg-nav-active);
    font-size: 1.1rem;
}

.lp-ai__card h3 {
    margin: 22px 0 0;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
}

.lp-ai__card p {
    margin: 12px 0 0;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ── Clôture ─────────────────────────────────────────────── */

.lp-close {
    padding: clamp(80px, 11vw, 140px) var(--lp-gutter);
    border-block: 1px solid var(--border-light);
    background: var(--bg-panel-dark);
    text-align: center;
}

.lp-close > p {
    margin: 20px 0 0;
    color: var(--text-secondary);
    font-size: 1.02rem;
}

.lp-actions {
    margin-top: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.lp-actions .btn {
    min-height: 50px;
}

/* ── Pied de page ────────────────────────────────────────── */

.lp-footer {
    position: static !important;
    inset: auto !important;
    width: min(1120px, calc(100% - var(--lp-gutter) * 2));
    margin-inline: auto;
    padding-block: 34px !important;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 28px;
    color: var(--text-muted) !important;
    background: transparent !important;
    font-size: .78rem;
    text-align: left !important;
}

.lp-footer p {
    margin: 0;
}

.lp-footer nav {
    display: flex;
    gap: 20px;
}

.lp-footer a:hover {
    color: var(--text-primary);
}

/* ── Adaptations ─────────────────────────────────────────── */

@media (max-width: 1100px) {
    .lp-todo,
    .lp-ai {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .lp-nav > a:not(.btn) {
        display: none;
    }

    .journey__stage {
        padding: calc(var(--lp-header) + 12px) var(--lp-gutter) 28px;
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto auto;
    }

    .journey__rail {
        grid-row: 1;
        padding-left: 0;
    }

    .journey__brand {
        grid-column: 1;
        grid-row: 2;
        text-align: center;
        padding: 0 8px 4px;
    }

    .journey__lead {
        margin-inline: auto;
    }

    .journey__title {
        font-size: clamp(3rem, 16vw, 4.6rem);
        text-align: center;
    }

    .journey__hint {
        grid-row: 3;
    }

    .journey__node {
        width: min(150px, 23%);
    }

    .lp-section--split,
    .lp-columns {
        grid-template-columns: 1fr;
    }

    .lp-columns__sign {
        justify-self: center;
    }

    .lp-footer {
        grid-template-columns: 1fr auto;
    }
}

@media (max-width: 700px) {
    .journey__stage {
        padding-inline: 12px;
    }

    .journey__card {
        min-height: 120px;
        padding: 16px 12px 14px;
    }

    .journey__pockets {
        min-height: 120px;
        padding: 12px 10px;
    }

    .journey__card strong {
        font-size: 1.15rem;
    }

    .journey__coin {
        width: 56px;
        height: 56px;
        margin: -28px 0 0 -28px;
    }

    .lp-todo,
    .lp-ai {
        grid-template-columns: 1fr;
    }

    .lp-todo__item {
        min-height: 0;
    }
}

@media (max-width: 620px) {
    .journey__track {
        height: 340vh;
    }

    .lp-nav__login {
        display: none !important;
    }

    .lp-nav {
        gap: 8px;
    }

    .lp-brand img {
        width: 32px;
        height: 32px;
    }

    .lp-sheet {
        padding: 22px 20px 24px;
    }

    .lp-actions .btn {
        width: 100%;
    }

    .lp-footer {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

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

    .journey__hint span,
    .journey__coin-halo,
    .journey__scan,
    .journey.is-complete .journey__title,
    .journey.is-complete .journey__coin-disc {
        animation: none;
    }

    .journey__node,
    .journey__brand,
    .journey__title,
    .lp-reveal.is-waiting,
    .lp-reveal.is-in {
        transition: none;
        opacity: 1;
        transform: none;
        filter: none;
    }
}
