@import url("https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600;700&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
    --header-height: 3.5rem;
    --black-color: hsl(0, 0%, 0%);
    --white-color: hsl(0, 0%, 95%);
    --text-color: hsl(0, 0%, 30%);
    --text-color-light: hsl(0, 0%, 50%);
    --body-color: hsl(0, 0%, 87%);
    --container-color: hsl(0, 0%, 83%);
    --primary-color: rgb(109, 67, 0);
}

/*=============== BASE STYLES ===============*/
body {
    margin: 0;
    font-family: 'Bai Jamjuree', sans-serif;
    background: var(--body-color);
}

/*=============== HEADER ===============*/
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--container-color);
    padding: 12px 200px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.05);
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--black-color);
    color: var(--white-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 50%;
    font-size: 1.3rem;
}

/*=============== NAVIGATION ===============*/
.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    padding: 10px;
    position: relative;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
}

/* Effet d'underline fluide */
.nav-links a::after {
    content: '';
    display: block;
    width: 50%;
    height: 2px;
    background: var(--black-color);
    position: absolute;
    left: 25%;
    bottom: -2px;
    transform: scaleX(0);
    transition: transform 0.3s ease-in-out;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--black-color);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

/*=============== MENU BURGER ===============*/
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--black-color);
    width: 40px;
    height: 40px;
    border-radius: 6px;
    z-index: 1001;
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: hsl(0, 0%, 20%);
}

.menu-toggle::before {
    content: "☰";
    font-size: 22px;
    color: var(--white-color);
    font-weight: bold;
}

/*=============== MENU RESPONSIVE ===============*/
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    transform: translateY(-100%);
    transition: transform 0.4s ease-in-out;
}

.menu-overlay.active {
    transform: translateY(0);
}

.menu-overlay ul {
    list-style: none;
    padding: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.menu-overlay a {
    text-decoration: none;
    color: var(--white-color);
    font-size: 1.2rem;
    font-weight: 600;
}

/* Effet d'underline uniquement sur START */
.menu-overlay a::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--white-color);
    margin: 4px auto;
    opacity: 0;
    transition: opacity 0.3s;
}

.menu-overlay a.active::after {
    opacity: 1;
}

/* BOUTON DE FERMETURE */
.menu-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 1.8rem;
    color: var(--white-color);
    cursor: pointer;
    transition: color 0.3s;
}

.menu-close:hover {
    color: hsl(0, 0%, 75%);
}

/*=============== MEDIA QUERIES ===============*/

/* Apparition du menu burger à partir de 1024px */
@media (max-width: 1024px) {
    header {
        padding: 12px 80px;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }
}

/* Écrans moyens (max-width: 768px) */
@media (max-width: 768px) {
    header {
        padding: 10px 40px;
    }

    .logo {
        gap: 20px;
    }

    .menu-toggle {
        width: 38px;
        height: 38px;
    }

    .menu-toggle::before {
        font-size: 20px;
    }
}

/* Très petits écrans (max-width: 480px) */
@media (max-width: 480px) {
    header {
        padding: 10px 20px;
    }

    .logo {
        gap: 15px;
    }

    .menu-toggle {
        width: 36px;
        height: 36px;
    }

    .menu-toggle::before {
        font-size: 18px;
    }
}

/* Ultra petits écrans (max-width: 340px) */
@media (max-width: 340px) {
    header {
        padding: 8px 15px;
    }

    .logo {
        gap: 10px;
    }

    .menu-toggle {
        width: 34px;
        height: 34px;
    }

    .menu-toggle::before {
        font-size: 16px;
    }
}

/* Réapparition du menu classique au-delà de 1024px */
@media (min-width: 1025px) {
    .nav-links {
        display: flex !important;
    }

    .menu-toggle {
        display: none;
    }
}
