/*************************************** STYLE DU BODY ****************************************************
***********************************************************************************************************/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;

}

html {
    font-size: 60%;
    overflow-x: hidden;
}

:root {
    --bg-color: #a396aa;
    --second-bg-color: #f8f8f8;
    --text-color: #531f58;
    --main-color: #d9c4dd;
    --bg-html: #7c6c84;
    --bg-css: #57475f;
    --bg-sass: #876a96;
    --bg-javacript: #ae9eb6;
    --bg-typecript: #a777bf;
    --bg-nextjs: #53455a;
    --bg-express: #322538;
    --bg-prima: #c5add2;
    --bg-react: #291f2f;
    --bg-nodejs: rgb(74, 95, 181);
    --bg-postgre: rgb(55, 70, 130);
    --bg-express: rgb(84, 101, 168);
    --bg-pwa: rgb(227, 133, 227);

}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

/******************************************** JEU DE LUMIÈRES **********************************************
***********************************************************************************************************/
.switch {
    font-size: 15px;
    border: 2px solid;
    border-radius: 20px;
    padding: 5px;
    cursor: pointer;
}

.switch.darkBtn {
    display: none;
}

.photo_color {
    display: none;
}

body.light,
body.light .projets,
body.light footer {
    background: #fce5cd;
    color: #b45f06;
}

body.light .education,
body.light .contact,
body.light header {
    background: #dcc7b0;
    color: #b45f06;
}

body.light h3,
body.light h2,
body.light .text {
    color: #b45f06;
}

body.light p,
body.light a,
body.light .navbar a:focus-visible,
body.light .navbar a:active,
body.light .navbar a:visited {
    color: #783f04;
    font-weight: 700;
}

body.light .logo span,
body.light h1 span {
    text-shadow: 0 0 15px #ce7e00;
    color: #ce7e00;
}

body.light #menu,
#close,
body.light .animation-container .text.second-text {
    color: #ce7e00;
}

body.light .animation-container .text.second-text {}

body.light .animation-container .text.second-text body.light .text.second-text::before,
body.light .animation-container .text.second-text {
    color: #fce5cd;
    background-color: #ce7e00;
}

body.light .text.second-text::before {
    background-color: #fce5cd;
    border-left: #ce7e00
}

body.light .timeline-content {
    background-color: #fce5cd;
    box-shadow: 0 0 10px #ce7e00;
    border: 3px solid #ce7e00;
}

/******************************************** STYLE DU HEADER **********************************************
***********************************************************************************************************/
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 3rem 12% 3rem;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
}

.logo {
    font-size: 2rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.logo span,
h1 span {
    text-shadow: 0 0 15px var(--main-color);
    color: var(--main-color);
}

span {
    color: var(--main-color);
}

.navbar a {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
}

.navbar a:focus-visible,
.navbar a:active,
.navbar a:hover,
.navbar a:visited {
    color: var(--main-color);
    text-decoration: underline;
}

#menu,
#close {
    font-size: 3rem;
    color: var(--main-color);
    display: none;
}

/******************************************** STYLE DU BODY ***********************************************
***********************************************************************************************************/
section {
    min-height: 100vh;
    padding: 5rem 12% 15rem;
}

.home {
    display: flex;
    flex-direction: column;
    margin-top: 5em;
    gap: 4rem;
}

.home-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.home-content {
    flex: 1;
}

.home-content h1 {
    font-size: 5rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1;
}

.home-content h3 {
    /* margin-top: 10rem; */
    font-size: 1.5rem;
}

.home-img img {
    border-radius: 50%;
    position: relative;
    width: 20vw;
    height: 20vw;
    box-shadow: 0 0 25px var(--main-color);
    cursor: pointer;
    transition: 0.4s ease-in-out;
    object-fit: cover;
    object-position: 80% 10%;
}

.home-img img:hover {
    box-shadow: 0 0 25px var(--main-color),
        0 0 50px var(--main-color),
        0 0 100px var(--main-color);
}

.home-content p {
    font-size: 1.5rem;
    line-height: 1.5;
    max-width: 600px;
}

h2{
    margin: 30px;
    color: var(--text-color);
    text-align: center;
    font-size: 5rem;
}

.stacks {
    margin: 1rem 0;
    text-align: center;
}

.stacks h3 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.stacks-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.stack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 80px;
}

.stack-item img {
    width: 38px;
    height: 38px;
    transition: transform 0.3s ease;
}

.stack-item span {
    font-size: 0.85rem;
}

.stack-item:hover img {
    transform: scale(1.15);
}


/******************************************** STYLE DES ICONES ********************************************
***********************************************************************************************************/
.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.5rem;
    height: 4.5rem;
    background: transparent;
    border: 2px solid var(--main-color);
    font-size: 2.5rem;
    border-radius: 50%;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease-in-out;
}

.social-icons a:hover {
    color: var(--bg-nextjs);
    transform: scale(1.3) translateY(-5px);
    box-shadow: 0 0 25px var(--main-color);
    background-color: var(--main-color);
}

