/* VARIABLES CSS -->
 https://www.youtube.com/watch?v=pi-jnnNFTiQ 
 https://developer.mozilla.org/fr/docs/Web/CSS/CSS_cascading_variables/Using_CSS_custom_properties */

:root {
    --color-bg: rgb(18 18 18);
    --color-text: rgb(207, 201, 201);
    --color-white: #ffffff;
    --color-highlight: rgb(255, 46, 136);
    --color-highlight-dark: rgba(255, 255, 255, 0.3);
    --color-navbar: rgb(18 18 18);
    --color-card-bg: aliceblue;
    --color-description-bg: #9cb9dc;
    --color-skill-bg: #3c3c3c;

    --font-primary: 'Inter', sans-serif;
    --font-title: 'Clash Display', sans-serif;

    --radius-large: 35px;
    --radius-medium: 18px;
    --transition-fast: 0.3s ease-in-out;
    --transition-smooth: 0.5s ease;

    --space-small: 1vh;
    --space-medium: 5vh;
}

/* BASIQUES */
* {
    margin: 0;
    padding: 0;
}

body {
    width: 100%;
    line-height: 1.2;
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
}

/* TEXTES */
p {
    color: var(--color-text);
    font-size: 1.1em;
    text-align: center;
}

h1 {
    text-align: center;
    font-size: 5em;
    font-weight: bold;
    font-family: var(--font-title);
    color: var(--color-white);
    z-index: 1;
}

h1 span {
  color: transparent;
  -webkit-text-stroke: 1px var(--color-highlight);
  position: relative;
  display: inline-block;
  animation: brillance 3s linear infinite;
  /* Pour éviter que le texte "saute" pendant l'animation */
  -webkit-text-fill-color: transparent;
}

@keyframes brillance {
    /* 
    Obligé d'utiliser les % (je crois), car en utilisant seulement "from" et "to"
    ça faisait un effet de "cassure" à la fin de l'animation, ce qui la rendait moins belle. 
    */

  0% {
    -webkit-text-stroke-color: var(--color-highlight);
    filter: brightness(1);
  }
  50% {
    -webkit-text-stroke-color: rgb(241, 113, 169);
    filter: brightness(1.05);
    transform: scale(1.01);
  }
  100% {
    -webkit-text-stroke-color: var(--color-highlight);
    filter: brightness(1);
  }
}

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



h2 {
    font-size: 3em;
    font-family: var(--font-title);
}

h2 span,
span {
    text-transform: uppercase;
    color: var(--color-highlight);
    
}

#experiences h2 span{
    color: #0b0b0b00;
    -webkit-text-stroke: 1px white;
}

/* ESPACEMENTS */
.smallSpaceTop {
    margin-top: var(--space-small);
}
.spaceTop {
    margin-top: var(--space-medium);
}
.spaceTopPadding {
    padding-top: var(--space-medium);
}
.smallSpaceTopPadding {
    padding-top: var(--space-small);
}

/* FLEX */
.flex {
    display: flex;
}

/* HEADER + NAVBAR */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 20vh;
    padding: 0 5%;
    background-color: var(--color-navbar);
    font-family: var(--font-title);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

nav .titre {
    font-size: 1.5em;
    color: var(--color-white);
}

nav .titre span {
    color: var(--color-highlight);
}

nav ul {
    display: flex;
    flex-direction: row;
    gap: 30px;
    list-style: none;
}

nav ul li a {
    color: var(--color-text);
    text-transform: uppercase;
    font-weight: bold;
    transition: all 0.25s ease;
}

nav ul li a:hover{
    color: var(--color-highlight);
}

/* INTRO SECTION */
.intro {
    background-color: var(--color-navbar);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    color: var(--color-text);
    justify-content: center;
    align-items: center;
}

.intro .description {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.intro p {
    width: 35%;
}

.intro a {
    background: linear-gradient(to bottom right, var(--color-highlight), var(--color-highlight-dark));
    color: var(--color-white);
    padding: 15px 40px;
    border-radius: var(--radius-medium);
    font-size: 0.9em;
    transition: all var(--transition-smooth);
    text-align: center;
    animation: boutonZoom 1s linear infinite alternate; 
    /* L'utilisation de alternate me permet de ne pas
     casser l'animation à la fin, et de jouer l'animation dans le sens inverse jusqu'à la recommencer */
}

.intro a:hover {
    background-color: rgba(244, 194, 194, 0.8);
    animation: boutonZoom 1s linear; 
}

/*----*/
.showCase {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--color-white);
}

.showCase p {
    width: 35%;
}

.showCase h2 {
    text-align: center;
}

/* SECTION PROJETS ET CARROUSSEL */
#projets {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: start;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    background-color: var(--color-navbar);
    color: var(--color-white);
}

.projets {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
    width: 70%;
    background-color: var(--color-navbar);
    color: var(--color-white);
}

#projets .card {
    width: 80%;
    position: relative;
    border-radius: 12px;
    border: 0.5px solid var(--color-highlight);
    text-align: center;
}

#projets .cardNumber {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

#projets .cardNumber .bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 5px;
    cursor: pointer;
}

#projets .cardNumber div.active { 
    background-color: rgb(255, 46, 136); 
}


#projets .card img {
    width: 100%;
    height: 80vh;
}

#projets .card .skill {
    position: absolute;
    color: var(--color-card-bg);
    background-color: var(--color-highlight);
    padding: 2px 8px;
    border-radius: var(--radius-large);
    min-width: 50px;
    text-align: center;
    font-family: var(--font-title);
    margin: 1vh;
    font-size: 0.8em;
}

