/* =====================================================
   Landing page outsend
   ===================================================== */

/* ---- Reveal-on-scroll animation ---- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Header transparent ---- */
.landing-header {
    background: rgba(245, 242, 237, 0.85);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 50;
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
    position: relative;
    overflow: hidden;
    padding: 80px 0 100px;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.hero-glow {
    position: absolute;
    top: -180px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(closest-side, rgba(48,138,116,0.18), rgba(48,138,116,0));
    filter: blur(20px);
    animation: glow-pulse 6s ease-in-out infinite;
}
@keyframes glow-pulse {
    0%, 100% { opacity: 0.85; transform: translateX(-50%) scale(1); }
    50%      { opacity: 1.0;  transform: translateX(-50%) scale(1.04); }
}
.hero-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(13,93,92,0.10) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 50%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 50%, transparent 90%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 980px;
    text-align: center;
}

.hero-eyebrow { margin-bottom: 24px; }
.hero-pill {
    display: inline-block;
    padding: 7px 16px;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    color: var(--accent-text);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    animation: pill-pop 0.6s ease-out;
}
@keyframes pill-pop {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.hero-title {
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 700;
    margin: 0 0 22px;
    animation: fade-up 0.8s ease-out;
}
.hero-accent {
    color: var(--accent);
    background: linear-gradient(135deg, var(--accent), #1f6b58);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
@keyframes fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-sub {
    font-size: clamp(15px, 1.6vw, 19px);
    color: var(--ink-muted);
    max-width: 700px;
    margin: 0 auto 36px;
    line-height: 1.55;
    animation: fade-up 0.9s ease-out 0.1s backwards;
}
.hero-sub strong { color: var(--ink); }

.hero-ctas {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
    animation: fade-up 1s ease-out 0.2s backwards;
}

.btn-lg {
    padding: 14px 28px !important;
    font-size: 15px !important;
    font-weight: 600;
}

/* ---- Stack visuel : 6 cards qui flottent ---- */
.hero-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    max-width: 760px;
    margin: 0 auto;
}
.stack-card {
    padding: 14px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-muted);
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    animation: stack-float 6s ease-in-out infinite;
    opacity: 0;
    animation-fill-mode: forwards;
}
.stack-card span {
    display: block;
    font-size: 22px;
    margin-bottom: 4px;
    font-family: system-ui, sans-serif;
}
.stack-card-1 { animation-delay: 0s,    0.4s; }
.stack-card-2 { animation-delay: 0.5s,  0.5s; }
.stack-card-3 { animation-delay: 1.0s,  0.6s; }
.stack-card-4 { animation-delay: 1.5s,  0.7s; }
.stack-card-5 { animation-delay: 2.0s,  0.8s; }
.stack-card-6 { animation-delay: 2.5s,  0.9s; background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }

/* Combine 2 animations : entrée fade-in + flottement subtil permanent. */
@keyframes stack-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}
.stack-card {
    animation:
        stack-fade-in 0.6s ease-out forwards,
        stack-float 6s ease-in-out infinite;
}
@keyframes stack-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   SECTIONS génériques
   ===================================================== */
.section {
    padding: 90px 0;
}
.section-thin { padding: 60px 0; }
.section-dark {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    max-width: 760px;
    margin: 0 auto 56px;
    text-align: center;
}
.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-text);
    margin-bottom: 14px;
    font-weight: 600;
}
.section-title {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0 0 16px;
    font-weight: 700;
}
.section-sub {
    font-size: 16px;
    color: var(--ink-muted);
    line-height: 1.55;
    margin: 0;
}

/* =====================================================
   MODULES grid
   ===================================================== */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}
