/* Définition des variables */
:root {
    --color-white: #ffffff;
    --color-black: #0e0e0e;
    --color-grey-light: #cccccc;
    --color-grey-hover: #959595;
    --color-shadow: rgba(0, 0, 0, 0.1);
}

/* Réinitialisation de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Noto Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    font-variation-settings:"wdth" 100;
    background-color: var(--color-shadow);
}



/* Header styling */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-white);
    padding: 15px 30px;
    box-shadow: 0 2px 5px var(--color-shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

/* Logo */
.logo img {
    height: 60px;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--color-black);
    font-weight: bold;
    transition: color 0.3s ease;
    padding : 8px 15px;
}

nav a:hover {
    color: var(--color-white);
    background-color: var(--color-black);
    border-radius: 25px;
}

@media (max-width: 900px) {
    nav ul {
        gap: 8px;
        flex-direction: column;
        align-items: center;
    }

    nav a {
        padding: 6px 12px;
    }
}



/* HERO SECTION */
.hero {
    background-color: var(--color-black);
    color: var(--color-white);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    overflow: hidden;
}

#star-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none; /* pour ne pas bloquer l'interaction */
}

.hero-content {
    position: relative;
    z-index: 1; /* au-dessus des étoiles */
    color: var(--color-white);
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.hero-content p {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-grey-light);
}

#dynamic-text {
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-block;
}

#dynamic-text.selected {
    background-color: white;
    color: black;
    padding: 0 7px;
    border-radius: 8px;
}


#main-star-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

main {
    position: relative;
    z-index: 1;
}


main section {
    position: relative;
    z-index: 2;
}



/* Section À propos */
.about {
    padding: 40px 30px;
    background-color: var(--color-white);
    max-width: 1300px; /* augmenté depuis 1100px */
    margin-inline:auto; /* centré horizontalement */
    margin-block: 150px; /* marge en haut et en bas */
    border: 1px solid var(--color-grey-light);
    box-shadow: 0 8px 20px var(--color-shadow);
    border-radius: 12px;
}

.about-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-around;
    gap: 20px;
}


/* Photo à gauche */
.about-photo {
    flex-shrink: 0;
    order: 1;
}

.about-photo img {
    width: 320px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--color-shadow);
    object-fit: cover;
    filter: grayscale(75%);
}

.about-photo img:hover{
    filter: grayscale(0%);
    transition: filter 0.5s ease;
}

.about-text {
    max-width: 600px;
    order: 2;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--color-black);
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--color-black);
}
.about-text .highlight {
    color: var(--color-primary);
    font-weight: 800;
    position: relative;
}

.highlight::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    opacity: 0.4;
}



.about-text h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--color-black);
}

.tools-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    margin-top: 10px;
}

.tools-icons img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
    cursor: default;
}

.tools-icons img:hover {
    transform: scale(1.1);
}

.language {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.language > span:first-child {
    flex-shrink: 0;
    width: 90px; /* largeur fixe pour noms de langues */
    font-weight: 600;
    color: var(--color-black);
}

.progress-bar {
    flex-grow: 1;
    background-color: var(--color-grey-light);
    border-radius: 12px;
    height: 14px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
}

.progress {
    height: 100%;
    background-color: var(--color-black);
    border-radius: 12px 0 0 12px;
    transition: width 1s ease-in-out;
}

.progress-percent {
    flex-shrink: 0;
    width: 35px; /* espace pour afficher % */
    font-weight: 600;
    color: var(--color-black);
    text-align: right;
    user-select: none;
}




/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .about-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    /* Photo disparait sur mobile */
    .about-photo img {
        width: 200px;
    }

    /* Texte prend toute la largeur avec marge gauche/droite */
    .about-text {
        max-width: 100%;
        order: 0;
        text-align: center;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }
    .about-text h2 {
        font-size: 2rem;
    }
    .tools-icons {
        justify-content: center;
    }
}

@media (max-width: 1024px) {
    .about {
        padding: 40px 20px;
        margin: 60px 20px;
    }

    .about-container {
        flex-direction: column;
        gap: 30px;
    }

    .about-photo {
        order: 1;
    }

    .about-text {
        order: 2;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tools-icons img {
        height: 30px;
    }
}





/* Section projets */
.projects {
    max-width: 1200px; /* un peu plus large */
    margin-inline:auto;
    margin-block: 150px;
    padding: 0 20px;
    text-align: center; /* centrer le contenu textuel */
}

.projects h2 {
    margin-bottom: 30px;
    font-size: 2.5rem;
    color: var(--color-black);
}

.filter-buttons {
    margin-bottom: 30px;
}

.filter-buttons button {
    background-color: var(--color-grey-light);
    border: none;
    padding: 10px 20px;
    margin: 10px 8px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: var(--color-black);
}

.filter-buttons button.active,
.filter-buttons button:hover {
    background-color: var(--color-black);
    color: var(--color-white);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px; /* Espace entre les items augmenté */
    width: 100%;
    margin: 0 auto;
    align-items: start; /* Alignement en haut */
}

.gallery-item {
    background-color: var(--color-white);
    box-shadow: 0 5px 15px var(--color-shadow);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: auto; /* Affichage naturel sans crop */
    display: block;
}

.gallery-item p {
    padding: 12px 10px;
    font-weight: 600;
    color: var(--color-black);
    text-align: center;
}

.gallery-item:hover {
    transform: scale(1.03);
}

/* Bouton Voir plus */
.show-more-container {
    text-align: center;
    margin-top: 30px;
}

#toggleProjectsBtn {
    background-color: var(--color-grey-light);
    border: none;
    padding: 10px 20px;
    margin: 10px auto;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: var(--color-black);
}

