/* Variables cohérentes */
:root {
    --primary: #00ff9d;
    --primary-dark: #00cc7d;
    --secondary: #6c63ff;
    --accent: #ff2e63;
    --violet: #9d4edd;
    --violet-light: #c77dff; /* AJOUTÉ */
    --dark: #0a0a0f;
    --dark-light: #1a1a24;
    --gray: #2a2a35;
    --light: #f0f0f0;
    --terminal-green: #00ff41;
    --neon-pink: #ff006e;
    --neon-blue: #00d9ff;
    --neon-green: #00ff9d;
    --neon-purple: #9d4edd;
    --neon-yellow: #ffbe0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Arrière-plan cyberpunk simplifié */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(157, 78, 221, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 255, 157, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 60%, rgba(108, 99, 255, 0.05) 0%, transparent 50%);
    z-index: -2;
}

/* Terminal header */
.terminal-header {
    background: linear-gradient(90deg, var(--dark-light), rgba(157, 78, 221, 0.1));
    padding: 10px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--violet);
    position: relative;
    z-index: 1000;
}

.terminal-dots {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
}

.dot.red { background: var(--accent); }
.dot.yellow { background: #ffb74d; }
.dot.green { background: var(--primary); }

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    color: var(--light);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Navigation */
.menu {
    background: rgba(26, 26, 36, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--violet);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger {
    width: 25px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 2px;
    background: var(--light);
    transition: all 0.3s ease;
}

.menu-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-item {
    color: var(--light);
    text-decoration: none;
    padding: 10px 15px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item:hover,
.menu-item.active {
    color: var(--violet-light);
}

.menu-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--violet));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.menu-item:hover::after,
.menu-item.active::after {
    width: 80%;
}

.terminal-input {
    display: flex;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    color: var(--terminal-green);
    font-size: 0.9rem;
    position: relative;
}

.prompt {
    margin-right: 10px;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Main */
main {
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
    position: relative;
}

/* Sections */
section {
    max-width: 1200px;
    margin: 0 auto 80px;
    position: relative;
}

.section-header {
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    position: relative;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.title-number {
    color: var(--violet);
    font-size: 2.8rem;
    opacity: 0.9;
}

.title-text {
    color: var(--light);
    background: linear-gradient(45deg, var(--light), var(--violet-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.title-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--violet), transparent);
    margin-left: 20px;
}

/* Catégories Section */
.categories-section {
    animation: fadeIn 0.6s ease;
    position: relative;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.category-card {
    background: rgba(26, 26, 36, 0.8);
    border-radius: 20px;
    padding: 30px;
    border: 2px solid rgba(157, 78, 221, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
}

.category-card:hover {
    transform: translateY(-10px);
    border-color: var(--violet);
    box-shadow: 0 15px 30px rgba(157, 78, 221, 0.3);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--violet), var(--primary));
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    width: 70px;
    height: 70px;
    background: rgba(157, 78, 221, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: var(--violet-light);
    border: 2px solid rgba(157, 78, 221, 0.3);
}

.category-content {
    flex: 1;
}

.category-content h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--light);
}

.category-content p {
    color: var(--light);
    opacity: 0.8;
    margin-bottom: 20px;
    line-height: 1.6;
}

.category-stats {
    list-style: none;
    margin-bottom: 25px;
}

.category-stats li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--light);
    opacity: 0.7;
    font-size: 0.9rem;
}

.category-stats li i {
    color: var(--violet-light);
}

