:root {
    --abysse: #04263F;
    --ocean: #075985;
    --azur: #0E9FD8;
    --turquoise: #14C6C6;
    --lagon: #7FE8E0;
    --ecume: #F2FBFC;
    --ecume-2: #E3F5F7;
    --ink: #0A3A52;
    --ink-2: #47708A;
    --line: rgba(10, 58, 82, 0.14);
    --line-soft: rgba(10, 58, 82, 0.08);
    --font-display: 'Archivo', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-display);
    background: var(--ecume);
    color: var(--ink);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--turquoise); color: #fff; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Top utility bar ---------- */
.topbar {
    background: var(--abysse);
    color: rgba(255,255,255,0.85);
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.06em;
}
.topbar .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 34px;
    gap: 16px;
}
.topbar a { color: var(--lagon); text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar .left { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Nav ---------- */
header.nav {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(242, 251, 252, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
}
.nav .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
}
.brand {
    text-decoration: none;
    color: var(--ink);
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.brand .name {
    font-weight: 800;
    font-stretch: 115%;
    font-size: 19px;
}
.brand .tag {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--azur);
    text-transform: uppercase;
}
nav.menu { display: flex; align-items: center; gap: 28px; }
nav.menu a {
    text-decoration: none;
    color: var(--ink-2);
    font-size: 15px;
    font-weight: 500;
    transition: color .15s;
}
nav.menu a:hover { color: var(--azur); }
nav.menu a.btn-solid, nav.menu a.btn-solid:hover { color: #fff; }

.btn {
    display: inline-block;
    text-decoration: none;
    font-weight: 650;
    font-size: 15px;
    padding: 13px 28px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, background .18s, color .18s;
}
.btn-solid {
    background: linear-gradient(120deg, var(--azur), var(--turquoise));
    color: #fff;
    box-shadow: 0 6px 18px rgba(14, 159, 216, 0.35);
}
.btn-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(20, 198, 198, 0.45);
}
.btn-ghost {
    border-color: rgba(255,255,255,0.65);
    color: #fff;
}
.btn-ghost:hover { background: rgba(255,255,255,0.14); }
.btn-outline {
    border-color: var(--azur);
    color: var(--ocean);
}
.btn-outline:hover { background: var(--azur); color: #fff; }
.nav .btn { padding: 10px 22px; font-size: 14px; }

.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--ink);
    margin: 5px 0;
}
.mobile-menu {
    display: none;
    border-top: 1px solid var(--line-soft);
    background: var(--ecume);
    padding: 12px 24px 20px;
}
.mobile-menu a {
    display: block;
    padding: 12px 0;
    text-decoration: none;
    color: var(--ink);
    font-weight: 500;
    border-bottom: 1px solid var(--line-soft);
}
.mobile-menu.open { display: block; }

/* ---------- Hero : plongée ---------- */
.hero {
    position: relative;
    color: #fff;
    background: linear-gradient(168deg, var(--abysse) 0%, var(--ocean) 38%, var(--azur) 74%, var(--turquoise) 100%);
    overflow: hidden;
}
#water-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
/* caustiques : taches de lumière qui dérivent (repli si WebGL indisponible) */
.hero .caustic {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    pointer-events: none;
    animation: drift 14s ease-in-out infinite alternate;
}
.hero .c1 { width: 480px; height: 480px; background: rgba(127, 232, 224, 0.5); top: -120px; right: -80px; }
.hero .c2 { width: 380px; height: 380px; background: rgba(14, 159, 216, 0.55); bottom: 40px; left: -120px; animation-delay: -5s; }
.hero .c3 { width: 260px; height: 260px; background: rgba(255, 255, 255, 0.22); top: 30%; left: 38%; animation-delay: -9s; }
@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(50px, 36px) scale(1.15); }
}
.hero .wrap {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    gap: 56px;
    align-items: center;
    padding-top: 92px;
    padding-bottom: 150px;
}
.hero .kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--lagon);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hero .kicker::before {
    content: '';
    width: 34px; height: 1.5px;
    background: var(--lagon);
}
.hero h1 {
    font-weight: 850;
    font-stretch: 112%;
    font-size: clamp(38px, 5.2vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.015em;
    margin-bottom: 24px;
    text-wrap: balance;
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(92deg, var(--lagon), #B8F7F0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p.lead {
    font-size: 18px;
    color: rgba(255,255,255,0.88);
    max-width: 46ch;
    margin-bottom: 38px;
}
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }

.fig { position: relative; }
.fig .frame {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(4, 38, 63, 0.45);
    border: 3px solid rgba(255,255,255,0.35);
}
.fig img {
    display: block;
    width: 100%;
    height: 360px;
    object-fit: cover;
}
.fig .frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(200deg, rgba(127,232,224,0.15), transparent 45%, rgba(4,38,63,0.25));
    pointer-events: none;
}
.fig .readings {
    position: absolute;
    z-index: 3;
    bottom: -24px;
    left: -18px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 11.5px;
    line-height: 1.9;
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(4, 38, 63, 0.3);
}
.fig .readings b { color: var(--ocean); font-weight: 500; }
.fig .readings .dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--turquoise);
    margin-right: 7px;
    animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* vague en bas du hero */
.wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 3;
    line-height: 0;
}
.wave svg { display: block; width: 100%; height: 70px; }

/* ---------- Marquee villes ---------- */
.marquee {
    background: var(--ecume);
    overflow: hidden;
    white-space: nowrap;
    padding: 15px 0;
    border-bottom: 1px solid var(--line-soft);
}
.marquee .track {
    display: inline-block;
    animation: slide 45s linear infinite;
    will-change: transform;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-2);
}
.marquee .track span { margin: 0 26px; }
.marquee .track span::after {
    content: '~';
    margin-left: 52px;
    color: var(--turquoise);
}
@keyframes slide {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (max-width: 640px) {
    .marquee .track { font-size: 11px; }
    .marquee .track span { margin: 0 14px; }
    .marquee .track span::after { margin-left: 28px; }
}

/* ---------- Sections ---------- */
section { padding: 92px 0; }
.sec-head { text-align: center; margin-bottom: 56px; }
.sec-head .num {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--azur);
    display: block;
    margin-bottom: 12px;
}
.sec-head h2 {
    font-weight: 820;
    font-stretch: 110%;
    font-size: clamp(28px, 3.4vw, 42px);
    letter-spacing: -0.01em;
}
.sec-head .sub {
    color: var(--ink-2);
    max-width: 54ch;
    margin: 14px auto 0;
}
.sec-head .squiggle { margin-top: 18px; }
.sec-head .squiggle svg { width: 90px; height: 12px; }

/* ---------- Services ---------- */
.services { background: var(--ecume); }
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.service-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px 28px;
    border: 1px solid var(--line-soft);
    box-shadow: 0 4px 16px rgba(10, 58, 82, 0.05);
    transition: transform .2s, box-shadow .2s;
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--azur), var(--turquoise));
    opacity: 0;
    transition: opacity .2s;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(14, 159, 216, 0.18);
}
.service-card:hover::before { opacity: 1; }
.service-card .icon {
    width: 52px; height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(14,159,216,0.12), rgba(20,198,198,0.16));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.service-card .icon svg { width: 26px; height: 26px; stroke: var(--azur); }
.service-card .idx {
    position: absolute;
    top: 22px; right: 24px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--turquoise);
    letter-spacing: 0.08em;
}
.service-card h3 {
    font-weight: 720;
    font-size: 19px;
    font-stretch: 106%;
    margin-bottom: 8px;
}
.service-card p { color: var(--ink-2); font-size: 15px; }

/* ---------- Sites ---------- */
.sites {
    background: linear-gradient(180deg, var(--ecume-2), var(--ecume));
}
#map-sites {
    width: 100%;
    height: 440px;
    border-radius: 22px;
    border: 3px solid #fff;
    box-shadow: 0 16px 44px rgba(10, 58, 82, 0.14);
    margin-bottom: 36px;
}
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.site-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px 20px;
    border: 1px solid var(--line-soft);
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.site-card:hover {
    transform: translateY(-3px);
    border-color: var(--turquoise);
    box-shadow: 0 10px 26px rgba(20, 198, 198, 0.18);
}
.site-card h4 { font-weight: 650; font-size: 15.5px; margin-bottom: 3px; }
.site-card .city {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--azur);
}
.sites-note {
    margin-top: 20px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-2);
    letter-spacing: 0.05em;
}

/* ---------- À propos ---------- */
.apropos { background: var(--ecume); }
.apropos .cols {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 60px;
    align-items: center;
}
.apropos .sec-head { text-align: left; margin-bottom: 28px; }
.apropos p.body { font-size: 17.5px; color: var(--ink-2); margin-bottom: 28px; }
.checklist { list-style: none; }
.checklist li {
    padding: 12px 0 12px 34px;
    position: relative;
    font-weight: 500;
    font-size: 16px;
}
.checklist li::before {
    content: '';
    position: absolute;
    left: 0; top: 15px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--azur), var(--turquoise));
}
.checklist li::after {
    content: '';
    position: absolute;
    left: 5px; top: 20px;
    width: 9px; height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
}
.stats {
    border-radius: 24px;
    background: linear-gradient(160deg, var(--ocean), var(--azur) 60%, var(--turquoise));
    color: #fff;
    padding: 38px 34px;
    box-shadow: 0 20px 50px rgba(14, 159, 216, 0.3);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 20px;
}
.stats .val {
    font-family: var(--font-mono);
    font-size: 36px;
    font-weight: 500;
    line-height: 1.1;
}
.stats .lbl {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    margin-top: 6px;
}

