@media screen and (max-width: 769px){
    .sous_nav{
        height: auto !important;
        animation: none !important;
    }

    .sous_nav .nav-links {
        display: none !important;
    }

    .sous_nav.active .nav-links {
        display: flex !important;
    }

    .chantier h1{
        text-align: center !important;
    }

    .card{
        width: 100% !important;
        margin: 2.5% 5% !important;
    }

    .pop-up{
        width: 100% !important;
    }

    .close-btn{
        right: 0 !important;
    }

    .left{
        left: 0 !important;
    }

    .right{
        right: 0 !important;
    }
}

@keyframes openSousNav {
    from{ height: 0; }
    to{ height: var(--sous_nav); }
}

@keyframes showCard{
    from{ opacity: 0; }
    to{ opacity: 1; }
}

@keyframes hideCard{
    from{ opacity: 1; }
    to{ opacity: 0; }
}

.sous_nav{
    background-color: rgb(80, 80, 80);
    height: var(--sous_nav);
    animation: openSousNav 0.5s;
}

.sous_nav a{
    font-weight: normal !important;
}

.chantier{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column !important;
    min-height: calc(100% - (var(--nav) + var(--sous_nav)));
    height: auto !important;
    background-image: url("../img/menuiseri2.jpg");
}

.chantier h1{
    color: white;
    text-shadow: 1.5px 1.5px 1.5px #000000;
}

.cards{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.card{
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    width: 250px;
    height: 250px;
    margin: 1%;
    padding: 5px;
    background-color: white;
    border-radius: 5px;
    transition: transform 0.5s ease;
}

.card a{
    position: relative;
    width: 100%;
    height: 100%;
    border: none;
    overflow: hidden;
    cursor: pointer;
}

.card .title{
    position: absolute;
    width: 100%;
    bottom: 0px;
    color: white;
    border-radius: 0 0 5px 5px;
    background-color: rgba(0, 0, 0, 0.25);
}

.card .title p{
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: 5px;
}

.card:hover{
    transform: scale(1.05);
}

.card img{
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 5px;
}

/*---------- POP UP ----------*/
.bgpu{
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1000;
}

.pop-up{
    position: relative;
    width: 50%;
    height: 50%;
    background-color: white;
    border-radius: 10px;
    z-index: 1000;
    animation: showCard 0.5s;
}

.pop-up .content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.pop-up .content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto;
    height: auto;
}

.close-btn{
    position: absolute;
    top: -15px;
    right: -15px;
    cursor: pointer;
    font-size: 1.5rem;
    color: white;
    border: none;
    background-color: rgba(0, 0, 0, 0.9);
    border-radius: 100%;
    z-index: 1001;
    transition: transform 0.5s ease;
}

.close-btn:hover{
    background-color: rgb(0, 0, 0);
    transform: scale(1.05);
}

.rotate-btn{
    position: absolute;
    display: block;
    cursor: pointer;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: white;
    border: none;
    background-color: rgba(0, 0, 0, 0.9);
    border-radius: 100%;
    z-index: 1001;
    transition: transform 0.5s ease;
}

.rotate-btn:hover{
    background-color: rgb(0, 0, 0);
}

.left{
    top: 50%;
    left: -15px;
}

.right{
    top: 50%;
    right: -15px;
}