/* =====================================================================
   Page d'accueil publique. Palette claire : bleus profonds sur blancs
   cassés et gris tres pales. Autonome — ni Bootstrap ni MudBlazor — pour
   s'afficher instantanement.
   ===================================================================== */
:root {
    --bleu: #1c5fd4;
    --bleu-clair: #3884ff;
    --bleu-pale: #eaf1fe;
    --encre: #16202e;
    --gris: #5b6b80;
    --gris-pale: #eef2f7;
    --ligne: #dde5ef;
    --blanc: #ffffff;
    --fond: #f7f9fc;
    --vert: #129d5f;
    --ambre: #e08a00;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--fond);
    color: var(--encre);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

a { color: var(--bleu); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------- entete */
header.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.88);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--ligne);
}

.nav-in { display: flex; align-items: center; gap: 20px; height: 66px; }

.brand {
    display: flex; align-items: center; gap: 10px;
    font-size: 19px; font-weight: 650; letter-spacing: -.4px;
    color: var(--encre); text-decoration: none;
}

    .brand em { font-style: normal; font-weight: 400; color: var(--gris); }

.nav-links { display: flex; gap: 26px; margin-left: 18px; }

    .nav-links a {
        color: var(--gris); text-decoration: none; font-size: 14.5px; font-weight: 500;
    }

        .nav-links a:hover { color: var(--encre); }

.spacer { flex: 1 1 auto; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px; border-radius: 10px;
    font-size: 14.5px; font-weight: 600; text-decoration: none;
    border: 1px solid transparent; cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .08s ease;
}

.btn-primary { background: var(--bleu); color: #fff; }
    .btn-primary:hover { background: #174fb3; }
    .btn-primary:active { transform: scale(.985); }

.btn-ghost { background: #fff; color: var(--encre); border-color: var(--ligne); }
    .btn-ghost:hover { border-color: #c3d2e6; }

.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 12px; }

/* --------------------------------------------------------------- hero */
.hero { padding: 68px 0 40px; }

.hero-grid {
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    gap: 52px;
    align-items: center;
}

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 13px; border-radius: 999px;
    background: var(--bleu-pale); color: var(--bleu);
    font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
    margin-bottom: 18px;
}

    .eyebrow b { font-weight: 700; }

h1.title {
    margin: 0 0 18px;
    font-size: clamp(34px, 4.2vw, 54px);
    line-height: 1.08;
    letter-spacing: -1.6px;
    font-weight: 680;
}

    h1.title span { color: var(--bleu); }

.lede { margin: 0 0 26px; font-size: 18px; color: var(--gris); max-width: 46ch; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.cta-note { font-size: 13px; color: var(--gris); margin-top: 14px; }

/* ------------------------------------------------- carte de la vitrine */
.demo {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--ligne);
    background: #dfe7f0;
    box-shadow: 0 24px 60px -28px rgba(22,32,46,.42);
    aspect-ratio: 4 / 3.2;
}

#demoMap { position: absolute; inset: 0; }

.demo-badge {
    position: absolute; top: 14px; left: 14px; z-index: 3;
    display: flex; align-items: center; gap: 8px;
    padding: 7px 13px; border-radius: 999px;
    background: rgba(255,255,255,.94);
    border: 1px solid var(--ligne);
    font-size: 12.5px; font-weight: 600;
    box-shadow: 0 4px 14px rgba(22,32,46,.10);
}

.live-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--vert);
    animation: blink 1.7s ease-in-out infinite;
}

