/* --- Variables et Style de Base --- */
:root {
    --background-color: #ffffff;
    --text-color: #222222;
    --text-color-darker: #555555;
    --accent-color: #000000;
    --border-color: #e0e0e0;
    --font-family: 'Inter', sans-serif;
}

/* Ajoute le défilement fluide */
html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Typographie Adaptative --- */
h1 {
    font-size: max(2rem, 8vw);
    color: var(--accent-color);
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

.subtitle {
    font-size: max(0.8rem, 2vw);
    color: var(--text-color-darker);
    max-width: 60ch;
    margin: 1rem auto 0;
    text-align: center;
}

h2 {
    font-size: max(1.44rem, 3.2vw);
    color: var(--accent-color);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--text-color-darker);
}

/* --- En-tête et Navigation --- */
.site-header {
    padding: 1rem 0;
    /* border-bottom: 1px solid var(--border-color); REMOVED */
    background-color: transparent;
    /* MODIFIED */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    mix-blend-mode: difference;
    /* ADDED */
    color: #fff;
    /* ADDED */
}

.site-header.header-ui {
    mix-blend-mode: normal;
    z-index: 101;
    /* Above text layer */
    pointer-events: none;
    /* Let clicks pass through empty areas */
}

.site-header.visible {
    opacity: 1;
    pointer-events: auto;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: none;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
    /* Ensure it blends correctly */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.main-nav>ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    font-weight: 500;
    color: #fff;
    /* MODIFIED for mix-blend-mode */
}

.main-nav a:hover,
.main-nav a.active {
    color: #ddd;
    /* MODIFIED */
    text-decoration: underline;
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    margin-left: 1rem;
    display: flex;
    align-items: center;
}

.current-lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.current-lang-btn:hover {
    transform: scale(1.1);
}

.flag-img {
    width: 20px;
    /* Smaller flags */
    height: auto;
    display: block;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

.main-nav .lang-options {
    position: absolute;
    top: 100%;
    right: 0;
    width: max-content;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0;
    margin-top: 5px;
    list-style: none;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    /* Hidden by default */
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.main-nav .lang-options.show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    /* Shown on click */
}

.lang-options li {
    width: 100%;
}

.lang-options a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #333 !important;
    /* Dark text */
    text-decoration: none;
    font-size: 0.9rem;
    gap: 8px;
    width: 100%;
    transition: background-color 0.2s;
    mix-blend-mode: normal;
    /* Override global blend mode */
}

.lang-options a:hover {
    background-color: #f0f0f0;
    color: #000 !important;
}

/* --- Contenu Principal --- */
main {
    flex-grow: 1;
}

.hero {
    padding: 20rem 0;
    text-align: center;
}

/* --- Section Cover Image --- */
.spacer-black {
    height: 800px;
    background-color: #000;
}

.cover-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.cover-image {
    width: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.cover-text-overlay {
    position: fixed;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    max-width: 500px;
    padding: 2rem;
    opacity: 0;
    z-index: 50;
    pointer-events: none;
}

.cover-text-overlay h2 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1rem;
}

.cover-text-overlay p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .cover-text-overlay {
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: justify;
        width: 90%;
        max-width: none;
    }
}

/* --- Section Revenus --- */
.revenus-section {
    padding: 6rem 0;
    background-color: #fbfbfb;
}

.revenus-title {
    line-height: 1.2;
    font-size: max(1.8rem, 3vw);
    font-weight: 700;
    color: #000;
    text-align: center;
    margin-bottom: 4rem;
}

