/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--turquoise-light), var(--violet-light));
}

/* Performance optimization for parallax */
.hero::before {
    will-change: transform;
    backface-visibility: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="80" cy="40" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="40" cy="80" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

/* Section-scoped background image (replaces previous global body background) */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../../graphique/screens/illustration-background-home.webp');
    background-repeat: no-repeat;
    background-position: center 20%;
    background-size: 110% auto; /* widen slightly to avoid right edge gap */
    opacity: 0.16;
    z-index: 0; /* behind content; .hero-container has z-index:1 */
    pointer-events: none;
    will-change: transform;
    transform: translateZ(0); /* promote to its own layer */
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-family: var(--font-accent);
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.2;
    color: var(--violet-dark);
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(62, 73, 118, 0.2);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray-dark);
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    position: relative;
    z-index: 2;
    animation: float 3s ease-in-out infinite;
}

.phone-screen {
    width: var(--phone-width);
    height: auto;
    max-width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    filter: drop-shadow(4px 4px 8px rgba(62, 73, 118, 0.3));
    object-fit: contain;
    display: block;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-picto {
    position: absolute;
    width: var(--icon-xxl);
    height: var(--icon-xxl);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    animation: floatPicto 4s ease-in-out infinite;
}

.floating-picto img {
    width: 30px;
    height: 30px;
}

.picto-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.picto-2 {
    top: 60%;
    right: 15%;
    animation-delay: 1s;
}

.picto-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 2s;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes floatPicto {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-xl);
    }
    
    .phone-screen {
        width: var(--phone-width-tablet);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: var(--spacing-xl) 0;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .floating-picto {
        width: 50px;
        height: 50px;
    }
    
    .floating-picto img {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .phone-screen {
        width: var(--phone-width-mobile);
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
}
