/* ============================================================
   MLT - STYLES GLOBAUX
   Militants · Ferkessédougou
   ============================================================ */

/* ── VARIABLES ───────────────────────────────────────────── */
:root {
    --marine: #0d2137;
    --marine2: #132d4a;
    --or: #c9a84c;
    --or-light: #e8c96a;
    --vert: #1a7a4a;
    --vert2: #22a061;
    --blanc: #f5f7fa;
    --gris: #8a96a3;
    --gris-bg: #eef2f7;
    --rouge: #e05555;
    --bleu: #3b82f6;
    --sidebar-w: 260px;
    --topbar-h: 62px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .04);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, .08);
    --border: #e3eaf3;
}

/* ============================================================
   PAGE LOGIN
   ============================================================ */
.login-body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    background: var(--marine);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(201, 168, 76, .12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(26, 122, 74, .15) 0%, transparent 50%);
}

.login-pattern {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(45deg,
            transparent,
            transparent 30px,
            rgba(255, 255, 255, .015) 30px,
            rgba(255, 255, 255, .015) 31px);
}

.login-box {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 0 20px;
}

.login-card {
    background: rgba(255, 255, 255, .97);
    border-radius: 24px;
    padding: 40px 36px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo .logo-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2.2rem;
    color: var(--marine);
}

.login-logo .logo-badge {
    display: block;
    margin: 8px auto 0;
}

.login-logo .logo-badge img {
    display: block;
    margin: 0 auto;
    height: 70px;
    width: auto;
}

.login-logo .logo-sub {
    display: block;
    font-size: .78rem;
    color: #8a96a3;
    margin-top: 6px;
    letter-spacing: .5px;
}

.login-label {
    font-size: .83rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 5px;
    display: block;
}

.login-control {
    border: 1.5px solid #dde4ef;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .9rem;
    width: 100%;
    transition: border-color .2s, box-shadow .2s;
}

.login-control:focus {
    border-color: var(--vert);
    box-shadow: 0 0 0 3px rgba(26, 122, 74, .12);
    outline: none;
}

.login-input-group {
    display: flex;
}

.login-input-group-text {
    background: #f0f4f8;
    border: 1.5px solid #dde4ef;
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: #8a96a3;
    padding: 0 12px;
    display: flex;
    align-items: center;
}

.login-input-group .login-control {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--marine) 0%, #1a3a5c 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .3px;
    transition: background .2s, transform .2s, box-shadow .2s;
    margin-top: 8px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-login:hover {
    background: linear-gradient(135deg, #1a3a5c 0%, var(--marine) 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(13, 33, 55, .35);
}

.login-error-box {
    background: #fff0f0;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .84rem;
    color: #c0392b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.login-footer-note {
    text-align: center;
    margin-top: 20px;
    font-size: .73rem;
    color: rgba(255, 255, 255, .35);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--blanc);
    color: #1e2d3d;
    overflow-x: hidden;
}

/* ============================================================
   LOADER DE PAGE
   ============================================================ */
#page-loader {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

#page-loader.active {
    opacity: 1;
    pointer-events: all;
}

.loader-box {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 10px 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gris-bg);
    border-top-color: var(--or-light);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--marine);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform .3s ease;
}

.sidebar-logo {
    padding: 22px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sidebar-logo .logo-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    color: var(--or);
    letter-spacing: .5px;
    line-height: 1;
}

.sidebar-logo .logo-sub {
    font-size: .72rem;
    color: rgba(255, 255, 255, .45);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 3px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .15);
    border-radius: 2px;
}

.nav-section-label {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, .3);
    padding: 14px 20px 5px;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 20px;
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 400;
    border-radius: 0 24px 24px 0;
    margin-right: 12px;
    transition: all .2s;
    position: relative;
}

.nav-item a i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

.nav-item a:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.nav-item a.active {
    background: linear-gradient(135deg, var(--vert) 0%, var(--vert2) 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(26, 122, 74, .4);
}

.nav-item a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--or);
    border-radius: 0 3px 3px 0;
}

.sidebar-bottom {
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .06);
}

.user-avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--or);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--marine);
    font-size: .85rem;
    flex-shrink: 0;
}

