/* --- VARIABLES ET RESET --- */
:root {
    --bg: #ffffff;
    --fg: #0a0a0a;
    --muted: #6e6e6e;
    --line: #e6e6e6;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

h1, h2, h3 { text-align: center; }

/* --- LAYOUT --- */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 28px;
    padding-top: 80px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    background: #f2f2f2;
    margin-bottom: 12px;
}

.subtitle {
    margin: 4px 0 0;
    color: var(--muted);
}

.brand {
    display: flex;
    gap: 16px;
    align-items: center;
}

.brand img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background: #f2f2f2;
}

.brand h1 { font-size: 28px; margin: 0; }
.brand p  { margin: 4px 0 0; color: var(--muted); }

.section {
    margin-top: 34px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.section h2 {
    font-size: 18px;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* --- GRILLE & CARTES --- */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 760px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
}

.card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
}

.card .btn {
    display: block;
    margin: 16px auto 0 auto;
    text-align: center;
    width: fit-content;
}

.list {
    display: grid;
    gap: 10px;
    justify-items: center;
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

/* --- BADGES --- */
.k { color: var(--muted); }

.badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.badge {
    border: 1px solid var(--line);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.4;
    width: 100%;
    max-width: 350px;
}

.level {
    font-size: 11px;
    color: var(--muted);
    font-weight: normal;
}

/* --- MEDIA & BOUTONS --- */
.media {
    display: flex;
    gap: 14px;
    align-items: center;
}

.media img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: grayscale(100%);
}

a.btn {
    display: inline-block;
    background: var(--fg);
    color: #fff;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
}

.small {
    font-size: 14px;
    color: var(--muted);
}

footer {
    margin: 36px 0 8px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

/* --- SECTIONS SPÉCIFIQUES --- */
#parcours .card .card { margin-bottom: 16px; }

#contact .card {
    max-width: 400px;
    margin: 0 auto;
}

/* --- BARRES DE COMPÉTENCES --- */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px;
}

.skill-item {
    width: 100%;
    max-width: 350px;
    margin-bottom: 15px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--fg);
    width: var(--fill);
    border-radius: 10px;
}

/* --- NAVIGATION --- */
.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    z-index: 1000;
    padding: 15px 0;
}

.nav-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    gap: 30px;
}

.nav-content a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-content a:hover,
.nav-content a.active { color: var(--fg); }

.menu-toggle { display: none; }

/* --- PROJETS --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.project-card {
    aspect-ratio: 1 / 1;
    background: var(--line);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.project-card:hover { transform: scale(1.03); }

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-title {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    font-size: 14px;
    text-align: center;
}

/* --- MODALE --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg);
    padding: 30px;
    border-radius: 16px;
    position: relative;
    width: 40%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
}

.contributors-list {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.contributor-link {
    background: var(--line);
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--fg);
    font-size: 13px;
    transition: background 0.2s, color 0.2s;
}

.contributor-link:hover {
    background: var(--fg);
    color: var(--bg);
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1100;
        background: var(--fg);
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        cursor: pointer;
    }

    .menu-toggle span {
        width: 20px;
        height: 2px;
        background: white;
    }

    .nav-menu {
        left: -100%;
        width: 60%;
        height: 100vh;
        flex-direction: column;
        transition: left 0.4s ease;
    }

    .nav-menu.open { left: 0; }

    .nav-content {
        flex-direction: column;
        padding: 80px 30px;
    }

    .menu-overlay.open {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
    }

    .modal-content { width: 75%; }
}
