:root {
    --bg: #eef3f2;
    --panel: rgba(255, 255, 255, 0.86);
    --panel-strong: #f7fbfb;
    --surface: #ffffff;
    --text: #17313a;
    --muted: #5c7178;
    --line: rgba(23, 49, 58, 0.12);
    --gold: #c5912f;
    --ink: #19506b;
    --teal: #0d6e6e;
    --sage: #4f7a62;
    --coral: #b86a54;
    --shadow: 0 26px 60px rgba(18, 55, 61, 0.12);
    --shadow-soft: 0 16px 36px rgba(19, 53, 63, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(13, 110, 110, 0.12), transparent 30%),
        radial-gradient(circle at 85% 12%, rgba(25, 80, 107, 0.15), transparent 24%),
        linear-gradient(160deg, #edf4f3 0%, #f8fbfb 48%, #eef5f5 100%);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(23, 49, 58, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 49, 58, 0.03) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 82%);
}

.landing-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

/* Conteneurs principaux */
.hero-panel,
.signal-strip,
.terrain-panel,
.modules-panel,
.production-panel,
.preview-panel,
.difference-panel,
.origin-panel,
.closing-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: var(--panel);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 32px;
    padding: 56px;
}

/* Animations d apparition et de survol */
.hero-copy,
.hero-stage,
.terrain-story,
.terrain-item,
.module-card,
.preview-card,
.difference-card,
.signal-strip article,
.closing-panel {
    animation: rise-in 0.9s ease both;
}

.hero-stage {
    position: relative;
    min-height: 420px;
}

.eyebrow {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(23, 49, 58, 0.14);
    background: rgba(255, 255, 255, 0.55);
    color: var(--ink);
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: -0.03em;
}

h1 {
    margin-top: 18px;
    font-size: clamp(2.8rem, 5vw, 4.8rem);
    line-height: 0.98;
    max-width: 12ch;
}

.hero-lead,
.hero-sublead,
.signal-strip p,
.terrain-story p,
.terrain-item p,
.module-card p,
.preview-card p,
.difference-card p,
.closing-panel p {
    color: var(--muted);
    line-height: 1.7;
    font-size: 1rem;
}

.hero-lead {
    max-width: 58ch;
    margin: 22px 0 0;
    font-size: 1.12rem;
}

.hero-sublead {
    max-width: 56ch;
    margin: 14px 0 0;
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 30px 0;
}

.cta-primary,
.cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 24px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.cta-primary {
    color: #fffaf1;
    background: linear-gradient(135deg, #0c5f63, #1f6e88);
    box-shadow: 0 18px 34px rgba(14, 95, 100, 0.24);
}

.cta-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(23, 49, 58, 0.12);
}

.cta-primary:hover,
.cta-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.hero-points {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.hero-points li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.hero-points li::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #f0c86b);
    box-shadow: 0 0 0 6px rgba(197, 145, 47, 0.14);
}

/* Hero visuel */
.stage-window,
.stage-float-card {
    position: absolute;
    border-radius: 28px;
    border: 1px solid rgba(23, 49, 58, 0.12);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 40px rgba(19, 49, 58, 0.12);
}

.stage-window {
    inset: 18px 48px 58px 0;
    padding: 22px;
}

.stage-float-card {
    right: 0;
    bottom: 0;
    width: 58%;
    padding: 22px;
}

.stage-window-head,
.preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stage-pill,
.stage-status,
.preview-head span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--ink);
    background: rgba(25, 80, 107, 0.08);
}

.stage-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.stage-kpi,
.kpi-box {
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(245, 250, 250, 0.92), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(25, 80, 107, 0.08);
}

.stage-kpi strong,
.kpi-box strong {
    display: block;
    font-size: 1.55rem;
    color: var(--text);
}

.stage-kpi span,
.kpi-box span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.9rem;
}

.stage-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.stage-list-item {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(246, 250, 250, 0.92);
    border: 1px solid rgba(23, 49, 58, 0.08);
}

.stage-dot {
    width: 10px;
    height: 10px;
    margin-top: 7px;
    border-radius: 50%;
}

.stage-dot-alert {
    background: #d37b31;
    box-shadow: 0 0 0 6px rgba(211, 123, 49, 0.12);
}

.stage-dot-ok {
    background: #318964;
    box-shadow: 0 0 0 6px rgba(49, 137, 100, 0.12);
}

.stage-list-item strong,
.stage-float-card strong,
.terrain-story h3,
.module-card h3,
.difference-card h3,
.signal-strip h2,
.closing-panel h2 {
    display: block;
    margin-bottom: 10px;
}

.stage-tag {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(197, 145, 47, 0.14);
    color: #89530a;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* Bandeau de signaux */
.signal-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 24px;
}

.signal-strip article {
    padding: 28px;
}

.signal-strip article + article {
    border-left: 1px solid var(--line);
}

