/*
Theme Name: Jaunecitron Theme
Author: Laventin
Description: Le theme custom de jaunecitron8300.
Version: 1.2
Text Domain: jaunecitrontheme
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --scale: 1;
    --header-height: 330px;
    --logo-scale: 1;
    --header-y : 1px;
    --scroll-y : 0px
}

@supports not (-webkit-appearance: none) {
    * {
        scrollbar-width: auto; /* Largeur fine */
        scrollbar-color: #ffffffcc rgb(122, 116, 151); /* Couleur de la barre et de la piste */
    }
}

::-webkit-scrollbar {
    width: 15px; /* Largeur de la scrollbar */
    height: 15px; /* Hauteur de la scrollbar */
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ffffffcc; /* Couleur de la barre */
}

::-webkit-scrollbar-thumb:hover {
    background: #ffffffee; /* Couleur au survol */
}

::-webkit-scrollbar-track {
    background: rgb(122, 116, 151);
}

html{
    height: 100%;
    overflow-y: auto;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a:link { text-decoration: none; } 
a:visited { text-decoration: none; } 
a:hover { text-decoration: none; } 
a:active { text-decoration: none; }

@keyframes loading  {
    to {
      background-position-x: -200%;
    }
}

body{
    width: 100%;
    background-color: #432599;
    background-image: url("assets/images/spiral_pattern.svg");
    background-repeat: no-repeat;
    background-position: -500px 200px;
}

.wp-block-group{
    width: calc(100% - 200px);
    margin-left: auto;
    margin-right: auto;
}

.preload-transitions{ transition: none !important; }
.preload-hide { opacity: 0; }

.loading-spinner {
    width: 60px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: 
      radial-gradient(farthest-side,#ff4387ff 94%,#0000) top/10px 10px no-repeat,
      conic-gradient(#0000 30%,#ff4387ff);
    mask: radial-gradient(farthest-side,#0000 calc(100% - 10px),#000 0);
    -webkit-mask: radial-gradient(farthest-side,#0000 calc(100% - 10px),#000 0);
    animation: spin 1s infinite linear;
    display: block;
    margin: 20px auto;
}

@keyframes spin {
    100%{transform: rotate(1turn)}
}

#side-menu{
    position: fixed;
    width: 400px;
    height: 100%;
    background-color: #fee0e9ff;
    z-index: 5;
    right: 0;
    display: block;
    transition: all 0.2s ease;

    &.collapsed{
        right: -400px;
        box-shadow: 0 0 0px rgba(0, 0, 0, 0.301);
    }

    .link-group{
        margin-top: 80px;
        margin-left: 40px;
        display: flex;
        gap: 5px;
        flex-direction: column;

        a{
            height: 40px;
            width: 200px;
            position: relative;
            padding-left: 20px;
            padding-top: 5px;
            padding-bottom: 5px;

            &::before {
                content: "";
                z-index: 3;
                position: absolute;
                border-radius: 10px;
                background-color: #ff438727;
                top: 0;
                bottom: 0;
                left: 0;
                right: 0;
                opacity: 0;
                width: 0%;
                transition: all 0.15s ease-out;
            }

            &:hover{
                &::before{
                    opacity: 1;
                    width: 100%;
                }
            }
        }

        .link{
            display: flex;
            align-items: center;

            p{
                color: #ff4387ff;
                font: 1.3rem "Poppins", sans-serif;
                font-weight: 500;
                margin-right: 15px;
            }
        }

        .line-space{
            margin-top: 50px;
        }
    }
}

main{
    position: static;
    min-height: calc(100vh - var(--header-height));
    width: 100%;
}

.background-blocks{
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;

    #block-2{
        position: absolute;
        width: 200%;
        height: 600px;
        background-color: #654daf;
        transform: translate(-25%, -50%) rotate(-3.1161434deg);
        top: calc(-15px + 80px * (var(--scale) - 1) );
        z-index: 2;
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.116);
    }

    #block-3{
        position: absolute;
        width: 200%;
        height: 300px;
        background-color: #4d31a3;
        transform: translate(-25%, 0) rotate(1.0019832deg);
        top: calc(125px + 80px * (var(--scale) - 1));
        z-index: 1;
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.116);
    }
}