/******************************************** STYLE DES BOUTONS HOME ********************************************
***********************************************************************************************************/
.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    box-shadow: 0 0 25px var(--main-color);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: black;
    border: 2px solid transparent;
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px var(--main-color);
}

.btn-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-group a:nth-of-type(2) {
    background-color: black;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    box-shadow: 0 0 25px transparent;
}

.btn-group a:nth-of-type(2):hover {
    box-shadow: 0 0 25px var(--main-color);
    background-color: var(--main-color);
    color: black;
}

/***************************************** STYLE ANINMATION TEXTE *****************************************
***********************************************************************************************************/
.animation-container .text {
    position: relative;
    color: var(--text-color);
    font-size: 1.5em;
}

.animation-container h3{
    margin-bottom: 30px;
}
.animation-container .text.second-text {
    color: var(--bg-color);
    background-color: var(--main-color);
}

.text.second-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: var(--bg-color);
    border-left: 2px solid var(--main-color);
    animation: animate 7s steps(12) infinite;
}

@keyframes animate {

    40%,
    60% {
        left: 100%
    }

    100% {
        left: 0%;
    }
}

/********************************************** STYLE PROJETS **********************************************
***********************************************************************************************************/

.projets {
    background: var(--second-bg-color);
    padding: 10px 20px;
}

.projets-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding-bottom: 4em;
}

.projet-box {
    background-color: var(--bg-color);
    border: 3px solid var(--main-color);
    border-radius: 2rem;
    transition: 0.4s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    height: auto;
}

.projet-box:hover {
    transform: scale(1.03);
}

.projet-content-horizontal {
    display: flex; 
    flex-direction: row;
    gap: 2rem;
    padding: 1rem;
}

.projet-img {
    width: 30%;
    height: auto;
    border: 2px solid #53455a;
    height: 220px;
    border-radius: 1.5rem;
}

.projet-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1.5rem;
}

.projet-texte {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: var(--text-color);
    margin-top: 5px;
}

.projet-texte h4 {
    font-size: 2rem;
}

.projet-texte p {
    font-size: 1.5rem;
}

.projet-p-intro{
    color: #73097d;

}

ul {
    padding-left: 2rem;
}

.projet-texte li {
    font-size: 1.4rem;
    line-height: 1.2;
}

.projet-info-a {
    display: flex;
    flex-direction: row;
    height: 100%;
    gap: 2rem;
}

.projet-link {
    color: var(--main-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.projet-link:hover {
    color: var(--second-bg-color);
}

/******************************************** PARTIE STACK *******************************************/
.projet-stack {
     margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.stack {
    border: 1px solid #4f4851;
    border-radius: 8px;
    padding: 5px;
    font-size: 1.2rem;
    color: white;
}

.html {
    background-color: var(--bg-html);
}

.css {
    background-color: var(--bg-css)
}

.javascript {
    background-color: var(--bg-javacript);
}

.sass {
    background-color: var(--bg-sass);
}

.react {
    background-color: var(--bg-react);
}

.nodejs {
    background-color: var(--bg-nodejs);
}

.nextjs {
    background-color: var(--bg-nextjs);
}

.postgre {
    background-color: var(--bg-postgre);
}

.express {
    background-color: var(--bg-express);
}

.pwa {
    background-color: var(--bg-pwa);
}

/******************************************** STYLE PARCOURS **********************************************
***********************************************************************************************************/

.education {
    background-color: var(--bg-color);
}

.timeline-items {
    position: relative;
}

.timeline-items:before {
    content: '';
    position: absolute;
    width: 5px;
    height: 100%;
    background-color: var(--main-color);
    left: calc(50% - 1px);
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
}

/* .timeline-item:last-child {
    margin-bottom: 0;
} */

.timeline-item:nth-child(odd) {
    padding-left: 0;
    padding-right: calc(50% + 30px);
    text-align: right;
}

.timeline-item:nth-child(even) {
    padding-left: calc(50% + 30px);
    padding-right: 0;
    text-align: left;
}

.timeline-dot {
    height: 21px;
    width: 21px;
    background-color: var(--main-color);
    box-shadow: 0 0 25px var(--main-color),
        0 0 50px var(--main-color);
    position: absolute;
    left: calc(50% - 8px);
    border-radius: 50%;
    top: 10px;
}

.timeline-date {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-color);
    margin: 6px 0 15px;
}

.timeline-content {
    background-color: var(--bg-color);
    border: 3px solid var(--main-color);
    padding: 20px 30px;
    border-radius: 3rem;
    box-shadow: 0 0 10px var(--main-color);
    cursor: pointer;
    transition: 0.3s ease-in-out;
    display: inline-block;
    max-width: 300px;
}

.timeline-content:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--main-color);
}

.timeline-content h3 {
    font-size: 1.5em;
    color: var(--text-color);
    margin: 0 0 10px;
    font-weight: 600;
}

.timeline-content p {
    color: var(--text-color);
    font-size: 1.3em;
    font-weight: 300;
    line-height: 15px;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--main-color);
}

