/* === VARIABLES GLOBALES === */
:root {
    --font-zain-light: 'Zain-Light', sans-serif;
    /* Police principale */
    --font-zai-tornpaper: 'Zai-TornPaper', serif;
    /* Police pour titres style papier déchiré */
    --title-drop-shadow: 5px -4px 4px 0px rgba(0, 0, 0, 0.5);
    --color-white: #EFF3FB;
    --color-black: #000000;
    --color-beige: #DFDAD5;

    --button-image: url('medias/bouton.png');
    /* Image pour le bouton En savoir plus */
}

/* === FONTS === */
@font-face {
    font-family: 'Zain-Light';
    src: url('fonts/zain/Zain-Light.ttf') format('truetype');
}

@font-face {
    font-family: 'Zai-TornPaper';
    src: url('fonts/zai_TornPaper/zai_TornPaper.ttf') format('truetype');
}

/* === GLOBAL === */
body {
    font-family: var(--font-zain-light);
    background: url("medias/background_desktop.webp") no-repeat center/cover fixed;
    color: var(--color-black);
    margin: 0;
}

h1 {
    font-family: var(--font-zai-tornpaper);
    text-align: center;
    font-size: 7rem;
    margin-bottom: 2rem;
    color: transparent;
    /* Texte transparent */
    -webkit-text-stroke: 3px var(--color-black);
    position: relative;
}

h1:hover {
    color: var(--color-black);
    /* Changer la couleur du texte en noir au survol */
    cursor: pointer;
    /* Montre que c'est cliquable avec une main */
}


h2 {
    font-family: var(--font-zai-tornpaper);
    font-size: 5rem;
    margin-top: 4rem;
    margin-bottom: 5rem;
}

h3 {
    font-size: 3.5rem;
    text-align: center;
    font-weight: bolder;
}

p {
    font-size: 2rem;
    line-height: 1.6;
    /* Espace entre les lignes */
    margin-left: 5rem;
    margin-right: 5rem;
}

ul {
    font-size: 2rem;
    line-height: 1.6;
    /* Espace entre les lignes */
    margin-left: 5rem;
    margin-right: 5rem;
}

ol {
    font-size: 2rem;
    line-height: 1.6;
    /* Espace entre les lignes */
    margin-left: 5rem;
    margin-right: 5rem;
}

/* === NAVBAR === */
.navbar-nav {
    gap: 50px;
    /*espace entre À propos Projets Contact*/
    color: var(--color-white);
}

.navbar-brand {
    font-size: 6rem;
    color: var(--color-black);
    font-family: var(--font-zai-tornpaper);
}

.navbar-brand:hover {
    color: var(--color-white);
    /* Changer la couleur du texte en blanc au survol */
}

.navbar-nav .nav-link {
    font-size: 4rem;
    /* Grosseur du texte d'À propos Projets Contact */
}

.navbar-nav .nav-link:hover {
    color: var(--color-white);
    /* Changer la couleur du texte en blanc au survol */
}


/* === HEADER === */
header {
    margin-top: 150px;
}


/* === SECTION À PROPOS === */
.img-héros {
    display: flex;
    justify-content: center;
    position: static;
    width: 30%;
    height: 30%;
}

/* === SECTION FILTRES PROJETS === */
#filtres button {
    /* padding: 12px 30px; */
    padding: 0.5vw 1vw;
    /* augmente la taille */
    font-size: 1.5rem;
    margin-right: 10px;
    /* espace entre les cases de filtres */
}

/* === SECTION PROJETS === */
#projets {
    margin-bottom: 50px;
}

#projets img {
    width: 100%;
    border-radius: 20px;
    margin: 0 auto;
    display: block;
}

img.projets-image {
    transition: transform 0.4s cubic-bezier(.25, .8, .25, 1),
        filter 0.4s ease;
    transform-origin: center;
}

/* Effet au hover : l’image se déplie et s’illumine */
img.projets-image:hover {
    transform: rotateX(10deg) rotateY(-6deg) scale(1.08);
    filter: brightness(1.2);
}

/* Effet au click : l’image se déplie et s’illumine */
img.projets-image:active {
    transform: rotateX(10deg) rotateY(-6deg) scale(1.08);
    filter: brightness(1.2);
}

/* === BOUTON PROJET AVEC EFFET HOLOGRAPHIQUE === */
.btn-projet {
    position: relative;
    display: inline-block;
    background-image: var(--button-image);
    background-size: cover;
    background-position: center;
    color: var(--color-white);
    font-family: var(--font-zain-light);
    font-size: 1.6rem;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    /* Montre que c'est cliquable avec une main */
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* L’effet holographique */
.btn-projet::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(0deg,
            transparent,
            transparent 40%,
            rgba(0, 0, 0, 0.4),
            rgba(227, 228, 221, 0.1));
    transform: rotate(-45deg);
    opacity: 0;
    /* Invisible au départ */
    transition: all 0.5s ease;
}

/* Au survol on a un effet holographique  */
.btn-projet:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
}

.btn-projet:hover::before {
    opacity: 1;
    transform: rotate(-45deg) translateY(100%);
}

/* === LOGOS COMPÉTENCES === */
.logo-item {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    /* Image au-dessus du texte */
}