#header{
    position: relative;
    width: 100%;
    background-color: rgba(165, 42, 42, 0.123);
    overflow-x: clip;

    #logo-container{
        position: relative;
    
        #logo{
            position: absolute;
            width: calc(400px * var(--logo-scale));
            /* height: calc(200px* var(--logo-scale)); */
            height: auto;
            top: calc(13px * var(--logo-scale));
            transform: translate(40px, var(--header-y));
            transition: margin-top 0.2s ease, opacity 0.1s ease;
            z-index: 3;
            user-select: none;

            img{
                width: 100%;
                position: absolute;
                transition: opacity 0.2s ease;

                &:first-child{
                    opacity: 1;
                }
    
                &:last-child{
                    opacity: 0;
                }
            }

            #stars{
                position: absolute;
                margin-top: -10%;
                width: 30%;
                right: -20%;
    
                &.constraint{
                    top: -20%;
                }
            }
            
            &.constraint{
                width: calc(300px * var(--logo-scale));
                /* height: calc(150px* var(--logo-scale)); */
                margin-top: -30px;
                transform: translate(40px, 65px);
                z-index: 3;
                position: fixed;

                img{
                    width: 100%;
                    position: absolute;
    
                    &:first-child{
                        opacity: 0;
                    }
        
                    &:last-child{
                        opacity: 1;
                    }
                }
            }
        }
    }

    .top-right-bar{
        display: flex;
        justify-content: flex-end;
        align-items: center;
        top: 40px;
        right: 30px;
        position: fixed;
        transition: margin-top 0.1s ease, opacity 0.1s ease;
        z-index: 3;

        .nav-links{
            display: flex;
            justify-content: flex-end;
            position: relative;
            margin-right: 35px;
            gap: 10px;
    
            a{
                z-index: 4;
                user-select: none;

                img{
                    width: calc(55px * var(--scale));
                }
            }
    
            #kofi-button{
                margin-right: 10px;
            }
        }

        &.constraint{
            margin-top: -15px;
        }
    }

    .page-title{
        top: calc(140px + 40px * (var(--scale) - 1));
        width: 70%;
        margin-left: auto;
        margin-right: auto;
        z-index: 3;
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        transition: top 0.2s ease, opacity 0.1s ease;

        h1{
            color: white;
            font: calc(5.5rem * ((var(--scale) * 0.5) + 0.5)) "Poppins", sans-serif;
            font-weight: 700;
            text-align: center;
            transition: color 0.1s ease;
            user-select: none;
            overflow-wrap: break-word;
            word-wrap: break-word;
        }

        &.constraint{
            top: calc(22px + 20px * (var(--scale) - 1));

            h1{
                color: #654daf;
                font: calc(3.5rem * ((var(--scale) * 0.5) + 0.5)) "Poppins", sans-serif;
                font-weight: 700;
            }
        }
    }

    #block-1{
        position: absolute;
        width: 200%;
        height: 300px;
        background-color: white;
        transform: translate(-25%, 0) rotate(3.4192659deg);
        top: calc(-175px + 80px * (var(--scale) - 1));
        z-index: 3;
        transition: transform 0.2s ease;

        &.constraint{
            transform: translate(0, 0) rotate(0deg);
            position: fixed;
        }
    }

    #block-1-calculs{
        position: absolute;
        width: 200%;
        height: 300px;
        background-color: transparent;
        transform: translate(-25%, 0) rotate(3.4192659deg);
        top: calc(-175px + 80px * (var(--scale) - 1));
        z-index: -1;
        transition: transform 0.2s ease;
    }

    #block-1-shadow{
        position: absolute;
        width: 200%;
        height: 300px;
        background-color: rgba(0, 0, 0, 0.158);
        transform: translate(-25%, 0) rotate(3.4192659deg);
        top: -175px;
        z-index: 2;
        filter: blur(40px);
    }
}

#open-menu-button{
    position: relative;
    z-index: 5;
}

#close-menu-button{
    position: fixed;
    z-index: 5;

    &.collapsed{
        opacity: 0;
        pointer-events: none;
    }
}

