/* ============================================================
   HERO — COCKPIT PREMIÈRE PERSONNE (2.5D PARALLAX)
   ============================================================ */

/* Le deck porte l'animation ; les cartes conservent leur rendu CSS
   d'origine pendant le zoom, sans animation individuelle supplémentaire. */
@property --deck-spread {
    syntax: '<number>';
    inherits: true;
    initial-value: 1;
}

@property --deck-opacity {
    syntax: '<number>';
    inherits: true;
    initial-value: 1;
}

body.ship .hero {
    position: relative;
    min-height: 100vh;
    /* fallback ci-dessus pour les navigateurs sans svh */
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    /* Compacté pour laisser respirer la verrière et ne jamais déborder */
    padding: calc(var(--nav-height) + clamp(4px, 2vh, 18px)) 0 0;
    overflow: hidden;
    background-color: transparent;
}

/* Libération VRAM post-Hero : purge complète du rendu GPU dès que la section Hero est hors viewport */
body.ship .hero.anim-paused {
    visibility: hidden;
    pointer-events: none;
}

/* ------------------------------------------------------------
   Conteneur Parallax (pour alignement parfait)
   ------------------------------------------------------------ */
body.ship .cockpit-parallax-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end; /* Ancré en bas */
    justify-content: center;
    overflow: visible;
    pointer-events: none;
    z-index: 10; /* En avant du callout et compat (z-index 2), sous le HUD (z-index 25) */
    transform: translateY(10vh); /* Abaisse franchement le cockpit */
}

/* Attente bornée du décodage des images avant l'apparition du cockpit. */
body.ship.hero-warming .cockpit-parallax-container,
body.ship.hero-warming .hero-compat,
body.ship.hero-warming .hero-callout,
body.ship.hero-warming .hero-deck__controls,
body.ship .cockpit-parallax-container.is-warming {
    opacity: 0.001 !important;
    pointer-events: none !important;
}

body.ship.hero-warming .page-background__image {
    opacity: 1 !important;
}

body.ship.hero-warming .page-background__image--legacy {
    opacity: 0 !important;
}

body.ship.hero-warming #starfield {
    opacity: 1 !important;
}


/* Le wrapper qui garde le ratio exact de l'image (2528x1612) */
body.ship .cockpit-scale-wrapper {
    position: relative;
    flex: 0 0 auto;
    pointer-events: none;
    /* Aspect ratio de l'image du cockpit */
    aspect-ratio: 2528 / 1612;
    /* On veut qu'elle couvre l'écran en largeur OU en hauteur (effet
       object-fit: cover). */
    width: max(100vw, 100vh * (2528 / 1612));
    height: max(100vh, 100vw * (1612 / 2528));
    width: max(100vw, 100svh * (2528 / 1612));
    height: max(100svh, 100vw * (1612 / 2528));
    /* contain: layout style préserve les ombres portées et évite les textures d'isolation intermédiaire */
    contain: layout style;
    /* Ne pas conserver une couche rasterisée à la petite échelle initiale.
       Le zoom 2D est piloté par GSAP ; le navigateur choisit sa résolution. */
}

/* ------------------------------------------------------------
   Masque 2D du cockpit (Premier plan)
   ------------------------------------------------------------ */
body.ship .cockpit-mask {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    will-change: opacity;
    transform: translateZ(0);
}

/* Le <picture> (variante WebP) ne doit pas casser le height:100%
   de l'img : display:contents le rend transparent au layout */
body.ship .cockpit-mask picture {
    display: contents;
}

body.ship .cockpit-mask img {
    width: 100%;
    height: 100%;
    display: block;
}

/* ------------------------------------------------------------
   Stack Interactif Hero Deck : 3 Vues Clignotantes & Swappables
   ------------------------------------------------------------ */
