/* ============================================================
   EXPLORE — Page de découverte des trips publiés
   ============================================================ */

/* ---------- Filter bar ---------- */
.explore-filter-bar {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-gray-200);
    border-radius: 1rem;
    padding: 16px 24px;
}
.explore-filter-bar .form-select-solid {
    min-width: 220px;
}

/* ---------- Trip cards ---------- */
.explore-trip-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.explore-trip-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.1);
}
.explore-trip-card .explore-trip-img {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #2a1b4b, #7239ea);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.explore-trip-card .explore-trip-img i {
    font-size: 3.5rem;
    color: rgba(255,255,255,0.15);
}
.explore-trip-img .explore-price-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(34, 197, 94, 0.9);
    backdrop-filter: blur(6px);
    color: #fff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}
.explore-trip-img .explore-price-free {
    background: rgba(255,255,255,0.2);
}
.explore-trip-img .explore-region-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}
.explore-trip-img .explore-author-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
}
.explore-trip-card .card-body {
    padding: 20px;
}
.explore-trip-card .trip-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--bs-gray-900);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.explore-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--bs-gray-500);
    font-size: 0.8rem;
}
.explore-stat i {
    font-size: 0.85rem;
    color: #7239ea;
}

/* ---------- Empty state ---------- */
.explore-empty {
    padding: 80px 20px;
    text-align: center;
}
.explore-empty i {
    font-size: 4rem;
    color: var(--bs-gray-300);
}

/* ---------- Results count ---------- */
.explore-results-count {
    font-size: 0.85rem;
    color: var(--bs-gray-500);
}

/* ---------- Animations ---------- */
.explore-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.explore-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Step search ---------- */
.explore-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 280px;
}
.explore-search-icon {
    position: absolute;
    left: 12px;
    color: var(--bs-gray-400);
    pointer-events: none;
    z-index: 1;
}
.explore-search-input {
    width: 100%;
    padding: 8px 36px 8px 38px;
    border: 1px solid var(--bs-gray-200);
    border-radius: 0.625rem;
    font-size: 0.85rem;
    background: var(--bs-gray-100);
    color: var(--bs-gray-800);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.explore-search-input:focus {
    border-color: #7239ea;
    box-shadow: 0 0 0 3px rgba(114, 57, 234, 0.1);
    background: #fff;
}
.explore-search-input::placeholder {
    color: var(--bs-gray-400);
}
.explore-search-spinner {
    position: absolute;
    right: 36px;
    width: 16px;
    height: 16px;
    display: none;
}
.explore-search-spinner.active {
    display: block;
    border: 2px solid var(--bs-gray-300);
    border-top-color: #7239ea;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.explore-search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--bs-gray-400);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 50%;
    transition: color 0.15s;
}
.explore-search-clear:hover {
    color: var(--bs-gray-700);
}

/* ---------- Autocomplete dropdown ---------- */
.explore-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--bs-gray-200);
    border-radius: 0.625rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 50;
    display: none;
    max-height: 320px;
    overflow-y: auto;
}
.explore-search-results.open {
    display: block;
}
.explore-search-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.explore-search-result:hover {
    background: var(--bs-gray-100);
}
.explore-search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(114, 57, 234, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7239ea;
    flex-shrink: 0;
}
.explore-search-result-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--bs-gray-800);
}
.explore-search-result-count {
    font-size: 0.7rem;
    color: var(--bs-gray-400);
    font-weight: 500;
    white-space: nowrap;
    margin-left: auto;
}

/* ---------- Matched step badge ---------- */
.explore-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(114, 57, 234, 0.08);
    color: #7239ea;
    font-size: 0.73rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
    .explore-filter-bar {
        flex-direction: column !important;
    }
    .explore-filter-bar .form-select-solid {
        min-width: 100%;
    }
    .explore-search-wrap {
        min-width: 100%;
    }
    .explore-trip-card .explore-trip-img {
        height: 160px;
    }
}
