@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');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: "Poppins", sans-serif;
    /* Pour empécher la sélection de texte */
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Standard */
}

/* Permettre la sélection de texte dans les champs de formulaire et les zones de texte */
input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Permettre la sélection de texte dans les liens */
a {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
/* Fin de gestion de la sélection de texte */

:root{
    --bg-color: #ffffff;
    --second-bg-color: #f8f8f8;
    --text-color: #171717;
    --second-text-color: #ffffff;
    --shadow-color: #5f5f5f;
    --main-color: #1796BF;
    --link-color: #1755bf;
    --secondary-color: #083240;
    
}

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

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

.header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 4rem 12% 4rem;
    background: var(--bg-color);
    box-shadow: 0 0 20px var(--shadow-color);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
}

.education a {
    color: var(--main-color);
    text-decoration: none;
}

.education a:hover{
    text-decoration: underline;
}

.education a:visited {
    color: var(--link-color);
}

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

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

/*.logo span{
    text-shadow: 0 0 25px var(--shadow-color);
}*/

.navbar a{
    font-size: 1.8rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

.navbar a:hover,
.navbar a.active{
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}

#menu-icon{
    font-size: 3.6rem;
    display: none;
    color: var(--secondary-color);
}

section{
    min-height: min-content;
    padding: 10rem 12% 10rem;
}

.home{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15rem;
    padding-top: 15vh;
    padding-bottom: 15vh;
}

.home-content{
    display: flex;
    flex-direction: column;
    align-items: baseline;
    text-align: left;
    justify-content: center;
    margin-top: 3rem;
}

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

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

.home-content h3{
    margin-bottom: 2rem;
    margin-top: 1rem;
    font-size: 3rem;
}

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

.home-img {
    position: relative;
    top: 3rem;
    width: 32vw;
}

.home-img .home-blob{
    position: relative;
    top: 3rem;
    width: 32vw;
    transition: 0.4s ease-in-out;
}

.home-blob-img {
  width: 500px;
}

.home-blob {
    fill: var(--main-color)
}


/*.home-img{
    border-radius: 50%;
}

.home-img img{
    position: relative;
    top: 3rem;
    width: 32vw;
    border-radius: 50%;
    border: 5px solid var(--main-color);
    cursor: pointer;
    transition: 0.4s ease-in-out;
}

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

.home-content p{
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.8;
    max-width: 1000px;
}

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

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

.social-icons a:hover img {
    filter: brightness(0) invert(1);
}

.btn{
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--secondary-color);
    /*box-shadow: 0 0 25px var(--shadow-color);*/
    border-radius: 4rem;
    font-size: 1.6rem;
    color: var(--second-text-color);
    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);
}

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

.btn-group .btn-contact{
    background-color: var(--second-bg-color);
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    box-shadow: 0 0 25px transparent;
}

.btn-group .btn-contact:hover{
    background-color: var(--secondary-color);
    color: var(--second-text-color);
}

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

.presentation p{
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1.4;
}

/* ANIMATION du texte */
.text-animation{
    font-size: 3.4rem;
    font-weight: 600;
    min-width: 28rem;
}

.text-animation span{
    position: relative;
}

.text-animation span::before{
    content: "Web Developer";
    color: var(--main-color);
    animation: words 20s infinite;
}

.text-animation span::after{
    content: "";
    background-color: var(--bg-color);
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid var(--bg-color);
    right: -8px;
    animation: cursor 0.6s infinite, typing 20s steps(14) infinite;
}
@keyframes cursor{
    to{
        border-left: 2px solid var(--main-color);
    }
}

