/*
* Header.css - Header Responsive du Portfolio MMI
* Harmonisé avec about.css et projet.css
*/

@import url('https://fonts.googleapis.com/css2?family=League+Gothic&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Glacial+Indifference&display=swap');

:root {
    --cream-light: #FFF8F0;
    --cream-medium: #F5EBE0;
    --cream-dark: #E8D7C3;
    --accent-primary: #a20b1d;
    --accent-secondary: #8a0916;
    --text-dark: #2C2416;
    --text-medium: #5C4F3D;
    --white: #FFFFFF;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

/* === HEADER PRINCIPAL === */
.modern-header {
    background-color: var(--cream-light);
    color: var(--text-dark);
    font-family: 'Glacial Indifference', sans-serif;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 3px 15px var(--shadow-light);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* === LOGO === */
.logo-container {
    display: flex;
    align-items: center;
    z-index: 1001;
}

.site-logo {
    max-height: 70px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.05);
}

/* === NAVIGATION === */
.main-nav {
    transition: var(--transition);
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-links li {
    margin: 0;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.05rem;
    font-family: 'Glacial Indifference', sans-serif;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.link-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    margin-right: 8px;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.nav-link:hover .link-indicator,
.nav-link.active .link-indicator {
    transform: scale(1);
}

.nav-link.active {
    color: var(--accent-primary);
    font-weight: 600;
}

/* === ACCENT DU HEADER === */
.header-accent {
    height: 3px;
    background: linear-gradient(to right, var(--accent-primary), var(--cream-medium), var(--accent-primary));
    width: 100%;
}

/* === BOUTON HAMBURGER === */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0;
}

.nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--accent-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* === RESPONSIVE === */

/* Tablettes */
@media screen and (max-width: 992px) {
    .nav-links {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 1rem;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .header-container {
        padding: 1rem 5%;
    }

    .site-logo {
        max-height: 60px;
    }

    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: linear-gradient(135deg, var(--cream-light) 0%, var(--cream-medium) 100%);
        padding: 6rem 2rem 2rem;
        box-shadow: -5px 0 15px var(--shadow-medium);
        transition: right 0.4s ease;
        overflow-y: auto;
    }

    .main-nav.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--cream-dark);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 1.2rem 0;
        width: 100%;
        color: var(--text-dark);
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        color: var(--accent-primary);
        padding-left: 10px;
    }

    .nav-link.active {
        color: var(--accent-primary);
        font-weight: 600;
    }

    .link-indicator {
        background-color: var(--accent-primary);
    }

    /* Overlay sombre quand le menu est ouvert */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* Petit mobile */
@media screen and (max-width: 480px) {
    .header-container {
        padding: 0.8rem 4%;
    }

    .site-logo {
        max-height: 50px;
    }

    .main-nav {
        width: 80%;
    }

    .nav-link {
        font-size: 1rem;
        padding: 1rem 0;
    }
}

/* === ACCESSIBILITÉ === */
.nav-link:focus,
.nav-toggle:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* === ANIMATIONS === */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.main-nav.active {
    animation: slideInRight 0.4s ease;
}