.cyber-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(45deg, var(--violet), var(--secondary));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.cyber-button:hover {
    background: linear-gradient(45deg, var(--violet-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(157, 78, 221, 0.4);
}

/* Projects Container */
.projects-container {
    margin-top: 40px;
    animation: fadeIn 0.6s ease;
    position: relative;
}

.projects-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(157, 78, 221, 0.1);
    color: var(--violet-light);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    border: 1px solid rgba(157, 78, 221, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(157, 78, 221, 0.2);
    transform: translateX(-5px);
}

.projects-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    color: var(--light);
    background: linear-gradient(45deg, var(--light), var(--violet-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: rgba(26, 26, 36, 0.8);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(157, 78, 221, 0.1);
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(5px);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--violet);
    box-shadow: 0 10px 25px rgba(157, 78, 221, 0.2);
}

.project-card.coming-soon {
    opacity: 0.9;
    border-style: dashed;
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.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-icon {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(157, 78, 221, 0.1);
    font-size: 4rem;
    color: var(--violet);
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--light);
}

.project-content p {
    color: var(--light);
    opacity: 0.8;
    margin-bottom: 15px;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background: rgba(157, 78, 221, 0.2);
    color: var(--violet-light);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid rgba(157, 78, 221, 0.3);
}

.tag.confidential {
    background: rgba(255, 46, 99, 0.2);
    color: var(--accent);
    border-color: rgba(255, 46, 99, 0.3);
}

.view-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--violet-light);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.view-more:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.project-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    color: var(--violet-light);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

/* Modal pour mot de passe */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 36, 0.95), rgba(157, 78, 221, 0.1));
    margin: 10% auto;
    padding: 0;
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    border: 1px solid var(--violet);
    box-shadow: 0 0 50px rgba(157, 78, 221, 0.3);
    animation: modalAppear 0.5s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 20px;
    background: rgba(10, 10, 15, 0.8);
    border-bottom: 1px solid var(--violet);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    color: var(--violet-light);
    font-family: 'Orbitron', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    color: var(--light);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--accent);
}

.modal-body {
    padding: 30px;
    text-align: center;
}

.modal-body p {
    margin-bottom: 15px;
    color: var(--light);
    font-size: 1rem;
}

.password-input {
    display: flex;
    gap: 10px;
    margin: 30px 0;
    justify-content: center;
}

.password-input input {
    flex: 1;
    max-width: 300px;
    padding: 15px 20px;
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid var(--violet);
    border-radius: 8px;
    color: var(--light);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.password-input input:focus {
    border-color: var(--violet-light);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.3);
}

.btn-unlock {
    background: linear-gradient(45deg, var(--primary), var(--violet));
    color: var(--dark);
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-unlock:hover {
    background: linear-gradient(45deg, var(--primary-dark), var(--violet-light));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(157, 78, 221, 0.3);
}

.error-message {
    margin-top: 20px;
    padding: 10px;
    background: rgba(255, 46, 99, 0.1);
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    display: none;
}

/* Animation shake pour les erreurs de mot de passe */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    border-color: var(--accent) !important;
}

/* Footer */
.footer {
    background: rgba(26, 26, 36, 0.95);
    border-top: 1px solid var(--violet);
    padding: 30px 20px;
    margin-top: 80px;
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--light);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--violet-light);
}

.separator {
    color: var(--violet);
}

.version {
    color: var(--violet-light);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(157, 78, 221, 0.1);
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: 50%;
    color: var(--violet-light);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: rgba(157, 78, 221, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(157, 78, 221, 0.3);
}

.footer-bottom {
    max-width: 1200px;
    margin: 20px auto 0;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(157, 78, 221, 0.2);
}

.footer-bottom p {
    color: var(--light);
    opacity: 0.6;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .menu-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(26, 26, 36, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 5px;
        display: none;
        backdrop-filter: blur(10px);
        z-index: 1000;
    }

    .menu-links.active {
        display: flex;
    }

    .terminal-input {
        display: none;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .title-number {
        font-size: 2rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .projects-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-content {
        margin: 15% auto;
        width: 95%;
    }
    
    .password-input {
        flex-direction: column;
        gap: 15px;
    }
    
    .password-input input {
        max-width: 100%;
    }
    
    .btn-unlock {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .title-line {
        display: none;
    }

    .category-card,
    .project-card {
        padding: 20px;
    }
}

/* Effet de scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(157, 78, 221, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(157, 78, 221, 0.5);
}

/* Animation pour hamburger menu */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}