@keyframes words{
    to{
        border-left: 2px solid var(--main-color);
    }
}
@keyframes words{
    0%,
    20%{
        content: "la robotique";
    }
    21%,
    40%{
        content: "l'informatique";
    }
    41%,
    60%{
        content: "l'électronique";
    }
    61%,
    80%{
        content: "la musique";
    }
    81%,
    100%{
        content: "la photographie";
    }
}@keyframes typing{
    10%,
    15%,
    30%,
    35%,
    50%,
    55%,
    70%,
    75%,
    90%,
    95%{
        width: 0;
    }
    5%,
    20%,
    25%,
    40%,
    45%,
    60%,
    65%,
    80%,
    85%{
        width: calc(100% + 8px);
    }
}

/* Time line */
.heading{
    font-size: 8rem;
    text-align: center;
    margin: 5rem 0;
}
.education{
    padding: 100px 15px;
    background: var(--second-bg-color);
}
.education h2{
    margin-bottom: 5rem;
}
.timeline-items{
    display: flex;
    margin: auto;
    max-width: 1200px;
    flex-wrap: wrap;
    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;
    width: 100%;
    position: relative;
}
.timeline-item:last-child{
    margin-bottom: 0;
}
.timeline-item:nth-child(odd){
    padding-right: calc(50% + 30px);
    text-align: right;
}
.timeline-item:nth-child(even){
    padding-left: calc(50% + 30px);
}
.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: 2rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0.6rem 0 1.5rem;
}
.timeline-content{
    background-color: var(--bg-color);
    border: 3px solid var(--main-color);
    padding: 30px 50px;
    border-radius: 3rem;
    /*box-shadow: 0 0 10px var(--shadow-color);*/
    cursor: pointer;
    transition: 0.3s ease-in-out;
}
.timeline-content:hover{
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--shadow-color);
}
.timeline-content h3{
    font-size: 2rem;
    color: var(--text-color);
    margin: 0 0 1rem;
    font-weight: 500;
}
.timeline-content p{
    color: var(--text-color);
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1.4;
}
/* Scroll bar*/
/*::-webkit-scrollbar{
    width: 15px;
}
::-webkit-scrollbar-thumb{
    background-color: var(--main-color);
}
::-webkit-scrollbar-track{
    background-color: var(--bg-color);
    width: 50px;
}*/

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.btn-group a:first-child {
    animation: pulse 2s ease-in-out infinite;
}

.btn-group a:first-child:hover {
    animation: none;
    transform: scale(1.05);
}

/* Service */
.services {
    background: var(--bg-color);
    color: var(--text-color);
}
.services h2 {
    margin-bottom: 5rem;
    color: var(--text-color);
}
.services-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    gap: 2.5rem;
}
.service-box {
    background-color: var(--second-bg-color);
    height: 400px;
    border-radius: 3rem;
    border: 3px solid var(--main-color);
    cursor: pointer;
    transition: 0.4s ease-in-out;
    overflow: hidden;
}


.service-box p {
    overflow: hidden;
}

.service-info {
    height: 100%;
}

.service-info-details {
    display: none;
    position: fixed;
    z-index: 10;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}
.service-details-mask {
    opacity: 60%;
    background: black;
    width: 100%;
    height: 100%;
    position: fixed;
}
.service-info-details-content {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    border: 3px solid var(--main-color);
    background: var(--second-bg-color);
    padding: 2rem;
    position: fixed;
    border-radius: 3rem;
    top: 10rem;
    bottom: 10rem;
    left: 10rem;
    right: 10rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.service-info-details-content::-webkit-scrollbar {
    width: 12px;
}

.service-info-details-content::-webkit-scrollbar-track {
    background: var(--second-bg-color);
    border-radius: 6px;
    margin: 0.5rem;
}

.service-info-details-content::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 6px;
    border: 3px solid var(--second-bg-color);
}

.service-info-details-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.service-info-details-content h4 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.service-info-details-content .content-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.service-info-details-content .text-content {
    flex: 1;
}

.service-info-details-content .main-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.service-info-details-content .main-image img,
.service-info-details-content .main-image video {
    max-height: 500px;
    min-width: 200px;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 2rem;
}

