/* ========== People (HRM) ========== */
/* ==================== Module: HRM & Talents ==================== */
.social-learning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--card-bg, #fff);
    border-radius: 8px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-color, inherit);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: var(--font-size-4xl);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color, #1a202c);
}

.feature-card p {
    margin: 0;
    color: var(--text-muted, #64748b);
}

/* section-header est maintenant dans css/components.css (mais gardé ici pour compatibilité avec les variantes spécifiques) */

.filters {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.input, .select, .textarea {
    width: 100%;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--sf-color-border, #e2e8f0);
    border-radius: var(--sf-radius-md, 8px);
    font-size: var(--sf-font-size-sm);
    background: var(--sf-color-surface, #ffffff);
    color: var(--sf-color-text, #0f172a);
    transition: border-color var(--sf-motion-fast) var(--sf-ease-out), box-shadow var(--sf-motion-fast) var(--sf-ease-out);
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--sf-color-cta);
    box-shadow: var(--sf-focus-ring);
}

.textarea:not([rows="1"]):not([rows="2"]) { resize: vertical; min-height: 80px; }

.knowledge-list, .mentorships-list, .communities-list, .posts-list, .sessions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.knowledge-item, .mentorship-item, .community-item, .post-item, .session-item {
    background: var(--sf-color-surface, #ffffff);
    border: 1px solid var(--sf-color-border, #e2e8f0);
    border-radius: var(--sf-radius-lg, 12px);
    padding: var(--space-5, 1.25rem);
    box-shadow: var(--sf-shadow-xs);
    transition: transform var(--sf-motion-base) var(--sf-ease-out), box-shadow var(--sf-motion-base) var(--sf-ease-out);
}
.knowledge-item:hover, .mentorship-item:hover, .community-item:hover, .post-item:hover, .session-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--sf-shadow-card-hover);
}

.knowledge-item h3, .post-item h3 {
    margin: 0 0 0.5rem 0;
    color: var(--sf-color-primary, #0f172a);
    font-size: var(--sf-font-size-lg);
    font-weight: 600;
}

.knowledge-item .meta, .post-item .meta {
    display: flex;
    gap: 1rem;
    color: var(--sf-color-text-muted, #64748b);
    font-size: var(--sf-font-size-xs);
    margin-top: 0.5rem;
}

.knowledge-item .actions, .post-item .actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.action-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--sf-color-cta, #2563eb);
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    border-radius: var(--sf-radius-sm, 6px);
    font-size: var(--sf-font-size-sm);
    font-weight: 500;
    transition: all var(--sf-motion-fast) var(--sf-ease-out);
}

.action-btn:hover {
    background-color: var(--sf-color-cta-soft, rgba(37, 99, 235, 0.08));
    border-color: var(--sf-color-cta-border, rgba(37, 99, 235, 0.2));
}

.page-section.mentoring-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--sf-color-border, #e2e8f0);
}
.page-section.mentoring-section:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }

.tag {
    display: inline-block;
    background: #edf2f7;
    color: #1a202c;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: var(--font-size-sm);
    margin-right: 0.5rem;
    margin-top: 0.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.completed {
    background: #dbeafe;
    color: #1e40af;
}

.comments-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.comment-item {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.comment-item .author {
    font-weight: 500;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.comment-item .date {
    color: #718096;
    font-size: var(--font-size-sm);
}

.comment-form {
    margin-top: 1rem;
}

.comment-form textarea {
    margin-bottom: 0.5rem;
}

.page-section.knowledge-shares-section { margin-top: 0; }
.page-section.knowledge-shares-section .section-header { margin-bottom: 1rem; }
.page-section.knowledge-shares-section .filters { margin-bottom: 1rem; }

.hrm-main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.hrm-nav-link {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    color: var(--sf-color-text-secondary, #334155);
    background: var(--sf-color-surface-subtle, #f8fafc);
    font-size: var(--font-size-base);
    border-radius: var(--sf-radius-md, 8px);
    transition: all var(--sf-motion-fast) var(--sf-ease-out);
}
.hrm-nav-link:hover {
    background: var(--sf-color-surface-hover, #f1f5f9);
    color: var(--sf-color-primary, #0f172a);
}
.hrm-nav-link.active {
    background: var(--sf-color-cta, #2563eb);
    color: white;
}
.hrm-scroll-page {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding: var(--space-6, 1.5rem) 0;
    max-width: 100%;
    min-width: 0;
}

.hrm-scroll-block {
    border-radius: var(--radius-md, 8px);
    min-width: 0;
    max-width: 100%;
    padding: 2rem var(--space-6, 1.5rem);
    border-bottom: 1px solid #e2e8f0;
    scroll-margin-top: 1.5rem;
}
.hrm-scroll-block:focus-within {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}
.hrm-scroll-block:last-of-type { border-bottom: none; }

.hrm-block-title {
    margin: 0 0 0.25rem;
    font-size: var(--sf-text-section);
    color: var(--text-color, #1e293b);
}

.hrm-block-subtitle {
    color: var(--text-muted, #64748b);
    font-size: var(--font-size-sm);
    margin: 0 0 1.25rem;
}

.hrm-block-body a:focus-visible,
.hrm-block-body button:focus-visible,
.hrm-block-body select:focus-visible,
.hrm-block-body input:focus-visible,
.hrm-block-body textarea:focus-visible {
    outline: 2px solid var(--primary-color, #2563eb);
    outline-offset: 2px;
}
.hrm-mega-section {
    padding: 2rem 0;
    border-bottom: 1px solid #e2e8f0;
}
.hrm-mega-section:last-of-type {
    border-bottom: none;
}
.hrm-section-title {
    margin: 0 0 1.5rem 0;
    color: #1a202c;
    font-weight: 600;
}
/* Toasts et messages */
.hrm-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 360px;
}
.hrm-toast {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: var(--font-size-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: hrm-toast-in 0.25s ease;
}
.hrm-toast-success { background: #d1fae5; color: #065f46; border-left: 4px solid #059669; }
.hrm-toast-error { background: #fee2e2; color: #991b1b; border-left: 4px solid #dc2626; }
@keyframes hrm-toast-in {
    from { opacity: 0; transform: translateX(1rem); }
    to { opacity: 1; transform: translateX(0); }
}
.hrm-msg { margin-bottom: 1rem; font-size: var(--font-size-sm); }
.hrm-msg-success { color: #059669; }
.hrm-msg-error { color: #dc2626; }
.hrm-form-error { font-size: var(--font-size-sm); color: #dc2626; margin-top: 0.25rem; }

/* Solde congés encadré */
.hrm-leave-balance-card {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.hrm-leave-balance-card strong { color: #0c4a6e; }

/* Tables — compact/scroll via core (.sf-table-scroll / .sf-table-compact) */
.hrm-scroll-block .table-responsive { margin-bottom: 1rem; }

/* Panel détail offboarding */
.hrm-offboarding-detail-panel {
    display: none;
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-radius: 8px;
}
.hrm-offboarding-detail-panel h4 { margin: 0 0 0.5rem 0; font-size: var(--font-size-lg); }
.hrm-offboarding-detail-panel h5 { margin: 1rem 0 0.5rem 0; font-size: var(--font-size-base); color: #4a5568; }
.hrm-offboarding-detail-panel ul { margin: 0; padding-left: 1.25rem; }
.hrm-offboarding-detail-panel li { margin-bottom: 0.35rem; }
.hrm-eq-return-btn { margin-left: 0.5rem; }

/* Sous-sections */
.hrm-subsection { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid #e2e8f0; }
.hrm-subsection-title { font-size: var(--font-size-base); font-weight: 600; color: #2d3748; margin: 0 0 0.75rem 0; }

/* Champs formulaires */
.hrm-scroll-block .form-inline input[type="date"],
.hrm-scroll-block .form-inline input[type="number"] { max-width: 11rem; }
.hrm-scroll-block .form-group .input { max-width: 100%; }

/* Bouton chargement : règles globales dans core.css (.btn.is-loading) */
.btn-secondary.is-loading::after { border-color: rgba(26,32,44,0.2); border-top-color: #1a202c; }
.btn-sm.is-loading::after { width: 0.75rem; height: 0.75rem; margin: -0.375rem 0 0 -0.375rem; }

.hrm-empty-hint { border-radius: 8px; padding: 1rem 1.1rem; background: var(--bg-secondary, #f8fafc); margin: 0.75rem 0 0; }
.hrm-context-hint { font-size: var(--font-size-sm); color: var(--text-muted, #64748b); margin: 0 0 0.75rem; line-height: 1.45; }
.hrm-scroll-block details > summary { cursor: pointer; list-style: none; }
.hrm-scroll-block details > summary::-webkit-details-marker { display: none; }
.hrm-details-toggle > summary {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    user-select: none;
}
.hrm-details-toggle > summary::before {
    content: '▸';
    display: inline-block;
    font-size: var(--font-size-2xs);
    line-height: 1;
    opacity: 0.65;
    transition: transform 0.15s ease;
    transform: rotate(0deg);
}
.hrm-details-toggle[open] > summary::before {
    transform: rotate(90deg);
}
.hrm-calendar-preview--error { color: var(--danger-color, #c53030); }

/* Tableau de bord RH — mêmes bandeaux KPI que CRM (sf-stat-strip) */
.hrm-exec-summary { font-size: var(--font-size-sm); line-height: 1.5; margin-bottom: 0.85rem; color: var(--text-color, inherit); }
.hrm-expert-notice { font-size: var(--font-size-sm); color: var(--bs-secondary-color, #64748b); border-left: 3px solid #e2e8f0; padding-left: 0.75rem; margin: 1rem 0; }
.hrm-priority-list { margin: 0; padding-left: 1.25rem; }
.hrm-priority-list li { margin-bottom: 0.35rem; }

/* Onboarding dashboard — piste unifiée (compteur continu) */
.hrm-startup-card .hrm-onb-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.25rem;
}
.hrm-onb-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.65rem 1rem;
}
.hrm-onb-field-group {
    display: flex;
    flex-direction: column;
    min-width: min(100%, 13rem);
}
.hrm-onb-editor-title { font-weight: 600; letter-spacing: 0.01em; }
.hrm-onb-editor-hint { margin-top: -0.25rem; }
.hrm-onb-select { min-width: 11rem; max-width: 100%; }

.hrm-onb-toolbar__mode { flex-shrink: 0; }
.hrm-onb-segmented {
    display: inline-flex;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f8fafc;
}
.hrm-onb-segment {
    border: none;
    margin: 0;
    padding: 0.4rem 0.65rem;
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: #64748b;
    background: transparent;
    cursor: pointer;
    line-height: 1.2;
}
.hrm-onb-segment + .hrm-onb-segment { border-left: 1px solid #e2e8f0; }
.hrm-onb-segment:hover { color: #0f172a; background: rgba(255,255,255,0.6); }
.hrm-onb-segment.is-active {
    color: #fff;
    background: var(--sf-color-cta, #2563eb);
}
.hrm-onb-roleline { min-height: 1.25rem; }
.hrm-onb-track {
    counter-reset: hrmOb 0;
    position: relative;
}
.hrm-onb-track--loading { opacity: 0.55; pointer-events: none; }
.hrm-onb-intro { margin-top: 0; }
.hrm-onb-stack { display: flex; flex-direction: column; gap: 0.45rem; }
.hrm-onb-stack--ordered {
    list-style: none;
    margin: 0;
    padding: 0;
}
.hrm-onb-item {
    counter-increment: hrmOb;
    display: grid;
    grid-template-columns: 1.65rem 2.85rem 1fr;
    gap: 0.35rem 0.75rem;
    align-items: start;
    padding: 0.65rem 0.85rem;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.hrm-onb-item--system { background: #fafbfc; }
.hrm-onb-item--edit {
    background: linear-gradient(135deg, #fffbeb 0%, #fff 40%);
    border-color: #fde68a;
    grid-template-columns: 3.25rem 1fr;
}
.hrm-onb-n::before {
    content: counter(hrmOb);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: #475569;
    background: #e2e8f0;
    margin-top: 0.15rem;
}
.hrm-onb-item--edit .hrm-onb-n::before {
    background: #fcd34d;
    color: #78350f;
}
.hrm-onb-j, .hrm-onb-jcell {
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #64748b;
    padding-top: 0.2rem;
}
.hrm-onb-jcell .form-control { font-weight: 600; text-align: center; padding-left: 0.25rem; padding-right: 0.25rem; }
.hrm-onb-main { min-width: 0; }
.hrm-onb-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
}
.hrm-onb-meta {
    font-size: var(--font-size-xs);
    color: #64748b;
    margin-top: 0.2rem;
}
.hrm-onb-kind { color: #94a3b8; }
.hrm-onb-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.12rem 0.45rem;
    font-size: var(--font-size-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 0.25rem;
    background: #e2e8f0;
    color: #475569;
    vertical-align: middle;
}
.hrm-onb-editgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 0.5rem;
    align-items: center;
    min-width: 0;
}
.hrm-onb-editgrid__label { grid-column: 1 / -1; }
.hrm-onb-editgrid__rm {
    grid-column: 1 / -1;
    justify-self: end;
    margin-top: -0.15rem;
}
@media (min-width: 640px) {
    .hrm-onb-item--edit {
        grid-template-columns: 3.25rem 1fr;
    }
    .hrm-onb-editgrid {
        grid-template-columns: 6.5rem 6.5rem 1fr auto;
        align-items: end;
    }
    .hrm-onb-editgrid__label { grid-column: auto; }
    .hrm-onb-editgrid__rm { grid-column: auto; justify-self: end; margin-top: 0; align-self: end; padding-bottom: 0.2rem; }
}
.hrm-onb-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.65rem 0 0.35rem;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}
.hrm-onb-divider::before,
.hrm-onb-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0 15%, #e2e8f0 85%, transparent);
}
.hrm-onb-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px solid #f1f5f9;
}
.hrm-onb-footer__msg { flex: 1 1 8rem; min-width: 0; }

.hrm-wfm-summary { margin-bottom: 0.75rem; }
.hrm-wfm-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: var(--font-size-sm);
    color: #475569;
}
.hrm-wfm-kpis span strong { color: #0f172a; }
.hrm-wfm-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    max-height: 28rem;
    overflow: auto;
}
.hrm-wfm-table {
    min-width: 36rem;
    font-size: var(--font-size-xs);
    border-collapse: separate;
    border-spacing: 0;
}
.hrm-wfm-table th,
.hrm-wfm-table td {
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #f8fafc;
    padding: 0.35rem 0.45rem;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
}
.hrm-wfm-sticky {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    text-align: left !important;
    min-width: 9rem;
    box-shadow: 2px 0 0 #f1f5f9;
}
.hrm-wfm-table thead th {
    background: #f8fafc;
    font-weight: 600;
    color: #334155;
}
.hrm-wfm-day { min-width: 3.4rem; }
.hrm-wfm-day-name { display: block; font-size: var(--font-size-2xs); text-transform: uppercase; color: #94a3b8; }
.hrm-wfm-day-date { display: block; font-size: var(--font-size-sm); }
.hrm-wfm-emp { display: block; font-weight: 600; color: #0f172a; }
.hrm-wfm-dept { display: block; font-size: var(--font-size-2xs); color: #94a3b8; font-weight: 400; }
.hrm-wfm-cell--planned { background: #ecfdf5; color: #065f46; font-weight: 500; }
.hrm-wfm-cell--leave { background: #fff7ed; color: #9a3412; font-weight: 500; }
.hrm-wfm-cell--empty { color: #cbd5e1; }
.hrm-wfm-cell--coverage { background: #f8fafc; font-weight: 600; color: #334155; }
.hrm-wfm-coverage th,
.hrm-wfm-coverage td { border-top: 2px solid #e2e8f0; }
.hrm-wfm-conflicts {
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    background: #fff7ed;
}
.hrm-wfm-sub { font-size: var(--font-size-2xs); font-weight: 500; color: #0369a1; }
.hrm-wfm-actual { color: #0369a1; }
.hrm-wfm-load { color: #64748b; }
.hrm-ws-grid th { width: 6rem; font-weight: 500; }
.hrm-ws-grid td { vertical-align: middle; }
.hrm-ws-grid input[type="time"] { min-width: 6.5rem; }

/* Formulaire candidature — aligné cartes OperaFlux */
.hrm-app-form-panel > summary { cursor: pointer; }
.hrm-app-form-block {
    padding: 0.85rem 0 0.25rem;
    border-top: 1px solid var(--border-light, #e2e8f0);
}
.hrm-app-form-block:first-of-type { border-top: 0; padding-top: 0; }
.hrm-app-form-block-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
    margin: 0 0 0.65rem;
}
.hrm-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
    gap: var(--space-3, 0.75rem);
}
.hrm-file-slot {
    border: 1px dashed var(--border-color, #cbd5e1);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    background: var(--bg-secondary, #f8fafc);
}
.hrm-file-slot-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-color, inherit);
}
.hrm-file-slot .form-text { margin-top: 0.25rem; font-size: var(--font-size-xs); }

@media (max-width: 768px) {
    .social-learning-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .filters { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .hrm-pipeline-stats { flex-direction: column; align-items: flex-start; }
    .hrm-scroll-block .table-responsive { margin-left: -0.5rem; margin-right: -0.5rem; padding: 0 0.5rem; }
    .hrm-startup-card .hrm-onb-toolbar { flex-direction: column; align-items: stretch; }
    .hrm-onb-toolbar__mode { width: 100%; }
    .hrm-onb-segmented { display: flex; width: 100%; }
    .hrm-onb-segment { flex: 1; text-align: center; }
}

/* Recrutement — un seul bloc dense (tokens.css / core.css) */
.hrm-recr-page {
    --recr-ink: #0f172a;
    --recr-muted: #64748b;
    --recr-line: #e2e8f0;
    --recr-soft: #f8fafc;
    font-size: var(--font-size-sm);
    line-height: 1.5;
    color: #1e293b;
}
.hrm-recr-page .recr-lead,
.hrm-recr-page .recr-section-hint { color: var(--recr-muted); line-height: 1.4; max-width: 48rem; }
.hrm-recr-page .recr-section-hint { font-size: var(--font-size-xs); }
.hrm-recr-page .recr-section-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--recr-ink);
    letter-spacing: -0.01em;
}
.hrm-recr-page .form-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.25rem;
}
.hrm-recr-page .form-label-hint {
    display: block;
    font-size: var(--font-size-2xs);
    font-weight: 400;
    color: #94a3b8;
    margin-top: 0.1rem;
}
.hrm-recr-page textarea.form-control-sm { min-height: 4.5rem; line-height: 1.45; }
.hrm-recr-page .btn-xs,
.hrm-recr-page .recr-advance-btn,
.hrm-recr-page .recr-detail-btn,
.hrm-recr-page .recr-notes-btn {
    font-size: var(--font-size-xs) !important;
    padding: 0.2rem 0.5rem !important;
    min-height: 1.75rem;
    line-height: 1.2;
}

.hrm-recr-page .recr-cockpit,
.hrm-recr-page .recr-form-card,
.hrm-recr-page .recr-offer-card,
.hrm-recr-page .recr-apps-expert,
.hrm-recr-page .recr-brief-panel,
.hrm-recr-page .recr-interview-out {
    border: 1px solid var(--recr-line);
    border-radius: 8px;
    background: #fff;
}
.hrm-recr-page .recr-cockpit { padding: 0.85rem 1rem; }
.hrm-recr-page .recr-cockpit__head { margin-bottom: 0.75rem; }
.hrm-recr-page .recr-cockpit__head .btn-sm { flex: 0 0 auto; }

.hrm-recr-page .recr-brief-panel {
    padding: 0.7rem 0.85rem;
    border-radius: 6px;
    font-size: var(--font-size-sm);
    line-height: 1.55;
    color: #475569;
}
.hrm-recr-page .recr-brief-panel p { margin: 0 0 0.45rem; }
.hrm-recr-page .recr-brief-panel p:last-child { margin-bottom: 0; }
.hrm-recr-page .recr-brief-panel strong { color: var(--recr-ink); font-weight: 600; }
.hrm-recr-page .recr-brief-heading {
    margin: 0.55rem 0 0.25rem;
    font-size: inherit;
    font-weight: 600;
    color: var(--recr-ink);
}
.hrm-recr-page .recr-brief-heading:first-child { margin-top: 0; }
.hrm-recr-page .recr-brief-list li { margin-bottom: 0.3rem; line-height: 1.5; }
.hrm-recr-page .recr-brief-list li:last-child { margin-bottom: 0; }

.hrm-recr-page #recr-kpi-banner .crm-mini-stat-value { font-variant-numeric: tabular-nums; }

.hrm-recr-page .recr-synergy-chip,
.hrm-recr-page .recr-priority-chip {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 1.3;
    font-weight: 500;
}
.hrm-recr-page .recr-synergy-chip {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    font-size: var(--font-size-xs);
}
.hrm-recr-page .recr-synergy-chip:hover { border-color: #94a3b8; color: var(--recr-ink); }
.hrm-recr-page .recr-synergy-chip--muted { background: var(--recr-soft); cursor: default; }
.hrm-recr-page .recr-priority-chip {
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: var(--font-size-xs);
    border: 1px solid transparent;
    min-height: var(--sf-control-height-sm, 32px);
}
.hrm-recr-page .recr-priority-chip--high { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.hrm-recr-page .recr-priority-chip--medium { background: #fffbeb; color: #92400e; border-color: #fde68a; }

.hrm-recr-page .recr-form-card { padding: 0.75rem 0.9rem; background: #fafbfc; }
.hrm-recr-page .recr-hire-bar .recr-form-card { border-color: #bae6fd; background: #f0f9ff; }

.hrm-recr-page .recr-kanban-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hrm-recr-page .recr-kanban {
    align-items: stretch;
    max-height: min(36rem, calc(100vh - 14rem));
}
.hrm-recr-page .recr-kanban-col {
    min-width: 200px;
    max-width: 240px;
    max-height: 100%;
    padding: 0.5rem 0.5rem 0.5rem 0.65rem;
    border-radius: 8px;
}
.hrm-recr-page .recr-kanban-col__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}
.hrm-recr-page .recr-kanban-stage { font-size: var(--font-size-sm); font-weight: 600; color: var(--recr-ink); }
.hrm-recr-page .recr-kanban-cards {
    border-radius: 6px;
    min-height: 6rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.hrm-recr-page .recr-kanban-cards .recr-app-card { margin-bottom: 0; }
.hrm-recr-page .recr-app-card {
    margin-bottom: 0.5rem;
    border: 1px solid var(--recr-line);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: box-shadow 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}
.hrm-recr-page .recr-app-card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border-color: #3b82f6;
}
.hrm-recr-page .recr-app-card.dragging { opacity: 0.55; cursor: grabbing; }
.hrm-recr-page .recr-app-card__body { padding: 0.45rem 0.5rem; }
.hrm-recr-page .recr-app-card__name { font-size: var(--font-size-sm); font-weight: 600; color: var(--recr-ink); line-height: 1.3; }
.hrm-recr-page .recr-app-card__meta { font-size: var(--font-size-2xs); color: var(--recr-muted); margin-top: 0.15rem; line-height: 1.35; }
.hrm-recr-page .recr-score-badge {
    font-size: var(--font-size-2xs);
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
}
.hrm-recr-page .recr-score-badge--mid { background: #dbeafe; color: #1e40af; }
.hrm-recr-page .recr-score-badge--high { background: #d1fae5; color: #065f46; }

.hrm-recr-page .recr-offer-card__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.85rem;
    cursor: pointer;
    list-style: none;
    line-height: 1.4;
}
.hrm-recr-page .recr-offer-card__summary::-webkit-details-marker { display: none; }
.hrm-recr-page .recr-offer-card__summary .fw-semibold { color: var(--recr-ink); }
.hrm-recr-page .recr-offer-card__body { padding: 0 0.85rem 0.85rem; border-top: 1px solid #f1f5f9; }
.hrm-recr-page .recr-interview-out {
    padding: 0.7rem 0.85rem;
    border-color: #dbeafe;
    background: var(--recr-soft);
    line-height: 1.5;
    max-height: 24rem;
    overflow: auto;
}
.hrm-recr-page .recr-interview-out li { margin-bottom: 0.25rem; line-height: 1.45; }
/* Cartes candidats (remplace le tableau recr-apps-table) */
.hrm-recr-page .recr-candidate-cards { margin-top: 0.75rem; }
.hrm-recr-page .recr-candidate-cards .contact-dossier-card {
    font-size: var(--font-size-sm);
    transition: box-shadow 0.2s ease;
}
.hrm-recr-page .recr-candidate-cards .contact-dossier-card .p-3 > div + div {
    border-top: 1px solid var(--border-color, #e2e8f0);
    padding-top: 0.75rem;
}
.hrm-recr-page .recr-candidate-cards .application-notes {
    font-size: var(--font-size-sm);
    line-height: 1.4;
    min-height: 4rem;
    resize: vertical;
}
.hrm-recr-page .recr-candidate-cards .application-stage-select { font-size: var(--font-size-xs); }
.hrm-recr-page .recr-app-row--highlight > .contact-dossier-card {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
    background: #eff6ff;
}
.hrm-recr-page #notesModalTextarea {
    font-size: var(--font-size-sm);
    line-height: 1.4;
    min-height: 8rem;
    resize: vertical;
}
.hrm-recr-page section.recr-section { scroll-margin-top: 1rem; }

@media (max-width: 768px) {
    .hrm-recr-page .recr-kanban-col { min-width: 85vw; max-width: 85vw; }
}

.hrm-formations-page {
    max-width: 52rem;
}
.hrm-formations-module {
    border-radius: 6px;
    padding: 0.85rem 1rem;
    background: #fff;
}
.hrm-formations-page .form-control,
.hrm-formations-page .form-select {
    font-size: var(--font-size-base);
}
.hrm-formations-page textarea.form-control {
    min-height: 6rem;
    resize: vertical;
}
.hrm-formations-page #frmEmployees {
    min-height: 10rem;
}
.hrm-frm-addbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.hrm-frm-block__toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}
.hrm-frm-block__badge {
    font-size: var(--font-size-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    background: #f1f5f9;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}
.hrm-frm-block__num {
    font-size: var(--font-size-sm);
    color: #64748b;
}
.hrm-frm-block__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.15rem;
}
.hrm-frm-qcm-q {
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.5rem;
    background: #fafbfc;
}
.hrm-frm-qcm-choice {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}
.hrm-frm-qcm-choice .form-check-input {
    flex-shrink: 0;
    margin-top: 0;
}

.hrm-formations-play { max-width: 42rem; margin: 0 auto; }
.hrm-formations-play__body { min-height: 6rem; }
.hrm-formations-play__text { font-size: var(--font-size-base); line-height: 1.55; }
.hrm-formations-play__video { max-height: 18rem; border-radius: 6px; background: #0f172a; }
.hrm-play-q { margin: 0 0 1rem; padding: 0; border: 0; min-inline-size: 0; }
.hrm-play-q > legend { float: none; padding: 0; margin-bottom: 0.5rem; font-size: var(--font-size-base); font-weight: 600; }
.hrm-formations-compact { max-width: 42rem; }
.hrm-learning-path__list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.hrm-learning-path__step {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: var(--font-size-sm);
    line-height: 1.45;
    padding: 0.15rem 0;
}
.hrm-learning-path__btn {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    width: 100%;
    margin: 0;
    padding: 0.35rem 0.5rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.hrm-learning-path__btn:hover,
.hrm-learning-path__btn:focus-visible {
    background: var(--surface-muted, #f1f5f9);
    border-color: var(--border-light, #e2e8f0);
    outline: none;
}
.hrm-learning-path__icon {
    flex-shrink: 0;
    width: 0.65rem;
    height: 0.65rem;
    margin-top: 0.35rem;
    border-radius: 50%;
    border: 1.5px solid var(--border-medium, #cbd5e1);
    background: transparent;
    text-align: center;
    font-size: 0;
}
.hrm-learning-path__icon.is-done,
.hrm-learning-path__step--done .hrm-learning-path__icon {
    border-color: var(--success-color, #166534);
    background: var(--success-color, #166534);
}
.hrm-learning-path__step--done {
    color: var(--text-primary, #0f172a);
}
.hrm-learning-path__step--pending {
    color: var(--text-muted, #64748b);
}
.hrm-learning-path__step--current .hrm-learning-path__btn {
    background: var(--surface-muted, #f1f5f9);
    border-color: var(--border-medium, #cbd5e1);
    font-weight: 600;
}
.hrm-learning-path__step--current .hrm-learning-path__icon:not(.is-done) {
    border-color: var(--primary-color, #1d4ed8);
    box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.18);
}
.hrm-learning-path__step--locked {
    color: var(--text-muted, #94a3b8);
    opacity: 0.75;
    cursor: not-allowed;
    padding: 0.35rem 0.5rem;
}
.hrm-learning-path__label {
    flex: 1;
    min-width: 0;
}
.hrm-learning-card {
    background: #fff;
}
.hrm-learning-compliance .progress-bar {
    background: #2563eb;
}

/* ==========================================================================
   Organigramme & Hiérarchie RH
   ========================================================================== */
.hrm-org-container {
    margin-top: 0.5rem;
}

.hrm-org-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.hrm-org-views {
    display: flex;
    gap: 0.35rem;
}

.hrm-org-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.hrm-org-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: #334155;
}

.hrm-org-stat-pill strong {
    color: #0f172a;
    font-weight: 700;
}

/* Tree Chart Canvas */
.hrm-org-tree-canvas {
    overflow-x: auto;
    padding: 1.5rem 0.5rem;
    text-align: center;
    background: radial-gradient(circle, #e2e8f0 1px, transparent 1px);
    background-size: 16px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-height: 280px;
}

.hrm-org-tree {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
}

.hrm-org-tree ul {
    display: flex;
    justify-content: center;
    padding-top: 20px;
    position: relative;
    padding-left: 0;
    margin: 0;
    list-style-type: none;
}

.hrm-org-tree li {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 20px 10px 0 10px;
}

/* Connectors lines */
.hrm-org-tree li::before,
.hrm-org-tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid #cbd5e1;
    width: 50%;
    height: 20px;
}

.hrm-org-tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid #cbd5e1;
}

.hrm-org-tree li:only-child::after,
.hrm-org-tree li:only-child::before {
    display: none;
}

.hrm-org-tree li:only-child {
    padding-top: 0;
}

.hrm-org-tree li:first-child::before,
.hrm-org-tree li:last-child::after {
    border: 0 none;
}

.hrm-org-tree li:last-child::before {
    border-right: 2px solid #cbd5e1;
    border-radius: 0 5px 0 0;
}

.hrm-org-tree li:first-child::after {
    border-radius: 5px 0 0 0;
}

.hrm-org-tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid #cbd5e1;
    width: 0;
    height: 20px;
    transform: translateX(-50%);
}

/* Member Card */
.hrm-org-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    min-width: 220px;
    max-width: 260px;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.hrm-org-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    border-color: #94a3b8;
}

.hrm-org-card--root {
    border-top: 4px solid #0f172a;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.hrm-org-card--manager {
    border-top: 4px solid #4338ca;
}

.hrm-org-card--employee {
    border-top: 3px solid #64748b;
}

.hrm-org-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
}

.hrm-org-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 700;
    font-size: var(--font-size-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.hrm-org-card-info {
    overflow: hidden;
    flex: 1;
}

.hrm-org-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hrm-org-role {
    font-size: var(--font-size-xs);
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hrm-org-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

.hrm-org-badge-dept {
    font-size: var(--font-size-2xs);
    background: #f1f5f9;
    color: #475569;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
}

.hrm-org-badge-count {
    font-size: var(--font-size-2xs);
    background: var(--sf-color-surface-muted);
    color: var(--sf-color-primary);
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

.hrm-org-card-actions {
    margin-top: 0.45rem;
    padding-top: 0.4rem;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Department Grid View */
.hrm-org-dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.hrm-org-dept-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.85rem;
}

.hrm-org-dept-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #f1f5f9;
}

/* Table View */
.hrm-org-table-select {
    min-width: 150px;
    max-width: 200px;
}

/* Drag & Drop Organigramme */
.hrm-org-dnd-hint {
    font-size: var(--font-size-xs);
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    margin-bottom: 0.85rem;
}

.hrm-org-card[draggable="true"],
.hrm-org-dept-item[draggable="true"] {
    cursor: grab;
    user-select: none;
}

.hrm-org-card[draggable="true"]:active,
.hrm-org-dept-item[draggable="true"]:active {
    cursor: grabbing;
}

.hrm-org-drag-handle {
    color: #94a3b8;
    font-size: var(--font-size-sm);
    line-height: 1;
    margin-right: 0.2rem;
    cursor: grab;
    user-select: none;
    transition: color 0.15s ease;
}

.hrm-org-card:hover .hrm-org-drag-handle,
.hrm-org-dept-item:hover .hrm-org-drag-handle {
    color: #475569;
}

.hrm-org-card.hrm-org-dragging,
.hrm-org-dept-item.hrm-org-dragging {
    opacity: 0.4;
    transform: scale(0.96);
    border: 2px dashed #2563eb !important;
    box-shadow: none !important;
}

.hrm-org-drag-active .hrm-org-card:not(.hrm-org-dragging),
.hrm-org-drag-active .hrm-org-dept-card {
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.hrm-org-card.hrm-org-drop-target-hover {
    border: 2px solid #2563eb !important;
    background: #eff6ff !important;
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18) !important;
    z-index: 10;
}

.hrm-org-dept-card.hrm-org-drop-target-hover {
    border: 2px solid #059669 !important;
    background: #f0fdf4 !important;
    box-shadow: 0 8px 18px rgba(5, 150, 105, 0.15) !important;
}

/* Highlight focus organigramme dans la fiche collaborateur 360° */
#collabOrgSectionCard.border-primary {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
    transition: all 0.25s ease-in-out;
}

/* ==================== Module: HRM Compétences ==================== */
/* Skills Analytics - Design sobre et minimaliste */

.skills-analytics-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    min-height: 60vh;
}

/* App panels only — landing headers are styled in premium_landing.css */
body:not(.landing-page) .section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

body:not(.landing-page) .section-header h2 {
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

body:not(.landing-page) .section-header .subtitle {
    color: #718096;
    font-size: var(--font-size-base);
    margin: 0;
}

/* Page sections (sans onglets) */
.page-section.skills-section-block {
    display: block;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.page-section.skills-section-block:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.page-section-title {
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.5rem;
}

/* Controls */
.skills-controls {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.skills-analytics-section .form-group {
    display: flex;
    flex-direction: column;
}

.skills-analytics-section .form-group label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

/* Results */
.skills-result {
    min-height: 200px;
}

.skills-analytics-section .loading {
    text-align: center;
    padding: 3rem;
    color: #718096;
    font-size: var(--font-size-base);
}


.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-card h3 {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: #718096;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .value {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.stat-card .change {
    font-size: var(--font-size-sm);
    color: #48bb78;
    margin-top: 0.5rem;
}

/* Skills Map */
.skills-map {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.skills-map h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 1rem 0;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.skill-item:hover {
    background: #f7fafc;
}

.skill-item:last-child {
    border-bottom: none;
}

.skill-name {
    font-weight: 500;
    color: #2d3748;
}

.skill-count {
    color: #718096;
    font-size: var(--font-size-sm);
}

/* Gaps List */
.gaps-list {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.gap-item {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.gap-item:last-child {
    border-bottom: none;
}

.gap-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.gap-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.gap-severity {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.gap-severity.critical {
    background: #fed7d7;
    color: #c53030;
}

.gap-severity.high {
    background: #feebc8;
    color: #c05621;
}

.gap-severity.medium {
    background: #fef5e7;
    color: #d69e2e;
}

.gap-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gap-detail {
    font-size: var(--font-size-sm);
}

.gap-detail strong {
    color: #4a5568;
    display: block;
    margin-bottom: 0.25rem;
}

.gap-detail span {
    color: #718096;
}

.missing-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.skill-badge {
    padding: 0.25rem 0.75rem;
    background: #edf2f7;
    color: #4a5568;
    border-radius: 12px;
    font-size: var(--font-size-sm);
}

/* Insights */
.insights-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.insights-section h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--sf-color-primary, #0f172a);
    margin: 0 0 1rem 0;
}

.insight-item {
    padding: 1rem;
    background: var(--sf-color-surface-muted, #f1f5f9);
    border-left: 3px solid var(--sf-color-cta, #2563eb);
    border-radius: var(--sf-radius-md, 8px);
    margin-bottom: 1rem;
}

.insight-item h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--sf-color-primary, #0f172a);
    margin: 0 0 0.5rem 0;
}

.insight-item p {
    font-size: var(--font-size-sm);
    color: var(--sf-color-text-muted, #64748b);
    margin: 0;
}

/* Recommendations */
.recommendations-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommendation-item {
    padding: 1rem;
    background: #f0fff4;
    border-left: 3px solid #48bb78;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.recommendation-item h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 0.5rem 0;
}

.recommendation-item p {
    font-size: var(--font-size-sm);
    color: #718096;
    margin: 0;
}

/* Forecast */
.forecast-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.forecast-section h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 1rem 0;
}

.forecast-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.forecast-item:last-child {
    border-bottom: none;
}

.forecast-skill {
    font-weight: 500;
    color: #2d3748;
}

.forecast-values {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.forecast-value {
    text-align: right;
}

.forecast-value label {
    display: block;
    font-size: var(--font-size-xs);
    color: #718096;
    margin-bottom: 0.25rem;
}

.forecast-value .value {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: #1a202c;
}

.forecast-gap {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.forecast-gap.positive {
    background: #fed7d7;
    color: #c53030;
}

.forecast-gap.negative {
    background: #c6f6d5;
    color: #22543d;
}

/* Error */
.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    border-left: 3px solid #c53030;
}

/* Responsive */
@media (max-width: 768px) {
    .skills-analytics-section {
        padding: 1rem;
    }
    
    .skills-tabs {
        flex-wrap: wrap;
    }
    
    .skills-tab {
        padding: 0.5rem 1rem;
        font-size: var(--font-size-sm);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
}

/* Mes compétences */
.mes-competences-block .page-section-desc { color: #718096; font-size: var(--font-size-base); margin-bottom: 1.25rem; }
.mes-competences-block .skills-list { list-style: none; padding: 0; margin: 1rem 0; border-radius: 8px; background: #fff; }
.mes-competences-block .skills-list .skill-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-bottom: 1px solid #e2e8f0; }
.mes-competences-block .skills-list .skill-item:last-child { border-bottom: none; }
.mes-competences-block .skills-list .skill-level { color: #718096; font-size: var(--font-size-sm); }
.mes-competences-block .skills-list .btn-remove-skill { margin-left: auto; padding: 0.2rem 0.5rem; font-size: var(--font-size-lg); line-height: 1; border: none; background: transparent; color: #a0aec0; cursor: pointer; border-radius: var(--button-radius-sm); }
.mes-competences-block .skills-list .btn-remove-skill:hover { color: #e53e3e; background: #fff5f5; }
.mes-competences-block .skills-list .empty, .mes-competences-block .skills-list .loading { padding: 1.5rem; color: #718096; text-align: center; }
.mes-competences-cv { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #e2e8f0; }
.mes-competences-cv .h4 { font-size: var(--font-size-lg); margin: 0 0 0.5rem 0; }
.upload-extract-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.cv-extract-status { font-size: var(--font-size-sm); color: #718096; min-height: 1.2em; }
.cv-extract-status-visible { color: var(--sf-color-cta, #2563eb); }
.extracted-skills { margin-top: 1rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem; background: var(--sf-color-surface-muted, #f1f5f9); border: 1px solid var(--sf-color-border, #e2e8f0); border-radius: var(--sf-radius-pill, 9999px); font-size: var(--font-size-sm); }
.skill-tag .tag-add { padding: 0 0.35rem; border: none; background: var(--sf-color-cta, #2563eb); color: white; border-radius: 4px; cursor: pointer; font-size: var(--font-size-sm); }
.mb-1 { margin-bottom: 0.25rem; }
.textarea:not([rows="1"]):not([rows="2"]) { min-height: 80px; resize: vertical; }

/* ==================== Module: HRM Paie ==================== */
/* Paie (HRM) — signature luxe OperaFlux */
.paie-page {
  --paie-ink: var(--sf-color-text, #0f172a);
  --paie-navy: #1a1a2e;
  --paie-gold: #b8956a;
  --paie-gold-soft: #f7f3ec;
  --paie-cream: #faf9f7;
  --paie-line: #ebe8e2;
  --paie-muted: #475569;
  gap: 0.85rem;
  padding-top: 0;
}

.paie-page > .card,
.paie-page > details.card {
  margin-bottom: 0;
  padding: 1rem;
  overflow: hidden;
}

.paie-page > .card.paie-hub,
.paie-page > .card.paie-pilot-card,
.paie-page > .card.paie-faq-card,
.paie-page > .card.paie-work-card,
.paie-page > details.card {
  padding: 0;
}

.paie-page > details.card > summary {
  margin: 0;
  padding: 0.85rem 1rem !important;
  background: #fff;
  font-weight: 600;
  color: var(--paie-ink);
  cursor: pointer;
}

.paie-page > details.card > .p-0 {
  padding: 0 1rem 1rem !important;
}

/* ─── Typographie sections ─── */
.paie-eyebrow {
  margin: 0 0 0.2rem;
  font-size: var(--font-size-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paie-muted);
  font-weight: 600;
}

.paie-page .paie-section-header,
.paie-section-header {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.2rem;
  column-gap: 0;
  row-gap: 0.2rem;
  padding: 1rem 1.2rem 0.9rem;
  border-bottom: 1px solid var(--paie-line);
  background: #fff;
}

.paie-section-header--compact {
  padding-bottom: 0.85rem;
}

.paie-section-title,
.paie-page .section-header h2,
.paie-page h2.paie-section-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--paie-navy);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.paie-section-lead {
  margin: 0.15rem 0 0;
  max-width: 44rem;
  font-size: var(--font-size-sm);
  color: var(--paie-muted);
  line-height: 1.45;
  text-align: left;
}

.paie-work-card > :not(.paie-section-header):not(header) {
  margin-left: 1.2rem;
  margin-right: 1.2rem;
}

.paie-work-card > .paie-section-header ~ *:last-child,
.paie-work-card > .paie-section-header ~ .border-top:last-child {
  margin-bottom: 1.15rem;
}

.paie-work-card > .paie-section-header ~ *:first-of-type:not(.paie-section-header) {
  margin-top: 0.95rem;
}

.paie-work-card > :last-child:not(.paie-section-header):not(header) {
  margin-bottom: 1.15rem;
}

.paie-migration-compact {
  padding: 0.5rem 1rem 0.4rem;
}

.paie-migration-compact__line {
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(184, 149, 106, 0.35);
  background: #fff8ee;
  font-size: var(--font-size-sm);
}

.paie-expert-details__summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--paie-navy);
}

.paie-fold {
  border-top: 1px solid #e8e8ec;
  padding: 0.6rem 1rem 0.4rem;
}

.paie-fold__summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--paie-muted, #64748b);
  list-style: none;
  padding: 0.35rem 0;
}

.paie-fold__summary::-webkit-details-marker { display: none; }

.paie-fold[open] .paie-fold__summary {
  color: var(--paie-navy);
  margin-bottom: 0.5rem;
}

.paie-journey-fold {
  padding: 0.2rem 1rem 0.55rem;
  border-top: 1px solid #f0f0f4;
  position: relative;
  z-index: 4;
  isolation: isolate;
}

.paie-journey-fold .paie-journey {
  margin-top: 0.5rem;
}

.paie-active-period-bar {
  padding: 0.35rem 1rem 0.55rem;
  position: relative;
  z-index: 0;
  /* Zone non interactive : laisse passer les clics vers le stepper sous-jacent. */
  pointer-events: none;
}

.paie-active-period-bar :is(select, button, a, input, label) {
  pointer-events: auto;
}

.paie-cockpit-cta-wrap {
  padding: 0 1rem 0.4rem;
}

.paie-cockpit-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: #f8fafc;
}

.paie-cockpit-cta__btn {
  min-width: min(100%, 320px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.paie-cockpit-cta__detail {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--paie-muted);
  line-height: 1.45;
  max-width: 36rem;
}

.paie-cockpit-cta--done {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.paie-cockpit-cta__done {
  margin: 0;
  font-weight: 600;
  color: #047857;
}

.paie-period-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0 1rem 0.55rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: var(--font-size-sm);
  background: #fafbfc;
}

.paie-period-banner__label {
  color: var(--paie-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: var(--font-size-sm);
  letter-spacing: 0.08em;
}

.paie-period-banner__value {
  color: var(--paie-navy);
  font-variant-numeric: tabular-nums;
}

.paie-period-banner__status {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  background: var(--sf-color-surface-muted);
  color: var(--sf-color-primary);
}

.paie-period-banner__deadline {
  flex: 1 0 100%;
  color: var(--paie-muted);
}

.paie-journey--compact {
  border-bottom: none;
  padding: 0.75rem 1rem 1rem;
}

.paie-scope-details {
  padding: 0 !important;
}

.paie-scope-details__summary {
  padding: 0.75rem 1rem !important;
  font-weight: 600;
  cursor: pointer;
  color: var(--paie-muted);
  font-size: var(--font-size-sm);
}

.paie-scope-details__body {
  padding: 0 1rem 0.85rem;
}

.paie-health-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 0.75rem;
}

/* ─── Accueil (aligné sections OperaFlux) ─── */
.paie-hub {
  border-color: #e8e8ec;
  background: #fff;
}

.paie-hub-header {
  padding-bottom: 1rem;
}

.paie-journey {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #f1f2f5;
  background: #fafbfc;
}

.paie-journey__step {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  border-radius: 999px;
  background: #fff;
  font-size: var(--font-size-xs);
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.paie-journey__step:hover {
  border-color: #d4d0c8;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.paie-journey__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  font-size: var(--font-size-sm);
  font-weight: 700;
  background: #f1f5f9;
  color: #64748b;
  flex-shrink: 0;
  margin-right: 0.35rem;
}

.paie-journey__label {
  color: var(--paie-navy);
  text-decoration: none;
  font-weight: 600;
}

.paie-journey__label:hover {
  color: var(--primary-accent, #2563eb);
}

.paie-journey__step.is-done {
  border-color: #d1fae5;
  background: #ecfdf5;
}

.paie-journey__step.is-done .paie-journey__num {
  background: #d1fae5;
  color: #065f46;
}

.paie-journey__step.is-current {
  border-color: var(--paie-navy);
  box-shadow: 0 2px 8px rgba(26, 26, 46, 0.12);
}

.paie-journey__step.is-current .paie-journey__num {
  background: var(--paie-navy);
  color: #fff;
}

.paie-setup-flow {
  margin: 0 0 1rem;
  padding: 1.25rem 1rem;
  border-radius: 12px;
  background: #fff;
}

.paie-setup-flow__title {
  margin: 0 0 0.35rem;
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--paie-navy);
}

.paie-setup-flow__progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  margin: 0.75rem auto 1rem;
  position: relative;
}

.paie-setup-flow__progress::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 1.25rem;
  right: 1.25rem;
  height: 2px;
  background: var(--paie-line, #e8e8ec);
  transform: translateY(-50%);
  z-index: 0;
}

.paie-setup-flow__progress .step-indicator {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 600;
  border: 2px solid var(--paie-line, #e8e8ec);
  color: var(--paie-muted, #6b7280);
  background: #fff;
}

.paie-setup-flow__progress .step-indicator.active {
  border-color: var(--sf-color-cta, #2563eb);
  color: var(--sf-color-cta, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.paie-setup-flow__progress .step-indicator.completed {
  background: var(--sf-color-cta, #2563eb);
  border-color: var(--sf-color-cta, #2563eb);
  color: #fff;
}

@media (max-width: 640px) {
  .paie-setup-flow__progress .step-indicator {
    width: 1.65rem;
    height: 1.65rem;
    font-size: var(--font-size-2xs);
  }
}

.paie-setup-flow__checklist {
  color: var(--paie-muted);
  min-height: 1.25rem;
}

.paie-setup-flow__actions {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--paie-line);
}

.paie-setup-flow__actions [hidden] {
  display: none !important;
}

.paie-setup-micro--panel {
  padding-top: 0.25rem;
}

.paie-setup-micro__heading {
  margin: 0 0 0.75rem;
  color: var(--paie-navy);
}

.paie-setup-micro__lead {
  margin: 0 0 1rem;
  color: var(--paie-muted);
}

.paie-field {
  margin-bottom: 0.85rem;
}

.paie-field .form-label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: #374151;
}

.paie-page .form-inline.flex-wrap.align-items-center label {
  display: inline-flex;
  width: auto;
  margin-bottom: 0;
}

.paie-field-grid {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.paie-field-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.paie-field-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .paie-field-grid--2,
  .paie-field-grid--3 {
    grid-template-columns: 1fr;
  }
}

.paie-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .paie-choice-grid {
    grid-template-columns: 1fr;
  }
}

.paie-choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1.5px solid #e8e8ec;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.paie-choice-card:hover,
.paie-choice-card.is-selected {
  border-color: var(--paie-navy);
}

.paie-choice-card.is-selected {
  background: rgba(26, 26, 46, 0.05);
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.14);
}

.paie-choice-card.is-selected::after {
  content: '✓';
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--paie-navy);
}

.paie-choice-card__title {
  font-weight: 600;
  color: var(--paie-navy);
}

.paie-choice-card__hint {
  font-size: var(--font-size-sm);
  color: var(--paie-muted);
}

.paie-setup-mode .paie-fr-block,
.paie-setup-mode .paie-work-card {
  box-shadow: none;
}

.paie-setup-micro--active {
  animation: paieFlash 0.8s ease;
}

.paie-work-card__body {
  margin-left: 1rem;
  margin-right: 1rem;
  margin-bottom: 1rem;
}

.paie-page:not(.paie-sections-ready) .paie-work-card[data-paie-section] > :not(.paie-section-header) {
  display: none;
}

.paie-work-card--collapsed .paie-work-card__body {
  display: none;
}

.paie-work-card--collapsed .paie-section-header {
  border-bottom: none;
  cursor: pointer;
}

.paie-work-card--blocked {
  opacity: 0.72;
  background: var(--paie-cream);
}

.paie-work-card--blocked .paie-section-header {
  cursor: pointer;
  padding-bottom: 0.65rem;
}

.paie-work-card--blocked:not(.paie-work-card--collapsed) .paie-section-header {
  padding-bottom: 0.85rem;
}

.paie-work-card--blocked.paie-work-card--collapsed .paie-section-lead::after {
  content: ' — Cliquez pour voir les actions et le prérequis.';
  font-weight: 500;
}

.paie-work-card--current {
  border-color: var(--paie-navy);
}

.paie-work-card--done .paie-section-title::after {
  content: ' ✓';
  color: #065f46;
  font-weight: 700;
}

@keyframes paieFlash {
  0%, 100% { box-shadow: var(--sf-shadow-soft, 0 10px 30px -10px rgba(15, 23, 42, 0.08)); }
  40% { box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.2); }
}

.paie-work-card--flash {
  animation: paieFlash 1.2s ease;
}

.paie-anchor-section {
  scroll-margin-top: calc(var(--sf-anchor-offset, 6rem) + 16px);
}

.paie-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0;
  border-radius: 50%;
  font-size: var(--font-size-sm);
  font-weight: 700;
  vertical-align: middle;
  color: var(--paie-gold);
  background: rgba(184, 149, 106, 0.14);
  border: 1px solid rgba(184, 149, 106, 0.35);
}

/* ─── Panneaux repliables ─── */
.paie-config-details,
.paie-advanced-panel {
  padding: 0 !important;
  border-color: var(--paie-line);
}

.paie-config-details__summary,
.paie-advanced-panel__summary {
  margin: 0;
  padding: 0.75rem 1rem !important;
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--paie-navy);
  cursor: pointer;
  background: #fff;
  list-style: none;
}

.paie-config-details__body,
.paie-advanced-panel__body {
  padding: 0 0 0.35rem;
}

.paie-advanced-panel__body > .paie-advanced-card {
  margin: 0 1rem 1rem;
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  box-shadow: none;
}

.paie-advanced-panel__body > .paie-advanced-card:last-child {
  margin-bottom: 1.15rem;
}

.paie-fr-block > .paie-section-header ~ * {
  margin-left: 1rem;
  margin-right: 1rem;
}

.paie-fr-block > .paie-section-header ~ *:last-child {
  margin-bottom: 1.35rem;
}

/* ─── KPI pilotage — hérite display:grid de .crm-mini-stats (jamais .is-visible = block) ─── */
.paie-pilot-kpi {
  margin: 0 1rem 0.85rem;
}
.paie-pilot-kpi[hidden] {
  display: none !important;
}
.paie-pilot-kpi .crm-mini-stat-value {
  font-variant-numeric: tabular-nums;
  color: var(--paie-navy);
}
.paie-kpi-alert {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md, 8px);
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.paie-ccn-form {
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: #fafbfc;
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.paie-ccn-form__head {
  margin-bottom: 0.35rem;
}
.paie-ccn-status__ok {
  display: inline-block;
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 600;
  color: #0f766e;
}
.paie-ccn-status__soft {
  display: inline-block;
  font-size: var(--font-size-sm, 0.875rem);
  color: var(--paie-muted, #64748b);
}

.paie-pilot-details {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #fafbfc;
}

.paie-pilot-details summary {
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--paie-muted);
  list-style: none;
}

.paie-pilot-details summary::-webkit-details-marker {
  display: none;
}

.paie-pilot-details[open] summary {
  margin-bottom: 0.65rem;
  color: var(--paie-navy);
}

.paie-scope-card {
  padding: 0.85rem 1rem !important;
}

/* ─── Pilotage ─── */
.paie-pilot-card .paie-pilot-body {
  padding: 1.15rem 1rem 0.5rem;
}

.paie-pilot-loading {
  display: none;
}

.paie-pilot-skeleton {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.paie-pilot-skeleton span {
  display: block;
  height: 4.5rem;
  min-width: 200px;
  flex: 1 1 200px;
  border-radius: 12px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e8edf3 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: paieShimmer 1.4s ease infinite;
}

@keyframes paieShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.paie-pilot-body.is-loaded .paie-pilot-skeleton,
.paie-pilot-body.is-loaded .paie-pilot-loading {
  display: none !important;
}

.paie-health-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.paie-health-card {
  flex: 1 1 200px;
  min-width: min(100%, 200px);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #ececf1;
  background: #fafbfc;
  border-left-width: 3px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.paie-health-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.paie-health-card--good { border-left-color: #10b981; }
.paie-health-card--warn { border-left-color: #f59e0b; }
.paie-health-card--bad { border-left-color: #ef4444; }

.paie-health-card__title {
  margin: 0 0 0.25rem;
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6b7280;
}

.paie-health-card__text {
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.35;
}

.paie-health-card--good .paie-health-card__text { color: #047857; }
.paie-health-card--warn .paie-health-card__text { color: #b45309; }
.paie-health-card--bad .paie-health-card__text { color: #b91c1c; }

.paie-next-action {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--paie-gold-soft);
  border: 1px solid rgba(184, 149, 106, 0.35);
}

.paie-next-action__label {
  display: block;
  margin: 0 0 0.25rem;
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paie-gold);
}

.paie-next-action__text {
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--paie-navy);
  line-height: 1.4;
}

.paie-page .sf-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f2f5;
}

.paie-page .sf-step {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--paie-muted);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.paie-page .sf-step:hover {
  border-color: #d4d0c8;
  color: var(--paie-navy);
}

.paie-page .sf-step.is-current {
  border-color: var(--paie-navy);
  background: var(--paie-navy);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 26, 46, 0.15);
}

.paie-page .sf-step.is-done {
  border-color: #d1fae5;
  background: #ecfdf5;
  color: #065f46;
}

.paie-page .sf-step.is-blocked,
.paie-page .sf-step.opacity-50 {
  opacity: 0.55;
  cursor: default;
}

.paie-journey {
  scroll-margin-top: calc(var(--header-height, 72px) + 4.5rem);
  position: relative;
  z-index: 2;
}

.paie-journey__label {
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.paie-anchor-section,
#periodes {
  scroll-margin-top: calc(var(--header-height, 72px) + 4.5rem);
  position: relative;
  overflow: visible;
}

.paie-page .sf-ceo-next-bar { pointer-events: none; position: relative; z-index: 1; }
.paie-page .sf-ceo-next-bar :is(a, button) { pointer-events: auto; }

.paie-table td { position: relative; z-index: 2; }
.paie-table .btn-calc,
.paie-table .paie-touch-btn {
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

/* ─── FAQ ─── */
.paie-faq-card {
  padding-bottom: 0 !important;
}

.paie-faq-list {
  padding: 0 1rem 1rem;
}

.paie-faq-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid #f1f2f5;
}

.paie-faq-item:last-child {
  border-bottom: none;
}

.paie-faq-item dt {
  margin: 0 0 0.3rem;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--paie-navy);
}

.paie-faq-item dd {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--paie-muted);
  line-height: 1.45;
}

.paie-faq-support {
  padding: 0.75rem 1rem 1.15rem;
  border-top: 1px solid #f1f2f5;
  font-size: var(--font-size-sm);
}

/* ─── Contenu général ─── */
.paie-page .section-header {
  margin-bottom: 0.4rem;
}

.paie-page .section-header h2,
.paie-page .card > h2:not(.paie-section-title) {
  font-size: var(--font-size-xl);
  margin-bottom: 0.15rem;
}

.paie-page p.text-muted {
  line-height: 1.45;
}

.paie-page .form-group {
  margin-bottom: 1rem;
}

.paie-page .form-group label {
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: #374151;
}

.paie-page .form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 0.85rem;
}

.paie-page .form-inline > .btn,
.paie-page .form-inline > a.btn,
.paie-page .form-inline > span {
  align-self: flex-end;
  margin-bottom: 0;
}

.paie-page .form-inline > span.small,
.paie-page .form-inline > .small {
  padding-bottom: 0.55rem;
  line-height: 1.3;
}

.paie-page .table {
  margin-top: 0.75rem;
}

.paie-page .table thead th {
  background: #fafbfc;
  border-bottom: 2px solid #ececf1;
  vertical-align: middle;
}



.paie-check-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin: 0.85rem 0 0.55rem;
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paie-gold);
}

.paie-check-list {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.paie-check {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: 0.65rem 0.8rem;
  align-items: start;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--paie-line);
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.paie-check__mark {
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.05rem;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: var(--font-size-xs);
  font-weight: 700;
  line-height: 1;
}

.paie-check__mark::before { content: '✓'; }
.paie-check.is-ok .paie-check__mark {
  color: #047857;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(4, 120, 87, 0.35);
}
.paie-check.is-ko .paie-check__mark {
  color: #9f1239;
  background: rgba(244, 63, 94, 0.06);
  border-color: rgba(159, 18, 57, 0.28);
}
.paie-check.is-ko .paie-check__mark::before { content: '×'; }

.paie-check__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.paie-check__label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--paie-navy);
  line-height: 1.35;
}

.paie-check__detail,
.paie-check__parts {
  font-size: var(--font-size-sm);
  line-height: 1.45;
  color: var(--paie-muted);
  font-weight: 400;
}

.paie-check__parts {
  list-style: none;
  margin: 0.1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.paie-check__parts li {
  margin: 0;
  padding-left: 0.7rem;
  position: relative;
  background: none;
  border: 0;
  box-shadow: none;
  display: block;
}

.paie-check__parts li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: var(--paie-gold);
  opacity: 0.7;
}

.paie-check.is-focus {
  background: linear-gradient(135deg, #fffdf9 0%, var(--paie-gold-soft) 100%);
  border-color: color-mix(in srgb, var(--paie-gold) 45%, var(--paie-line));
  box-shadow: 0 1px 0 rgba(184, 149, 106, 0.12), 0 8px 20px rgba(26, 26, 46, 0.04);
}

.paie-check.is-ok:not(.is-focus) {
  border-color: color-mix(in srgb, #10b981 18%, var(--paie-line));
}

.paie-check.is-ko:not(.is-focus) {
  border-color: color-mix(in srgb, #e11d48 14%, var(--paie-line));
}

.paie-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.5rem; }
.paie-tab { padding: 0.5rem 0.75rem; border-radius: 4px; text-decoration: none; color: var(--text-muted, #6b7280); font-size: var(--font-size-sm); }
.paie-tab:hover { background: #f3f4f6; color: var(--link-color, #2563eb); }
.paie-tab.active { background: #eff6ff; color: var(--link-color, #2563eb); font-weight: 500; }
.paie-table { width: 100%; border-collapse: collapse; margin-top: 0.35rem; }
.paie-table th, .paie-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}
.paie-table th {
  font-weight: 600;
  font-size: var(--font-size-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
}
.paie-table td:nth-child(2),
.paie-table td:nth-child(3),
.paie-table td:nth-child(4),
.paie-table td:nth-child(5),
.paie-table th:nth-child(2),
.paie-table th:nth-child(3),
.paie-table th:nth-child(4),
.paie-table th:nth-child(5) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.paie-table td:nth-child(6),
.paie-table th:nth-child(6) { text-align: center; }
.paie-table .badge { margin-left: 0.45rem; vertical-align: middle; }
.form-inline { margin-bottom: 1rem; }
.form-inline label { margin-right: 0.25rem; }
.paie-guide { line-height: 1.4; }
.dsn-rejected {
  border-left: 4px solid #b91c1c;
  background: #fef2f2;
  padding: 0.95rem 1.15rem;
  margin-bottom: 1rem;
  border-radius: 0 8px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.dsn-rejected strong { color: #b91c1c; }
.dsn-wizard { margin-bottom: 1rem; padding: 0.85rem 1rem; border-radius: 12px; background: #fafbfc; }
.dsn-wizard-step { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem 1rem; padding: 0.5rem 0; border-bottom: 1px solid #f3f4f6; }
.dsn-wizard-step:last-child { border-bottom: none; }
.dsn-wizard-step.is-done .dsn-wizard-title { color: #047857; }
.dsn-wizard-step.is-current { background: #f8fafc; margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; border-radius: 8px; }
.dsn-wizard-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.dsn-wizard-mark { font-weight: 600; min-width: 1.25rem; }
.dsn-wizard-body { flex: 1; min-width: 200px; }
.dsn-wizard-title { font-weight: 600; font-size: var(--font-size-sm); margin: 0; }
.dsn-wizard-hint { font-size: var(--font-size-sm); color: #6b7280; margin: 0.15rem 0 0; }
.paie-dsn-deadline,
.paie-dsn-submission { font-size: var(--font-size-sm); line-height: 1.45; }
.paie-dsn-deadline { margin-bottom: 0.65rem; }
#dsnReadinessSummary { margin-bottom: 0.85rem; line-height: 1.45; }
.paie-page .section-header { margin-bottom: 0.75rem; }
.paie-table .btn { padding: 0.4rem 0.75rem; border: none; border-radius: 6px; cursor: pointer; font-size: var(--font-size-sm); margin-right: 0.35rem; }
.paie-table .btn-calc { background: var(--sf-color-surface-muted); color: var(--sf-color-primary); }
.paie-table .btn-calc:hover { background: #c7d2fe; }
.paie-table .btn-validate { background: #059669; color: #fff; }
.paie-table .btn-validate:hover { background: #047857; }
.paie-table .btn-export { background: #f3f4f6; color: #374151; }
.paie-table .btn-export:hover { background: #e5e7eb; }

.paie-fr-block h4.h6 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.paie-page .form-inline label.small {
  display: block;
  margin-bottom: 0.25rem;
}

#paiePilotContent ul {
  margin-top: 0.35rem;
}

#paiePilotContent .badge {
  font-weight: 500;
}

.paie-table-wrap {
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

.paie-table-wrap.sf-table-scroll {
  max-height: min(28rem, 60vh);
  border: 1px solid #ececf1;
  border-radius: 10px;
}

.paie-legal-pre { white-space: pre-wrap; }
.paie-kit-wrap { max-width: 840px; margin: 0 auto; }
.paie-help-sm { font-size: var(--font-size-sm); }
.paie-help-xs { font-size: var(--font-size-xs); }
.paie-table-wrap--narrow { max-width: 400px; }
.paie-select-narrow { max-width: 260px; }
.paie-select-medium { max-width: 300px; min-width: 240px; }
.paie-select-wide { max-width: 420px; }
.paie-input-amount { width: 120px; }
.paie-input-date { width: 150px; }
.paie-input-hours { width: 80px; }
.paie-input-rate { width: 90px; }
.paie-input-sim-gross { width: 140px; }
.paie-input-sim-pas { width: 110px; }
.paie-input-bonus { width: 100px; }
.paie-input-notes { width: 180px; }
.paie-input-nir { width: 160px; }
.paie-input-pas { width: 120px; }
.paie-input-email { max-width: 280px; }
.paie-input-iban { min-width: 220px; }
.paie-input-bic { width: 100px; }
.paie-input-holder { min-width: 160px; }
.paie-input-employee { max-width: 400px; }
.paie-flex-gap { gap: 8px; }
.paie-veille-block { margin: 1.25rem 0 1.5rem; }
.paie-veille-heading { margin: 0 0 0.65rem; }
.paie-veille-list { display: flex; flex-direction: column; gap: 0.75rem; margin: 0; }
.paie-veille-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md, 8px);
  background: var(--sf-color-surface-muted, #fafbfc);
}
.paie-veille-item__body { min-width: 0; width: 100%; }
.paie-veille-item__title { display: block; font-weight: 600; line-height: 1.35; }
.paie-veille-item__summary { margin: 0.35rem 0 0; font-size: var(--font-size-xs); line-height: 1.45; max-width: 68ch; }
.paie-veille-item .apply-veille {
  width: max-content;
  max-width: 100%;
  flex: 0 0 auto;
  white-space: nowrap;
  align-self: flex-start;
  margin-top: 0.15rem;
}
.paie-legal-snapshot { font-size: var(--font-size-sm); }
.paie-variable-block { display: none; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #eee; }
.paie-mentions-card { border-left: 3px solid #6c757d; padding: 0.75rem 1rem !important; }
.paie-dsn-id-input { max-width: 160px; display: inline-block; vertical-align: middle; }
.paie-is-hidden { display: none !important; }
.paie-agents-bar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.65rem;
}
.paie-agent-chip {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  background: var(--bg-secondary, #f8fafc);
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.35;
}
.paie-agent-chip .badge { font-size: var(--font-size-2xs); }
.paie-agents-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-color, #eef0f3);
}
.paie-transition-done,
.paie-transition-toggle,
.paie-doc-import-table,
.paie-doc-bootstrap,
.paie-timeline-box { display: none; }
.paie-transition-done.is-visible,
.paie-transition-toggle.is-visible,
.paie-doc-import-table.is-visible,
.paie-doc-bootstrap.is-visible,
.paie-reco-ack.is-visible,
.paie-accountant-signoff.is-visible,
.paie-audit-block.is-visible,
.paie-variable-block.is-visible,
.paie-timeline-box.is-visible,
#salaryBaseBlock.is-visible,
#salaryBonusBlock.is-visible,
#overtimeBlock.is-visible,
#netpCompanyPrefillNote.is-visible,
#paie-import-bulletins.is-visible { display: block !important; }

.paie-touch-btn,
.paie-page .paie-actions-cell .btn {
  min-height: var(--touch-min, 44px);
  min-width: var(--touch-min, 44px);
  padding: 0.5rem 0.75rem;
}

.paie-page .paie-actions-cell {
  white-space: normal;
}

/* ─── Sigles métier : aide visuelle au survol ─── */
.paie-page abbr[title] {
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: help;
}

/* ─── Confort de lecture : limite la longueur des lignes de texte ─── */
.paie-section-lead,
.paie-page .paie-help-sm,
.paie-page .paie-help-xs,
.paie-page .sf-banner__body,
.paie-faq-item dd {
  max-width: 68ch;
}

/* ─── Cibles tactiles : ≥ 44px sur écrans tactiles ─── */
@media (pointer: coarse) {
  .paie-page .btn,
  .paie-page .sf-step,
  .paie-page .form-control,
  .paie-page select,
  .paie-page input[type="date"],
  .paie-page input[type="number"],
  .paie-page input[type="text"],
  .paie-page input[type="email"],
  .paie-page input[type="password"] {
    min-height: 44px;
  }
}

@media (max-width: 768px) {
  .paie-hub-header,
  .paie-section-header,
  .paie-journey,
  .paie-pilot-card .paie-pilot-body,
  .paie-pilot-kpi,
  .paie-faq-list,
  .paie-faq-support {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .paie-work-card > :not(.paie-section-header):not(header) {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .paie-page > details.card > summary {
    padding: 0.85rem 1rem !important;
  }

  .paie-page .paie-table-wrap {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
  }

  .paie-page .table-responsive .paie-col-optional {
    display: none !important;
  }

  .paie-agents-actions .sf-form-actions .btn { flex: 1 1 auto; }

  .paie-page .paie-table .btn,
  .paie-page .paie-table .btn-calc,
  .paie-page .paie-table .btn-validate,
  .paie-page .paie-table .btn-export {
    display: inline-flex;
    margin: 0.2rem 0.25rem 0.2rem 0;
    width: auto;
    min-width: 44px;
  }

  .paie-page .table-responsive td.paie-actions-cell {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
    padding-left: 42% !important;
  }

  .paie-page .table-responsive td.paie-actions-cell:before {
    align-self: flex-start;
    padding-top: 0.65rem;
  }

  .paie-page #periodsTable td:last-child,
  .paie-page #linesTable td:last-child {
    padding-bottom: 0.5rem;
  }

  .paie-page .form-inline {
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .paie-pilot-skeleton span { animation: none; }
  .paie-page .btn,
  .paie-health-card,
  .paie-check,
  .paie-journey__step { transition: none; }
}

/* ==========================================================================
   SSE — espace collaborateur (shell + rythme)
   ========================================================================== */
body.sse-app-shell {
  --sse-g: var(--space-4);
  --sse-p: var(--space-3);
  --sse-line: color-mix(in srgb, var(--sf-color-primary) 7%, var(--border-color, #e2e8f0));
  --sse-scroll: calc(var(--header-height, 72px) + var(--space-4));
}
body.sse-app-shell :is(.page-header:empty, .page-header:not(:has(*)), .page-header:not(.sf-welcome)) { display: none; }
body.sse-app-shell :is(.sf-action-tile, .sse-tab-panel, [data-tabpanel], .sse-kpi-strip, .sse-tab-panel [id]) {
  scroll-margin-top: var(--sse-scroll);
}

:is(.sse-tab-panel, .sse-panel-lead) { display: flex; flex-direction: column; gap: var(--sse-g); }
.sse-tab-panel + .sse-tab-panel { margin-top: var(--space-8); }
.sse-tab-panel > .card {
  display: flex; flex-direction: column; gap: var(--sse-p);
  margin: 0; padding: var(--space-5) var(--space-6);
}
.sse-tab-panel .sf-section-header {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
  margin: 0; padding: 0 0 var(--space-3);
  border-bottom: 1px solid color-mix(in srgb, var(--sse-line) 90%, transparent);
}
.sse-tab-panel > .card > :is(p, .small, .sf-list, .sf-callout, .sf-action-tile-grid, form, [role="status"]) { margin: 0; }
.sse-actions .sf-section-label { margin: 0 0 var(--space-3); letter-spacing: 0.06em; }
:is(.sse-actions, .sse-tab-panel > .card) .sf-action-tile-grid {
  margin: 0; gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
}
.sse-tab-panel > .card .sf-empty,
.sse-tab-panel > .card [role="status"].small {
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  padding-block: var(--space-3);
}

.sse-kpi-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(7.25rem, 1fr));
  gap: var(--space-4) var(--space-5); margin: 0;
  padding: clamp(1.05rem, 2vw, 1.35rem) clamp(1.2rem, 2.2vw, 1.55rem);
  border: 1px solid var(--sse-line); border-radius: var(--sf-radius-xl);
  background: linear-gradient(165deg, #fff 0%, rgba(248, 250, 252, 0.92) 100%);
  box-shadow: var(--sf-shadow-premium);
  align-items: stretch;
}
.sse-kpi-strip .crm-mini-stat { min-width: 0; height: 100%; }
.sse-kpi-strip .crm-mini-stat-label {
  font-size: var(--font-size-2xs); font-weight: 650;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted, #64748b);
}
.sse-kpi-strip .crm-mini-stat-value {
  font-family: var(--sf-font-display); font-weight: 700; letter-spacing: -0.03em;
  font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.15;
  color: var(--sf-color-primary); font-variant-numeric: tabular-nums;
}

.sse-tab-panel .card .sf-list { gap: 0; }
.sse-tab-panel .card .sf-list-row {
  margin: 0; padding: 0.85rem 0.35rem; gap: var(--space-3); flex-wrap: wrap;
  border: 0; border-bottom: 1px solid color-mix(in srgb, var(--sse-line) 85%, transparent);
  border-radius: 0; background: transparent; box-shadow: none;
}
.sse-tab-panel .card .sf-list-row:last-child { border-bottom: 0; }
.sse-tab-panel .card .sf-list-row:is(:hover, :focus-visible) {
  background: color-mix(in srgb, var(--sf-color-cta, #2563eb) 4%, transparent);
  box-shadow: none;
}
.sse-tab-panel .card .sf-list-row-icon { width: 2.15rem; height: 2.15rem; margin-inline: 0.15rem 0.1rem; }
.sse-tab-panel .card .sf-list-row-subtitle {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.55rem; margin-top: 0.3rem;
}
.sse-tab-panel .card .sf-list-row-value { padding-inline-end: 0.35rem; }
.sse-tab-panel .card .sf-empty { margin: 0; padding: var(--space-4) 0; color: var(--text-muted, #64748b); }
.sse-chat-history.sf-list-scroll { min-height: 10rem; max-height: 17.5rem; background: #fff; }

.sse-directory-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem 0.85rem; margin-bottom: 0.75rem; }
.sse-directory-toolbar .sf-list-toolbar { flex: 1 1 14rem; margin-bottom: 0; }
.sse-directory-dept { flex: 0 1 11rem; min-width: 9rem; margin: 0; }
.sse-directory-list .sse-dir-row { align-items: flex-start; }
.sse-dir-row--leave { opacity: 0.92; }
.sse-dir-chip {
  display: inline-flex; align-items: center; margin-left: 0.25rem; padding: 0.12rem 0.45rem;
  border-radius: 999px; font-size: var(--font-size-xs); font-weight: 500; line-height: 1.3;
  background: color-mix(in srgb, var(--sf-color-primary, #1e3a5f) 8%, #fff);
  color: var(--text-secondary, #475569); border: 1px solid color-mix(in srgb, var(--sse-line, #e2e8f0) 90%, transparent);
}
.sse-dir-chip--muted { background: #f8fafc; color: #64748b; }
.sse-dir-chip--mgr { background: color-mix(in srgb, var(--sf-color-cta, #2563eb) 10%, #fff); color: var(--sf-color-cta, #2563eb); border-color: color-mix(in srgb, var(--sf-color-cta, #2563eb) 22%, transparent); }
.sse-dir-chip--leave { background: color-mix(in srgb, #b45309 12%, #fff); color: #92400e; border-color: color-mix(in srgb, #b45309 25%, transparent); }
.sse-dir-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.35rem; margin-top: 0.3rem; font-size: var(--font-size-xs); color: var(--text-muted, #64748b); }
.sse-dir-dot { opacity: 0.55; padding: 0 0.1rem; }
.sse-dir-skills { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.sse-dir-skill { font-size: var(--font-size-2xs); padding: 0.1rem 0.4rem; border-radius: 0.3rem; background: #f1f5f9; color: #475569; }
.sse-dir-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.35rem; max-width: 16rem; }
.sse-dir-actions .btn-outline-secondary { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--font-size-xs); font-weight: 500; }
.sse-dir-copy { color: var(--text-muted, #64748b); }
.sse-dir-copy:is(:hover, :focus-visible) { color: var(--sf-color-cta, #2563eb); }
@media (max-width: 767px) {
  .sse-directory-dept { flex: 1 1 100%; }
  .sse-dir-actions { max-width: none; justify-content: flex-start; width: 100%; margin-top: 0.25rem; }
}

@media (min-width: 1024px) {
  .sse-tab-panel:not(.sse-tab-panel--single) {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: var(--sse-g) var(--space-5); align-items: start;
  }
  .sse-tab-panel:not(.sse-tab-panel--single) > :not(.card),
  .sse-tab-panel .sf-card-span { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  :is(.sse-actions, .sse-tab-panel > .card) .sf-action-tile-grid { grid-template-columns: 1fr; }
  .sse-tab-panel > .card { padding: var(--space-4); }
}

/* ========== Licenciement ========== */
.lic-page {
  --lic-ink: #0f172a; --lic-muted: #64748b; --lic-line: #e2e8f0; --lic-soft: #f8fafc; --lic-accent: #1e3a5f;
  width: 100%;
}
.lic-lead { margin: 0 0 1.1rem; max-width: 68ch; font-size: var(--font-size-sm); line-height: 1.55; color: var(--lic-muted); }
.lic-lead strong { color: var(--lic-ink); font-weight: 600; }
.lic-section { margin: 1.35rem 0 .65rem; font-size: var(--font-size-sm); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--lic-muted); }
.lic-workspace { display: grid; gap: .85rem; width: 100%; align-items: start; }
.lic-aside { display: none; flex-direction: column; gap: .85rem; }
.lic-workspace.is-split .lic-aside { display: flex; }
.lic-card {
  padding: 1.15rem 1.35rem; border: 1px solid var(--lic-line); border-radius: 12px; background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .03);
  font-size: var(--font-size-sm); color: #334155; line-height: 1.6;
}
.lic-card--result { background: linear-gradient(180deg, #fbfcfe 0%, #fff 28%); }
.lic-card__title { margin: 0 0 .35rem; font-size: var(--font-size-base); font-weight: 600; letter-spacing: -.015em; color: var(--lic-ink); }
.lic-card__hint { margin: 0 0 .85rem; max-width: 72ch; color: var(--lic-muted); line-height: 1.5; }
.lic-form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr)); gap: var(--space-4) var(--space-5); }
.lic-cadre { justify-content: flex-end; }
.lic-cadre .form-check-label { display: inline-flex; align-items: center; min-height: var(--sf-control-height-sm, 32px); cursor: pointer; color: var(--lic-ink); }
.lic-motif { margin-top: .75rem; padding: .85rem 1rem; border: 1px solid var(--lic-line); border-left: 3px solid var(--lic-accent); border-radius: 10px; background: var(--lic-soft); }
.lic-motif__head { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .45rem; }
.lic-motif__head strong { color: var(--lic-accent); }
.lic-motif__body { color: var(--lic-muted); line-height: 1.5; }
.lic-doc { white-space: pre-wrap; max-height: 240px; overflow: auto; padding: .5rem; border: 1px solid var(--lic-line); border-radius: 8px; background: var(--lic-soft); font-size: var(--font-size-sm); }
.lic-ai-notice, .lic-ai-section { margin: 0 0 .85rem; padding: .7rem .85rem; border-radius: 8px; border: 1px solid var(--lic-line); background: #fff; }
.lic-ai-notice { font-size: var(--font-size-xs); color: var(--lic-muted); background: color-mix(in srgb, var(--lic-accent) 6%, #fff); border-color: color-mix(in srgb, var(--lic-accent) 14%, transparent); }
.lic-ai-body { display: flex; flex-direction: column; gap: .85rem; }
.lic-ai-heading { margin: 0 0 .45rem; padding-bottom: .35rem; border-bottom: 1px solid var(--lic-line); font-size: var(--font-size-sm); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--lic-accent); }
.lic-ai-p { margin: 0 0 .45rem; color: #475569; }
.lic-ai-p:last-child, .lic-ai-list > li:last-child { margin-bottom: 0; }
.lic-ai-meta { margin: .35rem 0 0; font-size: var(--font-size-xs); color: var(--lic-muted); }
.lic-ai-list { margin: 0; padding: 0 0 0 1.15rem; color: #475569; }
.lic-ai-list > li { margin-bottom: .35rem; }
.lic-ai-list > li::marker { color: var(--lic-accent); font-weight: 600; }
.lic-ai-list--steps { list-style: none; padding: 0; counter-reset: lic-step; }
.lic-ai-list--steps > li { position: relative; counter-increment: lic-step; margin-bottom: .45rem; padding: .5rem .7rem .5rem 2.45rem; border-radius: 8px; background: var(--lic-soft); border: 1px solid var(--lic-line); }
.lic-ai-list--steps > li::before { content: counter(lic-step); position: absolute; left: .55rem; top: .5rem; width: 1.3rem; height: 1.3rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--lic-accent); color: #fff; font-size: var(--font-size-2xs); font-weight: 700; }
.lic-ai-callout { margin: .5rem 0 0; padding: .6rem .75rem; border-radius: 8px; border-left: 3px solid #f59e0b; background: #fffbeb; color: #92400e; }
.lic-ai-loading { margin: 0; color: var(--lic-muted); }
.lic-ai-loading__hint { opacity: .75; font-size: var(--font-size-xs); }
.lic-ai-error { margin: 0; color: #b91c1c; }
.lic-sim-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .55rem; margin: 0 0 .85rem; }
.lic-sim-kpi { display: flex; flex-direction: column; gap: .15rem; padding: .65rem .75rem; border-radius: 10px; background: var(--lic-soft); border: 1px solid var(--lic-line); }
.lic-sim-kpi__label { font-size: var(--font-size-2xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--lic-muted); }
.lic-sim-kpi__value { font-size: var(--font-size-lg); font-weight: 600; letter-spacing: -.02em; color: var(--lic-ink); font-variant-numeric: tabular-nums; }
.lic-motif__body strong, .lic-ai-list strong, .lic-ai-meta strong { color: var(--lic-ink); }
@media (min-width: 1100px) {
  .lic-workspace.is-split { grid-template-columns: minmax(0, 1.15fr) minmax(18rem, .85fr); gap: 1rem 1.25rem; }
  .lic-workspace.is-split .lic-aside { position: sticky; top: 1rem; }
  .lic-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lic-span-2 { grid-column: span 2; }
}