body.ship .hero-deck {
    position: absolute;
    z-index: 20;
    pointer-events: auto;
    left: 0;
    right: 0;
    margin: 0 auto;
    transform: perspective(750px) rotateX(14deg);
    transform-origin: bottom center;
    bottom: clamp(10%, 11.5vh, 13%);
    width: 26%;
    padding: 0;
    background: transparent;
    box-shadow: none;
    --deck-spread: 1;
    --deck-opacity: 1;
}

/* ------------------------------------------------------------
   Bouton Changement de Vue à droite de l'interface (HUD Slider Next)
   ------------------------------------------------------------ */
body.ship .hero-deck__controls {
    position: absolute;
    top: clamp(16px, 2.5vh, 28px);
    left: calc(100% + clamp(12px, 1.4vw, 20px));
    z-index: 60;
    pointer-events: none;
    opacity: 0;
}

body.ship .hero-deck__next-btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(38px, 2.6vw, 44px);
    height: clamp(38px, 2.6vw, 44px);
    border-radius: 50%;
    border: 1.5px solid rgba(41, 85, 255, 0.45);
    background: linear-gradient(135deg, rgba(14, 18, 34, 0.98) 0%, rgba(10, 14, 28, 1) 100%);
    color: #ffffff;
    cursor: pointer;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.75),
        0 0 22px rgba(36, 80, 254, 0.35),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
    /* backdrop-filter retiré : fond 98% opaque, 0 passe de flou shader GPU */
    transition:
        transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

body.ship .hero-deck__next-btn:hover {
    transform: translateY(-2px) scale(1.08);
    border-color: rgba(169, 10, 255, 0.75);
    background: linear-gradient(135deg, rgba(36, 80, 254, 0.35) 0%, rgba(169, 10, 255, 0.35) 100%);
    box-shadow:
        0 14px 38px rgba(0, 0, 0, 0.85),
        0 0 35px rgba(169, 10, 255, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

body.ship .hero-deck__next-btn:active {
    transform: translateY(0) scale(0.96);
}

body.ship .hero-deck__next-icon {
    stroke: #d8b4fe;
    transition: transform 0.25s ease, stroke 0.25s ease;
}

body.ship .hero-deck__next-btn:hover .hero-deck__next-icon {
    transform: translateX(2px);
    stroke: #ffffff;
}

body.ship .hero-deck__card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform-origin: top center;
    cursor: pointer;
    user-select: none;
}

/* Transitions actives exclusivement lors des permutations au clic (.is-switching) */
body.ship .hero-deck__card.is-switching {
    transition:
        transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important,
        opacity 0.35s ease !important,
        filter 0.35s ease !important,
        box-shadow 0.35s ease !important;
}

/* Slot 0 : Premier Plan (Vue Active) */
body.ship .hero-deck__card[data-slot="0"] {
    position: relative;
    z-index: 10;
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: none;
    cursor: default;
    pointer-events: auto;
}

/* Slot 1 : Profondeur Médiane (-1 cran) */
body.ship .hero-deck__card[data-slot="1"] {
    position: absolute;
    z-index: 5;
    opacity: calc(0.92 * var(--deck-opacity, 1));
    transform: translate3d(0, calc(24% * var(--deck-spread, 1)), 0) scale(calc(1 - 0.10 * var(--deck-spread, 1)));
    pointer-events: auto;
}

/* Slot 2 : Arrière-Plan Profond (-2 crans) */
body.ship .hero-deck__card[data-slot="2"] {
    position: absolute;
    z-index: 1;
    opacity: calc(0.82 * var(--deck-opacity, 1));
    transform: translate3d(0, calc(46% * var(--deck-spread, 1)), 0) scale(calc(1 - 0.20 * var(--deck-spread, 1)));
    pointer-events: auto;
}

body.ship .hero-deck__inner {
    position: relative;
    padding: 0;
    border-radius: clamp(12px, 0.9vw, 18px);
    background: transparent;
    border: 1.5px solid rgba(41, 85, 255, 0.35);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.85),
        0 0 18px rgba(36, 80, 254, 0.2);
    overflow: hidden;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Distinction d'éclat selon le slot (liseré unifié entourant directement l'image) */
