/* ===================================
   REDARROW - EFFETS VISUELS CONSOLIDÉS
   AI Background + Glow Effects
   VERSION CORRIGÉE - Pas de double ascenseur
   =================================== */

/* ===================================
   AI BACKGROUND - Fond futuriste
   =================================== */

/* Fond général avec gradient animé */
body {
    position: relative;
    background: linear-gradient(135deg, #0A0A0A 0%, #1a1a2e 50%, #16213e 100%) !important;
    background-size: 400% 400% !important;
    animation: gradientShift 15s ease infinite;
    background-attachment: fixed !important;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Overlay coloré - CORRIGÉ: pas de width/height explicites */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(220, 38, 38, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Grille AI style tech - CORRIGÉ: pas de width/height explicites */
.ai-grid-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Particules flottantes - CORRIGÉ */
.ai-particles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.particle:nth-child(1) { width: 4px; height: 4px; top: 20%; left: 10%; animation-duration: 15s; }
.particle:nth-child(2) { width: 6px; height: 6px; top: 60%; left: 70%; animation-duration: 20s; animation-delay: 2s; }
.particle:nth-child(3) { width: 3px; height: 3px; top: 80%; left: 30%; animation-duration: 18s; animation-delay: 4s; }
.particle:nth-child(4) { width: 5px; height: 5px; top: 40%; left: 80%; animation-duration: 22s; animation-delay: 1s; }
.particle:nth-child(5) { width: 4px; height: 4px; top: 10%; left: 50%; animation-duration: 16s; animation-delay: 3s; }
.particle:nth-child(6) { width: 7px; height: 7px; top: 70%; left: 20%; animation-duration: 25s; animation-delay: 5s; }
.particle:nth-child(7) { width: 3px; height: 3px; top: 30%; left: 90%; animation-duration: 19s; animation-delay: 2.5s; }
.particle:nth-child(8) { width: 5px; height: 5px; top: 90%; left: 60%; animation-duration: 21s; animation-delay: 4.5s; }

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(100px, -100px) scale(1.2);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50px, -200px) scale(0.8);
        opacity: 0.4;
    }
    75% {
        transform: translate(150px, -150px) scale(1.1);
        opacity: 0.5;
    }
}

/* Orbes lumineux AI */
.ai-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 20s infinite ease-in-out;
}

.ai-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation-duration: 25s;
}

.ai-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation-duration: 30s;
    animation-delay: 5s;
}

.ai-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.1) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 20s;
    animation-delay: 10s;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-30px, 30px) scale(0.9);
    }
    75% {
        transform: translate(40px, -40px) scale(1.05);
    }
}

/* Scanlines effet CRT - CORRIGÉ */
.ai-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent 50%, rgba(99, 102, 241, 0.02) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

/* Matrix Rain Effect - CORRIGÉ */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.matrix-column {
    position: absolute;
    top: -100%;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: rgba(99, 102, 241, 0.9);
    line-height: 1.2;
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.8);
    animation: matrix-fall linear infinite;
    white-space: nowrap;
}

@keyframes matrix-fall {
    0% {
        top: -100%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* ===================================
   OVERRIDE POUR LISIBILITÉ
   =================================== */

/* Sections transparentes pour voir le fond AI */
section,
.hero,
.page-hero,
.page-header,
.page-header-minimal {
    position: relative;
    z-index: 1;
    background: transparent !important;
}

/* Exception: Sections avec fond clair pour lisibilité */
.features {
    background: rgb(250 250 249 / 10%) !important;
}

.image-showcase,
.quick-links,
.service-images,
.contact {
    background: rgb(250 250 249 / 14%) !important;
}

/* Navbar avec effet glass */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
}

/* Footer adapté */
.footer {
    background: rgba(250, 250, 249, 0.95) !important;
    backdrop-filter: blur(10px);
}

/* Textes en blanc sur fond sombre */
h1, h2, h3, h4, h5, h6 {
    color: white !important;
}

p, span, a, li {
    color: rgba(255, 255, 255, 0.9) !important;
}

.hero-description,
.section-description,
.page-description {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Navigation - textes sombres */
.nav-link {
    color: var(--gray-700) !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--dark) !important;
}

/* Cards avec fond semi-transparent */
.feature-card,
.link-card,
.showcase-item,
.contact-form {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
}

/* Textes dans les cards restent sombres */
.feature-card h3,
.feature-card p,
.link-card h3,
.link-card p {
    color: var(--gray-700) !important;
}

/* Badges avec fond adapté */
.hero-badge,
.section-badge,
.fullscreen-badge {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* Footer textes */
.footer h3,
.footer p,
.footer a,
.footer-tagline,
.footer-bottom p {
    color: var(--gray-700) !important;
}

.footer-links a:hover {
    color: var(--dark) !important;
}

/* Titres de sections */
.section-title,
.page-title {
    color: white !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* CTA Section - texte blanc */
.cta-section h2,
.cta-section p {
    color: white !important;
}

/* Masquer anciens backgrounds */
.hero-background,
.gradient-orb {
    display: none !important;
}

/* ===================================
   GLOW ENHANCEMENTS - Effets de lueur
   =================================== */

/* Lueurs pour la section CTA */
.cta-section::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.4) 0%, rgba(59, 130, 246, 0.2) 30%, transparent 70%);
    top: -400px;
    right: -200px;
    border-radius: 50%;
    filter: blur(100px);
    animation: float-glow 25s infinite ease-in-out;
    z-index: 0;
}