.revenu-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(80px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.revenu-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.revenu-icon {
    width: 300px;
    height: 300px;
    object-fit: contain;
    flex-shrink: 0;
    mix-blend-mode: multiply;
}

.revenu-content h3 {
    font-size: 2rem;
    color: #000;
    margin-bottom: 0.75rem;
}

.revenu-content p {
    font-size: 1.3rem;
    color: rgba(0, 0, 0, 0.7);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .revenu-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .revenu-icon {
        width: 200px;
        height: 200px;
    }
}

/* --- Section "Platform" --- */
.platform-section {
    padding: 6rem 0;
    background-color: #f7f7f7;
}

.platform-title {
    font-size: max(3.2rem, 9.6vw);
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 2rem;
}

.platform-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.platform-subtitle {
    font-size: max(1.2rem, 2.4vw);
    color: var(--text-color-darker);
    line-height: 1.2;
}

.right-column {
    /* --- MODIFIÉ ICI --- */
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(0, 0, 0, 0.6);
}

.right-column p {
    margin-bottom: 1.5rem;
}

.right-column b {
    color: var(--text-color);
}


/* --- Section Parallaxe --- */
.parallax-section {
    background-color: #000000;
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000000;
    clip-path: polygon(0% 0%, 0% 100%, 40% 100%, 40% 30%, 60% 30%, 60% 100%, 100% 100%, 100% 0%);
    z-index: 2;
}

.parallax-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    text-align: center;
    width: 100%;
    will-change: transform;
}

.parallax-section h2 {
    color: #ffffff;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.parallax-section p {
    font-size: 1.2rem;
    color: #a0a0a0;
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

.content {
    padding: 4rem 0;
}


/* --- Pied de Page --- */
.site-footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    background-color: #f7f7f7;
    color: var(--accent-color);
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--accent-color);
    color: var(--background-color);
    border-radius: 50%;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.social-icon:hover {
    transform: scale(1.1);
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-column a {
    color: var(--text-color-darker);
    text-decoration: none;
}

.footer-column a:hover {
    text-decoration: underline;
    color: var(--text-color);
}


/* --- Menu Mobile et Styles Responsives --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    /* MODIFIED */
    margin: 5px 0;
    transition: 0.3s;
}

/* Layer Visibility Logic */
.header-text .lang-dropdown {
    visibility: hidden;
    /* Hide flags in blend layer */
}

.header-ui .logo,
.header-ui .main-nav>ul>li:not(.lang-dropdown),
.header-ui .menu-toggle {
    visibility: hidden;
    /* Hide text in UI layer */
}

.header-ui .lang-dropdown {
    pointer-events: auto;
    /* Re-enable clicks for flags */
}

@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--background-color);
        border-bottom: 1px solid var(--border-color);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
    }

    .menu-toggle {
        display: block;
    }

    .hero,
    .parallax-section,
    .content {
        padding: 4rem 0;
    }

    .platform-title {
        font-size: 4.5rem;
        /* La fonction max() gère déjà la taille minimale sur mobile */
    }

    .platform-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* --- SCROLLYTELLING HERO --- */
#hero-scrolly {
    position: relative;
    height: 400vh;
    /* 4x viewport height for scroll duration */
    background-color: #050505;
    z-index: 10;
}

.sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#hero-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    /* We handle aspect ratio in JS, but this helps initial positioning */
    z-index: 1;
}

/* Loader */
.loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #050505;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    transition: opacity 0.5s ease-out;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Overlays */
.scroll-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through to canvas/body */
}

.step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: opacity, transform;
}

.step.visible {
    opacity: 1;
}

.hero-title {
    font-size: max(4rem, 15vw);
    font-weight: 700;
    letter-spacing: -0.05em;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

.text-block {
    max-width: 700px;
    /* Widened from 500px */
    padding: 2rem;
}

.text-block h2 {
    font-size: max(2rem, 5vw);
    line-height: 1.1;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.text-block p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

/* Positions */
.text-block.left {
    position: absolute;
    left: 10%;
    text-align: left;
}

.text-block.right {
    position: absolute;
    right: 12%;
    /* Adjusted back from 20% */
    text-align: right;
}

.text-block.center {
    text-align: center;
    pointer-events: auto;
    /* Enable buttons */
}

.cta-button {
    display: inline-block;
    background: #fff;
    color: #000;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.cta-button:hover {
    transform: scale(1.05);
}

/* --- Final Step Specifics --- */
.step[data-step="5"] {
    align-items: flex-end;
    padding-bottom: 5vh;
    /* Position lower (closer to bottom 5%) */
}

.step[data-step="5"] .text-block {
    max-width: 75%;
    width: 100%;
}

@media (max-width: 768px) {
    .step[data-step="5"] .text-block {
        max-width: 95%;
    }
}