/* ============================================
   HERO V4 - Robot 3D Spline Styles
   ============================================ */

/* Hero V4 Container - Split Screen Layout */
.hero-v4 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-v4-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Left Side - Content */
.hero-v4-content {
    max-width: 600px;
}

.hero-v4-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-v4-content h2 {
    font-size: 1.5rem;
    color: #a0a0b0;
    font-weight: 400;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-v4-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #8a8a8a;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-v4-content .hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

/* Right Side - 3D Robot Container */
.hero-v4-robot {
    position: relative;
    width: 100%;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Spline Canvas */
#spline-robot-canvas {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 1s ease;
}

#spline-robot-canvas.loaded {
    opacity: 1;
}

/* Robot Loader */
.robot-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.robot-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(110, 72, 255, 0.1);
    border-top-color: #6e48ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.robot-loader p {
    color: #a0a0b0;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Robot Fallback (si Spline ne charge pas) */
.robot-fallback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.fallback-icon {
    font-size: 5rem;
    background: linear-gradient(135deg, #6e48ff 0%, #9d4edd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.robot-fallback p {
    color: #a0a0b0;
    font-size: 1.125rem;
}

/* Spotlight Effect */
.spotlight {
    position: absolute;
    top: -40%;
    left: 0;
    width: 50%;
    height: 200%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%
    );
    pointer-events: none;
    opacity: 0.5;
    animation: spotlightMove 10s ease-in-out infinite;
}

@keyframes spotlightMove {
    0%, 100% {
        transform: translateY(0) rotate(-15deg);
    }
    50% {
        transform: translateY(-50px) rotate(-10deg);
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablette */
@media (max-width: 1024px) {
    .hero-v4-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 20px;
    }

    .hero-v4-content {
        max-width: 100%;
        text-align: center;
    }

    .hero-v4-content h1 {
        font-size: 2.5rem;
    }

    .hero-v4-content .hero-buttons {
        justify-content: center;
    }

    .hero-v4-robot {
        height: 500px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero-v4 {
        padding: 100px 0 60px;
    }

    .hero-v4-container {
        gap: 30px;
    }

    .hero-v4-content h1 {
        font-size: 2rem;
    }

    .hero-v4-content h2 {
        font-size: 1.125rem;
    }

    .hero-v4-content p {
        font-size: 1rem;
    }

    .hero-v4-content .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-v4-content .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Masquer le robot 3D sur mobile pour les performances */
    .hero-v4-robot {
        display: none;
    }

    /* Optionnel : afficher une version statique sur mobile */
    .hero-v4-robot.mobile-fallback {
        display: flex;
        height: 300px;
    }

    .hero-v4-robot.mobile-fallback #spline-robot-canvas {
        display: none;
    }

    .hero-v4-robot.mobile-fallback .robot-fallback {
        display: flex !important;
        flex-direction: column;
        align-items: center;
    }
}

/* Petits mobiles */
@media (max-width: 480px) {
    .hero-v4-content h1 {
        font-size: 1.75rem;
    }

    .hero-v4-container {
        padding: 0 15px;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Préférence pour mouvement réduit (accessibilité) */
@media (prefers-reduced-motion: reduce) {
    .spotlight,
    .loader-spinner,
    .hero-v4-content h1,
    .hero-v4-content h2,
    .hero-v4-content p,
    .hero-v4-content .hero-buttons {
        animation: none;
    }

    #spline-robot-canvas {
        transition: none;
    }
}

/* Mode sombre forcé */
@media (prefers-color-scheme: dark) {
    /* Styles déjà adaptés pour le dark mode */
}
