/* ============================================
   PostNoda — Site Vitrine v4
   Design System & Styles
   ============================================ */

/* --- @font-face — DM Serif Display (auto-heberge) --- */
@font-face {
    font-family: 'DM Serif Display';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/dm-serif-display-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'DM Serif Display';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/dm-serif-display-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- @font-face — Inter (auto-heberge) --- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Variables — Design F2 Raycast Chocolat Serif --- */
:root {
    /* Backgrounds — Chocolat désaturé */
    --bg-deep:       #0F0E0C;
    --bg:            #171614;
    --bg-elevated:   #1C1B18;
    --bg-card:       #201F1C;
    --surface:       #28261F;

    /* Text — Crème chaud */
    --text:          #FAFAF5;
    --text2:         rgba(250, 250, 245, 0.5);
    --muted:         rgba(250, 250, 245, 0.3);

    /* Accents — Turquoise */
    --accent:        #48C8C0;
    --accent-mid:    #3AA8A2;
    --accent-deep:   #2E8A85;
    --accent-glow:   rgba(72, 200, 192, 0.15);

    /* Semantic */
    --success:       #48C8C0;
    --danger:        #E08070;
    --warning:       #D4A060;

    /* Layer colors */
    --coral:         #E08070;
    --gold:          #D4A060;
    --sage:          #8FAE7E;

    /* Borders */
    --border:        rgba(250, 250, 245, 0.06);
    --border-accent: rgba(72, 200, 192, 0.2);

    /* Spacing */
    --space-xs:  4px;
    --space-sm:  8px;
    --space-md:  16px;
    --space-lg:  24px;
    --space-xl:  40px;
    --space-2xl: 64px;
    --space-3xl: 96px;

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'DM Serif Display', serif;

    /* Radius */
    --radius-sm: 6px;
    --radius:    10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 100px;

    /* Transitions */
    --ease: 0.3s ease;
    --ease-out: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    /* Layout */
    --max-width: 1080px;
    --max-width-narrow: 720px;
}


/* --- Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    overflow-x: hidden;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a { color: inherit; }

img {
    display: block;
    max-width: 100%;
    height: auto;
}


/* --- Blueprint Grid Background --- */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(72, 200, 192, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(72, 200, 192, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}


/* ============================================
   Animations au scroll
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--ease-out), transform var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-child {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal-child.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px var(--space-lg);
    background: transparent;
    transition: background var(--ease), backdrop-filter var(--ease);
}

.nav.scrolled {
    background: rgba(26, 20, 16, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav__logo svg {
    height: 30px;
    width: auto;
    display: block;
}

.nav__links {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
    align-items: center;
}

.nav__links a {
    color: var(--text2);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color var(--ease);
    position: relative;
}

.nav__links a:not(.nav__cta)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width var(--ease);
}

.nav__links a:not(.nav__cta):hover::after {
    width: 100%;
}

.nav__links a:hover {
    color: var(--text);
}

.nav__links a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

.nav__cta {
    color: var(--accent) !important;
    border: 1px solid var(--border-accent);
    padding: 7px 20px;
    border-radius: var(--radius-sm);
    transition: all var(--ease) !important;
}

.nav__cta:hover {
    background: rgba(72, 200, 192, 0.08);
    border-color: var(--accent) !important;
}

/* Hamburger */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 60;
}

.nav__toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--text2);
    transition: all var(--ease);
    transform-origin: center;
}

.nav__toggle.active span:first-child {
    transform: rotate(45deg) translate(2.5px, 2.5px);
}

.nav__toggle.active span:last-child {
    transform: rotate(-45deg) translate(2.5px, -2.5px);
}


/* ============================================
   Menu mobile fullscreen
   ============================================ */
.mobile-menu {
    display: none;
}

@media (max-width: 767px) {
    .mobile-menu {
        display: flex;
        position: fixed;
        inset: 0;
        background: rgba(15, 14, 12, 0.97);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        z-index: 55;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
        align-items: center;
        justify-content: center;
    }

    .mobile-menu.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-menu__links {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 28px;
        align-items: center;
    }

    .mobile-menu__links a {
        color: var(--text);
        text-decoration: none;
        font-size: 1.25rem;
        font-weight: 500;
        letter-spacing: 0.5px;
        padding: 12px 24px;
        display: inline-block;
        min-height: 44px;
        line-height: 1.6;
        transition: color var(--ease);
    }

    .mobile-menu__links a:hover,
    .mobile-menu__links a:focus-visible {
        color: var(--accent);
    }

    .mobile-menu__cta {
        margin-top: 8px;
        border: 1px solid var(--border-accent);
        border-radius: 4px;
        color: var(--accent) !important;
        padding: 14px 32px !important;
    }
}


