*,
*::before,
*::after {
  box-sizing: border-box;
}

body{
    margin: 0;
    transition: background-color 0.5s ease, color 0.5s ease;
    font-family: 'Nunito Sans', sans-serif;
    overflow-x: hidden;
}
html {
  scroll-padding-top: 100px;
  scroll-behavior: smooth;  
}

#favA{
    border: none;
}

#fav{
    width: 70px;
    background-color: none;
}

header{
    display: flex;
    flex-direction: row;
    padding:20px;
    position: fixed;
    width: 100%;
    background-color: rgba(15, 23, 42, 0.80);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 100;
    box-sizing: border-box;
}
.toolbar{
    display: flex;
    flex-direction: row;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.link-icon {
    display: none;
    width: 35px;
    height: 35px;
}

.link-text {
    display: inline;
}

.page{
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
}

.page1{
    display: flex;
    justify-content: center;
    flex-grow: 1;
    margin-top: 100px;
}

.page2{
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
    align-items: center;
}

.page3{
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
    align-items: center;
}

.welcome{
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
}
.surligne-jour{
    background-color: #0e131f; 
    padding: 3px; 
    color: #f0e8d5;
    transition: background-color 0.5s ease, color 0.5s ease;
}
.surligne-nuit{
    background-color: #f0e8d5; 
    padding: 3px; 
    color: #0e131f;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.pdp{
  width: 400px; 
  height: 400px;
  border-radius: 50%;
  border: 3px solid;
  object-fit: cover;
  margin: 10px;
}

.jour{
    color: #0e131f;
    background-color: #f0e8d5;
}
.nuit{
    color: #f0e8d5;
    background-color: #0e131f;
}

.toolbar a{
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #f0e8d5;
    justify-content: center;
    align-items: center;
    display: flex;
    text-decoration: none;
    transition: 0.8s ease;
}

.linkhover{
    display: inline-block;
    position: relative;
    font-size: larger;
}

.linkhover::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #f0e8d5;
  transition: transform 0.25s ease-out;
}

.linkhover:hover::after {
  transform: scaleX(1);
}

.toolbar a:active{
    transform: scale(0.9);
}

.mode{
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    justify-content: center;
    align-items: center;
    display: flex;
    width: 35px;
}

button img{
    filter: invert(1);
    object-fit: contain;
    width: 35px;
    transition: 1s ease;
}

button img:hover{
    transform: rotate(45deg);
}
button img:active{
    transform: scale(0.8) rotate(45deg);
}

.presentation{
    font-weight: 700;
    font-size: large;
    width: 700px;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    margin: 10px;
}

.presentation p{
    margin-left: 20px;
}

.presentation-sup{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}
.presentation-sup a{
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0e8d5;
    border-radius: 10px;
    width: 80px;
    height: 25px;
    object-fit: contain;
    text-decoration: none;
    color: #0e131f;
    font-weight: lighter;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    border: 2px solid #ff000028;
    font-size: small;
}
.presentation-sup a img{
    object-fit: contain;
    width: 20px;
}

.presentation-sup p{
    display: flex;
    justify-content: center;
    align-items: center;

}

.presentation-sup p img{
    object-fit: contain;
    width: 20px;
    filter: invert(0.5);
}

.exp{
    display: flex;
    flex-direction: row;
    justify-content: center;
    border-top: 2px solid;
}

.exp div{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-left: 100px;
    padding-right: 100px;
    text-align: center;
}

.date-exp{
    font-family: 'Montserrat', sans-serif;
    font-style: italic;
    font-weight: 700;
    padding: 10px;
    justify-content: center;
    align-items: center;
    display: flex;
}
.projets{
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
}

#Projets{
    margin-top: 60px;
}

.projets div{
    display: flex;
    border: 3px solid;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-left: 50px;
    padding-right: 50px;
    padding-bottom: 15px;
    height: auto;
    width: 400px;
    border-radius: 20px;
    text-align: center;
    overflow: hidden;
}