body.ship .hero-deck__card[data-slot="0"] .hero-deck__inner {
    border-color: rgba(41, 85, 255, 0.65);
    box-shadow:
        0 16px 36px rgba(0, 0, 0, 0.85),
        0 0 24px rgba(41, 85, 255, 0.35);
}

body.ship .hero-deck__card[data-slot="1"] .hero-deck__inner {
    border-color: rgba(169, 10, 255, 0.45);
    box-shadow:
        0 12px 20px rgba(0, 0, 0, 0.85),
        0 0 14px rgba(169, 10, 255, 0.25);
}

body.ship .hero-deck__card[data-slot="2"] .hero-deck__inner {
    border-color: rgba(36, 80, 254, 0.35);
    box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.85),
        0 0 16px rgba(36, 80, 254, 0.20);
}

body.ship .hero-deck__media {
    position: relative;
    overflow: hidden;
    border-radius: inherit;
    line-height: 0;
}

body.ship .hero-deck__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: inherit;
    border: none;
    transition: opacity 0.35s ease;
}

/* Remplacement des filtres de pixels temps réel par un overlay teinté : 0 calcul de filtre shader */
body.ship .hero-deck__media::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: #070a14;
    opacity: 0;
    transition: opacity 0.35s ease;
}

body.ship .hero-deck__card[data-slot="0"] .hero-deck__media::after {
    opacity: 0;
}

body.ship .hero-deck__card[data-slot="1"] .hero-deck__media::after {
    opacity: 0.38;
}

body.ship .hero-deck__card[data-slot="2"] .hero-deck__media::after {
    opacity: 0.58;
}

body.ship .hero-deck__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top center, rgba(36, 80, 254, 0.18) 0%, transparent 70%);
}

body.ship .hero-deck__card[data-card-id="1"] .hero-deck__glow {
    background: radial-gradient(circle at top center, rgba(169, 10, 255, 0.18) 0%, transparent 70%);
}

/* Balayage lumineux : actif uniquement sur le premier plan (slot 0) */
body.ship .screen-scanline {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    z-index: 2;
    background: repeating-linear-gradient(0deg,
            rgba(255, 255, 255, 0.025) 0 1px,
            transparent 1px 4px);
}

body.ship .screen-scanline::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -30%;
    height: 30%;
    background: linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.08), transparent);
    display: none;
    pointer-events: none;
    will-change: transform;
}

body.ship .hero-deck__card[data-slot="0"] .screen-scanline::before {
    display: block;
    animation: cockpit-screen-sweep 5s linear infinite;
}

@keyframes cockpit-screen-sweep {
    to {
        transform: translateY(450%);
    }
}

/* Scanline et chevrons maintenus actifs en continu sur le Hero */

/* ------------------------------------------------------------
   HUD : Titres et logo (Très en avant)
   ------------------------------------------------------------ */
body.ship .cockpit-hud {
    position: relative;
    z-index: 25;
    pointer-events: auto;
    padding: clamp(24px, 4.5vh, 48px) 20px 0;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* ------------------------------------------------------------
   Badge de marque centré sur la verrière (Logo + Optix)
   ------------------------------------------------------------ */
body.ship .hero__brand-badge {
    display: inline-flex;
    align-items: center;
    gap: clamp(12px, 1.5vw, 18px);
    padding: clamp(8px, 1.2vh, 14px) clamp(22px, 2.4vw, 32px);
    margin-bottom: clamp(20px, 3vh, 32px); /* Espace aéré sous le badge */
    background: rgba(16, 20, 38, 0.96);
    border: 1.5px solid rgba(41, 85, 255, 0.55);
    border-radius: 9999px;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.75),
        0 0 25px rgba(41, 85, 255, 0.35),
        inset 0 0 14px rgba(179, 102, 255, 0.2);
    /* backdrop-filter retiré : fond 96% opaque, 0 passe de flou shader GPU */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

body.ship .hero__brand-badge:hover {
    transform: translateY(-2px) scale(1.03);
    border-color: rgba(179, 102, 255, 0.9);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.85),
        0 0 35px rgba(179, 102, 255, 0.6),
        inset 0 0 20px rgba(41, 85, 255, 0.4);
}

