/* ===================================================================
   find-partners.css — Recherche & Decouverte de partenaires
   Sprint T1-2 : Matching & Decouverte
   =================================================================== */

/* ===== Page Layout ===== */
.find-partners-page {
    min-height: 100vh;
    background: #f3f4f6;
}

/* ===== Hero Section ===== */
.partner-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem 2rem 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
    text-align: center;
}
.partner-hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.partner-hero h1 i {
    margin-right: 0.5rem;
    opacity: 0.85;
}
.partner-hero-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
}

/* ===== Filter Bar (sticky) ===== */
.filter-bar {
    position: sticky;
    top: 70px;
    z-index: 100;
    background: #fff;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.filter-bar-inputs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.filter-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 0 0.75rem;
    border: 1px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-input-group:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}
.filter-input-group i {
    color: #9ca3af;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}
.filter-input {
    border: none;
    background: transparent;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    width: 100%;
    outline: none;
    color: #374151;
}
.filter-input::placeholder { color: #9ca3af; }

/* ===== Filter Chips (mobile) ===== */
.filter-chips {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.filter-chips::-webkit-scrollbar { height: 3px; }
.filter-chips::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

.role-chip-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 0.7rem;
    color: #6b7280;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}
.role-chip-compact:hover {
    border-color: var(--chip-color, #667eea);
    color: var(--chip-color, #667eea);
}
.role-chip-compact.active {
    background: var(--chip-color, #667eea);
    border-color: var(--chip-color, #667eea);
    color: #fff;
}
.role-chip-compact i { font-size: 0.65rem; }

/* Results count */
.filter-results-count {
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: right;
}

/* ===== Sidebar Left: Role Chips ===== */
.partner-sidebar-left .sidebar-widget {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}
.sidebar-widget-header {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.sidebar-widget-header i { margin-right: 0.35rem; color: #667eea; }
.sidebar-widget-body { padding: 0.75rem; }

.circle-filter-group { margin-bottom: 0.5rem; }
.circle-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
    padding-left: 0.25rem;
}
.circle-label i { margin-right: 0.25rem; font-size: 0.65rem; }
.circle-roles { display: flex; flex-wrap: wrap; gap: 0.25rem; }

.role-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 0.7rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}
.role-chip:hover {
    border-color: var(--chip-color, #667eea);
    color: var(--chip-color, #667eea);
    background: rgba(102, 126, 234, 0.05);
}
.role-chip.active {
    background: var(--chip-color, #667eea);
    border-color: var(--chip-color, #667eea);
    color: #fff;
}
.role-chip i { font-size: 0.6rem; }

/* ===== Profile Card Rich — Tuiles ===== */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.profile-card-rich {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
}
.profile-card-rich:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: rgba(102, 126, 234, 0.2);
}

/* Card Header — empilé pour les tuiles */
.profile-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}
.profile-card-photo-link { flex-shrink: 0; }
.profile-card-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
    transition: border-color 0.2s;
}
.profile-card-rich:hover .profile-card-photo {
    border-color: #667eea;
}
.profile-card-identity {
    flex: 1;
    min-width: 0;
}
.profile-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    line-height: 1.2;
}
.profile-card-name a {
    color: #1f2937;
    text-decoration: none;
}
.profile-card-name a:hover { color: #667eea; }

.profile-card-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #fff;
}
.profile-card-role-badge i { font-size: 0.6rem; }

.profile-card-location {
    display: block;
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.2rem;
}
.profile-card-location i {
    margin-right: 0.2rem;
    font-size: 0.6rem;
}

/* Score Ring — positionné en haut à droite de la tuile */
.profile-card-score {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}
.score-ring {
    width: 44px;
    height: 44px;
    transform: rotate(-90deg);
}
.score-ring-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 3;
}
.score-ring-fill {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}
.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 700;
    color: #374151;
}

/* Bio */
.profile-card-bio {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    text-align: center;
}

/* Match Reasons */
.profile-card-reasons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}
.match-reason-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 500;
    background: color-mix(in srgb, var(--reason-color, #667eea) 10%, transparent);
    color: var(--reason-color, #667eea);
    border: 1px solid color-mix(in srgb, var(--reason-color, #667eea) 25%, transparent);
}

/* Competences */
.profile-card-competences {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.6rem;
}
.competence-chip {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-size: 0.65rem;
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

/* Actions — empilés pour tuiles */
.profile-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: auto;
}
.btn-connect {
    width: 100%;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-connect.connected {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #fff !important;
    cursor: default;
}
.btn-view-profile {
    width: 100%;
    border-radius: 8px;
    font-size: 0.8rem;
    text-align: center;
}

/* ===== Loading State ===== */
.partners-loading {
    text-align: center;
    padding: 3rem 1rem;
}
.partners-loading p {
    margin-top: 0.75rem;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* ===== Empty State ===== */
.partners-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    grid-column: 1 / -1;
}
.partners-empty-icon {
    font-size: 2.5rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}
.partners-empty h3 {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 0.5rem;
}
.partners-empty p {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

/* ===== Pagination ===== */
.partners-pagination {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}
.partners-pagination .page-link {
    border-radius: 8px;
    font-size: 0.85rem;
    color: #667eea;
    border: 1px solid #e5e7eb;
    cursor: pointer;
}
.partners-pagination .page-link:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}
.partners-pagination .page-info {
    color: #6b7280;
    cursor: default;
}
.partners-pagination .page-item.disabled .page-link {
    color: #d1d5db;
    cursor: default;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .partner-hero {
        padding: 1.5rem 1rem 1rem;
        border-radius: 0;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        margin-top: -1rem;
    }
    .partner-hero h1 { font-size: 1.2rem; }
    .filter-bar {
        top: 70px;
        border-radius: 8px;
    }
    .filter-bar-inputs { flex-direction: column; }
    .profile-card-photo {
        width: 48px;
        height: 48px;
    }
    .profile-card-score {
        width: 36px;
        height: 36px;
    }
    .score-ring {
        width: 36px;
        height: 36px;
    }
    .score-value { font-size: 0.6rem; }
}

@media (max-width: 575.98px) {
    .partners-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Sidebar Droite (allégée) ===== */
.partner-sidebar-right .sidebar-widget {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: sticky;
    top: 70px;
}
.partner-sidebar-right .sidebar-widget-header {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #f0f0f0;
}
.partner-sidebar-right .sidebar-widget-header i {
    margin-right: 0.35rem;
    color: #667eea;
}

/* Podcast items */
.sidebar-podcast-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}
.sidebar-podcast-item:hover {
    background: #f9fafb;
    color: inherit;
}
.sidebar-podcast-item:last-child { border-bottom: none; }
.sidebar-podcast-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar-podcast-icon i {
    color: #fff;
    font-size: 0.65rem;
}
.sidebar-podcast-info { flex: 1; min-width: 0; }
.sidebar-podcast-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-podcast-meta {
    font-size: 0.65rem;
    color: #9ca3af;
}
.sidebar-widget-footer {
    display: block;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.75rem;
    color: #667eea;
    text-decoration: none;
    border-top: 1px solid #f0f0f0;
}
.sidebar-widget-footer:hover {
    background: #f9fafb;
    color: #4f46e5;
}
