@font-face {
    font-family: 'CDSB';
    src: url("../fonts/ClashDisplay-Semibold.otf") format("opentype");
}

@font-face {
    font-family: 'RX';
    src: url("../fonts/RX100-Regular.otf") format("opentype");
}

:root {
    --CDSB : 'CDSB', sans-serif;
    --RX : 'RX', sans-serif;
    --black : black;
    --vert : #0A3B1B;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
}

.cursor-dot {
    width: 5px;
    height: 5px;
}

.cursor-outline {
    width: 15px;
    height: 15px;
    background-color: whitesmoke;
    mix-blend-mode: difference;
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 7;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: white;
}

header {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}


.header {
    position: fixed;
    top: 30px;
    width: 40%;
    height : 50px;
    background-color: #80808090;
    border-radius: 30px;
    overflow: hidden;
    backdrop-filter: blur(7px);
    z-index: 6;
}

.sections {
    position: relative;
    height: 100%;
    text-decoration: none;
    list-style-type: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    font-family: var(--CDSB);
    color: whitesmoke;

    img {
        width: 35px;
        border-radius: 50%;
        margin-right: 20px;
    }
}

.flexbox {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
}

.hover-underline {
    display: inline-block;
    position: relative;
    line-height: 0;
    object-fit: contain;
}

.hover-underline::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -11px;
    left: 0;
    background-color: whitesmoke;
    transition: transform 0.25s ease-out;
}

.hover-underline:hover::after {
    transform: scaleX(1);
}

.hover-underline::after {
    transform-origin: bottom right;
}

.hover-underline:hover::after {
    transform-origin: bottom left;
}

.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 150px;
    background: none;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(100px);
    -webkit-backdrop-filter: blur(100px);
    mask-image: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0));
    pointer-events: none;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    z-index: 9999;
    transform: scaleY(0);
    transform-origin: top;
}

.overlay-menu ul li {
    display: none;
}

@media (max-width: 932px) {

    header {
        justify-content: space-between; /* espace entre image/nav et burger */
        margin: 10px 20px;
    }

    .header {
        position: fixed;
        top: 15px;
        left: 0;
        width: calc(100% - 40px); /* laisse 20px de marge de chaque côté */
        margin: 0 20px;           /* centre le header avec marges latérales */
        height: 70px;
        background-color: #80808090;
        border-radius: 30px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        backdrop-filter: blur(7px);
    }

    .sections {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .sections img {
        width: 45px;
        height: 45px;
        border-radius: 50%;
        margin-left: 10px;
    }

    /* Croix quand actif */
    .burger.active {
        position: fixed;
        z-index: 12000; /* toujours au-dessus */
    }

    /* Burger */
    .burger {
        position: fixed;
        top: 15px;          /* même top que .header */
        right: 40px;
        height: 70px;       /* même hauteur que .header */
        display: flex;
        align-items: center; /* centre verticalement les 3 barres */
        justify-content: center;
        flex-direction: column;
        z-index: 11000;
        cursor: pointer;
    }

    .burger span {
        display: block;
        width: 28px;          /* largeur visible */
        height: 3px;          /* épaisseur */
        background: white;
        border-radius: 2px;
        margin: 3px 0;        /* espace entre les barres */
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .burger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6.5px, 6.5px);
    }
    .burger.active span:nth-child(2) {
        opacity: 0;
    }
    .burger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6.5px, -6.5px);
    }

    /* Overlay menu */
    .overlay-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.95);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
        z-index: 10000; /* en dessous du burger */
    }

    .overlay-menu.active {
        opacity: 1;
        pointer-events: auto;
    }

    .overlay-menu ul {
        list-style: none;
        text-align: center;
    }

    .overlay-menu ul li {
        margin: 20px 0;
    }

    .overlay-menu ul li a {
        color: white;
        font-size: 2rem;
        font-family: var(--CDSB);
        text-decoration: none;
    }

    /* Cacher les liens hors overlay (mobile) */
    .sections li {
        display: none;
    }

    .overlay-menu ul li {
        display: block;
    }

    /* Curseur custom toujours au-dessus de tout */
    .cursor-dot,
    .cursor-outline {
        display: none;
        position: fixed;
        pointer-events: none;
        z-index: 99999; /* toujours visible */
    }

    canvas {
        display: none !important;
    }
}