.signal-strip span {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Titres de section */
.terrain-panel,
.modules-panel,
.production-panel,
.preview-panel,
.difference-panel,
.origin-panel {
    margin-top: 24px;
    padding: 34px;
}

.section-heading {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.section-heading h2 {
    font-size: clamp(2rem, 3.2vw, 3.2rem);
    max-width: 16ch;
}

.section-intro {
    max-width: 68ch;
    color: var(--muted);
    line-height: 1.75;
}

/* Section terrain */
.terrain-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.terrain-story,
.terrain-item,
.module-card,
.preview-card,
.difference-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.terrain-story,
.terrain-checklist,
.module-card,
.preview-card,
.difference-card {
    border-radius: 26px;
    border: 1px solid var(--line);
    background: var(--panel-strong);
    box-shadow: 0 10px 24px rgba(20, 53, 62, 0.04);
}

.terrain-story {
    padding: 30px;
}

.terrain-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
}

.terrain-item {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(248, 252, 252, 0.96), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(23, 49, 58, 0.08);
}

/* Cartes modules */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

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

.module-card {
    padding: 24px;
}

.production-card {
    padding: 24px;
    border-radius: 26px;
    border: 1px solid rgba(23, 49, 58, 0.1);
    background: linear-gradient(180deg, rgba(247, 251, 251, 0.98), rgba(255, 255, 255, 0.96));
    box-shadow: 0 10px 24px rgba(20, 53, 62, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.production-card strong {
    display: block;
    margin-bottom: 10px;
}

.module-icon {
    position: relative;
    display: inline-flex;
    width: 54px;
    height: 54px;
    margin-bottom: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(13, 110, 110, 0.12), rgba(25, 80, 107, 0.1));
    border: 1px solid rgba(13, 110, 110, 0.14);
}

.module-icon::before,
.module-icon::after {
    content: "";
    position: absolute;
}

.module-icon-demandes::before {
    inset: 14px 16px;
    border-radius: 8px;
    border: 2px solid var(--ink);
}

.module-icon-demandes::after {
    width: 14px;
    height: 2px;
    left: 20px;
    top: 26px;
    background: var(--ink);
}

.module-icon-planning::before {
    inset: 13px;
    border-radius: 10px;
    border: 2px solid var(--ink);
}

.module-icon-planning::after {
    width: 18px;
    height: 10px;
    left: 18px;
    top: 21px;
    border-top: 2px solid var(--ink);
    border-left: 2px solid var(--ink);
}

.module-icon-rapports::before {
    inset: 12px 16px;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(25, 80, 107, 0.14), rgba(25, 80, 107, 0.04));
}

.module-icon-rapports::after {
    width: 18px;
    height: 2px;
    left: 18px;
    top: 20px;
    background: var(--ink);
    box-shadow: 0 8px 0 var(--ink), 0 16px 0 var(--ink);
}

.module-icon-compteurs::before {
    width: 24px;
    height: 24px;
    left: 15px;
    top: 15px;
    border-radius: 50%;
    border: 2px solid var(--ink);
}

.module-icon-compteurs::after {
    width: 2px;
    height: 10px;
    left: 27px;
    top: 18px;
    background: var(--ink);
}

.module-icon-fuite::before {
    width: 18px;
    height: 24px;
    left: 18px;
    top: 14px;
    background: linear-gradient(180deg, rgba(13, 110, 110, 0.9), rgba(25, 80, 107, 0.8));
    clip-path: polygon(50% 0%, 85% 35%, 100% 62%, 50% 100%, 0% 62%, 15% 35%);
}

.module-icon-carte::before {
    inset: 14px;
    border-radius: 12px;
    border: 2px solid var(--ink);
}

.module-icon-carte::after {
    width: 16px;
    height: 16px;
    left: 19px;
    top: 19px;
    border-radius: 50%;
    border: 2px solid var(--ink);
}

.module-icon-kpi::before {
    width: 8px;
    height: 20px;
    left: 16px;
    bottom: 14px;
    background: var(--ink);
    box-shadow: 12px -8px 0 var(--ink), 24px -2px 0 var(--ink);
}

.module-icon-export::before {
    inset: 13px 18px;
    border-radius: 8px;
    border: 2px solid var(--ink);
}

.module-icon-export::after {
    width: 0;
    height: 0;
    left: 23px;
    top: 18px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid var(--ink);
}

/* Apercu fonctionnel */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
}

.preview-card {
    padding: 22px;
    background: rgba(255, 255, 255, 0.92);
}

.preview-card-dashboard {
    grid-column: span 7;
}

.preview-card-intervention {
    grid-column: span 5;
}

.preview-card-report,
.preview-card-map,
.preview-card-timeline {
    grid-column: span 4;
}

.kpi-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.mini-chart {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
    height: 120px;
    margin-top: 18px;
}

.mini-chart span {
    border-radius: 12px 12px 6px 6px;
    background: linear-gradient(180deg, rgba(13, 110, 110, 0.82), rgba(25, 80, 107, 0.58));
}

.mini-chart span:nth-child(1) { height: 42%; }
.mini-chart span:nth-child(2) { height: 68%; }
.mini-chart span:nth-child(3) { height: 54%; }
.mini-chart span:nth-child(4) { height: 82%; }
.mini-chart span:nth-child(5) { height: 64%; }
.mini-chart span:nth-child(6) { height: 92%; }

