/* Variables avec violet intégré */
:root {
    --primary: #00ff9d;
    --primary-dark: #00cc7d;
    --secondary: #6c63ff;
    --accent: #ff2e63;
    --violet: #9d4edd;
    --violet-light: #c77dff;
    --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 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 98%, rgba(255, 0, 110, 0.1) 98%),
        linear-gradient(0deg, transparent 98%, rgba(0, 217, 255, 0.1) 98%);
    background-size: 50px 50px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Particules flottantes */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, var(--neon-pink), transparent),
        radial-gradient(2px 2px at 60% 70%, var(--neon-blue), transparent),
        radial-gradient(1px 1px at 50% 50%, var(--neon-purple), transparent),
        radial-gradient(1px 1px at 80% 10%, var(--neon-green), transparent),
        radial-gradient(2px 2px at 90% 60%, var(--neon-yellow), transparent);
    background-size: 200% 200%;
    animation: particleFloat 15s ease-in-out infinite;
    z-index: -1;
    opacity: 0.3;
}

@keyframes particleFloat {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}

/* 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);
}

.terminal-dots {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.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;
}

.prompt {
    margin-right: 10px;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Header */
.header {
    padding: 60px 20px;
    position: relative;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.hacker-card {
    background: rgba(26, 26, 36, 0.9);
    border-radius: 15px;
    border: 1px solid var(--violet);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-content {
    display: flex;
    padding: 40px;
    gap: 40px;
    align-items: center;
}

.text-content {
    flex: 1;
}

/* Glitch effect */
.glitch {
    position: relative;
    color: var(--light);
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--violet);
    animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: 1px 0 var(--secondary);
    animation: glitch-2 3s infinite linear alternate-reverse;
}

.status-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.status-label {
    color: var(--gray);
}

.status-value {
    color: var(--primary);
    font-weight: 700;
    position: relative;
    padding-left: 15px;
}

.status-value::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, var(--primary), var(--violet));
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.typing-container {
    font-size: 1.3rem;
    margin-bottom: 30px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--terminal-green);
    height: 30px;
}

.cursor-blink {
    animation: blink 1s infinite;
}

.terminal-output {
    background: rgba(10, 10, 15, 0.8);
    border-radius: 8px;
    padding: 20px;
    border-left: 3px solid var(--violet);
    font-family: 'JetBrains Mono', monospace;
}

.output-line {
    margin-bottom: 8px;
    color: var(--light);
}

.command {
    color: var(--violet-light);
    font-weight: 700;
}

/* Image */
.image-container {
    position: relative;
}

.profile-frame {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
}

.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.frame-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--violet);
    border-radius: 10px;
    z-index: 2;
}

.frame-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(157, 78, 221, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--violet-light), transparent);
    animation: scan 3s linear infinite;
    z-index: 3;
    opacity: 0.5;
}

/* Card footer */
.card-footer {
    padding: 20px 40px;
    background: rgba(10, 10, 15, 0.8);
    border-top: 1px solid var(--violet);
    text-align: center;
}

.cv-btn {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary), var(--violet));
    color: var(--dark);
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cv-btn: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);
}

