* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.card {
    width: 240px;
    min-height: 360px;
    padding: 20px;
    border-radius: 16px;
    color: white;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;

    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;

    transition: 
        transform 0.4s ease,
        box-shadow 0.4s ease,
        filter 0.4s ease,
        background-size 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* couche sombre pour bien lire le texte */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.18), rgba(0,0,0,0.05));
    z-index: 1;
    transition: background 0.4s ease;
}

/* contenu au-dessus de l’overlay */
.card > div {
    position: relative;
    z-index: 2;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.25);
    filter: grayscale(15%);
    background-size: 115%;
}

.card:hover::before {
    background: linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0.22), rgba(0,0,0,0.08));
}

.card h3 {
    font-size: 1.2rem;
    margin: 14px 0 10px;
    line-height: 1.3;
}

.card p {
    font-size: 0.92rem;
    line-height: 1.55;
}

.subicon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.subicon img {
    max-width: 50px;
    height: auto;
    display: block;
}

@keyframes appear {
    0% {
        opacity: 0;
        transform: translateY(35px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* images */
#partenariat {
    background-image: url(../src/partenariat.png);
}

#personne {
    background-image: url(../src/personne.png);
}

#paix {
    background-image: url(../src/paix.png);
}

#planete {
    background-image: url(../src/planete.png);
}

#prosperite {
    background-image: url(../src/prosperite.png);
}

/* Tablettes */
@media (max-width: 900px) {
    .container {
        margin: 30px auto;
        padding: 15px;
        gap: 20px;
    }

    .card {
        width: 300px;
        min-height: 340px;
    }
}

/* Mobiles */
@media (max-width: 600px) {
    .container {
        margin: 20px auto;
        padding: 12px;
        gap: 16px;
    }

    .card {
        width: 100%;
        min-height: 300px;
        padding: 18px;
        border-radius: 14px;
    }

    .card h3 {
        font-size: 1.08rem;
    }

    .card p {
        font-size: 0.9rem;
    }

    .subicon {
        width: 60px;
        height: 60px;
    }

    .subicon img {
        max-width: 42px;
    }
}