.module-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.module-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--accent);
}
.module-icon {
    font-size: 28px;
    margin-bottom: 12px;
    line-height: 1;
}
.module-card h3 {
    font-size: 17px;
    margin: 0 0 10px;
    font-weight: 600;
}
.module-card p {
    font-size: 13.5px;
    color: var(--ink-muted);
    line-height: 1.55;
    margin: 0;
}
.module-card-feature {
    background: linear-gradient(135deg, var(--accent), #1f6b58);
    border-color: var(--accent);
    color: #fff;
}
.module-card-feature h3,
.module-card-feature p { color: #fff; }
.module-card-feature p { opacity: 0.92; }
.module-card-feature .mono {
    background: rgba(255,255,255,0.18);
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 12px;
}
.module-card-feature:hover {
    box-shadow: 0 12px 32px rgba(48,138,116,0.4);
}

/* =====================================================
   POURQUOI grid
   ===================================================== */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}
.why-card {
    padding: 28px 26px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.why-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.why-num {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 12px;
    letter-spacing: 0.12em;
    font-weight: 700;
}
.why-card h3 {
    font-size: 19px;
    margin: 0 0 12px;
    font-weight: 600;
}
.why-card p {
    font-size: 14px;
    color: var(--ink-muted);
    line-height: 1.6;
    margin: 0;
}
.why-card p strong { color: var(--ink); }
.why-card .mono {
    background: var(--bg-soft);
    color: var(--ink);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 12px;
}

/* =====================================================
   DBL banner
   ===================================================== */
.dbl-banner-section {
    padding: 60px 0 100px;
}
.dbl-banner {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 32px;
    background: linear-gradient(135deg, #0D5D5C 0%, #1f6b58 100%);
    color: #fff;
    border-radius: var(--r-lg);
    padding: 48px 48px 44px;
    overflow: hidden;
    position: relative;
}
.dbl-banner::before {
    /* Halo lumineux décor */
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    width: 360px;
    height: 360px;
    background: radial-gradient(closest-side, rgba(255,255,255,0.18), transparent);
    pointer-events: none;
}
.dbl-banner-side {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12px;
}
.dbl-pulse {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255,255,255,0.6);
    animation: dbl-pulse 1.6s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes dbl-pulse {
    0%   { box-shadow: 0 0 0 0  rgba(255,255,255,0.6); }
    70%  { box-shadow: 0 0 0 18px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0  rgba(255,255,255,0); }
}

.dbl-banner-main { position: relative; z-index: 1; }
.dbl-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    margin-bottom: 14px;
    font-weight: 600;
}
.dbl-title {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin: 0 0 18px;
    font-weight: 700;
    color: #fff;
}
.dbl-title strong { font-weight: 700; }
.dbl-title .hero-accent {
    background: linear-gradient(135deg, #FFE7B0, #FFC97A);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.dbl-sub {
    font-size: 15.5px;
    line-height: 1.65;
    margin: 0 0 28px;
    color: rgba(255,255,255,0.92);
    max-width: 640px;
}
.dbl-sub strong { color: #fff; font-weight: 700; }

.dbl-ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.dbl-banner .btn-accent {
    background: #fff;
    color: var(--accent);
    border-color: #fff;
}
.dbl-banner .btn-accent:hover {
    background: rgba(255,255,255,0.92);
}
.dbl-banner .btn-ghost {
    color: #fff;
    border-color: rgba(255,255,255,0.4);
    background: transparent;
}
.dbl-banner .btn-ghost:hover {
    background: rgba(255,255,255,0.12);
    border-color: #fff;
}

/* =====================================================
   FOOTER CTA
   ===================================================== */
.footer-cta {
    text-align: center;
    padding: 40px 20px;
}
.footer-cta-text {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 600;
    margin: 0 0 24px;
    line-height: 1.3;
    color: var(--ink);
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 700px) {
    .hero { padding: 60px 0 70px; }
    .section { padding: 64px 0; }
    .dbl-banner {
        grid-template-columns: 1fr;
        padding: 36px 28px 32px;
        gap: 16px;
    }
    .dbl-banner-side { padding: 0; }
    .hero-stack { grid-template-columns: repeat(2, 1fr); }
    .hero-ctas { flex-direction: column; align-items: stretch; }
    .hero-ctas .btn { width: 100%; }
    .nav-links a { display: none; }
    .nav-links a.btn { display: inline-flex; }
    .nav-links a:nth-last-child(-n+2) { display: inline-flex; }
}

/* =====================================================
   Hero stack — variante "à venir"
   ===================================================== */
.stack-card-coming {
    /* Override l'animation `forwards` de .stack-card qui forcerait opacity:1.
       On utilise un keyframe dédié qui se termine à 0.55 pour grisaille. */
    border-style: dashed;
    background: var(--bg-soft);
    color: var(--ink-muted);
    position: relative;
    animation:
        stack-fade-in-coming 0.6s ease-out forwards,
        stack-float 6s ease-in-out infinite;
}
@keyframes stack-fade-in-coming {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 0.55; transform: translateY(0); }
}
.stack-card-coming::after {
    content: "À venir";
    position: absolute;
    top: -7px;
    right: 8px;
    background: var(--ink-muted);
    color: var(--bg);
    font-size: 8px;
    font-family: var(--font-mono);
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    line-height: 1.2;
}

/* =====================================================
   PIPELINE DEMO — visuel d'un pipeline en action
   ===================================================== */
.pipeline-demo-section {
    padding: 70px 0 90px;
    background: var(--bg);
}

.pipeline-demo {
    max-width: 960px;
    margin: 0 auto;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
}

/* Toolbar mock */
.pipeline-demo-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--ink);
}
.pipeline-demo-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}
.pipeline-demo-dot {
    width: 9px;
    height: 9px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(48,138,116,0.6);
    animation: pipeline-demo-dot-pulse 1.4s ease-in-out infinite;
}
@keyframes pipeline-demo-dot-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(48,138,116,0.6); }
    70%  { box-shadow: 0 0 0 10px rgba(48,138,116,0); }
    100% { box-shadow: 0 0 0 0 rgba(48,138,116,0); }
}
.pipeline-demo-running {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent-text);
    background: var(--accent-soft);
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.04em;
}