::-webkit-scrollbar-track {
    background-color: var(--bg-color);
    width: 50px;
}

/******************************************** STYLE DE CONTACT *********************************************
***********************************************************************************************************/
.contact {
    background-color: var(--second-bg-color);
}

.contact ::placeholder{
    color: white
}

.contact form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    /* margin: 5rem auto; */
    text-align: center;
}

.contact form .input-box {
    display: flex;
    flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.3rem;
    color: var(--text-color);
    background: var(--bg-color);
    border-radius: 2rem;
    border: 2px solid var(--main-color);
    margin: 1rem 0;
}

.contact form .btn {
    margin-top: 2rem;
    font-weight: 500;
}

/********************************************** STYLE FOOTER **********************************************
***********************************************************************************************************/
.footer {
    position: relative;
    bottom: 0;
    padding: 5px;
    background-color: var(--bg-color);
}

.footer .social {
    text-align: center;
    padding-bottom: 10px;
}

.footer .social a {
    font-size: 1.5em;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    width: 32px;
    height: 32px;
    line-height: 32px;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    margin: 0 10px;
    transition: 0.3s ease-in-out;
}

.footer .social a:hover {
    transform: scale(1.2)translateY(-10px);
    background-color: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 25px var(--main-color);
}

.footer ul {
    font-size: 1.3em;
    line-height: 1.6;
    text-align: center;
}

.footer ul li {
    display: inline-block;
    padding: 0 15px;
}

.footer ul li a {
    color: var(--text-color);
    border-bottom: 3px solid transparent;
    transition: 0.3s ease-in-out;
}

.footer ul li a:hover {
    border-bottom: 3px solid var(--main-color);
}

.footer .copyright {
    margin-top: 15px;
    text-align: center;
    font-size: 1em;
    color: var(--text-color);
}


/******************************************** PARTIE RESPONSIVE *******************************************
***********************************************************************************************************/
@media(max-width: 1285px) {
    html {
        font-size: 80%;
    }
   
    header {
        padding: 2rem 3%;
    }

    .animation-container .text {
        font-size: 20px;
        font-weight: 600;
    }

    .home-img img {
        width: 40vh;
        height: 40vh;
    }

    section {
        padding: 10rem 3% 2rem;
    }

    .projets {
        padding-bottom: 7rem;
    }
    
    .contact form {
        flex-direction: column;
    }

    .footer {
        padding: 2rem 3%;
    }
}

@media (max-width: 895px) {
    #menu {
        display: inline-block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        right: 0;
        width: 50%;
        padding: 1rem 3%;
        background-color: var(--bg-color);
        backdrop-filter: blur(20px);
        border-bottom-left-radius: 2rem;
        border-left: 2px solid var(--main-color);
        border-bottom: 2px solid var(--main-color);
        display: none;
    }

    body.light .navbar {
        background: #fce5cd;
        border: 2px solid #ce7e00;
        color: #b45f06;
    }

    .navbar:active {
        display: block;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        color: var(--text-color);
    }

    .home {
        margin: 5rem 4rem;
    }

    .home-top {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
        gap: 3rem;
    }

    .home-content h1 {
        font-size: 4rem;
        margin-top: 3rem;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content p {
        max-width: 600px;
        margin: 0 auto;
    }

    .home-img img {
        width: 45vh;
        height: 45vh;
    }

    section .education {
        text-align: center;
    }

    .projets h2 {
        margin-bottom: 3rem;
    }

    .projets-container {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 768px) {
    .projet-content-horizontal {
        flex-direction: column;
    }

    .projet-img {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 576px) {
    #menu {
        display: inline-block;
    }

    .animation-container{
        display: none;
    }

    h2{
        font-size: 3rem;
    }

    .home-img img {
        width: 30vh;
        height: 30vh;
    }

    .stack-item {
        width: 80px;
    }

    .stack-item img {
        width: 40px;
        height: 40px;
    }

    .timeline-dot {
        left: 0;
    }

    .timeline-items {
        max-width: 576px;
    }

    .timeline-items:before {
        left: calc(2% - 1px);
    }

    .timeline-item:last-child {
        margin-bottom: 50px;
    }

    .timeline-item:nth-child(odd) {
        padding-left: 30px;
        padding-right: 30px;
        text-align: left;
    }

    .timeline-item:nth-child(even) {
        padding-left: 30px;
        padding-right: 0;
        text-align: left;
    }

    .projet-box {
        height: 400px;
        overflow: hidden;
    }

    .projet-content-horizontal {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .projet-img {
        height: 150px;
        flex-shrink: 0;
    }

    .projet-texte {
        flex: 1;                 
        overflow-y: auto;       
        padding-left: 6px;
    }

    .projet-texte h4 {
        font-size: 1.7em;
    }

    .projet-info-a p {
        font-size: 1.2em;
    }

    .projet-info-a,
    .projet-info-a ul,
    .projet-info-a li {
        font-size: 1em;
    }

    .projet-stack .stack{
        font-size: 1em;
    }
}