/* ************* Import Font ************* */

@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@300..900&family=Reddit+Sans:wght@200..900&family=Telex&display=swap');
    /* Red Hat Display --> For title and module /// sans-serif /// No italic (possible), Weight : 30..900, Width : default */
    /* Telex --> For nav-bar and date /// sans-serif /// No italic, Weight : 400, Width : default */
    /* Reddit Sans --> For paragraph /// sans-serif /// No italic (possible), Weight : 200..900, Width default */


/* ************* General style ************* */

body, html {
    margin: 0px;
    padding: 0px;

    scroll-behavior: smooth;
}

.warning-noscript {
    display: none;
}

/* ************* Header content ************* */

header {
    display: flex;
    flex-direction: column;
    text-align: center;

    font-size: 1.3em;
    color: white;

    min-width: 240px;

    position: sticky;
    top: 0px;
    z-index: 100;
}

header #top-header {
    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 1.4em;

    margin: 0px;
    padding: 5px 0px;

    border-bottom: #a0cfff 2px solid;
    background: linear-gradient(to bottom, #4f94ffee, #3886ffee);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

header #top-header h3 {
    margin: 0px 25px;

    font-family: 'Red Hat Display', serif;
}

header label[for="menuIcon"] {
    display: none;
    cursor: pointer;

    margin: 0px 5px;
}

header label[for="menuIcon"] .bar {
    display: block;
    width: 30px;
    height: 3px;
    background-color: white;

    position: relative;

    margin: 5px 0px;
    transform: rotate(0deg);
    transform-origin: center;
    transition: opacity 0.4s;
}

/* Animation lors du passage à l'état croix */
header #menuIcon:checked + label[for="menuIcon"] .bar:nth-child(1) {
    animation: bar1 0.5s forwards;
}

header #menuIcon:checked + label[for="menuIcon"] .bar:nth-child(2) {
    opacity: 0;
}

header #menuIcon:checked + label[for="menuIcon"] .bar:nth-child(3) {
    animation: bar3 0.5s forwards;
}

/* Animation lors du retour à l'état menu */
header label[for="menuIcon"] .bar:nth-child(1) {
    animation: bar1reverse 0.5s forwards;
}

header label[for="menuIcon"] .bar:nth-child(3) {
    animation: bar3reverse 0.5s forwards;
}

@keyframes bar1 {
    0% {
        transform: rotate(0deg);
        top: 0px;
    }
    50% {
        transform: rotate(0deg);
        top: 8px;
    }
    100% {
        transform: rotate(45deg);
        top: 8px;
    }
}

@keyframes bar3 {
    0% {
        transform: rotate(0deg);
        bottom: 0px;
    }
    50% {
        transform: rotate(0deg);
        bottom: 8px;
    }
    100% {
        transform: rotate(-45deg);
        bottom: 8px;
    }
}

@keyframes bar1reverse {
    0% {
        transform: rotate(45deg);
        top: 8px;
    }
    50% {
        transform: rotate(0deg);
        top: 8px;
    }
    100% {
        transform: rotate(0deg);
        top: 0px;
    }
}

@keyframes bar3reverse {
    0% {
        transform: rotate(-45deg);
        bottom: 8px;
    }
    50% {
        transform: rotate(0deg);
        bottom: 8px;
    }
    100% {
        transform: rotate(0deg);
        bottom: 0px;
    }
}

header #navBar {
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;

    background: linear-gradient(to bottom, #3886ffee, #2279ffee);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    overflow: hidden;
    transition: height 0.4s;
}

header #navBar a {
    text-decoration: none;
    color: white;
    margin: 0px 10px;

    display: block;

    font-family: 'Telex', sans-serif;
}

header #navBar a::after {
    content:  "";
    display: block;
    height: 0.15em;
    background-color: white;

    transform: scale(0);
    transition: transform 0.3s;
}

header #navBar a:hover::after {
    transform: scale(1);
}


/* ************* Main content ************* */

#main {
    margin-top: 15px;
}

#main section {
    font-size: 1.2em;

    margin: 0px calc(2px + 4vw) 10px calc(5px + 4vw);
}

#main section .title {
    font-family: 'Red Hat Display', sans-serif;
    font-size: 1.1em;
    margin: 15px 0px;
    transition: margin 0.5s;

    display: inline-block;

    scroll-margin-top: 100px;
}

#main section .title:hover {
    margin: 15px 10px;
}

#main section .title a {
    text-decoration: none;
    color: black;

    border-bottom: 3px solid;
    border-color: transparent;
    transition: border-color 0.3s;
}

#main section .title a::before {
    content: ">";
    margin: 1px 5px;
    color: transparent;
    transition: color 0.3s;
}

#main section .title a:hover {
    border-color: currentColor;
}

