main {
    margin-top: 70px;
}

h1 {
    font-size: 3rem;
    padding-left: 20px;
}

sup{
    font-size: 2rem;
}

.projets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 42px;
    justify-items: center;
    padding: 20px;
}

.capsule {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.capsule a {
    text-decoration: none;
    color: var(--noir);
    text-align: center;
}

.capsule a h2 {
    font-size: 2rem;
    transition: all 0.3s ease;
}

.capsule a p {
    border: 1px solid;
    border-radius: 30px;
    padding: 3px;
    margin-top: 5px;
}

img {
    width: 150px;
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.capsule a:hover img {
    animation: shake 0.5s;
}

.capsule a:hover h2 {
    color: var(--rouge);
}

.capsule a:hover::after {
    content: "";
    display: block;
    background-image: url('../img/hey.png');
    background-size: contain;
    background-repeat: no-repeat;
    width: 100px;
    height: 100px;
    position: absolute;
    top: 20px;
    right: -50px;
}


@media (min-width: 768px) {
    main {
        margin-top: 100px;
    }

    h1 {
        font-size: 5rem;
        padding-left: 30px;
    }

    .projets {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .capsule a h2 {
        margin-top: 15px;
        font-size: 2rem;
    }

    img {
        width: 200px;
    }
}

@media (min-width: 1200px) {
    .capsule a h2 {
        margin-top: 20px;
        font-size: 2.5rem;
    }

    img {
        width: 230px;
    }

    .capsule a:hover::after {
        width: 150px;
        height: 150px;
        top: 20px;
        right: -70px;
    }
}

@media (min-width: 1400px) {
    img {
        width: 320px;
    }

    .capsule a p {
        font-size: 1.1rem;
    }
}