.data-list {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.data-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(23, 49, 58, 0.08);
}

.data-list span {
    color: var(--muted);
}

.report-sheet {
    position: relative;
    display: grid;
    gap: 10px;
    margin-top: 18px;
    min-height: 220px;
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f5f7f8);
    border: 1px solid rgba(23, 49, 58, 0.08);
}

.report-line {
    height: 10px;
    border-radius: 999px;
    background: rgba(25, 80, 107, 0.12);
}

.report-line-title {
    width: 56%;
    height: 16px;
}

.report-line-short {
    width: 72%;
}

.report-stamp {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(49, 137, 100, 0.24);
    border-radius: 999px;
    color: #2a7e5a;
    background: rgba(49, 137, 100, 0.08);
    font-weight: 700;
}

.map-canvas {
    position: relative;
    min-height: 220px;
    margin-top: 18px;
    border-radius: 20px;
    background:
        linear-gradient(rgba(23, 49, 58, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 49, 58, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, rgba(223, 243, 239, 0.95), rgba(242, 249, 248, 0.95));
    background-size: 24px 24px, 24px 24px, 100% 100%;
    overflow: hidden;
}

.map-node,
.map-path {
    position: absolute;
}

.map-node {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid var(--teal);
    box-shadow: 0 10px 18px rgba(13, 110, 110, 0.16);
}

.map-node-a { top: 22%; left: 22%; }
.map-node-b { top: 56%; left: 48%; }
.map-node-c { top: 30%; right: 18%; }

.map-path {
    height: 3px;
    background: linear-gradient(90deg, rgba(13, 110, 110, 0.3), rgba(25, 80, 107, 0.55));
    transform-origin: left center;
}

.map-path-a {
    top: 31%;
    left: 28%;
    width: 132px;
    transform: rotate(22deg);
}

.map-path-b {
    top: 52%;
    left: 49%;
    width: 118px;
    transform: rotate(-21deg);
}

.timeline-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.timeline-item {
    position: relative;
    padding: 0 0 0 22px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 6px rgba(13, 110, 110, 0.1);
}

.timeline-item strong {
    display: block;
    margin-bottom: 6px;
}

/* Differenciation */
.difference-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.difference-card {
    padding: 24px;
}

/* Appel a l action final */
.closing-panel {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0;
    margin-top: 24px;
    padding: 36px;
}

.closing-copy {
    display: grid;
    gap: 10px;
    max-width: 640px;
}

.closing-copy h2,
.origin-card h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.02;
}

.origin-card {
    max-width: 760px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.origin-card h2 {
    margin-top: 12px;
    margin-bottom: 14px;
}

.origin-card p + p {
    margin-top: 12px;
}

.terrain-story:hover,
.terrain-item:hover,
.module-card:hover,
.production-card:hover,
.preview-card:hover,
.difference-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(13, 110, 110, 0.18);
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 980px) {
    .hero-panel,
    .terrain-grid,
    .difference-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        padding: 34px 24px;
    }

    .hero-stage {
        min-height: 460px;
    }

    .stage-window {
        inset: 0 42px 72px 0;
    }

    .stage-float-card {
        width: auto;
        left: 24px;
        right: 0;
        bottom: 18px;
    }

    .signal-strip,
    .modules-grid,
    .production-grid,
    .difference-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .terrain-checklist {
        grid-template-columns: 1fr 1fr;
    }

    .preview-card-dashboard,
    .preview-card-intervention,
    .preview-card-report,
    .preview-card-map,
    .preview-card-timeline {
        grid-column: span 6;
    }

    .signal-strip article + article {
        border-left: 0;
    }

    .closing-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

}

@media (max-width: 640px) {
    .landing-shell {
        width: min(100% - 18px, 100%);
        padding-top: 12px;
        padding-bottom: 24px;
    }

    .hero-panel,
    .terrain-panel,
    .modules-panel,
    .production-panel,
    .preview-panel,
    .difference-panel,
    .origin-panel,
    .closing-panel {
        border-radius: 24px;
    }

    .terrain-panel,
    .modules-panel,
    .production-panel,
    .preview-panel,
    .difference-panel,
    .origin-panel {
        padding: 24px 18px;
    }

    h1 {
        font-size: 2.6rem;
    }

    .section-heading h2 {
        max-width: none;
    }

    .hero-actions {
        display: grid;
    }

    .cta-primary,
    .cta-secondary {
        width: 100%;
    }

    .hero-stage {
        min-height: 430px;
    }

    .stage-window,
    .stage-float-card {
        padding: 18px;
        border-radius: 22px;
    }

    .stage-window {
        right: 0;
        bottom: 94px;
    }

    .stage-kpis,
    .kpi-row,
    .terrain-checklist,
    .modules-grid,
    .production-grid,
    .difference-grid,
    .signal-strip {
        grid-template-columns: 1fr;
    }

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

    .preview-card-dashboard,
    .preview-card-intervention,
    .preview-card-report,
    .preview-card-map,
    .preview-card-timeline {
        grid-column: span 1;
    }

    .stage-window-head,
    .preview-head,
    .data-list li {
        display: grid;
    }

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

}
