/* ===== OPTIMISATION POUR LES ÉCRANS TACTILES ===== */

/* Amélioration des interactions tactiles pour tous les appareils */
.btn, .nav-link, .mobile-menu-toggle {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    cursor: pointer;
}

/* Gestion spéciale pour les cartes d'animaux (scroll autorisé) */
.animal-card {
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    touch-action: pan-y; /* Permet le scroll vertical */
}

/* Conteneurs de scroll */
.animals-grid, .main, .container {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
    touch-action: pan-y; /* Permet le scroll vertical */
}

/* Feedback visuel pour les interactions tactiles */
.btn:active, .nav-link:active, .animal-card:active, .mobile-menu-toggle:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Amélioration des boutons sur écrans tactiles */
@media (hover: none) and (pointer: coarse) {
    .btn, .nav-link, .mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
    }
    
    .btn-sm {
        min-height: 36px;
        min-width: 36px;
        padding: 8px 16px;
    }
}

/* Amélioration des cartes d'animaux tactiles */
.animal-card {
    transition: transform 0.2s ease;
}

.animal-card:active {
    transform: scale(0.98);
}

/* Amélioration du menu mobile tactile */
.mobile-menu-toggle {
    transition: all 0.2s ease;
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
    background-color: rgba(255,255,255,0.3);
}

/* Amélioration des liens de navigation tactiles */
.nav-link {
    transition: all 0.2s ease;
}

.nav-link:active {
    transform: scale(0.98);
    background-color: rgba(255,255,255,0.4);
}

/* Prévention du zoom sur les inputs tactiles */
input, select, textarea {
    font-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Amélioration des zones de clic */
.btn, .nav-link, .animal-card {
    position: relative;
    overflow: hidden;
}

/* Effet de ripple pour les interactions tactiles */
.btn::before, .nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    pointer-events: none;
}

.btn:active::before, .nav-link:active::before {
    width: 200px;
    height: 200px;
}
