/* Résultats recherche — onglets + lignes (style app mobile) */

.recherche-results-wrap {
    --recherche-blue: #2563eb;
    --recherche-bg: #f3f4f6;
    --recherche-white: #ffffff;
    --recherche-border: #e5e7eb;
    --recherche-text: #111827;
    --recherche-muted: #6b7280;

    width: 100%;
    box-sizing: border-box;
    padding-top: 8px;
}

/* Onglets horizontaux */
.recherche-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 0 10px;
    margin-bottom: 8px;
    border-bottom: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.recherche-tabs::-webkit-scrollbar {
    display: none;
}

.recherche-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid var(--recherche-border);
    border-radius: 8px;
    background: var(--recherche-white);
    color: var(--recherche-text);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
    font-family: inherit;
}

.recherche-tab i {
    font-size: 12px;
    color: var(--recherche-muted);
}

.recherche-tab.active {
    background: var(--recherche-blue);
    border-color: var(--recherche-blue);
    color: #fff;
}

.recherche-tab.active i {
    color: #fff;
}

.recherche-tab.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    margin-left: -4px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--recherche-blue);
}

.tab-content {
    width: 100%;
    padding: 0 0 12px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Liste de résultats — bloc blanc avec séparateurs */
.recherche-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--recherche-white);
    border: 1px solid var(--recherche-border);
    border-radius: 10px;
    overflow: hidden;
}

.recherche-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--recherche-white);
    border: none;
    border-bottom: 1px solid var(--recherche-border);
    border-radius: 0;
    text-decoration: none;
    color: inherit;
    min-height: 52px;
    box-sizing: border-box;
}

.recherche-row:last-child {
    border-bottom: none;
}

.recherche-row:hover {
    background: #f9fafb;
}

.recherche-row-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recherche-row-avatar--square {
    border-radius: 8px;
}

.recherche-row-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.recherche-row-letter {
    font-size: 15px;
    font-weight: 700;
    color: var(--recherche-muted);
}

.recherche-row-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1.3;
}

.recherche-row-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--recherche-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recherche-row-title--blue {
    color: var(--recherche-blue);
}

.recherche-row-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
}

.recherche-row-badges .badge-icon {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    object-fit: cover;
}

.recherche-row-chevron {
    color: #9ca3af;
    font-size: 13px;
    flex-shrink: 0;
}

.recherche-row--hash {
    justify-content: space-between;
}

.recherche-meta {
    margin: 0;
    font-size: 11px;
    color: var(--recherche-muted);
    line-height: 1.3;
}

.recherche-stat {
    font-size: 12px;
    font-weight: 700;
    color: var(--recherche-text);
    white-space: nowrap;
    flex-shrink: 0;
}

.recherche-stat-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 52px;
    flex-shrink: 0;
}

.recherche-stat-secondary {
    font-size: 11px;
    font-weight: 600;
    color: var(--recherche-blue);
}

.recherche-live-pill {
    color: #ef4444;
    font-weight: 800;
    font-size: 10px;
}

.recherche-event-pill {
    color: var(--recherche-blue);
    font-weight: 800;
    font-size: 10px;
}

.no-result {
    margin: 16px 8px;
    font-size: 13px;
    color: var(--recherche-muted);
    text-align: center;
}

/* Grille produits */
.recherche-produits-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.recherche-produit-card {
    display: flex;
    flex-direction: column;
    background: var(--recherche-white);
    border: 1px solid var(--recherche-border);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.recherche-produit-media {
    position: relative;
    aspect-ratio: 1;
    background: #f9fafb;
}

.recherche-produit-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recherche-produit-count {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
}

.recherche-produit-price {
    margin: 0;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--recherche-text);
}

/* Live avatar ring */
.recherche-list .live-liste-avatar-wrap {
    width: 40px;
    height: 40px;
    margin: 0;
    flex-shrink: 0;
}

.recherche-list .live-liste-card-avatar {
    width: 32px;
    height: 32px;
}

@media (min-width: 769px) {
    .recherche-produits-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .recherche-tabs {
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

@media (max-width: 768px) {
    .recherche-tab span {
        font-size: 11px;
    }

    .recherche-produits-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .recherche-row-title {
        font-size: 13px;
    }

    .recherche-row {
        min-height: 48px;
        padding: 8px 10px;
    }

    .recherche-row-avatar {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 380px) {
    .recherche-produits-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
