/* Styles pour le slider des photos d'impact sur mobile */

/* Conteneur de base pour le slider */
.impact-slider-container {
    width: 100%;
    overflow: hidden;
    padding: 10px 0 30px;
    position: relative;
    -webkit-tap-highlight-color: transparent; /* Supprimer le surlignage au tap */
    touch-action: pan-y; /* Permettre le scroll vertical mais pas horizontal */
}

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

/* Le slider lui-même */
.impact-slider {
    display: flex;
    width: 100%;
    padding: 0 15px;
    cursor: grab;
    will-change: transform; /* Optimisation de performance */
}

/* Styles pour les cartes dans le slider */
.impact-slider .slider-card {
    min-width: calc(85% - 20px); /* Largeur des cartes dans le slider */
    margin-right: 15px;
    flex-shrink: 0;
    position: relative;
    user-select: none; /* Éviter la sélection de texte pendant le swipe */
}

/* Ajouter des icônes de swipe sur la première carte */
.impact-slider .slider-card:first-child::before {
    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.2);
    opacity: 0.8;
    animation: pulse 2s infinite;
}

/* Pulse animation pour attirer l'attention */
@keyframes pulse {
    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 un swipe */
.touch-device .impact-slider .slider-card:first-child::before {
    animation: fadeOut 0.5s forwards 2s;
}

@keyframes fadeOut {
    to { opacity: 0; }
}

/* Styles actifs pendant le swipe */
.impact-slider.swipable:active {
    cursor: grabbing;
}

/* Indicateurs du slider */
.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.slider-indicators .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(124, 137, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    /* Agrandir la zone de tap pour faciliter le tap sur mobile */
    position: relative;
}

.slider-indicators .indicator::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
}

.slider-indicators .indicator.active {
    background-color: #7C89FF;
    transform: scale(1.2);
}

/* Styles spécifiques pour les indicateurs des photos d'impact */
.impact-indicators {
    margin-top: 15px;
}

/* Masquer le slider sur desktop et afficher la grille */
@media (min-width: 769px) {
    .mobile-only {
        display: none;
    }
}

/* Masquer la grille sur mobile et afficher le slider */
@media (max-width: 768px) {
    .desktop-grid {
        display: none;
    }
    
    /* Ajustements pour le slider sur mobile */
    .impact-slider-container {
        margin-top: 20px;
    }
    
    /* Désactiver les effets de hover sur mobile */
    .impact-slider .impact-photo-card:hover {
        transform: none;
        box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    }
    
    .impact-slider .impact-photo-card:hover .impact-photo {
        transform: none;
    }
}
