/*général*/
* {
    padding: 0;
    margin: 0;
    font-family: "Fredoka", sans-serif;
    box-sizing: border-box;
}

body {
    background-color: #101010;
    scroll-behavior: smooth;
    margin-bottom: 12vh;
}

/* ===================header==================== */
.logo {
    width: 40px;
}

.menu-img-group {
    display: inline-block;
    position: relative;
}

/* Image du menu */
.menu-img-group img {
    width: 35px;
    display: block;
    position: relative;
    z-index: 5;
    transition: transform 0.3s ease;
}

.span-img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 119, 119, 0.67);
    filter: blur(15px);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1;
    opacity: 0;
}

.menu-img-group.active-nav img {
    transform: scale(1.2) translateY(-15px);
}

.menu-img-group.active-nav .span-img {
    transform: scale(1.4) translateY(-37px) translateX(-15px);
    opacity: 1;
}

/* Cercle noir de fond */
.menu-img-group::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #101010;
    transform: translate(-50%, calc(-50% - 15px)) scale(0);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    z-index: 4;
}

/* Contour dégradé */
.menu-img-group::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 4px;
    transform: translate(-50%, calc(-50% - 15px)) scale(0);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    z-index: 1;
}

.menu-img-group.one::after {
    background: linear-gradient(to right, #969696, #cccccc);
}

.menu-img-group.two::after {
    background: linear-gradient(to right, #cccccc, #eaeaea);
}

.menu-img-group.three::after {
    background: linear-gradient(to right, #eaeaea, #c5c5c5);
}

.menu-img-group.four::after {
    background: linear-gradient(to right, #c5c5c5, #969696);
}

/* Au survol, les deux apparaissent */
.menu-img-group.active-nav::before,
.menu-img-group.active-nav::after {
    transform: translate(-50%, calc(-50% - 15px)) scale(1);
    opacity: 1;
}


h1 {
    color: white;
    font-size: 1.5rem;
}

.title {
    position: absolute;
    top: 8px;
    display: flex;
    flex-direction: row;
    column-gap: 20px;
    justify-content: flex-start;
    align-items: center;
    padding: 15px;
}

/*navigation*/
.back-link {
    display: none;
}

.menu-list {
    list-style-type: none;
    position: relative;
    z-index: 5;
    border-radius: 150px;
    padding: 0.938rem 2.5rem;

    position: fixed;
    bottom: 25px;
    left: 50%;
    /* point de référence au milieu */
    transform: translateX(-50%);
    /* recentrage horizontal */

    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    column-gap: 1.8rem;
}

.menu-list::before {
    content: '';
    position: absolute;
    top: -3px;
    bottom: -3px;
    left: -3px;
    right: -3px;
    border-radius: 150px;
    background: #101010;
    z-index: 2;
}

.menu-list::after {
    content: '';
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: -4px;
    right: -4px;
    border-radius: 150px;
    padding: 4px;
    /* correspond à l’épaisseur du contour */

    background: linear-gradient(to right, #969696, #ececec, #969696);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 3;
}


.menu-link {
    text-decoration: none;
    color: white;
    display: none;
    visibility: hidden;
}

/*titre bienvenue*/
.bienvenue {
    position: fixed;
    text-align: center;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3.5rem;
    display: none;
    visibility: hidden;
}

/*accueil*/
main {
    z-index: -1;
    margin-top: 90px;
    padding: 15px;
    color: white;
}

.accueil {
    display: flex;
    flex-direction: column;
    row-gap: 15px;
}

.intro-text {
    text-align: left;
    letter-spacing: 1.5px;
}

.intro-img {
    width: 75%;
    margin: 20px 50%;
    transform: translateX(-50%);
    border-radius: 50px;
    box-shadow: 3px 3px 20px rgb(130, 130, 130);
}

/* COMPÉTENCES - INTERACTIONS */
.comp-inter {
    margin: 25px 0;
    display: flex;
    flex-direction: column;
    row-gap: 15px;
}

.comp-inter-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ITEM */
.comp-inter-item {
    width: 100%;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    row-gap: 15px;

    border: 3px solid #b3b3b3;
    border-radius: 25px;

    box-shadow: 0 0 12px rgba(150, 150, 150, 0.4);
    background: black;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        background 0.35s ease;
}

.comp-inter-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 20px rgba(120, 120, 120, 0.35);
    background: black;
}

.comp-inter-text {
    display: none;
    visibility: hidden;
}

.comp-inter-item.active-comp {
    grid-area: 1/1/2/3;
}

.comp-inter-item.active-comp .comp-inter-text {
    display: flex;
    visibility: visible;
}

/*competence technique*/
.comp-tech-list {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    margin: 15px 0;
}

.comp-tech-item {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    column-gap: 25px;
    padding: 10px 15px;
    border-bottom: 2px solid white;
    white-space: nowrap;
}

.comp-tech-item:first-child {
    border-top: 2px solid white;
}

.comp-tech-div {
    max-height: 0;
    overflow: hidden;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 200ms linear;
    white-space: wrap;
    z-index: -1;
}

.comp-tech-img {
    width: 45px;
    z-index: -1;
}

.plus {
    display: inline-block;
    transition: transform 0.3s ease;
    transform: rotate(0deg);
    z-index: -1;
}

.toggle-comp .plus {
    transform: rotate(45deg);
}

.toggle-comp {
    flex-wrap: wrap;
}

.comp-tech-item.toggle-comp .comp-tech-div {
    max-height: 100%;
    clip-path: inset(0 0 0 0);
    transition: clip-path 500ms linear;
}

.comp-tech-item.toggle-comp .projet-logiciel {
    display: flex;
    visibility: visible;
}

.projet-logiciel {
    display: none;
    visibility: hidden;
}

.comp-tech-item .comp-tech-div {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 15px;
    padding: 15px;
}

.comp-tech-item .comp-tech-div-img {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: center;
    align-items: center;
    gap: 5px;
}

.comp-tech-item .comp-tech-div-img .css {
    grid-area: 1/2/3/3;
}

.comp-tech-item .comp-tech-div-img .figma {
    width: 35px;
}

/*projet*/
.projet {
    margin-top: 25px;
}

.projet-title1 {
    margin-bottom: 25px;
}

.projet-list {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    row-gap: 25px;
    justify-content: center;
    align-items: center;
}

.projet-item {
    width: 80vw;
}

.projet-img {
    width: 100%;
    border-radius: 20px;
}

.dessin div {
    display: flex;
}

.dessin img {
    width: 50%;
}

.luffy {
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
}

.zoro {
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
}

/* ===================page projet==================== */
.retour-div {
    position: fixed;
    top: 10px;
    left: 10px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    justify-items: stretch;
}

.retour-div a {
    text-decoration: none;
}

.retour {
    box-sizing: border-box;
    text-align: center;
    width: 50px;
    height: 50px;

    background-color: #101010;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    border: 3px solid #b3b3b3;
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;
}

.retour-fond {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background-color: #101010;
    border-bottom: 3px solid #b3b3b3;

    z-index: 0;
}

.projet-menu-list {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0;
    padding: 20px 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    /* gauche – centre – droite */
    align-items: center;
    border-top: 3px solid #b3b3b3;
    background: #101010;
    color: white;
    box-sizing: border-box;
}

/* Chaque élément prend sa place */
.projet-menu-item {
    flex: 1;
    text-align: center;
}

/* Texte des boutons */
.projet-menu-p {
    word-spacing: 5px;
}

.projet-menu-link {
    text-decoration: none;
    color: white;
}

/* Titre au centre */
.projet-menu-title {
    margin: 0;
    font-weight: bold;
    font-size: 20px;
}

/* ==easy-cast== */
.comp-tech-item {
    border-top: none !important;
}

.projet-logiciel {
    width: 65px;
    padding: 10px;
}

.gallery-mobile {
    margin-top: 15px;
    column-count: 2;
    column-gap: 10px;
    padding: 10px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 10px;
    border-radius: 15px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.competence,
.accueil,
.projet,
.contact {
    padding-top: 5px;
}

.gallery-justgreen {
    list-style-type: none;
    margin: 40px 0;
}

.justgreen-item {
    margin: 25px 0;
}

.justgreen-video {
    max-width: 100%;
}

.snake-item {
    display: flex;
    flex-direction: column;
    row-gap: 25px;
    justify-content: flex-start;
    align-items: flex-start;
}

.btn-github {
    padding: 10px;
    color: white;
    background-color: #101010;
    border: 3px solid white;
    border-radius: 25px;
    text-decoration: none;
}

.btn-github:hover {
    background-color: #4c4c4c;
}

/*contact */
.contact {
    margin: 25px 0;
}

.contact h2 {
    text-align: left;
    margin-bottom: 10px;
}

.mail {
    position: fixed;
    right: 20px;
    top: 7%;
    animation-name: notifications;
    animation-delay: 5s;
    animation-duration: 2s;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

@keyframes notifications {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.transmis {
    color: black;
    background-color: green;
    padding: 10px;
    border-radius: 10px;
}

.nonTransmis {
    color: black;
    background-color: red;
    padding: 10px;
    border-radius: 10px;
}

fieldset {
    padding: 10px;
    border-radius: 20px;
}

label {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

legend {
    font-size: 1.4rem;
    border: 3px solid white;
    border-radius: 15px;
    padding: 5px;
}

fieldset div {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.prenom-nom {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

input,
textarea {
    height: 40px;
    border-radius: 10px;
}

textarea {
    height: 200px;
}

fieldset img {
    width: 30px;
    padding: 5px;
}

button {
    width: 100%;
    border: 3px solid white;
    background-color: #101010;
    padding: 5px;
    border-radius: 25px;
    margin-bottom: 10px;
}

button:hover {
    background-color: #4c4c4c;
}

/*footer*/
.footer {
    border-top: 3px solid white;
    padding: 25px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    gap: 25px;
}

.cv {
    color: white;
    text-decoration: none;
    background-color: black;
    border: 3px solid white;
    padding: 10px;
    border-radius: 10px;
}

.cv:hover {
    background-color: #4c4c4c;
}

/*ecran 1024*/
@media (min-width:1024px) {
    body {
        margin-bottom: 6vh;
    }

    .competence,
    .accueil,
    .projet,
    .description-projet,
    .contact {
        padding-top: 90px;
    }

    .menu-link {
        position: relative;
        display: grid;
        visibility: visible;
        padding: 0.6rem 1.4rem;
    }

    .menu-item {
        position: relative;
        /* nécessaire pour positionner le ::after */
        z-index: 10;
        overflow: hidden;
    }

    .menu-img-group,
    .menu-img-group:hover::after,
    ::before {
        display: none;
        visibility: hidden;
    }

    .menu-list {
        position: fixed;
        top: 3%;
        max-height: 5%;
        display: grid;
        font-size: 1.3rem;
        grid-template-columns: repeat(4, 1fr);
        justify-items: center;
        align-items: center;
        padding: 0.938rem 1rem;
        background-color: #101010;
    }

    .menu-list.fixed {
        position: fixed;
        top: 18px;
    }

    /*backgourn link*/
    .back-link {
        position: absolute;
        display: block;
        box-sizing: border-box;
        top: 0;
        left: 0;
        width: 25%;
        height: 100%;
        background: linear-gradient(to right, #969696, #ececec, #969696);
        border-left: 6px solid #101010;
        border-right: 6px solid #101010;
        border-top: 4px solid #101010;
        border-bottom: 4px solid #101010;
        background-size: 400% 100%;
        /* 4 items = 400% */
        background-position: 0% 0%;
        border-radius: 150px;
        transition: .5s;
        transition-delay: 0.1s;
    }

    .title {
        position: fixed;
        top: 0;
        border-bottom-right-radius: 25px;
        z-index: 1000;
        background: rgba(16, 16, 16, 0.3);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        box-shadow: 0 4px 12px rgba(16, 16, 16, 0.6);
    }

    .menu-link {
        color: white;
        /* ou la couleur par défaut */
        transition: color 0.5s ease;
        /* transition de couleur */
    }

    .menu-item.active-nav-desktop:not(:hover) .menu-link {
        color: #101010;
    }

    .menu-item:hover .menu-link {
        color: #101010;
    }

    .menu-item:nth-child(1).active-nav-desktop~.back-link {
        left: 0;
        background-position: 0% 0%;
    }

    .menu-item:nth-child(2).active-nav-desktop~.back-link {
        left: 25%;
        background-position: 33% 0%;
    }

    .menu-item:nth-child(3).active-nav-desktop~.back-link {
        left: 50%;
        background-position: 66% 0%;
    }

    .menu-item:nth-child(4).active-nav-desktop~.back-link {
        left: 75%;
        background-position: 100% 0%;
    }

    .menu-item:nth-child(1):hover~.back-link {
        left: 0;
        background-position: 0% 0%;
    }

    .menu-item:nth-child(2):hover~.back-link {
        left: 25%;
        background-position: 33% 0%;
    }

    .menu-item:nth-child(3):hover~.back-link {
        left: 50%;
        background-position: 66% 0%;
    }

    .menu-item:nth-child(4):hover~.back-link {
        left: 75%;
        background-position: 100% 0%;
    }

    /*=======contenu=======*/
    main {
        margin: 0 20%;
    }

    .projet-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: auto;
        justify-items: center;
        align-items: center;
        column-gap: 15px;
    }

    .projet-item {
        width: 100%;
        height: 100%;
    }

    .projet-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .projet-item:hover .projet-img {
        filter: brightness(100%);
        transform: scale(1.05);
        /* Agrandissement léger */
        box-shadow: 0 8px 20px rgba(150, 150, 150, 0.5);
        /* Ombrage plus marqué */
    }

    .comp-inter-list {
        width: 65%;
        margin: 0 auto;
    }

    .comp-tech-list {
        width: 65%;
        margin: 0 auto;
    }

    .gallery-mobile {
        column-count: 3;
    }

    .comp-inter-item:hover {
        scale: 1.075;
    }

    /*projet*/
    .projet-img {
        filter: brightness(25%);
        transition: filter 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
    }

    /*contact*/
    .mail {
        position: fixed;
        right: 20px;
        top: 93%;
        animation-name: notifications;
        animation-delay: 5s;
        animation-duration: 2s;
        animation-timing-function: linear;
        animation-fill-mode: forwards;
    }

    .prenom-nom {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .footer {
        flex-direction: row;
    }
}