:root {
    --bg: #0b0c10;
    --bg2: #111318;
    --panel: #161a22;
    --border: rgba(255,255,255,0.07);
    --accent: #4f8cff;
    --accent2: #00e5c4;
    --text: #e8eaf2;
    --muted: #7a7f96;
    --sidebar-w: 240px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

/* ── SIDEBAR ── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    z-index: 100;
    overflow-y: auto;
}

.profile-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    box-shadow: 0 0 20px rgba(79,140,255,0.25);
    margin-bottom: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}
.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 32px rgba(79,140,255,0.45);
}

.sidebar-name {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: 0.3rem;
}

.sidebar-role {
    font-size: 0.75rem;
    color: var(--muted);
    text-align: center;
    margin-bottom: 1.5rem;
}

.socials {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.socials a {
    color: var(--muted);
    font-size: 1.1rem;
    transition: color 0.2s;
    text-decoration: none;
}
.socials a:hover { color: var(--accent); }

.nav-divider {
    width: 100%;
    height: 1px;
    background: var(--border);
    margin-bottom: 1rem;
}

.sidebar nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}
.sidebar nav a i {
    width: 16px;
    font-size: 0.8rem;
    color: var(--accent);
    opacity: 0.7;
}
.sidebar nav a:hover {
    background: rgba(79,140,255,0.1);
    color: var(--text);
    padding-left: 1.3rem;
}
.sidebar nav a.active {
    background: rgba(79,140,255,0.12);
    color: var(--accent);
}

/* ── MAIN ── */
main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
}

/* ── HERO ── */
#accueil {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 5rem;
    position: relative;
    overflow: hidden;
}

#accueil::before {
    content: '';
    position: absolute;
    top: -200px; right: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(79,140,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.78rem;
    color: var(--accent2);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}

.hero-title {
    font-family: 'Space Mono', monospace;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 40%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 520px;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: #6ea3ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79,140,255,0.35);
}
.btn-outline {
    border: 1px solid var(--border);
    color: var(--text);
    background: transparent;
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ── SECTIONS ── */
section {
    padding: 5rem;
    border-top: 1px solid var(--border);
}

.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    color: var(--accent2);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 0;
    width: 40px; height: 2px;
    background: var(--accent);
}

/* ── À PROPOS ── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p { color: var(--muted); margin-bottom: 1rem; font-size: 0.95rem; }
.about-text strong { color: var(--text); }

.about-info { display: flex; flex-direction: column; gap: 1rem; }
.info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
    color: var(--muted);
}
.info-row i { color: var(--accent); width: 16px; }
.info-row span { color: var(--text); }

/* ── COMPÉTENCES ── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.25s;
}
.skill-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(79,140,255,0.12);
}

.skill-icon {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.skill-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.68rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(79,140,255,0.1);
    color: var(--accent);
    border: 1px solid rgba(79,140,255,0.2);
}

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; gap: 1.5rem; }

/* ── DÉTAILS DU STAGE ── */
.stage-details {
    margin-top: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 0.8rem;
}
.stage-details summary {
    cursor: pointer;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    list-style: none;
}
.stage-details summary::-webkit-details-marker { display: none; }
.stage-details summary::before { content: "+ "; }
.stage-details[open] summary::before { content: "− "; }
.stage-details h4 {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent2);
    margin: 1rem 0 0.3rem;
    font-weight: 400;
}
.stage-details p,
.stage-details li {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--muted);
}
.stage-details ul { padding-left: 1.2rem; }
.stage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.2rem;
}
.stage-soon { opacity: 0.5; cursor: default; }

.timeline-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.timeline-date {
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    color: var(--accent);
    padding-top: 0.3rem;
    text-align: right;
}

.timeline-content {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    position: relative;
    transition: border-color 0.2s;
}
.timeline-content::before {
    content: '';
    position: absolute;
    left: -7px; top: 16px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg);
}
.timeline-content:hover { border-color: var(--accent); }

.timeline-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.3rem;
}
.timeline-content .org {
    font-size: 0.82rem;
    color: var(--accent2);
    margin-bottom: 0.5rem;
}
.timeline-content p {
    font-size: 0.85rem;
    color: var(--muted);
}

/* ── PROJETS ── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.25s;
    text-decoration: none;
    color: inherit;
}
.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.project-icon {
    font-size: 2rem;
}

.project-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.project-desc {
    font-size: 0.85rem;
    color: var(--muted);
    flex: 1;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    font-size: 0.82rem;
    text-decoration: none;
    font-weight: 500;
    transition: gap 0.2s;
}
.project-link:hover { gap: 0.7rem; }

/* ── CONTACT ── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info { display: flex; flex-direction: column; gap: 1.2rem; }
.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.contact-item i {
    color: var(--accent);
    font-size: 1.1rem;
    width: 20px;
}
.contact-item div { font-size: 0.88rem; }
.contact-item .label { color: var(--muted); font-size: 0.75rem; }
.contact-item .value { color: var(--text); }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.82rem; color: var(--muted); }
.form-group input,
.form-group textarea {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79,140,255,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ── FOOTER ── */
footer {
    margin-left: var(--sidebar-w);
    padding: 2rem 5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
    font-family: 'Space Mono', monospace;
}

/* ── ANIMATIONS ── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── CV ── */
.cv-container {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-top: 1.5rem;
}
.cv-container embed {
    width: 100%;
    height: 80vh;
    display: block;
}

/* ── MOBILE ── */
@media (max-width: 900px) {
    :root { --sidebar-w: 0px; }
    .sidebar { display: none; }
    main { margin-left: 0; }
    footer { margin-left: 0; }

    #accueil { padding: 4rem 2rem; }
    section { padding: 3rem 2rem; }
    .about-grid,
    .contact-grid { grid-template-columns: 1fr; }
    .timeline-item { grid-template-columns: 1fr; }
    .timeline-date { text-align: left; }

    .mobile-nav {
        display: flex !important;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: var(--panel);
        border-top: 1px solid var(--border);
        z-index: 200;
        justify-content: space-around;
        padding: 0.75rem 0;
    }
    .mobile-nav a {
        color: var(--muted);
        font-size: 0.65rem;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
    }
    .mobile-nav a i { font-size: 1.1rem; }
    main { padding-bottom: 60px; }
}

.mobile-nav { display: none; }
/* ── APERÇU DES PROJETS ── */
.project-preview {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 0.9rem;
    display: block;
}

/* ── GALERIE DU STAGE ── */
.stage-gallery {
    margin: 1rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.6rem;
}
.stage-gallery img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.stage-gallery figcaption {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    color: var(--muted);
    font-family: 'Space Mono', monospace;
}
