@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --text: #f4f8ff;
    --muted: #d3deef;
    --primary: #d72d36;
    --primary-hover: #b9252d;
    --soft: rgba(233, 243, 255, 0.18);
    --soft-hover: rgba(233, 243, 255, 0.3);
    --glass: rgba(12, 26, 49, 0.42);
    --glass-strong: rgba(12, 26, 49, 0.62);
    --border: rgba(214, 231, 255, 0.34);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: 'Manrope', system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(980px 460px at 8% 10%, rgba(255, 93, 93, 0.32), transparent 58%),
        radial-gradient(920px 520px at 100% 0%, rgba(52, 163, 255, 0.3), transparent 60%),
        linear-gradient(160deg, #0a1730, #132c52 52%, #1a3a63);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.landing-shell {
    width: 100%;
    position: relative;
}

.floating-brand {
    position: fixed;
    top: 18px;
    left: 20px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--glass);
    backdrop-filter: blur(8px);
    max-width: calc(100% - 40px);
}

.floating-nav {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
    max-width: min(760px, calc(100% - 230px));
    padding: 9px 12px;
    border: 1px solid rgba(216, 232, 255, 0.38);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(14, 31, 56, 0.78), rgba(12, 28, 50, 0.62));
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 30px rgba(6, 13, 26, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.floating-nav a {
    color: #f7fbff;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    padding: 8px 13px;
    border-radius: 999px;
    border: 1px solid rgba(223, 236, 255, 0.2);
    background: rgba(230, 240, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.floating-nav a:hover,
.floating-nav a:focus-visible {
    transform: translateY(-1px);
    background: rgba(230, 240, 255, 0.26);
    border-color: rgba(223, 236, 255, 0.48);
    box-shadow: 0 10px 24px rgba(4, 12, 26, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    outline: none;
}

.floating-nav a:active {
    transform: translateY(0);
}

.floating-nav a[data-scroll-target] {
    background: linear-gradient(135deg, rgba(215, 45, 54, 0.84), rgba(178, 31, 41, 0.84));
    border-color: rgba(255, 214, 214, 0.42);
    box-shadow: 0 10px 24px rgba(110, 18, 26, 0.28);
}

.floating-nav a[data-scroll-target]:hover,
.floating-nav a[data-scroll-target]:focus-visible {
    background: linear-gradient(135deg, rgba(226, 61, 71, 0.96), rgba(191, 38, 49, 0.96));
    border-color: rgba(255, 230, 230, 0.62);
}

.floating-nav a.nav-login {
    background: linear-gradient(135deg, #f8fafc, #dbeafe);
    color: #0f2a4a;
    border-color: rgba(186, 213, 245, 0.9);
    box-shadow: 0 10px 20px rgba(6, 13, 26, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.floating-nav a.nav-login:hover,
.floating-nav a.nav-login:focus-visible {
    background: linear-gradient(135deg, #ffffff, #e8f2ff);
    border-color: rgba(203, 225, 251, 0.98);
    box-shadow: 0 12px 24px rgba(6, 13, 26, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.floating-brand img {
    width: 42px;
    height: 42px;
    border-radius: 9px;
}

.brand-kicker {
    margin: 0;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f9c8c8;
    font-weight: 800;
}

.brand-title {
    margin: 3px 0 0;
    font-size: 0.84rem;
    font-weight: 700;
}

.story-progress {
    position: fixed;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: grid;
    gap: 8px;
}

.story-progress span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(240, 247, 255, 0.4);
    transition: all 0.2s ease;
}

.story-progress span.is-active {
    height: 24px;
    background: #ffffff;
}

.story-scroll {
    scroll-snap-type: y mandatory;
}

.story-slide {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    scroll-snap-align: start;
    width: min(980px, calc(100% - 36px));
    margin: 0 auto;
    display: grid;
    align-content: center;
    opacity: 0.22;
    filter: blur(2px);
    transform: translateY(34px) scale(0.97);
    transition: opacity 0.56s ease, transform 0.56s ease, filter 0.56s ease;
    overflow: hidden;
}

.story-slide-form {
    scroll-margin-top: 120px;
}

.story-slide.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
}

.slide-content {
    position: relative;
    z-index: 1;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: clamp(16px, 2.6vw, 34px);
    background: rgba(9, 23, 44, 0.58);
    backdrop-filter: blur(3px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.slide-eyebrow {
    margin: 0;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffd6d6;
    font-weight: 800;
}

.story-slide h1,
.story-slide h2 {
    margin: 6px 0 0;
    font-size: clamp(2rem, 6vw, 4.4rem);
    line-height: 1.03;
    letter-spacing: -0.02em;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.36);
}

.slide-lead {
    margin: 12px 0 0;
    max-width: 820px;
    color: var(--muted);
    font-size: clamp(1.02rem, 1.9vw, 1.28rem);
    line-height: 1.68;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
}

.story-slide-form {
    align-content: start;
    padding-top: 13vh;
    padding-bottom: 8vh;
}

.adhesion-form {
    margin-top: 10px;
    display: grid;
    gap: 8px;
    max-width: 760px;
    background: var(--glass-strong);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(6px);
}

.adhesion-form[hidden] {
    display: none !important;
}

.matricule-gate {
    margin-top: 10px;
    max-width: 760px;
    background: var(--glass-strong);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(6px);
}

.matricule-gate h3 {
    margin: 0;
    font-size: 1rem;
}

.matricule-gate p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.matricule-form {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.matricule-form label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #d8e6fd;
}

.matricule-inline {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.matricule-inline input {
    width: 100%;
    border: 1px solid rgba(185, 210, 244, 0.42);
    border-radius: 10px;
    padding: 10px 11px;
    font: inherit;
    color: #f4f8ff;
    background: rgba(14, 32, 59, 0.72);
    outline: none;
    min-height: 42px;
}

.matricule-inline input:focus {
    border-color: #8db7ef;
    box-shadow: 0 0 0 3px rgba(123, 168, 227, 0.24);
}

.matricule-feedback {
    margin: 0;
    min-height: 18px;
    font-size: 0.82rem;
    font-weight: 700;
}

.matricule-feedback.is-ok {
    color: #ddffef;
}

.matricule-feedback.is-error {
    color: #ffd3d3;
}

.adhesion-form label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #d8e6fd;
}

.adhesion-form input,
.adhesion-form textarea {
    width: 100%;
    border: 1px solid rgba(185, 210, 244, 0.42);
    border-radius: 10px;
    padding: 10px 11px;
    font: inherit;
    color: #f4f8ff;
    background: rgba(14, 32, 59, 0.72);
    outline: none;
}

.adhesion-form input:focus,
.adhesion-form textarea:focus {
    border-color: #8db7ef;
    box-shadow: 0 0 0 3px rgba(123, 168, 227, 0.24);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 13px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.14s ease, background-color 0.18s ease;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.btn-primary {
    color: #fff;
    background: var(--primary);
    border-color: #9f1b23;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-soft {
    color: #f4f8ff;
    background: var(--soft);
    border-color: var(--border);
}

.btn-soft:hover {
    background: var(--soft-hover);
}

.feedback {
    margin: 8px 0 0;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.84rem;
    font-weight: 700;
    max-width: 760px;
}

.feedback-ok {
    background: rgba(23, 154, 101, 0.25);
    border: 1px solid rgba(84, 225, 167, 0.45);
    color: #dbfff0;
}

.feedback-error {
    background: rgba(207, 47, 47, 0.24);
    border: 1px solid rgba(248, 140, 140, 0.46);
    color: #ffdcdc;
}

.landing-popup {
    max-width: 760px;
    margin-top: 10px;
    border: 1px solid rgba(84, 225, 167, 0.45);
    background: rgba(23, 154, 101, 0.22);
    border-radius: 16px;
    padding: 18px;
    backdrop-filter: blur(6px);
}

.landing-popup-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #dbfff0;
}

.landing-popup-text {
    margin: 8px 0 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #ecfff6;
    font-weight: 700;
}

.cursor-glow {
    position: fixed;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    pointer-events: none;
    z-index: 30;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
}

.cursor-glow::before {
    content: "";
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='22' y='16' width='20' height='36' rx='8' fill='%23d62828'/%3E%3Crect x='24' y='24' width='16' height='12' rx='3' fill='%23f7f7f7'/%3E%3Crect x='26' y='6' width='14' height='10' rx='3' fill='%231f2937'/%3E%3Cpath d='M40 10c7 0 10 4 10 8' fill='none' stroke='%231f2937' stroke-width='4' stroke-linecap='round'/%3E%3Ccircle cx='45' cy='27' r='4' fill='%23fbbf24'/%3E%3Crect x='29' y='52' width='6' height='6' rx='2' fill='%237f1d1d'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

body.has-custom-cursor {
    cursor: none;
}

body.has-custom-cursor .cursor-glow {
    opacity: 0.92;
}

.landing-footer {
    text-align: center;
    color: rgba(223, 235, 252, 0.85);
    font-size: 0.78rem;
    padding: 0 0 12px;
}

.landing-footer-line {
    width: min(1180px, 94%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.landing-footer-line p {
    margin: 0;
}

.landing-footer-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.landing-footer-links a {
    color: #fff7f7;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.01em;
    border: 1px solid rgba(255, 200, 200, 0.5);
    background: linear-gradient(135deg, rgba(215, 45, 54, 0.36), rgba(110, 18, 26, 0.34));
    box-shadow: 0 8px 20px rgba(7, 13, 25, 0.32), inset 0 0 0 1px rgba(255, 240, 240, 0.12);
    border-radius: 999px;
    padding: 6px 12px;
    transition: transform 0.16s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.landing-footer-links a:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(215, 45, 54, 0.52), rgba(133, 22, 31, 0.5));
    border-color: rgba(255, 221, 221, 0.72);
    box-shadow: 0 10px 24px rgba(7, 13, 25, 0.36), inset 0 0 0 1px rgba(255, 246, 246, 0.24);
}

@media (max-width: 760px) {
    .landing-shell {
        padding-top: 126px;
    }

    .floating-brand {
        left: 10px;
        right: 10px;
        top: calc(10px + env(safe-area-inset-top));
        max-width: none;
    }

    .floating-nav {
        top: calc(78px + env(safe-area-inset-top));
        left: 10px;
        right: 10px;
        max-width: none;
        justify-content: center;
        padding: 8px 9px;
    }

    .story-progress {
        right: 10px;
    }

    .story-slide {
        width: 92%;
        min-height: calc(100vh - 96px);
        min-height: calc(100svh - 96px);
    }

    .slide-content {
        padding: 16px;
    }

    .story-slide h1,
    .story-slide h2 {
        font-size: clamp(1.6rem, 9vw, 2.45rem);
    }

    .slide-lead {
        font-size: 0.98rem;
    }

    .story-slide-form {
        padding-top: 10vh;
        padding-top: 10svh;
        scroll-margin-top: 148px;
    }

    .cursor-glow {
        display: none;
    }

    .landing-footer-line {
        gap: 10px;
    }
}

@media (max-width: 560px) {
    .landing-shell {
        padding-top: 138px;
    }

    .story-progress {
        display: none;
    }

    .floating-nav {
        gap: 6px;
        padding: 8px;
    }

    .floating-nav a {
        flex: 1 1 calc(50% - 6px);
        text-align: center;
        min-width: 140px;
        padding: 8px 10px;
        font-size: 0.74rem;
    }

    .floating-nav a.nav-login {
        flex-basis: 100%;
        min-width: 100%;
    }

    .story-slide-form {
        scroll-margin-top: 164px;
    }

    .matricule-inline {
        grid-template-columns: 1fr;
    }

    .matricule-inline .btn {
        width: 100%;
    }

    .landing-footer {
        padding: 0 10px 12px;
    }

    .landing-footer-links {
        justify-content: center;
    }

    .landing-footer-links a {
        font-size: 0.72rem;
        padding: 6px 10px;
    }
}

@media (max-width: 420px) {
    .landing-shell {
        padding-top: 148px;
    }

    .slide-content {
        border-radius: 16px;
        padding: 14px;
    }

    .story-slide h1,
    .story-slide h2 {
        line-height: 1.08;
    }

    .matricule-gate,
    .adhesion-form {
        padding: 12px;
    }
}

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

    .story-scroll {
        scroll-snap-type: none;
    }

    .story-slide,
    .story-slide.is-visible,
    .story-progress span,
    .floating-nav a,
    .btn,
    .landing-footer-links a,
    .cursor-glow {
        transition: none !important;
        animation: none !important;
    }

    .story-slide {
        opacity: 1;
        filter: none;
        transform: none;
    }

    .cursor-glow {
        display: none;
    }
}

@media (max-height: 700px) and (orientation: landscape) {
    .story-slide {
        min-height: 120vh;
    }

    .story-slide-form {
        padding-top: 12vh;
        padding-bottom: 6vh;
    }
}
