@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

:root{
    --rose: #e7174a;
    --darkblue: #011826;
    --lightblue:#0c8ce9;
    --opensans: "Open Sans";
    --raleway: "Raleway" 
}

*{
    margin: 0;
    box-sizing: border-box;
    color: white;
    font-family: var(--opensans);
    font-size: 16px;
}

.fa-solid ,.fa-bars{
    display: none;
}

body{
    position: relative
}

body>div{
    background-color: var(--darkblue);

}

li{
    list-style: none;
}

a{
    text-decoration: none;
}

h1, h2, h3{
    font-family: var(--raleway);
}

header{
    max-width: 1440px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

header>a {
    display: flex;
    flex-direction: column;
}
header img{
    width: 180px;
}

header nav a{
    color: #0c8ce9;
    transition: all 0.3s ease-in-out;

    &:hover{
        color: var(--rose);
        transition: all 0.3s ease-in-out;
    }
}

header nav ul{
    display: flex;
    gap: 30px;
}

nav{
    display: flex;
    gap: 40px;
    align-items: center;
}

.CTA{
    padding: 10px 20px;
    color: white;
    background-color: var(--lightblue);
    transition: all ease-in-out 0.2s;

    &:hover{
        color: white;
        background-color: var(--rose);
        transition: all ease-in-out 0.2s;
    }
}

.active{
    color: var(--rose);
}

footer h2{
    background-color: var(--lightblue);
    justify-content: center;
    height: 80px;
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 400;
}

#hero{
    display: flex;
    max-width: 1440px;
    justify-content: space-between;
    margin: auto;
    margin-top: 100px;
    padding: 0px 10px;
}

#hero img{
    width: 664px;
    height: 664px;
}

#hero div{
    max-width: 570px;
    text-align: left;
}

h1{
    padding-bottom: 20px;
    font-weight: bold;
    font-size: 36px;
}

#hero p{
    margin: 10px 0px;
}

#casseCouille{
    padding-bottom: 30px;
}

#hero .CTA{
    margin-top: 30px;
    transition: all ease-in-out 0.2s;
}

#formation{
    max-width: 1140px;
    margin: auto;
    display: flex;
    flex-direction: column;
    padding: 100px 10px;
}

h2{
    font-weight: 700;
    font-size: 36px;
}

#formation img{
    width: 800px;
}
#formation>h2{
    align-self: center;
    padding-bottom: 40px;
}

#formation>div{
    display: flex;
    justify-content: flex-start;
    position: relative;
}

#formation article{
    max-width: 450px;
    width: 100%;
    height: fit-content;
    display: flex;
    justify-content: center;
    position: absolute;
    right: 0px;
    top: 15%;
    bottom: 10%;
}

#formation article,#formation article h2,#formation article p{
    background-color: var(--rose);
}

#formation article p{
    padding: 20px 0px;
}
#formation article h2{
    padding: 20px 0px;
    font-size: 21px;
}

#formation article div{
    padding: 50px;
    position: relative;
}

#formation .CTA{
    background-color: var(--darkblue);
    border: solid 1px white;
    position: absolute;
    width: fit-content;
    bottom: -20px;
    display: flex;
    justify-self: center;
    transition: all 0.2s ease-in-out;
    &:hover{
        background-color: var(--rose);
        transition: all 0.2s ease-in-out;
    }

}

#formationSuite{
    max-width: 1140px;
    margin: auto;
    display: flex;
    flex-direction: column;
    padding: 100px 10px;
}

#formationSuite img{
    width: 800px;
}


#formationSuite>div{
    display: flex;
    justify-content: flex-end;
    position: relative;
}

#formationSuite article{
    max-width: 450px;
    width: 100%;
    height: fit-content;
    display: flex;
    justify-content: center;
    position: absolute;
    left: 0px;
    top: 15%;
    bottom: 10%;
}

#formationSuite article,#formationSuite article h2,#formationSuite article p{
    background-color: var(--rose);
}

#formationSuite article p{
    padding: 20px 0px;
}
#formationSuite article h2{
    padding: 20px 0px;
    font-size: 21px;
}

#formationSuite article div{
    padding: 50px;
    position: relative;
}

#formationSuite .CTA{
    background-color: var(--darkblue);
    border: solid 1px white;
    position: absolute;
    width: fit-content;
    bottom: -20px;
    display: flex;
    justify-self: center;
    transition: all 0.2s ease-in-out;
    &:hover{
        background-color: var(--rose);
        transition: all 0.2s ease-in-out;
    }

}

#compétences{
    max-width: 1440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto;
    padding: 0 10px;
    padding-bottom: 100px;
}

#compétences article{
    display: flex;
    gap: 20px;
    width: 100%;
    justify-content: space-between;
}

#compétences article div{
    color: var(--rose);
    padding: 15px;
    width: 100%;
    gap: 20px;
    display: flex;
    flex-direction: column;
}
summary{
    color: var(--rose);
    border-bottom: 3px solid var(--lightblue);
    font-weight: bold;padding: 10px;
    list-style: none;
}

