/* Base Styles - Optimisé pour la compatibilité entre navigateurs */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #7e22ce;
    --accent-color: #60a5fa;
    --neon-blue: #00f3ff;
    --neon-purple: #9d4edd;
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --text-color: #ffffff;
    --card-bg: rgba(15, 15, 20, 0.7);
    --glow-blue: 0 0 7px rgba(0, 243, 255, 0.7);
    --glow-purple: 0 0 7px rgba(157, 78, 221, 0.7);
    --glow-mix: 0 0 7px rgba(0, 243, 255, 0.5), 0 0 10px rgba(157, 78, 221, 0.5);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--darker-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: all var(--transition-speed) ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

section {
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

/* Particles Background - Simplifié */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -2;
    background-color: var(--darker-bg);
}

/* Skull Background */
.skull-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('http://zerwyx.com/content/media/banner_main.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.05;
    z-index: -1;
    filter: hue-rotate(240deg);
}

/* Neon Effects - Optimisés */
.neon-text {
    color: var(--text-color);
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.7), 0 0 10px rgba(157, 78, 221, 0.5);
}

.neon-link {
    position: relative;
    color: var(--text-color);
    transition: all var(--transition-speed) ease;
}

.neon-link:hover {
    color: var(--neon-blue);
    text-shadow: var(--glow-blue);
}

.neon-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    transition: width var(--transition-speed) ease;
    box-shadow: var(--glow-mix);
}

.neon-link:hover::after {
    width: 100%;
}

.neon-button {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    border: none;
    border-radius: 50px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 0 10px rgba(123, 31, 162, 0.4);
}

.neon-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(123, 31, 162, 0.6);
}

.neon-button.outline {
    background: transparent;
    border: 2px solid var(--neon-blue);
    box-shadow: var(--glow-blue);
}

.neon-button.outline:hover {
    background: rgba(0, 243, 255, 0.1);
}

.neon-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--neon-blue);
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.7);
}

/* Glitch Effect - Simplifié et optimisé */
.glitch {
    font-family: 'Anton', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    color: var(--text-color);
    letter-spacing: 5px;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--neon-purple);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--neon-blue);
    animation: glitch-anim2 3s infinite linear alternate-reverse;
}

/* Header - Optimisé */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all var(--transition-speed) ease;
    background: rgba(5, 5, 5, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

header.scrolled {
    padding: 15px 50px;
    background: rgba(5, 5, 5, 0.9);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: all var(--transition-speed) ease;
    border-radius: 3px;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
    background: radial-gradient(circle at center, rgba(10, 10, 15, 0.8) 0%, rgba(5, 5, 5, 0.95) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    margin: 20px 0;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Services Section */
.services {
    background: linear-gradient(to bottom, var(--darker-bg), var(--dark-bg));
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.service-card:hover::before {
    opacity: 0.1;
}

.card-content {
    padding: 30px;
    text-align: center;
}

.card-content h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--neon-blue);
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.5);
}

.card-content p {
    margin-bottom: 25px;
    opacity: 0.8;
}

.card-link {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    border-radius: 50px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all var(--transition-speed) ease;
}

.card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(123, 31, 162, 0.4);
}

/* Projects Section */
.projects {
    background: var(--darker-bg);
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(126, 34, 206, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--neon-purple);
    text-shadow: 0 0 5px rgba(157, 78, 221, 0.5);
}

.project-info p {
    margin-bottom: 20px;
    opacity: 0.8;
}

.project-link {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: var(--text-color);
    border-radius: 50px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all var(--transition-speed) ease;
}

.project-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

/* Contact Section */
.contact {
    background: linear-gradient(to top, var(--darker-bg), var(--dark-bg));
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.contact-item p {
    margin-bottom: 15px;
}

.discord-widget {
    flex: 1;
    min-width: 350px;
    display: flex;
    justify-content: center;
}

.discord-widget iframe {
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
    background: var(--darker-bg);
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: all var(--transition-speed) ease;
}

.social-link:hover {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(123, 31, 162, 0.4);
}

/* Animations - Simplifiées et optimisées */
@keyframes neonPulse {
    from {
        text-shadow: 0 0 5px rgba(0, 243, 255, 0.7);
    }
    to {
        text-shadow: 0 0 5px rgba(157, 78, 221, 0.7), 0 0 10px rgba(157, 78, 221, 0.5);
    }
}

@keyframes glitch-anim {
    0% {
        clip: rect(30px, 9999px, 10px, 0);
    }
    20% {
        clip: rect(80px, 9999px, 95px, 0);
    }
    40% {
        clip: rect(15px, 9999px, 25px, 0);
    }
    60% {
        clip: rect(54px, 9999px, 65px, 0);
    }
    80% {
        clip: rect(33px, 9999px, 12px, 0);
    }
    100% {
        clip: rect(3px, 9999px, 66px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(16px, 9999px, 21px, 0);
    }
    20% {
        clip: rect(90px, 9999px, 58px, 0);
    }
    40% {
        clip: rect(72px, 9999px, 22px, 0);
    }
    60% {
        clip: rect(60px, 9999px, 72px, 0);
    }
    80% {
        clip: rect(35px, 9999px, 39px, 0);
    }
    100% {
        clip: rect(65px, 9999px, 9px, 0);
    }
}

/* Responsive Styles - Optimisés */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.2rem;
    }
    
    .glitch {
        font-size: 4rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .neon-button {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        background: rgba(5, 5, 5, 0.95);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        padding: 20px 0;
        gap: 20px;
        transform: translateY(-150%);
        transition: transform var(--transition-speed) ease;
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .glitch {
        font-size: 3rem;
    }
    
    .contact-container {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .glitch {
        font-size: 2.5rem;
    }
    
    .hero h2 {
        font-size: 1.2rem;
    }
    
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
}