/* ============================================
   DESIGN TOKENS (SOBRE & TECHNIQUE)
   ============================================ */
:root {
    --bg-main: #0a0a0a;
    --bg-surface: #121212;
    --bg-elevated: #1a1a1a;
    --bg-hover: #222222;

    --border: #333333;
    --border-hover: #555555;

    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;

    --accent: #ffffff; /* Très sobre, juste du blanc */
    
    --radius: 4px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--text-secondary);
}

img {
    max-width: 100%;
    display: block;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.main-content {
    flex: 1;
    padding-top: 100px;
    padding-bottom: 60px;
}

.section-header {
    margin-bottom: 40px;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 600px;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
    height: 60px;
    z-index: 100;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 16px;
    list-style: none;
}

.nav-link {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: var(--radius);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.lang-toggle {
    display: flex;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-left: 16px;
}

.lang-toggle button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    cursor: pointer;
}

.lang-toggle button.active {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 4px;
    border-radius: var(--radius);
    cursor: pointer;
}

/* ============================================
   HERO (INDEX)
   ============================================ */
.hero {
    padding: 80px 0;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-main);
    border-color: var(--text-primary);
}

.btn-primary:hover {
    background: var(--text-secondary);
    color: var(--bg-main);
}

/* ============================================
   PROJECTS
   ============================================ */
.project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
}

.project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-status {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    padding: 4px 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 4px 8px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* DMCA Callout */
.callout {
    background: var(--bg-main);
    border: 1px dashed var(--border-hover);
    padding: 16px;
    border-radius: var(--radius);
    margin-top: 24px;
}
.callout strong { color: var(--text-primary); }

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}
.gallery img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: zoom-in;
}

/* ============================================
   STACK & INFRA
   ============================================ */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.stack-category {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.stack-title {
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* ============================================
   CONTACT
   ============================================ */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
}
.contact-link:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: auto;
}
.footer .container {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 10, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: zoom-out;
}
.lightbox.active { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border: 1px solid var(--border);
}

/* ============================================
   I18N HELPERS
   ============================================ */
[data-lang="en"] { display: none; }
html[lang="en"] [data-lang="fr"] { display: none; }
html[lang="en"] [data-lang="en"] { display: revert; }

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .container { padding: 0 20px; }
    .hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
    .stack-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
}

/* Mobile */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    
    .navbar-links {
        display: none;
        position: absolute;
        top: 60px; left: 0; right: 0;
        background: var(--bg-main);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 16px;
        gap: 8px;
    }
    .navbar-links.open { display: flex; }

    .main-content { padding-top: 80px; padding-bottom: 40px; }

    .hero { padding: 40px 0; }
    .hero h1 { font-size: 2rem; }
    .hero-desc { font-size: 1rem; }

    .section-title { font-size: 1.5rem; }

    .project-card { padding: 20px; }
    .project-header { flex-direction: column; gap: 8px; }

    .gallery { grid-template-columns: 1fr; }
    .gallery img { height: auto; max-height: 300px; }

    .stack-grid { grid-template-columns: 1fr; gap: 16px; }
    .stack-category { padding: 16px; }

    .contact-links { max-width: 100% !important; }

    .footer .container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero h1 { font-size: 1.6rem; }
    .project-card { padding: 16px; }
    .tag-list { gap: 6px; }
    .tag { font-size: 0.7rem; padding: 3px 6px; }
    .btn { padding: 8px 14px; font-size: 0.85rem; }
    .lang-toggle { margin-left: 8px; }
}