/* ---------- Contact ---------- */
.contact-wave { background: var(--ecume); line-height: 0; }
.contact-wave svg { display: block; width: 100%; height: 70px; }
.contact {
    background: linear-gradient(172deg, var(--ocean) 0%, var(--abysse) 80%);
    color: rgba(255,255,255,0.92);
    position: relative;
    overflow: hidden;
}
.contact .caustic {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.35;
    pointer-events: none;
}
.contact .cc1 { width: 420px; height: 420px; background: var(--turquoise); top: -100px; right: -80px; }
.contact .cc2 { width: 320px; height: 320px; background: var(--azur); bottom: -60px; left: -60px; }
.contact .wrap { position: relative; z-index: 2; }
.contact .sec-head h2 { color: #fff; }
.contact .sec-head .num { color: var(--lagon); }
.contact .cols {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 56px;
    align-items: start;
}
.info-item {
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,0.14);
}
.info-item .lbl {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lagon);
    margin-bottom: 5px;
}
.info-item .val { font-size: 18px; font-weight: 600; color: #fff; }
.info-item .val a { color: #fff; text-decoration: none; }
.info-item .val a:hover { color: var(--lagon); }

.form-panel {
    background: #fff;
    color: var(--ink);
    padding: 38px;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(4, 38, 63, 0.4);
}
.form-panel h3 {
    font-weight: 750;
    font-stretch: 108%;
    font-size: 21px;
    margin-bottom: 24px;
}
.field { margin-bottom: 18px; }
.field label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-2);
    margin-bottom: 7px;
}
.field input, .field select, .field textarea {
    width: 100%;
    padding: 13px 16px;
    font-family: var(--font-display);
    font-size: 15.5px;
    color: var(--ink);
    background: var(--ecume);
    border: 1.5px solid var(--line-soft);
    border-radius: 12px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    appearance: auto;
}
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--turquoise);
    box-shadow: 0 0 0 3px rgba(20, 198, 198, 0.18);
}
.field textarea { resize: vertical; min-height: 110px; }
.form-panel .btn-solid { width: 100%; padding: 15px; font-size: 16px; border: none; }
#form-message {
    display: none;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 14.5px;
    border-radius: 12px;
    border: 1px solid;
}
#form-message.ok {
    display: block;
    background: #E6F7EC;
    border-color: #34A263;
    color: #1F7546;
}
#form-message.err {
    display: block;
    background: #FBEBE8;
    border-color: #C74B36;
    color: #9C3A2A;
}

/* ---------- Footer ---------- */
footer {
    background: var(--abysse);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 26px 0;
}
footer .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.55);
}
footer a { color: rgba(255,255,255,0.35); text-decoration: none; }
footer a:hover { color: var(--lagon); }

/* ---------- Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Leaflet ---------- */
.leaflet-popup-content-wrapper {
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(4, 38, 63, 0.25);
}
.leaflet-popup-content { font-family: var(--font-display); margin: 12px 16px; }
.tepi-marker { background: none; border: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    nav.menu { display: none; }
    .burger { display: block; }
    .hero .wrap { grid-template-columns: 1fr; gap: 52px; padding-top: 60px; padding-bottom: 130px; }
    .fig .readings { left: 8px; bottom: -20px; }
    .services-grid { grid-template-columns: 1fr; }
    .apropos .cols, .contact .cols { grid-template-columns: 1fr; gap: 44px; }
    section { padding: 64px 0; }
    .topbar .left { display: none; }
    .topbar .wrap { justify-content: center; }
}

/* ---------- Note RGPD ---------- */
.rgpd-note {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--ink-2);
    line-height: 1.5;
}
.rgpd-note a { color: var(--azur); }

/* ---------- Retour en haut ---------- */
#scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 800;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--azur), var(--turquoise));
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(14, 159, 216, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s, transform .25s, visibility .25s;
}
#scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: none;
}
#scroll-top svg { width: 20px; height: 20px; }

/* ---------- Page mentions légales ---------- */
.legal {
    max-width: 760px;
    margin: 0 auto;
    padding: 64px 24px 96px;
}
.legal h1 {
    font-weight: 820;
    font-stretch: 110%;
    font-size: clamp(30px, 4vw, 42px);
    margin-bottom: 40px;
}
.legal h2 {
    font-weight: 720;
    font-size: 20px;
    margin: 36px 0 12px;
    color: var(--ocean);
}
.legal p, .legal li { color: var(--ink-2); font-size: 15.5px; }
.legal ul { padding-left: 22px; margin: 10px 0; }
.legal a { color: var(--azur); }
