:root {
    --bg: #050505;
    --surface: #121212;
    --accent: #00f2ff;
    --accent-dark: #7000ff;
    --text: #e0e0e0;
}

* { box-sizing: border-box; transition: all 0.3s ease; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    margin: 0;
}

/* Nav */
nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 5%; position: fixed; width: 100%; z-index: 1000;
    backdrop-filter: blur(10px); background: rgba(5, 5, 5, 0.7);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.logo { font-weight: 700; color: var(--accent); letter-spacing: 1px; }
nav ul { display: flex; list-style: none; gap: 30px; margin: 0; }
nav a { color: white; text-decoration: none; font-size: 0.9rem; font-weight: 500; }
nav a:hover { color: var(--accent); }

/* Titres */
.section-title {
    text-align: center; font-size: clamp(2rem, 5vw, 3rem);
    margin: 100px auto 50px; text-transform: uppercase;
    letter-spacing: 6px; width: 100%; font-weight: 700;
}

/* Hero */
.hero {
    height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center;
    background: url('images/Viktor.png') no-repeat center center/cover fixed;
}
h1 { font-size: clamp(2.5rem, 8vw, 5rem); margin: 0; color: var(--accent); text-shadow: 0 0 20px rgba(0, 242, 255, 0.3); }
.subtitle { font-size: 1.2rem; opacity: 0.8; margin-bottom: 25px; letter-spacing: 2px; }
.btn { display: inline-block; padding: 14px 35px; border-radius: 4px; margin: 10px; font-weight: bold; text-decoration: none; text-transform: uppercase; font-size: 0.8rem; }
.primary { background: var(--accent); color: black; }
.secondary { border: 1px solid var(--accent); color: var(--accent); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 242, 255, 0.2); }

/* Grille Projets */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; padding: 0 5% 120px; }
.card { background: var(--surface); border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); cursor: pointer; position: relative; }
.card:hover { border-color: var(--accent); transform: translateY(-8px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.card-img { height: 200px; background-size: cover; background-position: center; transition: transform 0.5s ease; }
.card:hover .card-img { transform: scale(1.05); }
.card-body { padding: 25px; }
.card-body h3 { margin: 0 0 10px 0; color: var(--accent); font-size: 1.4rem; }
.tech-tag { font-size: 0.65rem; color: var(--accent); border: 1px solid rgba(0, 242, 255, 0.3); padding: 3px 10px; border-radius: 4px; margin-right: 6px; text-transform: uppercase; font-weight: 700; }

.status-badge { position: absolute; top: 15px; right: 15px; background: var(--accent-dark); padding: 6px 14px; font-size: 0.7rem; font-weight: bold; border-radius: 4px; z-index: 2; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }

/* Expertise Section */
.about { background: var(--surface); padding: 120px 5%; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 25px; max-width: 1200px; margin: 0 auto; }
.skill-card { background: var(--bg); padding: 40px 30px; border-top: 4px solid var(--accent); border-radius: 4px; }
.skill-card h4 { color: var(--accent); text-transform: uppercase; margin-bottom: 20px; letter-spacing: 2px; font-size: 1rem; }
.skill-card ul { list-style: none; padding: 0; }
.skill-card li { margin-bottom: 12px; opacity: 0.8; font-weight: 300; }

/* Lightbox Premium */
.lightbox {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2000; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease;
}
.lightbox.active { display: flex; opacity: 1; }
.lightbox-overlay { position: absolute; width: 100%; height: 100%; background: rgba(0,0,0,0.92); backdrop-filter: blur(8px); }
.lightbox-content { position: relative; z-index: 2001; text-align: center; max-width: 85%; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 4px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 20px 50px rgba(0,0,0,0.8); }

#image-counter { color: var(--accent); margin-top: 15px; font-size: 0.9rem; font-weight: 700; }

.close { position: absolute; top: 30px; right: 40px; font-size: 35px; color: white; cursor: pointer; z-index: 2002; transition: transform 0.2s; }
.close:hover { transform: rotate(90deg); color: var(--accent); }

.nav-btn { position: absolute; background: none; border: none; color: white; font-size: 40px; cursor: pointer; z-index: 2002; padding: 20px; transition: color 0.2s; }
.nav-btn:hover { color: var(--accent); }
.prev { left: 3%; } .next { right: 3%; }

/* Footer */
footer { text-align: center; padding: 120px 5%; }
.footer-content p { font-size: 1.1rem; opacity: 0.6; margin-bottom: 35px; letter-spacing: 1px; }
.contact-links a { display: inline-block; margin: 10px 25px; color: var(--accent); font-size: 1.4rem; text-decoration: none; font-weight: 700; border-bottom: 1px solid transparent; }
.contact-links a:hover { border-bottom: 1px solid var(--accent); }


/* RESPONSIVE DESIGN */

/* Tablet & Mobile adjustment */
@media (max-width: 992px) {
    .hero {
        background-attachment: scroll; /* Désactive le fixed sur mobile pour éviter les bugs d'affichage */
        background-position: 25% center; /* Décale un peu le background pour laisser le sticker visible à gauche */
    }
    
    .hero-content {
        padding: 0 10%;
        text-align: center;
    }
}

/* Phone adjustment */
@media (max-width: 768px) {
    nav {
        padding: 1rem 5%;
    }

    nav ul {
        gap: 15px;
    }

    nav a {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 2rem;
        margin: 60px auto 30px;
        letter-spacing: 3px;
    }

    h1 {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    /* Empilement des cartes d'expertise sur une seule colonne */
    .skills-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .skill-card {
        padding: 25px 20px;
    }

    /* Ajustement des boutons */
    .btn {
        width: 100%;
        margin: 10px 0;
    }

    /* Lightbox sur mobile */
    .lightbox img {
        max-width: 95%;
    }
    
    .nav-btn {
        font-size: 30px;
        padding: 10px;
    }

    .close {
        top: 20px;
        right: 20px;
        font-size: 30px;
    }

    .contact-links a {
        font-size: 1.1rem;
        word-break: break-all; /* Évite que l'email ne dépasse de l'écran */
    }
}