#main section .title a:hover::before {
    color: #888888;
}

#main section p {
    word-spacing: 2.3px;
    text-align: justify;
}

#main section p, #main section ul li {
    margin: 0px;

    line-height: 1.2;
    letter-spacing: 1px;

    font-family: 'Reddit Sans', sans-serif;
}

#main section .links {
    text-decoration: none;
    font-weight: 400;
    transition: font-weight 0.3s, color 0.3s;

    color: #0000FF;
}

#main section .links:active {
    color: #7300FF;
}

#main section .links:hover {
    font-weight: 700;
}

.module-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-evenly;

    margin-top: 5px;
}

.module {
    max-width: 1000px;
    width: 30%;
    margin: 30px 10px;
}

.module .top-module {
    height: 50px;
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-around;
}

.module .top-module img, .module .top-module a {
    max-height: 100%;
    max-width: 100%;
    height: inherit;
    width: inherit;
    aspect-ratio: 1 / 1;
}

.module .top-module a {
    background-color: #1F1F1F;
    transition: background-color 0.4s;

    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-size: contain;
}

.module .top-module a#mail-icon {
    -webkit-mask-image: url(./asset/svg/mail.svg);
    mask-image: url(./asset/svg/mail.svg);
}
.module .top-module a#mail-icon:hover {
    background-color: #d32525;
}

.module .top-module a#sms-icon {
    -webkit-mask-image: url(./asset/svg/sms.svg);
    mask-image: url(./asset/svg/sms.svg);
}
.module .top-module a#sms-icon:hover {
    background-color: #2585d3;
}

.module .top-module a#whatsapp-icon {
    -webkit-mask-image: url(./asset/svg/whatsapp.svg);
    mask-image: url(./asset/svg/whatsapp.svg);
}
.module .top-module a#whatsapp-icon:hover {
    background-color: #25D366;
}

.module .module-line {
    height: 2px;
    width: 100%;
    background-color: grey;
    margin: 10px 0px;
}

.module .bottom-module {
    text-align: center;
    font-family: 'Red Hat Display', sans-serif;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 0.3fr 0.3fr 0.3fr;
    gap: 30px;

    margin: 10px 0px;
}

.projects-grid .project {
    position: relative;
    overflow: hidden;

    max-width: 800px;
    cursor: pointer;
    border-radius: 4px;
    aspect-ratio: 16 / 9;
    box-shadow: 8px 8px 7px 0px #aeaeae66;
}

.projects-grid .project.lighter {
    box-shadow: 8px 8px 7px 0px #c7c7c745;
}

.projects-grid .project img  {
    width: 100%;
}

.projects-grid .project .button-open {
    background-color: #00000036;
    color: white;
    text-align: center;
    font-family: 'Red Hat Display', sans-serif;
    text-decoration: none;

    position: absolute;
    bottom: 0;
    overflow: hidden;
    backdrop-filter: blur(8px);

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    width: 100%;
    height: 0%;
    transition: height 0.4s;
}

.projects-grid .project.lighter .button-open {
    background-color: #cdcdcd4d;
    backdrop-filter: blur(30px);
}

.projects-grid .project:hover .button-open {
    height: 100%;
}

.projects-grid .project .button-open div {
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;

    mask-repeat: no-repeat;
    mask-size: contain;

    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;

    background-color: white;
}

.projects-grid .project#p-game {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.projects-grid .project#p-paint {
    grid-row: 2 / 2;
    grid-column: 3 / 3;
}

.projects-grid .project#p-game .button-open div {
    -webkit-mask-image: url(./asset/svg/play_circle.svg);
    mask-image: url(./asset/svg/play_circle.svg);
}

.projects-grid .project#p-paint .button-open div {
    -webkit-mask-image: url(./asset/svg/paintbrush.svg);
    mask-image: url(./asset/svg/paintbrush.svg);
}

#main section .date {
    font-family: 'Telex', sans-serif;
    line-height: 2;
    display: inline-block;
    color: #545454;
}

#main section .date::after {
    width: 100%;
    content: '';
    display: block;
    background-color: currentColor;
    height: 2px;
    margin: -10px 0px 10px 0px;
}

.content-slider {
    background-color: #f1F1F1;
    padding: 15px 10px 15px 3vw;

    box-shadow: 0 0 9px 2px #b0b0b066;
    margin: 0px calc(-1 * (2px + 4vw)) 0px calc(-1 * (5px + 4vw));
}

.content-slider #main-content-slider {
    position: relative;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    display: flex;

    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    /* Hide scrollbar for Chrome, Safari and Opera */
    &::-webkit-scrollbar {
        display: none;
        width: 0;
        background: transparent;
    }
}

.content-slider #main-content-slider .slider {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    scroll-snap-align: center;
}

