/* Réinitialisation des marges et padding */
* {
    margin: 0;
    padding: 0;
}

body {
    top: 0px;
    margin: 0%;
    padding: 0%;
    height: 100vh;
}

footer {
    display: flex;
    justify-content: space-between;
    height: 60px;
    color: #fff;
    background-color: #000;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

footer p {
    padding-top: 7px;
    text-align: center;
}

/* Styles pour la page catalogue */
.gallery {
    display: grid;
    gap: 20px;
    padding: 20px;
    margin: 0 auto;
    max-width: 80%; /* Ajuste la largeur de la galerie pour qu'elle soit plus petite */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Cela permettra de rendre les images responsive */
}

.gallery figure {
    margin: 0;
    text-align: center;
}

.image-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    border: 3px solid #333;
    border-radius: 10px;
    background-color: #f0f0f0;
    transition: transform 0.3s ease-in-out;
}

.image-container:hover {
    transform: scale(1.05); /* Agrandissement au survol */
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cela garde l'image bien proportionnée en recadrant si nécessaire */
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.overlay p {
    margin: 5px 0;
    text-align: center;
}

.overlay h2 {
    width: 80%;
    padding-bottom: 2%;
    font-weight: bold;
}

.overlay a {
    text-decoration: underline #fff;
    color: #fff;
}

.overlay a:hover {
    text-decoration: underline #888;
    color: #888;
}

.overlay a:active {
    text-decoration: none;
    color: #505;
}

.image-container:hover .overlay {
    opacity: 1;
}

.gallery figcaption {
    display: none;
}

.milieu {
    max-width: 70%;
    margin: 0 auto;
}

main {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
}

article {
    max-width: 80%;
    text-align: justify;
}

article h2 {
    font-size: 20px;
    text-align: center;
}

aside {
    display: none;
}

.playlist {
    text-align: center;
    width: 80%;
}

#magrimage {
    border-radius: 10%;
}

.dropdown-item:hover {
    color: #000;
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* Styles pour la page de redirection */
.redirection-page .redirection-page-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: calc(100vh - 60px);
    padding-top: 30px;
}

.redirection-page .image-links {
    display: flex;
    gap: 60px;
    justify-content: center;
}

.redirection-page .link-card {
    text-decoration: none;
}

.redirection-page .image-container {
    position: relative;
    overflow: hidden;
    width: 350px;
    height: 350px;
    border: 3px solid #333;
    border-radius: 10px;
    background-color: #000;
    transition: transform 0.3s ease-in-out;
}

.redirection-page .image-container:hover {
    transform: scale(1.05);
}

.redirection-page .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.redirection-page .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.redirection-page .image-container:hover .overlay {
    opacity: 1;
}

.redirection-page .overlay h2 {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
}


@media screen and (min-width: 576px) {
    .milieu {
        max-width: 70%;
        margin: 0 auto;
    }

    article {
        max-width: 65%;
        text-align: justify;
        position: absolute;
        left: 3%;
    }

    article h2 {
        font-size: 28px;
        text-align: left;
    }

    .playlist {
        display: block;
        max-width: 25%;
        text-align: center;
        position: fixed;
        right: 2%;
        top: 10%;
        transition: top 0.3s ease-in-out;
    }

    .gallery {
        max-width: 1250px;
        grid-template-columns: repeat(4, 1fr);
    }

    footer {
        justify-content: space-around;
    }

    footer p {
        padding-top: 20px;
    }
}
