/**
 * Nom du fichier : search.results.css
 * Description : Styles pour la page de résultats de recherche publique.
 *               Cartes résultats, filtres, états vides, responsive.
 * Module : Search
 * Auteur : Reserva
 * Date de création : 13/04/2026
 * Dernière modification : 13/04/2026
 */

/* === Cartes résultats === */

/* Animation d'apparition progressive des cartes */
.search-result-card {
    animation: searchCardAppear 0.3s ease-out forwards;
    opacity: 0;
    transform: translateY(8px);
}

/* Délai progressif pour chaque carte (effet cascade) */
.search-result-card:nth-child(1) { animation-delay: 0.05s; }
.search-result-card:nth-child(2) { animation-delay: 0.1s; }
.search-result-card:nth-child(3) { animation-delay: 0.15s; }
.search-result-card:nth-child(4) { animation-delay: 0.2s; }
.search-result-card:nth-child(5) { animation-delay: 0.25s; }
.search-result-card:nth-child(6) { animation-delay: 0.3s; }
.search-result-card:nth-child(7) { animation-delay: 0.35s; }
.search-result-card:nth-child(8) { animation-delay: 0.4s; }
.search-result-card:nth-child(9) { animation-delay: 0.45s; }
.search-result-card:nth-child(10) { animation-delay: 0.5s; }
.search-result-card:nth-child(11) { animation-delay: 0.55s; }
.search-result-card:nth-child(12) { animation-delay: 0.6s; }

@keyframes searchCardAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Feedback tactile sur mobile */
.search-result-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* === Filtres sur mobile === */

/* Animation ouverture/fermeture des filtres */
#filters-bar.show-mobile {
    display: flex !important;
    flex-direction: column;
    animation: filtersSlideDown 0.2s ease-out;
}

@keyframes filtersSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sur mobile, les filtres prennent toute la largeur */
@media (max-width: 767px) {
    #filters-bar > div {
        width: 100%;
        min-width: 100% !important;
    }
}

/* === Pagination Laravel — style Reserva === */
nav[role="navigation"] {
    display: flex;
    justify-content: center;
}

nav[role="navigation"] .flex.justify-between {
    display: none;
}

nav[role="navigation"] span[aria-current="page"] span {
    background-color: #0E7490 !important;
    border-color: #0E7490 !important;
    color: white !important;
}

nav[role="navigation"] a:hover {
    background-color: #f0fdfa;
    color: #0E7490;
}

/* === Barre de recherche sticky — safe area iOS === */
@supports (padding-top: env(safe-area-inset-top)) {
    .sticky.top-0 {
        padding-top: env(safe-area-inset-top);
    }
}

/* === Impression === */
@media print {
    /* Masquer la barre de recherche et les filtres */
    .sticky.top-0,
    #filters-bar,
    #toggle-filters-btn,
    nav[role="navigation"] {
        display: none !important;
    }

    /* Les cartes sans ombre ni animation */
    .search-result-card {
        animation: none;
        opacity: 1;
        transform: none;
        box-shadow: none;
        border: 1px solid #e5e7eb;
        break-inside: avoid;
    }
}

/* === Animations réduites === */
@media (prefers-reduced-motion: reduce) {
    .search-result-card {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .search-result-card:active {
        transform: none;
    }

    #filters-bar.show-mobile {
        animation: none;
    }
}
