/* ============================================
   AVEC Bunia - Styles Personnalisés
   Version 2.0
   ============================================ */

:root {
    --primary: #1a472a;
    --primary-light: #2d7a4a;
    --primary-dark: #0d1f12;
    --secondary: #f59e0b;
    --secondary-light: #fbbf24;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #eab308;
    --info: #0ea5e9;
    
    /* ✅ LARGEURS */
    --sidebar-width: 260px;
    --sidebar-width-tablet: 220px;
    --sidebar-width-mobile: 280px;
    --header-height: 60px;
    --footer-height: auto;
    
    /* ✅ ESPACEMENTS */
    --content-padding: 24px;
    --content-padding-mobile: 16px;
    
    /* ✅ COULEURS */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    
    /* ✅ OMBRES */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */

/* ✅ SIDEBAR — vert forêt (référence tableau de bord) */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #0d1f12 0%, #1a472a 52%, #2d7a4a 100%);
    z-index: 40;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
}

/* ✅ CONTENU PRINCIPAL */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--gray-50);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

/* ✅ CONTENEUR DU CONTENU - CENTRÉ AVEC MAX-WIDTH */
.main-content .content-wrapper {
    flex: 1;
    padding: var(--content-padding);
    max-width: 1280px;
    margin-right: 20px;
    width: 100%;
    margin: 0 auto;
}

/* Pied de page */
.main-footer {
    background: #fff;
    border-top: 2px solid #1a472a;
    box-shadow: 0 -1px 0 #f59e0b;
    margin-top: auto;
    width: 100%;
}
.main-footer .footer-wrapper {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 20px var(--content-padding) 18px;
}
.footer-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
}
.footer-brand {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 0;
}
.footer-brand strong {
    color: #14532d;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.footer-brand span {
    color: #6b7280;
    font-size: 13px;
}
.footer-links {
    display: flex;
    align-items: center;
    gap: 18px;
}
.footer-links a {
    color: #1a472a;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.footer-links a:hover { color: #b45309; }
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 0;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    font-size: 12px;
    color: #6b7280;
}
.footer-bottom span {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 14px;
}
.footer-bottom span + span {
    border-left: 1px solid #e5e7eb;
}
.footer-bottom a {
    color: #374151;
    text-decoration: none;
}
.footer-bottom a:hover { color: #1a472a; }

/* ============================================
   RESPONSIVE - TABLETTE
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --sidebar-width: var(--sidebar-width-tablet);
    }
    
    .sidebar {
        width: var(--sidebar-width-tablet);
    }
    
    .main-content {
        margin-left: var(--sidebar-width-tablet);
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    :root {
        --sidebar-width: var(--sidebar-width-mobile);
        --content-padding: var(--content-padding-mobile);
    }
    
    /* Sidebar cachée sur mobile */
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width-mobile);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Contenu pleine largeur sur mobile */
    .main-content {
        margin-left: 0 !important;
    }
    
    .main-content .content-wrapper {
        padding: var(--content-padding-mobile);
    }
    
    .main-footer .footer-wrapper {
        padding: 16px var(--content-padding-mobile) 18px;
    }
    .footer-top,
    .footer-brand,
    .footer-links {
        justify-content: center;
        text-align: center;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
    }
    .footer-bottom span + span {
        border-left: 0;
        padding-top: 8px;
        border-top: 1px solid #f3f4f6;
    }
}

/* ============================================
   STYLES DE LA SIDEBAR
   ============================================ */

.sidebar-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    margin: 2px 10px;
    border-radius: 10px;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    position: relative;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.08);
    color: white;
    transform: translateX(3px);
}

.sidebar-link.active {
    background: rgba(255,255,255,0.14);
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: #fbbf24;
    border-radius: 0 4px 4px 0;
}

.sidebar-link i {
    width: 18px;
    font-size: 14px;
    color: rgba(255,255,255,0.35);
}

.sidebar-link.active i { color: #fbbf24; }
.sidebar-link:hover i { color: white; }
.nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sidebar-link.active .nav-badge { background: #fbbf24; color: #1a472a; }

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

.sidebar-logo {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo .logo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: white;
    font-weight: 800;
    letter-spacing: 1px;
    border: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo h1 {
    font-size: 17px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.3px;
    line-height: 1.2;
}
.sidebar-logo p {
    font-size: 10px;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 500;
}
.sidebar-logo .logo-sub {
    font-size: 9px;
    color: rgba(255,255,255,0.3);
}
.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 6px 16px;
}
.sidebar-section-title {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.22);
    padding: 12px 18px 6px;
    font-weight: 600;
}
.sidebar-user {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: rgba(0,0,0,0.22);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-user .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    border: 2px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.sidebar-user .user-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
    line-height: 1.2;
}
.sidebar-user .user-role {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    text-transform: capitalize;
}
.sidebar-user .user-actions { display: flex; gap: 2px; }
.sidebar-user .user-actions a {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    position: relative;
}
.sidebar-user .user-actions a:hover { background: rgba(255,255,255,0.1); color: white; }
.sidebar-user .notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 8px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: #f4f7f5;
    display: flex;
    flex-direction: column;
}

.main-content .content-wrapper {
    flex: 1;
    padding: 22px 28px 32px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* ============================================
   BOUTON MENU MOBILE
   ============================================ */

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 50;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
}

/* ============================================
   OVERLAY MOBILE
   ============================================ */

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 35;
}

.sidebar-overlay.active {
    display: block;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */

.notification-dot {
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    display: inline-block;
}

/* ============================================
   RESPONSIVE MOBILE - AFFICHAGE
   ============================================ */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

/* ============================================
   AUTRES STYLES UTILITAIRES
   ============================================ */

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Statistiques */
.stat-number {
    font-size: 28px;
    font-weight: 700;
}

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
}

/* Boutons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Alertes */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    border-left: 4px solid transparent;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border-left-color: var(--success);
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: var(--danger);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left-color: var(--warning);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left-color: var(--info);
}

