* { margin: 0; padding: 0; box-sizing: border-box; }

.carousel-container {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 550px;
    font-family: 'Inter', sans-serif;
    background-color: var(--fond-clair);
    overflow: hidden;
    padding: 40px 0;
    background-size: cover;
    background-position: center;
    transition: background-image 0.75s ease-in-out;
}
.carousel-container::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.8); z-index: 0;
}
.slider { height: 100%; position: relative; z-index: 1; }
.item {
    list-style-type: none; position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 1; border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.75s ease; background-size: cover; background-position: center;
    overflow: hidden;
}
.item::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 16px; z-index: 1; transition: all 0.5s ease;
}
.item::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 8px;
    border-radius: 16px 16px 0 0; z-index: 2;
}
.item.orange::after { background-color: #EF6C35; } .item.red::after { background-color: #EF233C; }
.item.blue::after { background-color: #7AC3E2; } .item.yellow::after { background-color: #F3B900; }
.item.darkblue::after { background-color: #2A3083; } .item.green::after { background-color: #86B554; }
.item.lightyellow::after { background-color: #FFEE00; }

/* Styles pour la disposition des cartes sur ORDINATEUR */
.item:nth-child(1) { left: -50%; opacity: 0; z-index: 0; }
.item:nth-child(2) { left: 5%; width: 40%; height: 85%; z-index: 2; }
.item:nth-child(3) { left: 58%; width: 220px; height: 320px; }
.item:nth-child(4) { left: calc(58% + 240px); width: 220px; height: 320px; }
.item:nth-child(5) { left: calc(58% + 480px); width: 220px; height: 320px; }
.item:nth-child(n+6) { left: calc(58% + 720px); opacity: 0; }

.item:nth-child(2) { background-image: none !important; }
.item:nth-child(2)::before { background-color: rgba(255, 255, 255, 0.4); backdrop-filter: blur(10px); }
.item:nth-child(n+3)::before { background-color: rgba(0, 0, 0, 0.25); backdrop-filter: blur(5px); }

.content { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px; text-align: center; z-index: 3; }
.content .description, .content .card-button { opacity: 0; transform: translateY(15px); transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s; }
.item:nth-child(2) .content .description, .item:nth-child(2) .content .card-button { opacity: 1; transform: translateY(0); }
.item:nth-child(2) .content .service-icon { height: 80px; width: 80px; margin-bottom: 0px; }
.item:nth-child(2) .content .title { font-family: 'Urbanist', sans-serif; text-transform: uppercase; color: var(--pantone-rouge); font-size: 38px; font-weight: 700; }
.item:nth-child(2) .content .description { font-family: 'Montserrat', sans-serif; font-weight: 500; line-height: 1.6; margin: 1rem 0 1.5rem; font-size: 30px; color: var(--texte); max-width: 450px; }
.item:nth-child(2) .content .card-button { }

.item:nth-child(n+3) .content { justify-content: center; }
.item:nth-child(n+3) .content .service-icon { height: 60px; width: 60px; }
.item:nth-child(n+3) .content .title { font-size: 20px; font-weight: 600; color: var(--blanc); }

.nav { position: absolute; bottom: 1rem; left: 75%; transform: translateX(-50%); z-index: 5; }
.nav .btn { background-color: rgba(0, 0, 0, 0.1); color: var(--texte); border: 1px solid rgba(0, 0, 0, 0.2); margin: 0 0.5rem; padding: 0.75rem; border-radius: 50%; cursor: pointer; }
.nav .btn:hover { background-color: var(--pantone-rouge); color: var(--blanc); }


@media (max-width: 992px) {
    .carousel-container {
        height: auto;
        min-height: 580px; 
        padding: 40px 20px;
    }
    .slider {
        height: 420px; 
    }

  
    .item:nth-child(2) {
        width: 90% !important;
        max-width: 400px;
        height: 100% !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        opacity: 1 !important;
    }


    .item:nth-child(1) {
        transform: translate(-150%, -50%) scale(0.8) !important;
        opacity: 0 !important;
    }


    .item:nth-child(n+3) {
        transform: translate(50%, -50%) scale(0.8) !important;
        opacity: 0 !important;
        left: 50% !important;
    }

    .nav {
        position: relative;
        left: 50%;
        bottom: auto;
        transform: translateX(-50%);
        margin-top: 2rem;
        display: block; 
    }

     .item:nth-child(2) .content .title { font-size: 28px; }
    .item:nth-child(2) .content .description { font-size: 18px; }
}