/* Canvas */
.pipeline-demo-canvas {
    position: relative;
    height: 320px;
    background-image: radial-gradient(circle, var(--ink-faint) 1px, transparent 1px);
    background-size: 24px 24px;
    background-color: var(--bg);
    overflow: hidden;
}
.pipeline-demo-edges {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.pipeline-demo-edge {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-dasharray: 6 5;
    animation: pipeline-demo-flow 1.2s linear infinite;
    opacity: 0.7;
}
@keyframes pipeline-demo-flow {
    to { stroke-dashoffset: -22; }
}

/* Blocs */
.pipeline-demo-node {
    position: absolute;
    width: 200px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 14px rgba(0,0,0,0.08);
    z-index: 2;
    animation: pipeline-demo-node-in 0.6s ease-out backwards;
}
.node-scrap   { animation-delay: 0s; }
.node-emails  { animation-delay: 0.15s; }
.node-verify  { animation-delay: 0.3s; }
.node-socials { animation-delay: 0.3s; }
.node-tech    { animation-delay: 0.3s; }

@keyframes pipeline-demo-node-in {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.pipeline-demo-node-head {
    padding: 8px 12px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    border-top-left-radius: var(--r-md);
    border-top-right-radius: var(--r-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}
.node-scrap   .pipeline-demo-node-head { background: rgba(48, 138, 116, 0.10); }
.node-emails  .pipeline-demo-node-head { background: rgba(110, 100, 200, 0.10); }
.node-verify  .pipeline-demo-node-head { background: rgba(60, 160, 110, 0.12); }
.node-socials .pipeline-demo-node-head { background: rgba(220, 100, 140, 0.10); }
.node-tech    .pipeline-demo-node-head { background: rgba(80, 100, 130, 0.10); }

.pipeline-demo-node-body {
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-muted);
}

.pipeline-demo-port {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--bg);
    border: 2px solid var(--accent);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}
.pipeline-demo-port-in {
    left: -7px;
}
.pipeline-demo-port-out {
    right: -7px;
    background: var(--accent);
}

/* Légende */
.pipeline-demo-legend {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    font-size: 13px;
    color: var(--ink-muted);
}
.pipeline-demo-legend strong {
    color: var(--accent);
    font-family: var(--font-mono);
    margin-right: 4px;
}

/* =====================================================
   MOBILE — landing
   ===================================================== */

@media (max-width: 900px) {
    /* Pipeline demo : on bascule sur scroll horizontal au lieu de scale,
       comme ça les blocs gardent leur lisibilité et leurs interactions */
    .pipeline-demo-canvas {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .pipeline-demo-canvas::after {
        content: "← faites glisser pour voir →";
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 10px;
        color: var(--ink-muted);
        font-family: var(--font-mono);
        pointer-events: none;
    }
    /* Force une largeur min pour que le scroll horizontal fonctionne */
    .pipeline-demo-canvas > svg,
    .pipeline-demo-canvas > .pipeline-demo-node:last-child { /* hack pour étendre le scroll */ }
    .pipeline-demo-edges { min-width: 900px; }
}

@media (max-width: 700px) {
    /* Hero : padding réduit, CTAs full-width */
    .hero { padding: 50px 0 60px; }
    .hero-title { font-size: clamp(28px, 8vw, 36px); }
    .hero-sub { font-size: 14.5px; }
    .hero-pill { font-size: 10px; padding: 6px 12px; }
    .hero-ctas { flex-direction: column; align-items: stretch; gap: 10px; }
    .hero-ctas .btn { width: 100%; }
    .btn-lg { padding: 12px 22px !important; font-size: 14px !important; }

    /* Hero stack : grid plus dense (cards plus petits) */
    .hero-stack {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    .stack-card { padding: 10px 8px; font-size: 10px; }
    .stack-card span { font-size: 18px; }

    /* Sections : padding réduit */
    .section { padding: 56px 0; }
    .section-thin { padding: 40px 0; }
    .section-header { margin-bottom: 36px; }
    .section-title { font-size: clamp(22px, 5vw, 30px); }
    .section-sub { font-size: 14px; }

    /* DBL banner : column layout, padding réduit */
    .dbl-banner { padding: 28px 22px 26px; gap: 14px; }
    .dbl-title { font-size: clamp(22px, 5vw, 30px); }
    .dbl-sub { font-size: 14.5px; }
    .dbl-banner-side { display: none; }
    .dbl-banner-section { padding: 40px 0 60px; }

    /* Pipeline demo : on cache la toolbar mock + on resserre */
    .pipeline-demo-canvas { height: 280px; }
    .pipeline-demo-toolbar { padding: 8px 12px; font-size: 11px; }
    .pipeline-demo-legend {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
        padding: 12px;
        font-size: 12px;
    }

    /* Modules grid : single col sur très petit écran */
    .modules-grid { grid-template-columns: 1fr; gap: 12px; }
    .module-card { padding: 18px 16px; }
    .module-card h3 { font-size: 16px; }

    /* Why grid : single col */
    .why-grid { grid-template-columns: 1fr; gap: 14px; }
    .why-card { padding: 22px 20px; }
    .why-card h3 { font-size: 17px; }
    .why-card p { font-size: 13.5px; }

    /* Footer CTA */
    .footer-cta-text { font-size: clamp(18px, 5vw, 22px); }

    /* Header landing : nav mobile-friendly */
    .landing-header .nav-links a:not(.btn) {
        font-size: 12px;
        padding: 4px 6px;
    }
    /* Cache "Produit / Pourquoi / Pour DBL" sur mobile, garde Login + CTA */
    .landing-header .nav-links a[href^="#"] { display: none; }
}

@media (max-width: 480px) {
    /* Hero plus compact */
    .hero { padding: 36px 0 48px; }
    .hero-title { font-size: 26px; }

    /* Stack cards encore plus compactes */
    .hero-stack { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .stack-card { padding: 8px 6px; font-size: 9.5px; }
    .stack-card span { font-size: 16px; }
    .stack-card-coming::after { font-size: 7px; padding: 1px 5px; right: 4px; }

    /* DBL banner padding */
    .dbl-banner { padding: 22px 18px; }
    .dbl-ctas { flex-direction: column; }
    .dbl-ctas .btn { width: 100%; }
}

/* Stack card "Sur demande" : ton orange chaud (active mais setup admin) */
.stack-card-ondemand {
    background: rgba(212, 160, 23, 0.10);
    border-color: #d4a017;
    color: #8a6810;
}
.stack-card-ondemand::after {
    content: "Sur demande";
    position: absolute;
    top: -7px;
    right: 8px;
    background: #d4a017;
    color: #fff;
    font-size: 8px;
    font-family: var(--font-mono);
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.stack-card { position: relative; }