@keyframes blink { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

.demo-hud {
    position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 3;
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px; border-radius: 13px;
    background: rgba(255,255,255,.95);
    border: 1px solid var(--ligne);
    box-shadow: 0 8px 26px rgba(22,32,46,.13);
}

.hud-name { font-weight: 620; font-size: 14.5px; }
.hud-sub { font-size: 12px; color: var(--gris); }
.hud-speed { margin-left: auto; text-align: right; }
    .hud-speed b { font-size: 24px; font-weight: 660; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
    .hud-speed span { font-size: 11px; color: var(--gris); display: block; margin-top: -2px; }

/* Curseur de vehicule sur la carte vitrine. */
.demo-marker { position: absolute; top: 0; left: 0; will-change: transform; }

.dm-pin {
    width: 40px; height: 40px; margin: -20px 0 0 -20px;
    filter: drop-shadow(0 3px 6px rgba(22,32,46,.35));
}

    .dm-pin svg { transform-origin: 50% 50%; transition: transform .5s ease; }

/* ------------------------------------------------------------ bandeau */
.strip {
    border-top: 1px solid var(--ligne);
    border-bottom: 1px solid var(--ligne);
    background: #fff;
    padding: 26px 0;
    margin-top: 46px;
}

.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; text-align: center; }

.strip b { display: block; font-size: 27px; font-weight: 680; letter-spacing: -.7px; }
.strip span { font-size: 13px; color: var(--gris); }

/* ---------------------------------------------------------- sections */
section { padding: 76px 0; }

.sec-head { text-align: center; max-width: 620px; margin: 0 auto 46px; }

    .sec-head h2 {
        margin: 0 0 12px;
        font-size: clamp(26px, 3vw, 36px);
        letter-spacing: -1px;
        font-weight: 660;
    }

    .sec-head p { margin: 0; color: var(--gris); font-size: 17px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Icone et titre sur la MEME ligne, texte en dessous sur toute la largeur.
   Une grille plutot qu'un flex : elle place les trois elements sans avoir
   a ajouter le moindre conteneur dans le HTML. */
.card {
    background: #fff;
    border: 1px solid var(--ligne);
    border-radius: 15px;
    padding: 24px 26px;
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 0 14px;
    align-items: center;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

    .card:hover {
        border-color: #c3d2e6;
        transform: translateY(-2px);
        box-shadow: 0 14px 34px -20px rgba(22,32,46,.35);
    }

.card-ico {
    grid-column: 1; grid-row: 1;
    width: 42px; height: 42px; border-radius: 11px;
    display: grid; place-items: center;
    background: var(--bleu-pale); color: var(--bleu);
}

.card h3 {
    grid-column: 2; grid-row: 1;
    margin: 0;
    font-size: 17px; font-weight: 630; letter-spacing: -.3px;
}

.card p {
    grid-column: 1 / -1; grid-row: 2;
    margin: 14px 0 0;
    color: var(--gris); font-size: 14.5px;
}

.alt { background: #fff; border-top: 1px solid var(--ligne); border-bottom: 1px solid var(--ligne); }

/* ------------------------------------------------------------ etapes */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }

/* Meme principe que les cartes : le numero et le titre sur une ligne. */
.step {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 0 13px;
    align-items: center;
}

.step-n {
    grid-column: 1; grid-row: 1;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--bleu); color: #fff;
    display: grid; place-items: center;
    font-weight: 660; font-size: 15px;
}

.step h3 { grid-column: 2; grid-row: 1; margin: 0; font-size: 17px; font-weight: 630; }
.step p  { grid-column: 1 / -1; grid-row: 2; margin: 12px 0 0; color: var(--gris); font-size: 14.5px; }

/* -------------------------------------------------------- transparence */
.note {
    background: #fffaf0;
    border: 1px solid #f3dfba;
    border-radius: 14px;
    padding: 22px 26px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

    .note svg { flex: 0 0 auto; color: var(--ambre); margin-top: 2px; }
    .note h3 { margin: 0 0 6px; font-size: 16px; font-weight: 630; }
    .note p { margin: 0; color: #6b5b3d; font-size: 14.5px; }

/* --------------------------------------------------------------- pied */
.final {
    text-align: center;
    padding: 84px 0;
    background: linear-gradient(180deg, #fff 0%, var(--bleu-pale) 100%);
    border-top: 1px solid var(--ligne);
}

    .final h2 { margin: 0 0 12px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -1px; font-weight: 670; }
    .final p { margin: 0 0 26px; color: var(--gris); font-size: 17px; }

footer.foot {
    border-top: 1px solid var(--ligne);
    background: #fff;
    padding: 26px 0;
    font-size: 13.5px;
    color: var(--gris);
}

.foot-in { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------------------------------------------------------- telephone */
@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; gap: 34px; }
    .cards, .steps { grid-template-columns: 1fr; }
    .strip-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .nav-links { display: none; }
    section { padding: 52px 0; }
    .hero { padding: 40px 0 24px; }
}



/* =====================================================================
   Carte vivante — la position reelle du visiteur.
   Pleine largeur, sans texte : c'est la demonstration, pas une vignette.
   ===================================================================== */
#essayer { padding: 0; }

.live-shell {
    position: relative;
    width: 100%;
    height: min(78vh, 760px);
    overflow: hidden;
    background: #f4f7fb;
    border-top: 1px solid var(--ligne);
    border-bottom: 1px solid var(--ligne);
}

/* Couche qui TOURNE. Sa taille est calculee en JS : un carre du cote de la
   DIAGONALE du cadre. C'est la seule forme qui le couvre a n'importe quel
   angle -- un pourcentage laisse des bandes vides des que le cadre n'est
   pas carre, ce qui est toujours le cas. */
.live-rotator {
    position: absolute;
    transform-origin: 50% 50%;
    will-change: transform;
    backface-visibility: hidden;
}

#liveMap { width: 100%; height: 100%; }

/* Le curseur ne bouge JAMAIS : c'est la carte qui defile dessous. Il est
   pose sous le centre, pour qu'on voie plus loin devant que derriere. */
.live-cursor {
    position: absolute;
    left: 50%;
    top: 56%;
    width: 96px;
    height: 96px;
    margin: -48px 0 0 -48px;
    pointer-events: none;
    will-change: transform;
    z-index: 5;
    filter: drop-shadow(0 6px 14px rgba(22,32,46,.32));
}

    .live-cursor svg { width: 100%; height: 100%; display: block; }

/* Mis a l'echelle par transform : animer sa largeur relancerait un calcul
   de mise en page a chaque point GPS, ce qui se voit sur un telephone. */
.live-ring {
    position: absolute;
    left: 50%;
    top: 56%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(56,132,255,.13);
    border: 1px solid rgba(56,132,255,.32);
    transform: translate(-50%,-50%) scale(0);
    transform-origin: 50% 50%;
    transition: transform .45s ease;
    will-change: transform;
    pointer-events: none;
    z-index: 4;
}

/* ------------------------------------------------- habillage de la carte */
.live-badge {
    position: absolute;
    top: 18px; left: 18px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    border: 1px solid var(--ligne);
    box-shadow: 0 6px 20px -8px rgba(22,32,46,.28);
    font-size: 13px; font-weight: 600; color: var(--encre);
    z-index: 10;
}

.live-speed {
    position: absolute;
    left: 18px; bottom: 18px;
    display: flex; align-items: baseline; gap: 7px;
    padding: 12px 20px;
    border-radius: 14px;
    background: rgba(255,255,255,.94);
    border: 1px solid var(--ligne);
    box-shadow: 0 10px 30px -12px rgba(22,32,46,.34);
    z-index: 10;
}

    .live-speed b {
        font-size: 34px; font-weight: 660; letter-spacing: -1px;
        color: var(--encre); line-height: 1;
    }

    .live-speed span { font-size: 13px; color: var(--gris); }

.live-full {
    position: absolute;
    right: 18px; bottom: 18px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 17px;
    border-radius: 12px;
    background: rgba(255,255,255,.94);
    border: 1px solid var(--ligne);
    box-shadow: 0 10px 30px -12px rgba(22,32,46,.34);
    color: var(--encre);
    font-size: 14px; font-weight: 600;
    text-decoration: none;
    z-index: 10;
}

    .live-full svg { width: 17px; height: 17px; }

    .live-full:hover { border-color: #c3d2e6; }

/* Voile de depart : on ne reclame la position de personne sans qu'il l'ait
   demandee, et la carte ne se charge pas pour rien. */
.live-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    /* PAS de backdrop-filter : un flou qui recompose au-dessus d'une carte
       qui tourne fait scintiller l'affichage sur iPhone. C'est le defaut
       exact qu'on a mis du temps a trouver sur la vue conducteur. */
    background: #f4f7fb;
    z-index: 20;
    transition: opacity .35s ease, visibility 0s linear .35s;
}

    /* visibility, et pas seulement opacity : un calque transparent reste
       compose a chaque image et coute pour rien pendant toute la conduite. */
    .live-start.parti { opacity: 0; visibility: hidden; pointer-events: none; }

    .live-start.attente .btn { opacity: .55; pointer-events: none; }

.live-msg {
    margin: 0;
    font-size: 13px;
    color: var(--gris);
    max-width: 34ch;
}

@media (max-width: 900px) {
    .live-shell { height: 76vh; }

    .live-cursor { width: 78px; height: 78px; margin: -39px 0 0 -39px; }

    .live-badge { top: 14px; left: 14px; font-size: 12.5px; padding: 7px 12px; }

    .live-speed { left: 14px; bottom: 14px; padding: 10px 16px; }

        .live-speed b { font-size: 28px; }

    .live-full { right: 14px; bottom: 14px; padding: 10px 14px; font-size: 13px; }
}

/* L'entete collante floute ce qui passe derriere elle. Au-dessus d'une carte
   qui tourne, ce flou se recalcule a chaque image et fait scintiller
   l'affichage sur iPhone. Des que le suivi demarre, on la rend opaque : elle
   a exactement la meme allure, sans le cout. */
html.live-actif header.nav {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