body.ship .hero__brand-badge .hero__logo-img {
    width: clamp(58px, 7vh, 80px);
    height: clamp(58px, 7vh, 80px);
    border-radius: 50%;
    display: block;
    /* Fond plus clair situé uniquement derrière l'icône */
    background: radial-gradient(circle, rgba(122, 90, 248, 0.4) 0%, rgba(41, 85, 255, 0.2) 70%, transparent 100%);
    padding: clamp(4px, 0.6vh, 8px);
}

body.ship .hero__brand-badge .hero__brand-name {
    font-family: var(--font-brand), 'Artonex', sans-serif;
    font-size: clamp(1.8rem, 2.8vw, 2.8rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    /* Dégradé néon ultra-saturé officiel Optix Theme sans halo */
    background: linear-gradient(135deg, #3b82f6 0%, #2955ff 25%, #7c3aed 60%, #b366ff 85%, #c026d3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: none;
    line-height: 1.25;
    display: inline-block;
    padding-bottom: 3px;
}

body.ship .hero__title {
    font-size: clamp(1.35rem, 2.2vw, 2.2rem);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto clamp(20px, 3vh, 32px); /* Espace aéré sous le titre */
    line-height: 1.25;
    letter-spacing: -0.01em;
    white-space: nowrap; /* Force 1 seule ligne fluide sur desktop */
}

@media (max-width: 768px) {
    /* Déplacer uniquement le décor : le HUD et l'interface gardent leur ancrage. */
    body.ship .cockpit-mask img {
        position: relative;
        top: clamp(-96px, -10svh, -60px);
    }

    /* Aperçu mobile plus grand et plus incliné au départ, sans débordement.
       Le scroll conserve le redressement et la largeur cible existants. */
    body.ship .hero-deck {
        width: 32%;
        max-width: calc(100vw - 8px);
        transform: perspective(750px) rotateX(24deg);
    }

    /* Ancrage mesuré sur l'aperçu initial ; le HUD conserve le fondu existant. */
    body.ship .cockpit-hud.hero-mobile-cta-positioned .cockpit-hint {
        position: absolute;
        top: var(--hero-mobile-cta-top);
        left: 0;
        right: 0;
        width: max-content;
        max-width: calc(100vw - 24px);
        margin: 0 auto !important;
    }

    body.ship .hero__title {
        white-space: normal; /* Permet le retour à la ligne sur mobile */
        font-size: clamp(1.25rem, 4.5vw, 1.8rem);
    }
}

body.ship .cockpit-hud .hero__subtitle {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    margin-bottom: clamp(14px, 2.4vh, 26px);
}

body.ship .cockpit-hint {
    margin: clamp(22px, 3.5vh, 38px) auto 0; /* Espace aéré au-dessus du bouton */
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font: inherit;
    padding: 0;
    position: relative;
    z-index: 30;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

body.ship .cockpit-hint:hover {
    transform: translateY(-2px);
}

body.ship .cockpit-hint:active {
    transform: translateY(0px) scale(0.99);
    transition-duration: 0.15s;
}

body.ship .cockpit-hint .section-divider__title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: clamp(10px, 1.4vh, 14px) clamp(22px, 2.4vw, 32px);
    /* Bouton d'action OPAQUE et élégant aux couleurs Optix */
    background: linear-gradient(135deg, #2955ff 0%, #5850ec 50%, #7c3aed 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    box-shadow:
        0 6px 20px rgba(41, 85, 255, 0.35),
        0 0 15px rgba(124, 58, 237, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    font-size: clamp(0.95rem, 1.15vw, 1.1rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #ffffff;
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

body.ship .cockpit-hint:hover .section-divider__title {
    background: linear-gradient(135deg, #3260ff 0%, #635bff 50%, #8b44ff 100%);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow:
        0 8px 26px rgba(41, 85, 255, 0.5),
        0 0 25px rgba(139, 68, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body.ship .cockpit-hint .hero__cta-icon {
    color: #ffffff;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

body.ship .cockpit-hint:hover .hero__cta-icon {
    transform: translateY(-1px);
    color: #ffffff;
}

/* ------------------------------------------------------------
   Chevrons animés autour du bouton Hero CTA (Optimiser mon PC)
   ------------------------------------------------------------ */
body.ship .cockpit-hint .chevron-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 0 4px;
}

body.ship .cockpit-hint .chevron {
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 8px solid #3b76ff;
    opacity: 0.25;
    filter: none !important;
    will-change: transform, opacity;
    animation: hero-chevron-pulse 2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

body.ship .cockpit-hint .chevron:nth-child(1) {
    border-top-color: #3b76ff;
    animation-delay: 0s;
}

body.ship .cockpit-hint .chevron:nth-child(2) {
    border-top-color: #6366f1;
    animation-delay: 0.28s;
}

body.ship .cockpit-hint .chevron:nth-child(3) {
    border-top-color: #a855f7;
    animation-delay: 0.56s;
}

/* Réactivité interactive au survol : cadence légèrement plus vive, toujours fluide et épurée */
body.ship .cockpit-hint:hover .chevron {
    animation-duration: 1.3s;
}

body.ship .cockpit-hint:hover .chevron:nth-child(1) {
    animation-delay: 0s;
}

body.ship .cockpit-hint:hover .chevron:nth-child(2) {
    animation-delay: 0.18s;
}

body.ship .cockpit-hint:hover .chevron:nth-child(3) {
    animation-delay: 0.36s;
}

@keyframes hero-chevron-pulse {
    0% {
        opacity: 0.2;
        transform: translateY(0);
    }
    40% {
        opacity: 0.9;
        transform: translateY(4px);
    }
    75% {
        opacity: 0.35;
        transform: translateY(6px);
    }
    100% {
        opacity: 0.2;
        transform: translateY(0);
    }
}

/* ------------------------------------------------------------
   Panneau compatibilité (apparaît à droite pendant le zoom)
   ------------------------------------------------------------ */
/* L'interface zoome désormais au CENTRE de l'écran : le panneau
/* ------------------------------------------------------------
   Panneau compatibilité : placé à DROITE de l'interface en colonne superposée (Pills 100% arrondies)
   ------------------------------------------------------------ */
body.ship .hero-compat {
    position: absolute;
    z-index: 2; /* En arrière-plan latéral de la console centrale */
    right: clamp(2vw, 4vw, 8vw);
    top: 50%;
    transform: translateY(-50%) translateZ(0);
    will-change: transform, opacity;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(14px, 2vh, 22px);
    opacity: 0;
    pointer-events: none;
}

body.ship .hero-compat__label {
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 1.3vw, 1.25rem);
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: none;
    margin-left: 8px;
}

body.ship .hero-compat__os {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2vh, 20px);
    padding: 0;
}

body.ship .hero-compat .perf-badge {
    padding: clamp(16px, 2.2vh, 24px) clamp(38px, 4vw, 56px);
    min-height: 0;
    /* Design sobre & pro : verre sombre épuré haute fidélité (0 calcul de filtre shader) */
    background: rgba(16, 20, 36, 0.97);
    border: 1.5px solid rgba(59, 130, 246, 0.4);
    border-radius: 9999px; /* 100% Arrondi */
    box-shadow:
        0 14px 38px rgba(0, 0, 0, 0.7),
        0 0 25px rgba(41, 85, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    cursor: default;
}

body.ship .hero-compat .perf-badge__icon-img {
    height: clamp(40px, 5.2vh, 60px);
    width: auto;
    display: block;
    filter: none;
}

@media (max-width: 900px) {
    body.ship .hero-compat {
        right: auto;
        left: 0;
        right: 0;
        top: auto;
        bottom: 24px;
        transform: none;
        align-items: center;
    }

    body.ship .hero-compat__os {
        flex-direction: row;
        gap: 12px;
    }
}

/* ------------------------------------------------------------
   Accroche à GAUCHE de l'interface : Titre flottant dans l'espace
   ------------------------------------------------------------ */
body.ship .hero-callout {
    position: absolute;
    z-index: 10;
    left: auto;
    /* Flotte librement sur le flanc gauche de la console logicielle (légèrement décalé vers la droite) */
    right: calc(50% + var(--interface-half-width, min(380px, 23vw)) + clamp(6px, 0.8vw, 14px));
    /* Positionnement vertical */
    top: 48%;
    transform: translateY(-50%) translateZ(0);
    will-change: transform, opacity;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(16px, 2.2vh, 24px);
    width: max-content;
    max-width: clamp(300px, 25vw, 440px);
    opacity: 0;
    pointer-events: none;
}

body.ship .hero-callout__pointer {
    display: none;
}

body.ship .hero-callout__content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    transition: none;
}

body.ship .hero-callout__text {
    font-family: var(--font-display, 'Softura', sans-serif);
    font-size: clamp(1.75rem, 2.3vw, 2.5rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.015em;
    color: #F0F4FF;
    margin: 0;
    text-align: left;
    text-wrap: balance;
    text-shadow:
        0 4px 20px rgba(0, 0, 0, 0.9),
        0 0 35px rgba(36, 80, 254, 0.4),
        0 0 65px rgba(169, 10, 255, 0.22);
    filter: none;
}

/* Bouton CTA d'action directe sous le callout */
body.ship .hero-callout__cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #2450FE 0%, #7b35ff 50%, #A90AFF 100%);
    box-shadow: none;
    border: none;
    outline: 1px solid rgba(255, 255, 255, 0.2);
    outline-offset: -1px;
    border-radius: 9999px;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), outline-color 0.4s ease, filter 0.4s ease;
}

body.ship .hero-callout__cta:hover {
    transform: translateY(-2px);
    outline-color: rgba(255, 255, 255, 0.55);
    filter: brightness(1.12);
    box-shadow: none;
    color: #ffffff;
}

body.ship .hero-callout__cta:active {
    transform: translateY(0) scale(0.98);
    filter: brightness(0.95);
}

body.ship .hero-callout__cta-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.ship .hero-callout__cta:hover .hero-callout__cta-icon {
    transform: translateX(4px);
}

@media (max-width: 900px) {
    body.ship .hero-deck__card[data-slot="1"],
    body.ship .hero-deck__card[data-slot="2"] {
        display: none !important;
    }

    body.ship .hero-callout {
        left: 0;
        right: 0;
        top: auto;
        bottom: 120px;
        transform: none;
        align-items: center;
        max-width: 90vw;
        margin: 0 auto;
    }

    body.ship .hero-callout__content {
        align-items: center;
        text-align: center;
        padding: 0;
        background: none;
        border: none;
        box-shadow: none;
    }

    body.ship .hero-callout__text {
        text-align: center;
        font-size: clamp(1.3rem, 3.8vw, 1.75rem);
        line-height: 1.22;
    }
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

/* Écrans bas (laptops 768p / fenêtres réduites) : le HUD se
   compacte pour ne JAMAIS chevaucher l'écran central du pupitre */
@media (min-width: 768px) and (max-height: 860px) {
    body.ship .hero {
        /* toujours nav (64px) + une petite marge, jamais moins */
        padding-top: calc(var(--nav-height) + clamp(6px, 2vh, 16px));
    }

    body.ship .cockpit-hud .hero__logo {
        width: 62px;
        height: 62px;
        margin-bottom: 8px;
    }

    body.ship .hero__title {
        font-size: clamp(1.7rem, 3.6vw, 2.4rem);
        margin-bottom: 8px;
    }

    body.ship .cockpit-hud .hero__subtitle {
        font-size: 0.92rem;
        max-width: 640px;
        margin-bottom: 10px;
    }
}

/* Composition finale mobile : activée uniquement par sa branche GSAP. */
@media (max-width: 768px) {
    body.ship .hero.hero--mobile-final-layout {
        min-height: var(--hero-mobile-min-height, 100vh);
        min-height: max(100dvh, var(--hero-mobile-min-height, 100svh));
    }

    /* Réserver une marge de zoom : l'aperçu ne doit pas rétrécir au redressement. */
    body.ship .hero--mobile-final-layout .hero-deck {
        max-width: calc(100vw - 64px);
    }

    /* Annuler le chevauchement historique (-140px) : la télémétrie suit le hero
       dans le flux normal, sans cacher son titre ni son contenu. */
    body.ship .optix-telemetry {
        margin-top: 0;
    }

    body.ship .hero--mobile-final-layout .hero-callout {
        inset: 0;
        width: auto;
        height: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        transform: none;
        opacity: 1;
        pointer-events: none;
    }

    body.ship .hero--mobile-final-layout .hero-callout__content {
        position: absolute;
        top: var(--hero-mobile-title-top);
        left: 16px;
        right: 16px;
        display: block;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
        transition: none;
    }

    body.ship .hero--mobile-final-layout .hero-callout__text {
        margin: 0;
        font-size: clamp(1.3rem, 5.2vw, 1.9rem);
        line-height: 1.25;
        text-align: center;
        color: #e8edf9;
        text-wrap: balance;
    }

    body.ship .hero--mobile-final-layout .hero-compat {
        top: var(--hero-mobile-badges-top);
        bottom: auto;
        left: 16px;
        right: 16px;
        width: min(400px, calc(100% - 32px));
        height: auto;
        margin: 0 auto;
        gap: 0;
        transform: none;
        opacity: 1;
        pointer-events: none;
    }

    body.ship .hero--mobile-final-layout .hero-compat__label {
        display: none;
    }

    body.ship .hero--mobile-final-layout .hero-compat__os {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 10px;
    }

    body.ship .hero--mobile-final-layout .hero-compat .perf-badge {
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        min-height: 0;
        height: 44px;
        padding: 10px 12px;
        border: 1px solid rgba(56, 117, 255, 0.3);
        border-radius: 9999px;
        background: rgba(12, 18, 32, 0.85);
        box-shadow: inset 0 1px 0 rgba(220, 225, 251, 0.1);
    }

    body.ship .hero--mobile-final-layout .hero-compat .perf-badge__icon-img {
        display: block;
        width: auto;
        max-width: 100%;
        height: 20px;
        object-fit: contain;
    }

    body.ship .hero--mobile-final-layout .hero-callout__cta {
        position: absolute;
        top: var(--hero-mobile-download-top);
        left: 16px;
        right: 16px;
        box-sizing: border-box;
        width: min(360px, calc(100% - 32px));
        min-height: 48px;
        margin: 0 auto;
        padding: 12px 18px;
        font-size: 0.95rem;
        line-height: 1.5;
        color: #e8edf9;
        transition: background-color 0.2s ease, outline-color 0.2s ease;
    }

    body.ship .hero--mobile-final-layout .hero-callout__cta:focus-visible {
        outline: 2px solid #7b35ff;
        outline-offset: 4px;
    }

    body.ship .hero--mobile-final-layout .hero-deck__controls {
        display: none;
    }
}
