@font-face {
    font-family: "Epilogue-M";
    src: url("../fonts/Epilogue-Medium.ttf");
}
@font-face {
    font-family: "Epilogue-R";
    src: url("../fonts/Epilogue-Regular.ttf");
}
@font-face {
    font-family: "Calson-I";
    src: url("../fonts/LibreCaslonText-Italic.ttf");
}
@font-face {
    font-family: "Calson-R";
    src: url("../fonts/LibreCaslonText-Regular.ttf");
}

*, ::after, ::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000;
    color: #fff;
    font-family: "Epilogue-R";
    overflow: hidden;
}


.container {
    padding: 16px;
    position: relative;
    height: 100vh;
}

#Nom {
    position: absolute;
    font-family: "Epilogue-R";
}

#Nom.visible {
    color: #ffffff;
    z-index: 10;
    position: absolute;
}


/*-------------*/
/* Bouton Menu */
/*-------------*/
#Menu {
    position: absolute;
    top: 21px;
    right: 16px;
    height: 22px;
    width: 55px;
    padding: 5px;
    overflow: hidden;
    cursor: pointer;
    z-index: 10;
}

#Menu.visible {
    color: #ffffff;
}

#Menu p:first-child {
    font-family: "Epilogue-R";
    transition: all 0.5s cubic-bezier(.37,.93,.74,1.03);
}

#Menu p:last-child {
    font-family: "Calson-I";
    font-size: 0.85em;
    transition: all 0.5s cubic-bezier(.37,.93,.74,1.03);
}

#Menu:hover > p {
    transform: translateY(-20px);
    transition: all 0.5s cubic-bezier(.37,.93,.74,1.03);
}
/*-------------*/
/* Bouton Menu */
/*-------------*/



/*-------------*/
/*     Menu    */
/*-------------*/
#menu-items {
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: end;
    position: absolute;
    width: 100vw;
    height: 100vh;
    margin-left: -16px;
    margin-top: -16px;

    background-color: #00000084;
    backdrop-filter: blur(20px); /* Floutage de l'arrière-plan du bouton */
    -webkit-backdrop-filter: blur(20px); /* Pour Safari */

    transition: opacity 0.5s cubic-bezier(.37,.93,.74,1.03);
    z-index: -1;
}

#menu-items.visible {
    opacity: 1;
    z-index: 1;
}

#menu-items .item {
    margin-left: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 240px;
    height: 50px;
    margin-bottom: 10px;
}

#menu-items .item:hover > a.visible {
    transform: translateY(-55px);
    transition: all 0.5s cubic-bezier(.37,.93,.74,1.03);
}

#menu-items .item a {
    font-size: 3em;
    transform: translateY(50px);
}
#menu-items .item a.visible {
    transform: translateY(0px);
    transition: all 2.5s cubic-bezier(.37,.93,.74,1.03);
}

#menu-items .item a:first-child {
    font-family: "Epilogue-R";
    transition: all 0.5s cubic-bezier(.37,.93,.74,1.03);
}

#menu-items .item a:last-child {
    font-family: "Calson-I";
    font-size: 2.7em;
    transition: all 0.5s cubic-bezier(.37,.93,.74,1.03);
}

#menu-items a {
    color: #ffffff;
    text-decoration: none;
}
/*-------------*/
/*     Menu    */
/*-------------*/




.projets-container {
    display: flex;
    align-items: center;
    width: 100vw;
    height: 95vh;
    position: relative; /* Important for overlay positioning */
}
.projets {
    flex: 1 0 21%; /* Ensure minimum width */
    text-decoration: none;
    color: white;
    position: relative; /* For positioning item-inner */
    transition: opacity 0.3s ease;
}
  
.projets-inner {
    position: relative; /* For positioning the overlay */
    width: 100%;
    height: 100%;
}

.projets .projets-inner a {
    width: fit-content;
}
  
.item-link {
    display: block; /* Make the link fill the entire item */
    height: 100%;
    width: 100%;
    text-decoration: none;
    color: white;
}
  
.projets h3, .projets p {
    margin: 0; /* Remove default margins */
}
  
.projets p {
    font-size: smaller;
    font-family: "Calson-I";
    opacity: 0.7;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.4;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    display: none; /* Initially hidden */
    pointer-events: none; /* Allow clicks through to underlying content */
}

.overlay video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


@media (max-width: 768px){
    #Nom {
        width: 50vw;
    }
    .projets-container { 
        flex-direction: column;
        margin-left: -16px;
        margin-top: -16px;
        height: 100vh;
        padding-top: 20vh;
        padding-left: 35%;
        align-items: start;
        padding-bottom: 80px;
    }
    .projets {
        flex: 1; 
        opacity: 0.3; 
        transition: opacity 0.5s ease-in-out; 
    }

    .projets.active {
        opacity: 1; 
    }

    .projets .projets-inner a {
        height: fit-content;
    }
    .overlay {
        position: absolute;
        top: 0;
        left: 0;
        opacity: 0.4;
        width: 100vw;
        height: 100vh;
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        z-index: -1;
        display: none; 
        pointer-events: none; 
    }

    .progress-bar {
        height: 6px;
        width: 0;
        background-color: white;
        position: fixed;
        bottom: 0px;
        margin-left: -16px;
        z-index: 1000;
    }


    #menu-items {
        padding-bottom: 70px;
    }

    #Freelance {
        width: 100%;
        text-align: center;
    }

}


#Freelance {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translate(-50%);
    opacity: 0.7;
    font-size: 0.8em;
}