/* Sections communes */
section {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.section-header {
    margin-bottom: 40px;
    display: flex;
    align-items: center;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-number {
    color: var(--violet);
    font-size: 2.2rem;
    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;
}

/* Formation */
.formation-line {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
}

.formation-item {
    flex: 1;
    background: rgba(26, 26, 36, 0.7);
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    border: 1px solid rgba(157, 78, 221, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.formation-item:hover {
    transform: translateY(-5px);
    border-color: var(--violet);
    box-shadow: 0 10px 20px rgba(157, 78, 221, 0.2);
}

.formation-year {
    font-family: 'Orbitron', sans-serif;
    color: var(--violet);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.formation-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--light);
}

.formation-content p {
    color: var(--light);
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Outils par catégories */
.tools-categories {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 40px;
}

.category {
    background: rgba(26, 26, 36, 0.5);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(157, 78, 221, 0.1);
}

.category-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(157, 78, 221, 0.3);
}

.violet-icon {
    color: var(--violet-light);
    font-size: 1.3rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}

.tool-item {
    background: rgba(26, 26, 36, 0.7);
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

.tool-item:hover {
    transform: translateY(-5px);
    border-color: var(--violet);
    box-shadow: 0 10px 20px rgba(157, 78, 221, 0.2);
}

.tool-item::after {
    content: attr(data-tool);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--violet);
    color: var(--dark);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 10;
}

.tool-item:hover::after {
    opacity: 1;
    bottom: -35px;
}

.tool-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(20%);
    transition: all 0.3s ease;
}

.tool-item:hover .tool-icon img {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.tool-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--light);
}

/* Attestations */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.cert-card {
    background: rgba(26, 26, 36, 0.7);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: var(--light);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: var(--violet);
    box-shadow: 0 5px 15px rgba(157, 78, 221, 0.2);
}

.cert-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(157, 78, 221, 0.1);
    border-radius: 50%;
}

.cert-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cert-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--light);
}

.cert-card p {
    color: var(--light);
    opacity: 0.8;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Styles pour les certifications */
.cert-card.in-progress {
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(26, 26, 36, 0.8), rgba(157, 78, 221, 0.1));
    position: relative;
    overflow: hidden;
}

.cert-card.in-progress:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(157, 78, 221, 0.3);
    background: linear-gradient(135deg, rgba(26, 26, 36, 0.9), rgba(157, 78, 221, 0.2));
}

.cert-card.in-progress::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(157, 78, 221, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: shine 3s infinite linear;
    z-index: 1;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.cert-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.in-progress-badge {
    background: linear-gradient(45deg, #ff9500, #ffbe0b) !important;
    color: var(--dark) !important;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
}

/* Modal simplifié */
.cert-modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.cert-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;
}

.cert-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;
}

.cert-modal-header h2 {
    color: var(--violet-light);
    font-family: 'Orbitron', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
}

.close-cert-modal {
    color: var(--light);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-cert-modal:hover {
    color: var(--accent);
}

.cert-modal-body {
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.cert-modal-logo {
    margin-bottom: 10px;
}

.cert-modal-logo img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: rgba(157, 78, 221, 0.1);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid var(--violet);
}

.cert-modal-info {
    width: 100%;
}

.cert-modal-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--light);
    margin-bottom: 15px;
}

.cert-modal-info p {
    color: var(--light);
    opacity: 0.8;
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.6;
}

.certification-status {
    margin-top: 20px;
}

.status-badge {
    display: inline-block;
    background: linear-gradient(45deg, #ff9500, #ffbe0b);
    color: var(--dark);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
}

@media (max-width: 768px) {
    .cert-modal-content {
        margin: 15% auto;
        width: 95%;
    }
    
    .cert-modal-body {
        padding: 20px;
    }
    
    .cert-modal-logo img {
        width: 100px;
        height: 100px;
    }
    
    .cert-modal-info h3 {
        font-size: 1.5rem;
    }
}

/* Modal de mot de passe */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    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);
}

.hint {
    margin-top: 20px;
    padding: 10px;
    background: rgba(157, 78, 221, 0.1);
    border-radius: 8px;
    color: var(--violet-light);
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.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;
}

/* ===== FOOTER COMME LES AUTRES PAGES ===== */
.footer {
    background: rgba(26, 26, 36, 0.95);
    border-top: 1px solid var(--violet);
    padding: 30px 20px;
    margin-top: 80px;
    position: relative;
    z-index: 1;
}

.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;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

