:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    --accent-hover: #0ea5e9;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --font-main: 'Inter', sans-serif;
    --font-code: 'Fira Code', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
}

h1, h2, h3 { color: var(--text-primary); font-weight: 700; margin-bottom: 1rem; letter-spacing: -0.5px; }
h1 { font-size: 2.5rem; text-align: center; margin: 2rem 0; }
h2 { font-size: 1.8rem; color: var(--accent-color); border-bottom: 2px solid var(--card-bg); display: inline-block; padding-bottom: 5px; margin-bottom: 20px;}
p { color: var(--text-secondary); margin-bottom: 1rem; }
a { text-decoration: none; color: inherit; transition: var(--transition); }

/* --- NAV (GRID LAYOUT) --- */
nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    height: 80px;
}

nav > p {
    font-family: var(--font-code);
    color: var(--accent-color);
    font-weight: bold;
    margin: 0;
    font-size: 1.1rem;
    justify-self: start;
}

.liens {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    justify-self: center;
    margin: 0;
    padding: 0;
}

.liens div {
    display: flex; 
    align-items: center;
}

.liens a {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 5px 0;
    font-size: 1rem;
}

.liens a:hover, .liens a.active {
    color: var(--accent-color);
}

.liens a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.liens a:hover::after {
    width: 100%;
}

/* --- Zone Droite : Les Réseaux Sociaux --- */
.social {
    display: flex;
    gap: 20px;
    justify-self: end;
    align-items: center;
}

.social a {
    display: block;
    width: 30px;
    height: 30px;
    overflow: hidden;
    transition: transform 0.3s ease; 
}

.social img {
    filter: drop-shadow(0 30px 0 var(--accent-color));
    transform: translateY(-30px);
    transition: filter 0.3s ease;
}

.social a:hover {
    transform: scale(1.1); 
}

.social a:hover img {
    filter: drop-shadow(0 30px 0 var(--accent-hover));
}

/* --- MAIN --- */
main { max-width: 1200px; margin: 0 auto; padding: 2rem; }

/* --- HERO --- */
.presentation {
    display: flex;
    align-items: stretch;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 3rem;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.presentation img {
    width: 40%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
}

.presentation2 { padding: 3rem; width: 60%; }
.intro { background: transparent; border: none; padding: 0; }

/* --- SKILLS --- */
.me { display: flex; gap: 2rem; margin-bottom: 3rem; }
.aboutMe, .competences { flex: 1; background-color: var(--card-bg); padding: 2rem; border-radius: var(--border-radius); border: 1px solid rgba(255,255,255,0.05); }
.languages { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 15px; margin-top: 20px; }
.lang { background-color: rgba(255,255,255,0.05); padding: 1rem; border-radius: 8px; text-align: center; transition: var(--transition); border: 1px solid transparent; }
.lang:hover { background-color: rgba(56, 189, 248, 0.1); border-color: var(--accent-color); transform: translateY(-5px); }
.lang h3 { font-size: 2rem; margin: 0; }
.lang p { margin: 0.5rem 0 0; font-size: 0.9rem; color: var(--text-primary); font-weight: 600; }

/* --- PROJETS --- */
.projets_c { background: transparent; box-shadow: none; }
.projets { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }

.projet_1, .projet_2, .projet_3 {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    transition: var(--transition);
}

.projet_1 > img, .projet_2 > img, .projet_3 > img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
    order: -1;
}

.text {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.text a {
    margin-top: auto;
    width: 100%;
}

.projet_1:hover, .projet_2:hover, .projet_3:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
    border-color: var(--accent-color);
}

button {
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-code);
    font-weight: bold;
    width: 100%;
    transition: var(--transition);
}

button:hover { background-color: var(--accent-color); color: var(--bg-color); }

/* --- CONTACT --- */
.bloc { display: flex; background-color: var(--card-bg); border-radius: var(--border-radius); overflow: hidden; border: 1px solid rgba(255,255,255,0.05); }
.infos { background-color: rgba(56, 189, 248, 0.1); padding: 3rem; flex: 1; border-right: 1px solid rgba(255,255,255,0.05); }
.infos p { color: var(--text-primary); display: flex; align-items: center; gap: 15px; margin-bottom: 2rem; font-size: 1.1rem; }
.infos img { width: 24px; height: 24px; filter: invert(1); }
.bloc .text { flex: 1.5; padding: 3rem; display: block; }

/* --- BURGER MENU --- */
.burger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 2000;
}

.burger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* --- RESPONSIVE (TABLETTE ET MOBILE) --- */
@media (max-width: 900px) {
    
    nav {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between;
        align-items: center;
        height: 70px;
        padding: 0 20px;
        gap: 15px;
    }

    nav > p {
        margin: 0;
        font-size: 1rem;
        text-align: left;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .burger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 2000;
        flex-shrink: 0;
    }
    
    .burger span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--accent-color);
        transition: all 0.3s ease;
        border-radius: 3px;
    }

    .liens, .social {
        position: fixed;
        left: 100%;
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background-color: var(--bg-color);
        transition: 0.4s ease-in-out;
        z-index: 1500;
    }

    .liens {
        top: 0;
        height: 70vh;
        gap: 40px;
        padding-top: 60px;
    }

    .social {
        top: 70vh;
        height: 30vh;
        background-color: var(--card-bg);
        gap: 30px;
    }
    
    .liens a { font-size: 1.5rem; }

    nav.active .liens, 
    nav.active .social {
        left: 0;
    }

    nav.active .burger span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    nav.active .burger span:nth-child(2) { opacity: 0; }
    nav.active .burger span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }
    
    .presentation { flex-direction: column; }
    .presentation img { width: 100%; height: 250px; min-height: auto; }
    .presentation2 { width: 100%; padding: 2rem; }
    .me { flex-direction: column; }
    .bloc { flex-direction: column; }
    .infos { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
}

@media (max-width: 600px) {
    nav { flex-direction: column; gap: 1rem; }
    .liens { width: 100%; justify-content: center; }
}