#toggleProjectsBtn:hover {
    background-color: var(--color-black);
    color: var(--color-white);
}

.hidden-project {
    display: none;
}


/* Responsive */
@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        max-width: 90%;
    }
    .filter-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .filter-buttons button {
        margin: 5px 0;
    }
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 95%;
    }

    .gallery-item img {
        width: 100%;
        height: auto;
    }

    .filter-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .filter-buttons button {
        margin: 5px 0;
    }
}


/* Contact section */
#contact {
    background-color: var(--color-black); /* anciennement blanc */
    color: var(--color-white);            /* anciennement noir */
    padding: 2rem;
    margin-inline: auto;
    margin-top: 150px;
    box-shadow: 0 5px 15px var(--color-shadow);
    text-align: center;
}

#contact h2 {
    margin-bottom: 1rem;
    font-weight: 700;
}

#contact p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

#contact .lien {
    color: var(--color-white);           /* anciennement noir */
    text-decoration: none;
    font-weight: 600;
}

#contact .lien:hover {
    color: var(--color-grey-light); /* anciennement gris clair */
    text-decoration: underline;
}

.btn-download-cv {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.6rem 1.5rem;
    background-color: var(--color-white); /* anciennement noir */
    color: var(--color-black);            /* anciennement blanc */
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.btn-download-cv:hover {
    background-color: var(--color-grey-hover);
    color: var(--color-white);
}


.btn-download-cv2 {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.6rem 1.5rem;
    background-color: var(--color-black); /* anciennement noir */
    color: var(--color-white);            /* anciennement blanc */
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.btn-download-cv2:hover {
    background-color: var(--color-grey-hover);
    color: var(--color-white);
}



.projets{
    padding-top: 150px;
}

.project-container {
    display: flex;
    flex-wrap: nowrap;
    max-width: 1200px;
    margin: auto;
    background-color: var(--color-white);
    box-shadow: 0 4px 10px var(--color-shadow);
    border-radius: 12px;
    flex-direction: column;
}


.carousel-track-wrapper {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 15px;
  font-size: 2rem;
  padding: 10px;
  cursor: pointer;
  z-index: 10;
}
.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transition:  0.5s ease;
}

.carousel-btn.left {
  left: 10px;
}

.carousel-btn.right {
  right: 10px;
}


@media (max-width: 1024px) {
  .project-image img {
    max-width: 90%;
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .project-image img {
    max-width: 95%;
    max-height: 350px;
  }
  .carousel-btn {
    font-size: 1.5rem;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .project-image img {
    max-width: 100%;
    max-height: 250px;
  }
  .carousel-btn {
    font-size: 1.2rem;
    padding: 6px;
  }
}

.carousel-slide2 {
  min-width: 100%;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.carousel-slide2 img {
  width: auto;
  max-width: 100%;
  max-height: 600px; /* hauteur maximale contrôlée */
  border-radius: 10px;
  object-fit: contain;
  display: block;
}

/* Responsive pour slide2 */

@media (max-width: 1024px) {
  .carousel-slide2 img {
    max-height: 500px;
  }
}

@media (max-width: 768px) {
  .carousel-slide2 img {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .carousel-slide2 img {
    height: 200px;
  }
}
@media (max-width: 325px) {
  .carousel-slide2 img {
    height: 100px;
  }
}




.project-image{
    padding-top: 25px;
    position: relative;
    margin: 0 auto 50px auto;
    overflow: hidden;
    max-width: 900px;
}

.project-image .project-link{
    display: flex;
    justify-content: center;
}

.project-image img {
    max-width: 80%;
    max-height: 500px;
    object-fit: cover;
}

.project-text {
    flex: 1 1 60%;
    padding: 2rem;
}

.project-text h2 {
    margin-top: 0;
}

.project-text a{
    text-decoration: none;
    font-weight: 600;
}

.project-text p,
.project-text ul {
    margin-bottom: 1rem;
}

.project-text ul {
    padding-left: 1.2rem;
}

.project-text p,
.project-text ul,
.project-text h3 {
    margin-bottom: 1.8rem; /* augmente l'espacement vertical */
}

.project-text li {
    margin-bottom: 1rem; /* espace un peu plus grand entre les items */
}


.project-text li {
    margin-bottom: 1rem;
}

.project-link:hover{
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

@media (max-width: 768px) {
    .project-container {
        flex-direction: column;
        margin: 10px auto;
    }
}