@keyframes glitch-1 {
    0% { clip-path: inset(40% 0 61% 0); }
    5% { clip-path: inset(92% 0 1% 0); }
    10% { clip-path: inset(43% 0 1% 0); }
    15% { clip-path: inset(25% 0 58% 0); }
    20% { clip-path: inset(54% 0 7% 0); }
    25% { clip-path: inset(58% 0 43% 0); }
    30% { clip-path: inset(98% 0 1% 0); }
    35% { clip-path: inset(3% 0 46% 0); }
    40% { clip-path: inset(25% 0 69% 0); }
    45% { clip-path: inset(88% 0 2% 0); }
    50% { clip-path: inset(51% 0 47% 0); }
    55% { clip-path: inset(92% 0 3% 0); }
    60% { clip-path: inset(69% 0 9% 0); }
    65% { clip-path: inset(83% 0 2% 0); }
    70% { clip-path: inset(68% 0 13% 0); }
    75% { clip-path: inset(9% 0 81% 0); }
    80% { clip-path: inset(1% 0 61% 0); }
    85% { clip-path: inset(97% 0 1% 0); }
    90% { clip-path: inset(7% 0 34% 0); }
    95% { clip-path: inset(79% 0 6% 0); }
    100% { clip-path: inset(81% 0 9% 0); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(24% 0 58% 0); }
    5% { clip-path: inset(75% 0 19% 0); }
    10% { clip-path: inset(56% 0 44% 0); }
    15% { clip-path: inset(31% 0 27% 0); }
    20% { clip-path: inset(29% 0 68% 0); }
    25% { clip-path: inset(95% 0 5% 0); }
    30% { clip-path: inset(31% 0 69% 0); }
    35% { clip-path: inset(13% 0 63% 0); }
    40% { clip-path: inset(51% 0 32% 0); }
    45% { clip-path: inset(12% 0 31% 0); }
    50% { clip-path: inset(79% 0 9% 0); }
    55% { clip-path: inset(16% 0 85% 0); }
    60% { clip-path: inset(78% 0 2% 0); }
    65% { clip-path: inset(100% 0 0 0); }
    70% { clip-path: inset(65% 0 33% 0); }
    75% { clip-path: inset(61% 0 37% 0); }
    80% { clip-path: inset(36% 0 64% 0); }
    85% { clip-path: inset(25% 0 44% 0); }
    90% { clip-path: inset(21% 0 33% 0); }
    95% { clip-path: inset(9% 0 87% 0); }
    100% { clip-path: inset(99% 0 1% 0); }
}

/* Responsive */
@media (max-width: 1024px) {
    .formation-line {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .formation-item {
        flex: 1 1 calc(50% - 15px);
        min-width: 200px;
    }
    
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .modal-content {
        margin: 15% auto;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .menu-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 15, 0.98);
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .menu-links.active {
        left: 0;
    }
    
    .menu-item {
        font-size: 1.1rem;
        padding: 15px 30px;
    }
    
    .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(7px, -6px);
    }
    
    .terminal-input {
        display: none;
    }
    
    .card-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 30px;
    }
    
    .glitch {
        font-size: 2.2rem;
    }
    
    .profile-frame {
        width: 250px;
        height: 250px;
    }
    
    .section-title {
        font-size: 1.6rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .title-line {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .formation-line {
        flex-direction: column;
    }
    
    .formation-item {
        flex: 1 1 100%;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Modal responsive */
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .password-input {
        flex-direction: column;
    }
    
    .password-input input {
        max-width: 100%;
    }
    
    .btn-unlock {
        justify-content: center;
    }
    
    /* Footer responsive */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.4rem;
    }
    
    .title-number {
        font-size: 1.8rem;
    }
    
    .typing-container {
        font-size: 1rem;
    }
    
    .terminal-output {
        font-size: 0.8rem;
        padding: 15px;
    }
    
    .profile-frame {
        width: 200px;
        height: 200px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-icon {
        width: 50px;
        height: 50px;
    }
    
    .category {
        padding: 20px;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .footer {
        padding: 30px 15px;
    }
    
    .footer-social a {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Effet de scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--violet);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--violet-light);
}

/* Sélection de texte */
::selection {
    background: var(--violet);
    color: white;
}

::-moz-selection {
    background: var(--violet);
    color: white;
}

/* 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;
}

/* Animation de succès */
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.success-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1002;
    background: rgba(26, 26, 36, 0.95);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid var(--primary);
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.success-animation i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
    animation: pulse 1s infinite;
}

.success-animation p {
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
}