/* Style global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    font-weight: 300;
    background-color: #360d36;
    height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    display: flex;
    width: 100vw;
    height: 100vh;
}


/* Styles des rectangles */
.rectangle {
    flex: 2; /* Rectangle inactif par défaut */
    height: 100%; /* Hauteur par défaut pour le format web */
    background-color: #e49ce7;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: flex 0.5s ease, background-color 0.3s ease;
    border-radius: 75px;
    overflow: hidden; /* Masquer le contenu qui dépasse */
}

.rectangle.active {
    flex: 20; /* Rectangle actif occupe plus d'espace horizontalement */
    background-color: #89bb9f;
}

.rectangle.inactive {
    flex: 1; /* Rectangle inactif est plus petit */
    cursor: pointer;
}

.rectangle.active .title {
    display: none; /* Masque le titre sur le rectangle actif */
}


.title {
    writing-mode: vertical-rl; /* Vertical pour desktop */
    transform: rotate(180deg); /* Inverser le texte */
    font-size: 1rem; /* Taille de la police pour le titre */
}


#home {
    background-color:#f3f3ea;
    color:#542254;
}

#home-text {
    display: none; /* Masquer le contenu par défaut */
    text-align: left;;
}

.rectangle.active #home-text {
    display: block; /* Affiche le contenu quand le rectangle est actif */
}

#home-text h1 {
    font-size:4.6rem;
}

#home-text .slogan {
    font-size:1.3rem;
    font-weight: lighter;
}

#home-text .welcome {
    font-size:2rem;
    font-weight:400;
    margin-top:15px;
}

.language-switcher {
   position: absolute;
   top: 10px;
   left: 40px;


}

.language-switcher button {
    border: none;
    background-color:#f3f3ea00;
    color:#e49ce7 ;
    text-decoration-line: underline;
    padding: 5px;
    margin: 2px;
    font-size: 0.7rem;
    cursor: pointer;
}

.language-switcher button:hover {
    color: #542254;
}


#about {
    background-color: #e49ce7;
    color:white;
}

#about-text {
    display: none;
    padding:40px;
}

.rectangle.active #about-text {
    display: block; /* Affiche le contenu quand le rectangle est actif */
}

#about-text h1 {
    margin-bottom:15px;
}

#about-text .aboutme {
    font-size:1.1rem;
    line-height:auto;
    padding-bottom:15px;
    border-bottom:1.2px solid white;
    text-align: justify;
    padding-right: 15px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 colonnes de taille égale */
    gap: 20px; /* Espacement entre les éléments */
    margin-top: 20px; /* Espace au-dessus de la grille */
}


.grid-item h2 {
    font-size: 1.5rem; /* Taille du titre */
    font-weight: 600;
    margin-bottom:5px;
}

.grid-item p {
    font-size: 0.9rem; /* Taille du texte */
    line-height: 1.4rem;
    
}


#works {
    background-color: #89bb9f;
}

#debug-works {
    display:none;
    height:100%;
    width:100%;
}

.rectangle.active #debug-works {
    display: grid; /* Affiche le contenu quand le rectangle est actif */
}

.grid-works {
    display:grid;
    grid-template-columns: repeat(4, 1fr); /* 4 colonnes de largeur égale */
    gap: 10px; /* Espacement constant entre les cellules */
    width: calc(100% - 50px); /* Marges latérales */
    height: calc(100% - 50px); /* Hauteur de la grille */
    margin: 25px; /* Marges autour de la grille */
}

.works-item {
    height:100%;
    padding:15px;
    background-color: #542254; /* Couleur par défaut */
    color: white; /* Couleur du texte */
    display: flex;
    justify-content: right;
    align-items:last baseline;
    text-align: right;
    font-size: 1.2rem; /* Taille du texte */
    border-radius: 25px;
    transition: all 0.3s ease; /* Pour un effet fluide lors de l'animation */
    cursor: pointer; /* Change le curseur en pointeur */
    
}

#tasca {
    display:none;
}

.rectangle.active #ta {
    display:block;
}

