/* ========================================================
   MarocPsy - Catalogue des Spécialités & Pôles d'Intervention
   Feuille de style dédiée : /public/css/specialites.css
   Style Rectiligne & Filtre Instantané (Sans arrondis)
   ======================================================== */

.psy-specialties-hero {
    background: #ffffff;
    border: 1px solid var(--border-color, #cbd5e1);
    border-top: 4px solid var(--brand-accent, #2563eb);
    padding: 28px 24px;
    margin-bottom: 24px;
}

.psy-specialties-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
    margin-bottom: 12px;
}

.psy-specialties-breadcrumbs a {
    color: var(--brand-accent, #2563eb);
    text-decoration: none;
    font-weight: 600;
}

.psy-specialties-breadcrumbs a:hover {
    text-decoration: underline;
}

.psy-specialties-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    line-height: 1.25;
    margin-bottom: 8px;
}

.psy-specialties-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary, #334155);
    max-width: 860px;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Barre de recherche instantanée compacte */
.psy-specialties-search-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border-color, #cbd5e1);
    padding: 12px 16px;
}

.psy-specialties-search-input-group {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.psy-specialties-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted, #64748b);
    font-size: 0.95rem;
    pointer-events: none;
}

[dir="rtl"] .psy-specialties-search-icon {
    left: auto;
    right: 14px;
}

.psy-specialties-input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border-color, #cbd5e1);
    background: #ffffff;
    padding: 0 40px 0 38px;
    font-size: 0.92rem;
    color: var(--text-primary, #0f172a);
    outline: none;
    border-radius: 0;
    transition: border-color 0.15s, box-shadow 0.15s;
}

[dir="rtl"] .psy-specialties-input {
    padding: 0 38px 0 40px;
}

