/* ==========================================================================
   Landing page publique (core/landing.html)
   Fonds quadrillés, halos et animations : chargé uniquement sur cette page.
   ========================================================================== */

/* Fond navy quadrillé (hero, bandeau des étapes, appel à la démo) */
.lp-grid {
    position: relative;
    overflow: hidden;
    background-image:
        linear-gradient(rgba(148, 163, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 255, .07) 1px, transparent 1px);
    background-size: 56px 56px;
}

.lp-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    width: 560px;
    height: 560px;
    background: #1e40af;
    top: -180px;
    right: -100px;
    opacity: .7;
    animation: lp-drift 16s ease-in-out infinite alternate;
}

.lp-orb-sm {
    width: 400px;
    height: 400px;
    top: -220px;
    right: 8%;
    background: #3b82f6;
    opacity: .45;
}

@keyframes lp-drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-60px, 50px) scale(1.12); }
}

/* Apparition au chargement (hero) */
.lp-up {
    opacity: 0;
    animation: lp-up .8s cubic-bezier(.2, .7, .2, 1) forwards;
}

@keyframes lp-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
}

.lp-delay-1 { animation-delay: .1s; }
.lp-delay-2 { animation-delay: .2s; }
.lp-delay-3 { animation-delay: .3s; }
.lp-delay-4 { animation-delay: .35s; }

/* Cartes du tableau de bord qui surgissent l'une après l'autre */
.lp-pop {
    opacity: 0;
    animation: lp-pop .6s cubic-bezier(.3, 1.4, .5, 1) forwards;
    animation-delay: var(--lp-delay, 0s);
}

@keyframes lp-pop {
    from { opacity: 0; transform: translateY(10px) scale(.94); }
    to   { opacity: 1; transform: none; }
}

/* Barres de graphique et jauges */
.lp-bar {
    transform-origin: bottom;
    transform: scaleY(0);
    animation: lp-grow .9s cubic-bezier(.2, .7, .2, 1) forwards;
    animation-delay: var(--lp-delay, 0s);
}

@keyframes lp-grow { to { transform: scaleY(1); } }

.lp-fill {
    transform-origin: left;
    transform: scaleX(0);
    animation: lp-fill 1.2s cubic-bezier(.2, .7, .2, 1) 1.1s forwards;
}

@keyframes lp-fill { to { transform: scaleX(1); } }

/* Pastille « bêta » avec onde */
.lp-pulse { position: relative; }

.lp-pulse::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #4ade80;
    animation: lp-ring 2s ease-out infinite;
}

@keyframes lp-ring {
    from { opacity: .9; transform: scale(.6); }
    to   { opacity: 0; transform: scale(1.8); }
}

/* Soulignement du mot « calibré » */
.lp-underline {
    background-image: linear-gradient(#60a5fa, #60a5fa);
    background-repeat: no-repeat;
    background-position: 0 92%;
    background-size: 0 6px;
    animation: lp-under 1s .9s ease forwards;
}

@keyframes lp-under { to { background-size: 100% 6px; } }

/* Boutons et cartes au survol */
.lp-btn { transition: transform .2s ease, box-shadow .2s ease; }
.lp-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(30, 58, 138, .30); }
.lp-btn svg { transition: transform .2s ease; }
.lp-btn:hover svg { transform: translateX(4px); }

.lp-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.lp-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(15, 23, 42, .08); border-color: #bfdbfe; }

/* Grille des fonctionnalités et des indicateurs */
.lp-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.lp-span2 { grid-column: span 2; }
.lp-span-all { grid-column: 1 / -1; }

.lp-kpis {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    gap: .75rem;
    align-items: center;
}

@media (max-width: 960px) {
    .lp-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-op { display: none; }
}

@media (max-width: 600px) {
    .lp-bento, .lp-kpis { grid-template-columns: minmax(0, 1fr); }
    .lp-span2 { grid-column: span 1; }
    .lp-chip { display: none; }
}

/* Apparition au défilement (navigateurs compatibles uniquement) */
@supports (animation-timeline: view()) {
    .lp-reveal {
        animation: lp-up linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 28%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .lp-up, .lp-pop { opacity: 1; }
    .lp-bar, .lp-fill { transform: none; }
    .lp-underline { background-size: 100% 6px; }
}