.project-detail {
    display:none;
    padding: 50px; /* Ajouter un peu de padding */
    max-height:calc(80vh + 120px); /* Hauteur maximale de la div */
    overflow-y: auto; /* Active le défilement vertical */
}

.rectangle.active .project-detail {
    display: block; /* Affiche le contenu quand le rectangle est actif */
}

.header {
    display: flex; /* Utiliser flexbox pour aligner le contenu */
    justify-content: space-between; /* Espacement entre les éléments */
    align-items: center; /* Centrer verticalement */
}


.project-detail h2 {
    font-family: Arial;
    font-size: 3rem;
    text-align: left;
    font-weight: 400;
}

.project-detail h3 {
    font-family: Arial;
    font-size: 1.6rem;
    text-align: left;
    margin-bottom:20px;
    font-weight: 400;
}

.project-detail p {
    text-align: justify;
}

.img-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 4 colonnes de largeur égale */
    margin-bottom:15px;
    grid-gap: 2px;
}


.project-detail img {
    min-height: 100%;
    min-width: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    height: auto;
    margin-bottom:25px;
    border-radius:20px;

}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.lightbox img {
    max-width: 90%;
    max-height: 80vh;
}
.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}
.prev, .next {
    position: absolute;
    top: 50%;
    font-size: 2rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}
.prev { left: 20px; }
.next { right: 20px; }

#back-button {
    border:none;
    background-color: transparent;
    font-size:2rem;
    text-decoration: none;
    color:#255132;
    cursor: pointer; /* Change le curseur en pointeur */
}

#projet1 {
    background-color: #542254;
    color:#e29ae5;
}

    /* SI TU VEUX GERER TES STYLES PROJETS PAS PROJET TU PEUX UTILISER CA */
    .details-projet1 {
       background-color: none;
    }

#projet2 {
    background-color: #f3f3ea;
    color:#8abb9f;
}

#projet3 {
    background-color: #e29ae5;
    color:#542254;
}

#projet4 {
    background-color: #255132;
    color:#f3f3ea;
}

#projet5 {
    background-color: #a54bdd;
    color:#e29ae5;
}

#projet6 {
    background-color: #542254;
    color:#e29ae5;
}

#projet7 {
    background-color: #f3f3ea;
    color:#8abb9f;
}

#projet8 {
    background-color: #e29ae5;
    color:#542254;
}

#projet9 {
    background-color: #255132;
    color:#f3f3ea;
}

#projet10 {
    background-color: #a54bdd;
    color:#542254;
}


#projet11 {
    background-color: #542254;
    color:#e29ae5;
}

#projet12 {
    background-color: #f3f3ea;
    color:#8abb9f;
}

#projet13 {
    background-color: #255132;
    color:#8abb9f;
}

#projet14 {
    background-color: #a54bdd;
    color:#522152;
}

#projet15 {
    background-color: #e29ae5;
    color:#542254;
}

#projet16 {
    background-color: #a54bdd;
    color:#522152;
}

#experience {
    background-color: #255132;
}


#experience-text {
    display: none; /* Masquer le contenu par défaut */
    text-align: left;
    padding:30px;
    max-height:calc(100vh- 60px);
}

.rectangle.active #experience-text {
    display: block; /* Affiche le contenu quand le rectangle est actif */
}

#experience-text h2 {
    font-size: 1.5rem; /* Taille du titre */
    font-weight: 600;
    margin-bottom:25px;
}

#experience-text ul {
    font-size: 0.9rem; /* Taille du titre */
    font-weight: lighter;
    margin-left:25px;
    margin-bottom:25px;
    text-align: justify;

}

#experience-text li {
    margin-bottom:25px;
}

#experience-text p {
    margin-left:25px;
    font-size: 0.9rem; /* Taille du titre */
    line-height:1.3rem;
    text-align: justify !important;
}


#contact {
    background-color: #a54bdd;
}

#experience {
    background-color: #255132;
}


#contact-text {
    display: none; /* Masquer le contenu par défaut */
    text-align: left;
    padding:30px;
}

.rectangle.active #contact-text {
    display: block; /* Affiche le contenu quand le rectangle est actif */
}