.user-name {
    font-size: .82rem;
    color: #fff;
    font-weight: 500;
}

.user-role {
    font-size: .68rem;
    color: var(--or);
    text-transform: uppercase;
    letter-spacing: .8px;
}

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */
#main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#topbar {
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--marine);
    flex: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-body {
    padding: 26px 28px;
    flex: 1;
}

/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.kpi-icon.marine {
    background: rgba(13, 33, 55, .1);
    color: var(--marine);
}

.kpi-icon.vert {
    background: rgba(26, 122, 74, .12);
    color: var(--vert);
}

.kpi-icon.or {
    background: rgba(201, 168, 76, .15);
    color: #a07830;
}

.kpi-icon.rouge {
    background: rgba(224, 85, 85, .12);
    color: var(--rouge);
}

.kpi-icon.bleu {
    background: rgba(59, 130, 246, .12);
    color: var(--bleu);
}

.kpi-icon.violet {
    background: rgba(124, 58, 237, .12);
    color: #7c3aed;
}

.kpi-label {
    font-size: .78rem;
    color: var(--gris);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 2px;
}

.kpi-val {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--marine);
    line-height: 1;
}

/* ============================================================
   CARDS
   ============================================================ */
.card-mlt {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-mlt .card-header-mlt {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.card-mlt .card-header-mlt h5 {
    margin: 0;
    font-size: .95rem;
    font-weight: 600;
    color: var(--marine);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   TABLEAU
   ============================================================ */
.table-mlt {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.table-mlt thead th {
    background: var(--marine);
    color: rgba(255, 255, 255, .85);
    padding: 11px 14px;
    font-weight: 500;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .7px;
    white-space: nowrap;
    border: none;
}

.table-mlt tbody tr {
    border-bottom: 1px solid var(--gris-bg);
    cursor: pointer;
    transition: background .15s;
}

.table-mlt tbody tr:hover {
    background: #f0f6ff;
}

.table-mlt tbody tr.selected {
    background: #e8f4ed;
    border-left: 3px solid var(--vert);
}

.table-mlt td {
    padding: 10px 14px;
    color: #2c3e50;
    vertical-align: middle;
}

.table-scroll {
    overflow-y: auto;
    max-height: calc(100vh - 280px);
}

.table-scroll::-webkit-scrollbar {
    width: 5px;
}

.table-scroll::-webkit-scrollbar-track {
    background: #f0f4f8;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: #c5d0de;
    border-radius: 3px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge-mlt {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .3px;
}

.badge-militant {
    background: rgba(13, 33, 55, .1);
    color: var(--marine);
}

.badge-sympathisant {
    background: rgba(201, 168, 76, .2);
    color: #806020;
}

.badge-actif {
    background: rgba(26, 122, 74, .15);
    color: var(--vert);
}

.badge-inactif {
    background: rgba(224, 85, 85, .12);
    color: var(--rouge);
}

.badge-peu_actif {
    background: rgba(255, 165, 0, .15);
    color: #c06000;
}

.badge-suspendu {
    background: rgba(128, 128, 128, .15);
    color: #555;
}

.badge-cni-oui {
    background: rgba(26, 122, 74, .12);
    color: var(--vert);
}

.badge-cni-non {
    background: rgba(224, 85, 85, .1);
    color: var(--rouge);
}

/* ============================================================
   AVATARS
   ============================================================ */
.avatar-militant {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 12px;
}

.avatar-homme {
    background: linear-gradient(135deg, #dbeafe, #93c5fd);
    color: #1d4ed8;
}

.avatar-femme {
    background: linear-gradient(135deg, #fce7f3, #f9a8d4);
    color: #be185d;
}

/* ============================================================
   DETAIL PANEL
   ============================================================ */
.detail-panel {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    height: 100%;
    overflow-y: auto;
}

.detail-panel .detail-header {
    background: linear-gradient(135deg, var(--marine) 0%, var(--marine2) 100%);
    padding: 24px 20px;
    text-align: center;
    color: #fff;
}

.detail-panel .detail-nom {
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    margin: 8px 0 2px;
}

.detail-panel .detail-sub {
    font-size: .78rem;
    color: rgba(255, 255, 255, .6);
}

.detail-row {
    display: flex;
    padding: 9px 18px;
    border-bottom: 1px solid #f0f4f8;
    font-size: .83rem;
}

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

.detail-key {
    width: 130px;
    color: var(--gris);
    font-weight: 500;
    flex-shrink: 0;
}

.detail-val {
    color: #2c3e50;
}

.detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--gris);
    text-align: center;
    padding: 20px;
}

.detail-empty i {
    font-size: 2.5rem;
    opacity: .3;
    margin-bottom: 10px;
}

.detail-empty p {
    font-size: .84rem;
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn-marine {
    background: var(--marine);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 20px;
    font-size: .87rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all .2s;
}

.btn-marine:hover {
    background: var(--marine2);
    color: #fff;
    transform: translateY(-1px);
}

.btn-or {
    background: var(--or);
    color: var(--marine);
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 20px;
    font-size: .87rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all .2s;
}

.btn-or:hover {
    background: var(--or-light);
    color: var(--marine);
    transform: translateY(-1px);
}

.btn-vert {
    background: var(--vert);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 20px;
    font-size: .87rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all .2s;
}

.btn-vert:hover {
    background: var(--vert2);
    color: #fff;
}

.btn-rouge {
    background: var(--rouge);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 20px;
    font-size: .87rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all .2s;
}

.btn-rouge:hover {
    background: #c94444;
    color: #fff;
}

/* ============================================================
   FORMULAIRES
   ============================================================ */
.form-section-title {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--vert);
    font-weight: 700;
    border-bottom: 2px solid var(--gris-bg);
    padding-bottom: 7px;
    margin: 28px 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title:first-child {
    margin-top: 0;
}

.form-control,
.form-select {
    border: 1.5px solid #dde4ef;
    border-radius: var(--radius-sm);
    padding: 9px 13px;
    font-size: .88rem;
    background: #fafbfd;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--vert);
    box-shadow: 0 0 0 3px rgba(26, 122, 74, .1);
    background: #fff;
    outline: none;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--rouge);
}

.form-label {
    font-size: .82rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 5px;
    display: block;
}

.form-label .required {
    color: var(--rouge);
    margin-left: 2px;
}

.invalid-feedback {
    font-size: .78rem;
    color: var(--rouge);
    margin-top: 3px;
}

.form-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

.form-card-header {
    background: linear-gradient(135deg, var(--marine) 0%, #1a3a5c 100%);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.form-card-header .icon-wrap {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, .15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--or);
}

.form-card-header h4 {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
}

.form-card-header p {
    margin: 0;
    color: rgba(255, 255, 255, .55);
    font-size: .78rem;
}

.form-body {
    padding: 28px;
}

.form-footer {
    padding: 18px 28px;
    background: #f8fafb;
    border-top: 1px solid var(--gris-bg);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.doublon-alert {
    background: #fff8e6;
    border: 1.5px solid var(--or);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: .85rem;
    color: #7a5000;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.check-doublon-btn {
    background: none;
    border: 1.5px solid var(--vert);
    color: var(--vert);
    border-radius: var(--radius-sm);
    padding: 4px 12px;
    font-size: .8rem;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

.check-doublon-btn:hover {
    background: var(--vert);
    color: #fff;
}

/* ============================================================
   RECHERCHE & FILTRES
   ============================================================ */
.search-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    align-items: flex-end;
}

.search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.search-input-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gris);
}

.search-input-wrap input {
    padding-left: 34px;
    border: 1.5px solid #dde4ef;
    border-radius: var(--radius-sm);
    height: 38px;
    font-size: .87rem;
    width: 100%;
    background: #fff;
}

.search-input-wrap input:focus {
    border-color: var(--vert);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 122, 74, .1);
}

select.filter-sel {
    border: 1.5px solid #dde4ef;
    border-radius: var(--radius-sm);
    height: 38px;
    padding: 0 10px;
    font-size: .84rem;
    color: #2c3e50;
    min-width: 120px;
    background: #fff;
}

select.filter-sel:focus {
    border-color: var(--vert);
    outline: none;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-mlt {
    display: flex;
    gap: 4px;
    justify-content: center;
    padding: 14px 0 0;
    flex-wrap: wrap;
}

.pagination-mlt a,
.pagination-mlt span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    font-size: .84rem;
    text-decoration: none;
    border: 1.5px solid #dde4ef;
    color: #2c3e50;
    transition: all .15s;
}

.pagination-mlt a:hover {
    background: var(--marine);
    color: #fff;
    border-color: var(--marine);
}

.pagination-mlt .current {
    background: var(--vert);
    color: #fff;
    border-color: var(--vert);
    font-weight: 600;
}

/* ============================================================
   LISTE / LAYOUT
   ============================================================ */
.liste-layout {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.liste-left {
    flex: 1;
    min-width: 0;
}

.liste-right {
    width: 310px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
}

.no-result {
    text-align: center;
    padding: 60px 20px;
    color: var(--gris);
}

.no-result i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
    opacity: .4;
}

/* ============================================================
   CONFIGURATION
   ============================================================ */
.config-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.config-tab {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: .87rem;
    font-weight: 500;
    text-decoration: none;
    border: 1.5px solid #dde4ef;
    color: #555;
    transition: all .2s;
}

.config-tab.active,
.config-tab:hover {
    background: var(--marine);
    color: #fff;
    border-color: var(--marine);
}

.config-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.config-left {
    flex: 1;
    min-width: 0;
}

.config-right {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
}

.config-form-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.config-form-header {
    background: var(--marine);
    padding: 12px 18px;
    color: #fff;
    font-size: .88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-form-header.or {
    background: linear-gradient(135deg, #8a6010, var(--or));
}

.config-form-body {
    padding: 16px 18px;
}

.config-form-body label {
    font-size: .8rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
    display: block;
}

.config-form-body .form-control,
.config-form-body .form-select {
    font-size: .85rem;
    margin-bottom: 10px;
}

.config-form-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--gris-bg);
    background: #f8fafb;
}

.items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.items-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    border-bottom: 1px solid var(--gris-bg);
    transition: background .15s;
}

.items-list li:last-child {
    border-bottom: none;
}

.items-list li:hover {
    background: #f8fafb;
}

.item-name {
    flex: 1;
    font-size: .88rem;
    font-weight: 500;
    color: #2c3e50;
}

.item-meta {
    font-size: .76rem;
    color: var(--gris);
}

.item-actions {
    display: flex;
    gap: 5px;
}

.secteur-block {
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--border);
    margin-bottom: 14px;
    overflow: hidden;
}

.secteur-block-header {
    background: #f8fafb;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gris-bg);
    cursor: pointer;
}

.secteur-block-header h6 {
    margin: 0;
    font-size: .9rem;
    font-weight: 600;
    color: var(--marine);
}

.secteur-block-header .count {
    font-size: .75rem;
    color: var(--gris);
    background: var(--gris-bg);
    padding: 2px 8px;
    border-radius: 8px;
}

.prof-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prof-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-bottom: 1px solid #f5f7fa;
    font-size: .85rem;
    color: #2c3e50;
}

.prof-list li:last-child {
    border-bottom: none;
}

.prof-list li:hover {
    background: #f8fafb;
}

.prof-name {
    flex: 1;
}

/* ============================================================
   PROFILS UTILISATEURS
   ============================================================ */
.profil-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
}

