/* Base */

body {
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 0;
    margin: 0;
}

.container {
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    padding: 20px;
    max-width: 1200px;
}

.content {
    padding: 40px 20px;
}

/* Main content */

.project-detail {
    width: 70%;
    margin: 0 auto;
    animation: fadeIn 0.8s ease-in;
}

.project-container {
    background-color: #fff;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.8s ease-in;
}

.project-container h1 {
    font-size: 24px;
    color: #4a6991;
    padding: 20px;
    margin: 0;
    border-bottom: 1px solid #eee;
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container img {
    width: 250px;
    height: 250px;
    object-fit: cover;
}


.project-details {
    padding: 20px;
}

.project-details p {
    margin-bottom: 10px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 (9/16*100 = 56.25%) */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
@media screen and (max-width: 768px) {
    .video-wrapper {
        padding-bottom: 75%; /* Changer le ratio pour un aspect plus carré */
    }
}


/* Animations */

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes slideIn {
    0% {
        transform: translateX(-50px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.1);
    }
    to {
        transform: scale(1);
    }
}

.zoom-in {
    animation: zoomIn 0.5s;
}

#closeModalButton {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 1.5em;
}

#closeModalButton:hover {
    transform: scale(1.2);
    transition: ease 0.2s;
    background-color: var(--hover-color);
    color: whitesmoke;
}

@media screen and (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .project-detail {
        width: 100%;
    }

    .project-container h1 {
        font-size: 20px;
    }

    .image-container img {
        width: 100%;
        height: auto;
    }

    #closeModalButton {
        position: fixed;
        top: 20px;
        right: 20px;
        width: 30px;
        height: 30px;
        font-size: 1.2em;
    }
}