.cta-section::after {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, rgba(8, 145, 178, 0.2) 30%, transparent 70%);
    bottom: -350px;
    left: -250px;
    border-radius: 50%;
    filter: blur(100px);
    animation: float-glow 30s infinite ease-in-out reverse;
    z-index: 0;
}

@keyframes float-glow {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    25% { 
        transform: translate(100px, -100px) scale(1.1);
        opacity: 0.5;
    }
    50% { 
        transform: translate(-50px, 50px) scale(0.9);
        opacity: 0.35;
    }
    75% { 
        transform: translate(80px, 80px) scale(1.05);
        opacity: 0.45;
    }
}

/* Amélioration des lueurs pour le footer */
.footer::before {
    content: '';
    position: absolute;
    width: 1200px;
    height: 1200px;
    background: radial-gradient(
        circle, 
        rgba(37, 99, 235, 0.8) 0%, 
        rgba(59, 130, 246, 0.5) 20%, 
        rgba(96, 165, 250, 0.3) 40%,
        rgba(147, 197, 253, 0.15) 60%, 
        transparent 80%
    );
    top: -600px;
    right: -200px;
    border-radius: 50%;
    filter: blur(150px);
    animation: float-glow 20s infinite ease-in-out;
}

.footer::after {
    content: '';
    position: absolute;
    width: 1100px;
    height: 1100px;
    background: radial-gradient(
        circle, 
        rgba(6, 182, 212, 0.75) 0%, 
        rgba(14, 165, 233, 0.45) 20%, 
        rgba(34, 211, 238, 0.25) 40%,
        rgba(103, 232, 249, 0.12) 60%, 
        transparent 80%
    );
    bottom: -550px;
    left: -200px;
    border-radius: 50%;
    filter: blur(140px);
    animation: float-glow 25s infinite ease-in-out reverse;
}

.footer .container {
    position: relative;
    z-index: 1;
}

/* Effet de lueur sur les cartes au hover */
.feature-card:hover {
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 0 40px rgba(37, 99, 235, 0.1),
        inset 0 0 60px rgba(37, 99, 235, 0.03);
}

.link-card:hover {
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.1),
        0 0 50px rgba(37, 99, 235, 0.12),
        inset 0 0 80px rgba(6, 182, 212, 0.04);
}

/* Lueur sur les icônes des features */
.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
}

.feature-card:hover .feature-icon::after {
    content: '';
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.4) 0%, transparent 70%);
    filter: blur(20px);
    z-index: -1;
    animation: pulse-icon 2s infinite ease-in-out;
}

@keyframes pulse-icon {
    0%, 100% { opacity: 0.3; transform: scale(0.9); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Effet de brillance sur les boutons primaires */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.4), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Lueur sur les icônes des link-cards */
.link-card:hover .link-icon::after {
    content: '';
    position: absolute;
    inset: -15px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.5) 0%, transparent 65%);
    filter: blur(25px);
    z-index: -1;
    animation: pulse-link-icon 2s infinite ease-in-out;
}

@keyframes pulse-link-icon {
    0%, 100% { opacity: 0.4; transform: scale(0.95); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* Lueurs pour les badges */
.hero-badge::after {
    content: '';
    position: absolute;
    inset: -8px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, transparent 70%);
    filter: blur(15px);
    z-index: -1;
    animation: pulse-badge 3s infinite ease-in-out;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* Hero Image - Grande image avec lueurs */
.hero-image-wrapper {
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 80px rgba(37, 99, 235, 0.2),
        inset 0 0 100px rgba(37, 99, 235, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-image-wrapper:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 30px 60px -15px rgba(0, 0, 0, 0.3),
        0 0 120px rgba(37, 99, 235, 0.35),
        inset 0 0 120px rgba(37, 99, 235, 0.15);
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        135deg,
        rgba(37, 99, 235, 0.5) 0%,
        rgba(6, 182, 212, 0.5) 25%,
        rgba(168, 85, 247, 0.5) 50%,
        rgba(236, 72, 153, 0.5) 75%,
        rgba(37, 99, 235, 0.5) 100%
    );
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: rainbow-border 8s linear infinite;
    background-size: 300% 300%;
}

.hero-image-wrapper:hover::before {
    opacity: 0.6;
}

@keyframes rainbow-border {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===================================
   RESPONSIVE - Désactiver sur mobile
   =================================== */
@media (max-width: 768px) {
    .ai-grid-background,
    .ai-particles,
    .ai-scanlines,
    .matrix-rain {
        display: none;
    }
    
    .ai-orb {
        filter: blur(60px);
    }
    
    body {
        background: linear-gradient(135deg, #0A0A0A 0%, #1a1a2e 100%) !important;
        background-size: 100% 100%;
        animation: none;
    }
    
    .hero-image-wrapper {
        border-radius: 16px;
    }
}