.service-info-details-content .main-image img {
    padding: 1rem;
}

.service-info-details-content .main-image video {
    background-color: #000;
}

.service-info-details-content .main-image video::-webkit-media-controls {
    border-radius: 2rem;
}

.service-info-details-content .main-image video::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.5);
}

.service-info-details-content p {
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.service-info-details-content .image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    width: 100%;
    justify-content: center;
}

.service-info-details-content .image-gallery img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 1rem;
    transition: transform 0.3s ease;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.service-info-details-content .image-gallery img:hover {
    transform: scale(1.05);
    z-index: 1;
}

.service-info-details-content a {
    color: var(--main-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.service-info-details-content a:hover {
    color: var(--secondary-color);
}

.service-info-details.active .service-info-details-content {
    animation: fadeIn 0.4s forwards;
}

.service-info-details:not(.active) .service-info-details-content {
    animation: fadeOut 0.2s forwards;
}

.service-box .service-info {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
}

.service-info{
    padding-bottom: 1rem;

}
.service-info h4, .service-info-details-content h4 {
    padding: 1rem 1rem;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}
.service-info p{
    font-size: 1.6rem;
    font-weight: 300;
    max-height: 12.5rem;
    line-height: 1.7;
    padding: 1rem;
    margin: 0 auto;
    overflow: hidden;
    text-overflow: hidden;
}

.service-illustration {
    width: 100%;
    object-fit: cover;
    border-bottom-right-radius: 100% 40%;
    border-top-right-radius: calc(3rem - 0.5rem);
    border-top-left-radius: calc(3rem - 0.5rem);
    height: 200px;
}



/* Contact */
.contact{
    background-color: var(--second-bg-color);
}
.contact h2{
    margin-bottom: 3rem;
    color: var(--text-color);
}
.contact form{
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 5rem auto;
    text-align: center;
}
.contact form .input-box{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.contact form .input-box input,
.contact form textarea{
    width: 100%;
    padding: 2.5rem;
    font-size: 1.8rem;
    color: var(--text-color);
    background: var(--bg-color);
    border-radius: 2rem;
    border: 2px solid var(--main-color);
    margin: 1.5rem 0;
    resize: none;
}
.contact form .btn{
    margin-top: 2rem;
}

/* Footer */
.footer{
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 40px 0;
    background-color: var(--bg-color);
}
.footer .social{
    text-align: center;
    padding-bottom: 25px;
    color: var(--main-color);
}
.footer .social a{
    font-size: 25px;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    width: 42px;
    height: 42px;
    line-height: 42px;
    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(--secondary-color);
    box-shadow: 0 0 25px var(--secondary-color);
}

.footer .social a:hover img {
    filter: brightness(0) invert(1);
}

.footer ul{
    margin-top: 0;
    padding: 0;
    font-size: 1.8rem;
    line-height: 1.6;
    margin-bottom: 0;
    text-align: center;
}
.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 ul li{
    display: inline-block;
    padding: 0 15px;
}
.footer .copyright{
    margin-top: 5rem;
    text-align: center;
    font-size: 1.6rem;
}

@media(max-width:1200px){
    html{
        font-size: 55%;
    }
    .services-container{
        padding-bottom: 7rem;
        grid-template-columns: repeat(2,1fr);
        margin: 0 5rem;
    }
}
@media(max-width:991px){
    header{
        padding: 2rem 3%;
    }
    section{
        padding: 10rem 3% 2rem;
    }
    .timeline-items::before{
        left: 7px;
    }
    .timeline-item:nth-child(odd){
        padding-right: 0;
        text-align: left;
    }
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even){
        padding-left: 37px;
    }
    .timeline-dot{
        left: 0;
    }
    .services{
        padding-bottom: 7rem;
    }
    .contact form{
        flex-direction: column;
    }
    .footer{
        padding: 2rem 3%;
    }
}
@media(max-width:940px){
    #menu-icon{
        display: block;
    }
    .navbar{
        position: absolute;
        top: 100%;
        right: 0;
        width: 50%;
        padding: 1rem 3%;
        background: 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;
    }
    .navbar.active{
        display: block;
    }
    .navbar a{
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        color: var(--text-color);
    }
    .home{
        flex-direction: column-reverse;
        margin: 5rem 4rem;
    }
    .home-content h3{
        font-size: 2.6rem;
    }
    .home-content h1{
        font-size: 8rem;
        margin-top: 1rem;
    }
    .home-content p{
        max-width: 600px;
        margin: 0 auto;
    }
    .home-img img{
        width: 50vw;
    }
    .services h2{
        margin-bottom: 3rem;
    }
    .services-container{
        grid-template-columns: repeat(1,1fr);
    }
}

@media(max-width: 768px) {
    .heading {
        font-size: 5rem;
        margin: 3rem 0;
    }

    .home-content h1 {
        font-size: 6rem;
    }

    .service-info-details-content {
        top: 5rem;
        bottom: 5rem;
        left: 2rem;
        right: 2rem;
        padding: 1.5rem;
    }

    .service-info-details-content .content-wrapper {
        flex-direction: column;
    }

    .service-info-details-content h4 {
        font-size: 2rem;
    }

    .service-info-details-content p {
        font-size: 1.4rem;
    }

    .service-info-details-content .image-gallery {
        gap: 0.8rem;
    }

    .service-info-details-content .image-gallery img {
        max-height: 200px;
    }
}

.competences {
    background: var(--bg-color);
    padding: 10rem 12% 10rem;
}

.competences h2 {
    margin-bottom: 3rem;
    color: var(--text-color);
}

.competences > p {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 5rem;
    color: var(--text-color);
}

.competences-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    padding: 0 2rem;
}

