@font-face {
    font-family: "Ranade";
    src: url("../fonts/Ranade-Regular-Ag4PkGq.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Ranade";
    src: url("../fonts/Ranade-Medium-HsNm16X.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Ranade";
    src: url("../fonts/Ranade-Bold-krWVhAv.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --color-projects: #ff8a00;
    --color-profile: #a84a00;
    --color-contact: #d40000;
    --color-home: #fdb85d;
}

.projects .section-heading h2::before,
.hero-nav a[href="#projets"]::before {
    background: var(--color-projects);
}

.hero-nav a[href="#home"]::before {
    background: var(--color-home);
}

.profile .section-heading h2::before,
.hero-nav a[href="#profile"]::before {
    background: var(--color-profile);
}

.contact .section-heading h2::before,
.hero-nav a[href="#contact"]::before {
    background: var(--color-contact);
}

html {
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    min-height: 100%;
    background: #080808;
    color: #fff;
    font-family: "Ranade", Helvetica, Arial, sans-serif;

    overflow-x: hidden;
}

.section-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 6rem;
}

.section-heading h2 {
    position: relative;
    z-index: 1;
    isolation: isolate;
    width: fit-content;
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.2;
}

/* Pavé derrière les titres */

.section-heading h2::before {
    content: "";
    position: absolute;

    left: -12px;
    right: -12px;
    bottom: -5px;

    height: 24px;

    border-radius: 8px;
    transform: rotate(-4deg);

    z-index: -1;
    pointer-events: none;
}

/* Couleurs des sections */

.section-mini-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.15rem;
}

.section-mini-nav__link--projects::before {
    background: rgba(255, 138, 0, 0.55);
}

main {
    position: relative;
    isolation: isolate;
}

main > section {
    position: relative;
    z-index: 1;
}

.hero-nav {
    pointer-events: auto;
}

/* ========================================
   NAVIGATION MOBILE — RicAgE
======================================== */

.mobile-menu-toggle,
.mobile-menu {
    display: none;
}

@media (max-width: 600px) {
    /* Masquer les navigations classiques */
    .hero .hero-nav,
    .projects .section-mini-nav,
    .profile .section-mini-nav,
    .contact .section-mini-nav {
        display: none;
    }

    /* Burger */
    .mobile-menu-toggle {
        position: fixed;
        width: 56px;
        height: 56px;
        padding: 10px;
        box-sizing: border-box;
        bottom: 2rem;
        right: 1.5rem;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: 10px;
        border: none;
        background: transparent;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 34px;
        height: 5px;
        border-radius: 3px;
        transform: rotate(-4deg);
    }

    .mobile-menu-toggle span:nth-child(1) {
        background: #ff8a00;
    }

    .mobile-menu-toggle span:nth-child(2) {
        background: #b54a16;
    }

    .mobile-menu-toggle span:nth-child(3) {
        background: #d40000;
    }

    /* Menu déroulant */
    .mobile-menu {
        position: fixed;
        inset: 0;
        z-index: 9998;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .mobile-menu a {
        color: #fff;
        font-size: 1.5rem;
        font-weight: 600;
        text-decoration: none;
    }
    .mobile-menu {
        transition:
            opacity 0.4s ease,
            visibility 0.4s ease;
    }

    .mobile-menu.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-menu a:nth-child(1) {
        background: var(--color-home);
    }
    .mobile-menu a:nth-child(2) {
        background: var(--color-projects);
    }
    .mobile-menu a:nth-child(3) {
        background: var(--color-profile);
    }
    .mobile-menu a:nth-child(4) {
        background: var(--color-contact);
    }

    .mobile-menu a {
        padding: 0.15rem 0.8rem;
        border-radius: 4px;
        transform: rotate(-2deg);
    }

    .section-heading h2 {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .projects > .section-heading {
        margin-bottom: 0;
    }

    .projects .section-heading h2 {
        margin-bottom: 0;
    }

    .project-card__identity {
        min-height: 60px;
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .section-heading h2 {
        font-size: 1.25rem;
    }

    .section-heading h2::before {
        height: 20px;
        bottom: -4px;
        border-radius: 6px;
    }
}
