/* Global styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    width: 90%;
    margin: 0 auto;
    max-width: 1200px;
}

/* Header styles */
header {
    background-color: #333;
    color: white;
    padding: 20px 0;
    text-align: center;
    position: sticky; /* Le bandeau reste en haut lors du scroll */
    top: 0;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header p {
    font-size: 1.2rem;
    margin: 0;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin-top: 10px;
}

nav ul li {
    display: inline-block;
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 5px 10px;
    transition: background-color 0.3s, color 0.3s;
    display: inline-block;
    position: relative;

}

nav ul li a:hover {
    background-color: #555;
    color: #fff;
    border-radius: 5px;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #ccc;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}
nav ul li a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Project case styles */
.project {
    border-radius: 10px; /* Arrondir les coins */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ombre légère */
    overflow: hidden; /* Appliquer les coins arrondis aux éléments internes */
    background-color: white;
    margin-bottom: 20px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project:hover {
    transform: translateY(-5px); /* Légère élévation au survol */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Ombre plus prononcée au survol */
}

/* Title and toggle arrow */
h3 {
    cursor: pointer;
    background-color: #f4f4f4;
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 1.4em;
    position: relative;
    border-radius: 5px; /* Arrondir les coins du titre */
}

h3::after {
    content: '\25BC'; /* Flèche vers le bas */
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s;
}

h3.active::after {
    transform: translateY(-50%) rotate(180deg); /* Pivote la flèche vers le haut quand ouvert */
}

/* Project content styles */
.project-content {
    display: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-radius: 10px;
}

.project-content.active {
    display: flex !important;
    opacity: 1;
    max-height: 1000px;
}

/* Project description */
.project-description {
    flex: 1;
    padding-right: 20px;
    margin: auto 0;
    text-align: justify;
}

/* Slideshow container */
.slideshow-container {
    flex: 1;
    
    margin-left: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Slideshow images */
img {
    width: 100%;
    height: auto;
    max-height: 50vh; /* Limiter la hauteur des images à 50% de la fenêtre */
    object-fit: contain; /* Gérer l'image pour qu'elle ne soit pas déformée */
}

/* Navigation buttons for slideshow */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Additional styles for slideshow */
.fade {
    display: none;
}

.menu-toggle {
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    display: none; /* Ne pas afficher le bouton sur grand écran */
}

ul {
    padding-left: 20px;
}

@media screen and (max-width: 768px)
{
    .project-content{
        flex-direction: column;
        align-items: center;
    }
    
}
iframe {
    display: block;
    margin: 0 auto; /* Centre la vidéo horizontalement */
}

footer {
    background-color: #333;
    color: white;
    padding: 10px 0;
    text-align: center;
    width: 100%;
    position: relative;
    bottom: 0;
}
.video-container {
    position: relative;
    width: 50%; /* 50% width for larger screens */
    padding-bottom: 28.125%; /* 16:9 aspect ratio remains the same */
    height: 0;
    overflow: hidden;
    margin: 0 auto; /* Center horizontally */
}

/* Responsive iframe styling */
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media screen and (max-width: 768px) {
    .video-container {
        width: 90%; /* Increase width to 90% on smaller screens */
    }
    .video-container {
        padding-bottom: 50.625%; /* Increase width to 90% on smaller screens */
    }
    h3 {
        font-size: 1em; /* Réduire la taille du titre */
    }
    img {
    max-width: 100%;
    height: auto;
    display: block;
}
}

@media screen and (max-width: 768px) {
    /* Afficher le bouton hamburger sur téléphone */
    .menu-toggle {
        display: block; /* Afficher le bouton de menu hamburger */
    }

    /* Cacher le menu normal sur téléphone */
    nav ul {
        display: none; /* Cacher le menu classique */
        flex-direction: column; /* Pour que les éléments soient verticalement empilés */
        margin-top: 20px;
        background-color: #333;
        padding: 0;
    }

    /* Menu déroulant s'affiche quand activé */
    nav.nav-open ul {
        display: block; /* Afficher le menu quand la classe nav-open est présente */
    }

    nav ul li {
        margin: 10px 0; /* Espacer les éléments verticalement sur mobile */
    }

    nav ul li a {
        font-size: 1.2rem; /* Ajuster la taille des liens */
        padding: 10px 15px;
        display: block;
        text-align: center;
    }
    
}