details{
    background-color: white;
    padding: 10px;
    @media (prefers-reduced-motion: no-preference) {
        interpolate-size: allow-keywords;
    }
    &::details-content {
    opacity: 0;
    block-size: 0;
    overflow-y: clip;
    transition: content-visibility 1s allow-discrete, opacity 1s, block-size 1s;
    }
     &[open]::details-content {
    opacity: 1;
    block-size: auto;
     }
}


details li{
    color: var(--lightblue);
    list-style:disc;

}

#compétences ul{
    padding: 10px 50px;
}

#compétences h2{
    padding: 40px 0px;
}

#mesProjets{
    max-width: 1440px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 80px;
    padding: 0px 10px 100px 10px;
}

#mesProjets>div{
    display: flex;
    justify-content: space-between;
    gap: 80px;
}


#mesProjets article{
    flex: 1 0 27%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    border: 3px solid var(--lightblue);
    box-shadow: inset 0 0 10px var(--lightblue);
}

#mesProjets img{
    height: 180px;
    width: 100%;
    object-fit: cover;
}

#mesProjets h3{
    font-size: 21px;
}

#mesProjets article .CTA{
    width: fit-content;
    background-color: var(--darkblue);
    border: 1px solid white;
    transition: all 0.2s ease-in-out;
    &:hover{
        background-color: var(--rose);
        transition: all 0.2s ease-in-out;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.fadeInUp {
    animation: fadeInUp 0.5s ease-out ;
}

nav li:nth-child(1){
    animation: fadeInUp 0.7s ease-out;
}
nav li:nth-child(2){
    animation: fadeInUp 0.9s ease-out; 
}
nav li:nth-child(3){
    animation: fadeInUp 1.1s ease-out;
}
nav li:nth-child(4){
    animation: fadeInUp 1.3s ease-out;
}
nav li:nth-child(5){
    animation: fadeInUp 1.5s ease-out;
}

.modal{
    visibility: hidden;
    opacity: 0;
    display: flex;
    border: solid 3px var(--rose);
    box-shadow: inset 0 0 20px var(--rose);
    max-width: 300px;
    width: 100%;
    padding: 20px 30px;
    justify-content: center;
    position: absolute;
    backdrop-filter: blur(10px);
    right: 15%;
}

.modal form{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal span{
    display: flex; 
    align-items: center;
    justify-content: space-between;
    padding-bottom: 30px;
}

.modal span a {
    font-size: 30px;
}

.modal input[type="text"],.modal input[type="email"]{
    padding: 8px;
    outline: none;
    width: fit-content;
    color: black;
}

.modal textarea{
    height: 100px;
    resize: none;
    padding: 8px;
    color: black;
    outline: none;
}

input[type="submit"]{
    border: none;
}

.modal:target {
  visibility: visible;
  opacity: 1;
}



.modal2{
    visibility: hidden;
    opacity: 0;
    display: flex;
    border: solid 3px var(--rose);
    box-shadow: inset 0 0 20px var(--rose);
    max-width: 300px;
    width: 100%;
    padding: 20px 30px;
    justify-content: center;
    position: absolute;
    backdrop-filter: blur(10px);
    left: 15%;
    z-index: 9999;
}

.modal2 form{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal2 span{
    display: flex; 
    align-items: center;
    justify-content: space-between;
    padding-bottom: 30px;
}

.modal2 span a {
    font-size: 30px;
}

.modal2 input[type="text"],.modal2 input[type="email"]{
    padding: 8px;
    outline: none;
    width: fit-content;
    color: black;
}

.modal2 textarea{
    height: 100px;
    resize: none;
    padding: 8px;
    color: black;
    outline: none;
}

.modal2:target {
  visibility: visible;
  opacity: 1;
}

@media screen and (max-width:1140px) {

    nav{
        display: none
    }

    .fa-solid ,.fa-bars{
        display: block;
        font-size: 30px;
    }
    
    #hero {
        flex-direction: column;
        align-items: center;
        gap: 80px;
    }

    #hero>div{
        max-width: none;
    }

    #hero img{
        width: 370px;
        height: 370px;
    }

    #formation img, #formationSuite img{
        max-width: 90vw;
    }

    #mesProjets div:nth-child(2){
        flex-wrap: wrap;

    }

}

@media screen and (max-width:768px) {
     #hero img{
        max-width: 300px;
        max-height: 300px;
    }

    #formation img, #formationSuite img{
        max-width: 70vw;
        object-fit: contain;
    }

    #formation article, #formationSuite article{
        position: relative;
    }

    #formation>div {
        flex-direction: column;
        align-items: center;
    }
    
    #formationSuite>div {
        flex-direction: column-reverse;
        align-items: center;
    }

    #compétences article {
        flex-direction: column;
        gap: 0;
    }

    #mesProjets>div {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }

    .modal2, .modal{
        max-width: 250px;
    }
}