
/* ── Tabs de recherche ── */
.search-tabs {
    display: inline-flex;
    gap: 0;
    margin-bottom: 1rem;
    background: white;
    border-radius: 50px;
    padding: 4px;
    animation: fadeInUp 0.5s ease-out;
    flex-wrap: nowrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.search-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.25rem;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: #888;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.search-tab:hover {
    color: #2c3e50;
    background: #f0f2f5;
}

.search-tab.active {
    background: #2c3e50;
    color: white;
    box-shadow: 0 2px 8px rgba(44,62,80,0.3);
}

/* ── Tab panels ── */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

/* ── Barre sticky ── */
.search-sticky-bar {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 1.5rem;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.sticky-bar-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #2c3e50;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sticky-bar-modifier-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 1rem;
    border: 1.5px solid #2c3e50;
    border-radius: 50px;
    background: white;
    color: #2c3e50;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.sticky-bar-modifier-btn:hover {
    background: #2c3e50;
    color: white;
}

@media (max-width: 576px) {
    .search-tabs { width: 100%; justify-content: stretch; }
    .search-tab  { flex: 1; justify-content: center; font-size: 0.82rem; padding: 0.4rem 0.75rem; }
    .search-sticky-bar { top: 56px; padding: 0.5rem 1rem; }
    .sticky-bar-label  { font-size: 0.8rem; }
    /* Annuler la règle de index.css qui cache le widget MacroSearch sur mobile */
    #macro-search-widget { display: block; }
}

/* ── Widget Géolocalisation ── */
.geosearch-widget {
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease-out;
}

.geosearch-card {
    background: white;
    border-radius: 12px;
    margin: 0 0 1.25rem 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e0d8f0;
}

.geosearch-card-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #f5f6fa 0%, #eef0f3 100%);
    border-bottom: 1px solid #dde0e5;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    gap: 0.3rem;
}

.geosearch-card-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Ligne catégories */
.geosearch-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Ligne action */
.geosearch-action-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-top: 1px solid #eee;
    padding-top: 0.75rem;
}

.geosearch-radius-label {
    font-size: 0.78rem;
    color: #777;
    font-weight: 500;
    white-space: nowrap;
}

/* Bouton étape 1 : Me géolocaliser (outline) */
.geosearch-locate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.375rem 1rem;
    height: 36px;
    background: white;
    color: #2c3e50;
    border: 1.5px solid #2c3e50;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.geosearch-locate-btn:hover    { background: #f0f2f5; }
.geosearch-locate-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Séparateur vertical */
.geosearch-sep-v {
    display: inline-block;
    width: 1px;
    height: 22px;
    background: #ddd;
    flex-shrink: 0;
}

/* Bouton étape 2 : Voir les résultats (primary, disabled par défaut) */
.geosearch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.375rem 1.1rem;
    height: 36px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}