/* ============================================
   Layout commun
   ============================================ */
main, .nav, .footer {
    position: relative;
    z-index: 1;
}

.section {
    padding: var(--space-3xl) var(--space-lg);
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.section--auto {
    min-height: auto;
}

.section__container {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

.section__tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: var(--space-lg);
}

.section__title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

.section__title--gradient {
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text2);
    font-weight: 300;
    line-height: 1.7;
    max-width: 560px;
}

/* Section backgrounds alternees */
.section--deep {
    background: var(--bg-deep);
}

.section--elevated {
    background: rgba(30, 24, 18, 0.5);
}


/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    position: relative;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(ellipse at center, rgba(72, 200, 192, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero__container {
    max-width: var(--max-width-narrow);
    position: relative;
    z-index: 1;
}

/* Logo animation */
.hero__logo {
    display: block;
    margin: 0 auto var(--space-xl);
}

.hero__logo svg {
    width: 80px;
    height: 80px;
    display: block;
    margin: 0 auto;
}

.hero__logo .logo-line {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: lineDrawIn 0.5s ease-out forwards;
}

.hero__logo .logo-line:nth-child(1) { animation-delay: 0.1s; }
.hero__logo .logo-line:nth-child(2) { animation-delay: 0.2s; }
.hero__logo .logo-line:nth-child(3) { animation-delay: 0.3s; }
.hero__logo .logo-line:nth-child(4) { animation-delay: 0.4s; }
.hero__logo .logo-line:nth-child(5) { animation-delay: 0.5s; }
.hero__logo .logo-line:nth-child(6) { animation-delay: 0.6s; }

.hero__logo .logo-dot {
    opacity: 0;
    animation: dotAppear 0.4s ease-out forwards;
}

.hero__logo .logo-dot:nth-child(7) { animation-delay: 0.3s; }
.hero__logo .logo-dot:nth-child(8) { animation-delay: 0.5s; }
.hero__logo .logo-dot:nth-child(9) { animation-delay: 0.7s; }
.hero__logo .logo-dot:nth-child(10) { animation-delay: 0.9s; }

@keyframes lineDrawIn {
    to { stroke-dashoffset: 0; }
}

@keyframes dotAppear {
    from { opacity: 0; transform: scale(0); }
    to   { opacity: 1; transform: scale(1); }
}

.hero__title {
    font-family: var(--font-serif);
    font-size: clamp(2.25rem, 6vw, 4rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-lg);
}

.hero__title strong {
    font-weight: 400;
    background: linear-gradient(135deg, var(--text) 20%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__desc {
    font-size: clamp(0.9375rem, 1.5vw, 1.125rem);
    color: var(--text2);
    line-height: 1.8;
    max-width: 520px;
    margin: 0 auto var(--space-xl);
    font-weight: 300;
}

.hero__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 16px 40px;
    background: var(--coral);
    color: var(--bg);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: var(--radius);
    transition: all var(--ease);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(224, 128, 112, 0.25);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

@keyframes ctaPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(224, 128, 112, 0); }
    50%      { box-shadow: 0 0 30px 0 rgba(224, 128, 112, 0.1); }
}

.btn-primary--pulse {
    animation: ctaPulse 3s ease-in-out infinite;
}

.btn-primary--pulse:hover {
    animation: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--ease);
    background: none;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    color: var(--text);
}

.btn-secondary svg {
    width: 16px;
    height: 16px;
    transition: transform var(--ease);
}

.btn-secondary:hover svg {
    transform: translateX(4px);
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.hero__scroll svg {
    width: 24px;
    height: 24px;
    stroke: var(--muted);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50%      { transform: translateY(8px); opacity: 0.7; }
}


/* ============================================
   SECTION 2 — PROBLEME
   ============================================ */
.problem__duality {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.problem__line {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: var(--space-sm);
}

.problem__line--success {
    color: var(--success);
}

.problem__line--danger {
    color: var(--danger);
}

.problem__metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: 800px;
    margin: 0 auto var(--space-2xl);
}

.metric {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color var(--ease);
}

.metric:hover {
    border-color: var(--border-accent);
}

.metric__number {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.03em;
}

.metric__number--danger { color: var(--danger); }
.metric__number--accent { color: var(--accent); }
.metric__number--text   { color: var(--text); }

.metric__label {
    font-size: 0.875rem;
    color: var(--text2);
    font-weight: 300;
    line-height: 1.5;
}

.metric__source {
    font-size: 0.6875rem;
    color: var(--muted);
    margin-top: var(--space-sm);
}

.problem__quote {
    text-align: center;
    font-family: var(--font-serif);
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--accent);
    font-weight: 400;
    font-style: italic;
    opacity: 0.85;
    max-width: 560px;
    margin: 0 auto;
}


/* ============================================
   SECTION 3 — PHILOSOPHIE (4 couches)
   ============================================ */
.arch {
    margin-top: var(--space-xl);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Section philosophie */
#philosophie {
    min-height: auto;
}

.arch__stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    max-width: 100%;
}

