/* Styles spécifiques pour indiquer que le slider des cartes de communauté est swipable */

/* Indicateur de swipe */
.mobile-slider-wrapper {
    position: relative;
}

/* Ajouter des ombres latérales pour indiquer qu'il y a plus de contenu */
.mobile-slider-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 30px;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.7));
    pointer-events: none;
    z-index: 2;
}

.mobile-slider-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 30px;
    background: linear-gradient(to left, rgba(255,255,255,0), rgba(255,255,255,0.7));
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Montrer l'ombre gauche quand on n'est pas à la première diapositive */
.mobile-slider-wrapper.moved::before {
    opacity: 1;
}

/* Ajouter un indicateur de swipe sur la première carte */
.touch-device .mobile-slider .slider-card:first-child::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237C89FF'%3E%3Cpath d='M9.5 17.5l5-5-5-5'/%3E%3C/svg%3E");
    background-size: 60%;
    background-position: center;
    background-repeat: no-repeat;
    transform: translateY(-50%);
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.8;
    animation: pulsate 2s infinite;
}

/* Animation de pulsation pour attirer l'attention */
@keyframes pulsate {
    0% { transform: translateY(-50%) scale(1); opacity: 0.8; }
    50% { transform: translateY(-50%) scale(1.1); opacity: 1; }
    100% { transform: translateY(-50%) scale(1); opacity: 0.8; }
}

/* Masquer l'indicateur après le premier swipe */
.touch-device.swiped .mobile-slider .slider-card:first-child::after {
    animation: fadeAway 0.5s forwards;
}

@keyframes fadeAway {
    to { opacity: 0; visibility: hidden; }
}

/* Style pour le curseur grab/grabbing */
.mobile-slider.swipable {
    cursor: grab;
}

.mobile-slider.swipable:active {
    cursor: grabbing;
}

/* Désactiver les ombres du wrapper sur desktop pour éviter les bugs visuels */
@media (min-width: 992px) {
    .mobile-slider-wrapper::before,
    .mobile-slider-wrapper::after {
        display: none;
    }
}

/* Ajustements pour les cartes */
.mobile-slider .feature-item.slider-card {
    position: relative;
    user-select: none; /* Éviter la sélection de texte pendant le swipe */
    -webkit-tap-highlight-color: transparent; /* Supprimer le surlignage au tap */
}

/* Désactiver les transitions de hover sur mobile */
@media (max-width: 768px) {
    .feature-item.slider-card:hover {
        transform: none !important;
        box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08) !important;
    }
}
