:root {
    --primary: #00ffff;
    --secondary: #ff00ff;
    --bg-dark: #0a0a0a;
    --bg-light: #ffffff;
    --text-dark: #ffffff;
    --text-light: #0a0a0a;
    --card-bg: rgba(20, 20, 20, 0.9);
    --card-bg-light: rgba(255, 255, 255, 0.9);
    --neon-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-dark);
    color: var(--text-dark);
    transition: background-color 0.5s, color 0.3s;
    overflow-x: hidden;
}

body.light-theme {
    --bg-dark: #f0f0f0;
    --text-dark: #0a0a0a;
    --card-bg: rgba(255, 255, 255, 0.9);
    --primary: #0066ff;
    --secondary: #ff00aa;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--primary);
    color: var(--text-dark);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s;
    box-shadow: var(--neon-shadow);
    backdrop-filter: blur(5px);
}

.theme-toggle:hover {
    transform: rotate(360deg) scale(1.1);
    border-color: var(--secondary);
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

.logo-dot {
    color: var(--secondary);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s;
}

.nav-links a:hover::before,
.nav-links a.active::before {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.cv-btn {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    padding: 0.5rem 1.5rem !important;
    border-radius: 25px;
    color: #0a0a0a !important;
}

.cv-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--primary);
}

/* ===== HERO SECTION ===== */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

.profile-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary);
    box-shadow: 0 0 30px var(--primary);
    animation: float 4s ease-in-out infinite;
}

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

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.glitch-text {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0.05em 0 0 var(--primary), -0.05em -0.05em 0 var(--secondary);
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 100% { transform: none; }
    7% { transform: skew(-0.5deg, -0.9deg); }
    10% { transform: none; }
}

.school-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    padding: 0.8rem 2rem;
    border-radius: 50px;
    margin: 15px 0;
    color: #0a0a0a;
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1.8rem;
    margin: 20px 0;
}

.typed-text {
    color: var(--primary);
    font-weight: 700;
    text-shadow: 0 0 10px var(--primary);
}

.hero-bio {
    max-width: 600px;
    margin: 20px auto;
    padding: 1.5rem;
    background: rgba(0,255,255,0.1);
    border-radius: 15px;
    border: 1px solid var(--primary);
    backdrop-filter: blur(10px);
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 30px 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    text-shadow: 0 0 15px var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: #0a0a0a;
    box-shadow: 0 0 20px var(--primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px var(--secondary);
}

.btn-outline {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #0a0a0a;
    transform: translateY(-3px);
    box-shadow: 0 0 30px var(--primary);
}

/* ===== SECTIONS ===== */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 15px auto 0;
    border-radius: 2px;
}

.highlight {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

/* ===== FILTRES ===== */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.7rem 1.8rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--text-dark);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: #0a0a0a;
    box-shadow: 0 0 20px var(--primary);
}

/* ===== PROJETS ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0,255,255,0.3);
}

.project-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-card p {
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.project-tech span {
    background: rgba(0,255,255,0.1);
    color: var(--primary);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--primary);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.project-link {
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.project-link i {
    font-size: 1rem;
    margin-bottom: 0;
}

.project-link:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* ===== COMPÉTENCES ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skill-item {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
}

.skill-item:hover {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255,0,255,0.3);
}

.skill-item i {
    font-size: 3rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.skill-item h3 {
    margin-bottom: 1rem;
}

.skill-level {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.skill-level-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

/* ===== CONTACT ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.contact-info {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.8rem;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    transition: all 0.3s;
}

.info-item:hover {
    background: rgba(0,255,255,0.1);
    transform: translateX(10px);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(0,255,255,0.2), rgba(255,0,255,0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}

.info-item h4 {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 0.2rem;
}

.info-item p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(0,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
    border: 2px solid var(--primary);
    font-size: 1.3rem;
}

.social-link:hover {
    background: var(--primary);
    color: #0a0a0a;
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 0 20px var(--primary);
}

/* ===== FORMULAIRE ===== */
.contact-form {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.form-group {
    position: relative;
    margin-bottom: 1.8rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem 1rem;
    background: rgba(255,255,255,0.05);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-dark);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group textarea {
    resize: vertical;
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1.2rem;
    color: var(--text-dark);
    opacity: 0.5;
    transition: all 0.3s;
    pointer-events: none;
    background: transparent;
    padding: 0 5px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: rgba(0,255,255,0.1);
    outline: none;
    box-shadow: 0 0 20px rgba(0,255,255,0.2);
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.8rem;
    left: 0.8rem;
    font-size: 0.8rem;
    background: var(--card-bg);
    padding: 0 0.5rem;
    opacity: 1;
    color: var(--primary);
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 10px;
    color: #0a0a0a;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px var(--secondary);
    letter-spacing: 1px;
}

.submit-btn i {
    transition: transform 0.3s;
}

.submit-btn:hover i {
    transform: translateX(5px) rotate(360deg);
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 2px solid var(--primary);
    background: linear-gradient(135deg, #000, #0a0a0a);
}

footer p {
    opacity: 0.8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .glitch-text {
        font-size: 2.8rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .glitch-text {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .theme-toggle {
        top: 80px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .glitch-text {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .info-item {
        flex-direction: column;
        text-align: center;
    }
}



/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-content {
    text-align: center;
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.loading-logo {
    font-size: 5rem;
    color: #00ffff;
    margin-bottom: 2rem;
    animation: pulse 1.5s ease-in-out infinite, rotate 10s linear infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 20px #00ffff, 0 0 40px #ff00ff;
    }
    50% {
        transform: scale(1.1);
        text-shadow: 0 0 30px #00ffff, 0 0 60px #ff00ff, 0 0 80px #00ffff;
    }
}

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

.loading-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    letter-spacing: 4px;
    animation: gradientShift 3s linear infinite;
    background-size: 200% 200%;
}

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

.progress-container {
    width: 400px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #ff00ff, #00ffff);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
    background-size: 200% 100%;
    animation: gradientMove 2s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.loading-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 400px;
    margin: 1rem auto;
    font-size: 1.1rem;
}

#loading-percentage {
    color: #00ffff;
    font-weight: 700;
    text-shadow: 0 0 10px #00ffff;
}

#loading-message {
    color: #ffffff;
    opacity: 0.8;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: #00ffff;
    border-radius: 50%;
    animation: dots 1.4s ease-in-out infinite;
    box-shadow: 0 0 10px #00ffff;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
    background: #00ffff;
    box-shadow: 0 0 10px #00ffff;
}

.loading-dots span:nth-child(4) {
    animation-delay: 0.6s;
    background: #ff00ff;
    box-shadow: 0 0 10px #ff00ff;
}

@keyframes dots {
    0%, 100% {
        transform: scale(0.5);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Media Queries pour le loading */
@media (max-width: 768px) {
    .loading-title {
        font-size: 2rem;
    }
    
    .progress-container,
    .loading-status {
        width: 300px;
    }
    
    .loading-logo {
        font-size: 4rem;
    }
}

@media (max-width: 480px) {
    .loading-title {
        font-size: 1.5rem;
    }
    
    .progress-container,
    .loading-status {
        width: 250px;
    }
    
    .loading-logo {
        font-size: 3rem;
    }
}