.arch__layer {
    padding: var(--space-lg) var(--space-xl);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.4s ease;
    position: relative;
}

.arch__layer-number {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-xs);
}

.arch__layer-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-xs);
}

.arch__layer-desc {
    font-size: 0.75rem;
    color: var(--text2);
    font-weight: 300;
    line-height: 1.5;
}

/* Couche 1 — Donnees (fondation) */
.arch__layer--data {
    background: var(--bg-elevated);
    border-left: 3px solid var(--accent);
}

/* Couche 2 — Moteur deterministe */
.arch__layer--engine {
    background: var(--bg-card);
    border-left: 3px solid var(--coral);
}

/* Couche 3 — Services */
.arch__layer--services {
    background: var(--bg-card);
    border-left: 3px solid var(--gold);
}

/* Couche 4 — IA (optionnelle) */
.arch__layer--ia {
    background: rgba(34, 28, 22, 0.5);
    border-left: 3px dashed var(--sage);
    border-style: dashed;
    opacity: 0.6;
}

.arch__layer--ia .arch__layer-title::after {
    content: ' — OPTIONNELLE';
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 1px;
}

/* Hover demo : la couche IA disparait */
.arch__stack:hover .arch__layer--ia {
    opacity: 0.12;
    transform: translateY(-4px);
}

.arch__layer--ia-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--success);
    opacity: 0;
    transition: opacity 0.4s ease;
    white-space: nowrap;
    pointer-events: none;
}

.arch__stack:hover .arch__layer--ia-label {
    opacity: 1;
}

/* Les 3 couches du dessous restent stables */
.arch__stack:hover .arch__layer--data,
.arch__stack:hover .arch__layer--engine,
.arch__stack:hover .arch__layer--services {
    border-color: var(--border-accent);
}

/* Couleurs par couche — layer number */
.arch__layer--data .arch__layer-number { color: var(--accent); }
.arch__layer--engine .arch__layer-number { color: var(--coral); }
.arch__layer--services .arch__layer-number { color: var(--gold); }
.arch__layer--ia .arch__layer-number { color: var(--sage); }

/* Badges de confiance */
.arch__badges {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.arch__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    background: rgba(72, 200, 192, 0.06);
    border: 1px solid rgba(72, 200, 192, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--success);
}

.arch__badge svg {
    width: 11px;
    height: 11px;
    stroke: var(--success);
    fill: none;
    stroke-width: 2;
}


/* ============================================
   SECTION 2b — SLIDER CANVAS (Architecture Flow)
   ============================================ */
.slider-canvas {
    max-width: 900px;
    margin: var(--space-xl) auto var(--space-2xl);
}

.slider-canvas__zone-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 2%;
    margin-bottom: var(--space-sm);
}

.slider-canvas__zone-labels span {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.slider-canvas__zone-label--center {
    color: var(--accent) !important;
    font-weight: 600 !important;
}

.slider-canvas canvas {
    display: block;
    width: 100%;
    height: 340px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}

.slider-canvas__controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    padding: 0 var(--space-sm);
}

.slider-canvas__label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    min-width: 80px;
}

.slider-canvas__label--left {
    color: var(--danger);
    text-align: left;
}

.slider-canvas__label--right {
    color: var(--accent);
    text-align: right;
}

.slider-canvas__controls input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: linear-gradient(90deg, var(--danger), var(--accent));
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.slider-canvas__controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text);
    border: 2px solid var(--accent);
    box-shadow: 0 0 10px rgba(72, 200, 192, 0.3);
    cursor: pointer;
    transition: box-shadow var(--ease);
}

