/* ============================================================
   USE CASE STACK — impact sticky en fond, cas d'usage qui slide
   de la droite au scroll (un par un). Pattern parallax cover
   horizontal.
   ============================================================ */

.uc-stack {
    /* 100vh (impact visible) + 5 × 100vh (un scroll par cas d'usage)
       = 600vh de scroll total. Ajuste selon nb de cas. */
    position: relative;
    height: 600vh;
    background: var(--osm-night-1, #0b0b1e);
}

.uc-stack__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    isolation: isolate;
}

/* ── Layer de fond : bloc impact (stats) — visible au démarrage ── */
.uc-stack__base {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    padding: 60px 20px;
}
.uc-stack__base .gg-container {
    text-align: center;
    max-width: 1100px;
}
.uc-stack__base .gg-eyebrow { color: #38BDF8; }
.uc-stack__base .gg-section__title { margin: 12px auto 40px; }
.uc-stack__base .impact-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin: 0 auto;
}
@media (max-width: 900px) {
    .uc-stack__base .impact-stats__grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
.uc-stack__base .impact-stats__cell {
    text-align: center;
    padding: 20px;
}

/* Hint qui pointe vers la droite pour signaler l'arrivée des cas d'usage */
.uc-stack__hint {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.6);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.uc-stack__hint-label { white-space: nowrap; }
.uc-stack__hint-line {
    display: inline-block;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.5), #38BDF8);
    animation: uc-hint-line-in 1.4s cubic-bezier(.4,.6,.2,1) .6s forwards;
}
@keyframes uc-hint-line-in {
    to { width: clamp(80px, 12vw, 180px); }
}
.uc-stack__hint svg {
    color: #38BDF8;
    animation: uc-hint-arrow-pulse 2s ease-in-out .8s infinite;
}
@keyframes uc-hint-arrow-pulse {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(6px); }
}

/* ── Layers 1..N : panels des cas d'usage ── */
.uc-stack__panel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    transform: translateX(100%);
    will-change: transform;
    /* z-index inline via style="" dans le PHP — chaque suivant recouvre le précédent */
}

/* ── AnimatedFeatureSpotlight — le cadre du panel ── */
.uc-spotlight {
    width: 100%;
    max-width: 1180px;
    padding: clamp(28px, 4vw, 56px);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, rgba(11, 11, 30, 0.85) 100%), #0b0b1e;
    border: 1px solid rgba(147, 197, 253, 0.20);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 40px 100px -30px rgba(37, 99, 235, 0.40);
    /* Léger dégradé décoratif au fond */
    position: relative;
}
.uc-spotlight::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse at top right, rgba(139, 92, 246, 0.18), transparent 60%);
    pointer-events: none;
}

.uc-spotlight__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}
@media (min-width: 900px) {
    .uc-spotlight__grid {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }
}

/* Colonne texte */
.uc-spotlight__text {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: left;
}
.uc-spotlight__preheader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 8px 14px;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 999px;
    color: #38BDF8;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.uc-spotlight__heading {
    font-family: var(--osm-ff-heading, "Poppins", sans-serif);
    font-size: clamp(1.8rem, 3.4vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0;
}
.uc-spotlight__desc {
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.6;
    margin: 0;
}
.uc-spotlight__cta {
    align-self: flex-start;
    margin-top: 8px;
}

/* Colonne visuel — image en float continu */
.uc-spotlight__visual {
    position: relative;
    width: 100%;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.uc-spotlight__img {
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
    animation: uc-spotlight-float 6s cubic-bezier(.4,.6,.2,1) infinite alternate;
}
@keyframes uc-spotlight-float {
    0%   { transform: translateY(0);    }
    100% { transform: translateY(-14px); }
}

/* ── Progress bar bas d'écran ── */
.uc-stack__progress {
    position: absolute;
    left: 5vw;
    right: 5vw;
    bottom: clamp(20px, 3vh, 32px);
    height: 2px;
    background: rgba(147, 197, 253, 0.15);
    border-radius: 999px;
    overflow: hidden;
    pointer-events: none;
    z-index: 100;
}
.uc-stack__progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #38BDF8, #8B5CF6);
    border-radius: 999px;
    transition: width .1s linear;
}

/* ── Fallback mobile & prefers-reduced-motion ── */
@media (max-width: 900px) {
    .uc-stack { height: auto; }
    .uc-stack__sticky { position: static; height: auto; overflow: visible; }
    .uc-stack__base {
        position: static;
        padding: 60px 20px;
    }
    .uc-stack__panel {
        position: static;
        transform: none !important;
        padding: 40px 20px;
    }
    .uc-stack__hint { display: none; }
    .uc-stack__progress { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .uc-stack { height: auto; }
    .uc-stack__sticky { position: static; height: auto; overflow: visible; }
    .uc-stack__base { position: static; padding: 60px 20px; }
    .uc-stack__panel { position: static; transform: none !important; padding: 40px 20px; }
    .uc-spotlight__img { animation: none; }
    .uc-stack__hint-line, .uc-stack__hint svg { animation: none; }
    .uc-stack__progress { display: none; }
}