.hidden-left {
  opacity: 0;
  transform: translateX(-100px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hidden-right {
  opacity: 0;
  transform: translateX(100px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hidden-middle {
  opacity: 0;
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.visible {
  opacity: 1;
  transform: translateX(0);
}

.screen-port{
    width: 100%; 
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.4s ease;
}

.projets div a{
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    justify-content: center;
    align-items: center;
    display: flex;
    text-decoration: none;
    color: inherit;
}

.projets div h2 {
  position: relative;
  display: inline-block;
  padding: 5px;
}

.projets div h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  background-color: currentColor;
  transition: width 0.4s ease-out; 
  height: 100%;
  opacity: 10%;
}

.projets div:hover h2::after {
  width: 100%;
  height: 100%;
}
.projets div:hover .screen-port {
    transform: scale(1.1);
}

/*Outils*/
#Competences{
    margin-top: 60px;
}

.tools-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) ;
    gap: 10px;
    width: 80%;
    max-width: 900px;
    margin: 40px 0;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 1px solid #ffffff20;
    border-radius: 10px;
    background-color: #ffffff05;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    background-color: #ffffff10;
}

.tool-card img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.tool-card h3 {
    margin: 10px 0 0 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: inherit;
}

.contact{
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid;
    border-radius: 20px;
    background-color: #ffffff05;
    padding: 10px;
}

.contact a{
    text-decoration: none;
    color: inherit;
    font-style: italic;
    font-size: large;
}

.contact h2 {
  position: relative;
  display: inline-block;
  padding: 5px;
}

.contact h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  background-color: currentColor;
  transition: width 0.4s ease-out; 
  height: 100%;
  opacity: 10%;
}

.contact:hover h2::after {
  width: 100%;
  height: 100%;
}


form{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 80%;
    max-width: 700px;
    margin: 40px auto;
}

form label{
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-align: center;
}

.lab-message{
    margin: 10px;
    text-align: center;
}

.lab-message textarea{
    resize: none;
}


form input[type="text"],
form textarea {
    width: 100%;
    padding: 12px;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1rem;
    color: inherit;
    background-color: #ffffff0f;
    border: 1px solid;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

form div{
    display: flex;
    flex-direction: row;
    gap: 10px;
}

form input[type="text"]:focus,
form textarea:focus {
    border-color: inherit;
    box-shadow: 0 0 5px #f0e8d5a0;
}

form button[type="submit"] {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: inherit;
    background-color: transparent;
    border: 1px solid;
    border-radius: 10px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}



footer{
    width: 100%;
    height: 100px;
    border-top: 2px solid;
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 50%;
    align-items: center;
}




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

    .page1{
        margin-top: 0;
}
    
    .welcome {
        flex-direction: column;
        text-align: center;
        margin-top: 100px;
    }

    .presentation {
        width: 90%;
        order: 2;
        margin-top: 20px;
    }

    .presentation p {
        margin-left: 0;
    }

    .pdp {
        width: 300px;
        height: 300px;
        order: 1;
    }

    .exp {
        flex-direction: column;
        align-items: center; 
    }

    .exp div {
        padding-left: 30px;
        padding-right: 30px;
    }

    .projets {
        flex-direction: column;
        align-items: center;
        gap: 40px; 
    }

    .projets div {
        width: 80%;
        padding-left: 40px;
        padding-right: 40px;
    }
}


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

    header{
        width: screen;
    }
    
    .toolbar {
        padding: 0;
        gap: 20px; 
        flex-wrap: wrap;
        justify-content: center;
    }

    .pdp {
        width: 200px;
        height: 200px;
    }

    .presentation {
        font-size: medium;
    }

    .presentation-sup{
        gap: 30px;
    }

    .exp div {
        width: 90%;
        padding: 20px 0;
    }

    .projets div {
        width: 90%;
        padding: 20px;
    }

    .toolbar a {
        height: 25px;
        width: 35px;
        font-size: xx-small;
        border: none;   
    }
    #btn-mode {
        width: 35px;
        height: 25px;
        font-size: smaller;
        background-color: transparent;
        border-radius: 10px;
        padding: 0;
    }
    .link-text {
        display: none;
    }

    .link-icon{
        display: block;
        filter: invert(1);
    }

    .toolbar a:hover{
        transform: rotate(5deg);
    }

    .toolbar a:active{
        transform: scale(0.9) rotate(5deg);
    }
    
    form div{
        display: flex;
        flex-direction: column;
        gap: 10px;
}

    .contact h2 {
        font-size: large;
        
}
#fav{
    width: 50px;
    background-color: none;
}

.linkhover::after {
  width: 0;
}

.strava{
    font-size: small;
}

}

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

.strava{
    font-size: xx-small;
}

}

.hidden-left {
  opacity: 0;
  transform: translateX(-100px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hidden-right {
  opacity: 0;
  transform: translateX(100px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.visible {
  opacity: 1;
  transform: translateX(0);
}

.strava{
    justify-content: center;
    align-items: center;
    display: flex;
    gap: 50px;
}

.strava span img{
    filter: invert(0.5);
    width: 30px;
}

.run-container{
    position: relative;
    cursor: help;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.run-container .run-text {
  visibility: hidden;
  opacity: 0;
  background-color: #ffffff0f;
  color: #f0e8d5;
  padding: 10px 15px;
  border-radius: 6px;
  font-size: small;
  justify-content: center;
  align-items: center;
  position: absolute;
  display: flex;
  z-index: 1;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 20px;
  transition: opacity 0.2s ease-in-out;
}
.run-container:hover .run-text {
  visibility: visible;
  opacity: 1;
}