.carousel-container {
    width: 98%;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    padding: 15px;
}

.carousel-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    padding-left: 0;
    padding:5px;
    white-space: nowrap;
    will-change: transform;
    transition: transform 0.3s ease;
}

.carousel-item {
    flex: 0 0 150px;
    height: 110px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #111;
    box-shadow: 0 0px 5px rgba(0, 255, 255, 0.9);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease, filter 0.1s linear;
    cursor: pointer;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.1s linear;
}

.carousel-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 4px 5px;
    font-size: 0.7rem;
    background: rgba(0,0,0,0.65);
    color: var(--neon);
    text-align: center;
    border-top: 1px solid rgba(0,255,153,0.12);
    transition: transform 0.3s ease;
}

@keyframes border-flash {
    0%, 100% { border-color: var(--neon); }
    50% { border-color: rgba(0,255,153,0.2); }
}

@keyframes psychedelic-strobo {
    0% { filter: hue-rotate(0deg) brightness(1) saturate(1); }
    10% { filter: hue-rotate(60deg) brightness(1.2) saturate(1.5); }
    20% { filter: hue-rotate(120deg) brightness(0.9) saturate(1.8); }
    30% { filter: hue-rotate(180deg) brightness(1.1) saturate(1.3); }
    40% { filter: hue-rotate(240deg) brightness(1.2) saturate(1.6); }
    50% { filter: hue-rotate(300deg) brightness(1) saturate(1.2); }
    60% { filter: hue-rotate(360deg) brightness(1.3) saturate(1.5); }
    70% { filter: hue-rotate(420deg) brightness(0.8) saturate(1.7); }
    80% { filter: hue-rotate(480deg) brightness(1.1) saturate(1.4); }
    90% { filter: hue-rotate(540deg) brightness(1.2) saturate(1.6); }
    100% { filter: hue-rotate(600deg) brightness(1) saturate(1.2); }
}

.carousel-item:hover {
    transform: scale(1.07) rotateZ(3deg);
    box-shadow: 0 0 8px 4px rgba(0,255,153,0.5);
    animation: border-flash 0.6s infinite, psychedelic-strobo 0.6s infinite linear;
}

.carousel-item:hover img {
    transform: scale(1.15);
}

.carousel-item:hover .carousel-title {
    transform: translateY(10px);
}

/* Boutons collés sur les côtés et pleine hauteur */
.carousel-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: var(--neon);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.3s;
}

/* Effet au survol */
.carousel-btn:hover {
    color: rgba(0, 0, 0, 0.5);
    background-color: rgba(0, 255, 153, 0.5);
    transform: scale(1.05);
}

/* Bouton gauche : arrondir les coins droits */
.carousel-btn.left { 
    left: 0;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Bouton droit : arrondir les coins gauches */
.carousel-btn.right { 
    right: 0;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

/* Responsive */
@media (max-width: 1024px) {
    .carousel-item { flex: 0 0 140px; height: 100px; }
    .carousel-btn { width: 30px; font-size: 1.5rem; }
}

@media (max-width: 768px) {
    .carousel-item { flex: 0 0 120px; height: 90px; }
    .carousel-btn { width: 28px; font-size: 1.3rem; }
}

@media (max-width: 480px) {
    .carousel-item { flex: 0 0 100px; height: 75px; }
    .carousel-btn { width: 24px; font-size: 1rem; }
}