.profil-super_admin {
    background: rgba(201, 168, 76, .2);
    color: #7a5000;
}

.profil-admin {
    background: rgba(13, 33, 55, .12);
    color: var(--marine);
}

.profil-user {
    background: rgba(26, 122, 74, .12);
    color: var(--vert);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
}

.ua-super {
    background: var(--or);
    color: var(--marine);
}

.ua-admin {
    background: var(--marine);
    color: #fff;
}

.ua-user {
    background: rgba(26, 122, 74, .2);
    color: var(--vert);
}

/* ============================================================
   IMPORT EXCEL
   ============================================================ */
.import-wrap {
    max-width: 820px;
    margin: 0 auto;
}

.drop-zone {
    border: 2.5px dashed #c0d0e0;
    border-radius: var(--radius-lg);
    padding: 44px 24px;
    text-align: center;
    background: #f8fafb;
    cursor: pointer;
    transition: all .25s;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--vert);
    background: rgba(26, 122, 74, .04);
}

.drop-zone i {
    font-size: 2.8rem;
    color: #b0c4d8;
    display: block;
    margin-bottom: 12px;
}

.drop-zone p {
    margin: 0;
    color: #8a96a3;
    font-size: .9rem;
}

.drop-zone strong {
    color: var(--vert);
}