.logo-item img {
    width: 120px;
    height: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-name {
    position: absolute;
    font-family: var(--font-zai-tornpaper);
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* texte des noms des logiciels qui va apparaitre lentement */
    text-align: center;
}

/* Effet au survol et au click qui réduit un peu la grosseur et l'opacité des img des logiciels */
.logo-item:hover img,
.logo-item:active img {
    opacity: 0.2;
    /* image plus pâle */
    transform: scale(0.8);
    /* zoom-out doux */
    cursor: pointer;
    /* Montre que c'est cliquable avec une main */
}

/* Effet au survol et au click qui affiche le nom des logiciels */
.logo-item:hover .logo-name,
.logo-item:active .logo-name {
    opacity: 1;
    /* texte visible */
    cursor: pointer;
    /* Montre que c'est cliquable avec une main */
}

/* === COMPÉTENCES (SWIPER) === */
#competences {
    margin-bottom: 150px;
    /* espace avant le footer */
}

.competences-swiper {
    margin-top: 150px;
    /* espace sous le titre Mes Compétences */
    overflow: hidden;
}

.competences-swiper img {
    max-width: 80px;
    /* controle la grosseur des img des logiciels */
}

/* Pagination Swiper */
.swiper-pagination {
    display: none;
    z-index: 10;
    /* si tu veux que la pagination soit centrée et en dessous du swiper,
     laisse display:none ici et active la version mobile dans la media query */
}

/* === SECTION PROJET === */
#projet {
    padding: 60px 20px;
}

#projet .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#projet .col-12 {
    /* Utilisation de col-12 pour que cette colonne prenne toute la largeur */
    max-width: 100%;
}


.coequipiers-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.coequipier {
    position: relative;
    padding: 1rem 2rem;
    font-family: var(--font-zain-light);
    font-size: 2rem;
    cursor: pointer;
    border: 2px solid var(--color-black);
    border-radius: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.coequipier:hover {
    transform: scale(1.05);
    background-color: rgba(0, 0, 0, 0.1);
}

/* Photo container */
.photo-container {
    width: 100%;
    height: 400px;
    margin-top: 2rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-image 0.3s ease;
}

.photo-container h2 {
    font-size: 15rem;
}

/* Affichage de l'image au hover en CSS pur via nth-child */
.coequipier:nth-child(1):hover~.photo-container {
    background-image: url('medias/Ryan.webp');
}

.coequipier:nth-child(2):hover~.photo-container {
    background-image: url('medias/Yannick.webp');
}

.coequipier:nth-child(3):hover~.photo-container {
    background-image: url('medias/Mohamed3.webp');
}


.logiciels {
    text-align: left;
}


/* === flèche 'Retour en haut' === */

.back-to-top {
    position: relative;
    margin-bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    /* compensation */
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.back-to-top p {
    font-family: var(--font-zai-tornpaper);
    font-size: x-large;
}

.back-to-top.show {
    opacity: 1;
}

/* Animation de la flèche */
@keyframes floatUpDown {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    /* monte un peu */
    100% {
        transform: translateY(0);
    }

    /* redescend */
}

.back-to-top.show img {
    width: 8rem;
    height: auto;
    pointer-events: auto;
    animation: floatUpDown 1.6s ease-in-out infinite;
}


/* ==========================
   SOLUS HYDROPONICS
========================== */

.solus-videos {
    margin-top: 6rem;
}

.solus-intro {
    max-width: 700px;
    margin: 0 auto 5rem auto;
}

.solus-intro p {
    margin: 0;
    text-align: center;
}

.solus-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5rem 4rem;
    justify-items: center;
}

.video-card {
    text-align: center;
}

.video-thumbnail {
    width: 240px;
    height: 240px;
    background: #d9d9d9;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: black;
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover {
    transform: scale(1.05);
}

.video-card h3 {
    margin-top: 1rem;
    font-size: 2rem;
}

/* Responsive */
@media (max-width: 992px) {
    .solus-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .solus-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .video-thumbnail {
        width: 220px;
        height: 220px;
    }
}

/* === RESPONSIVE MOBILE === */
@media (max-width: 768px) {
    h1 {
        font-size: 4rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    h3 {
        font-size: 2rem;
    }

    p {
        font-size: 1.8rem;
    }


    /* === Page d'accueil === */

    .navbar-brand {
        font-size: 4rem;
    }

    .navbar-nav .nav-link {
        font-size: 2rem;
    }

    /* === HEADER === */
    header {
        margin-top: 20px;
    }

    /* === COMPÉTENCES (SWIPER) === */
    .swiper-pagination {
        display: flex !important;
        justify-content: center;
        align-items: center;
        margin-top: 70px;
        position: relative;
        /* position normale sous le contenu */
    }

    /* Petits points ronds */
    .swiper-pagination-bullet {
        background: #000000;
        /* couleur des points */
        opacity: 0.45;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        margin: 0 6px;
        transition: opacity 0.25s, transform 0.25s;
        box-shadow: none;
    }

    /* Point actif */
    .swiper-pagination-bullet-active {
        background: #ffffff;
        opacity: 1;
        transform: scale(1.3);
    }

    /* === SECTION PROJET === */


    /* === SECTION FILTRES PROJETS === */
    #filtres button {
        padding: 5px 10px;
        margin: 5px;
        /* augmente la taille */
        margin-right: 5px;
        /* espace entre les cases de filtres */
    }

    .img-héros {
        display: flex;
        justify-content: center;
        position: static;
        width: 80%;
        height: 80%;
    }

    #projet h1 {
        font-size: 2.5rem;
    }

    #projet h3 {
        font-size: 1.8rem;
    }

    /* === flèche 'Retour en haut' === */
    .back-to-top.show img {
        width: 5rem;
        height: auto;
    }

    .titre-confidentialite {
        font-size: 2.5rem;
    }
}