/* ============================================================
   Hero /audit-et-formation/ — GlassRefractionHero portage vanilla.
   5 blobs animés + 18 strips overlay + titre mot-par-mot cascade.
   ============================================================ */

.audit-blobs-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
    isolation: isolate;
    padding: 96px 20px;
}

/* ── Container blobs (fond, z:0) ─────────────────────────────── */
.audit-blobs-hero__blobs {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    contain: layout paint;
}

/* Base commune aux 5 blobs */
.audit-blobs-hero__blob {
    position: absolute;
    display: block;
    border-radius: 50%;
    width: min(600px, 40vw);
    height: min(600px, 40vw);
    /* Perf : blur 150px → 100px (réduction du repaint area, gain notable
       vu qu'on a 5 blobs animés en boucle infinie).
       will-change: transform pour composition GPU. */
    filter: blur(100px);
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Blob 1 — top left, cyan */
.audit-blobs-hero__blob--1 {
    left: calc(-91px + 5vw);
    top: calc(438px - 10vh);
    background: radial-gradient(circle, #38BDF8 0%, #0EA5E9 50%, #0284C7 100%);
    animation: audit-blob-u1 28s ease-in-out infinite;
}
/* Blob 2 — center left, violet */
.audit-blobs-hero__blob--2 {
    left: calc(430px - 5vw);
    top: calc(609px - 20vh);
    background: radial-gradient(circle, #8B5CF6 0%, #7C3AED 50%, #6D28D9 100%);
    animation: audit-blob-u2 32s ease-in-out infinite;
}
/* Blob 3 — center right, indigo */
.audit-blobs-hero__blob--3 {
    left: calc(900px - 15vw);
    top: calc(651px - 20vh);
    background: radial-gradient(circle, #6366F1 0%, #4F46E5 50%, #4338CA 100%);
    animation: audit-blob-u3 30s ease-in-out infinite;
}
/* Blob 4 — top right, royal */
.audit-blobs-hero__blob--4 {
    right: calc(-200px + 10vw);
    top: calc(329px - 10vh);
    background: radial-gradient(circle, #1E40AF 0%, #1E3A8A 50%, #172554 100%);
    animation: audit-blob-u4 26s ease-in-out infinite;
}
/* Blob 5 — center pulse, sky-light */
.audit-blobs-hero__blob--5 {
    left: 50%;
    top: 50%;
    width: min(400px, 30vw);
    height: min(400px, 30vw);
    background: radial-gradient(circle, rgba(147, 197, 253, 0.4) 0%, rgba(59, 130, 246, 0.2) 100%);
    filter: blur(80px);
    transform: translate(-50%, -50%) translateZ(0);
    animation: audit-blob-pulse 24s ease-in-out infinite;
}

/* Keyframes U-motion (translate + scale + rotate — comme le composant original) */
@keyframes audit-blob-u1 {
    0%,100% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
    25%     { transform: translate3d(50px, -80px, 0) scale(1.2) rotate(90deg); }
    50%     { transform: translate3d(100px, 0, 0) scale(1.4) rotate(180deg); }
    75%     { transform: translate3d(50px, 80px, 0) scale(1.2) rotate(270deg); }
}
@keyframes audit-blob-u2 {
    0%,100% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
    25%     { transform: translate3d(-60px, 90px, 0) scale(1.3) rotate(-90deg); }
    50%     { transform: translate3d(-120px, 0, 0) scale(1.5) rotate(-180deg); }
    75%     { transform: translate3d(-60px, -90px, 0) scale(1.3) rotate(-270deg); }
}
@keyframes audit-blob-u3 {
    0%,100% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
    25%     { transform: translate3d(70px, -100px, 0) scale(1.25) rotate(120deg); }
    50%     { transform: translate3d(140px, 0, 0) scale(1.45) rotate(240deg); }
    75%     { transform: translate3d(70px, 100px, 0) scale(1.25) rotate(360deg); }
}
@keyframes audit-blob-u4 {
    0%,100% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
    25%     { transform: translate3d(-80px, 110px, 0) scale(1.35) rotate(-120deg); }
    50%     { transform: translate3d(-160px, 0, 0) scale(1.5) rotate(-240deg); }
    75%     { transform: translate3d(-80px, -110px, 0) scale(1.35) rotate(-360deg); }
}
@keyframes audit-blob-pulse {
    0%,100% { transform: translate(-50%, -50%) translate3d(0, 0, 0) scale(1); opacity: 0.3; }
    25%     { transform: translate(-50%, -50%) translate3d(40px, -60px, 0) scale(1.3); opacity: 0.5; }
    50%     { transform: translate(-50%, -50%) translate3d(80px, 0, 0) scale(1.6); opacity: 0.7; }
    75%     { transform: translate(-50%, -50%) translate3d(40px, 60px, 0) scale(1.3); opacity: 0.5; }
}

/* ── 18 bandes verticales (glass strips) — z:1 par-dessus blobs ─ */
.audit-blobs-hero__strips {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    pointer-events: none;
    contain: layout paint;
}
.audit-blobs-hero__strip {
    display: block;
    flex-shrink: 0;
    height: 100%;
    width: calc(100vw / 18);
    min-width: 60px;
    max-width: 100px;
    background: linear-gradient(90deg,
        rgba(217, 217, 217, 0) 0%,
        rgba(0, 0, 0, 0.7) 76%,
        rgba(255, 255, 255, 0.3) 100%);
    mix-blend-mode: overlay;
    opacity: 0.4;
    animation: audit-strip-pulse 4s ease-in-out infinite;
    /* stagger via CSS var --strip-i (0..17) → delay = i × 0.1s */
    animation-delay: calc(var(--strip-i, 0) * 0.1s);
}
@keyframes audit-strip-pulse {
    0%,100% { opacity: 0.4; }
    50%     { opacity: 0.7; }
}

/* ── Contenu (z:10) ──────────────────────────────────────────── */
.audit-blobs-hero__content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* Titre : chaque mot animé en cascade (opacity + translateY, spring-like) */
.audit-blobs-hero__title {
    margin: 0 0 24px;
    font-family: var(--osm-ff-heading);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-size: clamp(2.4rem, 7vw, 5rem);
    color: transparent;
    background: linear-gradient(to bottom, #f8fafc, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 32px rgba(56, 189, 248, 0.30));
}
.audit-blobs-hero__word {
    display: inline-block;
    margin-right: 0.35em;
    opacity: 0;
    transform: translateY(100%);
    /* Spring-like via cubic-bezier easing (approximation) + delay stagger */
    animation: audit-word-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: calc(var(--word-i, 0) * 0.12s);
}
.audit-blobs-hero__word:last-child { margin-right: 0; }
@keyframes audit-word-in {
    to { opacity: 1; transform: translateY(0); }
}

/* Description */
.audit-blobs-hero__desc {
    max-width: 720px;
    margin: 0 auto 32px;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.6;
    color: rgba(191, 219, 254, 0.85);            /* text-blue-200 */
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    opacity: 0;
    transform: translateY(30px);
    animation: audit-fade-up 1s 0.6s ease-out forwards;
}
@keyframes audit-fade-up {
    to { opacity: 1; transform: translateY(0); }
}

/* Actions (2 CTA) — utilise .btn du site, juste layout */
.audit-blobs-hero__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    transform: scale(0.9);
    animation: audit-fade-scale 0.8s 1s ease-out forwards;
}
@media (min-width: 640px) {
    .audit-blobs-hero__actions { flex-direction: row; }
}
@keyframes audit-fade-scale {
    to { opacity: 1; transform: scale(1); }
}

/* ── Pause : appliquée par le JS quand la section est hors viewport ── */
.audit-blobs-hero[data-paused] .audit-blobs-hero__blob,
.audit-blobs-hero[data-paused] .audit-blobs-hero__strip {
    animation-play-state: paused;
}

/* Fallbacks ── reduced-motion : anims OFF, blobs statiques */
@media (prefers-reduced-motion: reduce) {
    .audit-blobs-hero__blob,
    .audit-blobs-hero__strip,
    .audit-blobs-hero__word,
    .audit-blobs-hero__desc,
    .audit-blobs-hero__actions {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .audit-blobs-hero__blob--5 { transform: translate(-50%, -50%) !important; }
}
