/* ============================================================
   BEYOND FPS — « ARRIVÉE DEPUIS L'HYPERESPACE »
   Les 4 indicateurs de performance jaillissent du CENTRE de
   l'écran (burst de traînées radiales) et grandissent vers
   leurs cases dédiées. À l'arrivée, chaque case n'affiche que
   la perf Windows ; au scroll, une flèche apparaît puis la
   perf Optix (le chiffre Windows est barré, la case vire cyan).
   Pas de dégradation long terme — juste avant / après.

   Contrats :
   - Aucun état caché posé en CSS pour le contenu principal :
     sans JS / reduced-motion, les 4 cases sont visibles avec
     l'histoire complète (Windows barré… non : Windows + flèche
     + Optix, sans barrage) — GSAP ne fait que séquencer.
   - GSAP possède transform/opacity (cases, flèches, burst,
     barres de barrage .bfps3-strike, voile .bfps3-flip).
   - Le pin utilise invalidateOnRefresh : les départs « depuis
     le centre » sont recalculés à chaque refresh/resize.
   ============================================================ */

.preuves-alternative {
    position: relative;
    z-index: 2;
    min-height: 80vh;
    /* fallback ci-dessus pour les navigateurs sans svh */
    min-height: 80svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 3vh, 36px);
    margin-top: -50px;
    padding: clamp(10px, 2vh, 32px) 20px clamp(24px, 4vh, 48px);
    overflow: visible;
    background: transparent;
}

/* ------------------------------------------------------------
   Titre
   ------------------------------------------------------------ */
.preuves-alternative .telemetry-header {
    text-align: center;
}

.preuves-alternative .telemetry-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2.5rem);
    font-weight: var(--font-extrabold);
    color: #fff;
    margin: 0;
}

/* ------------------------------------------------------------
   Starfield hyperespace dédié (traînées cinématiques 3D)
   ------------------------------------------------------------ */
.telemetry-starfield {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
}

/* ------------------------------------------------------------
   Éléments dither d'arrière-plan (Textures cyberpunk Optix)
   ------------------------------------------------------------ */
.telemetry-dither {
    position: absolute;
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

.telemetry-dither--cpu {
    opacity: 0.09;
    width: 50%;
    max-width: 550px;
    top: 96%;
    left: 28%;
    right: auto;
    transform: translate(-50%, -50%);
    filter: hue-rotate(195deg) saturate(1.25) brightness(1.15);
}

/* ------------------------------------------------------------
   La grille des 4 cases
   ------------------------------------------------------------ */
.bfps3-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(28px, 4.5vw, 64px);
    width: min(1480px, 96%);
}

.bfps3-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 290px;
    gap: 10px;
    padding: 22px 20px 24px;
    border-radius: clamp(42px, 4.5vw, 56px);
    text-align: center;
    background: linear-gradient(145deg, rgba(12, 16, 30, 0.78) 0%, rgba(7, 10, 20, 0.90) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: visible;
    cursor: pointer;
    box-shadow: 
        var(--card-speed-trail),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), translate 0.65s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.6s ease, box-shadow 0.65s ease, filter 0.6s ease;
}

