/* Hub Annuaire professionnel — réutilise .sh-* (support/contact hub) */

body:has(.an-hub-page) .container,
body:has(.an-hub-page) #content,
body:has(.an-hub-page).has-navbar > .content,
body:has(.an-hub-page)[data-navbar="side"].minimized #content,
body:has(.an-hub-page)[data-navbar="side"].has-navbar > .content {
    max-width: none !important;
    width: 100%;
}

.an-hub-page.sh-hub-page,
.an-hub-page .sh-hub {
    --sh-accent: #1a4fd6;
    --sh-accent-2: #123a9e;
    --sh-accent-dark: #0d2b6b;
    --sh-accent-soft: #eff6ff;
    --sh-accent-ring: rgba(26, 79, 214, .2);
}

.an-hub-page .sh-header {
    background:
        radial-gradient(1200px 300px at 85% -60%, rgba(255, 255, 255, .16), transparent 60%),
        radial-gradient(600px 220px at 10% 140%, rgba(26, 79, 214, .35), transparent 60%),
        linear-gradient(120deg, #0d2b6b 0%, #123a9e 45%, #1a4fd6 100%);
}

.an-hub-page .sh-header .sh-header-btn {
    width: auto;
    height: auto;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    gap: 8px;
    display: inline-flex;
    align-items: center;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
}

.an-hub-page .sh-header .sh-header-btn:hover {
    background: rgba(255, 255, 255, .24);
    color: #fff;
}

.an-hub-page .sh-header .sh-btn:not(.sh-btn-ghost) {
    background: #fff;
    color: var(--sh-accent-dark);
    border-color: #fff;
}

.an-hub-page .an-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.an-hub-page .sh-kpi {
    align-items: center;
    min-height: 78px;
}

.an-hub-page .sh-kpi-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.an-hub-page .sh-kpi-value {
    display: block;
    font-size: 24px;
    font-weight: 750;
    line-height: 1.15;
    color: #0f172a;
}

.an-hub-page .sh-kpi-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.an-hub-page .sh-kpi.is-on {
    border-color: var(--sh-accent);
    box-shadow: 0 0 0 2px var(--sh-accent-ring);
}

.an-hub-page .an-kpi-primary .sh-kpi-icon { background: #eff6ff; color: #1a4fd6; }
.an-hub-page .an-kpi-warn .sh-kpi-icon { background: #fff7ed; color: #d97706; }
.an-hub-page .an-kpi-ok .sh-kpi-icon { background: #ecfdf5; color: #059669; }
.an-hub-page .an-kpi-muted .sh-kpi-icon { background: #f1f5f9; color: #64748b; }

.an-list {
    display: flex;
    flex-direction: column;
}

.an-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f7;
    cursor: pointer;
    background: #fff;
}

.an-row:hover {
    background: #f8fafc;
}

.an-row:last-child {
    border-bottom: 0;
}

.an-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.an-row-ico {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #eff6ff;
    color: #1a4fd6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.an-row-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.an-row-meta {
    font-size: 12.5px;
    color: #64748b;
    margin-top: 2px;
}

.an-row-acc {
    font-size: 12px;
    color: #1e40af;
    margin-top: 3px;
    font-weight: 600;
}

.an-row-acts {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.an-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.an-icon-btn:hover {
    border-color: #bfdbfe;
    color: #1a4fd6;
    background: #eff6ff;
}

.an-go {
    color: #94a3b8;
    font-size: 12px;
}

.an-badge {
    display: inline-flex;
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
}

.an-badge.is-part { background: #dbeafe; color: #1d4ed8; }
.an-badge.is-four { background: #ffedd5; color: #c2410c; }
.an-badge.is-ent { background: #dcfce7; color: #166534; }
.an-badge.is-other { background: #f1f5f9; color: #64748b; }

.an-empty {
    padding: 40px 16px;
    text-align: center;
    color: #64748b;
}

.an-empty .fas {
    font-size: 28px;
    color: #94a3b8;
    margin-bottom: 10px;
}

.an-empty p {
    margin: 0 0 14px;
    font-weight: 600;
}

.an-more {
    padding: 12px;
    text-align: center;
}

.an-more-end {
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 600;
}

/* ---- Fiche détail ---- */
.an-detail-page .an-detail-head-text {
    min-width: 0;
}

.an-detail-page .an-detail-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.an-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr);
    gap: 14px;
    align-items: start;
}

.an-detail-grid-solo {
    grid-template-columns: minmax(0, 1fr);
    max-width: 820px;
}

.an-detail-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.an-detail-card-h {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 12px;
}

.an-detail-card-h .an-icon-btn {
    margin-left: auto;
}

.an-contact-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.an-contact-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1a4fd6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex: none;
}

.an-contact-name {
    font-size: 20px;
    font-weight: 750;
    color: #0f172a;
}

.an-contact-poste {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}

.an-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.an-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e40af;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.an-chip-btn:hover {
    background: #dbeafe;
    color: #1e3a8a;
    text-decoration: none;
}

.an-detail-block {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eef2f7;
}

.an-detail-p {
    margin: 0 0 8px;
    color: #334155;
    font-size: 13.5px;
    line-height: 1.5;
}

.an-detail-dl {
    margin: 0;
}

.an-detail-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

.an-detail-row:last-child {
    border-bottom: 0;
}

.an-detail-row dt {
    margin: 0;
    color: #94a3b8;
    font-weight: 650;
}

.an-detail-row dd {
    margin: 0;
    color: #0f172a;
    font-weight: 600;
    word-break: break-word;
}

.an-link-btn {
    border: 0;
    background: transparent;
    color: #1a4fd6;
    font: inherit;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
    text-align: left;
}

.an-link-btn:hover {
    text-decoration: underline;
}

.an-muted {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
}

.an-icon-btn-sm {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.an-mission-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.an-mission-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.an-mission-row:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.an-mission-tag {
    flex: none;
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
}

.an-mission-name {
    flex: 1;
    min-width: 0;
    font-weight: 700;
    color: #0f172a;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.an-mission-row .fa-chevron-right {
    color: #94a3b8;
    font-size: 11px;
}

@media (max-width: 900px) {
    .an-hub-page .an-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .an-detail-grid {
        grid-template-columns: 1fr;
    }
}