/* ============================================
   TABLEAU DE BORD
   ============================================ */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background: white;
    border-radius: 16px;
    padding: 18px 22px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    border: 1px solid #eef2f0;
}
.cycle-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a472a;
    color: white;
    font-size: 12px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 999px;
    white-space: nowrap;
}
.cycle-pill i { color: #fbbf24; font-size: 11px; }
.dash-bell {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
}
.dash-bell span {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.dash-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 10px;
    text-decoration: none;
}
.dash-banner-blue { background: #eff6ff; color: #1d4ed8; }
.dash-banner-green { background: #ecfdf5; color: #047857; }
.dash-banner-orange { background: #fff7ed; color: #c2410c; }
.kpi-caption {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 10px;
}
.kpi-caption i { color: #1a472a; }
.kpi-caption-me { color: #1a472a; margin-top: 4px; }
.kpi-caption-me i { color: #1a472a; }
.dash-role-pill {
    display: inline-block;
    margin-left: 8px;
    background: #ecfdf5;
    color: #047857;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    vertical-align: middle;
}
.kpi-card {
    background: white;
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid #eef2f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.kpi-card-text {
    min-width: 0;
    flex: 1;
}
.kpi-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 4px;
}
.kpi-value {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}
.kpi-hint {
    font-size: 10px;
    font-weight: 500;
    color: #9ca3af;
    margin: 3px 0 0;
    line-height: 1.25;
}
.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    align-self: center;
}
.kpi-blue { background: #eff6ff; color: #2563eb; }
.kpi-green { background: #ecfdf5; color: #059669; }
.kpi-orange { background: #fff7ed; color: #ea580c; }
.kpi-purple { background: #f5f3ff; color: #7c3aed; }
.kpi-indigo { background: #eef2ff; color: #4f46e5; }
.kpi-red { background: #fef2f2; color: #dc2626; }

.dash-card {
    background: white;
    border-radius: 16px;
    padding: 18px 20px;
    border: 1px solid #eef2f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.dash-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.dash-card-head h3 {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}
.dash-card-head a {
    font-size: 12px;
    color: #1a472a;
    font-weight: 600;
}
.chart-box {
    position: relative;
    width: 100%;
    height: 260px;
}
.chart-box canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.activity-list { display: flex; flex-direction: column; gap: 4px; }
.activity-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 6px;
    border-radius: 12px;
}
.activity-row:hover { background: #f8fafc; }
.activity-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}
.activity-green { background: #ecfdf5; color: #059669; }
.activity-orange { background: #fff7ed; color: #ea580c; }
.activity-blue { background: #eff6ff; color: #2563eb; }
.activity-red { background: #fef2f2; color: #dc2626; }
.activity-rose { background: #fff1f2; color: #e11d48; }

.activity-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}
.activity-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}
.activity-filter span {
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 12px;
}
.activity-filter.is-on {
    background: #1a472a;
    border-color: #1a472a;
    color: #fff;
}
.activity-filter.is-on span { background: rgba(255,255,255,.18); color: #fff; }
.activity-feed { display: grid; gap: 10px; }
.activity-detail {
    display: flex;
    gap: 14px;
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}
.activity-detail-body { flex: 1; min-width: 0; }
.activity-detail-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.activity-detail h3 { margin: 0; font-size: 15px; color: #111827; }
.activity-detail-amount { text-align: right; }
.activity-detail-amount strong { display: block; font-size: 15px; color: #0f172a; }
.activity-detail-text { margin: 8px 0 0; color: #4b5563; font-size: 13.5px; line-height: 1.45; }
.activity-detail-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: #94a3b8;
    font-size: 12px;
}
.activity-detail-foot i { margin-right: 4px; }
a.activity-detail {
    text-decoration: none;
    color: inherit;
}
a.activity-detail:hover {
    border-color: #bbf7d0;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.credit-stat-row.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.remb-feed { display: grid; gap: 12px; }
.remb-card {
    display: flex;
    gap: 14px;
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}
.remb-card--wait { border-left: 4px solid #f97316; }
.remb-card--ok { border-left: 4px solid #22c55e; }
.remb-card--off { border-left: 4px solid #ef4444; }
.remb-body { flex: 1; min-width: 0; }
.remb-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.remb-top h3 { margin: 0; font-size: 15px; color: #111827; }
.remb-top .row-muted { margin: 3px 0 0; }
.remb-amount { text-align: right; }
.remb-amount strong {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}
.remb-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px;
}
.remb-grid span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 3px;
}
.remb-grid strong {
    font-size: 13px;
    color: #0f172a;
    font-weight: 700;
}
.remb-progress {
    position: relative;
    height: 28px;
    margin-top: 12px;
    border-radius: 999px;
    background: #eef2ff;
    overflow: hidden;
}
.remb-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #86efac, #22c55e);
    border-radius: 999px;
    min-width: 0;
}
.remb-progress span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #14532d;
}
.remb-but, .remb-motif {
    margin: 10px 0 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.45;
}
.remb-but i, .remb-motif i { margin-right: 6px; color: #64748b; }
.remb-motif {
    background: #fef2f2;
    color: #991b1b;
    border-radius: 10px;
    padding: 8px 12px;
}
.remb-motif i { color: #dc2626; }
.remb-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    color: #94a3b8;
    font-size: 12px;
}
.remb-foot i { margin-right: 4px; }
.remb-foot .eq-link {
    margin-left: auto;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.remb-acts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
}
.remb-acts form { margin: 0; }

.caisse-mini {
    border-radius: 12px;
    padding: 12px;
}
.caisse-mini p { font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.caisse-mini strong { font-size: 15px; font-weight: 800; display: block; }
.caisse-red { background: #fef2f2; color: #b91c1c; }
.caisse-orange { background: #fff7ed; color: #c2410c; }
.caisse-green { background: #ecfdf5; color: #047857; }
.caisse-blue { background: #eff6ff; color: #1d4ed8; }

.btn-caisse {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    text-decoration: none;
}
.btn-caisse-red { background: #dc2626; }
.btn-caisse-green { background: #15803d; }
.btn-caisse:hover { opacity: 0.92; }

.quick-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid #eef2f0;
    border-radius: 16px;
    padding: 14px 16px;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.quick-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.quick-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.page-head h2 { font-size: 1.5rem; font-weight: 800; color: #111827; }
.table-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #eef2f0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.table-card table,
.dash-card table,
table.w-full {
    width: 100%;
    border-collapse: collapse;
}
.table-card th,
table thead th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
    padding: 12px;
    background: #f8fafc;
}
.table-card td,
table td {
    padding: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.875rem;
    color: #1f2937;
}

/* ============================================
   PAGE MEMBRES
   ============================================ */
.membres-hero { text-align: center; margin-bottom: 18px; }
.membres-hero h2 { font-size: 1.75rem; font-weight: 800; color: #111827; margin: 0; }
.membres-hero p { color: #6b7280; margin: 6px 0 0; font-size: 0.95rem; }
.membres-cta {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.btn-membre-add, .btn-membre-team {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    color: #fff;
    border: none;
    cursor: pointer;
}
.btn-membre-add { background: #15803d; }
.btn-membre-team { background: #ea580c; }
.membres-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}
.membres-search {
    flex: 1 1 240px;
    position: relative;
}
.membres-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}
.membres-search input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    outline: none;
}
.membres-search input:focus { border-color: #1a472a; box-shadow: 0 0 0 3px rgba(26,71,42,.12); }
.sexe-filters { display: flex; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
.sexe-filters button,
.sexe-filters a {
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.sexe-filters button.is-active,
.sexe-filters a.is-active { background: #15803d; color: #fff; }
.role-filter {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    min-width: 160px;
}
.membres-table-wrap { overflow-x: auto; }
.membres-table { width: 100%; border-collapse: collapse; }
.membres-table th { white-space: nowrap; }
.membre-cell { display: flex; align-items: center; gap: 10px; }
.membre-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    color: #fff; font-weight: 700; font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.membre-nom { font-weight: 600; color: #111827; }
.membre-contact { font-weight: 500; }
.membre-email { font-size: 11px; color: #9ca3af; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; color: #374151; }
.parts-pill {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 28px; padding: 0 10px;
    border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-weight: 800; font-size: 13px;
}
.membre-actions { display: flex; align-items: center; gap: 6px; }
.membre-actions form { margin: 0; }
.act {
    width: 32px; height: 32px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none; border: none; cursor: pointer; background: transparent; font-size: 14px;
}
.act-view { color: #16a34a; }
.act-edit { color: #2563eb; }
.act-save { color: #0d9488; }
.act-user { color: #ea580c; }
.act-pay { color: #7c3aed; }
.act-msg { color: #0f766e; }
.act-del { color: #dc2626; }
.act:hover { background: #f3f4f6; }
.filter-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 0.9rem;
}
.filter-chip a { margin-left: auto; color: #1d4ed8; font-weight: 700; text-decoration: none; }
.filter-chip a:hover { text-decoration: underline; }
.rembourse-box {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed #e5e7eb;
}
.rembourse-box h3,
.remb-list h3 {
    font-size: 1.05rem;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rembourse-hint { color: #6b7280; font-size: 0.88rem; margin: 0 0 12px; line-height: 1.45; }
.rembourse-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.rembourse-form label { flex: 1; min-width: 180px; margin: 0; }
.rembourse-form .form-control { margin-bottom: 0; }
.remb-list { margin-top: 22px; }
.remb-list table { width: 100%; }
.membres-empty { text-align: center; color: #9ca3af; padding: 24px; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-overlay[hidden] { display: none !important; }
.modal {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.modal-lg { max-width: 680px; }
.req { color: #dc2626; }
.opt { color: #9ca3af; font-weight: 500; font-size: 12px; }
.field-hint { display: block; color: #6b7280; font-size: 12px; margin-top: -6px; margin-bottom: 8px; }
.compte-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 8px 0 16px;
    font-size: 13px;
    color: #374151;
}
.compte-title { font-weight: 800; margin: 0 0 8px; color: #111827; }
.compte-box p { margin: 4px 0; }
.compte-box code { background: #e5e7eb; padding: 1px 6px; border-radius: 6px; }
.modal-foot-3 { justify-content: flex-start; flex-wrap: wrap; }
.btn-outline {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 0.75rem 1.1rem;
    font-weight: 700;
    cursor: pointer;
}
.equipe-icon { color: #ea580c; margin-right: 8px; }
.equipe-section-title {
    font-weight: 800;
    font-size: 0.95rem;
    margin: 0 0 10px;
    color: #111827;
}
.equipe-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #eef2f0;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fff;
}
.equipe-info { flex: 1; min-width: 0; }
.equipe-info strong { display: block; font-size: 14px; }
.equipe-info span { font-size: 12px; color: #6b7280; }
.equipe-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.eq-link {
    background: none;
    border: none;
    color: #2563eb;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}
.eq-retirer {
    background: none;
    border: none;
    color: #dc2626;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}
.badge-president {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    color: #b45309;
    font-weight: 800;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
}
.equipe-add {
    display: grid;
    grid-template-columns: 1fr 160px auto;
    gap: 8px;
    align-items: center;
}
.equipe-add select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}
.btn-equipe-add {
    background: #d97706;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}
.equipe-note { font-size: 12px; color: #9ca3af; margin: 10px 0 0; }
@media (max-width: 640px) {
    .equipe-add { grid-template-columns: 1fr; }
    .equipe-actions { width: 100%; }
}
.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 8px;
}
.modal-head h3 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.modal-close {
    border: none;
    background: #f3f4f6;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}
.modal-body { padding: 8px 20px 16px; }
.modal form { padding: 8px 20px 0; }
.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}
.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 20px 20px;
}
.modal-error {
    background: #fef2f2;
    color: #991b1b;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    margin: 0 0 8px;
}
.btn-ghost {
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.1rem;
    font-weight: 700;
    cursor: pointer;
}
.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 90;
    padding: 12px 16px;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.toast-ok { background: #15803d; }
.toast-err { background: #dc2626; }
.toast[hidden] { display: none !important; }

@media (max-width: 640px) {
    .modal-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .dash-header { padding: 14px; }
    .cycle-pill { font-size: 11px; white-space: normal; }
    .kpi-value { font-size: 15px; }
}

/* ============================================
   MODULES CYCLES / ÉPARGNE / CRÉDITS
   ============================================ */
.mod-page { width: 100%; }

.mod-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.mod-hero-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.mod-hero-title > i {
    color: #15803d;
    font-size: 26px;
    margin-top: 4px;
}
.mod-hero h2 {
    font-size: 1.7rem;
    font-weight: 800;
    color: #111827;
    margin: 0;
    letter-spacing: -0.02em;
}
.mod-hero p {
    color: #9ca3af;
    font-size: 0.9rem;
    margin: 4px 0 0;
}
.mod-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-mod {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    color: #fff;
    white-space: nowrap;
}
a.btn-mod, a.btn-mod:visited { color: #fff; text-decoration: none; }
a.btn-mod-cancel, a.btn-mod-cancel:visited { color: #374151; }
.btn-mod-green { background: #16a34a; }
.btn-mod-green:hover { background: #15803d; color: #fff; }
.btn-mod-navy { background: #1e293b; }
.btn-mod-navy:hover { background: #0f172a; color: #fff; }
.btn-mod-orange { background: #ea580c; }
.btn-mod-orange:hover { background: #c2410c; color: #fff; }
.btn-mod-cancel {
    background: #e5e7eb;
    color: #374151;
}
.btn-mod-cancel:hover { background: #d1d5db; color: #111827; }

.stat-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.stat-plain {
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.stat-plain .stat-k {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 6px;
}
.stat-plain .stat-v {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
}
.stat-v-green { color: #16a34a; }
.stat-v-blue { color: #2563eb; }
.stat-v-orange { color: #ea580c; }

.credit-stat-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}
.credit-stat {
    border-radius: 12px;
    padding: 14px 10px 12px;
    text-align: center;
    border-top: 3px solid #cbd5e1;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.credit-stat span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 4px;
}
.credit-stat strong {
    font-size: 1.45rem;
    font-weight: 800;
    color: #111827;
}
.credit-stat-total { background: #fff; border-top-color: #93c5fd; }
.credit-stat-ok { background: #ecfdf5; border-top-color: #22c55e; }
.credit-stat-ok strong { color: #15803d; }
.credit-stat-run { background: #fff7ed; border-top-color: #f97316; }
.credit-stat-run strong { color: #c2410c; }
.credit-stat-bad { background: #fef2f2; border-top-color: #ef4444; }
.credit-stat-bad strong { color: #b91c1c; }
.credit-stat-rej { background: #f5f3ff; border-top-color: #a78bfa; }
.credit-stat-rej strong { color: #6d28d9; }

.section-card {
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    margin-bottom: 16px;
}
.section-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px 8px;
    gap: 8px;
}
.section-card-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
}
.section-card-head .meta {
    font-size: 12px;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.empty-state {
    text-align: center;
    padding: 48px 16px 40px;
    color: #9ca3af;
}
.empty-state i {
    font-size: 42px;
    color: #d1d5db;
    margin-bottom: 12px;
    display: block;
}
.empty-state p {
    margin: 0 0 8px;
    font-weight: 600;
    color: #6b7280;
}
.empty-state a {
    color: #15803d;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
}
.empty-state a:hover { text-decoration: underline; }
.empty-state a.is-danger { color: #dc2626; }

.report-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #15803d;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    margin: 6px 2px 8px;
}
.report-link:hover { text-decoration: underline; }

.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-wait { background: #ffedd5; color: #c2410c; }
.badge-ok { background: #dcfce7; color: #15803d; }
.badge-off { background: #fee2e2; color: #b91c1c; }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-late { background: #ffedd5; color: #c2410c; }

.pending-box {
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-left: 4px solid #7c3aed;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.pending-box-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 800;
    color: #4c1d95;
}
.pending-box-head i { color: #7c3aed; }
.pending-count {
    background: #7c3aed;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}
.pending-row {
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.pending-row:last-child { margin-bottom: 0; }
.pending-who { min-width: 0; }
.pending-who strong { display: block; font-size: 14px; color: #111827; }
.pending-who span { font-size: 12px; color: #9ca3af; }
.amount-pill {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 800;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
}
.pending-time { font-size: 12px; color: #9ca3af; white-space: nowrap; }
.pending-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-approve, .btn-reject {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}
.btn-approve { background: #dcfce7; color: #15803d; }
.btn-approve:hover { background: #bbf7d0; }
.btn-reject { background: #fee2e2; color: #b91c1c; }
.btn-reject:hover { background: #fecaca; }

.cycle-create {
    max-width: 560px;
    margin: 8px auto 24px;
}

.credit-ask {
    max-width: 560px;
    margin: 8px auto 24px;
}
.credit-ask .assist-head { margin-bottom: 16px; }
.credit-ask-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}
.credit-ask-kpi {
    border-radius: 16px;
    padding: 16px 18px;
    min-width: 0;
}
.credit-ask-kpi span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    opacity: 0.85;
}
.credit-ask-kpi strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
    word-break: break-word;
}
.credit-ask-kpi em {
    display: block;
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    opacity: 0.8;
}
.credit-ask-kpi.is-blue { background: #eff6ff; color: #1d4ed8; }
.credit-ask-kpi.is-green { background: #ecfdf5; color: #047857; }
.credit-ask-form .field-block { margin-bottom: 16px; }
.credit-ask-form .field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #374151;
}
.credit-ask-form .field-hint {
    margin: 8px 0 0;
    line-height: 1.4;
}
.credit-ask-form .field-error { margin: 4px 0 0; }
.credit-ask-form .form-control,
.credit-ask-form select.form-control,
.credit-ask-form input[type="date"] {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
}
.money-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    overflow: hidden;
}
.money-wrap:focus-within {
    background: #fff;
    border-color: #1a472a;
    box-shadow: 0 0 0 4px rgba(26, 71, 42, 0.12);
}
.money-prefix {
    flex: 0 0 auto;
    padding: 0 2px 0 14px;
    color: #6b7280;
    font-weight: 700;
    line-height: 1;
}
.money-wrap input,
.credit-ask-form .money-wrap input[type="number"],
.credit-ask-form .money-wrap input[type="text"] {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0;
    padding: 0.8rem 1rem 0.8rem 8px;
}
.pct-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 0;
}
.pct-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 10px;
    padding: 8px 0;
    font-weight: 700;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}
.pct-btn:hover { background: #f8fafc; }
.pct-btn.is-on {
    background: #1a472a;
    border-color: #1a472a;
    color: #fff;
}
.credit-check {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 16px !important;
    font-weight: 500 !important;
}
.credit-check input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #1a472a;
}
.credit-check strong { display: block; color: #111827; font-size: 14px; }
.credit-check small { display: block; color: #6b7280; font-weight: 500; margin-top: 2px; line-height: 1.45; }
.servi-box {
    background: #eff6ff;
    border-radius: 14px;
    padding: 14px 16px 12px;
    margin-bottom: 18px;
}
.servi-box.is-off { background: #f8fafc; }
.servi-box .field-label { margin-bottom: 8px; }
.servi-box .money-wrap { background: #fff; }
.cycle-form .servi-tip,
.servi-tip {
    margin: 8px 0 0;
    font-size: 13px;
    color: #1d4ed8;
    font-weight: 600;
    line-height: 1.4;
}
.servi-box.is-off .servi-tip { color: #64748b; }
.cycle-form .servi-detail,
.servi-detail {
    margin: 6px 0 0;
    font-size: 13px;
    color: #1e3a8a;
}
.servi-detail strong { font-weight: 800; }
.credit-ask .cycle-form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.credit-ask .cycle-form-actions .btn-mod {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}
@media (max-width: 640px) {
    .credit-ask-kpis { grid-template-columns: 1fr; }
}

.epargne-ask {
    max-width: 760px;
    margin: 8px auto 24px;
}
.epargne-ask .assist-head { margin-bottom: 16px; }
.epargne-period {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    color: #1e3a8a;
}
.epargne-period strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #1d4ed8;
}
.epargne-period strong i { margin-right: 4px; }
.epargne-period p {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #1e40af;
    line-height: 1.45;
}
.epargne-period p i { color: #16a34a; margin-right: 4px; }
.epargne-period-week {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 800;
    color: #2563eb;
    white-space: nowrap;
}
.epargne-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #eff6ff;
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
}
.epargne-stat {
    padding: 16px 18px;
    min-width: 0;
    border-right: 1px solid #dbeafe;
    border-bottom: 1px solid #dbeafe;
}
.epargne-stat:nth-child(2n) { border-right: 0; }
.epargne-stat:nth-child(n+3) { border-bottom: 0; }
.epargne-stat span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
}
.epargne-stat strong {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.25;
    word-break: break-word;
}
.epargne-stat strong.is-blue { color: #2563eb; }
.epargne-stat strong.is-green { color: #16a34a; }
.epargne-ask-form .field-block { margin-bottom: 0; }
.epargne-ask-form .field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #374151;
}
.epargne-ask-form .field-hint {
    margin: 8px 0 0;
    line-height: 1.4;
    color: #6b7280;
}
.epargne-ask-form .field-error { margin: 4px 0 0; }
.epargne-ask-form .form-control,
.epargne-ask-form select.form-control {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
}
.epargne-ask-form .money-wrap input[type="number"] {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0;
    padding: 0.8rem 1rem 0.8rem 8px;
}
.epargne-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    align-items: start;
    margin-bottom: 8px;
}
.epargne-calc {
    background: #f3f4f6;
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #4b5563;
    font-weight: 600;
}
.epargne-calc strong { color: #111827; font-weight: 800; }
.epargne-calc .epargne-total { color: #16a34a; }
.epargne-quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 16px 0 14px;
}
.epargne-quick-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 700;
}
.epargne-pill {
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
}
.epargne-pill:hover { background: #e5e7eb; }
.epargne-pill.is-on {
    background: #1a472a;
    border-color: #1a472a;
    color: #fff;
}
.epargne-warn {
    background: #fef3c7;
    color: #92400e;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
}
.epargne-warn i { margin-right: 4px; }
.epargne-ask .cycle-form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.epargne-ask .cycle-form-actions .btn-mod {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}
@media (max-width: 640px) {
    .epargne-fields { grid-template-columns: 1fr; }
    .epargne-period { flex-wrap: wrap; }
    .epargne-period-week { width: 100%; }
}
.cycle-create-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: #111827;
    margin: 8px 0 22px;
}
.cycle-form {
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 16px;
    padding: 28px 28px 24px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}
.cycle-form label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 4px;
}
.cycle-form .cycle-check {
    display: flex;
    align-items: flex-start;
    font-weight: 500;
    margin-bottom: 0;
}
.cycle-form .form-control {
    margin-top: 6px;
    margin-bottom: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    padding: 0.8rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
}
.cycle-form .form-control:focus {
    background: #fff;
    border-color: #1a472a;
}
.cycle-form .form-control.is-invalid,
.form-control.is-invalid,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
    border-color: #dc2626 !important;
    background: #fef2f2;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}
.form-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}
.form-error[hidden] { display: none !important; }
.field-error {
    display: block;
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 12px;
}
.field-error[hidden] { display: none !important; }
.field-block { margin-bottom: 8px; }
.field-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
}
.cycle-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 6px 0 14px;
}
.cycle-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    accent-color: #1a472a;
    flex-shrink: 0;
}
.cycle-check strong {
    display: block;
    font-size: 0.9rem;
    color: #111827;
    font-weight: 700;
}
.cycle-check small {
    display: block;
    color: #9ca3af;
    font-size: 12px;
    margin-top: 2px;
}
.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 20px;
}
.info-banner i { margin-top: 2px; }
.info-banner.warn { background: #fff7ed; color: #c2410c; }
.info-banner.ok { background: #ecfdf5; color: #047857; }
.info-banner.danger { background: #fef2f2; color: #b91c1c; }
.cycle-form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.cycle-form p {
    margin: 0 0 8px;
    color: #374151;
    font-size: 0.95rem;
}

.act-row { display: flex; align-items: center; gap: 6px; }
.row-muted { color: #9ca3af; font-size: 12px; }

@media (max-width: 900px) {
    .stat-row, .credit-stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .mod-hero h2 { font-size: 1.35rem; }
    .credit-stat-row { grid-template-columns: 1fr 1fr; }
    .stat-row { grid-template-columns: 1fr 1fr; }
    .cycle-form { padding: 20px 16px; }
}

/* ============================================
   CAISSE / AMENDES / PARTAGE / CYCLES
   ============================================ */
.hero-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.hero-icon-red { background: #fee2e2; color: #dc2626; }
.hero-icon-yellow { background: #fef3c7; color: #d97706; }
.hero-icon-green { background: #dcfce7; color: #15803d; }

.pill-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}

.amende-rule {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    color: #92400e;
}
.amende-rule.is-alert {
    background: #fef3c7;
    border-color: #fbbf24;
    border-left-color: #d97706;
}
.amende-rule-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fde68a;
    color: #b45309;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.amende-rule-body strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 4px;
}
.amende-rule-body p {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: #a16207;
}
.amende-rule-due {
    margin-top: 8px !important;
    color: #b45309 !important;
}
.amende-rule-due b { color: #92400e; }

.cycle-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #2563eb;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    color: #1e40af;
}
.cycle-warning.is-alert {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #d97706;
    color: #92400e;
}
.cycle-warning.is-end {
    background: #fef2f2;
    border-color: #fecaca;
    border-left-color: #dc2626;
    color: #991b1b;
}
.cycle-warning-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #dbeafe;
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cycle-warning.is-alert .cycle-warning-icon {
    background: #fde68a;
    color: #b45309;
}
.cycle-warning.is-end .cycle-warning-icon {
    background: #fecaca;
    color: #dc2626;
}
.cycle-warning-body strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 4px;
}
.cycle-warning-body p {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}
.cycle-warning-note {
    margin-top: 6px !important;
    font-size: 12px !important;
    opacity: 0.9;
}

.pastel-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.pastel-card {
    border-radius: 14px;
    padding: 16px 18px;
}
.pastel-card .k {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 6px;
    opacity: 0.75;
}
.pastel-card .v {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
}
.pastel-card .s { font-size: 12px; margin-top: 4px; opacity: 0.8; }
.pastel-green { background: #ecfdf5; color: #047857; }
.pastel-red { background: #fef2f2; color: #b91c1c; }
.pastel-blue { background: #eff6ff; color: #1d4ed8; }
.pastel-purple { background: #f5f3ff; color: #6d28d9; }
.pastel-yellow { background: #fffbeb; color: #b45309; }
.pastel-pink { background: #fff1f2; color: #be123c; }

.pending-box-yellow {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.pending-box-yellow .pending-box-head { color: #92400e; }
.pending-box-yellow .pending-box-head i { color: #d97706; }
.pending-box-yellow .pending-count { background: #d97706; }
.pending-more {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #fde68a;
}
.pending-more span { color: #92400e; font-size: 13px; font-weight: 600; }
.pending-box-yellow .pager,
.pending-box-orange .pager,
.pending-box .pager {
    background: #fff;
    border-color: #fde68a;
    margin-top: 12px;
}
.badge-type {
    background: #ffe4e6;
    color: #be123c;
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.badge-type-retard { background: #ffedd5; color: #c2410c; }
.badge-type-autre { background: #e0e7ff; color: #3730a3; }

.cycle-banner {
    background: linear-gradient(90deg, #1a472a 0%, #2d7a4a 100%);
    color: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.cycle-banner h2 { margin: 0; font-size: 1.5rem; font-weight: 800; color: #fff; }
.cycle-banner p { margin: 4px 0 0; font-size: 13px; opacity: 0.8; }
.btn-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #1a472a;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 800;
    text-decoration: none;
}
a.btn-white, a.btn-white:visited { color: #1a472a; }
.btn-white:hover { background: #f0fdf4; color: #14532d; }

.cycle-item {
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.cycle-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.cycle-item h3 { margin: 0; font-size: 1.05rem; font-weight: 800; color: #111827; }
.cycle-item-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cycle-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.cycle-metric .k {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #9ca3af;
    text-transform: uppercase;
}
.cycle-metric .v { font-weight: 800; color: #111827; font-size: 14px; }
.icon-acts { display: flex; gap: 6px; }
.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    font-size: 13px;
}
.icon-btn:hover { background: #f8fafc; }
.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 18px 0 10px;
}

.select-card {
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.select-card label { flex: 1; min-width: 220px; margin: 0; font-size: 13px; font-weight: 700; color: #374151; }
.select-card .form-control { margin: 6px 0 0; }
.amende-search-acts {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 2px;
}
.amende-search label { min-width: 160px; }

.partage-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 20px; }
.partage-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.valeur-part {
    font-size: 1.15rem;
    font-weight: 800;
    color: #15803d;
}
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}
.filter-bar input, .filter-bar select {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
}
.filter-bar input { flex: 1; min-width: 200px; }
.formula-card {
    background: #eff6ff;
    border-radius: 14px;
    padding: 16px 18px;
    margin-top: 16px;
    color: #1e3a8a;
    font-size: 13px;
}
.formula-card h4 { margin: 0 0 8px; font-size: 14px; }
.formula-bar {
    background: #dbeafe;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #1e40af;
    margin-top: 12px;
}
.txt-green { color: #15803d !important; font-weight: 800; }
.txt-red { color: #dc2626 !important; font-weight: 800; }
.txt-blue { color: #2563eb !important; font-weight: 700; }
.txt-purple { color: #7c3aed !important; font-weight: 800; }
.txt-orange { color: #ea580c !important; font-weight: 800; }
.table-foot td { font-weight: 800; background: #f8fafc; }
.row-alt:nth-child(even) { background: #f8fbff; }

@media (max-width: 900px) {
    .pastel-row, .partage-kpis { grid-template-columns: 1fr 1fr; }
    .remb-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .pastel-row, .partage-kpis { grid-template-columns: 1fr; }
    .credit-stat-row.is-4 { grid-template-columns: 1fr 1fr; }
    .remb-card { flex-direction: column; }
    .remb-amount { text-align: left; }
    .remb-foot .eq-link { margin-left: 0; }
}

.assist-page { max-width: 640px; margin: 0 auto 24px; }
.assist-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.assist-back {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    text-decoration: none;
    background: transparent;
}
.assist-back:hover { background: #f3f4f6; }
.assist-head h2 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    color: #111827;
}
.assist-form { max-width: none; }
.solde-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #eff6ff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
}
.solde-banner i { margin-right: 6px; }
.solde-banner strong {
    font-size: 1.35rem;
    font-weight: 800;
    color: #166534;
}

.rapport-page { margin-bottom: 8px; }
.rapport-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: #dcfce7;
    color: #166534;
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 600;
}
.rapport-banner p { margin: 0; }
.rapport-banner span { font-weight: 500; opacity: 0.9; }
.rapport-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 6px 12px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}
.rapport-back:hover { background: #f0fdf4; color: #14532d; }
.rapport-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.rapport-hero-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rapport-hero h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    color: #111827;
}
.rapport-admin-badge {
    display: inline-flex;
    align-items: center;
    background: #2563eb;
    color: #fff;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
}
.rapport-exports { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-pdf, .btn-print, .btn-excel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    color: #fff;
    text-decoration: none;
}
.btn-print { background: #1e3a5f; }
.btn-print:hover { background: #152a45; color: #fff; }
.btn-pdf { background: #dc2626; }
.btn-pdf:hover { background: #b91c1c; color: #fff; }
.btn-excel { background: #ea580c; }
.btn-excel:hover { background: #c2410c; color: #fff; }
.rapport-cycle-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.rapport-cycle-card h3 { margin: 0; font-size: 1.05rem; font-weight: 800; color: #111827; }
.rapport-cycle-card p { margin: 6px 0 0; color: #6b7280; font-size: 13px; }
.rapport-cycle-right { text-align: right; }
.rapport-cycle-form select {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 6px 10px;
    margin-bottom: 8px;
    background: #f9fafb;
    font-size: 13px;
}
.rapport-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 6px 0 10px;
    vertical-align: middle;
}
.rapport-dot.is-on { background: #2563eb; }
.rapport-dot.is-off { background: #9ca3af; }
.rapport-kpis {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.rapport-kpi {
    grid-column: span 3;
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.rapport-kpi:nth-child(n+5) { grid-column: span 4; }
.rapport-kpi .k {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 6px;
}
.rapport-kpi .v {
    font-size: 1.35rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}
.rapport-kpi .s { font-size: 12px; color: #9ca3af; margin-top: 4px; }
.rapport-table-wrap { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.rapport-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rapport-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f0;
    white-space: nowrap;
    background: #f8fafc;
}
.rapport-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
    vertical-align: middle;
}
.rapport-table tbody tr:hover { background: #f8fafc; }
.rapport-table .membre-name { font-weight: 700; color: #111827; }
.sexe-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    background: #f3f4f6;
    color: #6b7280;
}
.sexe-h { background: #dbeafe; color: #1d4ed8; }
.sexe-f { background: #fce7f3; color: #be185d; }

@media (max-width: 1100px) {
    .rapport-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rapport-kpi, .rapport-kpi:nth-child(n+5) { grid-column: auto; }
}
@media (max-width: 640px) {
    .rapport-kpis { grid-template-columns: 1fr; }
    .rapport-hero h2 { font-size: 1.35rem; }
    .rapport-cycle-right { text-align: left; }
}

@media print {
    .sidebar, .sidebar-overlay, .mobile-menu-btn, .main-footer, .no-print,
    .rapport-banner, .rapport-exports, .rapport-cycle-form { display: none !important; }
    .main-content { margin: 0 !important; padding: 0 !important; }
    .content-wrapper { padding: 0 !important; max-width: none !important; }
    .rapport-kpi, .rapport-cycle-card, .table-card { box-shadow: none; }
}

.faq-title { color: #1d4ed8 !important; }
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px 22px 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    border: 1px solid #eef2f0;
    position: relative;
}
.faq-num {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #93c5fd;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.faq-card h3 {
    margin: 0 0 8px 36px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e3a8a;
}
.faq-card p {
    margin: 0 0 14px 36px;
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.55;
}
.faq-foot {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-left: 36px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}
.faq-edit, .faq-del {
    background: none;
    border: none;
    padding: 0;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.faq-edit { color: #2563eb; }
.faq-del { color: #dc2626; }
.faq-foot form { margin: 0; }
.faq-date { margin-left: auto; color: #9ca3af; font-size: 12px; }
.faq-date i { margin-right: 4px; }

.toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.app-toast {
    pointer-events: auto;
    min-width: 260px;
    max-width: 380px;
    color: #fff;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.22);
    transform: translateX(24px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.app-toast.is-on {
    transform: translateX(0);
    opacity: 1;
}
.app-toast-success { background: #15803d; }
.app-toast-error { background: #dc2626; }
.app-toast-warning { background: #d97706; }
.app-toast-info { background: #1d4ed8; }

.parts-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 4px 0 10px;
}
.part-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-weight: 800;
    font-size: 1.05rem;
    cursor: pointer;
    font-family: inherit;
}
.part-btn:hover { border-color: #1a472a; color: #1a472a; }
.part-btn.is-on {
    background: #1a472a;
    border-color: #1a472a;
    color: #fff;
}
.parts-total {
    background: #f0fdf4;
    color: #166534;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    margin-bottom: 14px;
}
.parts-total strong { font-size: 1.05rem; }

.pending-box-orange {
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-left: 4px solid #ea580c;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.pending-box-orange .pending-box-head { color: #c2410c; }
.pending-box-orange .pending-box-head i { color: #ea580c; }
.pending-box-orange .pending-count { background: #ea580c; }
.pending-desc {
    margin: -4px 0 12px 0;
    padding: 0 4px 8px;
    color: #9a3412;
    font-size: 13px;
    border-bottom: 1px solid #fed7aa;
}

.cycle-create-title {
    font-family: inherit;
    letter-spacing: -0.03em;
}
.mod-hero h2, .cycle-banner h2, .faq-title {
    font-family: inherit;
    letter-spacing: -0.03em;
}

@media (max-width: 640px) {
    .toast-stack { left: 12px; right: 12px; }
    .app-toast { max-width: none; }
}

.reglement-card {
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}
.reglement-body {
    font-size: 15px;
    line-height: 1.75;
    color: #374151;
}
.reglement-body h1, .reglement-body h2, .reglement-body h3 {
    color: #1a472a;
    margin: 1.2em 0 0.5em;
}
.reglement-body p { margin: 0 0 0.9em; }
.reglement-body ul, .reglement-body ol { margin: 0 0 1em 1.2em; }
.reglement-meta {
    margin: 22px 0 0;
    padding-top: 14px;
    border-top: 1px dashed #e5e7eb;
    color: #9ca3af;
    font-size: 0.85rem;
}
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 10px;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px 10px 0 0;
}
.editor-toolbar button {
    width: 36px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    font-weight: 800;
    font-size: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.editor-toolbar button:hover { background: #ecfdf5; color: #047857; }
.reglement-editor {
    min-height: 360px;
    max-height: 70vh;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-top: 0;
    border-radius: 0 0 12px 12px;
    padding: 18px 20px;
    background: #fff;
    outline: none;
}
.reglement-editor:focus { border-color: #86efac; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12); }

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -4px 0 18px;
    padding: 10px 16px;
    background: linear-gradient(90deg, #f0fdf4, #fff);
    border: 1px solid #dcfce7;
    border-radius: 12px;
    color: #166534;
    font-size: 13px;
}
.app-topbar strong { font-weight: 800; color: #14532d; }
.app-topbar span { color: #4b5563; }

.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #eef2f0;
    border-radius: 14px;
}
.pager-info { color: #64748b; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.pager-label { text-transform: uppercase; letter-spacing: .04em; font-size: 11px; font-weight: 700; color: #94a3b8; }
.pager-info strong { color: #1a472a; }
.pager-nav { display: flex; align-items: center; gap: 6px; }
.pager-btn, .pager-num {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}
.pager-btn:hover, .pager-num:hover { border-color: #1a472a; color: #1a472a; }
.pager-num.is-current {
    background: #1a472a;
    border-color: #1a472a;
    color: #fff;
}
.pager-btn.is-off { opacity: .35; pointer-events: none; }
.pager-dots { color: #94a3b8; padding: 0 4px; }

.settings-page { max-width: 1080px; }
.settings-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #0f3d2e 0%, #1a472a 52%, #0f766e 130%);
    color: #fff;
    border-radius: 22px;
    padding: 26px 26px 22px;
    margin-bottom: 18px;
    box-shadow: 0 16px 36px rgba(15, 61, 46, 0.22);
}
.settings-hero-main { display: flex; align-items: center; gap: 16px; }
.settings-hero-logo {
    width: 64px; height: 64px; border-radius: 18px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; letter-spacing: .04em; font-size: 18px;
}
.settings-kicker {
    margin: 0 0 4px; text-transform: uppercase; letter-spacing: .12em;
    font-size: 11px; font-weight: 700; color: #bbf7d0;
}
.settings-hero h2 { margin: 0; font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; }
.settings-hero p { margin: 6px 0 0; color: rgba(255,255,255,.78); font-size: 14px; max-width: 42ch; }
.settings-hero-meta { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #d1fae5; }
.settings-hero-meta i { margin-right: 6px; opacity: .8; }

.settings-status {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.settings-status-card {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border: 1px solid #eef2f0; border-radius: 16px;
    padding: 14px 16px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.settings-status-card i {
    width: 38px; height: 38px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f1f5f9; color: #334155;
}
.settings-status-card span { display: block; font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; }
.settings-status-card strong { font-size: 14px; color: #0f172a; }
.settings-status-card.is-ok i { background: #ecfdf5; color: #047857; }
.settings-status-card.is-warn i { background: #fff7ed; color: #c2410c; }
.settings-status-card.is-bad i { background: #fef2f2; color: #b91c1c; }
.settings-status-card.is-off i { background: #f1f5f9; color: #64748b; }

.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 8px;
    border-radius: 12px;
    background: transparent;
    border: 0;
    color: #4b5563;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}
.settings-tab-ico {
    width: 30px; height: 30px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #eef2ff;
    color: var(--tab-color);
}
.settings-tab:hover { background: #f8fafc; color: #1a472a; }
.settings-tab.is-on { background: #1a472a; color: #fff; }
.settings-tab.is-on .settings-tab-ico { background: rgba(255,255,255,.16); color: #fff; }

.settings-split {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, .8fr);
    gap: 16px;
    align-items: start;
}
.settings-card {
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.05);
    margin-bottom: 18px;
}
.settings-card.is-warn { border-color: #fdba74; background: linear-gradient(#fff, #fff7ed); }
.settings-card.is-bad { border-color: #fca5a5; background: linear-gradient(#fff, #fef2f2); }
.settings-card-soft { background: linear-gradient(180deg, #f8fafc, #fff); }
.settings-card-head {
    display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px;
}
.settings-card-ico {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.settings-card h3 { margin: 0 0 4px; color: #0f172a; font-size: 1.08rem; }
.settings-help { color: #6b7280; font-size: 13px; margin: 0; line-height: 1.45; }
.settings-chip {
    margin-left: auto; align-self: center;
    padding: 4px 10px; border-radius: 999px;
    background: #f1f5f9; color: #475569;
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
}
.settings-chip.is-ok { background: #dcfce7; color: #166534; }
.settings-chip.is-warn { background: #ffedd5; color: #9a3412; }
.settings-chip.is-bad { background: #fee2e2; color: #991b1b; }
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.settings-span { grid-column: 1 / -1; }
.settings-card label { display: block; font-weight: 600; font-size: 13px; color: #374151; margin-bottom: 12px; }
.settings-foot { margin-top: 10px; }
.settings-foot-sticky { margin: 0 0 18px; }
.settings-switch {
    display: flex !important;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px !important;
}
.settings-switch span { display: flex; flex-direction: column; gap: 2px; }
.settings-switch small { font-weight: 500; color: #6b7280; }
.settings-toggle {
    appearance: none; width: 46px; height: 26px; flex-shrink: 0;
    border-radius: 999px; background: #cbd5e1; border: 0; cursor: pointer; position: relative;
}
.settings-toggle::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 20px; height: 20px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 4px rgba(15,23,42,.2); transition: transform .18s ease;
}
.settings-toggle:checked { background: #16a34a; }
.settings-toggle:checked::after { transform: translateX(20px); }
.settings-sep { border: 0; border-top: 1px solid #e5e7eb; margin: 24px 0; }

.settings-preview {
    background: #0b1f16;
    border-radius: 18px;
    padding: 16px;
    color: #e2e8f0;
    box-shadow: 0 16px 36px rgba(11, 31, 22, 0.28);
    position: sticky; top: 16px;
}
.settings-preview-label {
    margin: 0 0 12px; font-size: 11px; font-weight: 800;
    letter-spacing: .12em; text-transform: uppercase; color: #86efac;
}
.settings-sidebar-mock { background: #123024; border-radius: 14px; padding: 14px; }
.settings-sidebar-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.settings-sidebar-logo {
    width: 42px; height: 42px; border-radius: 12px; background: #166534; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px;
}
.settings-sidebar-brand strong { display: block; color: #fff; font-size: 14px; }
.settings-sidebar-brand em, .settings-sidebar-brand small { display: block; font-style: normal; color: #86efac; font-size: 11px; }
.settings-sidebar-links { display: grid; gap: 6px; }
.settings-sidebar-links span {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px;
    color: #cbd5e1; font-size: 12px; font-weight: 600;
}
.settings-sidebar-links span.is-on { background: #1a472a; color: #fff; }
.settings-sidebar-loc { margin: 12px 0 0; color: #86efac; font-size: 12px; }
.settings-login-mock {
    background: linear-gradient(180deg, #14532d, #052e16);
    border-radius: 16px; padding: 22px 16px; text-align: center;
}
.settings-login-logo {
    width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 10px;
    background: #fff; color: #14532d; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.settings-login-mock strong { display: block; color: #fff; font-size: 18px; }
.settings-login-mock em, .settings-login-mock small { display: block; color: #bbf7d0; font-size: 12px; font-style: normal; margin-top: 4px; }
.settings-login-fake { margin: 16px 0 8px; display: grid; gap: 8px; }
.settings-login-fake span { display: block; height: 34px; border-radius: 10px; background: rgba(255,255,255,.12); }
.settings-login-hint { min-height: 16px; color: #fde68a; font-size: 11px; margin: 8px 0 0; }

.settings-modes { display: grid; gap: 16px; }
.settings-preview-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: #1d4ed8; font-weight: 700; font-size: 13px; text-decoration: none; margin-top: 4px;
}
.settings-preview-link:hover { text-decoration: underline; }

.backup-list { display: grid; gap: 10px; margin-top: 18px; }
.backup-item {
    display: flex; align-items: center; gap: 12px;
    background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px 14px;
}
.backup-ico {
    width: 42px; height: 42px; border-radius: 12px; background: #ecfdf5; color: #047857;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.backup-item strong { display: block; font-size: 13px; color: #0f172a; word-break: break-all; }
.backup-item span { color: #64748b; font-size: 12px; }
.backup-item .btn-mod { margin-left: auto; padding: 8px 12px; font-size: 12px; }

.notif-list { display: grid; gap: 10px; }
.notif-card {
    display: flex;
    gap: 14px;
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}
.notif-card.is-unread { border-color: #bbf7d0; background: #f0fdf4; }
.notif-ico {
    width: 40px; height: 40px; border-radius: 12px;
    background: #dbeafe; color: #2563eb;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.notif-card h3 { margin: 0 0 4px; font-size: 15px; }
.notif-card p { margin: 0 0 6px; color: #4b5563; font-size: 14px; }
.notif-card span { color: #94a3b8; font-size: 12px; }

.status-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: Inter, sans-serif;
    background: radial-gradient(circle at top, #ecfdf5, #f8fafc 45%);
}
.status-construction { background: radial-gradient(circle at top, #fff7ed, #f8fafc 45%); }
.status-card {
    width: min(520px, 100%);
    background: #fff;
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}
.status-logo {
    width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 10px;
    background: #1a472a; color: #fff; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.status-brand { color: #64748b; margin: 0 0 18px; font-weight: 600; }
.status-icon {
    width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px;
    background: #dbeafe; color: #2563eb;
    display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.status-icon.is-warn { background: #ffedd5; color: #c2410c; }
.status-card h1 { margin: 0 0 10px; font-size: 1.7rem; color: #0f172a; }
.status-text { color: #64748b; line-height: 1.6; margin: 0 0 22px; }

#pjax-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 80;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #22c55e, #1a472a);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    transition: width 0.25s ease;
    pointer-events: none;
}

@media (max-width: 900px) {
    .settings-status { grid-template-columns: 1fr 1fr; }
    .settings-split { grid-template-columns: 1fr; }
    .settings-preview { position: static; }
}
@media (max-width: 720px) {
    .settings-grid { grid-template-columns: 1fr; }
    .settings-status { grid-template-columns: 1fr; }
    .backup-item { flex-wrap: wrap; }
    .backup-item .btn-mod { width: 100%; justify-content: center; margin-left: 0; }
    .pager { justify-content: center; }
    .app-topbar { flex-direction: column; align-items: flex-start; }
}

.share-detail { max-width: 880px; margin: 8px auto 28px; }
.share-hero, .profil-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #0f3d2e 0%, #1a472a 55%, #2563eb 140%);
    color: #fff;
    border-radius: 20px;
    padding: 22px 22px 20px;
    margin-bottom: 16px;
    box-shadow: 0 12px 30px rgba(15, 61, 46, 0.18);
}
.share-avatar, .profil-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid rgba(255,255,255,0.35);
}
.share-avatar, .profil-photo.is-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    background: #16a34a;
    color: #fff;
}
.share-hero h3, .profil-hero-text h3 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
}
.share-hero p, .profil-hero-text p {
    margin: 4px 0 0;
    opacity: 0.85;
    font-size: 13px;
}
.share-net {
    margin-left: auto;
    background: rgba(255,255,255,0.14);
    border-radius: 14px;
    padding: 10px 16px;
    min-width: 160px;
}
.share-net span, .share-net strong { display: block; }
.share-net span { font-size: 12px; opacity: 0.85; }
.share-net strong { font-size: 1.25rem; font-weight: 800; }
.share-net.is-bad { background: rgba(220, 38, 38, 0.28); }
.share-grid, .profil-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.share-kpi, .profil-kpi {
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}
.share-kpi span, .profil-kpi span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 6px;
}
.share-kpi strong, .profil-kpi strong {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #111827;
    word-break: break-word;
}
.share-kpi em, .profil-kpi em {
    display: block;
    font-style: normal;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
    font-weight: 600;
}
.share-kpi.is-green strong, .profil-kpi.is-green strong { color: #15803d; }
.share-kpi.is-blue strong, .profil-kpi.is-blue strong { color: #2563eb; }
.share-kpi.is-purple strong, .profil-kpi.is-purple strong { color: #7c3aed; }
.share-kpi.is-navy strong, .profil-kpi.is-navy strong { color: #1e3a8a; }
.share-kpi.is-orange strong, .profil-kpi.is-orange strong { color: #c2410c; }
.share-kpi.is-yellow strong, .profil-kpi.is-yellow strong { color: #b45309; }
.share-kpi.is-red strong, .profil-kpi.is-red strong { color: #dc2626; }

.echeancier-retard {
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 16px;
    padding: 16px 18px 12px;
    margin: 0 0 16px;
}
.echeancier-retard h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 800;
    color: #9a3412;
}
.echeancier-retard > p {
    margin: 0 0 12px;
    font-size: 13px;
    color: #57534e;
    line-height: 1.45;
}
.echeancier-credit {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: baseline;
    margin: 8px 0 8px;
    font-size: 13px;
}
.echeancier-credit span { color: #64748b; }
.echeancier-table th, .echeancier-table td { white-space: nowrap; }
.echeancier-total {
    margin: 8px 0 4px;
    font-size: 13px;
    color: #334155;
}

.profil-page { max-width: 920px; margin: 8px auto 28px; }
.profil-hero-text { min-width: 0; flex: 1; }
.profil-hero-actions { margin-left: auto; }
.profil-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.profil-pill {
    background: rgba(255,255,255,0.16);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
}
.profil-pill.is-soft { background: rgba(255,255,255,0.1); font-weight: 600; }
.profil-contact {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.profil-contact > div {
    background: #fff;
    border: 1px solid #eef2f0;
    border-radius: 14px;
    padding: 14px 16px;
    min-width: 0;
}
.profil-contact i { color: #1a472a; margin-bottom: 8px; display: block; }
.profil-contact span { display: block; font-size: 12px; color: #9ca3af; font-weight: 700; }
.profil-contact strong { display: block; margin-top: 4px; font-size: 14px; color: #111827; word-break: break-word; }
.profil-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.profil-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 14px;
    color: #1a472a;
    font-weight: 700;
    text-decoration: none;
}
.profil-links a:hover { background: #f0fdf4; border-color: #bbf7d0; }
.fiche-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }

@media (max-width: 900px) {
    .share-grid, .profil-kpis, .profil-contact { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .share-grid, .profil-kpis, .profil-contact { grid-template-columns: 1fr; }
    .share-net, .profil-hero-actions { margin-left: 0; width: 100%; }
}

.msg-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 168px);
}
.msg-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 640px;
    background: #fff;
    border: 1px solid #dce8df;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(16, 42, 28, 0.1);
}
.msg-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    background:
        radial-gradient(1200px 180px at 10% -40%, rgba(251, 191, 36, 0.18), transparent 55%),
        linear-gradient(135deg, #10281a 0%, #1a472a 58%, #0d2418 100%);
    color: #fff;
}
.msg-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.msg-brand-ico {
    width: 46px; height: 46px; border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.12);
    color: #fbbf24; font-size: 18px; flex-shrink: 0;
}
.msg-brand h2 { margin: 0; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
.msg-brand p { margin: 2px 0 0; color: rgba(255,255,255,0.68); font-size: 12px; }
.msg-brand p b { color: #fde68a; font-weight: 800; }
.msg-btn-compose,
.msg-btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    height: 42px; padding: 0 16px; border-radius: 12px;
    font-weight: 800; font-size: 13px; text-decoration: none; border: 0; cursor: pointer;
}
.msg-btn-compose { background: #fbbf24; color: #1a472a; }
a.msg-btn-compose, a.msg-btn-compose:visited { color: #1a472a; }
.msg-btn-compose:hover { background: #f59e0b; color: #10281a; }
.msg-btn-ghost {
    background: rgba(255,255,255,0.1); color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
}
.msg-btn-ghost:hover { background: rgba(255,255,255,0.18); color: #fff; }
.msg-btn-ghost.is-light {
    background: #f3f4f6; color: #374151; border-color: #e5e7eb;
}
.msg-btn-ghost.is-light:hover { background: #e5e7eb; color: #111827; }

.msg-app {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    min-height: 0;
    background: #f4f7f5;
}
.msg-list {
    border-right: 1px solid #e4eee7;
    display: flex;
    flex-direction: column;
    background: #fbfdfb;
    min-height: 0;
}
.msg-list-head { padding: 14px 14px 8px; }
.msg-search {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid #e2ebe4; border-radius: 14px;
    padding: 0 12px; height: 42px;
}
.msg-search i { color: #94a3b8; }
.msg-search input {
    border: 0; outline: none; width: 100%; background: transparent;
    font: inherit; font-size: 13px; color: #0f172a;
}
.msg-convos { overflow: auto; flex: 1; padding: 4px 10px 14px; }
.msg-convo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 4px;
    position: relative;
}
.msg-convo:hover { background: #eef7f1; }
.msg-convo.is-on {
    background: #fff;
    box-shadow: 0 8px 22px rgba(26, 71, 42, 0.08);
}
.msg-convo.is-on::before {
    content: '';
    position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
    background: #16a34a; border-radius: 0 4px 4px 0;
}
.msg-convo.is-unread strong { color: #14532d; font-weight: 800; }
.msg-convo.is-unread .msg-convo-preview { color: #334155; font-weight: 600; }
.msg-avatar {
    width: 44px; height: 44px; border-radius: 50%; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; flex-shrink: 0; font-size: 15px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}
.msg-avatar.is-photo { object-fit: cover; background: #d1fae5; }
.msg-convo-body { flex: 1; min-width: 0; }
.msg-convo-top { display: flex; justify-content: space-between; gap: 8px; }
.msg-convo-top strong { font-size: 13.5px; color: #0f172a; }
.msg-convo-top time { color: #94a3b8; font-size: 11px; white-space: nowrap; }
.msg-convo-preview {
    display: block; color: #64748b; font-size: 12.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
}
.msg-convo-preview em { font-style: normal; color: #16a34a; font-weight: 700; }
.msg-unread {
    min-width: 20px; height: 20px; border-radius: 999px; background: #16a34a; color: #fff;
    font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.msg-empty, .msg-welcome {
    padding: 40px 22px; text-align: center; color: #64748b;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.msg-empty { flex: 1; }
.msg-welcome { height: 100%; min-height: 420px; }
.msg-empty-ico, .msg-welcome-ico {
    width: 72px; height: 72px; border-radius: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, #ecfdf5, #d1fae5);
    color: #15803d; font-size: 28px; margin-bottom: 6px;
    box-shadow: 0 12px 24px rgba(22, 163, 74, 0.12);
}
.msg-welcome h3 { margin: 0; color: #0f172a; font-size: 1.25rem; }
.msg-welcome p, .msg-empty p { margin: 0; max-width: 320px; line-height: 1.5; }
.msg-empty-link { color: #15803d; font-weight: 800; text-decoration: none; margin-top: 6px; }
.msg-thread { display: flex; flex-direction: column; min-height: 0; background:
    linear-gradient(180deg, #f7faf8 0%, #eef4f0 100%); }
.msg-thread-head {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px; background: #fff; border-bottom: 1px solid #e4eee7;
}
.msg-thread-who { min-width: 0; }
.msg-thread-who strong { display: block; font-size: 15px; color: #0f172a; }
.msg-thread-who span { color: #94a3b8; font-size: 12px; }
.msg-fiche {
    margin-left: auto;
    color: #1a472a; text-decoration: none; font-weight: 700; font-size: 13px;
    padding: 8px 12px; border-radius: 10px; background: #ecfdf5;
}
.msg-fiche:hover { background: #d1fae5; }
.msg-back {
    display: none; width: 36px; height: 36px; border-radius: 12px;
    align-items: center; justify-content: center; color: #1a472a; text-decoration: none; background: #f1f5f4;
}
.msg-bubbles {
    flex: 1; overflow: auto; padding: 22px 20px;
    display: flex; flex-direction: column; gap: 10px;
    background-image:
        radial-gradient(circle at 12px 12px, rgba(26, 71, 42, 0.035) 1.5px, transparent 2px);
    background-size: 28px 28px;
}
.msg-day {
    align-self: center; background: #fff; color: #475569;
    font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
    margin: 8px 0; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.msg-thread-hint, .msg-inactive {
    text-align: center; color: #64748b; font-size: 13px; margin: auto; padding: 16px;
}
.msg-thread-hint i { display: block; font-size: 22px; color: #86efac; margin-bottom: 8px; }
.msg-inactive { background: #fff7ed; color: #9a3412; border-top: 1px solid #fed7aa; margin: 0; }
.msg-bubble {
    max-width: min(74%, 460px); padding: 11px 14px 8px; border-radius: 18px;
    font-size: 14.5px; line-height: 1.5; position: relative;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}
.msg-bubble p { margin: 0; }
.msg-objet { font-weight: 800; font-size: 12px; margin-bottom: 4px !important; opacity: .9; }
.msg-bubble footer {
    display: flex; gap: 8px; justify-content: flex-end; align-items: center;
    margin-top: 6px; font-size: 11px; opacity: .75;
}
.msg-bubble.is-mine {
    align-self: flex-end; background: linear-gradient(180deg, #1f5130, #1a472a); color: #fff;
    border-bottom-right-radius: 6px;
}
.msg-bubble.is-theirs {
    align-self: flex-start; background: #fff; color: #0f172a;
    border: 1px solid #e8eee9; border-bottom-left-radius: 6px;
}
.msg-tick { display: inline-flex; align-items: center; gap: 4px; }
.msg-tick.is-read { color: #86efac; }
.msg-compose {
    padding: 12px 16px 16px; background: #fff; border-top: 1px solid #e4eee7;
}
.msg-compose-box {
    display: flex; align-items: flex-end; gap: 10px;
    background: #f4f7f5; border: 1px solid #dce8df; border-radius: 18px;
    padding: 8px 8px 8px 14px;
}
.msg-compose textarea {
    flex: 1; margin: 0; resize: none; min-height: 40px; max-height: 140px;
    border: 0; background: transparent; outline: none; font: inherit; color: #0f172a;
    line-height: 1.4; padding: 8px 0;
}
.msg-send {
    width: 42px; height: 42px; border: 0; border-radius: 14px; cursor: pointer;
    background: #1a472a; color: #fff; font-size: 15px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.msg-send:hover { background: #143820; }
.msg-compose .form-error,
.msg-compose .field-error { margin: 6px 2px 0; }

.mail-compose {
    display: flex; flex-direction: column; height: 100%; min-height: 0; flex: 1;
    margin: 18px; background: #fff; border-radius: 20px; overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08); border: 1px solid #e4eee7;
}
.mail-compose-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; background: #1a472a; color: #fff;
}
.mail-compose-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.mail-compose-close {
    width: 32px; height: 32px; border-radius: 10px; color: #fff; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.12);
}
.mail-compose-close:hover { background: rgba(255,255,255,0.22); color: #fff; }
.mail-field {
    display: flex; align-items: center; gap: 12px;
    padding: 0 18px; min-height: 52px; border-bottom: 1px solid #eef2f0; margin: 0;
}
.mail-field span {
    color: #64748b; font-size: 13px; font-weight: 700; width: 48px; flex-shrink: 0;
}
.mail-field select, .mail-field input {
    flex: 1; border: 0; outline: none; background: transparent;
    font: inherit; font-size: 14px; color: #0f172a; min-height: 50px; width: 100%;
}
.mail-to-chip {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin: 10px 18px 0; padding: 8px 12px; border-radius: 999px;
    background: #ecfdf5; color: #14532d; width: fit-content;
}
.mail-to-chip i { color: #16a34a; }
.mail-to-chip strong { font-size: 13px; }
.mail-to-chip em { font-style: normal; color: #64748b; font-size: 12px; }
.mail-body-wrap { flex: 1; display: flex; flex-direction: column; min-height: 220px; }
.mail-body-wrap textarea {
    flex: 1; border: 0; outline: none; resize: none; padding: 18px;
    font: inherit; font-size: 15px; line-height: 1.6; color: #0f172a; min-height: 220px;
}
.mail-compose-foot {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 12px 16px 16px; border-top: 1px solid #eef2f0; background: #fbfdfb;
}
.mail-count { margin-left: auto; color: #94a3b8; font-size: 12px; font-weight: 700; }
.mail-compose .field-error { padding: 0 18px; }

@media (max-width: 860px) {
    .msg-page { min-height: calc(100vh - 120px); }
    .msg-shell { min-height: 70vh; border-radius: 20px; }
    .msg-app { grid-template-columns: 1fr; }
    .msg-shell.has-thread .msg-list { display: none; }
    .msg-shell:not(.has-thread) .msg-thread { display: none; }
    .msg-back { display: inline-flex; }
    .mail-compose { margin: 0; border-radius: 0; }
}

.ac-box { position: relative; margin-top: 6px; }
.ac-search-wrap { position: relative; }
.ac-search-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: #94a3b8; pointer-events: none; z-index: 1;
}
.ac-search-wrap .form-control { padding-left: 40px; }
.ac-list {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px);
    z-index: 40; margin: 0; padding: 6px; list-style: none;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
    max-height: 280px; overflow-y: auto;
}
.ac-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 10px; cursor: pointer;
}
.ac-item:hover, .ac-item.is-on { background: #eff6ff; }
.ac-item-body { min-width: 0; display: flex; flex-direction: column; }
.ac-item-body strong { font-size: 14px; color: #0f172a; }
.ac-empty { padding: 12px 10px; color: #64748b; font-size: 13px; }
.ac-picked {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border: 1px solid #bbf7d0; border-radius: 12px;
    background: #f0fdf4;
}
.ac-picked-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-picked-text strong { font-size: 14px; color: #14532d; }
.ac-clear {
    border: none; background: #fff; color: #475569; cursor: pointer;
    border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 6px;
}
.ac-clear:hover { background: #fee2e2; color: #b91c1c; }