@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600;700&display=swap');

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --secondary-gradient: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #581c87 100%);
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-pink: #d946ef;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --bg-dark: #0a0a0f;
    --bg-darker: #050507;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --warning-border: rgba(251, 191, 36, 0.3);
    --warning-text: #fbbf24;
}

body {
    font-family: 'Exo 2', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(217, 70, 239, 0.2) 0%, transparent 50%);
    background-attachment: fixed;
    overflow-x: hidden;
    cursor: none;
    min-height: 100vh;
}

/* Curseur personnalisé - Version simple et fonctionnelle */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-purple);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 1;
    /* Pas de transition sur position pour éviter le lag */
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    transform-origin: center center;
}

.custom-cursor.hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--accent-pink);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    transform: scale(1.5);
}

/* Classe pour identifier les éléments avec hover actif */
.cursor-hover {
    position: relative;
}

.cursor-hover::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.cursor-hover:hover::before {
    opacity: 1;
}

/* Particules animées */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent-purple);
    border-radius: 50%;
    animation: float 6s infinite linear;
    opacity: 0.7;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Header avec transparence */
.header {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
    text-decoration: none;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 5px rgba(139, 92, 246, 0.5));
    }
    to {
        filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.8));
    }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    border-radius: 8px;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.nav-links a:hover::before, .nav-links a.active::before {
    opacity: 0.2;
}

/* Menu mobile */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Contenu principal */
.main-content {
    margin-top: 80px;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* En-têtes de pages */
.page-header {
    text-align: center;
    margin-bottom: 5rem;
    animation: fadeInUp 1s ease-out;
}

.page-header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.page-header .subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

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

/* Animations de base */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Boutons */
.btn {
    padding: 1.2rem 2.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    font-family: 'Exo 2', sans-serif;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-primary);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--accent-purple);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.2);
}

/* Cartes glassmorphiques */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.glass-card:hover::before {
    transform: scaleX(1);
}

.glass-card:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--accent-purple);
    transform: translateY(-10px);
    box-shadow: 0 35px 70px rgba(139, 92, 246, 0.2);
}

/* Footer cyberpunk */
.footer {
    background: var(--bg-darker);
    color: var(--text-secondary);
    padding: 3rem 2rem 1.5rem;
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 2;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
}

.footer-section p, .footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-purple);
}

.social-links, .footer-social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a, .footer-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    text-decoration: none;
}

.social-links a:hover, .footer-social-links a:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .main-content {
        padding: 3rem 1rem;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .btn {
        padding: 1rem 2rem;
        font-size: 0.9rem;
    }

    .glass-card {
        padding: 2rem 1.5rem;
    }

    .social-links, .footer-social-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Animations supplémentaires */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

@keyframes backgroundMove {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 20px 20px, -20px 20px; }
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes glitch {
    0% { transform: translate(0); }
    10% { transform: translate(-2px, 2px); }
    20% { transform: translate(-2px, -2px); }
    30% { transform: translate(2px, 2px); }
    40% { transform: translate(2px, -2px); }
    50% { transform: translate(-2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    70% { transform: translate(2px, 2px); }
    80% { transform: translate(-2px, -2px); }
    90% { transform: translate(2px, 2px); }
    100% { transform: translate(0); }
}

@keyframes ripple {
    to {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

@keyframes float3D {
    0%, 100% {
        transform: translateY(0) rotateY(0deg);
    }
    50% {
        transform: translateY(-20px) rotateY(5deg);
    }
}

@keyframes glow-line {
    from {
        box-shadow: 0 0 5px rgba(139, 92, 246, 0.5);
    }
    to {
        box-shadow: 0 0 15px rgba(139, 92, 246, 0.8);
    }
}

/* Scan laser */
.laser-scan {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-gradient);
    animation: laser-move 2s ease-in-out infinite;
    opacity: 0;
}

@keyframes laser-move {
    0% { left: -100%; opacity: 0; }
    50% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}