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

/* Variables Mode Sombre (défaut) */
:root, [data-theme="dark"] {
    --bg: #0a0a0a;
    --text: #e0e0e0;
    --text-dim: #888;
    --accent: #4a9eff;
    --accent-hover: #6ab0ff;
    --card-bg: #111;
    --border: #1a1a1a;
    --star-active: #ff9500;
    --star-inactive: #333;
    --nav-bg: rgba(10, 10, 10, 0.95);
}

/* Variables Mode Clair */
[data-theme="light"] {
    --bg: #ffffff;
    --text: #1a1a1a;
    --text-dim: #666;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --card-bg: #f8f9fa;
    --border: #e5e7eb;
    --star-active: #ff9500;
    --star-inactive: #d1d5db;
    --nav-bg: rgba(255, 255, 255, 0.95);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

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

.logo {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.5px;
    z-index: 1001;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent);
}

/* Boutons Language et Theme */
#langBtn, #themeBtn {
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

#langBtn:hover, #themeBtn:hover {
    background: var(--accent);
    color: var(--bg);
    transform: translateY(-2px);
}

#themeBtn {
    font-size: 1.2rem;
    padding: 0.5rem 0.8rem;
}

.flag {
    font-size: 1.2rem;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
    padding: 0.5rem;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 700px;
    animation: fadeIn 1s ease;
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h2 {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
    line-height: 1.2;
}

.hero h1 span {
    color: var(--accent);
    position: relative;
}

.hero h1 span::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    animation: slideIn 0.8s ease 0.5s both;
}

@keyframes slideIn {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Sections */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

section .subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Category Title */
.category-title {
    font-size: 1.6rem;
    color: var(--accent);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.category-title:first-of-type {
    margin-top: 2rem;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.skill-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: rgba(74, 158, 255, 0.1);
}

.skill-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.skill-content {
    flex: 1;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.skill-stars {
    display: flex;
    gap: 0.3rem;
}

.star {
    font-size: 1.1rem;
}

.star.active {
    color: var(--star-active);
}

.star.inactive {
    color: var(--star-inactive);
}

.skill-card p {
    color: var(--text-dim);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Projects list in skills */
.skill-projects {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.skill-projects h4 {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.skill-projects ul {
    list-style: none;
    padding: 0;
}

.skill-projects li {
    color: var(--text-dim);
    font-size: 0.9rem;
    padding: 0.3rem 0;
    padding-left: 1rem;
    position: relative;
}

.skill-projects li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(74, 158, 255, 0.2);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

.project-content {
    padding: 2rem;
}

.project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(74, 158, 255, 0.1);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-card p {
    color: var(--text-dim);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Contact */
.contact-content {
    text-align: center;
}

.discord-box {
    background: rgba(88, 101, 242, 0.1);
    border: 2px solid rgba(88, 101, 242, 0.3);
    border-radius: 12px;
    padding: 2.5rem;
    margin: 2rem auto;
    display: inline-block;
    transition: all 0.3s;
}

.discord-box:hover {
    border-color: #5865F2;
    transform: scale(1.02);
}

.discord-box h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.discord-username {
    color: #5865F2;
    font-weight: 600;
    font-size: 1.5rem;
    margin-top: 0.5rem;
    font-family: 'Courier New', monospace;
}

.contact-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.8rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.contact-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

/* Scroll Progress */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    width: 0%;
    z-index: 9999;
    transition: width 0.1s;
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    nav .container {
        padding: 1rem 1.5rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    nav ul {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--nav-bg);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 6rem 2rem 2rem 2rem;
        gap: 2rem;
        justify-content: flex-start;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    nav ul.mobile-active {
        transform: translateX(0);
    }

    nav ul li {
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        display: block;
        padding: 1rem;
        font-size: 1.2rem;
    }

    #langBtn, #themeBtn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 1.1rem;
    }

    .hero {
        min-height: 80vh;
        padding: 1.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h2 {
        font-size: 1rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section {
        padding: 3rem 1.5rem;
        min-height: auto;
    }

    section h2 {
        font-size: 2rem;
    }

    section .subtitle {
        font-size: 1rem;
    }

    .skill-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .skill-header {
        flex-direction: column;
        align-items: center;
    }

    .category-title {
        font-size: 1.3rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-image {
        height: 180px;
    }

    .discord-box {
        padding: 2rem 1.5rem;
        width: 100%;
    }

    .contact-links {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    section h2 {
        font-size: 1.8rem;
    }

    .skill-icon {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }

    .project-content {
        padding: 1.5rem;
    }
}
