/* =========================================
   RESET & GLOBALS
   ========================================= */
:root {
    /* couleurs principales */
    --color-primary: #980000;
    --color-primary-light: #D46363;
    --color-primary-dark: #670303;
    --color-primary-hover: #966f6f;

    /* couleur app */
    --color-bg-night: #0e0e18;
    --color-bg-project: aliceblue;
    --color-text-light: white;
    --color-text-dark: black;

    /* window xp */
    --win-xp-blue-light: #559FF5;
    --win-xp-blue-dark: #1E4FBA;
    --win-xp-green-light: #3B883C;
    --win-xp-green-dark: #1EB11E;
    --win-xp-taskbar-blue: #15AAEE;
    --win-xp-taskbar-border: #1A3F73;

    /* overlay */
    --shadow-dark: rgba(0, 0, 0, 0.3);
    --glitch-red: rgba(152, 0, 0, 0.2);
    --glitch-blue: rgba(30, 79, 186, 0.2);
    --glitch-green: rgba(59, 136, 60, 0.2);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
}

/* =========================================
   HEADER
   ========================================= */
header {
    font-family: "Iceberg", sans-serif;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    background-color: var(--color-primary);
    width: max-content;
    max-width: 90vw;
    padding: 15px 30px;
    border-radius: 100px;
    z-index: 100;
    position: fixed;
    top: 5vh;
    left: 0;
    right: 0;
    margin: 0 auto;
}

.header_nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.header_nav a {
    text-decoration: none;
    color: var(--color-text-light);
    transition: color 0.2s ease;
}

.header_nav a:hover {
    color: var(--color-primary-dark);
}

.header_logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   THEME TOGGLE
   ========================================= */
.header_light {
    width: 60px !important;
    min-width: 60px;
    height: 30px;
    border-radius: 100px;
    background-color: var(--color-primary-light);
    display: flex;
    align-items: center;
    padding: 2px;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

.header_light_ball {
    background-color: var(--color-primary-dark);
    width: 26px;
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header_light.light_night .header_light_ball {
    transform: translateX(30px);
}

/* =========================================
   BURGER MENU - DESKTOP (Hidden)
   ========================================= */
.burger {
    display: none;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    z-index: 1001;
}

.burger svg path {
    stroke: var(--color-text-light);
    transform-origin: center;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* =========================================
   RESPONSIVE - MOBILE HEADER & BURGER
   ========================================= */
@media (max-width: 992px) {
    header {
        width: 90vw;
        padding: 10px 20px;
        gap: 15px;
    }

    .burger {
        order: 3;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
    }

    .burger svg {
        width: 35px;
        height: 35px;
    }

    .header_nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background-color: var(--color-primary-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: -1;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, visibility 0.4s;
    }

    .header_nav a {
        font-size: 2rem;
        padding: 15px 0;
    }

    body.menu-ouvert .header_nav {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    body.menu-ouvert .header_logo {
        opacity: 0;
        transition: opacity 0.2s;
    }

    body.menu-ouvert .burger svg path:nth-child(1) {
        transform: translateY(5px) rotate(45deg);
    }

    body.menu-ouvert .burger svg path:nth-child(2) {
        opacity: 0;
    }

    body.menu-ouvert .burger svg path:nth-child(3) {
        transform: translateY(-5px) rotate(-45deg);
    }

    header>a:first-child {
        margin-right: auto;
    }

    .header_light {
        order: 2;
    }
}

/* mode nuit */
.body_night {
    background-color: var(--color-bg-night);

    .home_logo_job {
        color: var(--color-text-light);
    }

    .projet-paragraph {
        color: var(--color-text-light);
    }

    .cadre-tag {
        color: var(--color-text-light);
    }

    .detail-sidebar {
        background-color: rgba(0, 0, 0, 0.2);
    }

    .detail-text p {
        color: #e0e0e0;
    }

    .tech-list {
        color: #e0e0e0;
    }

    .projet-card {
        background-color: var(--color-bg-night);
    }

    .description-short {
        color: var(--color-text-light);
    }

    .presentation {
        background-color: #0b0b12;
    }

    .presentation p {
        color: var(--color-text-light);
    }
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 5%;
    gap: 20px;
    background-color: var(--color-primary);
    flex-wrap: wrap;
}

.liens {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    flex: 1 1 250px;
    gap: 10px;
    order: 1;
}

.liens a {
    text-decoration: none;
    color: var(--color-text-light);
    font-weight: 700;
    transition: all 0.3s ease-in-out;
    padding: 5px 0;
}

.liens a:hover,
.liens a:focus {
    color: var(--color-primary-hover);
}

.mentions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1 1 250px;
    text-align: center;
    color: var(--color-text-light);
    order: 2;
}

.reseaux-sociaux {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 1 1 250px;
    gap: 15px;
    order: 3;
}

.reseaux-sociaux svg {
    width: clamp(40px, 6vw, 50px);
    height: clamp(40px, 6vw, 50px);
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    fill: var(--color-text-light);
}

.reseaux-sociaux svg:hover,
.reseaux-sociaux svg:focus {
    transform: scale(1.2);
    outline: none;
}

/* =========================================
   RESPONSIVE - MOBILE FOOTER
   ========================================= */
@media (max-width: 992px) {
    footer {
        flex-direction: column;
        gap: 30px;
        padding: 40px 5%;
    }

    .liens {
        align-items: center;
        order: 1;
    }

    .reseaux-sociaux {
        justify-content: center;
        order: 2;
    }

    .mentions {
        order: 3;
        font-size: 0.9rem;
    }
}

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}