.slider-canvas__controls input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 20px rgba(72, 200, 192, 0.5);
}

.slider-canvas__controls input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text);
    border: 2px solid var(--accent);
    box-shadow: 0 0 10px rgba(72, 200, 192, 0.3);
    cursor: pointer;
}


/* ============================================
   SECTION 4 — METHODOLOGIE (4 phases)
   ============================================ */
.phases {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-top: var(--space-2xl);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.phase {
    flex: 1;
    padding: var(--space-lg) var(--space-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color var(--ease);
}

.phase:hover {
    border-color: var(--border-accent);
}

/* Couleurs par phase */
.phase:nth-child(1) { border-top: 2px solid var(--accent); }
.phase:nth-child(3) { border-top: 2px solid var(--coral); }
.phase:nth-child(5) { border-top: 2px solid var(--gold); }
.phase:nth-child(7) { border-top: 2px solid var(--sage); }

.phase:nth-child(1) .phase__number { color: var(--accent); }
.phase:nth-child(3) .phase__number { color: var(--coral); }
.phase:nth-child(5) .phase__number { color: var(--gold); }
.phase:nth-child(7) .phase__number { color: var(--sage); }

.phase__number {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: var(--space-sm);
}

.phase__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.phase__desc {
    font-size: 0.8125rem;
    color: var(--text2);
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.phase__duration {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--accent);
    padding: 4px 12px;
    background: rgba(72, 200, 192, 0.06);
    border: 1px solid rgba(72, 200, 192, 0.12);
    border-radius: var(--radius-full);
}

.phase__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    padding-top: var(--space-xl);
}

.phase__arrow svg {
    width: 20px;
    height: 20px;
    stroke: var(--muted);
}

/* Manifesto */
.section__manifesto {
    text-align: center;
    font-family: var(--font-serif);
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--accent);
    font-weight: 400;
    font-style: italic;
    margin-top: var(--space-2xl);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.85;
}


/* ============================================
   SECTION 4b — ESTIMATEUR
   ============================================ */
.estimator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    max-width: 800px;
    margin: var(--space-2xl) auto 0;
    align-items: start;
}

.estimator__inputs {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.estimator__field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text2);
    margin-bottom: var(--space-sm);
}

.estimator__slider-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.estimator__slider-row input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--surface);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.estimator__slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(72, 200, 192, 0.3);
}

.estimator__slider-row input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
}

.estimator__value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    min-width: 48px;
    text-align: right;
}

.estimator__result {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 60px rgba(72, 200, 192, 0.04);
}

.estimator__result-number {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text) 20%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.estimator__result-unit {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: var(--space-lg);
}

.estimator__result-equiv {
    font-size: 0.9375rem;
    color: var(--text2);
    font-weight: 300;
    margin-bottom: var(--space-md);
}

.estimator__result-equiv strong {
    color: var(--text);
    font-weight: 600;
}

.estimator__result-note {
    font-size: 0.75rem;
    color: var(--muted);
    font-style: italic;
}

.estimator__cta {
    text-align: center;
    margin-top: var(--space-xl);
}


/* ============================================
   SECTION 5 — TRAVAUX & LEVIERS
   ============================================ */
.levers__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    max-width: 100%;
    margin: var(--space-2xl) auto 0;
}

.lever {
    padding: var(--space-lg) var(--space-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-top: 2px solid var(--accent);
    border-radius: var(--radius-md);
    transition: border-color var(--ease), transform var(--ease);
    display: flex;
    flex-direction: column;
}

.lever:hover {
    border-color: var(--border-accent);
    border-top-color: var(--accent);
    transform: translateY(-2px);
}

.lever__icon {
    width: 40px;
    height: 40px;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--accent-glow);
}

.lever__icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent);
}

.lever__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

.lever__desc {
    font-size: 0.8125rem;
    color: var(--text2);
    font-weight: 300;
    line-height: 1.7;
    flex-grow: 1;
}


/* ============================================
   SECTION 5b — NODACLASS
   ============================================ */
#nodaclass {
    min-height: auto;
    padding: var(--space-2xl) var(--space-lg);
}

.nodaclass-card {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    background: linear-gradient(135deg, rgba(72, 200, 192, 0.08) 0%, rgba(72, 200, 192, 0.02) 50%, rgba(212, 160, 96, 0.06) 100%);
    border: 1px solid rgba(72, 200, 192, 0.25);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.nodaclass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
}