#contact-text h1 {
    font-size: 1.8rem; /* Taille du titre */
    font-weight: 600;
    margin-bottom:25px;
}

#contact-text p {
    font-size: 1rem; /* Taille du titre */
    font-weight: lighter;
}

#contact-text .contactme {
    margin-top:25px;
    font-size:1.2rem;
}

#contact-text a:link {
   color: #360d36
}

#contact-text a:visited {
    color: #360d36
 }


/* Version mobile (max-width 767px) */
@media (max-width: 767px) {

    .title {
        writing-mode: initial; /* Horizontal pour mobile */
        transform: rotate(0deg); /* Pas de rotation pour mobile */
        font-size: 1rem; /* Taille de la police pour le titre */
    }

    .container {
        flex-direction: column; /* Empilement vertical */
    }

    .rectangle {
        border-radius: 25px;
        width: 100%; /* Les rectangles prennent toute la largeur */
        height: 5vh; /* Hauteur par défaut pour les inactifs */
    }

    .rectangle.active {
        flex: 10; /* Rectangle actif occupe plus d'espace horizontalement */
        height: 80vh; /* Le rectangle actif prend 80% de la hauteur */
    }

    #home-text {
        padding:30px;
    }

    #home-text h1 {
        font-size:2.5rem;
    }

    #home-text .slogan {
        font-size:1.2rem;
        font-weight: lighter;
    }

    #home-text .welcome {
        font-size:1.2rem;
        font-weight:400;
    }

    #about {
        overflow-y: hidden;
    }

    #about-text {
        overflow-y: auto;
        max-height:calc(80vh - 60px);
        display: none;
        padding:30px;
    }

    #about-text h1 {
        margin-bottom:15px;
    }

    #about-text .aboutme {

    }

    .about-grid {
        grid-template-columns: repeat(2, 1fr); /* Une seule colonne */
        gap: 15px; /* Réduit l'espacement entre les items */
    }

    .grid-item {
    }

    .grid-item h2 {
        font-size: 1.rem; /* Taille réduite du titre */
    }

    .grid-item p {
        font-size: 0.8rem; /* Taille réduite du texte */
    }


    .grid-works {
        grid-template-columns: repeat(2, 1fr); /* Passe à 2 colonnes */
        grid-template-rows: auto; /* Lignes auto-ajustées */
        gap: 5px; /* Espacement constant entre les cellules */
        width: calc(100% - 30px); /* Marges latérales */
        height: calc(100% - 30px); /* Hauteur de la grille */
        margin: 15px; /* Marges autour de la grille */
    }

    .project-detail {
        max-height:calc(80vh - 60px); /* Hauteur maximale de la div (80% de la hauteur de la fenêtre) */
    }

    .project-detail {
        display:none;
        padding: 15px; /* Ajouter un peu de padding */
        max-height:calc(80vh + 120px); /* Hauteur maximale de la div */
        overflow-y: auto; /* Active le défilement vertical */
    }

    #experience {
        overflow-y: hidden;
    }

    #experience-text {
        overflow-y: auto;
        max-height:calc(80vh - 60px);
        display: none;
        padding:30px;
    }

    #experience-text ul {
        text-align: left;
    
    }
    
    #experience-text p {
        text-align: left;
    }

}

/* Version ordinateur */
@media (min-width: 768px) {
    .rectangle.inactive {
        flex: 2; /* Rectangle inactif est plus petit */
    }
    #about-text,
    #experience-text {
        overflow-y: auto; /* Active le défilement vertical si le contenu dépasse */
        max-height: calc(100vh - 60px); /* Limite la hauteur pour éviter les débordements */
        padding-right: 15px; /* Ajoute un peu d'espace pour éviter le chevauchement avec la scrollbar */
    }

}

        /* Changer la couleur du lien */
        a {
            color:#e49ce7; /* Couleur bleue */
            text-decoration: none; /* Enlever le soulignement du lien */
        }

        /* Changer la couleur du lien quand il est survolé */
        a:hover {
            color: #89bb9f; /* Couleur rouge lors du survol */
        }