.competence-box:first-child {
    grid-column: 1;
    grid-row: 1 / span 3;
}

.competence-box:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.competence-box:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

.competence-box:nth-child(4) {
    grid-column: 3;
    grid-row: 1 / span 2;
}

.competence-box {
    background: var(--second-bg-color);
    border-radius: 3rem;
    padding: 3rem;
    text-align: center;
    border: 3px solid var(--main-color);
    transition: 0.3s ease;
}

.competence-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px var(--shadow-color);
}

.competence-box i {
    font-size: 5rem;
    color: var(--main-color);
    margin-bottom: 2rem;
}

.competence-box h3 {
    font-size: 2.4rem;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.competence-box ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.competence-box ul li {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.competence-box ul li img {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
}

.competence-box ul li.category {
    font-weight: 600;
    color: var(--main-color);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    padding-left: 0;
    font-size: 1.8rem;
}

.competence-box ul li.category::before {
    content: none;
}

.competence-box ul li::before {
    content: "•";
    color: var(--main-color);
    position: absolute;
    left: 0;
    font-size: 2rem;
}

@media(max-width: 1200px) {
    .competences {
        padding: 10rem 5% 10rem;
    }
    
    .competences-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        padding: 0 1rem;
    }

    .competence-box:first-child {
        grid-column: 1;
        grid-row: 1;
    }

    .competence-box:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }

    .competence-box:nth-child(3) {
        grid-column: 1;
        grid-row: 2;
    }

    .competence-box:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
    }
}

@media(max-width: 768px) {
    .competences {
        padding: 10rem 3% 10rem;
    }
    
    .competences-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .competence-box {
        padding: 2rem;
    }
    
    .competence-box h3 {
        font-size: 2rem;
    }
    
    .competence-box ul li {
        font-size: 1.4rem;
    }

    /* Réinitialiser les positions de grille pour mobile */
    .competence-box:first-child,
    .competence-box:nth-child(2),
    .competence-box:nth-child(3),
    .competence-box:nth-child(4) {
        grid-column: 1;
        grid-row: auto;
    }
}