.burger-menu-button{

    .burger-circle{
        height: calc(75px * var(--scale));
        width: calc(75px * var(--scale));
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: calc(6px * var(--scale));

        .burger-bar{
            background-color: rgb(255, 255, 255);
            height: calc(6px * var(--scale));
            width: calc(35px * var(--scale));
            border-radius: 10px;
            z-index: 3;
            cursor: pointer;
        }

        &::before {
            content: "";
            z-index: 3;
            position: absolute;
            border-radius: 50%;
            background-color: #ff4387ff;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            transform: scale(1);
            transition: transform 0.1s ease;
        }

        &:hover{
            &::before {
                transform: scale(1.2);
                cursor: pointer;
            }
        }
    }

    &.collapsed{
        z-index: 3;

        .burger-circle{
            .burger-bar{
                background-color: #ff4387ff;
            }
            
            &::before {
                background-color: #ff438727;
            }
        }
    }
}

#header-spacer{
    height: var(--header-height);
}


#content{
    position: static;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.standard-container{
    position: relative;
    width: calc(1100px * var(--scale));
    height: auto;
    margin-right: auto;
    margin-left: auto;
}

.title-medium{
    position: relative;
    z-index: 1;
    color: white;
    font: calc(2.5rem * ((var(--scale) * 0.5) + 0.5)) "Poppins", sans-serif;
    font-weight: 600;
    margin-bottom: 25px;
    display: block;

    &.centered{
        text-align: center;
    }
}

.paragraph-container{
    display: flex;

    &.column-2{
        flex-direction: row;
        justify-content: space-between;
        gap: 20px;
        
        p{
            flex: 1;
        }
    }
}

.center-flex{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.paragraph{
    position: relative;
    z-index: 1;
    color: white;
    font: calc(1.1rem * ((var(--scale) * 0.5) + 0.5)) "Poppins", sans-serif;
    font-weight: 300;

    &.centered{
        text-align: center;
    }
}

h1, h2{
    color: white;
    font: calc(2.5rem * ((var(--scale) * 0.5) + 0.5)) "Poppins", sans-serif;
    font-weight: 600;
}

p{
    color: white;
    font: calc(1.1rem * ((var(--scale) * 0.5) + 0.5)) "Poppins", sans-serif;
    font-weight: 300;
}

a{
    color: #ff4387ff;
    font: calc(1.1rem * ((var(--scale) * 0.5) + 0.5)) "Poppins", sans-serif;
    font-weight: 300;

    &:hover{
        color: rgb(255, 137, 180);
    }
}

footer{
    min-height: 100px;
    width: 100%;
    background-color: #321a75;
    display: flex;
    flex-direction: column;

    .container{
        margin-bottom: auto;
        margin-top: auto;
        margin-right: 0;
        padding: 20px;
        display: flex;
        overflow: hidden;

        .left{
            margin: auto;
            margin-left: 30px;
            margin-right: 30px;

            img{
                width: 60px;
                height: 60px;
                border-radius: 50%;
            }
        }

        .middle{
            display: flex;
            justify-content: center;
            gap: 40px;
            flex: 1;

            a{
                line-height: 65px;
            }
        }

        .right{
            margin-left: auto;
            margin-top: auto;
            margin-bottom: auto;
        }

        p{
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.466);
            text-align: end;
        }

        a{
            font-size: 0.9rem;
        }
    }

    .site-info{
        padding: 5px;
        padding-right: 20px;

        p{
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.466);
            text-align: end;
        }
    }
}

