/* Reset et variables CSS */
:root {
    --primary-color: #00d4ff;
    --secondary-color: #ff6b35;
    --accent-color: #7c3aed;
    --background-dark: #0a0a0a;
    --background-light: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
    --gradient-secondary: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.3);
    --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loader {
    text-align: center;
}

.loader-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    letter-spacing: 3px;
}

.loader-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    animation: loading 2s ease-in-out;
}

@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}

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

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: float 6s infinite ease-in-out;
}

.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 60%; left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { top: 40%; left: 80%; animation-delay: 2s; }
.particle:nth-child(4) { top: 80%; left: 70%; animation-delay: 3s; }
.particle:nth-child(5) { top: 30%; left: 50%; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.3; }
    50% { transform: translateY(-20px) scale(1.2); opacity: 1; }
}

/* Navigation 3D */
.nav-3d {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 15px 25px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: var(--shadow-glow);
}

.nav-container {
    display: flex;
    gap: 20px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 15px;
    position: relative;
}

.nav-item:hover {
    transform: translateY(-5px);
    background: rgba(0, 212, 255, 0.1);
}

.nav-item.active {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-glow);
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.nav-item span {
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Sections - MASQUAGE STRICT */
.section {
    min-height: 100vh;
    display: none !important; /* Masqué par défaut de manière stricte */
    align-items: center;
    justify-content: center;
    padding: 150px 20px 20px; /* Augmenté de 100px à 150px pour éviter la navbar */
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(50px);
    transition: all 0.8s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none !important;
    z-index: 10;
}

.section.active {
    display: flex !important; /* Affiché quand actif */
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: all !important;
    z-index: 20;
}

/* Section Home - Règles spéciales */
#home.section {
    display: none !important; /* Masqué par défaut même home */
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#home.section.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
    z-index: 20;
}

/* Section Home */
.hero-container {
    max-width: 1200px;
    width: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 30px;
}

.title-line {
    display: block;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.title-name {
    display: block;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 4rem;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.title-type {
    display: block;
    color: var(--secondary-color);
    font-size: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.hero-description {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

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

.btn-primary, .btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 212, 255, 0.4);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Floating Card */
.floating-card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: var(--shadow-card);
    animation: float-card 6s ease-in-out infinite;
}

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

.code-animation {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: var(--text-primary);
}

.code-line {
    margin: 10px 0;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

.code-line:nth-child(1) { transition-delay: 0.5s; }
.code-line:nth-child(2) { transition-delay: 1s; }
.code-line:nth-child(3) { transition-delay: 1.5s; }
.code-line:nth-child(4) { transition-delay: 2s; }
.code-line:nth-child(5) { transition-delay: 2.5s; }

/* Section Titles */
.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 60px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section About */
.about-container {
    max-width: 1200px;
    width: 100%;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text {
    display: grid;
    gap: 30px;
}

.about-card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-10px);
}

.about-card h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.about-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-item {
    background: var(--gradient-primary);
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

.stat-number {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Section Skills */
.skills-container {
    max-width: 1400px;
    width: 100%;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: var(--shadow-card);
}

.skill-category h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
}

.skill-items {
    display: grid;
    gap: 20px;
}

.skill-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    transition: transform 0.3s ease;
}

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

.skill-icon {
    font-size: 1.5rem;
}

.skill-item span {
    font-weight: 600;
    color: var(--text-primary);
}

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

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 2s ease;
}

/* Section Projects */
.projects-container {
    max-width: 1200px;
    width: 100%;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    height: 200px;
    background: var(--gradient-secondary);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

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

.project-tech {
    color: white;
    font-weight: 600;
    text-align: center;
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

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

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--secondary-color);
}

/* Section Contact */
.contact-container {
    max-width: 1200px;
    width: 100%;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.contact-details {
    display: grid;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-item h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.contact-item p {
    color: var(--text-secondary);
    margin: 0;
}

/* WhatsApp Button */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn i {
    font-size: 1.1rem;
}

/* Contact Form */
.contact-form {
    display: grid;
    gap: 25px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}

.submit-btn {
    background: var(--gradient-primary);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 212, 255, 0.4);
}

/* Responsive Design - AMÉLIORÉ */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .title-name {
        font-size: 3.5rem;
    }
    
    .hero-content {
        gap: 40px;
    }
    
    .about-content {
        gap: 40px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-3d {
        top: 20px;
        padding: 10px 15px;
    }
    
    .nav-container {
        gap: 10px;
    }
    
    .nav-item {
        padding: 8px;
    }
    
    .nav-icon {
        font-size: 1.2rem;
    }
    
    .nav-item span {
        font-size: 0.7rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .title-name {
        font-size: 3rem;
    }
    
    .title-type {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section {
        padding: 120px 15px 15px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .title-name {
        font-size: 2.5rem;
    }
    
    .title-type {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 250px;
    }
    
    .skill-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 10px;
    }
    
    .skill-bar {
        width: 100%;
        max-width: 150px;
        margin: 0 auto;
    }
    
    .nav-3d {
        padding: 8px 12px;
    }
    
    .nav-container {
        gap: 8px;
    }
    
    .nav-item span {
        font-size: 0.6rem;
    }
    
    .section {
        padding: 100px 10px 10px;
    }
}

@media (max-width: 360px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .title-name {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .nav-item span {
        display: none;
    }
    
    .nav-icon {
        font-size: 1.5rem;
        margin-bottom: 0;
    }
} 