/* ============================================
   Sidebar Professionnels - Page manuscrit
   ============================================ */

.professionals-sidebar {
    padding-left: 0.5rem;
}

/* Scrollbar fine */
.professionals-sidebar::-webkit-scrollbar {
    width: 4px;
}
.professionals-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.professionals-sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
.professionals-sidebar::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Titre principal */
.sidebar-pro-header {
    background: linear-gradient(135deg, #3273dc 0%, #4a90e2 100%);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 10px 10px 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-pro-header i {
    margin-right: 0.5rem;
}

.sidebar-pro-header .badge {
    background: rgba(255,255,255,0.25);
    font-size: 0.7rem;
    padding: 0.25em 0.6em;
}

/* Genre sélectionné */
.sidebar-pro-genre {
    background: #f0f7ff;
    padding: 0.5rem 1rem;
    font-size: 0.78rem;
    color: #555;
    border-bottom: 1px solid #e0e8f0;
}

.sidebar-pro-genre strong {
    color: #3273dc;
}

/* Critères actifs (tags) */
.pro-criteria-tag {
    display: inline-block;
    background: #e8f0fe;
    color: #3273dc;
    font-size: 0.7rem;
    padding: 0.15em 0.5em;
    border-radius: 12px;
    margin: 0.15rem 0.15rem;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pro-criteria-tag i {
    margin-right: 0.25rem;
    font-size: 0.65rem;
}

/* Conteneur des sections */
.sidebar-pro-body {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Section par rôle */
.pro-section {
    border-bottom: 1px solid #f0f0f0;
}

.pro-section:last-child {
    border-bottom: none;
}

.pro-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s;
}

.pro-section-header:hover {
    background: #eef2f7;
}

.pro-section-header h6 {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #444;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pro-section-header h6 i {
    color: #3273dc;
    width: 16px;
    text-align: center;
    font-size: 0.75rem;
}

.pro-section-header .badge {
    font-size: 0.65rem;
    background: #3273dc;
    color: #fff;
    border-radius: 10px;
    padding: 0.2em 0.5em;
}

.pro-section-header .chevron {
    font-size: 0.65rem;
    color: #999;
    transition: transform 0.2s;
}

.pro-section.collapsed .chevron {
    transform: rotate(-90deg);
}

.pro-section.collapsed .pro-list {
    display: none;
}

/* Liste de professionnels */
.pro-list {
    padding: 0;
}

/* Carte professionnel */
.pro-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.15s;
}

.pro-card:last-child {
    border-bottom: none;
}

.pro-card:hover {
    background: #f8f9fa;
}

.pro-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #e8e8e8;
    flex-shrink: 0;
}

.pro-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.pro-info {
    flex: 1;
    min-width: 0;
}

.pro-name {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pro-genres {
    display: block;
    font-size: 0.68rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pro-action {
    flex-shrink: 0;
}

.pro-action .btn {
    font-size: 0.68rem;
    padding: 0.15rem 0.4rem;
}

/* Message vide / chargement */
.pro-empty,
.pro-loading {
    padding: 2rem 1rem;
    text-align: center;
    color: #999;
    font-size: 0.8rem;
}

.pro-empty i,
.pro-loading i {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    opacity: 0.4;
}

.pro-loading .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   Sidebar BnF - Analyse de marche
   ============================================ */

.bnf-sidebar {
    margin-top: 1rem;
}

.bnf-sidebar .sidebar-pro-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

.bnf-market-stat {
    text-align: center;
    padding: 1rem;
}

.bnf-market-stat .bnf-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1e40af;
    line-height: 1;
}

.bnf-market-stat small {
    font-size: 0.78rem;
    color: #6b7280;
    display: block;
    margin-top: 0.25rem;
}

.bnf-mini-card {
    padding: 0.5rem 0.75rem;
    border-left: 3px solid #1e40af;
    margin: 0 0.5rem 0.5rem 0.5rem;
    background: #f8fafc;
    border-radius: 0 4px 4px 0;
    transition: background-color 0.15s;
}

.bnf-mini-card:hover {
    background: #eff6ff;
}

.bnf-mini-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: #1e293b;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bnf-mini-meta {
    font-size: 0.72rem;
    color: #6b7280;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bnf-mini-card a.bnf-mini-title {
    text-decoration: none;
    color: #1e293b;
}

.bnf-mini-card a.bnf-mini-title:hover {
    color: #1e40af;
}

.bnf-sidebar-footer {
    padding: 0.5rem 0.75rem;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.bnf-sidebar-footer a {
    font-size: 0.78rem;
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
}

.bnf-sidebar-footer a:hover {
    text-decoration: underline;
}

.bnf-query-terms {
    font-size: 0.72rem;
    color: #6b7280;
    padding: 0.25rem 0.75rem 0.5rem;
    font-style: italic;
}

/* Categories BnF */
.bnf-categories {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.bnf-categories-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
}

.bnf-categories-label i {
    color: #1e40af;
    margin-right: 0.25rem;
}

.bnf-categories-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.bnf-cat-chip {
    display: inline-block;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.68rem;
    padding: 0.15em 0.5em;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}

/* Responsive : petit écran */
@media (max-width: 991.98px) {
    .professionals-sidebar {
        margin-top: 2rem;
        padding-left: 0;
    }
}