/* Mobiles */
@media (max-width: 767px){
    :root {
        --scale: 0.3;
        --logo-scale: 0.3;
        --header-height: 150px;
    }

    .wp-block-group{
        width: 80%;
    }

    #side-menu{
        left: 0;
        margin-left: 0;
        width: 100%;
    
        &.collapsed{
            left: -100%;
            width: 100%;
        }

        .link-group{
            margin-top: 160px;
            margin-left: 0;
            gap: 10px;

            .link{
                background-color: rgba(255, 255, 255, 0.452);
                border-radius: 25px;
                width: 80%;
                left: 50%;
                transform: translateX(-50%);

                p{
                    font: 1.1rem "Poppins", sans-serif;
                    font-weight: 500;
                }
            }
        }
    }

    .background-blocks{

        #block-2{
            top: calc(20vw - 255px);
            position: absolute;
        }
    
        #block-3{
            top: 45px;
            position: absolute;
        }
    }

    #header-spacer{
        height: calc(77px + 20vw);
    }
    

    #header{    
        #logo-container{
            #logo{
                position: absolute;
                width: 100%;
    
                img{
                    &:first-child{
                        display: none;
                    }
        
                    &:last-child{
                        display: none;
                    }
                }
    
                #stars{
                    position: absolute;
                    top: calc(4vw - 40px);
                    margin-top: 0;
                    width: 80px;
                    right: 30%;
                }
                
                &.constraint{
                    display: none;
                }
            }
        }

        .top-right-bar{
            z-index: 4;
        }

        .top-right-bar.constraint{
    
            .burger-menu-button{
                .burger-circle{
                    .burger-bar{
                        background-color: #ff4387ff;
                    }
                }
    
                &.collapsed{
                    z-index: 3;
    
                    .burger-circle{
                        .burger-bar{
                            background-color: #654daf;
                        }
                    }
                }
            }
        }
    
        #block-1{
            top: calc(-200px + 80px * (var(--scale) - 1));
            position: fixed;

            &.constraint{
                transform: translate(0, 15px) rotate(0deg);
            }
        }

        #block-1-calculs{
            top: calc(-200px + 80px * (var(--scale) - 1));
            position: fixed;
        }
    
        #block-1-shadow{
            top: calc(-200px + 80px * (var(--scale) - 1));
            position: fixed;
        }

        .top-right-bar {
            justify-content: flex-start;
            left: 15px;
            top: calc(10vw + 15px);

            .nav-links{
                display: none;
            }

            &.constraint{
                top: 7px;
                left: 0px;
            }
        }

        .page-title{
            top: calc(6vw + 40px);
            width: 70%;
            position: fixed;
            left: 50%;
            transform: translateX(-50%);
            z-index: 3;
    
            h1{
                font: calc(5vw + 15px) "Poppins", sans-serif;
                font-weight: 700;
            }
    
            &.constraint{
                top: calc(26px + 20px * (var(--scale) - 1));
    
                h1{
                    color: #654daf;
                    font: calc(2.3rem * ((var(--scale) * 0.5) + 0.5)) "Poppins", sans-serif;
                    font-weight: 700;
                }
            }
        }
    }

    .burger-menu-button{
        position: relative;
        z-index: 5;

        .burger-circle{
            height: 75px;
            width: 75px;
            gap: 6px;

            .burger-bar{
                background-color: #ff4387ff;
                height: 6px;
                width: 35px;
            }

            &::before {
                content: "";
                display: none;
            }
        }

        &.collapsed{
            z-index: 3;

            .burger-circle{
                .burger-bar{
                    background-color: rgb(255, 255, 255);
                }
            }
        }
    }

    #content{
        position: static;
        width: 100%;
        height: 100%;
    }

    .standard-container{
        width: 70%;
    }
    
    .title-medium{
        font: 2rem "Poppins", sans-serif;
        font-weight: 600;
        margin-bottom: 25px;
    }
    
    .paragraph-container{   
        &.column-2{
            flex-direction: column;
        }
    }

    .paragraph{
        font: 1rem "Poppins", sans-serif;
        font-weight: 300;
    }

    footer{

        .container{
            margin-bottom: auto;
            margin-top: auto;
            margin-right: 0;
            padding: 20px;
            display: flex;
            overflow: hidden;
    
            .left{
                display: none;
            }
    
            .middle{
                flex-direction: column;
                gap: 5px;
    
                a{
                    line-height: inherit;
                    font-size: 0.8rem;
                }
            }
    
            .right{
                margin-left: auto;
            }

            p{
                font-size: 0.7rem;
            }
        }
    
        .site-info{
            p{
                font-size: 0.7rem;
            }
        }
    }

}

/* Tablets */
@media (min-width: 768px) and (max-width: 1024px){
    :root {
        --scale: 0.6;
        --logo-scale: 0.6;
        --header-height: 300px;
    }

    #header {
        .top-right-bar {
            .nav-links{
                display: none;
            }
        }
    }

}

/* small desktop */
@media (min-width: 1025px) and (max-width: 1399px){
    :root {
        --scale: 0.8;
        --logo-scale: 0.8;
        --header-height: 320px;
    }
}

/* standard desktop */
@media (min-width: 1400px) and (max-width: 1999px){
    :root {
        --scale: 1;
        --logo-scale: 1;
        --header-height: 330px;
    }
}

/* 2K desktop */
@media (min-width: 2000px) and (max-width: 2599px){
    :root {
        --scale: 1.2;
        --logo-scale: 1.2;
        --header-height: 350px;
    }
}

/* 4K desktop */
@media (min-width: 2600px){
    :root {
        --scale: 1.6;
        --logo-scale: 1.6;
        --header-height: 380px;
    }
}