@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

html{
    scroll-behavior: smooth;
    font-size: 62.5%;
}

body{
    width: 100%;
    height: 100vh;
    overflow-x: hidden;
    background-color: black;
    color: white;
}

header{
    margin-top: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 9%;
    background-color: transparent;
    filter: drop-shadow(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo{
    font-size: 3rem;
    color: #b74b4b;
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
}

.logo:hover{
    transform: scale(1.1);
}

nav a{
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active{
    color: #b74b4b;
    border-bottom: 3px solid #b74b4b;
}

@media(max-width:995px){
    nav{
        position: absolute;
        display: none;
        top: 0;
        right: 0;
        width: 40%;
        border-left: 3px solid #b74b4b;
        border-bottom: 3px solid #b74b4b;
        border-bottom-left-radius: 2rem;
        padding: 1rem solid;
        background-color: #161616;
        border-top: 0.1rem solid rgba(0,0,0,0.1);
    }

    nav.active{
        display: block;
    }

    nav a{
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }

    nav a:hover,
    nav a.active{
        padding: 1rem;
        border-radius: 0.5rem;
        border-bottom: 0.5rem solid #b74b4b;
    }
}

section{
    min-height: 100vh;
    padding: 5rem 9% 5rem;
}

.home{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background-color: black;
}

.home .home-content h1{
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}

span{
    color: #b74b4b;
}

.home-content h3{
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.home-content p{
    font-size: 1.6rem;
}

.home-img{
    border-radius: 50%;
}

.home-img img{
    position: relative;
    width: 20vw;
    border-radius: 50%;
    box-shadow: 0 0 25px solid #b74b4b;
    cursor: pointer;
    transition: 0.2s linear;
}

.home-img img:hover{
    font-size: 1.8rem;
    font-weight: 500;
}

.social-icon a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    border: 0.2rem solid #b74b4b;
    font-size: 2rem;
    border-radius: 50%;
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease;
    color: #b74b4b;
}

.social-icon a:hover{
    color: black;
    transform: scale(1.3) translateY(-5px);
    background-color: #b74b4b;
    box-shadow: 0  0 25px #b74b4b;
}

.btn{
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: black;
    border-radius: 4rem;
    font-size: 1.6rem;
    color: #b74b4b;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid #b74b4b;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn:hover{
    transform: scale3d(1.03);
    background-color: #b74b4b;
    color: black;
    box-shadow: 0 0 25px #b74b4b;
}

.typing-text{
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}

.typing-text span{
    position: relative;
}

.typing-text span::after{
    content: "";
    background-color: black;
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid #b74b4b;
    right: -8;
    animation: cursor 0.6s infinite;
}

@keyframes cursor{
    to{
        border-left: 3px solid #b74b4b;
    }
}

@media (max-width: 1000px){
    .home{
        gap: 4rem;
    }
}

@media(max-width:995px){
    .home{
        flex-direction: column;
        margin: 5rem 4rem;
    }

    .home .home-content h3{
        font-size: 2.5rem;
    }

    .home-content h1{
        font-size: 5rem;
    }

    .home-img img{
        width: 70vw;
        margin-top: 4rem;
    }
}

/* ===== NOUVELLE SECTION LOGICIELS AVEC CATÉGORIES ===== */
#Logicielles{
    background-color: black;
    overflow: hidden;
    padding: 8rem 9% 5rem;
}

.section-title{
    font-size: 4.5rem;
    text-align: center;
    margin-bottom: 4rem;
    color: white;
}

/* Conteneur de catégorie */
.category-container{
    max-width: 1000px;
    margin: 0 auto 2rem;
}

/* Bouton de catégorie */
.category-btn{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2.5rem;
    background: linear-gradient(135deg, rgba(183, 75, 75, 0.15) 0%, rgba(183, 75, 75, 0.05) 100%);
    border: 2px solid #b74b4b;
    border-radius: 1rem;
    font-size: 1.8rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.category-btn:hover{
    background: linear-gradient(135deg, rgba(183, 75, 75, 0.25) 0%, rgba(183, 75, 75, 0.15) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(183, 75, 75, 0.3);
}

.category-btn.active{
    background: linear-gradient(135deg, rgba(183, 75, 75, 0.3) 0%, rgba(183, 75, 75, 0.2) 100%);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.category-btn i:first-child{
    font-size: 2rem;
    color: #b74b4b;
    margin-right: 1.2rem;
}

.category-btn span{
    flex: 1;
    text-align: left;
    color: white;
}

.category-btn .arrow{
    font-size: 1.6rem;
    color: #b74b4b;
    transition: transform 0.4s ease;
    margin-right: 0;
}

/* Grille de logiciels */
.logiciels-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2.5rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(183, 75, 75, 0.05) 0%, rgba(183, 75, 75, 0.02) 100%);
    border: 2px solid #b74b4b;
    border-top: none;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.5s ease;
}

.logiciels-grid.active{
    max-height: 1000px;
    opacity: 1;
    margin-bottom: 0;
}

.logiciel-card{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.logiciel-card:hover{
    transform: scale(1.1);
    z-index: 10;
}

.logiciel-card img{
    width: 9rem;
    height: 9rem;
    object-fit: contain;
    padding: 1.2rem;
    border-radius: 50%;
    background-color: rgba(168, 37, 37, 0.4);
    border: 2px solid #b74b4b;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logiciel-card:hover img{
    background-color: #b74b4b;
    box-shadow: 0 0 25px #b74b4b, 0 0 40px rgba(183, 75, 75, 0.4);
    border-width: 3px;
}

.logiciel-card p{
    font-size: 1.4rem;
    color: white;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.logiciel-card:hover p{
    color: #b74b4b;
    font-weight: 600;
    transform: scale(1.05);
}

/* Responsive pour les catégories */
@media(max-width: 1200px){
    .category-btn{
        padding: 1.4rem 2.2rem;
        font-size: 1.7rem;
    }
    
    .logiciels-grid{
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 2.2rem;
        padding: 2.2rem;
    }
}

@media(max-width: 768px){
    .category-btn{
        padding: 1.2rem 1.8rem;
        font-size: 1.6rem;
    }
    
    .category-btn i:first-child{
        font-size: 1.8rem;
        margin-right: 1rem;
    }
    
    .logiciels-grid{
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 2rem;
        padding: 2rem;
    }
    
    .logiciel-card img{
        width: 8rem;
        height: 8rem;
    }
    
    .logiciel-card p{
        font-size: 1.3rem;
    }
}

@media(max-width: 480px){
    .category-btn{
        padding: 1rem 1.5rem;
        font-size: 1.5rem;
    }
    
    .logiciels-grid{
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .logiciel-card img{
        width: 7rem;
        height: 7rem;
    }
}

/* Section Education et Experience */
.Education, #Experience{
    background-color: black;
}

.timeline{
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.timeline::after{
    content: '';
    position: absolute;
    width: 3px;
    background-color: #b74b4b;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-object{
    padding: 2rem 4rem;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-object::after{
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: black;
    border: 3px solid #b74b4b;
    top: 2.5rem;
    border-radius: 50%;
    z-index: 1;
}

.timeline-object:nth-child(odd){
    left: 0;
}

.timeline-object:nth-child(even){
    left: 50%;
}

.timeline-object:nth-child(even)::after{
    left: -10px;
}

.timeline-content{
    padding: 2rem 3rem;
    background-color: rgba(183, 75, 75, 0.1);
    border: 2px solid #b74b4b;
    border-radius: 1rem;
    position: relative;
}

.timeline-content h3{
    font-size: 2rem;
    color: white;
    margin-bottom: 1rem;
}

.timeline-content span{
    font-size: 1.4rem;
    color: #b74b4b;
    font-weight: 500;
}

.timeline-object.complete .timeline-content{
    background-color: rgba(183, 75, 75, 0.2);
}

.timeline-object.complete::after{
    background-color: #b74b4b;
}

@media(max-width: 995px){
    .timeline::after{
        left: 31px;
    }

    .timeline-object{
        width: 100%;
        padding-left: 7rem;
        padding-right: 2rem;
    }

    .timeline-object::after{
        left: 21px;
    }

    .timeline-object:nth-child(even){
        left: 0%;
    }
}

/* ===== SECTION PROJETS ===== */
#Projets {
    background-color: black;
    padding: 8rem 9%;
}

.projets-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 0;
}

.projet-card {
    background-color: #1a1a1a;
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    width: 30rem;
}

.projet-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(183, 75, 75, 0.6);
}

.projet-image {
    width: 100%;
    height: 25vh;
    min-height: 15rem;
    overflow: hidden;
    position: relative;
}

.projet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.projet-card:hover .projet-image img {
    transform: scale(1.1);
}

.projet-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.projet-card:hover .projet-image::after {
    opacity: 1;
}

.projet-content {
    background: linear-gradient(135deg, #8b1e3f 0%, #b74b4b 100%);
    padding: 2em 1.5em;
    position: relative;
}

.projet-content h3 {
    font-size: 1.6em;
    color: white;
    font-weight: 700;
    margin-bottom: 0.6em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.projet-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: 1em;
}

.tag {
    padding: 0.4em 0.8em;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2em;
    font-size: 0.85em;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.projet-content .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.8em 1.5em;
    background-color: rgba(255, 255, 255, 0.9);
    color: #8b1e3f;
    border-radius: 0.6em;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.projet-content .btn:hover {
    background-color: white;
    transform: translateX(0.5rem);
    box-shadow: 0 0.5rem 1.5rem rgba(255, 255, 255, 0.3);
}

.projet-content .btn i {
    transition: transform 0.3s ease;
}

.projet-content .btn:hover i {
    transform: translateX(0.5rem);
}

@media(max-width: 768px) {
    #Projets {
        padding: 5rem 4%;
    }

    .projet-card {
        max-width: 90vw;
        min-width: unset;
    }

    .projet-image {
        height: 30vh;
        min-height: 18rem;
    }

    .projet-content h3 {
        font-size: 1.8em;
    }
}

@media(max-width: 480px) {
    .projet-card {
        max-width: 95vw;
    }

    .projet-image {
        height: 25vh;
        min-height: 15rem;
    }

    .projet-content h3 {
        font-size: 1.5em;
    }

    .tag {
        font-size: 0.8em;
        padding: 0.3em 0.7em;
    }
}