/* Page d'accueil. Bandeau marine avec la vraie carte d'une parcelle ; bandes de couleur qui se succèdent :
   marine (promesse), bleu ciel (comment), blanc (chapitres aux couleurs du PDF), sable (prix), marine (pied de page). */

:root {
    --sky: #E8F0F8;
    --sand: #FFF1E3;
    --ink-2: #1D3150;
    --on-ink: #C3D0E0;
}

.band-inner { max-width: 1240px; margin: 0 auto; padding: 80px var(--gutter); }

.button-large { min-height: 54px; padding: 0 1.7em; font-size: 1.05rem; }

/* ------------------------------------------------------------------ Bandeau */

.hero {
    background:
        radial-gradient(1200px 500px at 85% 0%, rgba(240, 123, 26, 0.16), transparent 60%),
        linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
    color: #fff;
}
.hero-inner {
    max-width: 1240px; margin: 0 auto;
    padding: 64px var(--gutter) 88px;
    display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center;
}
/* Titre lisible d'un coup d'œil : largeur normale, graisse affirmée sans être massive, 3 lignes au plus */
.hero h1 {
    color: #fff;
    font-size: clamp(2.1rem, 3.6vw, 3.15rem);
    font-variation-settings: "wdth" 100;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    max-width: 17ch;
    margin-bottom: 0.6em;
    text-wrap: balance;
}
.lead { font-size: 1.2rem; line-height: 1.6; color: var(--on-ink); max-width: 44ch; text-wrap: pretty; }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 32px; }
.hero-login { color: #fff; }
.hero-login:hover { color: #FFD2AE; }
/* Offre de bienvenue : le chiffre en orange, comme le contour des parcelles */
.hero-offer {
    display: inline-flex; align-items: center; gap: 14px; margin-top: 28px;
    padding: 10px 18px 10px 12px; border: 1.5px solid var(--parcel); border-radius: 12px;
    color: var(--on-ink); font-size: 1rem; line-height: 1.35; max-width: 34rem;
}
.hero-offer-count { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--parcel); font-variant-numeric: tabular-nums; }
.hero-offer span strong { color: #fff; font-weight: 700; }
.hero-offer + .hero-actions { margin-top: 22px; }

/* Scène de la parcelle d'exemple : carte, recherche, épingle, autocollants, couverture du rapport */
.hero-map { margin: 0; position: relative; padding: 0 0 0 8px; }

.demo-frame {
    position: relative;
    border-radius: 20px;
    padding: 8px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
    box-shadow: 0 30px 70px rgba(3, 10, 24, 0.5);
    transform: rotate(1.2deg);
}
.demo-map {
    height: clamp(380px, 46vw, 540px);
    border-radius: 14px;
    background: #2A3D5A;
    overflow: hidden;
}
.demo-map .leaflet-control-attribution { background: rgba(20, 35, 60, 0.7); color: #D6DEE8; font-size: 10px; }
.demo-map .leaflet-control-attribution a { color: #fff; }
.demo-cadastre { filter: brightness(0) invert(1); opacity: 0.5; }
.demo-parcel { filter: drop-shadow(0 0 6px rgba(240, 123, 26, 0.9)); }

/* Barre de recherche simulée */
.demo-search {
    position: absolute; z-index: 1000; top: 26px; left: 50%; transform: translateX(-50%);
    width: min(78%, 400px);
    display: flex; align-items: center; gap: 10px;
    background: #fff; color: var(--ink);
    padding: 12px 16px; border-radius: 999px;
    box-shadow: 0 10px 30px rgba(3, 10, 24, 0.35);
    font-size: 0.98rem; font-weight: 600;
    transition: transform 0.5s cubic-bezier(.34, 1.56, .64, 1), opacity 0.4s;
}
.demo-search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--parcel); stroke-width: 2.6; stroke-linecap: round; }
.demo-caret { width: 2px; height: 1.2em; background: var(--parcel); margin-left: -6px; animation: blink 0.9s steps(1) infinite; }
.hero-map:not(.is-typing) .demo-caret { display: none; }
.hero-map.is-searched .demo-search { transform: translateX(-50%) scale(0.92); opacity: 0.92; }
@keyframes blink { 50% { opacity: 0; } }

/* Épingle */
.demo-pin-icon { background: none; border: 0; }
.demo-pin {
    display: block; width: 30px; height: 30px; margin: 0 auto;
    background: var(--parcel);
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
    position: relative;
}
.demo-pin::after {
    content: ""; position: absolute; inset: 7px;
    background: #fff; border-radius: 50%;
}

/* Étiquette de la CaPaKey */
.demo-label.leaflet-tooltip {
    background: var(--ink); color: #fff; border: 0; border-radius: 10px;
    padding: 8px 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    font-family: var(--font); text-align: center;
}
.demo-label.leaflet-tooltip-top::before { border-top-color: var(--ink); }
.demo-label strong { display: block; font-size: 1.02rem; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.demo-label span { font-size: 0.8rem; color: var(--on-ink); }

/* Constats en autocollants */
.findings {
    position: absolute; z-index: 1000; left: -34px; bottom: 54px;
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.findings li {
    display: flex; align-items: center; gap: 10px;
    background: #fff; color: var(--ink);
    padding: 9px 16px 9px 9px; border-radius: 12px;
    box-shadow: 0 10px 26px rgba(3, 10, 24, 0.35);
    border-left: 5px solid var(--c);
    font-size: 0.92rem; font-weight: 650; line-height: 1.25;
    width: max-content; max-width: 300px;
    transform: rotate(var(--r, 0deg));
}
.findings li:nth-child(2) { margin-left: 22px; }
.findings small { display: block; font-size: 0.74rem; font-weight: 400; color: var(--muted); }
.finding-icon, .chapter-icon {
    flex: none; display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 50%; background: var(--c);
}
.finding-icon svg { width: 19px; height: 19px; }

/* Couverture du rapport */
.demo-pdf {
    position: absolute; z-index: 1000; right: -22px; bottom: -34px;
    width: 168px; padding: 0 0 12px;
    background: #fff; color: var(--ink);
    border-radius: 8px; overflow: hidden;
    box-shadow: 0 18px 40px rgba(3, 10, 24, 0.45);
    transform: rotate(5deg);
    display: flex; flex-direction: column; gap: 3px;
    font-size: 0.72rem;
}
.pdf-head {
    display: flex; align-items: center; gap: 6px;
    background: var(--ink); color: #fff;
    padding: 7px 10px; font-weight: 700; font-size: 0.7rem; font-variation-settings: "wdth" 118;
    border-bottom: 3px solid var(--parcel);
}
.pdf-mark { width: 9px; height: 9px; border: 2px solid var(--parcel); transform: rotate(12deg); }
.pdf-photo {
    height: 62px; margin: 8px 10px 4px; border-radius: 4px;
    background:
        linear-gradient(115deg, transparent 46%, rgba(240, 123, 26, 0.95) 46% 49%, transparent 49%),
        radial-gradient(circle at 30% 40%, #7FA05A 0 18%, transparent 19%),
        radial-gradient(circle at 75% 70%, #5E7F45 0 22%, transparent 23%),
        linear-gradient(160deg, #94AE6B, #6F8A55);
}
.demo-pdf strong { padding: 0 10px; font-size: 0.85rem; font-variation-settings: "wdth" 115; }
.pdf-key { padding: 0 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pdf-lines { display: flex; flex-direction: column; gap: 4px; padding: 6px 10px 4px; }
.pdf-lines i { height: 4px; border-radius: 2px; background: var(--line); }
.pdf-lines i:nth-child(2) { width: 80%; }
.pdf-lines i:nth-child(3) { width: 60%; }
.pdf-ready {
    margin: 4px 10px 0; align-self: flex-start;
    display: inline-flex; align-items: center; gap: 4px;
    background: #E3F3EA; color: var(--ok);
    padding: 3px 8px; border-radius: 999px; font-weight: 700;
}
.pdf-ready svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.hero-map figcaption { margin-top: 48px; color: var(--on-ink); font-size: 0.88rem; }

/* Le seul moment animé du site : la recherche se tape, la carte s'envole, l'épingle tombe,
   les autocollants se posent puis le rapport arrive. Avec « moins d'animations », tout est affiché d'emblée. */
@media (prefers-reduced-motion: no-preference) {
    .findings li, .demo-pdf { opacity: 0; }
    .findings li { transform: rotate(var(--r, 0deg)) translateY(14px) scale(0.85); }
    .demo-pdf { transform: rotate(14deg) translate(30px, 30px) scale(0.8); }
    .hero-map.is-ready .findings li {
        animation: sticker 0.55s cubic-bezier(.34, 1.56, .64, 1) forwards;
    }
    .hero-map.is-ready .findings li:nth-child(1) { animation-delay: 0.9s; }
    .hero-map.is-ready .findings li:nth-child(2) { animation-delay: 1.15s; }
    .hero-map.is-ready .findings li:nth-child(3) { animation-delay: 1.4s; }
    .hero-map.is-ready .demo-pdf { animation: pdf-in 0.7s 2s cubic-bezier(.34, 1.56, .64, 1) forwards; }

    .demo-pin { animation: pin-drop 0.6s cubic-bezier(.34, 1.56, .64, 1) both; }
    .demo-parcel { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: trace 1.2s 0.3s ease-out forwards; }
    .demo-label { animation: pop 0.45s 0.5s cubic-bezier(.34, 1.56, .64, 1) both; }
}
@keyframes sticker { to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
@keyframes pdf-in { to { opacity: 1; transform: rotate(5deg); } }
@keyframes pin-drop {
    from { opacity: 0; transform: translateY(-60px) rotate(-45deg); }
    to { opacity: 1; transform: rotate(-45deg); }
}
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; scale: 0.6; } to { opacity: 1; scale: 1; } }

@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
    .hero-map { padding: 0; }
    .demo-frame { transform: none; }
    .findings { position: static; margin-top: 18px; }
    .findings li { max-width: 100%; }
    .findings li:nth-child(2) { margin-left: 0; }
    .demo-pdf { right: 8px; bottom: auto; top: calc(clamp(380px, 46vw, 540px) - 120px); }
    .hero-map figcaption { margin-top: 18px; }
}

/* ------------------------------------------------------------------ Trois gestes */

.steps { background: var(--sky); }
.steps h2, .chapters h2, .pricing h2 {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-variation-settings: "wdth" 120;
    letter-spacing: -0.015em;
}
.steps-list {
    list-style: none; counter-reset: step;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
    padding: 0; margin: 40px 0 0;
    position: relative;
}
/* Ligne qui relie les étapes : c'est un parcours */
.steps-list::before {
    content: ""; position: absolute; top: 22px; left: 22px; right: 22px;
    height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 12px); opacity: 0.35;
}
.steps-list li { counter-increment: step; position: relative; }
.steps-list li::before {
    content: counter(step);
    display: grid; place-items: center;
    width: 46px; height: 46px; margin-bottom: 18px;
    border-radius: 50%;
    background: var(--ink); color: #fff;
    font-size: 1.2rem; font-weight: 700; font-variation-settings: "wdth" 118;
    box-shadow: 0 0 0 6px var(--sky);
    position: relative;
}
.steps-list li:last-child::before { background: var(--parcel); }
.steps-list h3 { font-size: 1.2rem; }
.steps-list p { color: var(--ink-soft); max-width: 32ch; }
@media (max-width: 760px) {
    .steps-list { grid-template-columns: 1fr; gap: 28px; }
    .steps-list::before { display: none; }
}

/* ------------------------------------------------------------------ Chapitres (couleurs du PDF) */

.chapters { background: var(--paper); }
.chapters-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; margin-bottom: 36px; }
.chapters-head h2 { margin: 0; max-width: 18ch; }
.chapters-head p { margin: 0; color: var(--ink-soft); max-width: 46ch; }
/* Filet de 1 px entre les cases (ombres qui se chevauchent) : une dernière ligne incomplète reste blanche */
.chapter-grid {
    list-style: none; margin: 0; padding: 1px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px;
}
.chapter-grid li {
    background: var(--paper);
    padding: 22px 22px 20px;
    border-top: 4px solid var(--c);
    box-shadow: 0 0 0 1px var(--line);
}
.chapter-icon { width: 38px; height: 38px; margin-bottom: 12px; }
.chapter-icon svg { width: 21px; height: 21px; }
.chapter-grid h3 { font-size: 1.02rem; margin-bottom: 0.35em; }
.chapter-grid p { margin: 0; font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 760px) { .chapters-head { grid-template-columns: 1fr; gap: 12px; } }
.chapters-note { margin: 20px 0 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ------------------------------------------------------------------ Prix */

.pricing { background: var(--sand); }
.pricing-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 48px; align-items: center; }
.pricing-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pricing p { color: var(--ink-soft); margin: 0; max-width: 44ch; }
.pricing-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin: 0; }
.pricing-facts div { margin: 0; }
.pricing-facts dt {
    font-size: 2.6rem; font-weight: 760; font-variation-settings: "wdth" 122;
    color: var(--parcel-text); line-height: 1;
}
.pricing-facts dd { margin: 8px 0 0; color: var(--ink-soft); font-size: 0.92rem; }
@media (max-width: 1000px) {
    .pricing-inner { grid-template-columns: 1fr; gap: 28px; }
    .pricing-facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .pricing-facts { grid-template-columns: 1fr; } }
