.cd-carousel {
    position: relative;
    max-width: 620px;
    overflow: hidden;
}

.cd-carousel__track {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 8px 4px 16px;
    touch-action: pan-y;
}

.cd-carte {
    flex: 0 0 auto;
    width: 220px;
    aspect-ratio: 3 / 3.4;
    border-radius: 20px;
    background-color: var(--lidfsg-blue-dark);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 20px rgba(0, 114, 187, 0.2);
}

.cd-carte--active {
    width: 280px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 16px 32px rgba(0, 114, 187, 0.35);
    z-index: 2;
}

.cd-carte::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.65) 100%);
}

.cd-carte--sans-image {
    background-image: linear-gradient(135deg, var(--lidfsg-blue) 0%, var(--lidfsg-blue-dark) 100%) !important;
}

.cd-carte__nom {
    position: relative;
    z-index: 1;
    color: white;
    font-family: var(--lidfsg-font-title);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    padding: 20px;
}

.cd-carte__credit {
    position: absolute;
    z-index: 1;
    right: 10px;
    bottom: 8px;
    font-family: var(--lidfsg-font-body);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cd-carte:hover .cd-carte__credit {
    opacity: 1;
}

.cd-carousel__nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

button.cd-carousel__fleche {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: var(--lidfsg-blue-dark) !important;
    color: white !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

button.cd-carousel__fleche:hover {
    background: white !important;
    color: #1A1A1D !important;
}

@media (max-width: 640px) {
    .cd-carte {
        width: 150px;
    }

    .cd-carte--active {
        width: 210px;
    }

    .cd-carte__nom {
        font-size: 1.1rem;
        padding: 16px;
    }

    .cd-carte[data-cd-slot="2"] {
        display: none;
    }
}
