html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.carousel{
    margin: 100px auto;
    width: 90%;
    display: flex;
    overflow-x:auto;
    border-radius:10px;
    position: relative;
}
.carousel::-webkit-scrollbar{
    display:none;
}
.group{
    display:flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    animation: spin 35s infinite linear;
    padding-right: 1em;
}
.card{
    flex: 0 0 auto;
    /*height: 5em;*/
    /*padding: 1em;*/
    /*background: cornflowerblue;*/
    /*font-size: 3rem;*/
    border-radius: .2em;
    /*text-align: center;*/
    align-content: center;
    width: 1400px;
    height: 800px;
    overflow: hidden;
}
.card img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}
@keyframes spin{
    from{translate: 0;}
    to {translate: -100%;}
}
.carousel-title {
    background-color: rgba(255, 255, 255, 0.38);
    border-radius: 15px;
    padding: 10px;
    text-align:center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    font-size: 3.5rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(0,0,0,0.9);
    z-index: 20; /* au-dessus de l'image et du fondu */
    pointer-events: none; /* on peut cliquer à travers */
}
.btn-decouvrir {
    padding: .8rem 2rem;
    background: linear-gradient(135deg, #4e8cff, #0056d6);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.btn-decouvrir:hover {
    transform: translate(-50%, -53%) scale(1.05); /*  zoom */
}
.carousel-btn {
    position: absolute;
    top: 68%;           /* ajuste la hauteur du bouton */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 30;        /* au-dessus des images */
}


/* --- Responsive mobile --- */
@media (max-width: 768px) {
    .card {
        width: 100%;
        height: 450px; 
    }

    .carousel-title {
        font-size: 2rem; /* réduction du titre */
        top: 42%; 
    }

    .carousel-btn {
        top: 70%; 
    }

    .btn-decouvrir{
        font-size: 1rem;
        padding: .6rem 1.5rem;
    }
}

@media (max-width: 480px){
    .card {
        height: 380px; 
    }
    .carousel-title {
        font-size: 1.7rem;
        top: 40%;
    }
    .carousel-btn {
        top: 72%;
    }
    .btn-decouvrir{
        font-size: .9rem;
        padding: .5rem 1.2rem;
    }
}

.group{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:0;               
    padding-right:0;      
    animation: spin 35s infinite linear; 
}
/* Mobile optimisation */
@media(max-width:768px){
    .group{
        animation-duration:10s; 
    }
}