body.ship .bfps3-card:hover,
.bfps3-card:hover {
    translate: 0 -8px !important;
    border-color: rgba(169, 10, 255, 0.65) !important;
    box-shadow: 
        var(--card-speed-trail),
        0 0 30px rgba(169, 10, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

/* --- CARTE 1 : CPU (Extrême Gauche -> Extrusion vers Haut-Droite +X / -Y) --- */
.bfps3-card[data-module="cpu"] {
    --card-speed-trail:
        3px -1px 0 rgba(36, 80, 254, 0.22),
        6px -2px 0 rgba(36, 80, 254, 0.20),
        10px -3px 0 rgba(36, 80, 254, 0.17),
        15px -5px 0 rgba(36, 80, 254, 0.14),
        20px -7px 0 rgba(36, 80, 254, 0.12),
        26px -9px 0 rgba(36, 80, 254, 0.10),
        33px -11px 0 rgba(36, 80, 254, 0.08),
        40px -14px 0 rgba(36, 80, 254, 0.06),
        48px -17px 0 rgba(36, 80, 254, 0.04),
        56px -20px 0 rgba(36, 80, 254, 0.03),
        65px -23px 3px rgba(36, 80, 254, 0.02);
    background: linear-gradient(160deg, rgba(16, 26, 52, 0.92) 0%, rgba(8, 12, 24, 0.98) 100%);
    border: 1px solid rgba(59, 130, 246, 0.45);
}
.bfps3-card[data-module="cpu"] .bfps3-icon-badge {
    background: rgba(36, 80, 254, 0.2);
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.bfps3-card[data-module="cpu"] .bfps3-icon-badge i {
    color: #93c5fd;
}
.bfps3-card[data-module="cpu"] .bfps3-bg-icon {
    color: #3b82f6;
    opacity: 0.06;
}

/* --- CARTE 2 : RAM (Centre Gauche -> Extrusion vers Haut-Droite +X / -Y) --- */
.bfps3-card[data-module="ram"] {
    --card-speed-trail:
        2px -1px 0 rgba(99, 102, 241, 0.22),
        5px -2px 0 rgba(99, 102, 241, 0.20),
        8px -3px 0 rgba(99, 102, 241, 0.17),
        12px -4px 0 rgba(99, 102, 241, 0.14),
        16px -6px 0 rgba(99, 102, 241, 0.12),
        21px -8px 0 rgba(99, 102, 241, 0.10),
        27px -10px 0 rgba(99, 102, 241, 0.08),
        33px -12px 0 rgba(99, 102, 241, 0.06),
        40px -15px 0 rgba(99, 102, 241, 0.04),
        47px -18px 0 rgba(99, 102, 241, 0.03),
        55px -21px 3px rgba(99, 102, 241, 0.02);
    background: linear-gradient(160deg, rgba(24, 20, 52, 0.92) 0%, rgba(10, 8, 24, 0.98) 100%);
    border: 1px solid rgba(99, 102, 241, 0.45);
}
.bfps3-card[data-module="ram"] .bfps3-icon-badge {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.bfps3-card[data-module="ram"] .bfps3-icon-badge i {
    color: #c7d2fe;
}
.bfps3-card[data-module="ram"] .bfps3-bg-icon {
    color: #6366f1;
    opacity: 0.06;
}

/* --- CARTE 3 : PING (Centre Droit -> Extrusion vers Haut-Gauche -X / -Y) --- */
.bfps3-card[data-module="ping"] {
    --card-speed-trail:
        -2px -1px 0 rgba(139, 92, 246, 0.22),
        -5px -2px 0 rgba(139, 92, 246, 0.20),
        -8px -3px 0 rgba(139, 92, 246, 0.17),
        -12px -4px 0 rgba(139, 92, 246, 0.14),
        -16px -6px 0 rgba(139, 92, 246, 0.12),
        -21px -8px 0 rgba(139, 92, 246, 0.10),
        -27px -10px 0 rgba(139, 92, 246, 0.08),
        -33px -12px 0 rgba(139, 92, 246, 0.06),
        -40px -15px 0 rgba(139, 92, 246, 0.04),
        -47px -18px 0 rgba(139, 92, 246, 0.03),
        -55px -21px 3px rgba(139, 92, 246, 0.02);
    background: linear-gradient(160deg, rgba(30, 16, 56, 0.92) 0%, rgba(12, 6, 24, 0.98) 100%);
    border: 1px solid rgba(139, 92, 246, 0.45);
}
.bfps3-card[data-module="ping"] .bfps3-icon-badge {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.bfps3-card[data-module="ping"] .bfps3-icon-badge i {
    color: #ddd6fe;
}
.bfps3-card[data-module="ping"] .bfps3-bg-icon {
    color: #8b5cf6;
    opacity: 0.06;
}

/* --- CARTE 4 : LATENCE / INPUT LAG (Extrême Droite -> Extrusion vers Haut-Gauche -X / -Y) --- */
.bfps3-card[data-module="lag"] {
    --card-speed-trail:
        -3px -1px 0 rgba(217, 70, 239, 0.22),
        -6px -2px 0 rgba(217, 70, 239, 0.20),
        -10px -3px 0 rgba(217, 70, 239, 0.17),
        -15px -5px 0 rgba(217, 70, 239, 0.14),
        -20px -7px 0 rgba(217, 70, 239, 0.12),
        -26px -9px 0 rgba(217, 70, 239, 0.10),
        -33px -11px 0 rgba(217, 70, 239, 0.08),
        -40px -14px 0 rgba(217, 70, 239, 0.06),
        -48px -17px 0 rgba(217, 70, 239, 0.04),
        -56px -20px 0 rgba(217, 70, 239, 0.03),
        -65px -23px 3px rgba(217, 70, 239, 0.02);
    background: linear-gradient(160deg, rgba(40, 12, 50, 0.92) 0%, rgba(14, 4, 20, 0.98) 100%);
    border: 1px solid rgba(217, 70, 239, 0.45);
}
.bfps3-card[data-module="lag"] .bfps3-icon-badge {
    background: rgba(217, 70, 239, 0.2);
    border-color: rgba(217, 70, 239, 0.45);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.bfps3-card[data-module="lag"] .bfps3-icon-badge i {
    color: #f5d0fe;
}
.bfps3-card[data-module="lag"] .bfps3-bg-icon {
    color: #d946ef;
    opacity: 0.06;
}

/* ------------------------------------------------------------
   Cadre / Silhouette retirés
   ------------------------------------------------------------ */
.bfps3-cockpit-frame,
.bfps3-ship-silhouette {
    display: none;
}

/* ------------------------------------------------------------
   Icône SVG Filigrane Flottante en arrière-plan
   ------------------------------------------------------------ */
.bfps3-bg-icon {
    position: absolute;
    right: -10px;
    bottom: -15px;
    width: 130px;
    height: 130px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
    transform: rotate(-8deg);
    animation: bfpsIconFloat 7s ease-in-out infinite alternate;
}

.bfps3-card[data-module="ram"] .bfps3-bg-icon {
    animation-delay: -1.8s;
}

.bfps3-card[data-module="ping"] .bfps3-bg-icon {
    animation-delay: -3.5s;
}

.bfps3-card[data-module="lag"] .bfps3-bg-icon {
    animation-delay: -5.2s;
}

@keyframes bfpsIconFloat {
    0% {
        transform: rotate(-6deg) translateY(0px);
    }

    100% {
        transform: rotate(-10deg) translateY(-8px);
    }
}

/* Voile d'apparition */
.bfps3-flip {
    display: none;
}

/* En-tête de la carte */
.bfps3-head {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bfps3-head span {
    font-family: var(--font-display, 'Softura', sans-serif);
    font-size: clamp(1.02rem, 1.22vw, 1.18rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #e2e8f0 0%, #93c5fd 40%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    display: inline-block;
    white-space: nowrap;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.bfps3-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 20px;
}


/* Rangée Windows (Bloc supérieur équilibré et sobre) */
.bfps3-win {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 16px;
    border-radius: 32px;
    background: rgba(22, 10, 16, 0.72);
    border: 1px solid rgba(248, 113, 113, 0.22);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.bfps3-win-logo {
    height: clamp(42px, 5vh, 48px);
    max-width: 85%;
    width: auto;
    object-fit: contain;
    opacity: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.bfps3-win .bfps3-num {
    position: relative;
    font-family: var(--font-family, 'Inter', sans-serif);
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.3rem, 1.6vw, 1.55rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fca5a5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* Barre de barrage */
.bfps3-strike {
    position: absolute;
    left: -8%;
    right: -8%;
    top: 50%;
    height: 2.5px;
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
    transform: scaleX(0);
    transform-origin: left center;
}

/* Flèche de transformation / Pont de transition */
.bfps3-arrow-wrap {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(18, 24, 44, 0.95);
    border: 1px solid rgba(216, 180, 254, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 12px rgba(169, 10, 255, 0.25);
    margin: -4px 0;
}

.bfps3-arrow {
    font-size: 1.35rem;
    line-height: 1;
    color: #f3e8ff;
}

/* Rangée Optix (Bloc inférieur verre haute performance, net & cristallin) */
.bfps3-opti {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 16px;
    border-radius: 32px;
    background: rgba(12, 18, 36, 0.85);
    border: 1px solid rgba(36, 80, 254, 0.4);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.55),
        0 0 16px rgba(36, 80, 254, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.bfps3-opti .bfps3-tag--optix {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-brand);
    font-size: clamp(1.4rem, 1.7vw, 1.75rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: none;
    background: linear-gradient(135deg, #2450FE 0%, #A90AFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    filter: none;
}

.bfps3-optix-icon {
    height: 34px;
    width: auto;
    object-fit: contain;
    filter: none;
}

.bfps3-opti .bfps3-num {
    font-family: var(--font-family, 'Inter', sans-serif);
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.55rem, 2vw, 1.85rem);
    font-weight: 900;
    line-height: 1;
    color: #34d399;
    text-shadow: 0 0 16px rgba(52, 211, 153, 0.5), 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* ------------------------------------------------------------
   Paliers : laptops bas + mobile (2×2)
   ------------------------------------------------------------ */
@media (min-width: 768px) and (max-height: 820px) {
    .preuves-alternative {
        gap: clamp(14px, 3vh, 28px);
    }

    .preuves-alternative .telemetry-title {
        font-size: clamp(1.2rem, 2.4vw, 1.9rem);
    }

    .bfps3-card {
        min-height: clamp(220px, 30vh, 260px);
        padding: clamp(12px, 2vh, 18px) clamp(10px, 1.4vw, 16px);
        gap: clamp(4px, 1vh, 8px);
    }

    .bfps3-win .bfps3-num {
        font-size: clamp(1.2rem, 2vw, 1.6rem);
    }

    .bfps3-opti .bfps3-num {
        font-size: clamp(1.45rem, 2.5vw, 2.1rem);
    }
}

@media (max-width: 767px) {
    .bfps3-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .preuves-alternative {
        gap: 20px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .preuves-alternative .telemetry-title {
        font-size: clamp(1.2rem, 5.6vw, 1.6rem);
    }

    .bfps3-card {
        min-height: 240px;
        padding: 16px 12px 18px;
    }

    .bfps3-sys-id {
        font-size: 0.54rem;
    }

    .bfps3-beacon {
        font-size: 0.52rem;
    }

    .bfps3-head {
        font-size: 0.65rem;
        letter-spacing: 0.05em;
    }

    .bfps3-win .bfps3-num {
        font-size: 1.35rem;
    }

    .bfps3-opti .bfps3-num {
        font-size: 1.65rem;
    }
}