#projets .card .description {
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--transition-fast);
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    color: var(--color-description-bg);
    color: #fff;
    padding: 10px;
    box-sizing: border-box;
    z-index: 10;
    background: var(--color-bg);
    border-radius: 12px;
}

#projets .card:hover .description {
    visibility: visible;
    opacity: 1;
}

#projets .card .more-info {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 20;
    padding: 5px;
    box-sizing: border-box;
    color: var(--color-highlight);
}

#projets .card .bottom {
    display: flex;
    justify-content: space-between;
}


.card {
    min-width: 100%;
    box-sizing: border-box;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    width: 70%; 
    margin: 0 auto;
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel .decoration-haut{
    width: 20%;
    position: absolute;
    top: 0;
    background-color: #0b0b0b;
    padding-top: 2vh;
    z-index: 10;
    border-radius: 0px 0px 12px 12px;
    margin-left: 40%;
}

.card {
    flex: 0 0 100%; /* Chaque carte prend toute la largeur */
    box-sizing: border-box;
    padding: 10px;
}

.controlButtons {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: center;
    margin-top: 20px;
    position: relative;

}

#toggleMode, #prevBtn, #nextBtn {
    background: var(--color-highlight);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 5px 8px;
    margin: 0 5px;
    cursor: pointer;
}

#toggleMode {
    background: var(--color-bg);
}

#prevBtn, #nextBtn {
    background: var(--color-highlight);
}



/* SECTION SKILLS */
#skills {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 20vh;
}

.skills{
    width: 70%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    text-align: center;
    justify-content: center;
    gap: 5vh;
    margin-top: 10vh;
}


.skill {
    display: flex;
    flex-direction: row;
    border-radius: var(--radius-medium);
    border: 1px solid #3b82f64d;
    justify-content: center;
    width: 20%;
    transition: transform 0.5s ease-out;
    background-color: rgba(21, 21, 21, 0.3);
    border: 1px solid #3b82f64d;
    padding: 1rem; 
    position: relative;
    text-align: center;
    font-size: 0.8em;
    background-image: linear-gradient(to bottom right, #06b6d433, #3b82f633);
    align-items: center;
    gap: 0.5em; 
    margin-bottom: 1rem;
    padding-bottom: 4vh;
}

.skill:hover{
    background-image: linear-gradient(to bottom right, #3b82f633, #06b6d433);
}

.skill svg{
    background-color: #ffffff0d;
    padding: 12px;
    border-color: #262223;
    border-radius: 12px;
    color:rgb(96 165 250);
}

.skill progress{
    position: absolute;
    bottom: 1vh;
    width: 60%;
}

/* SECTION EXPERIENCES */
#experiences {
    width: 80%;
    margin: 0 auto;
    margin-top: 15vh;
    display: flex;
    flex-direction: row;
    background: linear-gradient(to bottom right, var(--color-highlight), var(--color-highlight-dark));
    padding: 20px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

#experiences:hover{
    width: 100%;
    height: 100%;
    
}

#experiences li:hover{
    background-color: rgba(51, 50, 50, 0.3);
}


#experiences .showCase p{
    width: 80%;
}

#experiences .left {
    width: 70%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#experiences .right {
    width: 30%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

#experiences .filtre {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

#experiences .filtre label {
    color: var(--color-text);
    margin-right: 10px;
}

#experiences .filtre select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid var(--color-highlight);
    background-color: var(--color-navbar);
    color: var(--color-text);
}

#experiences ul {
    width: 100%;
    list-style-type: none;
    padding: 0;
}

#experiences li {
    width: 100%;
    background-color: rgba(21, 21, 21, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    transition: all 0.5s ease-in-out;
    border: 1px solid #ffffff1a;
}

#experiences li p {
    margin: 5px 0;
    color: var(--color-text);
}

#experiences .date {
    color: var(--color-highlight);
    font-weight: bold;
}

#experiences .right img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* RESPONSIVE */

/* Tablettes + petits écrans */
@media (max-width: 1024px) {
    /* Header et navigation */
    header {
        flex-direction: column;
        height: auto;
        padding: 20px;
    }

    nav {
        flex-direction: column;
        gap: 20px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    /* Intro */
    .intro p {
        width: 80%;
    }

    /* Projets */
    .carousel-container {
        width: 90%;
    }

    /* Compétences */
    .skills {
        width: 90%;
        gap: 3vh;
    }

    .skill {
        width: 80%;
    }

    /* Expériences */
    #experiences {
        flex-direction: column;
        width: 90%;
    }

    #experiences .left,
    #experiences .right {
        width: 100%;
    }

    #experiences .showCase p {
        width: 90%;
    }
}

/* Téléphones et + petit */
@media (max-width: 768px) {
    /* Texte */
    h1 {
        font-size: 3em;
    }

    h2 {
        font-size: 2em;
    }

    p {
        font-size: 0.9em;
    }

    /* Intro */
    .intro p {
        width: 90%;
    }

    /* Compétences */
    .skills {
        flex-direction: column;
    }

    .skill {
        width: 100%;
        flex-direction: column;
    }

    .skill progress {
        position: static;
        width: 80%;
        margin-top: 10px;
    }

    /* Expériences */
    #experiences li {
        padding: 10px;
    }

    /* Boutons */
    .intro a {
        padding: 10px 20px;
        font-size: 0.8em;
    }

    .controlButtons {
        flex-direction: column;
        gap: 10px;
    }

    #toggleMode, #prevBtn, #nextBtn {
        padding: 8px 12px;
        font-size: 0.8em;
    }
}





img {
    max-width: 100%;
    height: auto;
    display: block;
}