.nodaclass-card .section__tag {
    margin-bottom: var(--space-md);
    color: var(--gold);
}

.nodaclass-card .section__title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, var(--text) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nodaclass-card .section__subtitle {
    margin: 0 auto;
    max-width: 500px;
}

.nodaclass__details {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
    flex-wrap: wrap;
}

.nodaclass__detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--text);
    font-weight: 400;
}

.nodaclass__detail svg {
    width: 16px;
    height: 16px;
    stroke: var(--gold);
    fill: none;
    flex-shrink: 0;
}

.nodaclass__cta {
    margin-top: var(--space-xl);
}

.nodaclass__cta .btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}

.nodaclass__cta .btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-mid), var(--accent));
}


/* ============================================
   SECTION 6 — DEMANDE D'INFORMATION
   ============================================ */
.diag-form {
    max-width: 520px;
    margin: var(--space-lg) auto 0;
}

/* Section diagnostic plus compacte */
#diagnostic {
    min-height: auto;
    padding: var(--space-xl) var(--space-lg);
}

#diagnostic .section__title {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    margin-bottom: var(--space-sm);
}

#diagnostic .section__subtitle {
    font-size: clamp(0.85rem, 1.4vw, 0.95rem);
    line-height: 1.5;
}

#diagnostic .section__tag {
    margin-bottom: var(--space-sm);
}

.diag-form form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.diag-form__field--full {
    grid-column: 1 / -1;
}

.diag-form__submit {
    grid-column: 1 / -1;
}

.diag-form__note {
    grid-column: 1 / -1;
}

.diag-form__field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text2);
    margin-bottom: 4px;
}

.diag-form__field label span {
    color: var(--danger);
}

.diag-form__field input,
.diag-form__field textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
    transition: border-color var(--ease), box-shadow var(--ease);
    outline: none;
}

.diag-form__field input::placeholder,
.diag-form__field textarea::placeholder {
    color: var(--muted);
}

.diag-form__field input:focus,
.diag-form__field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(72, 200, 192, 0.1);
}

.diag-form__field textarea {
    resize: vertical;
    min-height: 60px;
}

.diag-form .diag-form__submit {
    justify-self: center;
    margin-top: 0;
}

.diag-form .diag-form__note {
    text-align: center;
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: -4px;
}


/* ============================================
   SECTION 7 — CONFORMITE & CONFIANCE
   ============================================ */
.trust__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    max-width: 700px;
    margin: var(--space-2xl) auto 0;
}

.trust__card {
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 2px solid var(--accent);
    border-radius: var(--radius-md);
    transition: border-color var(--ease);
    display: flex;
    flex-direction: column;
}

.trust__card:hover {
    border-color: var(--border-accent);
    border-top-color: var(--accent);
}

.trust__card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--accent-glow);
}

.trust__card-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.5;
}

.trust__card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

.trust__card-desc {
    font-size: 0.8125rem;
    color: var(--text2);
    font-weight: 300;
    line-height: 1.7;
    flex-grow: 1;
}

.trust__refs {
    text-align: center;
    margin-top: var(--space-xl);
    font-size: 0.6875rem;
    color: var(--muted);
    letter-spacing: 1px;
    font-weight: 400;
}


/* ============================================
   SECTION 8 — A PROPOS (reduit)
   ============================================ */
