/* =========================================================================
   SHAPINGBOOK – CSS FOR EXPLORE.HTML
   Styles for the search bar, results, pagination, and navigation tabs
   ========================================================================= */

/* Divider sous la barre de recherche */
.explore-divider {
    position: relative;
}

.explore-divider::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #dcdcdc;
}

/* Navigation tabs */
.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: #222222;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #000000;
}

.nav-link.active {
    color: #000000;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #000000;
}

/* Search bar */
.search-bar {
    border: 1px solid #dcdcdc;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    height: 70px;
    padding: 0.75rem 1rem;
    position: relative;
    align-items: center;
}

.search-field {
    position: relative;
}

.search-field:first-child {
    flex: 1;
    margin-right: 1rem;
    margin-left: 0.5rem;
}

.search-field:first-child::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    bottom: 25%;
    width: 1px;
    background-color: #dcdcdc;
}

.search-field:last-child {
    flex: 0.8;
    margin-right: 0.5rem;
}

.search-field label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #222222;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.search-field select,
.search-field input {
    font-size: 0.95rem;
    color: #222222;
    padding: 0;
    height: 1.5rem;
}

.search-field select::placeholder,
.search-field input::placeholder {
    color: #999;
}

.search-btn {
    width: 48px;
    height: 48px;
    background-color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    margin-left: 0.5rem;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.suggestions-list div {
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.suggestions-list div:hover {
    background-color: #f7f7f7;
}

.suggestions-list .no-match {
    color: #717171;
    cursor: default;
}

/* Résultats */
#resultsContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.shaping-card {
    margin: 8px 4px; /* Marges verticales augmentées */
}

@media (max-width: 576px) {
    #resultsContainer {
        justify-content: center;
    }

    .shaping-card {
        margin: 8px auto; /* Marges verticales augmentées, centrage horizontal */
    }

    .search-bar {
        height: 60px;
        padding: 0.5rem 0.75rem;
        border-radius: 40px;
    }

    .search-field:first-child {
        min-width: 140px; /* Largeur réduite pour le champ activité */
        margin-right: 0.4rem;
        margin-left: 0.25rem;
    }

    .search-field:last-child {
        max-width: 130px; /* Largeur augmentée pour le champ localisation */
        margin-right: 0.25rem;
    }

    .search-field label {
        font-size: 0.7rem;
    }

    .search-field select,
    .search-field input {
        font-size: 0.85rem;
        height: 1.2rem;
    }

    .search-btn {
        width: 32px;
        height: 32px;
        margin-left: 0.5rem;
    }

    .search-btn i {
        font-size: 0.8rem;
    }

    .suggestions-list {
        min-width: 160px; /* Largeur minimale pour afficher les suggestions complètes */
        left: -15px; /* Centrer sous le champ localisation */
    }

    .suggestions-list div {
        white-space: nowrap; /* Empêcher le retour à la ligne */
    }
}

/* Pagination */
.page-btn {
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
}

.page-btn:hover:not(.disabled) {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.3);
    color: rgba(0, 0, 0, 0.9);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.95rem;
    font-weight: 500;
    color: #222222;
    margin: 0 1rem;
}