.animate-top {
    flex: 1;
}

.blue_rectangle {
    position: absolute;  /* Changer le positionnement à 'absolute' */
    top: 0;  /* Positionnez-le au sommet */
    left: 0;  /* Positionnez-le à gauche */
    width: 100%;  /* Qu'il couvre toute la largeur */
    background-color: #2C5574;
    height: 410px;  /* Réglez la hauteur pour qu'elle ne couvre que la moitié des cartes */
    z-index: -1;  /* Un z-index inférieur pour le mettre en arrière-plan */
    animation-duration: 0;
  }

a {
    text-decoration: none;
}

.container_cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.card {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 405px;
    height: 220px;
    padding: 60px;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out, background-size 0.5s ease;
    background-size: 100% 100%;
    margin-top: 30px;
    margin-left: 60px;
    margin-bottom: 25px;
}

.card:hover {
    background-size: 120% 120%;
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajuste l'image pour remplir la div */
    z-index: -1; /* Met l'image en arrière-plan */
    border-radius: 25px;
}

.card.hidden {
    opacity: 0;
    pointer-events: none;
    /* Empêche les interactions sur les cartes masquées */
}

.card:not(.hidden) {
    opacity: 1;
}

.from-left {
    transform: translateX(-30%);
}

.from-right {
    transform: translateX(30%);
}

.card:not(.hidden).from-left {
    transform: translateX(0);
}

.card:not(.hidden).from-right {
    transform: translateX(0);
}

.title_card {
    margin: 0;
    width: 80%;
}

.arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #FF4500;
    border-radius: 10px;
    color: black;
    font-size: 18pt;
    transition: 0.5s;
}

.arrow:hover {
    transform: rotateZ(-90deg);
}

.information {
    color: white;
    width: 80%;
    height: auto;
}

.text_addcircuit {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16pt;
    text-align: center;
}

.add_circuit i {
    margin-right: 15px;
    margin-left: 10px;
}

#button_add_circuit {
    display: flex;
    justify-content: center;
}

@media screen and (max-width: 1660px) {
    .container_cards {
        flex-direction: column;
        align-items: center;
    }

    .card {
        margin-left: 0;
    }

    #card2 {
        margin-left: 0;
        margin-bottom: 10px;
    }

    #card3 {
        margin-left: 0;
    }
}

@media screen and (max-width: 540px) {
    .card {
        display: flex;
        padding: 30px;
        width: 250px;
        height: 170px;
        margin-bottom: 10px;
    }

    .title_card {
        font-size: 18pt;
    }
}

@media screen and (max-width: 330px) {
    .arrow {
        display: none;
    }

    .card {
        padding: 30px;
        width: 180px;
        height: 170px;
    }

    .information h2 {
        font-size: 14pt;
    }
}