.geosearch-btn:hover            { background: #3d5166; transform: translateY(-1px); }
.geosearch-btn:disabled         { opacity: 0.35; cursor: not-allowed; transform: none; }

/* Sélecteur rayon */
.geosearch-radius-select {
    height: 36px;
    padding: 0 0.65rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 50px;
    background: white;
    font-size: 0.78rem;
    color: #555;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

/* Boutons catégorie */
.geosearch-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.75rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 50px;
    background: white;
    color: #555;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.geosearch-cat-btn:hover  { background: #f5f5f5; border-color: #bbb; }
.geosearch-cat-btn.active { background: #2c3e50; border-color: #2c3e50; color: white; }

/* Icônes colorées par catégorie */
.geosearch-cat-btn[data-cat="manifestation"] i { color: #3498db; }
.geosearch-cat-btn[data-cat="activite"] i      { color: #27ae60; }
.geosearch-cat-btn[data-cat="hebergement"] i   { color: #e67e22; }
.geosearch-cat-btn[data-cat="restaurant"] i    { color: #9b59b6; }
.geosearch-cat-btn[data-cat="itineraire"] i    { color: #555; }
.geosearch-cat-btn.active i { color: white !important; }

.geosearch-status {
    margin: 0;
    font-size: 0.8rem;
    min-height: 1em;
}
.geosearch-status--error   { color: #c0392b; }
.geosearch-status--info    { color: #2980b9; }
.geosearch-status--success { color: #27ae60; font-weight: 600; }
.geosearch-status--warn    { color: #e67e22; font-weight: 600; }

.geosearch-hint {
    margin: 0;
    font-size: 0.74rem;
    color: #999;
    font-style: italic;
}

/* ── Scroll offset pour le hero (compense la navbar fixe) ── */
#search-hero {
    scroll-margin-top: 70px;
}

/* ── Hero compact (quand résultats auto affichés) ── */
#search-hero.search-hero--compact {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    min-height: auto !important;
}
#search-hero.search-hero--compact .hero-title,
#search-hero.search-hero--compact .hero-subtitle,
#search-hero.search-hero--compact .search-tabs {
    display: none !important;
}
#search-hero.search-hero--compact .tab-panel.active {
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* ── Badge distance sur les cards ── */
.card-distance {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #2c3e50;
    background: #e8f4fd;
    border: 1px solid #b8d4ea;
    border-radius: 12px;
    padding: 0.1rem 0.5rem;
}

/* ══════════════════════════════════════
   RESPONSIVE — Page /recherche/
   ══════════════════════════════════════ */

/* ── Tablette portrait (< 768px) ── */
@media (max-width: 768px) {
    .resultats-results-container {
        padding: 0 1rem 1.5rem;
    }
    .rlt-synthesis {
        padding: 1rem 1.1rem;
    }
    .rlt-count-num { font-size: 1.6rem; }
}

/* ── Mobile (< 576px) ── */
@media (max-width: 576px) {
    /* Widget géoloc */
    .geosearch-card-body          { padding: 0.85rem 1rem; }
    .geosearch-btn,
    .geosearch-locate-btn         { font-size: 0.8rem; margin-left: 0; }
    .geosearch-radius-label,
    .geosearch-sep-v              { display: none; }

    /* Hero */
    .hero-title   { font-size: 1.4rem !important; }
    .hero-subtitle { font-size: 0.88rem !important; display: none; }

    /* Container résultats */
    .resultats-results-container {
        padding: 0 0.75rem 1rem;
    }

    /* Synthèse */
    .rlt-synthesis {
        padding: 0.85rem 1rem;
        border-radius: 10px;
        margin-bottom: 1rem;
    }
    .rlt-count-num { font-size: 1.4rem; }
    .rlt-count-lbl { font-size: 0.88rem; }

    /* Boutons Vue Grille / Vue Carte — pleine largeur, empilés */
    .d-flex.justify-content-end.mb-3 {
        justify-content: stretch !important;
    }
    .d-flex.justify-content-end.mb-3 button {
        flex: 1 !important;
        max-width: none !important;
        font-size: 0.82rem;
    }

    /* Headers département/activité dans la grille */
    .department-header { font-size: 1.1rem !important; }
    .activity-header   { font-size: 0.95rem !important; }
}

/* ── Page /recherche/ : masquer les thèmes dans le header MacroSearch (déjà dans GeoSearch) ── */
.macro-header-themes { display: none; }

/* ── Synthèse des résultats ── */
.rlt-synthesis { background: linear-gradient(135deg,#f5f6fa 0%,#eef0f3 100%); border:1px solid #dde0e5; border-radius:14px; padding:1.25rem 1.5rem; margin-bottom:1.5rem; display:flex; flex-direction:column; gap:0.75rem; scroll-margin-top: 150px; }
.rlt-synthesis-count { display:flex; align-items:baseline; gap:0.5rem; }
.rlt-count-num { font-size:2rem; font-weight:800; color:#2c3e50; line-height:1; }
.rlt-count-lbl { font-size:1rem; color:#555; font-weight:500; }
.rlt-synthesis-tags { display:flex; flex-wrap:wrap; gap:0.5rem; }
.rlt-tag { display:inline-flex; align-items:center; gap:0.35rem; padding:0.35rem 0.85rem; border-radius:20px; font-size:0.84rem; font-weight:500; background:white; border:1.5px solid #ddd; color:#444; }
.rlt-tag--loc  { border-color:#2c3e50; color:#2c3e50; }
.rlt-tag--date { border-color:#2196F3; color:#1565C0; }
.rlt-tag--act  { border-color:#43A047; color:#2E7D32; }
.rlt-synthesis-stats { display:flex; flex-wrap:wrap; gap:1.25rem; font-size:0.84rem; color:#777; border-top:1px solid #dde0e5; padding-top:0.75rem; }
.rlt-synthesis-stats span { display:inline-flex; align-items:center; gap:0.4rem; }
.rlt-synthesis-stats i { color:#2c3e50; }

.resultats-results-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 2rem 2rem;
    scroll-margin-top: 90px;
}

/* ─── Anciens styles critères (conservés pour compatibilité) ─── */
.resultats-criteres-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.85rem 2rem;
    background: white;
    border-bottom: 1px solid #e8e8e8;
    max-width: 100%;
}

.criteres-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
}

.critere-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    background: #eef0f3;
    color: #2c3e50;
    font-size: 0.82rem;
    font-weight: 600;
}

.critere-chip.critere-cat {
    background: #2c3e50;
    color: white;
}

.btn-modifier-criteres {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    border: 1.5px solid #2c3e50;
    color: #2c3e50;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-modifier-criteres:hover {
    background: #2c3e50;
    color: white;
}
