@import url("normalize.css");
@import url('https://fonts.googleapis.com/css2?family=Hind+Mysuru:wght@300;400;500;600;700&display=swap');

:root {
    --color-primary: #001f54; 
    --color-primary-light: #003082; 
    --color-bg: #ffffff;
    --color-text: #1f2937; 
    --color-text-light: #6b7280;
    --color-bg-light: #f8fafc; 
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --color-bg: #111827;
    --color-text: #f3f4f6;
    --color-bg-light: #1f2937;
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Hind Mysuru", sans-serif;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    transition: var(--transition);
}

/* Utilitaires */
.hidden { display: none; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: 4rem 1.5rem;
}

.bg-light {
    background: var(--color-bg-light);
}

.text-center { text-align: center; }

/* --- HEADER --- */
.site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.navbar {
    width: 100%;
    max-width: 1200px;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    position: relative;
}

.navbar > a {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 85px;
    width: auto;
    display: block;
}

.menu {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 3rem;
}

.menu li a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    transition: color var(--transition);
}

.menu li a:hover {
    color: var(--color-primary);
}

.menu li a::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-primary);
    transition: width var(--transition);
    border-radius: 2px;
}

.menu li a:hover::after,
.menu li a.active::after {
    width: 100%;
}

/* --- BOUTONS --- */
.btn-primary {
    background: var(--color-primary);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(0, 31, 84, 0.2);
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 31, 84, 0.3);
}

/* --- HERO SECTION --- */
.hero {
    height: 85vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url("../images/fond.jpg");
    background-position: center;
    background-size: cover;
    background-attachment: scroll;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    color: #ffffff;
    padding: 0 1rem;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
    margin-bottom: 0.5rem;
    animation: slideUp 0.8s ease-out;
}

.hero p {
    font-size: 1.5rem;
    font-weight: 300;
    color: #e0e0e0;
    animation: slideUp 0.8s ease-out 0.2s backwards;
}

/* --- PRÉSENTATION --- */
.about {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.about h2 {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.infos {
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.infos p {
    background: var(--color-bg-light);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
}

/* --- GESTION DE L'IMAGE EMAIL ANTI-SPAM --- */

.email-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.email-img {
    width: 220px; 
    height: auto;
    display: block;
    margin-top: 0.3rem;
    user-select: none; 
    -webkit-user-select: none;
    pointer-events: none;
}

/* --- COMPÉTENCES --- */
.competences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

#Technologies_etudiees .competences {
    display: contents;
}

#Technologies_etudiees .card {
    background-color: var(--color-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

#Technologies_etudiees .card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

#Technologies_etudiees .card img {
    height: 80px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

#Technologies_etudiees .card:hover img {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.1);
}

#Technologies_etudiees .card h3 {
    font-size: 1.25rem;
    color: var(--color-text);
    font-weight: 600;
}

.card .level {
    font-size: 0.9rem;
    color: var(--color-primary);
    margin-bottom: 0.2rem;
}

.card .tech-detail {
    font-size: 0.8rem;
    color: var(--color-text-light);
    font-style: italic;
}

/* --- TIMELINE (Formations) --- */
.timeline .item .school {
    color: var(--color-text-light);
    font-style: italic;
    margin-top: 0.2rem;
    font-size: 0.95rem;
}

.timeline .item p strong {
    color: var(--color-primary);
}

/* --- TIMELINE (Expériences) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline .item {
    padding: 1.5rem;
    margin: 1.5rem 0;
    background: var(--color-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border-left: 5px solid var(--color-primary);
    transition: var(--transition);
}

.timeline .item:hover {
    transform: translateX(10px);
}

.timeline .item h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.timeline .item span {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline .item .tasks {
    margin-top: 0.5rem;
    padding-left: 1.2rem;
    font-size: 0.95rem;
    color: var(--color-text);
    text-align: left;
}

.timeline .item .tasks li {
    margin-bottom: 0.3rem;
    list-style-type: disc;
}

/* --- PROJETS --- */
.project-card {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.5rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-card::after {
    content: "+";
    font-size: 1.5rem;
    color: var(--color-primary);
}

.project-card:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: scale(1.02);
}

.project-details {
    padding: 1.5rem;
    background: white;
    border-left: 3px solid var(--color-primary);
    border-radius: 0 0 10px 10px;
    margin-top: -1rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    color: var(--color-text-light);
}

/* --- FOOTER --- */
footer {
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 6rem;
    font-size: 0.9rem;
}

/* --- ANIMATIONS --- */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- CSS POUR LE MOBILE ET LE BURGER --- */
.burger-menu {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    border-radius: 5px;
    transition: 0.3s;
}

@media(max-width: 768px) {

    .hero h1 { 
        font-size: 2.5rem;
    }

    .burger-menu {
        display: flex;
        order: -1;
    }

    .navbar {
        justify-content: flex-start;
        gap: 1rem;
    }

    .navbar > a {
        position: relative;
        left: auto;
        transform: none;
        top: auto;
        flex-grow: 1;
        display: flex;
        justify-content: center;
        margin-right: 25px;
    }

    /* Style du menu sur mobile */
    nav .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-bg);
        flex-direction: column;
        padding: 2rem 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        gap: 1.5rem;
        border-top: 1px solid rgba(0,0,0,0.05);
    }

    nav .menu.active {
        display: flex;
        animation: fadeIn 0.3s ease;
    }
    
    .competences-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- RESPONSIVE --- */
    @media screen and (max-width: 480px) {
        .competences-grid {
            grid-template-columns: 1fr;
        }
        
        .btn-primary {
            width: 100%;
            text-align: center;
            margin-bottom: 0.5rem;
        }
    }
}