.file-selected {
    display: none;
    align-items: center;
    gap: 10px;
    background: rgba(26, 122, 74, .08);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    margin-top: 12px;
    font-size: .87rem;
    color: var(--vert);
}

.result-box {
    border-radius: 14px;
    padding: 20px 24px;
    margin-top: 20px;
}

.result-box.success {
    background: #f0faf4;
    border: 1.5px solid #a7f3d0;
}

.result-box.warning {
    background: #fffbeb;
    border: 1.5px solid #fcd34d;
}

.result-box .stat-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, .7);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: .85rem;
    font-weight: 500;
}

.stat-pill.green {
    color: var(--vert);
}

.stat-pill.orange {
    color: #d97706;
}

.stat-pill.red {
    color: var(--rouge);
}

.detail-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
    padding-left: 0;
    list-style: none;
}

.detail-list li {
    font-size: .8rem;
    padding: 4px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    color: #555;
}

.detail-list li:last-child {
    border-bottom: none;
}

.col-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .8rem;
}

.col-table th {
    background: var(--marine);
    color: rgba(255, 255, 255, .8);
    padding: 7px 12px;
    font-weight: 500;
    text-align: left;
}

.col-table td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--gris-bg);
    color: #2c3e50;
}

.col-table tr:last-child td {
    border-bottom: none;
}

