@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

html {
    scroll-behavior: smooth;
  }

body {
    margin: 0;
    font-family: 'Lato', sans-serif;
    background-color: rgb(0, 0, 0);
    color: white;
}

nav {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 0 2%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: rgba(0, 0, 0, 0.60);
    z-index: 999;
}

nav .profile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

nav .profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

nav .profile h1 {
    font-size: 15px;
    margin-left: 10px;
}

nav ul {
    display: flex;
    list-style-type: none;
}

nav ul li {
    margin-left: 20px;
    cursor: pointer;  
}

a {
    text-decoration: none;
    color: white;
}

.page-content {
    margin: 0 4%;
}

.main-video {
    height: calc(100vh - 60px); /* 60px = hauteur navbar */
    display: flex;
    justify-content: center;
    align-items: center;
}

.responsive-iframe-container {
    position: relative;
    width: 100%;
    max-width: 1080px;
    aspect-ratio: 16 / 9;
    height: auto;
}

.responsive-iframe-container iframe {
    width: 100%;
    height: auto;
    max-width: 1080px;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
}

/*
==================================
---------- PRÉSENTATION ---------- 
==================================
*/

.introduction {
    margin-top: 10%;
}

/* DIV qui centre au milieu de la page les deux sous divisions */
.intro-content {
    display: flex;
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 4%;
    align-items: center; /* LE CENTRAGE VERTICAL CLÉ (aligne l'image et le texte l'un par rapport à l'autre) */
    gap: 40px; /* Espace entre les deux colonnes */
}

/* DIV de gauche qui permet de centrer à gauche l'image */
.intro-image-container {
    flex: 0 0 40%; 
    display: flex;
    justify-content: center;
}

/* L'IMG de présentation */
.intro-image-container img {
    width: 100%; 
    max-width: 500px;
    height: auto;
    object-fit: cover; 
    border-radius: 10px;
}


/* DIV de droite pour la présentation qui permet de centrer à droite */
.intro-text-container {
    flex: 0 0 60%; 
    padding-right: 20px;
}

/* Div qui contient H2 et P qui permet d'aligner à gauche H2 et P */
.intro-text-container .text-group {
    margin: 0 auto; 
    max-width: 75%; 
}

/* Le H2 de présentation */
.intro-text-container h2 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: left; 
    margin-left: 0; 
}

/* Le P de présentation */
.intro-text-container p {
    font-size: 18px;
    width: 100%; 
    margin-left: 0; 
    margin-right: 0; 
    text-align: left;
}

/*
===================================
---------- PROJETS VIDÉO ---------- 
===================================
*/

.video-grid-title {
    /* Augmentation de l'espace au-dessus du titre */
    margin-top: 15%;
    margin-bottom: 20px; /* Conserver une petite marge au-dessous du titre */
    font-size: 24px;
    text-align: center; /* Centrer le titre si vous le souhaitez */
}

.page-content .videos {
    margin-top: 2%;
    display: grid; /* Utilisez Grid pour un alignement parfait en 3 colonnes */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* 3 colonnes flexibles */
    gap: 30px; /* Espace entre les vidéos */
    justify-items: center;
}

.page-content .videos iframe {
    /* Retirez les marges conflictuelles, la grille gère l'espace */
    margin: 0; 
    width: 100%;
    height: 216px; /* Hauteur fixe pour un look uniforme */
}


.page-content .videos {
    margin-top: 5%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.page-content .videos iframe {
    border-radius: 10px;
    margin: 2%;
    width: 384px;
    height: 216px;
}

footer {
    margin-top: 5%;
    margin-bottom: 3%;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

footer h3 {
    margin: auto;
    font-weight: 400;
    margin-top: 5px;
}


@media screen and (max-width: 700px){
    nav {
        flex-direction: column;
        justify-content: center;
    }

    nav ul {
        padding: 0;
    }

    .main-video {
        align-items: flex-start; /* place la vidéo en haut sur mobile */
        padding-top: 50px;
        padding-bottom: 50px; /* espace respirable optionnel */
        height: auto; /* retire le 100vh */
    }
    .intro-content {
        flex-direction: column; /* Empiler image et texte sur mobile */
        padding: 0 20px;
    }
    .intro-image-container, .intro-text-container {
        flex: 1 1 100%; /* Reprendre toute la largeur */
    }
    .intro-text-container {
        padding: 0;
        margin-top: 30px;
    }
    .intro-image-container img {
        width: 50%; /* Rendre la photo moins large sur mobile */
    }

    .intro-text-container p {
        font-size: 12px;
    }