.content-slider #main-content-slider .slider p {
    text-align: left;
}

.content-slider #main-content-slider .slider img {
    margin: 10px 0px;
    width: 40%;
}

.content-slider #main-content-slider .slider img.dga {
    width: 70%;
}

.content-slider .action-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;

    margin-top: 10px;
}

.content-slider .action-bar div {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 50%;
}

.content-slider .action-bar .progress-bar {
    height: 15px;
    max-width: 350px;

    border-radius: 20px;
    overflow: hidden;
}

.content-slider .action-bar .icons-button {
    background-color: #1f1f1f;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-size: contain;

    width: 4vw;
    height: 4vw;
    max-width: 47px;
    max-height: 47px;
    min-width: 28px;
    min-height: 28px;

    margin: 0.5vw;

    cursor: pointer;
}

.content-slider .action-bar .chevron-left {
    -webkit-mask-image: url(./asset/svg/chevron_left.svg);
    mask-image: url(./asset/svg/chevron_left.svg);
}

.content-slider .action-bar .chevron-right {
    -webkit-mask-image: url(./asset/svg/chevron_right.svg);
    mask-image: url(./asset/svg/chevron_right.svg);
}

.content-slider .action-bar .autoplay {
    -webkit-mask-image: url(./asset/svg/autopause.svg);
    mask-image: url(./asset/svg/autopause.svg);
}

.content-slider.stopped .action-bar .autoplay {
    -webkit-mask-image: url(./asset/svg/autoplay.svg);
    mask-image: url(./asset/svg/autoplay.svg);
}

.content-slider .action-bar .button-slide-content {
    flex-wrap: wrap;
}

.content-slider .action-bar .button-set-slide {
    width: 4.4vw;
    height: 2.2vw;
    margin: .5vw;

    max-width: 50px;
    max-height: 25px;

    border: .3vw solid grey;
    border-radius: 30px;
    background-color: #1f1f1f;

    cursor: pointer;
    overflow: hidden;
}

.content-slider .action-bar .button-set-slide::before {
    content: '';
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background-color: #F1F1F1;
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 0.4s;
}

.content-slider .action-bar .button-set-slide.animate::before {
    transform: scaleX(0);
    transform-origin: right;
}


/* ************* Media Queries ************* */

@media screen and (max-width: 907px) { /* Si l'ecran est < 907px */
    /* Gère la marge au dessus ses liens (titres de sections) lorsque l'on clique dessus */
    #main section .title {
        scroll-margin-top: 125px;
    }
}

@media screen and (max-width: 768px) { /* Si l'ecran est < 768px */

    header #top-header {
        box-shadow: 0px 5px 10px 2px #ffffff50;
        border: none;
    }

    /* Transformation du menu des liens */
    header #navBar {
        flex-direction: column;

        background: linear-gradient(to right bottom, #345270dd, #37608add);
        -webkit-backdrop-filter: blur(15px);
        backdrop-filter: blur(15px);

        position: fixed;
        height: 0px;
        width: 100%;
        padding: 0px;
    }

    header:has(#menuIcon:checked) #navBar {
        height: 295px;
        padding: 5px;
    }

    header #navBar a {
        margin: 5px calc((100vw - 215px) / 2);
        font-size: 1.2em;
        color: white;

        position: relative;
        left: 150%;
    }

    header #navBar a:nth-child(1) {
        transition: left 0.5s;
    }
    header #navBar a:nth-child(2) {
        transition: left 0.7s;
    }
    header #navBar a:nth-child(3) {
        transition: left 0.9s;
    }
    header #navBar a:nth-child(4) {
        transition: left 1.1s;
    }
    header #navBar a:nth-child(5) {
        transition: left 1.3s;
    }
    header #navBar a:nth-child(6) {
        transition: left 1.5s;
    }

    header:has(#menuIcon:checked) #navBar a {
        left: 0%;
    }

    header #navBar a::after {
        height: 0.15em;
    }

    header label[for="menuIcon"] {
        display: block;
    }

    /* Gère la marge au dessus ses liens (titres de sections) lorsque l'on clique dessus */
    #main section .title {
        scroll-margin-top: 62px;
    }

    .module-container .module {
        width: 40%;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }

    .projects-grid .project#p-game {
        grid-row: 1;
        grid-column: 1;
    }

    .projects-grid .project#p-paint {
        grid-row: 2;
        grid-column: 1;
    }
}

@media screen and (max-width: 381.5px) { /* Si l'ecran est < 380px */
    header #top-header label[for="menuIcon"] {
        margin: 0px 30px 0px 0px;
    }

    /* Gère la marge au dessus ses liens (titres de sections) lorsque l'on clique dessus */
    #main section .title {
        scroll-margin-top: 102px;
    }

    .module-container .module {
        width: 50%;
    }
}