.badge-req {
    background: rgba(224, 85, 85, .12);
    color: var(--rouge);
    font-size: .7rem;
    padding: 2px 7px;
    border-radius: 8px;
}

.badge-opt {
    background: rgba(26, 122, 74, .1);
    color: var(--vert);
    font-size: .7rem;
    padding: 2px 7px;
    border-radius: 8px;
}

/* ============================================================
   EXPORT EXCEL
   ============================================================ */
.export-wrap {
    max-width: 720px;
    margin: 0 auto;
}

.export-filters-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.export-section {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gris-bg);
}

.export-section:last-child {
    border-bottom: none;
}

.export-section-title {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--vert);
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.age-range-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.age-range-wrap input {
    width: 80px;
}

.age-range-wrap span {
    color: var(--gris);
    font-size: .85rem;
}

/* ============================================================
   MODAL CONFIRMATION
   ============================================================ */
.modal-confirm .modal-content {
    border-radius: var(--radius-lg);
    border: none;
    overflow: hidden;
}

.modal-confirm .modal-header {
    background: rgba(224, 85, 85, .08);
    border-bottom: 1px solid rgba(224, 85, 85, .15);
    padding: 20px 24px;
}

.modal-confirm .modal-icon {
    width: 52px;
    height: 52px;
    background: rgba(224, 85, 85, .15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--rouge);
    margin: 0 auto 12px;
}

.modal-confirm .modal-footer {
    border-top: 1px solid var(--gris-bg);
    padding: 14px 24px;
}

/* ============================================================
   MESSAGES DJANGO (toast)
   ============================================================ */
.toast-mlt {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 280px;
}

.alert-mlt {
    border-radius: var(--radius-md);
    border: none;
    padding: 12px 18px;
    font-size: .87rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================
   GRAPHIQUES
   ============================================================ */
.chart-wrap {
    position: relative;
    height: 220px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    #sidebar {
        transform: translateX(-100%);
    }

    #sidebar.open {
        transform: translateX(0);
    }

    #main-content {
        margin-left: 0;
    }

    .liste-right {
        display: none;
    }

    .liste-layout {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .page-body {
        padding: 16px;
    }

    #topbar {
        padding: 0 16px;
    }

    .kpi-val {
        font-size: 1.3rem;
    }
}