/* --- IMPORT GOOGLE FONT (Montserrat + Questrial) --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&family=Questrial&display=swap');

/* --- RESET GÉNÉRAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #fff;
    color: black;
    overflow-x: hidden;
    scroll-behavior: smooth;
    text-align: center;
}

/* --- HEADER --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    border-bottom: 2px solid black;
    font-size: 1rem;
    font-weight: 700;
    border-top: 2px solid black;
}

/* --- LIENS SOCIAUX --- */
.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    text-decoration: none;
    color: black;
    font-weight: 700;
    font-size: 1rem;
    transition: color 0.3s ease-in-out;
}

.social-links a:hover {
    color: grey;
}

/* --- TITRES & PARAGRAPHES CENTRÉS --- */
h1 {
    font-weight: 700;
    margin-top: 20px;
}

p {
    font-weight: 400;
    max-width: 800px;
    margin: 10px auto;
    line-height: 1.6;
    font-size: 18px; /* 🖥️ Desktop */
}

/* --- BOUTONS (INFO & RETOUR) --- */
#infoButton, .back-button {
    background: white;
    color: black;
    border: 2px solid black;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    border-radius: 25px;
    outline: none;
    text-decoration: none;
    display: inline-block;
    margin-top: 30px;
    margin-bottom: 30px;
}

#infoButton:hover, .back-button:hover {
    background: black;
    color: white;
}

/* --- SECTION INTRO --- */
.intro {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.6s ease-in-out, opacity 0.6s ease-in-out;
    padding: 0 10%;
    border-bottom: 2px solid black;
    font-size: 1.3rem;
    text-align: center;
}

.intro.show {
    max-height: 250px;
    opacity: 1;
}

/* --- SECTIONS VIDÉOS (ACCUEIL) --- */
.project {
    position: relative;
    width: 100%;
    height: 40vh;
    overflow: hidden;
    border-bottom: 2px solid black;
    border-top: 2px solid black;
}


.project video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(50%);
    transition: filter 0.5s ease-in-out;
}

.project:hover video {
    filter: brightness(100%);
}

.project:hover .overlay {
    opacity: 0;
}

/* --- TEXTE EN OVERLAY SUR LES VIDÉOS --- */
.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    font-size: 5vw;
    font-weight: bold;
    color: white;
    transition: opacity 0.5s ease-in-out;
    padding: 10px;
    text-transform: uppercase;
    letter-spacing: 8px;
    font-family: "Questrial", sans-serif;
}

/* --- VIDÉOS EN IFRAME (Pages internes) --- */
.video-container {
    width: 90%;
    max-width: 1100px;
    margin: 40px auto 20px auto; /* ✅ Ajustement de l’espace au-dessus */
}

.video-container iframe {
    width: 100%;
    height: 65vh;
}
/* --- BOUTON AFFICHER PLUS --- */
#toggleDescription {
    background: black;
    color: white;
    border: 2px solid black;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    border-radius: 25px;
    outline: none;
    text-decoration: none;
    display: inline-block;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

/* Effet hover */
#toggleDescription:hover {
    background: white;
    color: black !important; /* ✅ Le texte reste noir */
    border-color: black;
}

#toggleDescription:hover::after {
    left: 0;
}

#toggleDescription:hover {
    color: black !important; /* ✅ Assure que le texte reste noir */
    background: white;
    border-color: black;
    position: relative;
    z-index: 1;
}

/* --- DESCRIPTION CACHÉE PAR DÉFAUT --- */
.hidden-text {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

/* --- DESCRIPTION AFFICHÉE --- */
.hidden-text.show {
    max-height: 300px; /* Ajuste en fonction du texte */
    opacity: 1;
}

/* --- FOOTER : Centré --- */
footer {
    padding: 20px;
    font-size: 1rem;
    font-weight: 400;
}

/* --- RESPONSIVE DESIGN (MOBILE) --- */
@media screen and (max-width: 768px) {
    /* 📱 Ajustement du header */
    header {
        padding: 10px;
        font-size: 0.9rem;
    }

    .social-links {
        gap: 10px;
    }

    .social-links a {
        font-size: 0.9rem;
    }

    /* 📱 Ajustement de l'intro */
    .intro {
        font-size: 1rem;
    }

    /* 📱 Réduction du texte sous l’iframe */
    p {
        font-size: 12px; /* 📱 Plus petit sur mobile */
    }

    /* 📱 Vidéos affichées en mode vertical + plus larges */
    .project {
        width: 95%; /* 📱 Plus large */
        height: auto;
        margin: 20px auto;
        border: none;
        border-radius: 7px;
    }

    .project video {
        width: 100%;
        height: auto;
        aspect-ratio: 9 / 16; /* 📱 Format vertical */
    }

    .overlay {
        font-size: 8vw;
        letter-spacing: 5px;
    }

    .video-container {
        margin: 0px auto 0px auto; /* ✅ Ajustement de l’espace au-dessus */
    }

    .video-container iframe {
        height: 35vh;
    }

    /* 📱 Bouton Retour bien espacé */
    .back-button {
        margin-top: 20px;
        font-size: 14px;
        padding: 8px 16px;
    }
    p {
        margin-left: 5vh;
        margin-right: 5vh;
    }
    #toggleDescription {
        padding: 8px 16px; /* 📏 Plus petit */
        font-size: 14px; /* 📝 Texte plus petit */
    }
    /* 📱 Footer plus lisible */
    footer {
        font-size: 0.9rem;
    }
}
