/* === MStaff Widget === */
.mstaff-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1400px;            /* ← large mais pas infini */
    width: calc(100% - 2rem);     /* ← marge latérale douce */
    margin: 2rem auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    overflow: hidden;
}


/* Header */
.mstaff-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #3b82f6 100%);
    color: #fff;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mstaff-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.mstaff-icon {
    font-size: 2.5rem;
}
.mstaff-title {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
    letter-spacing: -0.3px;
}
.mstaff-subtitle {
    margin: .25rem 0 0;
    opacity: .85;
    font-size: .9rem;
    font-weight: 300;
    letter-spacing: 0.2px;
}
.mstaff-counter {
    text-align: center;
    background: rgba(255, 255, 255, .15);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px;
    padding: .75rem 1.25rem;
}
.mstaff-count {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}
.mstaff-count-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: .85;
}

/* Filters */
.mstaff-filters {
    padding: 1rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    border-bottom: 1px solid #e9eef6;
    background: #f4f7fb;
}
.mstaff-filter {
    padding: .4rem .8rem;
    border: 1px solid #d0d9e8;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: .8rem;
    transition: all .2s;
    color: #4a5568;
    white-space: nowrap;
}
.mstaff-filter:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff4ff;
}
.mstaff-filter.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
}
.mstaff-badge {
    display: inline-block;
    background: rgba(0, 0, 0, .08);
    border-radius: 10px;
    padding: .1rem .45rem;
    font-size: .7rem;
    margin-left: .3rem;
}
.mstaff-filter.active .mstaff-badge {
    background: rgba(255, 255, 255, .3);
}

/* Search */
.mstaff-search {
    padding: 1rem 2rem;
    background: #f4f7fb;
}
.mstaff-search-input {
    width: 100%;
    padding: .75rem 1rem;
    border: 2px solid #d0d9e8;
    border-radius: 10px;
    font-size: .95rem;
    transition: all .25s;
    box-sizing: border-box;
    background: #fff;
}
.mstaff-search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

/* Cards */
.mstaff-list {
    padding: 0 2rem 1rem;
    max-height: 600px;
    overflow-y: auto;
}
.mstaff-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    margin-bottom: .5rem;
    border: 1px solid #e4e9f2;
    border-left: 3px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all .25s ease;
    background: #fff;
}
.mstaff-card:hover {
    border-color: #2563eb;
    border-left-color: #2563eb;
    box-shadow: 0 4px 16px rgba(37, 99, 235, .12);
    transform: translateX(4px);
    text-decoration: none;
    color: inherit;
    background: #fafcff;
}
.mstaff-card-content {
    flex: 1;
    min-width: 0;
}
.mstaff-card-category {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #2563eb;
    margin-bottom: .25rem;
}
.mstaff-card-title {
    margin: 0 0 .5rem;
    font-size: .95rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}
.mstaff-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.mstaff-tag {
    font-size: .75rem;
    padding: .2rem .6rem;
    border-radius: 6px;
    background: #f0f4f8;
    color: #4a5568;
    white-space: nowrap;
    font-weight: 500;
}
.mstaff-tag-contract {
    background: #e0f2e9;
    color: #166534;
    border: 1px solid #bbf0d0;
}
.mstaff-tag-diploma {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.mstaff-tag-date {
    background: #fef3e2;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.mstaff-card-arrow {
    font-size: 1.2rem;
    color: #c8d1e0;
    margin-left: 1rem;
    transition: all .25s;
    flex-shrink: 0;
}
.mstaff-card:hover .mstaff-card-arrow {
    color: #2563eb;
    transform: translateX(3px);
}

/* Empty */
.mstaff-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #94a3b8;
}
.mstaff-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Footer */
.mstaff-footer {
    padding: 1.25rem 2rem;
    background: #f4f7fb;
    border-top: 1px solid #e9eef6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}
.mstaff-footer-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    transition: color .2s;
}
.mstaff-footer-link:hover {
    color: #1e3a5f;
    text-decoration: underline;
}
.mstaff-footer-refresh {
    font-size: .75rem;
    color: #94a3b8;
}

/* Scrollbar */
.mstaff-list::-webkit-scrollbar {
    width: 6px;
}
.mstaff-list::-webkit-scrollbar-track {
    background: #f0f4f8;
    border-radius: 3px;
}
.mstaff-list::-webkit-scrollbar-thumb {
    background: #c8d1e0;
    border-radius: 3px;
}
.mstaff-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive */
@media (max-width: 600px) {
    .mstaff-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .mstaff-header-content {
        flex-direction: column;
    }
    .mstaff-filters {
        padding: .75rem 1rem;
    }
    .mstaff-search,
    .mstaff-list {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .mstaff-card {
        padding: .75rem;
    }
    .mstaff-card-meta {
        flex-direction: column;
    }
    .mstaff-footer {
        flex-direction: column;
        text-align: center;
    }
}