.about {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.about__title {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 400;
    color: var(--text);
    margin-bottom: var(--space-lg);
    line-height: 1.3;
}

.about__desc {
    font-size: 0.9375rem;
    color: var(--text2);
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

.about__credentials {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.about__badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text2);
    font-weight: 400;
}

.about__photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto var(--space-xl);
    border: 2px solid var(--border-accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

.about__quote {
    font-family: var(--font-serif);
    font-size: 0.9375rem;
    color: var(--text);
    font-weight: 400;
    line-height: 1.7;
    font-style: normal;
    padding: var(--space-md) 0;
    border-top: 1px solid var(--border);
    margin: 0;
}


/* ============================================
   SECTION 9 — CONTACT / CTA
   ============================================ */
.cta-section {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(72, 200, 192, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.cta-section__subtitle {
    font-size: clamp(0.9375rem, 1.5vw, 1.125rem);
    color: var(--text2);
    font-weight: 300;
    max-width: 420px;
    margin: 0 auto var(--space-xl);
    line-height: 1.8;
}

.cta-section__big-btn {
    padding: 20px 56px;
    font-size: 1.0625rem;
}

.cta-section__or {
    margin: var(--space-lg) 0;
    font-size: 0.8125rem;
    color: var(--muted);
    font-weight: 300;
}

.cta-section__email {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-size: 0.9375rem;
    font-weight: 400;
    transition: color var(--ease);
}

.cta-section__email:hover {
    color: var(--text);
}

.cta-section__badges {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    flex-wrap: wrap;
}

.cta-badge {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    color: var(--text2);
    font-weight: 400;
}


/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.footer__logo svg {
    height: 20px;
    width: auto;
    display: block;
    margin: 0 auto var(--space-md);
}

.footer__tagline {
    font-size: 0.8125rem;
    color: var(--muted);
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
}

.footer__links {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 300;
    margin-bottom: var(--space-md);
}

.footer__links a {
    color: var(--text2);
    text-decoration: none;
    transition: color var(--ease);
}

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

.footer__legal {
    font-size: 0.6875rem;
    color: var(--muted);
    font-weight: 300;
}


/* ============================================
   MODALE MENTIONS LEGALES
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: var(--space-lg);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: #0A0E1A;
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 640px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: var(--space-xl) var(--space-lg);
    position: relative;
}

.modal__close {
    position: sticky;
    top: 0;
    float: right;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    transition: color var(--ease);
    z-index: 1;
}

.modal__close:hover {
    color: var(--text);
}

.legal {
    max-width: 640px;
    margin: 0 auto;
}

.legal h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.legal p {
    font-size: 0.8125rem;
    color: var(--text2);
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

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


/* ============================================
   RESPONSIVE — Tablette
   ============================================ */
@media (max-width: 1023px) {
    .problem__metrics {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }

    .trust__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .phases {
        flex-wrap: wrap;
        gap: var(--space-md);
    }

    .phase {
        flex: 1 1 calc(50% - var(--space-md));
        min-width: 200px;
    }

    .phase__arrow {
        display: none;
    }

    .estimator {
        grid-template-columns: 1fr;
    }

    .levers__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ============================================
   RESPONSIVE — Mobile
   ============================================ */
@media (max-width: 767px) {
    :root {
        --space-3xl: 64px;
        --space-2xl: 48px;
        --space-xl:  32px;
    }

    .section {
        min-height: auto;
        padding: var(--space-3xl) var(--space-lg);
    }

    /* Nav mobile */
    .nav__toggle {
        display: flex;
    }

    /* Le menu desktop (.nav__links) est cache en mobile, remplace par .mobile-menu fullscreen */
    .nav__links {
        display: none;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: var(--space-2xl);
    }

    .hero__scroll {
        display: none;
    }

    /* Problem */
    .problem__metrics {
        grid-template-columns: 1fr;
        max-width: 320px;
    }

    /* Architecture */
    .arch__stack {
        grid-template-columns: 1fr;
    }

    .arch__layer {
        padding: var(--space-md) var(--space-lg);
    }

    .arch__badges {
        flex-direction: column;
        align-items: center;
    }

    /* Phases — vertical */
    .phases {
        flex-direction: column;
        gap: var(--space-md);
    }

    .phase {
        flex: none;
        min-width: auto;
    }

    .phase__arrow {
        display: none;
    }

    /* Estimator */
    .estimator {
        grid-template-columns: 1fr;
    }

    /* Levers */
    .levers__grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    /* Form */
    .diag-form {
        margin-top: var(--space-lg);
    }
    .diag-form form {
        grid-template-columns: 1fr;
    }

    /* Trust */
    .trust__grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    /* Slider canvas */
    .slider-canvas canvas {
        height: 240px;
    }

    .slider-canvas__zone-labels span {
        font-size: 0.5625rem;
        letter-spacing: 0.5px;
    }

    /* CTA */
    .cta-section__big-btn {
        padding: 16px 40px;
        font-size: 0.9375rem;
    }
}


/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .reveal-child {
        opacity: 1;
        transform: none;
    }

    .hero__logo .logo-line {
        stroke-dashoffset: 0;
    }

    .hero__logo .logo-dot {
        opacity: 1;
    }

    html {
        scroll-behavior: auto;
    }
}


/* ============================================
   Anti-spam — honeypot CSS
   Champ leurre invisible pour les humains,
   mais detectable et rempli par les bots.
   ============================================ */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