.psy-specialties-input:focus {
    border-color: var(--brand-accent, #2563eb);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.psy-specialties-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    display: none;
}

[dir="rtl"] .psy-specialties-search-clear {
    right: auto;
    left: 10px;
}

.psy-specialties-search-clear:hover {
    color: var(--text-primary, #0f172a);
}

.psy-specialties-counter {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-secondary, #334155);
    background: #ffffff;
    border: 1px solid var(--border-subtle, #e2e8f0);
    padding: 8px 14px;
    white-space: nowrap;
}

/* Barre de filtres par Pôle */
.psy-pole-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0 16px 0;
    margin-bottom: 20px;
    scrollbar-width: thin;
}

.psy-pole-tab-btn {
    background: #ffffff;
    border: 1px solid var(--border-color, #cbd5e1);
    color: var(--text-secondary, #334155);
    padding: 8px 14px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 0;
    transition: all 0.15s ease;
}

.psy-pole-tab-btn:hover {
    border-color: var(--brand-accent, #2563eb);
    color: var(--brand-accent, #2563eb);
    background: #f8fafc;
}

.psy-pole-tab-btn.active {
    background: var(--brand-primary, #0f172a);
    border-color: var(--brand-primary, #0f172a);
    color: #ffffff;
}

/* Sections des Pôles */
.psy-poles-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.psy-pole-card {
    background: #ffffff;
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 0;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.psy-pole-card.theme-blue { border-top: 4px solid #2563eb; }
.psy-pole-card.theme-emerald { border-top: 4px solid #194582; }
.psy-pole-card.theme-amber { border-top: 4px solid #d97706; }
.psy-pole-card.theme-teal { border-top: 4px solid #1a4787; }
.psy-pole-card.theme-rose { border-top: 4px solid #e11d48; }
.psy-pole-card.theme-purple { border-top: 4px solid #7c3aed; }
.psy-pole-card.theme-indigo { border-top: 4px solid #4f46e5; }

.psy-pole-header {
    padding: 20px 24px;
    background: #fbfcfe;
    border-bottom: 1px solid var(--border-subtle, #e2e8f0);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.psy-pole-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 280px;
}

.psy-pole-icon-box {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    border-radius: 0;
}

.theme-blue .psy-pole-icon-box { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.theme-emerald .psy-pole-icon-box { background: #edf3fc; color: #194582; border: 1px solid #abc7ef; }
.theme-amber .psy-pole-icon-box { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.theme-teal .psy-pole-icon-box { background: #f1f6fc; color: #1a4787; border: 1px solid #a2c1ed; }
.theme-rose .psy-pole-icon-box { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }
.theme-purple .psy-pole-icon-box { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.theme-indigo .psy-pole-icon-box { background: #eef2ff; color: #4f46e5; border: 1px solid #c7d2fe; }

.psy-pole-titles {
    flex: 1;
}

.psy-pole-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    margin-bottom: 4px;
}

.psy-pole-desc {
    font-size: 0.88rem;
    color: var(--text-secondary, #334155);
    line-height: 1.45;
}

.psy-pole-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.psy-pole-count-pill {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 10px;
    background: #f1f5f9;
    color: var(--text-secondary, #334155);
    border: 1px solid var(--border-subtle, #e2e8f0);
    white-space: nowrap;
}

.psy-pole-link-cta {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--brand-primary, #0f172a);
    padding: 7px 14px;
    text-decoration: none;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
    white-space: nowrap;
}

.psy-pole-link-cta:hover {
    background: var(--brand-accent, #2563eb);
}

/* Grille des spécialités à l'intérieur du pôle */
.psy-specialties-subgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    padding: 20px 24px;
    background: #ffffff;
}

.psy-subspecialty-card {
    background: #ffffff;
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.psy-subspecialty-card:hover {
    border-color: var(--brand-accent, #2563eb);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.psy-subspecialty-top {
    margin-bottom: 12px;
}

.psy-subspecialty-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.psy-subspecialty-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    line-height: 1.3;
}

.psy-subspecialty-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 0;
    white-space: nowrap;
}

.badge-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-emerald { background: #edf3fc; color: #143768; border: 1px solid #abc7ef; }
.badge-amber { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-teal { background: #f1f6fc; color: #153b70; border: 1px solid #a2c1ed; }
.badge-rose { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.badge-purple { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.badge-indigo { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }

.psy-subspecialty-desc {
    font-size: 0.84rem;
    color: var(--text-secondary, #334155);
    line-height: 1.45;
    margin-bottom: 10px;
}

.psy-subspecialty-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

.psy-subspecialty-tag {
    font-size: 0.73rem;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 7px;
    border: 1px solid #e2e8f0;
    border-radius: 0;
}

.psy-subspecialty-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
    margin-top: auto;
}

.psy-subspecialty-pro-count {
    font-size: 0.76rem;
    color: var(--text-muted, #64748b);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.psy-subspecialty-pro-count.has-pros {
    color: var(--accent-emerald, #194582);
    font-weight: 700;
}

.psy-subspecialty-btn {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand-accent, #2563eb);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: #f8fafc;
    border: 1px solid var(--border-subtle, #e2e8f0);
    transition: all 0.15s;
}

.psy-subspecialty-btn:hover {
    background: var(--brand-accent, #2563eb);
    color: #ffffff;
    border-color: var(--brand-accent, #2563eb);
}

/* État Aucun résultat */
.psy-specialties-no-match {
    display: none;
    background: #ffffff;
    border: 1px solid var(--border-color, #cbd5e1);
    padding: 48px 24px;
    text-align: center;
    margin-top: 16px;
}

.psy-specialties-no-match.visible {
    display: block;
}

@media (max-width: 768px) {
    .psy-specialties-hero {
        padding: 20px 16px;
    }
    .psy-specialties-title {
        font-size: 1.35rem;
    }
    .psy-specialties-subgrid {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .psy-pole-header {
        padding: 16px;
    }
    .psy-pole-actions {
        width: 100%;
        justify-content: space-between;
    }
}
