html,
body {
    height: 100%;
    margin: 0;
}

body {
    background-color: hsl(224, 10%, 10%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: -1;

    overflow-x: hidden;
    width: 100vw; 
    margin: 0; 
    padding: 0; 
}

.page {
    background: linear-gradient(215deg, hsla(255, 60%, 60%, .2), transparent 40%), radial-gradient(hsla(255, 60%, 60%, .2), transparent 40%) no-repeat -60vw -40vh / 105vw 200vh, radial-gradient(hsla(255, 60%, 60%, .2), transparent 65%) no-repeat 50% calc(100% + 20rem) / 60rem 30rem;
    position: absolute;
    top: 0;
    left: 0;
    min-height: 100vh;
    width: 100%;
    z-index: -1;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: hsl(224, 10%, 10%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    z-index: 9999;
}

.container {
    max-width: 67.5rem;
    margin-inline: var(--sl-content-margin-inline, auto);
}


.cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 400px;
    --stagger-height: 5rem;

}


.card:nth-child(even) {
    margin-top: 3rem;
}

.three {
    margin-top: -2.5rem;
}

.last {
    margin-top: 0.5rem !important;
}

.card {
    border: 1px solid hsl(224, 10%, 23%);
    background-color: hsl(224, 10%, 10%);
    padding: clamp(1rem, calc(.125rem + 3vw), 2.5rem);
    flex-direction: column;
    gap: clamp(.5rem, calc(.125rem + 1vw), 1rem);
    height: 90px;
}

.card:nth-child(4n+1) {
    --sl-card-border: hsl(41, 80%, 63%);
    --sl-card-bg: hsl(41, 39%, 22%);
}

.card:nth-child(4n+2) {
    --sl-card-border: hsl(281, 82%, 63%);
    --sl-card-bg: hsl(281, 39%, 22%);
}

.card:nth-child(4n+3) {
    --sl-card-border: hsl(101, 82%, 63%);
    --sl-card-bg: hsl(101, 39%, 22%);
}

.card:nth-child(4n+4) {
    --sl-card-border: hsl(339, 82%, 63%);
    --sl-card-bg: hsl(339, 39%, 22%);
}

.card svg {
    font-size: 1.33em;
    border: 1px solid var(--sl-card-border);
    background-color: var(--sl-card-bg);
    padding: .2em;
    border-radius: .25rem;
}

.card .title {
    display: flex;
    font-weight: 600;
    font-size: 1.5rem;
    color: #fff;
    line-height: 1.2;
    gap: 1rem;
    align-items: center;
    margin-top: -10px;
}

.card .body {
    margin-top: 1rem;
    color: white;
}

footer {
    display: flex;
    justify-content: center;
    margin-top: 200px;
    flex-direction: column;
    margin-bottom: 100px;
}

footer div {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

footer .title {
    color: hsl(224, 6%, 56%);
    font-size: 15px;
    margin-bottom: 5px;
}

footer .text {
    color: #fff;
    font-size: 20px;
    margin: 0;
    font-weight: 700;
}



footer svg {
    width: 140px;
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 100px;
    flex-direction: column;
    overflow-x: hidden;
}

main .title {
    align-self: center;
    font-size: 1.8125rem;
    color: #fff;
}



main .card-carousel {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden; /* Empêche le débordement */
}


main .card-carousel .my-card {
    width: 299px;
    position: relative;
    z-index: 1;
    -webkit-transform: scale(0.6) translateY(-2rem);
    transform: scale(0.6) translateY(-2rem);
    opacity: 0;
    cursor: pointer;
    pointer-events: none;
    transition: 1s;


    border: 1px solid hsl(224, 10%, 23%);
    background-color: hsl(224, 10%, 10%);
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
}

main .card-carousel .my-card img {
    width: 100%;
}

main .card-carousel .my-card:after {
    position: absolute;
    height: 2px;
    width: 100%;
    border-radius: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    bottom: -5rem;
    -webkit-filter: blur(4px);
    filter: blur(4px);
}

main .card-carousel .my-card.active {
    z-index: 3;
    -webkit-transform: scale(1) translateY(0) translateX(0);
    transform: scale(1) translateY(0) translateX(0);
    opacity: 1;
    pointer-events: auto;
    transition: 1s;
}

main .card-carousel .my-card.prev,
.card-carousel .my-card.next {
    z-index: 2;
    -webkit-transform: scale(0.8) translateY(-1rem) translateX(0);
    transform: scale(0.8) translateY(-1rem) translateX(0);
    opacity: 0.6;
    pointer-events: auto;
    transition: 1s;
}

main .card-carousel .my-card:nth-child(0):before {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translateX(-50%) translateY(-50%);
    transform: translateX(-50%) translateY(-50%);
    font-size: 3rem;
    font-weight: 300;
    color: #fff;
}

main .card-carousel .my-card:nth-child(1):before {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translateX(-50%) translateY(-50%);
    transform: translateX(-50%) translateY(-50%);
    font-size: 3rem;
    font-weight: 300;
    color: #fff;
}

main .card-carousel .my-card:nth-child(2):before {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translateX(-50%) translateY(-50%);
    transform: translateX(-50%) translateY(-50%);
    font-size: 3rem;
    font-weight: 300;
    color: #fff;
}

main .card-carousel .my-card:nth-child(3):before {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translateX(-50%) translateY(-50%);
    transform: translateX(-50%) translateY(-50%);
    font-size: 3rem;
    font-weight: 300;
    color: #fff;
}

main .card-carousel .my-card:nth-child(4):before {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translateX(-50%) translateY(-50%);
    transform: translateX(-50%) translateY(-50%);
    font-size: 3rem;
    font-weight: 300;
    color: #fff;
}

main .card-carousel .my-card.prev-2,
main .card-carousel .my-card.next-2 {
    z-index: 1;
    transform: scale(0.7) translateY(-1.5rem) translateX(0);
    opacity: 0.4;
}

main .card-carousel .my-card .texte {
    margin-left: 10px;
}

main .card-carousel .my-card h1 {
    font-weight: 600;
    font-size: 1.5rem;
    color: #fff;
    line-height: 1.2;
    margin: 0;
}

main .card-carousel .my-card p {
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 10px;
}


/* Pour les tablettes (écrans plus petits que 1024px) */
@media (max-width: 1024px) and (min-width: 630px) {
    .cards {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 50px;
        --stagger-height: 5rem;
        padding: 20px;
    }

    .card:nth-child(even) {
        margin-top: 0;
    }

    .three {
        margin-top: 0;
    }

    .last {
        margin-top: 0;
    }
}


/* Pour les téléphones (écrans plus petits que 600px) */
@media (max-width: 629px) and (min-width: 351px) {
    .cards {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 50px;
        --stagger-height: 5rem;
        padding: 20px;
    }

    .card:nth-child(even) {
        margin-top: 0;
    }

    .three {
        margin-top: 0;
    }

    .last {
        margin-top: 0 !important;
    }

    .card {
        height: 150px;
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 1s, transform 1s;
    }

    .card.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .card .body {
        margin-top: -10px;
        font-size: 15px;
    }

    .card .title {
        margin-top: -2px;
    }


    main .card-carousel .my-card {
        width: 250px;
        position: relative;
        z-index: 1;
        -webkit-transform: scale(0.6) translateY(-2rem);
        transform: scale(0.6) translateY(-2rem);
        opacity: 0;
        cursor: pointer;
        pointer-events: none;
        transition: 1s;
    
    
        border: 1px solid hsl(224, 10%, 23%);
        background-color: hsl(224, 10%, 10%);
        height: 100%;
        border-radius: 15px;
        overflow: hidden;
    }
    
    footer {
        margin-top: 100px;
    }

}

@media (max-width: 350px) {
    .cards {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 50px;
        --stagger-height: 5rem;
        padding: 20px;
    }

    .card:nth-child(even) {
        margin-top: 0;
    }

    .three {
        margin-top: 0;
    }

    .last {
        margin-top: 0 !important;
    }

    .card {
        height: 150px;
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 1s, transform 1s;
    }

    .card.visible {
        opacity: 1;
        transform: translateY(0);
        /* Déplace la carte à sa position originale */
    }

    .card .body {
        margin-top: -10px;
        font-size: 13px;
    }

    .card .title {
        margin-top: -2px;
    }

    main .card-carousel .my-card {
        width: 240px;
        margin-left: 5px;
    }

}