﻿/* ===== IMPORTS & VARIABLES ===== */
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #eef2ff;
    --secondary: #6c757d;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --light: #f8fafc;
    --dark: #1e293b;
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --topbar-height: 70px;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-50);
    color: var(--dark);
    line-height: 1.6;
}

/* ===== LAYOUT PRINCIPAL ===== */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    background: var(--gray-50);
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--gray-50);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

    .sidebar.collapsed {
        width: var(--sidebar-collapsed);
    }

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

    .logo i {
        font-size: 1.75rem;
        color: #60a5fa;
    }

.app-version {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    margin-left: 2.5rem;
}

/* Navigation */
.nav-menu {
    flex: 1;
    padding: 1rem 0.5rem;
}

.nav-group {
    margin-bottom: 1.5rem;
}

.nav-group-title {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    border-radius: 8px;
    margin: 0.25rem 0.5rem;
    cursor: pointer;
}

    .nav-item:hover {
        background: rgba(255,255,255,0.08);
        color: white;
        border-left-color: var(--primary);
    }

    .nav-item.active {
        background: rgba(67, 97, 238, 0.15);
        color: white;
        border-left-color: var(--primary);
    }

.nav-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-arrow {
    transition: transform 0.2s ease;
    font-size: 0.875rem;
}

/* Sous-menus avec scroll */
.scrollable-submenu {
    background: rgba(0,0,0,0.2);
    margin: 0.5rem 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
    animation: slideDown 0.2s ease;
    max-height: 300px;
    display: flex;
    flex-direction: column;
}

.sub-menu-content {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 280px;
    padding: 0.5rem 0;
}

.sub-nav-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    gap: 0.5rem;
    border-left: 3px solid transparent;
}

    .sub-nav-item:hover {
        background: rgba(255,255,255,0.05);
        color: white;
        border-left-color: var(--primary);
    }

    .sub-nav-item.active {
        background: rgba(67, 97, 238, 0.15);
        color: white;
        border-left-color: var(--primary);
    }

    .sub-nav-item i {
        width: 16px;
        font-size: 0.9rem;
        text-align: center;
    }

.sub-nav-section {
    margin-bottom: 0.5rem;
}

.sub-nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    padding: 0.5rem 1rem 0.25rem;
    letter-spacing: 0.5px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05); /* Cette ligne existe déjà */
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    background: transparent; /* Ajoutez cette ligne */
}

    .user-info:hover {
        background: rgba(255,255,255,0.05);
    }

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ===== TOP BAR ===== */
.top-bar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: var(--shadow-sm);
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content .top-bar {
    margin-left: var(--sidebar-collapsed);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

    .sidebar-toggle:hover {
        background: var(--primary-light);
        color: var(--primary);
    }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item {
    font-weight: 600;
    color: var(--dark);
    font-size: 1.125rem;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-notification, .btn-user {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
}

    .btn-notification:hover, .btn-user:hover {
        background: var(--gray-100);
        color: var(--dark);
    }

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ===== COMPOSANTS COMMUNS ===== */

/* Cartes Modernes */
.modern-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

    .modern-card:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
        border-color: var(--primary-light);
    }

.card-header-modern {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

    .card-header-modern h3 {
        margin: 0;
        font-weight: 600;
        font-size: 1.25rem;
        color: white;
    }

.modal-title {
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body-modern {
    padding: 1.5rem;
}

.card-body-custom {
    padding: 1.5rem;
}

/* Cartes Compactes */
.card-body-compact {
    padding: 1rem !important;
}

.card-content-controlled {
    max-width: 100%;
    overflow: hidden;
}

/* ===== BOUTONS ===== */
.btn-modern {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary-modern {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(67, 97, 238, 0.2);
}

    .btn-primary-modern:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
        background: linear-gradient(135deg, var(--primary-dark) 0%, #2d4bd4 100%);
    }

.btn-secondary-modern {
    background: var(--secondary);
    color: white;
}

    .btn-secondary-modern:hover:not(:disabled) {
        background: #5a6268;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

.btn-info-modern {
    background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%);
    color: white;
}

    .btn-info-modern:hover:not(:disabled) {
        background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
        transform: translateY(-1px);
    }

.btn-success-modern {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s;
}

    .btn-success-modern:hover:not(:disabled) {
        background-color: #0da271;
        border-color: #0da271;
        transform: translateY(-2px);
    }

.btn-action {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

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

.btn-view {
    background-color: #17a2b8 !important;
    border-color: #17a2b8 !important;
    color: white !important;
}

.btn-edit {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #212529 !important;
}

.btn-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== TABLEAUX ===== */
.table-modern {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    border-collapse: separate;
    border-spacing: 0;
}

    .table-modern thead {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    }

    .table-modern th {
        padding: 1rem 1.25rem;
        font-weight: 600;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: white;
        border: none;
        background: transparent;
    }

    .table-modern td {
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--gray-200);
        vertical-align: middle;
        font-size: 0.875rem;
        background: white;
    }

    .table-modern tbody tr {
        transition: background-color 0.2s ease;
    }

        .table-modern tbody tr:hover {
            background-color: var(--primary-light);
        }

/* Tables Compactes */
.compact-table {
    width: 100%;
    font-size: 0.8rem !important;
}

    .compact-table th {
        padding: 0.5rem 0.4rem !important;
        font-size: 0.75rem !important;
        white-space: nowrap;
        background-color: #f8f9fa;
    }

    .compact-table td {
        padding: 0.5rem 0.4rem !important;
        font-size: 0.8rem !important;
        vertical-align: middle;
    }

/* Conteneurs de table */
.table-container {
    overflow-x: auto;
    width: 100%;
}

.table-container-controlled {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: white;
}

.table-responsive-custom {
    min-width: 1000px;
    width: 100%;
}

.table-scrollable {
    min-width: 600px !important;
}

/* ===== BADGES ===== */
.badge-modern {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

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

.badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

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

.badge-primary {
    background-color: white !important;
    color: #262e3b !important;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    border: none;
    box-shadow: 0 2px 4px rgba(38, 46, 59, 0.1);
    display: inline-block;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

/* Effet hover optionnel */
    .badge-primary:hover {
        background-color: #ccd7e3 !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(38, 46, 59, 0.15);
        transition: all 0.2s ease;
    }

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.situation-badge {
    padding: 4px 10px;
    background-color: #e7f3ff;
    color: #0a58ca;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid #b6d4fe;
}

.badge-cloture {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

/* ===== LAYOUTS ===== */

/* Disposition double colonne */
.dual-column-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.col-card {
    flex: 1 1 calc(50% - 0.75rem);
    min-width: 300px;
}

.dual-column-layout-20cm {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.col-card-20cm {
    flex: 0 0 20cm;
    min-width: 20cm;
    max-width: 20cm;
}

/* Grilles */
.grid-2-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.grid-item {
    display: flex;
    flex-direction: column;
}

/* Sections principales */
.main-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.main-sections-vertical {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.section-wrapper {
    min-width: 0;
}

.section-card-full {
    width: 100%;
    min-width: auto;
}

/* Grilles compactes */
.compact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
}

.compact-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.2rem 0;
    min-width: 0;
}

    .compact-item label {
        font-size: 0.7rem !important;
        color: var(--gray-600);
        font-weight: 500;
        margin: 0;
        line-height: 1.2;
    }

    .compact-item span {
        font-size: 0.75rem !important;
        color: var(--dark);
        line-height: 1.2;
    }

/* ===== FORMULAIRES & CONTROLES ===== */
.form-control[readonly] {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.8;
}

.form-control:not([readonly]) {
    background-color: white;
    border-color: #4361ee;
    box-shadow: 0 0 0 0.1rem rgba(67, 97, 238, 0.1);
}

.form-control.text-end {
    text-align: right;
}

.popup-form-control {
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
}

    .popup-form-control:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.15);
        outline: none;
    }

.popup-amount-input {
    text-align: right;
    font-family: 'Inter', monospace;
}

.popup-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
}

/* ===== ELEMENTS FINANCIERS ===== */
.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
    min-height: 50px;
}

.summary-label {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.75rem !important;
    flex: 1;
    margin-right: 1rem;
}

.summary-value {
    flex-shrink: 0;
    font-size: 0.8rem !important;
    color: var(--dark);
    font-weight: 400;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0 0;
    border-top: 2px solid var(--gray-300);
    margin-top: 0.5rem;
    min-height: 55px;
}

.summary-label-total {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem !important;
    flex: 1;
}

.summary-value-total {
    flex-shrink: 0;
    font-size: 0.8rem !important;
    color: var(--dark);
    font-weight: 600;
}

/* Version compacte */
.summary-item-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.75rem;
    min-height: auto;
}

.summary-total-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0 0;
    border-top: 2px solid var(--gray-300);
    margin-top: 0.2rem;
    font-size: 0.8rem;
}

/* ===== OBSERVATIONS ===== */
.observation-cell-fixed {
    width: 250px;
    max-width: 250px;
    min-width: 250px;
    height: 80px;
    padding: 0.25rem !important;
    position: relative;
}

.observation-content-scroll {
    width: 100%;
    height: 70px;
    max-height: 70px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    font-size: 0.65rem !important;
    line-height: 1.3 !important;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #f8f9fa !important;
    display: block;
}

    .observation-content-scroll::-webkit-scrollbar:horizontal {
        display: none;
    }

/* ===== ALERTES & MESSAGES ===== */
.alert-modern {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid;
    font-size: 0.875rem;
}

    .alert-modern.alert-success {
        background-color: #d4edda;
        border-color: #c3e6cb;
        color: #155724;
    }

    .alert-modern.alert-warning {
        background-color: #fff3cd;
        border-color: #ffeaa7;
        color: #856404;
    }

    .alert-modern.alert-info {
        background-color: #d1ecf1;
        border-color: #bee5eb;
        color: #0c5460;
    }

.info-message {
    background-color: #e7f3ff;
    border: 1px solid #b6d4fe;
    border-radius: 0.375rem;
    padding: 0.75rem;
}

    .info-message.warning {
        background-color: #fff3cd;
        border-color: #ffeaa7;
        color: #856404;
        padding: 8px 12px;
        border-radius: 4px;
        font-size: 0.875rem;
    }

/* ===== DASHBOARD ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(550px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-content-grid {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 1.5rem;
    width: 100%;
}

.dossiers-recents-section {
    height: 100%;
}

.right-side-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.h-100 {
    height: 100% !important;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
    }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

    .stat-icon.bg-primary {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    }

    .stat-icon.bg-success {
        background: linear-gradient(135deg, var(--success) 0%, #0da271 100%);
    }

    .stat-icon.bg-warning {
        background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    }

    .stat-icon.bg-danger {
        background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    }

.stat-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark);
}

.stat-content p {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Activités récentes */
.activity-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.activity-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #edf2f7;
    transition: background-color 0.2s;
}

    .activity-item:hover {
        background-color: #f7fafc;
        border-radius: 8px;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

.activity-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: #f7fafc;
}

.activity-content p {
    margin: 0;
    font-weight: 500;
}

.activity-content .text-muted {
    font-size: 0.75rem;
}

/* ===== POPUPS MODERNES ===== */
.modern-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.modern-popup-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    transform: scale(0.9);
    animation: popIn 0.3s ease-out forwards;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modern-popup-header {
    background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modern-popup-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modern-popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

    .modern-popup-close:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }

.modern-popup-body {
    padding: 2rem;
    max-height: calc(85vh - 140px);
    overflow-y: auto;
}

.modern-popup-footer {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Grilles pour popups */
.popup-grid-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.popup-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.popup-grid-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.popup-grid-full {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.popup-details-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.popup-details-section {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
}

.popup-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.5rem;
}

.popup-details-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

    .popup-details-row:last-child {
        margin-bottom: 0;
    }

.popup-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .popup-detail-item.full-width {
        grid-column: 1 / -1;
    }

    .popup-detail-item label {
        font-weight: 600;
        color: var(--gray-600);
        font-size: 0.875rem;
        margin: 0;
    }

    .popup-detail-item span {
        color: var(--dark);
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
        background: white;
        border-radius: 6px;
        border: 1px solid var(--gray-200);
        min-height: 2.5rem;
        display: flex;
        align-items: center;
    }

    .popup-detail-item a {
        color: var(--primary);
        text-decoration: none;
        transition: color 0.2s ease;
    }

        .popup-detail-item a:hover {
            color: var(--primary-dark);
            text-decoration: underline;
        }

/* ===== BARRE D'ACTIONS STICKY ===== */
.actions-sticky-toolbar-grid {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1.5rem;
    margin: -1rem -1.5rem 1.5rem -1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.actions-sticky-grid-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    max-width: 100%;
}

.grid-title {
    justify-self: start;
    min-width: 200px;
}

.grid-buttons {
    justify-self: center;
}

.grid-spacer {
    justify-self: end;
    min-width: 200px;
}

.buttons-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.page-title-sticky {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-subtitle-sticky {
    color: #6c757d;
    font-size: 0.875rem;
    margin: 0.25rem 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.details-container-with-sticky {
    margin-top: 0.5rem;
}

/* ===== LOADERS ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

.page-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4361ee;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #4361ee;
}

/* ===== UTILITAIRES ===== */
.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-info {
    color: var(--info);
}

.text-muted {
    color: var(--gray-500);
}

.bg-primary {
    background-color: var(--primary);
}

.bg-success {
    background-color: var(--success);
}

.bg-danger {
    background-color: var(--danger);
}

.bg-warning {
    background-color: var(--warning);
}

.bg-info {
    background-color: var(--info);
}

/* Espacements */
.mt-3 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.ms-2 {
    margin-left: 0.5rem;
}

.me-2 {
    margin-right: 0.5rem;
}

/* Display */
.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.text-center {
    text-align: center;
}

.text-end {
    text-align: right;
}

.w-100 {
    width: 100%;
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ===== ANIMATIONS ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes popOut {
    from {
        transform: scale(1);
        opacity: 1;
    }

    to {
        transform: scale(0.9);
        opacity: 0;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1600px) {
    .col-card-20cm {
        flex: 1 1 calc(50% - 0.75rem);
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 1400px) {
    .table-responsive-custom {
        min-width: 900px;
    }

    .observation-cell-fixed {
        width: 200px;
        max-width: 200px;
        min-width: 200px;
    }
}

@media (max-width: 1200px) {
    .dual-column-layout-20cm,
    .main-sections {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .col-card,
    .col-card-20cm,
    .section-card-full {
        flex: 1 1 100%;
        min-width: auto;
        max-width: none;
    }

    .actions-sticky-grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    .grid-title, .grid-buttons, .grid-spacer {
        justify-self: center;
        width: 100%;
    }

    .grid-title {
        order: 1;
    }

    .grid-buttons {
        order: 2;
    }

    .grid-spacer {
        display: none;
    }

    .dashboard-content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dossiers-recents-section {
        min-height: 400px;
    }

    .right-side-section {
        min-height: auto;
    }

        .right-side-section .modern-card:first-child {
            max-height: 300px;
        }
}

@media (max-width: 992px) {
    .search-row {
        grid-template-columns: 1fr 1fr;
    }

    .compact-grid {
        grid-template-columns: 1fr;
    }

    .popup-details-row,
    .popup-grid-row,
    .popup-form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .popup-grid-full,
    .popup-form-full,
    .popup-detail-item.full-width {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
    }

        .sidebar.show {
            left: 0;
        }

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

    .top-bar {
        margin-left: 0;
        padding: 0 1rem;
    }

    .content-area {
        padding: 1rem;
    }

    .grid-2-columns,
    .info-grid,
    .print-grid {
        grid-template-columns: 1fr;
    }

    .modern-popup-container {
        width: 95%;
        margin: 1rem;
    }

    .modern-popup-header {
        padding: 1.25rem 1.5rem;
    }

    .modern-popup-body {
        padding: 1.5rem;
    }

    .modern-popup-footer {
        padding: 1.25rem 1.5rem;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

    .actions-footer,
    .motif-rejet-actions,
    .region-actions,
    .situation-dossier-actions,
    .sort-dossier-actions,
    .statut-dossier-actions,
    .tier-actions,
    .type-support-actions {
        flex-direction: column;
    }

    .table-responsive-custom {
        min-width: 700px;
    }

    .table-scrollable {
        min-width: 500px !important;
    }

    .actions-sticky-toolbar-grid {
        margin: -1rem -1rem 1rem -1rem;
        padding: 0.75rem 1rem;
    }

    .buttons-container {
        flex-direction: column;
        width: 100%;
    }

        .buttons-container .btn-modern {
            width: 100%;
            max-width: 250px;
        }

    .btn-modern {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .page-title-sticky {
        font-size: 1.3rem !important;
    }
}

/* ===== SCROLLBARS PERSONNALISÉES ===== */
.sub-menu-content::-webkit-scrollbar {
    width: 6px;
}

.sub-menu-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sub-menu-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

    .sub-menu-content::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }

.modern-popup-body::-webkit-scrollbar {
    width: 6px;
}

.modern-popup-body::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.modern-popup-body::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

    .modern-popup-body::-webkit-scrollbar-thumb:hover {
        background: var(--gray-400);
    }

.observation-content-scroll::-webkit-scrollbar {
    width: 6px;
}

.observation-content-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.observation-content-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

    .observation-content-scroll::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

.activity-list::-webkit-scrollbar {
    width: 6px;
}

.activity-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.activity-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

    .activity-list::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

.dossiers-recents-section .table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dossiers-recents-section .table-responsive::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.dossiers-recents-section .table-responsive::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

    .dossiers-recents-section .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #adb5bd;
    }

/* Pour Firefox */
.sub-menu-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

.activity-list {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* ===== TABLEAU COMPACT AVEC EN-TÊTE VISIBLE ===== */
.table-modern.compact-table thead {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
}

.table-modern.compact-table th {
    background: transparent !important;
    color: white !important;
    padding: 0.5rem 0.4rem !important;
    font-size: 0.75rem !important;
    white-space: nowrap;
    border: none !important;
}

.table-modern.compact-table td {
    padding: 0.5rem 0.4rem !important;
    font-size: 0.8rem !important;
    vertical-align: middle;
    background: white;
}

/* Largeurs des colonnes spécifiques pour compact-table */
.table-modern.compact-table .col-ref {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

.table-modern.compact-table .col-creancier {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-modern.compact-table .col-debiteur {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-modern.compact-table .col-montant {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    text-align: right;
    font-weight: 600;
    color: #28a745 !important;
}

.table-modern.compact-table .col-statut {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    text-align: center;
}

.table-modern.compact-table .col-date {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    text-align: center;
    color: #6c757d;
}

.table-modern.compact-table .col-actions {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    text-align: center;
}

/* Pour s'assurer que les lignes alternent bien */
.table-modern.compact-table tbody tr:hover {
    background-color: var(--primary-light) !important;
}

/* ===== SPINNER STANDARD UNIFIÉ ===== */

/* Spinner global pour chargement initial et navigation */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
    transition: opacity 0.3s ease;
}

.standard-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4361ee;
    border-radius: 50%;
    animation: spin-standard 1s linear infinite;
}

@keyframes spin-standard {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Spinners plus petits pour les chargements locaux */
.loading-spinner-sm {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4361ee;
    border-radius: 50%;
    animation: spin-standard 1s linear infinite;
    display: inline-block;
}

.loading-spinner-md {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4361ee;
    border-radius: 50%;
    animation: spin-standard 1s linear infinite;
    display: inline-block;
}

/* Pour les boutons de chargement */
.btn-loading .loading-spinner-sm {
    margin-right: 8px;
}

/* Masquer le spinner Bootstrap par défaut */
.spinner-border {
    display: none !important;
}

.loading-container {
    display: none !important;
}

/* ===== PAGE DE LOGIN MODERNE ===== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 20%), radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 20%);
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.9) 0%, rgba(58, 86, 212, 0.9) 100%);
}

.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
}

.modern-login-card {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* Logo */
.logo-container {
    display: flex;
    justify-content: center;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(67, 97, 238, 0.3);
}

    .logo-circle i {
        font-size: 2.5rem;
        color: white;
    }

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: #718096;
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Formulaires modernes */
.login-form {
    margin-top: 2rem;
}

.form-group-modern {
    margin-bottom: 1.5rem;
}

.form-label-modern {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-group-modern {
    position: relative;
}

.form-control-modern {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #2d3748;
}

    .form-control-modern:focus {
        outline: none;
        border-color: #4361ee;
        box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
        background: white;
    }

    .form-control-modern::placeholder {
        color: #a0aec0;
    }

    .form-control-modern.is-invalid {
        border-color: #fc8181;
        background-color: #fff5f5;
    }

        .form-control-modern.is-invalid:focus {
            box-shadow: 0 0 0 3px rgba(252, 129, 129, 0.15);
        }

.form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    pointer-events: none;
}

.form-text {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 0.25rem;
    padding-left: 0.5rem;
}

/* Checkbox moderne */
.form-check-modern {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.form-check-input-modern {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    margin-right: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .form-check-input-modern:checked {
        background-color: #4361ee;
        border-color: #4361ee;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
    }

.form-check-label-modern {
    display: flex;
    align-items: center;
    color: #4a5568;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

/* Carte des identifiants de test */
.test-credentials-card {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    margin-top: 2rem;
}

.test-credentials-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

    .test-credentials-header h6 {
        color: #4a5568;
        font-weight: 600;
        margin: 0;
    }

    .test-credentials-header i {
        color: #4361ee;
        font-size: 1.2rem;
    }

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

.credential-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

    .credential-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
        border-color: #cbd5e0;
    }

.credential-user {
    font-weight: 600;
    color: #4361ee;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
}

.credential-separator {
    color: #a0aec0;
    margin: 0 0.5rem;
}

.credential-password {
    font-family: 'Consolas', monospace;
    color: #2d3748;
    font-size: 0.9rem;
    background: #f7fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.credentials-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #ebf8ff;
    border-radius: 8px;
    border: 1px solid #bee3f8;
    color: #2c5282;
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
}

    .credentials-note i {
        color: #4299e1;
        margin-right: 0.5rem;
        flex-shrink: 0;
    }

/* Panneau de débogage (caché par défaut) */
.debug-panel {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    width: 300px;
    z-index: 1000;
    display: none; /* Caché par défaut */
}

.show-debug .debug-panel {
    display: block; /* Afficher seulement si besoin */
}

.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

    .debug-header h6 {
        margin: 0;
        color: #4a5568;
        font-weight: 600;
    }

.debug-body {
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.debug-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.debug-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.debug-label {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 500;
}

.debug-value {
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Consolas', monospace;
}

/* Bouton de connexion moderne */
.btn-modern.btn-primary-modern.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    height: auto;
}

    .btn-modern.btn-primary-modern.btn-lg:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(67, 97, 238, 0.3);
    }

/* Footer */
.login-footer {
    color: #718096;
    font-size: 0.85rem;
}

    .login-footer p {
        margin-bottom: 0.25rem;
    }

/* Alertes modernes */
.alert-modern {
    border-radius: 12px;
    border: 1px solid;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

    .alert-modern.alert-danger {
        background-color: #fff5f5;
        border-color: #fed7d7;
        color: #c53030;
    }

/* Responsive */
@media (max-width: 576px) {
    .login-page {
        padding: 1rem;
    }

    .modern-login-card {
        padding: 2rem;
    }

    .credentials-grid {
        grid-template-columns: 1fr;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .logo-circle {
        width: 60px;
        height: 60px;
    }

        .logo-circle i {
            font-size: 2rem;
        }
}

@media (max-height: 700px) {
    .login-page {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* ===== IMPRESSION OPTIMISÉE PAYSAGE ===== */

/* Version imprimable - cachée à l'écran */
.print-version {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
}

/* Styles pour l'état d'impression */
.btn-modern:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Spinner pendant l'impression */
.page-loader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 9999 !important;
    backdrop-filter: blur(3px) !important;
}

/* ===== STYLES D'IMPRESSION UNIFIÉS ===== */
@media print {
    /* RESET COMPLET - Cacher TOUT sauf .print-version */
    body, body *:not(.print-version):not(.print-version *) {
        visibility: hidden !important;
        display: none !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Afficher UNIQUEMENT .print-version et son contenu */
    .print-version,
    .print-version * {
        visibility: visible !important;
        display: block !important;
        opacity: 1 !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Positionnement de la version imprimable */
    .print-version {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 15mm !important;
        background: white !important;
        color: black !important;
        font-family: "Inter", Arial, sans-serif !important;
        font-size: 10pt !important;
        line-height: 1.4 !important;
        display: block !important;
    }

    /* FORCER LE PAYSAGE POUR TOUTES LES PAGES */
    @page {
        size: A4 landscape !important;
        margin: 10mm !important;
    }

    /* Header d'impression */
    .print-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        padding: 0 0 10mm 0 !important;
        border-bottom: 2px solid #4361ee !important;
        margin-bottom: 10mm !important;
        width: 100% !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* Titre principal */
    .print-title {
        text-align: center !important;
        margin: 0 0 15mm 0 !important;
        padding: 5mm !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

        .print-title h1 {
            font-size: 18pt !important;
            margin: 0 0 2mm 0 !important;
            color: #333 !important;
        }

    /* Sections */
    .print-section {
        margin: 0 0 15mm 0 !important;
        padding: 0 !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .print-section-title {
        font-size: 12pt !important;
        font-weight: 600 !important;
        color: #4361ee !important;
        margin: 0 0 5mm 0 !important;
        padding: 3mm 0 !important;
        border-bottom: 1px solid #ddd !important;
    }

    /* Grille pour données générales */
    .print-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 3mm !important;
        margin: 0 0 5mm 0 !important;
    }

    .print-item {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 2mm 0 !important;
        border-bottom: 1px dotted #eee !important;
        font-size: 9pt !important;
    }

        .print-item label {
            font-weight: 600 !important;
            color: #555 !important;
            min-width: 40mm !important;
        }

        .print-item span {
            text-align: right !important;
            color: #333 !important;
        }

    /* Grille financière */
    .print-financial-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5mm !important;
        margin: 0 0 10mm 0 !important;
    }

    /* Tables paysage optimisées */
    .landscape-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 7pt !important;
        margin: 5mm 0 !important;
        page-break-inside: auto !important;
    }

        .landscape-table th {
            background-color: #4361ee !important;
            color: white !important;
            padding: 2mm 1mm !important;
            text-align: center !important;
            font-weight: 600 !important;
            border: 1px solid #ddd !important;
            white-space: nowrap !important;
            page-break-inside: avoid !important;
        }

        .landscape-table td {
            padding: 1mm 0.5mm !important;
            border: 1px solid #ddd !important;
            text-align: center !important;
            vertical-align: top !important;
            page-break-inside: avoid !important;
        }

        /* Éviter les coupures dans les lignes */
        .landscape-table tr {
            page-break-inside: avoid !important;
            break-inside: avoid !important;
        }

    /* Forcer le background blanc pour les impressions */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Footer d'impression */
    .print-footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        text-align: center !important;
        font-size: 8pt !important;
        color: #666 !important;
        padding: 3mm !important;
        border-top: 1px solid #ddd !important;
        background: white !important;
    }

    /* Assurer que le contenu ne dépasse pas */
    * {
        overflow: visible !important;
        max-height: none !important;
    }

    /* Désactiver les liens et boutons dans l'impression */
    a, button, input, select, textarea {
        pointer-events: none !important;
        cursor: default !important;
    }
}

/* ===== MODIFIER DOSSIER STYLES ===== */

/* Styles pour la page de modification de dossier */
.modifier-dossier .modern-card {
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
}

    .modifier-dossier .modern-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }

.modifier-dossier .card-header-modern {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e0e6ed;
    border-radius: 10px 10px 0 0;
}

.modifier-dossier .card-body-modern {
    padding: 1.25rem;
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
}

.modifier-dossier .dual-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.modifier-dossier .grid-2-columns-aligned {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.modifier-dossier .form-group-aligned {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modifier-dossier .form-label-aligned {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.25rem;
}

.modifier-dossier .form-control-aligned {
    height: 36px;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
}

.modifier-dossier .input-group-text {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

.modifier-dossier .financial-section {
    margin-bottom: 1.5rem;
}

.modifier-dossier .financial-grid {
    display: grid;
    gap: 0.75rem;
}

.modifier-dossier .financial-item {
    margin-bottom: 0.75rem;
}

.modifier-dossier .financial-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.25rem;
}

.modifier-dossier .monetary-field {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-align: right;
    background-color: #f8fafc !important;
}

.modifier-dossier .input-group-text-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background-color: #f7fafc;
}

.modifier-dossier .info-box {
    border: 1px solid #edf2f7;
    background: linear-gradient(to right, #ffffff, #f8fafc);
    transition: all 0.2s ease;
}

    .modifier-dossier .info-box:hover {
        background: linear-gradient(to right, #f8fafc, #e6fffa);
        border-color: #c6f6d5;
    }

.modifier-dossier .total-item,
.modifier-dossier .reglement-item,
.modifier-dossier .reste-item,
.modifier-dossier .synth-item {
    border: 1px solid;
    transition: all 0.2s ease;
}

    .modifier-dossier .total-item:hover,
    .modifier-dossier .reglement-item:hover,
    .modifier-dossier .reste-item:hover,
    .modifier-dossier .synth-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

.modifier-dossier .section-title {
    font-size: 0.95rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid;
}

.modifier-dossier .readonly-field {
    background-color: #f7fafc;
    color: #718096;
    cursor: not-allowed;
    opacity: 0.9;
}

.modifier-dossier .badge-cloture {
    background-color: #fed7d7;
    color: #c53030;
}

.modifier-dossier .bg-info-subtle {
    background-color: rgba(56, 178, 172, 0.1);
}

.modifier-dossier .bg-success-subtle {
    background-color: rgba(72, 187, 120, 0.1);
}

.modifier-dossier .bg-danger-subtle {
    background-color: rgba(245, 101, 101, 0.1);
}

.modifier-dossier .bg-warning-subtle {
    background-color: rgba(237, 137, 54, 0.1);
}

.modifier-dossier .bg-primary-subtle {
    background-color: rgba(66, 153, 225, 0.1);
}

.modifier-dossier .btn-modern {
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(66, 153, 225, 0.3);
}

    .modifier-dossier .btn-modern:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(66, 153, 225, 0.4);
        background: linear-gradient(135deg, #3182ce 0%, #2b6cb0 100%);
    }

.modifier-dossier .btn-info-modern {
    background: linear-gradient(135deg, #0bc5ea 0%, #00a3c4 100%);
    box-shadow: 0 2px 4px rgba(11, 197, 234, 0.3);
}

    .modifier-dossier .btn-info-modern:hover {
        background: linear-gradient(135deg, #00a3c4 0%, #0987a0 100%);
        box-shadow: 0 4px 8px rgba(11, 197, 234, 0.4);
    }

.modifier-dossier .progress {
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.modifier-dossier .progress-bar {
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Responsive */
@media (max-width: 1200px) {
    .modifier-dossier .dual-column-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .modifier-dossier .grid-2-columns-aligned {
        grid-template-columns: 1fr;
    }

    .modifier-dossier .card-body-modern {
        padding: 1rem;
    }
}

.btn-warning-modern {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(237, 137, 54, 0.3);
}

    .btn-warning-modern:hover {
        background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(237, 137, 54, 0.4);
    }

    .btn-warning-modern:disabled {
        background: #e2e8f0;
        color: #a0aec0;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

    .btn-warning-modern i {
        font-size: 0.9rem;
    }

/* Animation pour le recalcul */
.recalcul-animation {
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0% {
        background-color: #fff;
    }

    50% {
        background-color: #fef3c7;
    }

    100% {
        background-color: #fff;
    }
}

/* Dans app.css */
.dual-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
}

@media (max-width: 1200px) {
    .dual-column-layout {
        grid-template-columns: 1fr;
    }
}

.grid-2-columns-aligned,
.financial-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .grid-2-columns-aligned,
    .financial-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== STYLES MODERNES POUR LES CARTES ===== */

/* Carte moderne */
.modern-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .modern-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }

/* En-tête de carte */
.modern-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px 12px 0 0;
}

.modern-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    margin: 0;
}

/* Badge moderne */
.modern-badge {
    background: #475569;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Corps de carte */
.modern-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Structure des formulaires */
.modern-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0;
}

    .modern-form-row .full-width {
        grid-column: span 2;
    }

.modern-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Labels */
.modern-form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

/* Champs de formulaire */
.modern-input {
    padding: 0.625rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #334155;
    background: white;
    transition: all 0.2s ease;
}

    .modern-input:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .modern-input.money {
        font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
        font-weight: 500;
    }

        .modern-input.money.highlight {
            color: #1e40af;
            font-weight: 600;
        }

        .modern-input.money.total {
            font-weight: 600;
            border: none;
            background: transparent;
            padding: 0.5rem 0.75rem;
        }

    .modern-input:read-only,
    .modern-input[readonly] {
        background-color: #f8fafc;
        border-color: #e2e8f0;
        color: #64748b;
    }

/* Champs en lecture seule */
.modern-field-readonly {
    padding: 0.625rem 0.875rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #334155;
    font-weight: 500;
}

/* Sélecteurs */
.modern-select {
    padding: 0.625rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #334155;
    background: white;
    width: 100%;
}

    .modern-select:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

/* Zone de texte */
.modern-textarea {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #334155;
    background: white;
    resize: vertical;
    min-height: 80px;
}

    .modern-textarea:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

/* Compteur */
.modern-counter {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.875rem;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    color: #1e40af;
    font-weight: 600;
}

.counter-value {
    font-size: 1rem;
}

/* Badge de statut */
.modern-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

    .modern-status-badge.active,
    .modern-status-badge.success {
        background: #dcfce7;
        color: #166534;
        border: 1px solid #86efac;
    }

    .modern-status-badge.inactive,
    .modern-status-badge.danger {
        background: #fee2e2;
        color: #991b1b;
        border: 1px solid #fca5a5;
    }

/* Interrupteur moderne */
.modern-switch {
    width: 2.5rem;
    height: 1.25rem;
}

    .modern-switch:checked {
        background-color: #10b981;
        border-color: #10b981;
    }

/* Sections */
.modern-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.modern-section-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

/* Timeline */
.modern-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.timeline-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-date {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.125rem;
}

.timeline-action {
    font-size: 0.825rem;
    color: #334155;
}

/* ===== SECTION FINANCIÈRE ===== */

/* Section financière */
.modern-financial-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

    .modern-financial-section:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

.modern-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

    .modern-section-title.success {
        color: #059669;
    }

/* Grille financière */
.modern-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

/* Items financiers */
.modern-financial-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.modern-financial-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
}

/* Champ monétaire */
.modern-money-field {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    overflow: hidden;
}

    .modern-money-field .modern-input {
        flex: 1;
        border: none;
        border-radius: 0;
    }

    .modern-money-field .currency {
        padding: 0 0.875rem;
        background: #f8fafc;
        color: #64748b;
        font-size: 0.75rem;
        font-weight: 500;
        border-left: 1px solid #e2e8f0;
        height: 100%;
        display: flex;
        align-items: center;
    }

    .modern-money-field.editable {
        border-color: #93c5fd;
    }

    .modern-money-field.success {
        background: #f0fdf4;
        border-color: #86efac;
    }

        .modern-money-field.success .currency {
            background: #dcfce7;
            color: #166534;
        }

/* Items de total */
.modern-total-item,
.modern-reglement-item,
.modern-reste-item,
.modern-synth-item {
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .modern-total-item.success {
        background: #f0fdf4;
        border: 1px solid #86efac;
    }

    .modern-total-item.info {
        background: #f0f9ff;
        border: 1px solid #93c5fd;
    }

.modern-reglement-item {
    background: #f0fdf4;
    border: 1px solid #86efac;
}

.modern-reste-item.warning {
    background: #fef3c7;
    border: 1px solid #fcd34d;
}

.modern-synth-item.primary {
    background: #eff6ff;
    border: 1px solid #93c5fd;
}

.modern-synth-item.danger {
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

/* Labels spéciaux */
.modern-total-label,
.modern-reglement-label,
.modern-reste-label,
.modern-synth-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    margin: 0;
}

.modern-total-label {
    color: #166534;
}

.modern-reglement-label {
    color: #059669;
}

.modern-reste-label {
    color: #92400e;
}

.modern-synth-label {
    color: #1e40af;
}

/* Barre de progression */
.modern-progress-container {
    margin-top: 0.75rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
}

.progress-label {
    font-size: 0.75rem;
    color: #64748b;
}

.progress-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: #059669;
}

.modern-progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.modern-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Bouton moderne */
.modern-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.modern-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

    .modern-btn-primary:hover {
        background: linear-gradient(135deg, #2563eb, #1e40af);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }

.modern-btn:active {
    transform: translateY(0);
}

/* Section d'action */
.modern-action-section {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

/* Responsive */
@media (max-width: 768px) {
    .modern-form-row,
    .modern-grid-2 {
        grid-template-columns: 1fr;
    }

        .modern-form-row .full-width {
            grid-column: span 1;
        }

    .modern-card-body {
        padding: 1rem;
    }

    .modern-card-header {
        padding: 0.875rem 1rem;
    }
}

/* Animation pour les champs modifiables */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.modern-money-field.editable:focus-within {
    animation: pulse 1.5s infinite;
}

/* ===== CONTAINER PRINCIPAL ===== */
.modern-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
}

@media (max-width: 1200px) {
    .modern-cards-container {
        grid-template-columns: 1fr;
    }
}

/* ===== CARTE MODERNE ===== */
.modern-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modern-card-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
}

.modern-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
}

.modern-card-badge {
    background: #6c757d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.modern-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ===== FORMULAIRES ===== */
.modern-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.modern-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.modern-form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Inputs */
.modern-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #333;
    background: white;
    width: 100%;
    transition: all 0.2s;
}

    .modern-input:focus {
        outline: none;
        border-color: #4a90e2;
        box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
    }

    .modern-input.date {
        font-size: 0.8rem;
        padding: 0.5rem;
    }

.modern-input-readonly {
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #495057;
    font-weight: 500;
}

/* Select */
.modern-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #333;
    background: white;
    width: 100%;
}

    .modern-select:disabled {
        background: #f8f9fa;
        color: #6c757d;
    }

/* Textarea */
.modern-textarea {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #333;
    background: white;
    width: 100%;
    resize: vertical;
    min-height: 60px;
}

/* ===== BADGES ET STATUS ===== */
.modern-badge-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

    .modern-badge-status.active,
    .modern-badge-status.success {
        background: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
    }

    .modern-badge-status.inactive,
    .modern-badge-status.danger {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
    }

.modern-switch {
    width: 2.25rem;
    height: 1.125rem;
}

/* ===== COMPTEUR ===== */
.modern-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    color: #1565c0;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ===== SECTIONS ===== */
.modern-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.modern-section-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #444;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Timeline */
.modern-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modern-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.timeline-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-date {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.125rem;
}

.timeline-text {
    font-size: 0.8rem;
    color: #333;
}

/* ===== SECTION FINANCIÈRE ===== */
.modern-financial-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

    .modern-financial-section:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

.modern-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #444;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

    .modern-section-title.success {
        color: #28a745;
    }

/* Grille financière */
.modern-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Groupes monétaires */
.modern-money-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

    .modern-money-group label {
        font-size: 0.75rem;
        font-weight: 500;
        color: #666;
        margin: 0;
    }

.modern-money-input {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    overflow: hidden;
}

    .modern-money-input.readonly {
        background: #f8f9fa;
    }

    .modern-money-input.editable {
        border-color: #4a90e2;
        background: #fff;
    }

    .modern-money-input .modern-input {
        flex: 1;
        border: none;
        border-radius: 0;
        background: transparent;
    }

    .modern-money-input .currency {
        padding: 0 0.75rem;
        background: #f8f9fa;
        color: #666;
        font-size: 0.75rem;
        font-weight: 500;
        border-left: 1px solid #ddd;
        height: 100%;
        display: flex;
        align-items: center;
    }

/* Box de totaux */
.modern-total-box,
.modern-reglement-box,
.modern-reste-box,
.modern-synth-box {
    padding: 0.5rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

    .modern-total-box.success {
        background: #d4edda;
        border: 1px solid #c3e6cb;
    }

    .modern-total-box.info {
        background: #d1ecf1;
        border: 1px solid #bee5eb;
    }

.modern-reglement-box {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.modern-reste-box.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
}

.modern-synth-box.primary {
    background: #cce5ff;
    border: 1px solid #b8daff;
}

.modern-synth-box.danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.modern-money-total {
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 4px;
    background: rgba(255,255,255,0.7);
    overflow: hidden;
}

    .modern-money-total.success {
        background: rgba(40, 167, 69, 0.1);
        border-color: #28a745;
    }

    .modern-money-total .modern-input {
        flex: 1;
        border: none;
        background: transparent;
        font-weight: 600;
        color: #333;
        padding: 0.375rem 0.5rem;
    }

    .modern-money-total .currency {
        padding: 0 0.5rem;
        background: transparent;
        color: #666;
        font-size: 0.75rem;
        border-left: 1px solid rgba(0,0,0,0.1);
    }

/* Progression */
.modern-progress {
    margin-top: 0.75rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
    color: #666;
}

.progress-percent {
    font-weight: 600;
    color: #28a745;
}

.progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ===== BOUTON ===== */
.modern-action {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.modern-btn {
    padding: 0.625rem 1rem;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

    .modern-btn:hover {
        background: #357ae8;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
    }

    .modern-btn:active {
        transform: translateY(0);
    }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .modern-cards-container {
        gap: 0.75rem;
    }

    .modern-card-body {
        padding: 0.75rem;
    }
}

@media (max-width: 768px) {
    .modern-form-row,
    .modern-grid-2 {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .modern-card-header {
        padding: 0.5rem 0.75rem;
    }

    .modern-card-title {
        font-size: 0.85rem;
    }
}

/* Ajoutez dans votre app.css */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.standard-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Styles de base pour le login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 40px 30px;
}

.logo-container {
    display: flex;
    justify-content: center;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 0;
}

.form-group-modern {
    margin-bottom: 24px;
}

.form-label-modern {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.input-group-modern {
    position: relative;
}

.form-control-modern {
    width: 100%;
    padding: 12px 16px;
    padding-left: 44px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
}

    .form-control-modern:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

.form-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.form-text {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.btn-modern {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

    .btn-primary-modern:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }

    .btn-primary-modern:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Alert */
.alert-modern {
    border-radius: 8px;
    border: none;
    padding: 16px;
    margin-bottom: 24px;
}

.alert-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

/* Debug panel */
.debug-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1a1a1a;
    color: white;
    border-radius: 8px;
    padding: 16px;
    max-width: 400px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.debug-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a1a;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
}

/* Responsive */
@@media (max-width: 576px) {
    .login-card {
        padding: 30px 20px;
    }

    .login-title {
        font-size: 20px;
    }
}

/* Auth Layout */
.auth-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-header {
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
}

    .auth-logo i {
        font-size: 1.5rem;
        color: #3498db;
    }

.auth-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-footer {
    padding: 1rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid #e0e0e0;
}

/* Auth Redirect Styles */
.auth-redirect-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-redirect-content {
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
}

.auth-redirect-spinner {
    margin-bottom: 1.5rem;
}

.auth-redirect-message h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.auth-redirect-message .text-muted {
    color: #7f8c8d !important;
}

/* Layout Styles */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    color: white;
    transition: width 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

    .sidebar.collapsed {
        width: 70px;
    }

.sidebar-header {
    padding: 20px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2rem;
    color: #3498db;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-logo h3 {
    display: none;
}

.sidebar-toggle {
    position: absolute;
    top: 1rem;
    right: -12px;
    width: 24px;
    height: 24px;
    background: #3498db;
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

    .sidebar-toggle:hover {
        background: #2980b9;
        transform: scale(1.1);
    }

.sidebar-content {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%); /* Même dégradé que la sidebar */
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    background: rgba(255,255,255,0.05); /* Léger fond transparent */
}

    .user-info:hover {
        background: rgba(255,255,255,0.08); /* Un peu plus clair au survol */
    }

.user-avatar {
    font-size: 1.5rem;
    color: #3498db;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.8rem;
    color: #95a5a6;
    margin-top: 0.25rem;
}

.user-action {
    margin-top: 0.5rem;
}

.sidebar.collapsed .user-details,
.sidebar.collapsed .user-action {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.sidebar:not(.collapsed) ~ .main-content {
    margin-left: 0;
}

.top-bar {
    height: 60px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

    .menu-toggle:hover {
        background: #f5f5f5;
        color: #1a237e;
    }

.top-bar-title {
    font-weight: 600;
    color: #333;
    font-size: 1.2rem;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #555;
}

/* Content wrapper */
.content-wrapper {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    background-color: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
    }

        .sidebar.collapsed {
            transform: translateX(0);
            width: 250px;
        }

    .main-content {
        margin-left: 0 !important;
    }

    .menu-toggle {
        display: block;
    }

    .top-bar-title {
        font-size: 1rem;
    }
}

/* NavMenu Styles */
.nav-menu {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nav-group {
    margin-bottom: 1rem;
}

.nav-group-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.5rem;
    margin-bottom: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    color: #bdc3c7;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

    .nav-item:hover {
        background: rgba(52, 152, 219, 0.1);
        color: white;
        border-left-color: #3498db;
    }

    .nav-item.active {
        background: rgba(52, 152, 219, 0.2);
        color: white;
        border-left-color: #3498db;
    }

.nav-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    overflow: hidden;
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

.nav-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Sub Menu */
.sub-menu {
    background: rgba(0, 0, 0, 0.1);
    border-left: 3px solid #3498db;
    margin-left: 1.5rem;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sub-menu-content {
    padding: 0.5rem 0;
}

.scrollable-submenu {
    max-height: 300px;
    overflow-y: auto;
}

    .scrollable-submenu::-webkit-scrollbar {
        width: 4px;
    }

    .scrollable-submenu::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
    }

    .scrollable-submenu::-webkit-scrollbar-thumb {
        background: #3498db;
        border-radius: 2px;
    }

.sub-nav-section {
    margin-bottom: 0.5rem;
}

.sub-nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    padding: 0.5rem 1.5rem;
    margin-top: 0.5rem;
}

.sub-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.5rem 0.5rem 2.5rem;
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

    .sub-nav-item:hover {
        background: rgba(52, 152, 219, 0.1);
        color: white;
    }

    .sub-nav-item.active {
        background: rgba(52, 152, 219, 0.2);
        color: white;
    }

    .sub-nav-item i {
        font-size: 0.9rem;
        width: 16px;
    }

/* Logout Section */
.logout-section {
    margin-top: auto;
    margin-bottom: 1rem;
}

.logout-item {
    background: rgba(231, 76, 60, 0.1);
    border-left-color: #e74c3c;
}

    .logout-item:hover {
        background: rgba(231, 76, 60, 0.2);
        border-left-color: #c0392b;
    }

.logout-item-force {
    background: rgba(241, 196, 15, 0.1);
    border-left-color: #f1c40f;
}

    .logout-item-force:hover {
        background: rgba(241, 196, 15, 0.2);
        border-left-color: #f39c12;
    }

.user-info-mini {
    padding: 0.5rem 1.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-name-mini {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-mini {
    font-size: 0.75rem;
    color: #95a5a6;
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-item {
        padding: 0.75rem 1rem;
    }

    .nav-group-title {
        padding: 0.5rem 1rem;
    }

    .sub-nav-item {
        padding-left: 2rem;
    }
}

/* Excellia_Grecouv.Client\wwwroot\css\app.css */

/* Cacher la section utilisateur dans NavMenu si elle existe */
.nav-menu .user-info-mini {
    display: none !important;
}

/* S'assurer que seule la sidebar a la section utilisateur */
.sidebar-footer .user-info {
    display: flex !important;
}

/* Style pour la section utilisateur dans sidebar */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.user-role {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.user-action .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}
/* Styles POUR L'ÉCRAN SEULEMENT - NE PAS TOUCHER À L'IMPRESSION */
.print-version {
    display: none !important;
}

/* Quand on prépare l'impression */
.preparing-print .print-version {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: white !important;
    z-index: 99999 !important;
    padding: 20px !important;
    overflow: auto !important;
}

.preparing-print .content-area {
    display: none !important;
}

/* Boutons désactivés pendant impression */
.btn-modern:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}
/* AJOUTEZ À LA FIN DE app.css */

/* Styles pour le contenu imprimable (visible seulement à l'impression) */
.print-version {
    display: none; /* Caché à l'écran */
    font-family: 'Inter', Arial, sans-serif;
    color: #333;
    background: white;
}

/* Pour le débogage - afficher temporairement */
.debug-print .print-version {
    display: block !important;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 99999;
    padding: 20px;
    overflow: auto;
}
/* Styles pour la version imprimable optimisée */
.print-version .two-columns-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.print-version .print-column {
    flex: 1;
    min-width: 0; /* Empêche le débordement */
}

.print-version .print-section {
    margin-bottom: 20px;
    page-break-inside: avoid;
}

.print-version .print-section-title {
    font-size: 14pt;
    font-weight: 600;
    color: #4361ee;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

    .print-version .print-section-title i {
        margin-right: 8px;
    }

.print-version .print-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.print-version .print-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 10pt;
}

    .print-version .print-item label {
        font-weight: 600;
        color: #555;
        min-width: 120px;
    }

    .print-version .print-item span {
        text-align: right;
        color: #333;
    }

.print-version .financial-sections-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.print-version .financial-section {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #4361ee;
}

.print-version .financial-subtitle {
    font-size: 11pt;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.print-version .text-success {
    color: #28a745 !important;
    font-weight: 600;
}

.print-version .text-warning {
    color: #ffc107 !important;
    font-weight: 600;
}

.print-version .print-remarks {
    margin-top: 15px;
    padding: 12px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

    .print-version .print-remarks label {
        font-weight: 600;
        color: #856404;
        margin-bottom: 5px;
        display: block;
    }

    .print-version .print-remarks p {
        color: #856404;
        margin: 0;
        font-size: 10pt;
    }

/* Pour l'impression */
@media print {
    .print-version .two-columns-container {
        display: flex !important;
        gap: 15mm !important;
    }

    .print-version .print-column {
        width: 50% !important;
    }

    .print-version .financial-section {
        background: #f8f9fa !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
/* Styles pour l'impression compacte en une page */
@media print {
    /* Forcer tout sur une page */
    .print-version {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* Réduire les marges */
    @page {
        margin: 8mm !important;
    }

    /* Taille de police réduite pour tout tenir */
    .print-version * {
        font-size: 8.5pt !important;
        line-height: 1.2 !important;
    }

    /* Sections côte à côte */
    .two-columns-container {
        display: flex !important;
        gap: 10mm !important;
        margin-bottom: 8mm !important;
    }

    .print-column {
        width: 50% !important;
        flex: 1 !important;
    }

    /* Réduire l'espacement */
    .print-section {
        margin-bottom: 6mm !important;
    }

    .print-section-title {
        font-size: 9pt !important;
        margin-bottom: 3mm !important;
        padding-bottom: 2mm !important;
    }

    .print-item {
        padding: 1mm 0 !important;
        font-size: 8pt !important;
    }

    /* Cacher les grandes tables si elles dépassent */
    .landscape-page {
        max-height: 70mm !important;
        overflow: hidden !important;
    }

    .landscape-table {
        font-size: 6.5pt !important;
    }

        .landscape-table th,
        .landscape-table td {
            padding: 2px 1px !important;
        }
}

.observation-scroll {
    width: 250px;
    height: 100px;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f9f9f9;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.4;
}

    .observation-scroll::-webkit-scrollbar {
        width: 6px;
    }

    .observation-scroll::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .observation-scroll::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }

        .observation-scroll::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }
/* Styles pour l'interface améliorée des Tiers */

/* En-tête moderne */
.modern-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.header-text {
    flex: 1;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.page-subtitle {
    color: #718096;
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
}

/* Conteneur de formulaire moderne */
.modern-form-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-sections {
    padding: 1.5rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

    .form-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4361ee;
}

.section-icon {
    width: 32px;
    height: 32px;
    background: #eef2ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4361ee;
    font-size: 1rem;
    margin-right: 0.75rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.section-content {
    padding-left: 2.5rem;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

    .form-grid.two-columns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

@media (max-width: 768px) {
    .form-grid.two-columns {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
    display: flex;
    align-items: center;
    margin: 0;
}

    .form-label.required::after {
        content: " *";
        color: #e53e3e;
        margin-left: 0.25rem;
    }

    .form-label i {
        margin-right: 0.5rem;
    }

.form-control-modern {
    padding: 0.625rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #2d3748;
    background: white;
    transition: all 0.2s;
}

    .form-control-modern:focus {
        outline: none;
        border-color: #4361ee;
        box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    }

    .form-control-modern::placeholder {
        color: #a0aec0;
    }

.validation-error {
    font-size: 0.75rem;
    color: #e53e3e;
    margin-top: 0.25rem;
}

.form-error-alert {
    padding: 0.75rem 1rem;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    color: #c53030;
    font-size: 0.875rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Carte de recherche moderne */
.modern-search-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.search-container {
    padding: 1.25rem;
}

.search-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 992px) {
    .search-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .search-row {
        grid-template-columns: 1fr;
    }
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.search-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #2d3748;
    background: white;
    transition: all 0.2s;
}

    .search-input:focus {
        outline: none;
        border-color: #4361ee;
        box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    }

    .search-input::placeholder {
        color: #a0aec0;
    }

.search-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #e6fffa;
    border: 1px solid #81e6d9;
    border-radius: 6px;
    margin-top: 1rem;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.results-count {
    font-size: 0.875rem;
    color: #2d3748;
    font-weight: 500;
}

/* Carte de tableau moderne */
.modern-table-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.table-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
}

.table-count {
    background: #4361ee;
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
}

.table-container {
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

    .modern-table thead {
        background: #f8fafc;
    }

    .modern-table th {
        padding: 0.875rem 1rem;
        font-size: 0.75rem;
        font-weight: 600;
        color: #4a5568;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-align: left;
        border-bottom: 1px solid #e2e8f0;
        white-space: nowrap;
    }

    .modern-table tbody tr {
        transition: background-color 0.2s;
    }

        .modern-table tbody tr:hover {
            background-color: #f7fafc;
        }

        .modern-table tbody tr:nth-child(even) {
            background-color: #f8fafc;
        }

            .modern-table tbody tr:nth-child(even):hover {
                background-color: #edf2f7;
            }

    .modern-table td {
        padding: 1rem;
        font-size: 0.875rem;
        color: #2d3748;
        border-bottom: 1px solid #e2e8f0;
    }

.badge-id {
    background: #edf2f7;
    color: #4a5568;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.tier-name {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

    .tier-name strong {
        color: #2d3748;
        font-weight: 600;
    }

.tier-address {
    font-size: 0.75rem;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tier-info {
    color: #4a5568;
}

.tier-contact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

    .tier-contact div {
        font-size: 0.75rem;
        color: #718096;
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

.tier-city {
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.action-buttons {
    display: flex;
    gap: 0.375rem;
    justify-content: center;
}

.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-action:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

.btn-info-modern {
    background: #ebf8ff;
    color: #3182ce;
    border: 1px solid #bee3f8;
}

    .btn-info-modern:hover {
        background: #bee3f8;
    }

.btn-primary-modern {
    background: #ebf4ff;
    color: #4361ee;
    border: 1px solid #c3dafe;
}

    .btn-primary-modern:hover {
        background: #c3dafe;
    }

.btn-danger {
    background: #fed7d7;
    color: #e53e3e;
    border: 1px solid #fc8181;
}

    .btn-danger:hover {
        background: #fc8181;
        color: white;
    }

/* État vide */
.empty-state {
    padding: 3rem;
    text-align: center;
    background: #f8fafc;
}

.empty-icon {
    width: 64px;
    height: 64px;
    background: #edf2f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #a0aec0;
    font-size: 1.5rem;
}

.empty-state h4 {
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.empty-actions {
    margin-top: 1.5rem;
}

/* Chargement */
.table-loading {
    padding: 2rem;
    text-align: center;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #4361ee;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .modern-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .header-right {
        display: flex;
        justify-content: center;
    }

    .section-content {
        padding-left: 0;
    }
}
/* ==========================================================================
   MOTIFS DE REJET - STYLES SPÉCIFIQUES
   ========================================================================== */

/* --------------------------------------------------------------------------
   Modern Page Header (commun aux deux pages)
   -------------------------------------------------------------------------- */
.modern-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.header-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.header-text {
    display: flex;
    flex-direction: column;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
    font-weight: 400;
}

.header-right {
    display: flex;
    gap: 1rem;
}

/* --------------------------------------------------------------------------
   Modern Form Container (MotifRejetEdit.razor)
   -------------------------------------------------------------------------- */
.modern-form-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.form-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.section-icon {
    font-size: 1.25rem;
    color: #ef4444;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.section-content {
    margin-top: 1rem;
}

.form-grid {
    display: grid;
    gap: 1.5rem;
}

    .form-grid.two-columns {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
}

    .form-label.required::after {
        content: "*";
        color: #ef4444;
        margin-left: 0.25rem;
    }

.form-control-modern {
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.95rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: white;
    transition: all 0.2s;
    color: #374151;
}

    .form-control-modern:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

.field-info {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.validation-error {
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   Error Alert
   -------------------------------------------------------------------------- */
.form-error-alert {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Form Actions
   -------------------------------------------------------------------------- */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* --------------------------------------------------------------------------
   Modern Buttons (commun)
   -------------------------------------------------------------------------- */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 0.5rem;
    min-height: 42px;
}

    .btn-modern:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .btn-modern:not(:disabled):hover {
        transform: translateY(-1px);
    }

    .btn-modern:not(:disabled):active {
        transform: translateY(0);
    }

.btn-primary-modern {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

    .btn-primary-modern:hover:not(:disabled) {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        box-shadow: 0 4px 6px rgba(59, 130, 246, 0.4);
    }

.btn-secondary-modern {
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

    .btn-secondary-modern:hover:not(:disabled) {
        background: #f9fafb;
        border-color: #9ca3af;
    }

.btn-outline-modern {
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

    .btn-outline-modern:hover:not(:disabled) {
        background: #f9fafb;
        border-color: #9ca3af;
    }

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: #ef4444;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

    .btn-danger:hover:not(:disabled) {
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
        box-shadow: 0 4px 6px rgba(239, 68, 68, 0.4);
    }

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    min-height: 36px;
}

/* --------------------------------------------------------------------------
   Modern Search Card (MotifsRejet.razor)
   -------------------------------------------------------------------------- */
.modern-search-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.95rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: white;
    transition: all 0.2s;
    color: #374151;
}

    .search-input:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

.search-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.results-count {
    font-size: 0.875rem;
    color: #6b7280;
}

/* --------------------------------------------------------------------------
   Modern Table Card (MotifsRejet.razor)
   -------------------------------------------------------------------------- */
.modern-table-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.table-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.table-title {
    display: flex;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
}

.table-count {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 400;
}

.table-container {
    min-height: 400px;
    position: relative;
}

.table-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.9);
}

/* --------------------------------------------------------------------------
   Modern Table
   -------------------------------------------------------------------------- */
.modern-table {
    width: 100%;
    border-collapse: collapse;
}

    .modern-table thead {
        background-color: #f9fafb;
    }

    .modern-table th {
        padding: 1rem 1.5rem;
        text-align: left;
        font-size: 0.75rem;
        font-weight: 600;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        border-bottom: 2px solid #e5e7eb;
    }

    .modern-table tbody tr {
        border-bottom: 1px solid #e5e7eb;
        transition: background-color 0.2s;
    }

        .modern-table tbody tr:hover {
            background-color: #f9fafb;
        }

    .modern-table td {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        color: #374151;
    }

.badge-motif-code {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #fecaca;
}

.motif-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.motif-code-hint {
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Action Buttons
   -------------------------------------------------------------------------- */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.btn-action {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

    .btn-action.btn-primary-modern {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: white;
        border-color: #3b82f6;
    }

        .btn-action.btn-primary-modern:hover {
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            transform: translateY(-1px);
        }

    .btn-action.btn-danger {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: white;
        border-color: #ef4444;
    }

        .btn-action.btn-danger:hover {
            background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
            transform: translateY(-1px);
        }

/* --------------------------------------------------------------------------
   Empty State
   -------------------------------------------------------------------------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.empty-state h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.empty-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

/* --------------------------------------------------------------------------
   Authentication States
   -------------------------------------------------------------------------- */
.content-area.text-center {
    max-width: 500px;
    margin: 3rem auto;
    padding: 3rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* --------------------------------------------------------------------------
   Loading Spinner
   -------------------------------------------------------------------------- */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.text-center {
    text-align: center;
}

.text-danger {
    color: #ef4444 !important;
}

.text-muted {
    color: #6b7280 !important;
}

.fw-medium {
    font-weight: 500;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.me-1 {
    margin-right: 0.25rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.display-1 {
    font-size: 4rem !important;
    line-height: 1;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .modern-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }

    .header-left {
        width: 100%;
    }

    .header-right {
        width: 100%;
        justify-content: flex-start;
    }

    .modern-form-container,
    .modern-search-card,
    .modern-table-card {
        padding: 1.25rem;
    }

    .form-grid.two-columns {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-modern {
        width: 100%;
        justify-content: center;
    }

    .action-buttons {
        justify-content: flex-start;
    }

    .modern-table {
        display: block;
        overflow-x: auto;
    }

        .modern-table th,
        .modern-table td {
            padding: 0.75rem;
        }
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

    .badge.bg-danger {
        background: #fef2f2;
        color: #991b1b;
        border: 1px solid #fecaca;
    }

/* --------------------------------------------------------------------------
   Content Area Base
   -------------------------------------------------------------------------- */
.content-area {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 64px); /* Ajustez selon votre header */
}

@media (max-width: 768px) {
    .content-area {
        padding: 1rem;
    }
}
/* ==========================================================================
   RÉGIONS - STYLES SPÉCIFIQUES
   ========================================================================== */

/* --------------------------------------------------------------------------
   Badges pour les régions
   -------------------------------------------------------------------------- */
.badge-region-code {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #10b981;
}

.badge-region-id {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #d1d5db;
}

/* --------------------------------------------------------------------------
   Bouton Info (pour les détails)
   -------------------------------------------------------------------------- */
.btn-info-modern {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border-color: #0ea5e9;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.3);
}

    .btn-info-modern:hover:not(:disabled) {
        background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
        box-shadow: 0 4px 6px rgba(14, 165, 233, 0.4);
    }

/* --------------------------------------------------------------------------
   Popup de détails
   -------------------------------------------------------------------------- */
.modern-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modern-popup-container {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modern-popup-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modern-popup-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
}

.modern-popup-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: all 0.2s;
}

    .modern-popup-close:hover {
        background: #f3f4f6;
        color: #374151;
    }

.modern-popup-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.popup-details-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.popup-details-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popup-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    margin: 0;
}

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

.popup-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .popup-detail-item.full-width {
        grid-column: 1 / -1;
    }

    .popup-detail-item label {
        font-size: 0.875rem;
        font-weight: 500;
        color: #6b7280;
    }

    .popup-detail-item span {
        font-size: 0.95rem;
        color: #374151;
    }

.modern-popup-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* --------------------------------------------------------------------------
   Barre de recherche avec plusieurs champs
   -------------------------------------------------------------------------- */
.search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* --------------------------------------------------------------------------
   Responsive pour les popups
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .modern-popup-container {
        width: 95%;
        margin: 1rem;
    }

    .modern-popup-header,
    .modern-popup-body,
    .modern-popup-footer {
        padding: 1rem;
    }

    .popup-details-row {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Styles spécifiques pour les formulaires de région
   -------------------------------------------------------------------------- */
.region-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.region-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

    .region-label.required::after {
        content: "*";
        color: #ef4444;
        margin-left: 0.25rem;
    }

.region-input {
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.95rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: white;
    transition: all 0.2s;
    color: #374151;
}

    .region-input:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

.region-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}
/* ==========================================================================
   CRÉANCIERS - STYLES SPÉCIFIQUES
   ========================================================================== */

/* --------------------------------------------------------------------------
   Badges pour les créanciers
   -------------------------------------------------------------------------- */
.badge-creancier-code {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #7c3aed;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #c4b5fd;
}

.badge-creancier-nrc {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #d1d5db;
}

.badge-creancier-cinc {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #f2f9ff 0%, #e0f2fe 100%);
    color: #0284c7;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #6085bd;
}
.badge-creancier-mf {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0284c7;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #7dd3fc;
}

/* --------------------------------------------------------------------------
   En-tête du créancier (détails)
   -------------------------------------------------------------------------- */
.creancier-header-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.creancier-avatar .avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.bg-gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.creancier-header-info {
    flex: 1;
}

    .creancier-header-info h2 {
        font-size: 1.75rem;
        font-weight: 700;
        color: #1f2937;
        margin: 0 0 0.5rem 0;
    }

.creancier-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Grille de détails
   -------------------------------------------------------------------------- */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.details-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

    .details-card.full-width {
        grid-column: 1 / -1;
    }

.card-header-modern {
    background: #f9fafb;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
}

.card-body-modern {
    padding: 1.5rem;
}

.details-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.details-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.details-value {
    font-size: 0.95rem;
    color: #374151;
    font-weight: 500;
    text-align: right;
    max-width: 60%;
}

/* --------------------------------------------------------------------------
   Contacts
   -------------------------------------------------------------------------- */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

    .contact-item.full-width {
        grid-column: 1 / -1;
    }

.contact-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.contact-value {
    font-size: 0.95rem;
    color: #374151;
    font-weight: 500;
}

.contact-link {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
}

    .contact-link:hover {
        color: #2563eb;
        text-decoration: underline;
    }

/* --------------------------------------------------------------------------
   Compte utilisateur
   -------------------------------------------------------------------------- */
.user-account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.account-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.account-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.account-value {
    font-size: 0.95rem;
    color: #374151;
    font-weight: 500;
}

.user-login {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #1f2937;
}

.empty-account-icon {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #9ca3af;
    font-size: 2rem;
}

/* --------------------------------------------------------------------------
   Boutons d'état
   -------------------------------------------------------------------------- */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-color: #f59e0b;
}

    .btn-warning:hover:not(:disabled) {
        background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
        box-shadow: 0 4px 6px rgba(245, 158, 11, 0.4);
    }

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #10b981;
}

.status-inactive {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* --------------------------------------------------------------------------
   Statistiques
   -------------------------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   Recherche avec spinner
   -------------------------------------------------------------------------- */
.search-input-group {
    position: relative;
}

.search-clear {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.25rem;
}

.search-spinner {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.search-results-info {
    margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Pagination améliorée
   -------------------------------------------------------------------------- */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.pagination-info {
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-pagination {
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
}

    .btn-pagination:hover:not(:disabled) {
        background: #f3f4f6;
        border-color: #9ca3af;
    }

    .btn-pagination.active {
        background: #3b82f6;
        color: white;
        border-color: #3b82f6;
    }

    .btn-pagination:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.pagination-controls-sm {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-info {
    font-size: 0.875rem;
    color: #6b7280;
}

/* --------------------------------------------------------------------------
   Informations créancier dans la liste
   -------------------------------------------------------------------------- */
.creancier-name {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.creancier-nrc {
    font-size: 0.875rem;
}
.creancier-mf {
    font-size: 0.875rem;
}
.creancier-cinc {
    font-size: 0.875rem;
}
.creancier-contacts {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

    .contact-item .email {
        font-size: 0.875rem;
    }

/* --------------------------------------------------------------------------
   Groupes d'inputs avec actions
   -------------------------------------------------------------------------- */
.input-group-modern {
    position: relative;
    display: flex;
}

    .input-group-modern .form-control-modern {
        flex: 1;
        padding-right: 80px;
    }

.input-group-action {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: none;
    border: none;
    color: #6b7280;
    padding: 0 0.75rem;
    cursor: pointer;
    transition: color 0.2s;
}

    .input-group-action:hover {
        color: #374151;
    }

    .input-group-action:first-of-type {
        right: 40px;
    }

/* --------------------------------------------------------------------------
   Checkbox moderne
   -------------------------------------------------------------------------- */
.form-check-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input-modern {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

    .form-check-input-modern:checked {
        background: #3b82f6;
        border-color: #3b82f6;
    }

.form-check-label-modern {
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Alertes d'information et d'avertissement
   -------------------------------------------------------------------------- */
.form-info-alert {
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
    color: #0369a1;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

    .form-info-alert i {
        font-size: 1.25rem;
        flex-shrink: 0;
    }

.form-warning-alert {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

    .form-warning-alert ul {
        margin: 0.5rem 0 0 0;
        padding-left: 1.5rem;
    }

/* --------------------------------------------------------------------------
   Valeurs statiques (lecture seule)
   -------------------------------------------------------------------------- */
.form-static-value {
    padding: 0.625rem 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #374151;
    min-height: 42px;
    display: flex;
    align-items: center;
}

/* --------------------------------------------------------------------------
   Grille 3 colonnes pour les formulaires
   -------------------------------------------------------------------------- */
.form-grid.three-columns {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .creancier-header-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .creancier-badges {
        justify-content: center;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .user-account-grid {
        grid-template-columns: 1fr;
    }

    .table-pagination {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
/* ==========================================================================
   STYLES COMMUNS MANQUANTS
   ========================================================================== */

/* --------------------------------------------------------------------------
   Content Area Base
   -------------------------------------------------------------------------- */
.content-area {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 64px);
}

@media (max-width: 768px) {
    .content-area {
        padding: 1rem;
    }
}

/* --------------------------------------------------------------------------
   Modern Page Header
   -------------------------------------------------------------------------- */
.modern-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.header-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.header-text {
    display: flex;
    flex-direction: column;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
    font-weight: 400;
}

.header-right {
    display: flex;
    gap: 1rem;
}

/* --------------------------------------------------------------------------
   Modern Buttons
   -------------------------------------------------------------------------- */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 0.5rem;
    min-height: 42px;
}

    .btn-modern:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .btn-modern:not(:disabled):hover {
        transform: translateY(-1px);
    }

.btn-primary-modern {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

    .btn-primary-modern:hover:not(:disabled) {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        box-shadow: 0 4px 6px rgba(59, 130, 246, 0.4);
    }

.btn-secondary-modern {
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

    .btn-secondary-modern:hover:not(:disabled) {
        background: #f9fafb;
        border-color: #9ca3af;
    }

.btn-outline-modern {
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

    .btn-outline-modern:hover:not(:disabled) {
        background: #f9fafb;
        border-color: #9ca3af;
    }

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: #ef4444;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

    .btn-danger:hover:not(:disabled) {
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
        box-shadow: 0 4px 6px rgba(239, 68, 68, 0.4);
    }

.btn-info-modern {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border-color: #0ea5e9;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.3);
}

    .btn-info-modern:hover:not(:disabled) {
        background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
        box-shadow: 0 4px 6px rgba(14, 165, 233, 0.4);
    }

/* --------------------------------------------------------------------------
   Form Error Alert
   -------------------------------------------------------------------------- */
.form-error-alert {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Spinner
   -------------------------------------------------------------------------- */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --------------------------------------------------------------------------
   Fade In Animation
   -------------------------------------------------------------------------- */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------------------------------
   Text Utilities
   -------------------------------------------------------------------------- */
.text-center {
    text-align: center;
}

.text-danger {
    color: #ef4444 !important;
}

.text-muted {
    color: #6b7280 !important;
}

.text-warning {
    color: #f59e0b !important;
}

.fw-medium {
    font-weight: 500;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.me-1 {
    margin-right: 0.25rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.ms-2 {
    margin-left: 0.5rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.display-1 {
    font-size: 4rem !important;
    line-height: 1;
}

.user-account-info {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.user-account-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.user-avatar {
    margin-right: 15px;
}

.avatar-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.password-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.password-value {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-family: monospace;
    flex-grow: 1;
}

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

.detail-item {
    margin-bottom: 15px;
}

    .detail-item label {
        font-weight: 600;
        color: #495057;
        margin-bottom: 5px;
        display: block;
    }

<style >
.password-display {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.password-value {
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    min-width: 100px;
}

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

.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: #28a745;
    color: white;
    border-radius: 4px;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    animation: fadeInOut 3s ease-in-out;
}

@@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    10% {
        opacity: 1;
        transform: translateY(0);
    }

    90% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

</style >
/* Excellia_Grecouv.Client\wwwroot\css\app.css ou site.css */
.dossier-count-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dossier-count-container .badge {
    padding: 0.4em 0.8em;
    font-size: 0.85em;
    font-weight: 500;
}

.badge-creancier-code {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.875em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn-action {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-action:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .btn-action.btn-danger {
        background-color: #dc2626;
        color: white;
    }

        .btn-action.btn-danger:hover:not(:disabled) {
            background-color: #b91c1c;
        }

    .btn-action.btn-secondary {
        background-color: #6b7280;
        color: white;
    }

        .btn-action.btn-secondary:hover:not(:disabled) {
            background-color: #4b5563;
        }
/* ==========================================================================
   STYLES MODERNES POUR LES PAGES DÉBITEURS
   ========================================================================== */

/* --------------------------------------------------------------------------
   VARIABLES & RESET
   -------------------------------------------------------------------------- */
:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #6c757d;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 10px;
    --radius-lg: 12px;
}

.debiteur-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px;
}

/* --------------------------------------------------------------------------
   HEADER
   -------------------------------------------------------------------------- */
.debiteur-header {
    background: white;
    border-radius: var(--radius-lg);
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.4s ease;
}

.debiteur-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.debiteur-header-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    box-shadow: 0 8px 16px rgba(67, 97, 238, 0.3);
}

.debiteur-header-text h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.debiteur-header-text p {
    font-size: 16px;
    color: #6b7280;
    margin: 8px 0 0 0;
    font-weight: 400;
}

.debiteur-header-right {
    display: flex;
    gap: 12px;
}

/* --------------------------------------------------------------------------
   BOUTONS
   -------------------------------------------------------------------------- */
.debiteur-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

    .debiteur-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    .debiteur-btn:active {
        transform: translateY(0);
    }

.debiteur-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

    .debiteur-btn-primary:hover {
        background: linear-gradient(135deg, var(--primary-dark), #2d4bd4);
    }

.debiteur-btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.debiteur-btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.debiteur-btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
}

.debiteur-btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

.debiteur-btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: #4b5563;
}

    .debiteur-btn-outline:hover {
        background: #f9fafb;
        border-color: #d1d5db;
    }

.debiteur-btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   CARTES
   -------------------------------------------------------------------------- */
.debiteur-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 20px;
}

    .debiteur-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
        border-color: #c7d2fe;
    }

.debiteur-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .debiteur-card-header h4 {
        font-size: 18px;
        font-weight: 600;
        color: #374151;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

.debiteur-card-body {
    padding: 24px;
}

/* --------------------------------------------------------------------------
   FORMULAIRES
   -------------------------------------------------------------------------- */
.debiteur-form-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.5s ease;
}

.debiteur-form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f3f4f6;
}

    .debiteur-form-section:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .debiteur-form-section h6 {
        font-size: 16px;
        font-weight: 600;
        color: #4b5563;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--border-color);
        display: flex;
        align-items: center;
        gap: 8px;
    }

.debiteur-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.debiteur-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.debiteur-form-label {
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .debiteur-form-label.required::after {
        content: "*";
        color: var(--danger-color);
        margin-left: 4px;
    }

.debiteur-input,
.debiteur-select,
.debiteur-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: white;
    transition: all 0.3s;
    color: #374151;
    font-family: inherit;
}

    .debiteur-input:focus,
    .debiteur-select:focus,
    .debiteur-textarea:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15);
    }

.debiteur-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    cursor: pointer;
}

.debiteur-textarea {
    resize: vertical;
    min-height: 120px;
}

/* --------------------------------------------------------------------------
   TABLEAU
   -------------------------------------------------------------------------- */
.debiteur-table-container {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.debiteur-table {
    width: 100%;
    border-collapse: collapse;
}

    .debiteur-table thead {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    }

    .debiteur-table th {
        padding: 16px 20px;
        font-size: 13px;
        font-weight: 600;
        color: white;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-align: left;
        border: none;
    }

    .debiteur-table tbody tr {
        border-bottom: 1px solid #f3f4f6;
        transition: all 0.2s;
    }

        .debiteur-table tbody tr:hover {
            background: linear-gradient(90deg, #f0f9ff, #e0f2fe);
        }

    .debiteur-table td {
        padding: 18px 20px;
        font-size: 14px;
        color: #4b5563;
        vertical-align: middle;
    }

/* --------------------------------------------------------------------------
   BADGES
   -------------------------------------------------------------------------- */
.debiteur-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
}

.badge-code {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #3730a3;
    border: 1px solid #a5b4fc;
}

.badge-cin {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.badge-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #10b981;
}

.badge-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #f59e0b;
}

.badge-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* --------------------------------------------------------------------------
   DÉTAILS & INFORMATIONS
   -------------------------------------------------------------------------- */
.debiteur-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.debiteur-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.debiteur-detail-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.debiteur-detail-value {
    font-size: 15px;
    color: #374151;
    font-weight: 500;
    text-align: right;
}

/* --------------------------------------------------------------------------
   STATISTIQUES
   -------------------------------------------------------------------------- */
.debiteur-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.debiteur-stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

    .debiteur-stat-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }

.debiteur-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.debiteur-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.debiteur-stat-label {
    font-size: 14px;
    color: #6b7280;
    margin-top: 6px;
}

/* --------------------------------------------------------------------------
   PAGINATION
   -------------------------------------------------------------------------- */
.debiteur-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.debiteur-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
}

    .debiteur-page-btn:hover:not(:disabled) {
        background: #f3f4f6;
        border-color: #9ca3af;
    }

    .debiteur-page-btn.active {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        color: white;
        border-color: var(--primary-color);
    }

/* --------------------------------------------------------------------------
   MODAL
   -------------------------------------------------------------------------- */
.debiteur-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.debiteur-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.debiteur-modal-header {
    padding: 24px 30px;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-bottom: 1px solid #fecaca;
    color: #991b1b;
}

.debiteur-modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.debiteur-modal-body {
    padding: 30px;
}

.debiteur-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* --------------------------------------------------------------------------
   ÉTATS
   -------------------------------------------------------------------------- */
.debiteur-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    min-height: 300px;
}

.debiteur-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.debiteur-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    background: white;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
}

.debiteur-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #9ca3af;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}

.debiteur-empty-title {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px 0;
}

.debiteur-empty-description {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 24px 0;
    max-width: 400px;
}

/* --------------------------------------------------------------------------
   ANIMATIONS (ajoutez si non présentes)
   -------------------------------------------------------------------------- */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .debiteur-page {
        padding: 15px;
    }

    .debiteur-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 20px;
    }

    .debiteur-header-right {
        width: 100%;
        justify-content: flex-start;
    }

    .debiteur-form-grid {
        grid-template-columns: 1fr;
    }

    .debiteur-form-container {
        padding: 20px;
    }

    .debiteur-stats-grid {
        grid-template-columns: 1fr;
    }

    .debiteur-details-grid {
        grid-template-columns: 1fr;
    }

    .debiteur-table {
        display: block;
        overflow-x: auto;
    }

    .debiteur-pagination {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* --------------------------------------------------------------------------
   AMÉLIORATIONS PAGINATION & TRI
   -------------------------------------------------------------------------- */

/* Style amélioré pour les boutons de pagination */
.debiteur-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    background: white;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    margin: 0 2px;
}

    .debiteur-page-btn:hover:not(:disabled):not(.active) {
        background: #f3f4f6;
        border-color: #9ca3af;
        transform: translateY(-1px);
    }

    .debiteur-page-btn.active {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        color: white;
        border-color: var(--primary-color);
        box-shadow: 0 2px 4px rgba(67, 97, 238, 0.2);
    }

    .debiteur-page-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none !important;
    }

/* Style pour les boutons de tri */
.debiteur-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
}

/* Indicateur de tri dans le tableau */
.debiteur-table th {
    position: relative;
    user-select: none;
}

    .debiteur-table th i {
        transition: transform 0.2s ease;
    }

/* Animation pour les boutons de tri */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.debiteur-btn-sm:active {
    animation: pulse 0.2s ease;
}

/* Style pour les badges de filtre actif */
.debiteur-badge {
    transition: all 0.2s ease;
}

    .debiteur-badge:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

/* Amélioration responsive pour les contrôles */
@media (max-width: 768px) {
    .debiteur-pagination {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .debiteur-page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .debiteur-btn-sm {
        padding: 5px 10px;
        font-size: 12px;
    }

    .debiteur-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Style pour les boutons de contrôle pagination */
.debiteur-page-btn i {
    font-size: 12px;
}

/* Highlight pour les lignes avec dossiers */
.debiteur-table tbody tr:has(.badge-success) {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.02));
}

    .debiteur-table tbody tr:has(.badge-success):hover {
        background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    }

/* Style pour l'en-tête de tri */
.debiteur-table th div {
    cursor: pointer;
    transition: color 0.2s ease;
}

    .debiteur-table th div:hover {
        color: var(--primary-color);
    }
/* ===== STYLES POUR DOSSIERS.PAGES ===== */

/* Container principal */
.content-area-fixed {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--gray-50);
}

/* En-tête de page moderne */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.header-content {
    flex: 1;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    color: var(--gray-500);
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Barre de recherche */
.input-group {
    display: flex;
    align-items: center;
    width: 100%;
}

.input-group-text {
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    border: 1px solid var(--primary-light);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-control.modern-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-left: none;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

    .form-control.modern-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    }

/* Tableau amélioré */
.table-container-controlled {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    background: white;
    box-shadow: var(--shadow-sm);
}

.table-header-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

    .table-header-custom th {
        color: white;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
        padding: 1rem 1.25rem;
        border: none;
        white-space: nowrap;
    }

.table-row-custom {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--gray-100);
}

    .table-row-custom:hover {
        background-color: var(--primary-light);
    }

    .table-row-custom td {
        padding: 1rem 1.25rem;
        vertical-align: middle;
        border-bottom: 1px solid var(--gray-100);
    }

/* Badges et status */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #10b981;
}

.status-inactive {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #ef4444;
}

.situation-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
    color: #1e40af;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #60a5fa;
}

/* Boutons d'action */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn.btn-action {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

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

    .btn.btn-action.btn-info-modern {
        background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
        color: white;
    }

        .btn.btn-action.btn-info-modern:hover {
            background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
        }

    .btn.btn-action.btn-primary-modern {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: white;
    }

        .btn.btn-action.btn-primary-modern:hover {
            background: linear-gradient(135deg, var(--primary-dark) 0%, #2d4bd4 100%);
        }

    .btn.btn-action.btn-danger {
        background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
        color: white;
    }

        .btn.btn-action.btn-danger:hover {
            background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
        }

/* Pagination */
.btn-secondary-modern {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .btn-secondary-modern:hover:not(:disabled) {
        background: var(--gray-100);
        border-color: var(--gray-400);
        transform: translateY(-1px);
    }

    .btn-secondary-modern:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

/* État vide */
.modern-card {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    border: 2px dashed var(--gray-300);
}

    .modern-card .bi-folder-x {
        font-size: 3rem;
        color: var(--gray-400);
        margin-bottom: 1rem;
    }

/* Responsive */
@media (max-width: 768px) {
    .content-area-fixed {
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }

    .header-actions {
        width: 100%;
    }

        .header-actions .btn-modern {
            width: 100%;
        }

    .table-container-controlled {
        border-radius: 8px;
    }

    .table-header-custom th {
        padding: 0.75rem;
        font-size: 0.7rem;
    }

    .table-row-custom td {
        padding: 0.75rem;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

        .action-buttons .btn-action {
            width: 32px;
            height: 32px;
        }
}

.max-width-200 {
    max-width: 300px;
}
/* ===== STYLES POUR DOSSIERS.RAZOR ===== */

/* Container principal */
.content-area-fixed {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: var(--gray-50);
}

/* En-tête de page */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.header-content {
    flex: 1;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    color: var(--gray-500);
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Tableau */
.table-header-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

    .table-header-custom th {
        color: white;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
        padding: 1rem 1.25rem;
        border: none;
        white-space: nowrap;
    }

.table-row-custom {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--gray-100);
}

    .table-row-custom:hover {
        background-color: var(--primary-light);
    }

    .table-row-custom td {
        padding: 1rem 1.25rem;
        vertical-align: middle;
        border-bottom: 1px solid var(--gray-100);
    }

/* Classe pour les cellules avec texte tronqué */
.text-truncate.max-width-200 {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 768px) {
    .content-area-fixed {
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }

    .header-actions {
        width: 100%;
    }

        .header-actions .btn-modern {
            width: 100%;
        }

    .table-header-custom th {
        padding: 0.75rem;
        font-size: 0.7rem;
    }

    .table-row-custom td {
        padding: 0.75rem;
    }
}
/* ===== STYLES SPÉCIFIQUES POUR DOSSIERS ===== */

/* Container principal */
.dossier-container {
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
}

/* Header */
.dossier-header {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.dossier-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.dossier-header-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    box-shadow: 0 8px 16px rgba(67, 97, 238, 0.3);
}

.dossier-header-text h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dossier-header-text p {
    color: #6b7280;
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
}

.dossier-header-right {
    display: flex;
    gap: 1rem;
}

/* Search card */
.dossier-search-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #e6fffa;
    border: 1px solid #81e6d9;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.results-count {
    font-size: 0.875rem;
    color: #2d3748;
    font-weight: 500;
}

/* Stats grid */
.dossier-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Table card */
.dossier-table-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}

.table-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: #f9fafb;
}

.table-title {
    display: flex;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
}

.table-count {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 400;
}

/* Table responsive */
.table-responsive-modern {
    overflow-x: auto;
    max-width: 100%;
}

.modern-table {
    width: 100%;
    min-width: 1200px; /* Largeur minimale pour éviter le compact */
    border-collapse: collapse;
}

    .modern-table thead {
        background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    }

    .modern-table th {
        padding: 1rem 1.25rem;
        font-size: 0.75rem;
        font-weight: 600;
        color: white;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-align: left;
        border: none;
        white-space: nowrap;
    }

    .modern-table tbody tr {
        border-bottom: 1px solid #f3f4f6;
        transition: background-color 0.2s;
    }

        .modern-table tbody tr:hover {
            background-color: #f9fafb;
        }

    .modern-table td {
        padding: 1rem 1.25rem;
        font-size: 0.875rem;
        color: #374151;
        vertical-align: middle;
    }

/* Badges et styles spécifiques */
.badge-code {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #a5b4fc;
    font-family: 'Consolas', monospace;
}

.tier-name {
    max-width: 200px;
}

    .tier-name strong {
        color: #2d3748;
        font-weight: 600;
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.amount {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 0.9rem;
}

.amount-total {
    color: #10b981;
}

.amount-rest {
    color: #f59e0b;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #10b981;
}

.status-inactive {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #ef4444;
}

.situation-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
    color: #1e40af;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #60a5fa;
}

/* Pagination */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.pagination-info {
    font-size: 0.875rem;
    color: #6b7280;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-pagination {
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
}

    .btn-pagination:hover:not(:disabled) {
        background: #f3f4f6;
        border-color: #9ca3af;
    }

    .btn-pagination.active {
        background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
        color: white;
        border-color: #4361ee;
    }

    .btn-pagination:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* Empty state */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    color: #a0aec0;
    background: #f7fafc;
}

.empty-state h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .dossier-container {
        padding: 1rem;
    }

    .dossier-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .dossier-header-left {
        width: 100%;
    }

    .dossier-header-right {
        width: 100%;
        justify-content: flex-start;
    }

    .dossier-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .table-pagination {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .dossier-header-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .dossier-header-text h1 {
        font-size: 1.5rem;
    }
}
/* ===== STYLES POUR DETAILS DOSSIER ===== */

/* Container principal */
.content-area-fixed {
    flex: 1;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
}

/* Barre d'actions sticky améliorée */
.actions-sticky-toolbar-grid {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    border-bottom: 2px solid #e2e8f0;
    padding: 1rem 2rem;
    margin: -2rem -2rem 2rem -2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.actions-sticky-grid-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    max-width: 100%;
}

.grid-title {
    min-width: 200px;
}

.page-title-sticky {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle-sticky {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0.25rem 0 0 0;
}

.grid-buttons {
    display: flex;
    gap: 0.75rem;
}

.grid-spacer {
    min-width: 200px;
}

/* Chargement et erreurs */
.loading-container,
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.error-container {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

/* Layout deux colonnes */
.dual-column-layout-20cm {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.col-card-20cm {
    min-width: 0;
}

@media (max-width: 1200px) {
    .dual-column-layout-20cm {
        grid-template-columns: 1fr;
    }
}

/* Carte moderne améliorée */
.modern-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.card-header-custom {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px 12px 0 0;
}

.card-header-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    display: flex;
    align-items: center;
}

/* Corps de carte compact */
.card-body-compact {
    padding: 1.5rem !important;
    flex: 1;
}

.card-content-controlled {
    max-width: 100%;
    overflow: hidden;
}

/* Grille compacte améliorée */
.compact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.compact-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
    min-height: 55px;
}

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

    .compact-item label {
        font-size: 0.75rem !important;
        font-weight: 600;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin: 0;
    }

    .compact-item span {
        font-size: 0.875rem !important;
        color: #374151;
        font-weight: 500;
    }

/* Informations de suivi */
.tracking-info-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.tracking-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

/* Remarques */
.remarks-compact {
    margin-top: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

    .remarks-compact label {
        font-size: 0.875rem;
        font-weight: 600;
        color: #4b5563;
        margin-bottom: 0.5rem;
        display: block;
    }

    .remarks-compact p {
        color: #6b7280;
        margin: 0;
        font-size: 0.9rem;
        line-height: 1.5;
    }

/* Section financière améliorée */
.financial-summary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.financial-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

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

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

.summary-label {
    font-size: 0.8rem !important;
    font-weight: 500;
    color: #6b7280;
}

.summary-value {
    font-size: 0.85rem !important;
    font-weight: 500;
    color: #374151;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-top: 2px solid #e5e7eb;
    margin-top: 0.5rem;
}

.summary-label-total {
    font-size: 0.85rem !important;
    font-weight: 600;
    color: #1f2937;
}

.summary-value-total {
    font-size: 0.9rem !important;
    font-weight: 700;
    color: #1f2937;
}

/* Tables améliorées */
.section-card-full {
    width: 100%;
    margin-bottom: 1.5rem;
}

.card-body-custom.p-0 {
    overflow: hidden;
}

.table-container-controlled {
    overflow-x: auto;
    max-height: 600px;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
}

/* Tableaux spécifiques */
.table-financial-mini {
    min-width: 1200px;
}

    .table-financial-mini th,
    .table-financial-mini td {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.8rem !important;
        white-space: nowrap;
    }

.table-suivi-dossier {
    font-size: 0.75rem !important;
    min-width: 1800px !important; /* Réduit de 2000px */
}


    .table-suivi-dossier thead th {
        font-size: 0.7rem !important;
        padding: 6px 4px !important;
        height: 40px;
        white-space: normal !important; /* Permet le retour à la ligne */
        word-wrap: break-word;
        line-height: 1.2;
        vertical-align: middle;
        text-align: center;
    }

    .table-suivi-dossier tbody td {
        font-size: 0.7rem !important;
        padding: 6px 4px !important;
        height: 40px;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.2;
        vertical-align: top;
    }
    /* Largeurs spécifiques pour chaque colonne */
    .table-suivi-dossier th:nth-child(1), /* Date Début */
    .table-suivi-dossier td:nth-child(1) {
        width: 55px !important;
        min-width: 55px !important;
        max-width: 55px !important;
    }

    .table-suivi-dossier th:nth-child(2), /* Date Relance */
    .table-suivi-dossier td:nth-child(2) {
        width: 55px !important;
        min-width: 55px !important;
        max-width: 55px !important;
    }

    .table-suivi-dossier th:nth-child(3), /* Date Fin */
    .table-suivi-dossier td:nth-child(3) {
        width: 55px !important;
        min-width: 55px !important;
        max-width: 55px !important;
    }

    .table-suivi-dossier th:nth-child(4), /* Statut */
    .table-suivi-dossier td:nth-child(4),
    .table-suivi-dossier th:nth-child(5), /* Action */
    .table-suivi-dossier td:nth-child(5),
    .table-suivi-dossier th:nth-child(6), /* Sort */
    .table-suivi-dossier td:nth-child(6) {
        width: 70px !important;
        min-width: 70px !important;
        max-width: 70px !important;
    }

    /* Colonne Observation - AGRANDIE */
    .table-suivi-dossier th:nth-child(7), /* Observation */
    .table-suivi-dossier td:nth-child(7) {
        width: 220px !important; /* Augmenté de 180px à 200px */
        min-width: 220px !important;
        max-width: 220px !important;
    }

.observation-cell-fixed {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
}

.table-suivi-dossier th:nth-child(8), /* Charger */
.table-suivi-dossier td:nth-child(8),
.table-suivi-dossier th:nth-child(9), /* Région */
.table-suivi-dossier td:nth-child(9) {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
}

/* Colonnes monétaires */
.table-suivi-dossier th:nth-child(10), /* Règlement CR */
.table-suivi-dossier td:nth-child(10),
.table-suivi-dossier th:nth-child(11), /* Règlement EX */
.table-suivi-dossier td:nth-child(11),
.table-suivi-dossier th:nth-child(12), /* Total Créance */
.table-suivi-dossier td:nth-child(12),
.table-suivi-dossier th:nth-child(13), /* Total Excellia */
.table-suivi-dossier td:nth-child(13),
.table-suivi-dossier th:nth-child(14), /* Reste Créance */
.table-suivi-dossier td:nth-child(14),
.table-suivi-dossier th:nth-child(15), /* Reste Excellia */
.table-suivi-dossier td:nth-child(15),
.table-suivi-dossier th:nth-child(16), /* Total */
.table-suivi-dossier td:nth-child(16),
.table-suivi-dossier th:nth-child(17), /* Reste */
.table-suivi-dossier td:nth-child(17) {
    width: 75px !important;
    min-width: 75px !important;
    max-width: 75px !important;
}

.table-suivi-dossier th:nth-child(18), /* Tier */
.table-suivi-dossier td:nth-child(18) {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
}

.table-suivi-dossier th:nth-child(19), /* Modifié par */
.table-suivi-dossier td:nth-child(19) {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
}

.table-suivi-dossier th:nth-child(20), /* Modifié le */
.table-suivi-dossier td:nth-child(20) {
    width: 85px !important;
    min-width: 85px !important;
    max-width: 85px !important;
}

/* Style pour les cellules observation - AGGRANDI */
.observation-cell-fixed {
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    padding: 4px !important;
}

.observation-content-scroll {
    width: 100% !important;
    height: 60px !important;
    max-height: 60px !important;
    min-height: 60px !important;
    padding: 5px !important;
    font-size: 0.68rem !important;
    line-height: 1.3 !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    background: #f8f9fa !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    white-space: pre-wrap !important;
}

/* Alignement du texte */
.text-end {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

/* Tableau compact - version réduite */
.table-compact-view {
    min-width: 1200px !important; /* Version très compacte */
}

    .table-compact-view thead th {
        font-size: 0.65rem !important;
        padding: 4px 2px !important;
        height: 35px;
    }

    .table-compact-view tbody td {
        font-size: 0.65rem !important;
        padding: 4px 2px !important;
        height: 35px;
    }

/* Version ultra compacte - colonnes groupées */
.table-ultra-compact {
    min-width: 1000px !important;
}

/* Bouton pour basculer entre les vues */
.view-toggle-buttons {
    position: absolute;
    top: 10px;
    right: 15px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.view-toggle-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 4px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .view-toggle-btn.active {
        background: #0d6efd;
        color: white;
        border-color: #0d6efd;
    }

    .view-toggle-btn:hover:not(.active) {
        background: #e9ecef;
    }

/* Tooltips pour texte tronqué */
.controlled-cell[title]:hover::after {
    content: attr(title);
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    z-index: 1000;
    white-space: normal;
    max-width: 300px;
    word-wrap: break-word;
}

/* Pour le responsive - afficher une version mobile */
@media (max-width: 1400px) {
    .table-suivi-dossier {
        min-width: 1500px !important;
        font-size: 0.7rem !important;
    }

    .observation-cell-fixed {
        width: 220px !important;
        min-width: 220px !important;
        max-width: 220px !important;
    }
}

/* Mobile view - version alternative */
@media (max-width: 768px) {
    .table-suivi-dossier {
        display: none; /* Cacher le tableau sur mobile */
    }

    .mobile-suivi-view {
        display: block;
    }
}

/* Style pour la version mobile alternative */
.mobile-suivi-view {
    display: none;
}

.mobile-suivi-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.mobile-suivi-header {
    background: #f8f9fa;
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-suivi-body {
    padding: 12px;
}

.mobile-suivi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 0.8rem;
}

.mobile-suivi-item {
    display: flex;
    flex-direction: column;
}

.mobile-suivi-label {
    font-size: 0.7rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 2px;
}

.mobile-suivi-value {
    color: #495057;
    font-size: 0.8rem;
    word-break: break-word;
}

.mobile-suivi-observation {
    grid-column: 1 / -1;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #dee2e6;
}

.controlled-cell {
    max-width: 150px;
    min-width: 70px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cellule observation améliorée */
.observation-cell-fixed {
    width: 250px !important;
    max-width: 250px !important;
    min-width: 250px !important;
    padding: 0.25rem !important;
}

.observation-content-scroll {
    width: 100% !important;
    height: 70px !important;
    max-height: 70px !important;
    padding: 0.5rem !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 4px !important;
    background: #f9fafb !important;
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
    white-space: pre-wrap !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Responsive */
@media (max-width: 768px) {
    .content-area-fixed {
        padding: 1rem;
    }

    .actions-sticky-toolbar-grid {
        margin: -1rem -1rem 1.5rem -1rem;
        padding: 1rem;
    }

    .actions-sticky-grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    .grid-title,
    .grid-buttons,
    .grid-spacer {
        width: 100%;
    }

        .grid-buttons .buttons-container {
            flex-direction: column;
            gap: 0.5rem;
        }

    .buttons-container .btn-modern {
        width: 100%;
        max-width: none;
    }

    .compact-grid {
        grid-template-columns: 1fr;
    }

    .observation-cell-fixed {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
    }
}
/* ===== STYLES POUR MODIFIER DOSSIER ===== */

/* Container principal */
.modifier-dossier-container {
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
}

/* En-tête amélioré */
.modifier-dossier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}

    .modifier-dossier-header h1 {
        font-size: 2rem;
        font-weight: 700;
        color: #1f2937;
        margin: 0;
        background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .modifier-dossier-header p {
        color: #6b7280;
        margin: 0.5rem 0 0 0;
        font-size: 1rem;
    }

/* Container moderne */
.modern-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .modern-cards-container {
        grid-template-columns: 1fr;
    }
}

/* Carte améliorée */
.modern-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    .modern-card:hover {
        box-shadow: var(--shadow-lg);
        border-color: #c7d2fe;
    }

.modern-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bg-info-subtle {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.bg-success-subtle {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.bg-danger-subtle {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.modern-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    display: flex;
    align-items: center;
}

.modern-card-badge {
    background: #6b7280;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.modern-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Formulaire moderne */
.modern-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .modern-form-row {
        grid-template-columns: 1fr;
    }
}

.modern-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modern-form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    display: flex;
    align-items: center;
    margin: 0;
}

/* Inputs modernes */
.modern-input {
    padding: 0.625rem 0.875rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #374151;
    background: white;
    transition: all 0.2s;
    width: 100%;
}

    .modern-input:focus {
        outline: none;
        border-color: #4361ee;
        box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    }

    .modern-input.date {
        font-size: 0.85rem;
    }

.modern-input-readonly {
    padding: 0.625rem 0.875rem;
    background: #f9fafb;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.modern-select {
    padding: 0.625rem 0.875rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #374151;
    background: white;
    width: 100%;
    cursor: pointer;
}

    .modern-select:focus {
        outline: none;
        border-color: #4361ee;
        box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    }

/* Badges modernes */
.modern-badge-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .modern-badge-status.active {
        background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
        color: #065f46;
        border: 1px solid #10b981;
    }

    .modern-badge-status.inactive {
        background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
        color: #991b1b;
        border: 1px solid #ef4444;
    }

    .modern-badge-status.success {
        background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
        color: #065f46;
        border: 1px solid #10b981;
    }

    .modern-badge-status.danger {
        background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
        color: #991b1b;
        border: 1px solid #ef4444;
    }

/* Compteur */
.modern-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    color: #0369a1;
    font-weight: 600;
}

.counter-value {
    font-size: 1rem;
}

/* Sections */
.modern-section {
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modern-section-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    display: flex;
    align-items: center;
    margin: 0;
}

/* Timeline moderne */
.modern-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modern-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.timeline-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-date {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.125rem;
}

.timeline-text {
    font-size: 0.825rem;
    color: #374151;
}

/* Section financière */
.modern-financial-section {
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

    .modern-financial-section:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

.modern-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4b5563;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
}

    .modern-section-title.success {
        color: #059669;
    }

/* Grille financière */
.modern-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .modern-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Groupes d'argent */
.modern-money-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.modern-money-input {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    overflow: hidden;
    transition: all 0.2s;
}

    .modern-money-input.editable {
        border-color: #60a5fa;
        background: #f0f9ff;
    }

    .modern-money-input.readonly {
        background: #f9fafb;
        border-color: #e5e7eb;
    }

    .modern-money-input .modern-input {
        flex: 1;
        border: none;
        border-radius: 0;
        background: transparent;
    }

    .modern-money-input .currency {
        padding: 0 0.875rem;
        background: #f3f4f6;
        color: #6b7280;
        font-size: 0.75rem;
        font-weight: 600;
        border-left: 2px solid #e5e7eb;
        height: 100%;
        display: flex;
        align-items: center;
    }

/* Boîtes de total */
.modern-total-box,
.modern-reglement-box,
.modern-reste-box,
.modern-synth-box {
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

    .modern-total-box.success {
        background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
        border: 1px solid #86efac;
    }

    .modern-total-box.info {
        background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
        border: 1px solid #93c5fd;
    }

.modern-reglement-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
}

.modern-reste-box.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fcd34d;
}

.modern-synth-box.primary {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
}

.modern-synth-box.danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
}

.modern-money-total {
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    background: white;
    overflow: hidden;
}

    .modern-money-total .modern-input {
        flex: 1;
        border: none;
        background: transparent;
        font-weight: 600;
        color: #374151;
        padding: 0.5rem;
    }

    .modern-money-total .currency {
        padding: 0 0.75rem;
        background: transparent;
        color: #6b7280;
        font-size: 0.75rem;
        font-weight: 600;
        border-left: 1px solid #e5e7eb;
    }

/* Progression */
.modern-progress {
    margin-top: 1rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.progress-label {
    color: #6b7280;
    font-weight: 500;
}

.progress-percent {
    color: #059669;
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Bouton principal */
.modern-btn {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

    .modern-btn:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(67, 97, 238, 0.3);
    }

    .modern-btn:active {
        transform: translateY(0);
    }

.modern-action {
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Bouton d'avertissement */
.btn-warning-modern {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(237, 137, 54, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn-warning-modern:hover:not(:disabled) {
        background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(237, 137, 54, 0.4);
    }

    .btn-warning-modern:disabled {
        background: #e5e7eb;
        color: #9ca3af;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

/* Animation recalcul */
.recalcul-animation {
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0% {
        background-color: #fff;
    }

    50% {
        background-color: #fef3c7;
    }

    100% {
        background-color: #fff;
    }
}

/* Tableaux dans modifier */
.table-enhanced {
    font-size: 0.85rem;
}

    .table-enhanced th {
        background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
        color: white;
        font-size: 0.8rem;
        font-weight: 600;
        padding: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .table-enhanced td {
        padding: 0.75rem;
        vertical-align: middle;
    }

.highlight-new {
    background: linear-gradient(90deg, #f0f9ff, #e0f2fe) !important;
}

.row-locked {
    opacity: 0.7;
    background: #f9fafb !important;
}

    .row-locked td {
        background: transparent !important;
    }

/* Zone observation scroll */
.observation-scroll {
    width: 200px;
    height: 60px;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    font-size: 0.8rem;
    line-height: 1.4;
    overflow-y: auto;
    word-break: break-word;
    resize: none;
}

    .observation-scroll::-webkit-scrollbar {
        width: 6px;
    }

    .observation-scroll::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .observation-scroll::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }

        .observation-scroll::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

/* Actions alignées */
.actions-aligned {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
}

/* Popups améliorés */
.wide-popup {
    max-width: 900px !important;
}

.popup-form-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.popup-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .popup-form-row {
        grid-template-columns: 1fr;
    }
}

.popup-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.popup-form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    margin: 0;
}

    .popup-form-label.required::after {
        content: "*";
        color: #ef4444;
        margin-left: 0.25rem;
    }

.popup-form-control {
    padding: 0.625rem 0.875rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #374151;
    background: white;
    width: 100%;
}

    .popup-form-control:focus {
        outline: none;
        border-color: #4361ee;
        box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    }

.popup-amount-input {
    text-align: right;
    font-family: 'Courier New', monospace;
}

.popup-help-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

.popup-form-full {
    grid-column: 1 / -1;
}

.popup-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* Switch moderne */
.popup-switch-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.popup-switch {
    position: relative;
    width: 60px;
    height: 30px;
    appearance: none;
    background: #e5e7eb;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .popup-switch:checked {
        background: #10b981;
    }

    .popup-switch::before {
        content: "";
        position: absolute;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: white;
        top: 2px;
        left: 2px;
        transition: all 0.3s ease;
    }

    .popup-switch:checked::before {
        left: calc(100% - 28px);
    }

.popup-switch-label {
    font-size: 0.875rem;
    color: #4b5563;
    cursor: pointer;
}

.popup-switch-text {
    font-weight: 500;
}

/* Résumé financier */
.financial-summary-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
}

.financial-summary-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.financial-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.financial-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.financial-label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.financial-value {
    font-size: 0.85rem;
    color: #374151;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.monetary-field-warning {
    color: #d97706 !important;
}

/* Messages d'information */
.info-message {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

    .info-message.info {
        background: #f0f9ff;
        border: 1px solid #e0f2fe;
        color: #0369a1;
    }

    .info-message.warning {
        background: #fef3c7;
        border: 1px solid #fde68a;
        color: #92400e;
    }

/* Alertes */
.alert-modern {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

    .alert-modern.alert-success {
        background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
        color: #065f46;
        border: 1px solid #10b981;
    }

    .alert-modern.alert-warning {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        color: #92400e;
        border: 1px solid #f59e0b;
    }

/* Responsive */
@media (max-width: 768px) {
    .modifier-dossier-container {
        padding: 1rem;
    }

    .modifier-dossier-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .actions-aligned {
        justify-content: center;
    }

        .actions-aligned .btn-modern {
            width: 100%;
        }

    .table-container {
        overflow-x: auto;
    }

    .financial-summary-grid {
        grid-template-columns: 1fr;
    }
}
/* ===== STYLES AMÉLIORÉS POUR DÉTAILS FINANCIERS ===== */

/* En-tête amélioré */
.details-financiers-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 12px 12px 0 0;
    padding: 1.5rem 1.75rem;
    color: white;
    margin-bottom: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.title-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.title-text {
    flex: 1;
}

.details-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.details-subtitle {
    color: #bdc3c7;
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.details-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .details-badge.primary {
        background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
        color: white;
        box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
    }

.warning-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(243, 156, 18, 0.3);
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .btn-action:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    .btn-action:active {
        transform: translateY(0);
    }

.btn-recalculate {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
    color: white;
}

    .btn-recalculate:hover:not(:disabled) {
        background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    }

.btn-add {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

    .btn-add:hover:not(:disabled) {
        background: linear-gradient(135deg, #27ae60 0%, #219653 100%);
    }

.btn-action i {
    font-size: 1rem;
}

/* Conteneur de table */
.details-financiers-table-container {
    background: white;
    border-radius: 0 0 12px 12px;
    border: 1px solid #e0e0e0;
    border-top: none;
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
    max-height: 600px;
}

/* Table améliorée */
.details-financiers-table {
    width: 100%;
    min-width: 1400px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
}

    .details-financiers-table thead {
        position: sticky;
        top: 0;
        z-index: 10;
    }

        .details-financiers-table thead tr {
            background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
        }

        .details-financiers-table thead th {
            padding: 0.875rem 0.75rem;
            color: white;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-size: 0.8rem;
            border-bottom: 3px solid #3498db;
            position: relative;
            white-space: nowrap;
        }

            .details-financiers-table thead th .th-content {
                display: flex;
                align-items: center;
                gap: 0.5rem;
                justify-content: inherit;
            }

            .details-financiers-table thead th i {
                font-size: 0.9rem;
                color: #3498db;
            }

    .details-financiers-table tbody tr {
        transition: background-color 0.2s ease;
        border-bottom: 1px solid #f1f1f1;
    }

        .details-financiers-table tbody tr:hover {
            background-color: #f8f9fa;
        }

        .details-financiers-table tbody tr.new-row {
            background: linear-gradient(90deg, #f8f9fa, #e3f2fd) !important;
            border-left: 4px solid #2196f3;
        }

            .details-financiers-table tbody tr.new-row:hover {
                background: linear-gradient(90deg, #e3f2fd, #bbdefb) !important;
            }

        .details-financiers-table tbody tr.locked-row {
            background: linear-gradient(90deg, #f5f5f5, #eeeeee) !important;
            opacity: 0.85;
        }

            .details-financiers-table tbody tr.locked-row:hover {
                background: linear-gradient(90deg, #eeeeee, #e0e0e0) !important;
            }

        .details-financiers-table tbody tr.editable-row:hover {
            background: linear-gradient(90deg, #e8f5e8, #d4edda) !important;
        }

    .details-financiers-table tbody td {
        padding: 0.75rem 0.5rem;
        vertical-align: middle;
        border-bottom: 1px solid #f0f0f0;
    }

/* Contenu des cellules */
.cell-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 50px;
    justify-content: center;
}

.select-wrapper {
    position: relative;
}

.form-select-sm {
    padding: 0.375rem 1.75rem 0.375rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 6px;
    width: 100%;
    min-height: 34px;
    border: 2px solid #e0e0e0;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .form-select-sm.editable-select {
        border-color: #b3e5fc;
        background: linear-gradient(135deg, #f8fdff, #e1f5fe);
    }

        .form-select-sm.editable-select:focus {
            border-color: #4fc3f7;
            box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.2);
            outline: none;
        }

    .form-select-sm.readonly-select {
        border-color: #e0e0e0;
        background: #f8f9fa;
        color: #757575;
        cursor: not-allowed;
    }

.form-control-sm {
    padding: 0.375rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    width: 100%;
    transition: all 0.2s ease;
}

    .form-control-sm.editable-input {
        border-color: #b3e5fc;
        background: linear-gradient(135deg, #f8fdff, #e1f5fe);
    }

        .form-control-sm.editable-input:focus {
            border-color: #4fc3f7;
            box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.2);
            outline: none;
        }

        .form-control-sm.editable-input.amount-input {
            text-align: right;
            font-family: 'Courier New', monospace;
            font-weight: 500;
        }

    .form-control-sm.readonly-input {
        border-color: #e0e0e0;
        background: #f8f9fa;
        color: #757575;
        cursor: not-allowed;
    }

    .form-control-sm.date-input {
        font-family: 'Segoe UI', sans-serif;
        min-height: 34px;
    }

.input-group.input-group-sm {
    border-radius: 6px;
    overflow: hidden;
}

    .input-group.input-group-sm .form-control-sm {
        border-right: none;
        border-radius: 6px 0 0 6px;
    }

    .input-group.input-group-sm .currency {
        background: #f8f9fa;
        color: #757575;
        font-weight: 600;
        font-size: 0.8rem;
        border: 2px solid #e0e0e0;
        border-left: none;
        border-radius: 0 6px 6px 0;
        padding: 0.375rem 0.5rem;
    }

/* Champs en lecture seule */
.readonly-field {
    padding: 0.375rem 0.5rem;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    color: #757575;
    font-size: 0.85rem;
    text-align: inherit;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: inherit;
}

    .readonly-field.days-field {
        font-weight: 600;
        color: #2196f3;
        font-family: 'Courier New', monospace;
    }

    .readonly-field.rate-field {
        font-weight: 600;
        color: #f39c12;
        font-family: 'Courier New', monospace;
    }

    .readonly-field.interest-field {
        font-weight: 600;
        color: #e74c3c;
        font-family: 'Courier New', monospace;
    }

/* Statut de cellule */
.cell-status {
    margin-top: 0.25rem;
}

.status-locked {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: #f5f5f5;
    color: #757575;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

    .status-locked i {
        font-size: 0.7rem;
    }

/* Boutons d'action dans la table */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
}

.btn-action.btn-delete {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-action.btn-delete:hover:not(:disabled) {
        background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
        transform: scale(1.1);
    }

.btn-action.btn-locked {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    background: #bdc3c7;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Champs spéciaux */
.remark-input {
    font-size: 0.8rem;
    min-height: 34px;
}

/* États visuels */
.highlight-new {
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0% {
        background-color: #fff;
    }

    50% {
        background-color: #e8f5e8;
    }

    100% {
        background-color: #fff;
    }
}

/* Responsive */
@media (max-width: 1400px) {
    .details-financiers-table {
        min-width: 1200px;
        font-size: 0.8rem;
    }

        .details-financiers-table th,
        .details-financiers-table td {
            padding: 0.5rem 0.25rem;
        }
}

@media (max-width: 768px) {
    .details-financiers-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .title-section {
        flex-direction: column;
        text-align: center;
    }

    .title-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .details-title {
        font-size: 1.25rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .details-subtitle {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .header-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .btn-action {
        flex: 1;
        min-width: 150px;
        justify-content: center;
    }

    .table-wrapper {
        max-height: 500px;
    }

    .details-financiers-table {
        min-width: 1000px;
        font-size: 0.75rem;
    }
}

/* Scrollbar personnalisée */
.table-wrapper::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

    .table-wrapper::-webkit-scrollbar-thumb:hover {
        background: #95a5a6;
    }

.empty-details-state {
    padding: 3rem 2rem;
    text-align: center;
    background: white;
    border-radius: 0 0 12px 12px;
    border: 1px solid #e0e0e0;
    border-top: none;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #adb5bd;
}

.empty-content h4 {
    color: #495057;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.empty-content p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}
/* ===== STYLES AMÉLIORÉS POUR HISTORIQUE DES SUIVIS ===== */

/* En-tête */
.suivis-history-header {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    border-radius: 12px 12px 0 0;
    padding: 1.5rem 1.75rem;
    color: white;
    margin-bottom: 0;
}

.suivis-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.suivis-subtitle {
    color: #d7bde2;
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.suivis-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .suivis-badge.primary {
        background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
        color: white;
        box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
    }

.last-update {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.btn-add-suivi {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

    .btn-add-suivi:hover:not(:disabled) {
        background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    }

/* Table container */
.suivis-history-table-container {
    background: white;
    border-radius: 0 0 12px 12px;
    border: 1px solid #e0e0e0;
    border-top: none;
    overflow: hidden;
}

/* Table améliorée */
.suivis-history-table {
    width: 100%;
    min-width: 2500px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.8rem;
}

    .suivis-history-table thead {
        position: sticky;
        top: 0;
        z-index: 10;
    }

        .suivis-history-table thead tr {
            background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
        }

        .suivis-history-table thead th {
            padding: 0.75rem 0.5rem;
            color: white;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-size: 0.75rem;
            border-bottom: 3px solid #e74c3c;
            position: relative;
            white-space: nowrap;
        }

            .suivis-history-table thead th .th-content {
                display: flex;
                align-items: center;
                gap: 0.5rem;
                justify-content: inherit;
            }

            .suivis-history-table thead th i {
                font-size: 0.85rem;
            }

    .suivis-history-table tbody tr {
        transition: background-color 0.2s ease;
        border-bottom: 1px solid #f1f1f1;
    }

        .suivis-history-table tbody tr:hover {
            background-color: #f8f9fa !important;
        }

        .suivis-history-table tbody tr.last-suivi-row {
            background: linear-gradient(90deg, #f9f9f9, #f0f8ff) !important;
            border-left: 4px solid #3498db;
        }

            .suivis-history-table tbody tr.last-suivi-row:hover {
                background: linear-gradient(90deg, #f0f8ff, #e3f2fd) !important;
            }

    .suivis-history-table tbody td {
        padding: 0.625rem 0.5rem;
        vertical-align: middle;
        border-bottom: 1px solid #f0f0f0;
    }

/* Cell content */
.cell-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 45px;
    justify-content: center;
}

.date-value {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    color: #2c3e50;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .status-badge.status-active {
        background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
        color: #065f46;
        border: 1px solid #10b981;
    }

    .status-badge.status-inactive {
        background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
        color: #991b1b;
        border: 1px solid #ef4444;
    }

.action-value,
.sort-value,
.charge-value,
.region-value,
.tier-value,
.modified-by {
    font-size: 0.8rem;
    font-weight: 500;
    color: #34495e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.modified-date {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #7f8c8d;
}

/* Monetary values */
.monetary-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.reglement-cr {
    color: #27ae60;
}

.reglement-ex {
    color: #3498db;
}

.charge {
    color: #e74c3c;
}

.total-creance {
    color: #2c3e50;
}

.total-excellia {
    color: #2980b9;
}

.reste-creance,
.reste-excellia {
    color: #f39c12;
}

.total {
    color: #9b59b6;
}

.reste-total {
    color: #e74c3c;
}

/* Observation */
.observation-scroll {
    width: 240px;
    height: 60px;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f9f9f9;
    font-size: 0.75rem;
    line-height: 1.4;
    overflow-y: auto;
    word-break: break-word;
    resize: none;
    text-align: left;
}

    .observation-scroll::-webkit-scrollbar {
        width: 6px;
    }

    .observation-scroll::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .observation-scroll::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }

        .observation-scroll::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

    .btn-view:hover:not(:disabled) {
        background: linear-gradient(135deg, #2980b9 0%, #1f618d 100%);
        transform: scale(1.1);
    }

.btn-edit {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

    .btn-edit:hover:not(:disabled) {
        background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
        transform: scale(1.1);
    }

.btn-locked {
    background: #bdc3c7;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 1400px) {
    .suivis-history-table {
        min-width: 2000px;
        font-size: 0.75rem;
    }

        .suivis-history-table th,
        .suivis-history-table td {
            padding: 0.5rem 0.25rem;
        }

    .observation-scroll {
        width: 200px;
        height: 50px;
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    .suivis-history-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .title-section {
        flex-direction: column;
        text-align: center;
    }

    .suivis-title {
        font-size: 1.25rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .suivis-subtitle {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .table-wrapper {
        max-height: 500px;
    }

    .suivis-history-table {
        min-width: 1800px;
        font-size: 0.7rem;
    }

    .observation-scroll {
        width: 150px;
        height: 40px;
    }
}
/* ===== AGRANDISSEMENT GLOBAL DES TABLES ===== */

/* Container principal élargi */
.modifier-dossier-container {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
    max-width: 100%;
    overflow-x: auto;
}

/* Élargir les sections de tableau */
.table-wrapper {
    overflow-x: auto;
    max-height: none !important;
    width: 100%;
}

/* Élargir les tables */
.details-financiers-table,
.suivis-history-table {
    width: 100%;
    font-size: 0.85rem;
}

    /* Ajuster les largeurs de colonnes */
    .details-financiers-table th,
    .details-financiers-table td {
        min-width: 100px;
        max-width: 200px;
        white-space: normal !important;
        word-wrap: break-word;
    }

    .suivis-history-table th,
    .suivis-history-table td {
        min-width: 80px;
        max-width: 150px;
        white-space: normal !important;
        word-wrap: break-word;
    }

/* Meilleure visibilité des champs */
.editable-input,
.editable-select {
    font-size: 0.9rem !important;
    padding: 0.5rem !important;
    min-height: 38px !important;
}

.readonly-input,
.readonly-select {
    font-size: 0.9rem !important;
    padding: 0.5rem !important;
    min-height: 38px !important;
}

/* Agrandir les zones de texte */
.remark-input {
    min-height: 60px !important;
    font-size: 0.85rem;
}

/* Agrandir les boutons */
.btn-action {
    min-height: 36px;
    min-width: 36px;
    font-size: 0.9rem;
}

/* Améliorer la lisibilité des montants */
.monetary-value {
    font-size: 0.9rem !important;
    font-weight: 600;
    padding: 0.25rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.02);
}

/* Scrollbar plus visible */
.table-wrapper::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #95a5a6;
    border-radius: 6px;
}

    .table-wrapper::-webkit-scrollbar-thumb:hover {
        background: #7f8c8d;
    }

/* Sur très grands écrans */
@media (min-width: 1920px) {
    .modifier-dossier-container {
        padding: 2rem 3rem;
    }

    .details-financiers-table,
    .suivis-history-table {
        font-size: 0.9rem;
    }

        .details-financiers-table th,
        .details-financiers-table td {
            min-width: 120px;
            max-width: 250px;
            padding: 0.75rem !important;
        }

        .suivis-history-table th,
        .suivis-history-table td {
            min-width: 100px;
            max-width: 180px;
            padding: 0.75rem !important;
        }

    .observation-scroll {
        width: 280px;
        height: 70px;
        font-size: 0.8rem;
    }
}

.empty-suivis-state {
    padding: 3rem 2rem;
    text-align: center;
    background: white;
    border-radius: 0 0 12px 12px;
    border: 1px solid #e0e0e0;
    border-top: none;
}

    .empty-suivis-state .empty-icon {
        background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
        color: #8e44ad;
    }
/*****************************************************************************************************/
/* Styles pour les popups (hors du container) */
.modern-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1050 !important;
    backdrop-filter: blur(3px) !important;
}

.modern-popup-container {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    max-width: 90% !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
}

    .modern-popup-container.wide-popup {
        width: 900px !important;
        max-width: 90vw !important;
    }

.modern-popup-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1.5rem 1.5rem 1rem 1.5rem !important;
    border-bottom: 1px solid #e9ecef !important;
}

.modern-popup-title {
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
}

.modern-popup-close {
    background: none !important;
    border: none !important;
    font-size: 1.5rem !important;
    color: #6c757d !important;
    cursor: pointer !important;
    padding: 0.25rem !important;
    line-height: 1 !important;
}

    .modern-popup-close:hover {
        color: #dc3545 !important;
    }

.modern-popup-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 1.5rem !important;
}

.modern-popup-footer {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 1rem !important;
    padding: 1rem 1.5rem !important;
    border-top: 1px solid #e9ecef !important;
    background: #f8f9fa !important;
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
}

/* Styles pour les détails du suivi dans les popups */
.suivi-details-container {
    max-height: 70vh !important;
    overflow-y: auto !important;
    padding-right: 10px !important;
}

.suivi-details-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
}

.suivi-details-section {
    background: #f8f9fa !important;
    border-radius: 8px !important;
    padding: 1.25rem !important;
    border: 1px solid #e9ecef !important;
}

.suivi-section-title {
    color: #2c3e50 !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 2px solid #3498db !important;
}

.suivi-details-grid-2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
}

.suivi-detail-item {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
}

.suivi-label {
    font-size: 0.875rem !important;
    color: #6c757d !important;
    font-weight: 500 !important;
}

.suivi-value {
    font-size: 1rem !important;
    color: #212529 !important;
    font-weight: 500 !important;
    word-break: break-word !important;
}

.monetary-value {
    font-family: 'Courier New', monospace !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
}

.suivi-observation {
    background: white !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    padding: 1rem !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    color: #495057 !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    white-space: pre-wrap !important;
}

.suivi-totals-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
}

.suivi-total-item {
    background: white !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    border: 2px solid !important;
    text-align: center !important;
}

    .suivi-total-item.primary {
        border-color: #3498db !important;
        background-color: rgba(52, 152, 219, 0.1) !important;
    }

    .suivi-total-item.warning {
        border-color: #f39c12 !important;
        background-color: rgba(243, 156, 18, 0.1) !important;
    }

.suivi-total-label {
    display: block !important;
    font-size: 0.875rem !important;
    color: #6c757d !important;
    margin-bottom: 0.5rem !important;
}

.suivi-total-value {
    display: block !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
}

/* Scrollbar pour l'observation */
.suivi-observation::-webkit-scrollbar {
    width: 6px !important;
}

.suivi-observation::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 3px !important;
}

.suivi-observation::-webkit-scrollbar-thumb {
    background: #c1c1c1 !important;
    border-radius: 3px !important;
}

    .suivi-observation::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8 !important;
    }
/* =========================== */
/* CORRECTION : Styles pour le popup de détails suivi */
/* =========================== */

/* 1. Styles de base pour le popup */
.modern-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1050 !important;
    backdrop-filter: blur(3px) !important;
}

.modern-popup-container {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    max-width: 90% !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
}

    .modern-popup-container.wide-popup {
        width: 900px !important;
        max-width: 90vw !important;
    }

.modern-popup-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1.5rem 1.5rem 1rem 1.5rem !important;
    border-bottom: 1px solid #e9ecef !important;
}

.modern-popup-title {
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
}

.modern-popup-close {
    background: none !important;
    border: none !important;
    font-size: 1.5rem !important;
    color: #6c757d !important;
    cursor: pointer !important;
    padding: 0.25rem !important;
    line-height: 1 !important;
}

    .modern-popup-close:hover {
        color: #dc3545 !important;
    }

.modern-popup-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 1.5rem !important;
}

.modern-popup-footer {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 1rem !important;
    padding: 1rem 1.5rem !important;
    border-top: 1px solid #e9ecef !important;
    background: #f8f9fa !important;
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
}

/* 2. Styles pour les détails du suivi DANS LE POPUP UNIQUEMENT */
.modern-popup-overlay .suivi-details-container {
    max-height: 70vh !important;
    overflow-y: auto !important;
    padding-right: 10px !important;
}

.modern-popup-overlay .suivi-details-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
}

.modern-popup-overlay .suivi-details-section {
    background: #f8f9fa !important;
    border-radius: 8px !important;
    padding: 1.25rem !important;
    border: 1px solid #e9ecef !important;
}

.modern-popup-overlay .suivi-section-title {
    color: #2c3e50 !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 2px solid #3498db !important;
}

.modern-popup-overlay .suivi-details-grid-2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
}

.modern-popup-overlay .suivi-detail-item {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
}

.modern-popup-overlay .suivi-label {
    font-size: 0.875rem !important;
    color: #6c757d !important;
    font-weight: 500 !important;
}

.modern-popup-overlay .suivi-value {
    font-size: 1rem !important;
    color: #212529 !important;
    font-weight: 500 !important;
    word-break: break-word !important;
}

    /* 3. Style POUR LES MONETARY-VALUE DANS LE POPUP UNIQUEMENT */
    .modern-popup-overlay .suivi-value.monetary-value {
        font-family: 'Courier New', monospace !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
    }

/* 4. RÉINITIALISATION des monetary-value dans le tableau des suivis (hors popup) */
.modifier-dossier-container .suivis-history-table .monetary-value {
    font-family: inherit !important;
    font-weight: normal !important;
    color: inherit !important;
}

.modern-popup-overlay .suivi-observation {
    background: white !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    padding: 1rem !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    color: #495057 !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    white-space: pre-wrap !important;
}

.modern-popup-overlay .suivi-totals-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
}

.modern-popup-overlay .suivi-total-item {
    background: white !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    border: 2px solid !important;
    text-align: center !important;
}

    .modern-popup-overlay .suivi-total-item.primary {
        border-color: #3498db !important;
        background-color: rgba(52, 152, 219, 0.1) !important;
    }

    .modern-popup-overlay .suivi-total-item.warning {
        border-color: #f39c12 !important;
        background-color: rgba(243, 156, 18, 0.1) !important;
    }

.modern-popup-overlay .suivi-total-label {
    display: block !important;
    font-size: 0.875rem !important;
    color: #6c757d !important;
    margin-bottom: 0.5rem !important;
}

.modern-popup-overlay .suivi-total-value {
    display: block !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
}

/* Scrollbar pour l'observation */
.modern-popup-overlay .suivi-observation::-webkit-scrollbar {
    width: 6px !important;
}

.modern-popup-overlay .suivi-observation::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 3px !important;
}

.modern-popup-overlay .suivi-observation::-webkit-scrollbar-thumb {
    background: #c1c1c1 !important;
    border-radius: 3px !important;
}

    .modern-popup-overlay .suivi-observation::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8 !important;
    }

/* ==================== */
/* STYLES POUR DETAILSDOSSIER.razor */
/* ==================== */

/* Container principal amélioré */
.details-dossier-container {
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
}

/* Barre d'actions améliorée */
.actions-sticky-toolbar-grid {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    position: sticky;
    top: 10px;
    z-index: 1000;
}

.actions-sticky-grid-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.grid-title {
    min-width: 250px;
}

.page-title-sticky {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

.page-subtitle-sticky {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    margin: 4px 0 0 0;
}

.grid-buttons .buttons-container {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
}

/* Layout principal amélioré */
.dual-column-layout-20cm {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.col-card-20cm {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eef2f7;
}

    .col-card-20cm:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    }

/* En-tête de carte améliorée */
.card-header-custom {
    background: linear-gradient(90deg, #667eea, #764ba2);
    padding: 18px 24px;
    color: white;
    position: relative;
    overflow: hidden;
}

    .card-header-custom::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #4ade80, #3b82f6);
    }

.card-header-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Corps de carte compact amélioré */
.card-body-compact {
    padding: 24px;
}

.compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.compact-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .compact-item label {
        font-size: 0.75rem;
        color: #64748b;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .compact-item span {
        font-size: 0.9rem;
        color: #1e293b;
        font-weight: 500;
        line-height: 1.4;
    }

/* Badges améliorés */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.status-inactive {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.situation-badge {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Section informations de suivi améliorée */
.tracking-info-section {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
    border-left: 4px solid #3b82f6;
}

.tracking-section-title {
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Section remarques améliorée */
.remarks-compact {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    position: relative;
}

    .remarks-compact label {
        color: #ea580c;
        font-weight: 600;
        font-size: 0.875rem;
        margin-bottom: 8px;
        display: block;
    }

    .remarks-compact p {
        color: #431407;
        font-size: 0.85rem;
        line-height: 1.5;
        margin: 0;
    }

    .remarks-compact::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg, #f97316, #ea580c);
        border-radius: 4px 0 0 4px;
    }

/* Section financière améliorée */
.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.summary-label {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
}

.summary-value {
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 8px 0;
}

.summary-label-total {
    color: #334155;
    font-size: 0.85rem;
    font-weight: 600;
}

.summary-value-total {
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
}

/* Cartes pleine largeur */
.section-card-full {
    margin-bottom: 24px;
}

    .section-card-full .modern-card {
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
        border: 1px solid #eef2f7;
        transition: transform 0.3s ease;
    }

        .section-card-full .modern-card:hover {
            transform: translateY(-2px);
        }

/* Tables améliorées */
.table-container-controlled {
    overflow-x: auto;
    border-radius: 0 0 16px 16px;
}

.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1200px;
}

.table-header-custom {
    background: linear-gradient(135deg, #475569, #334155);
    color: white;
}

.table-header-compact th {
    padding: 14px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #3b82f6;
    white-space: nowrap;
}

    .table-header-compact th i {
        margin-right: 6px;
        font-size: 0.9rem;
    }

/* Cellules de table améliorées */
.controlled-cell {
    padding: 12px;
    font-size: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.observation-cell-fixed {
    padding: 12px;
    font-size: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    min-width: 250px;
    max-width: 250px;
}

.observation-content-scroll {
    max-height: 60px;
    overflow-y: auto;
    padding-right: 8px;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #475569;
}

    .observation-content-scroll::-webkit-scrollbar {
        width: 4px;
    }

    .observation-content-scroll::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 2px;
    }

    .observation-content-scroll::-webkit-scrollbar-thumb {
        background: #94a3b8;
        border-radius: 2px;
    }

/* Lignes de table améliorées */
.table-row-custom {
    transition: background-color 0.2s ease;
    border-left: 3px solid transparent;
}

    .table-row-custom:hover {
        background: linear-gradient(90deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.02));
        border-left-color: #3b82f6;
    }

    .table-row-custom:nth-child(even) {
        background-color: #f8fafc;
    }

        .table-row-custom:nth-child(even):hover {
            background: linear-gradient(90deg, rgba(59, 130, 246, 0.07), rgba(59, 130, 246, 0.04));
        }

/* Alignement spécifique */
.text-end {
    text-align: right;
}

.text-center {
    text-align: center;
}

/* Boutons améliorés */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

    .btn-modern:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }

    .btn-modern:active:not(:disabled) {
        transform: translateY(0);
    }

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

.btn-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Statut financier */
.text-success {
    color: #10b981 !important;
    font-weight: 600;
}

.text-warning {
    color: #f59e0b !important;
    font-weight: 600;
}

/* Chargement amélioré */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.page-loader {
    text-align: center;
}

.standard-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Erreur améliorée */
.error-container {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-radius: 16px;
    border: 1px solid #fecaca;
    max-width: 600px;
    margin: 40px auto;
}

/* Version imprimable améliorée */
.print-version {
    padding: 20px;
    background: white;
    color: #000;
}

.print-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #000;
    margin-bottom: 30px;
}

.print-logo h2 {
    margin: 0;
    font-size: 24px;
    color: #1e293b;
}

.print-info {
    text-align: right;
    font-size: 12px;
    color: #64748b;
}

.print-title {
    text-align: center;
    margin-bottom: 30px;
}

    .print-title h1 {
        margin: 0 0 10px 0;
        font-size: 28px;
        color: #1e293b;
    }

.status-print {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

    .status-print.active {
        background: #10b981;
        color: white;
    }

    .status-print.inactive {
        background: #ef4444;
        color: white;
    }

.print-section {
    margin-bottom: 40px;
    page-break-inside: avoid;
}

.print-section-title {
    color: #1e293b;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 8px;
    margin-bottom: 20px;
    font-size: 18px;
}

.print-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.print-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .print-item label {
        font-weight: bold;
        font-size: 12px;
        color: #64748b;
    }

    .print-item span {
        font-size: 14px;
        color: #1e293b;
    }

/* Responsive Design */
@media (max-width: 1200px) {
    .dual-column-layout-20cm {
        grid-template-columns: 1fr;
    }

    .actions-sticky-grid-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 16px;
    }

    .grid-buttons .buttons-container {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .details-dossier-container {
        padding: 12px;
    }

    .compact-grid {
        grid-template-columns: 1fr;
    }

    .btn-modern {
        width: 100%;
        margin-bottom: 8px;
    }

    .actions-sticky-toolbar-grid {
        position: relative;
        top: 0;
    }
}

@media print {
    .details-dossier-container {
        display: none !important;
    }

    .print-version {
        display: block !important;
    }

    .print-section {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .landscape-page {
        transform: rotate(90deg);
        transform-origin: left top;
        width: 297mm;
        height: 210mm;
        margin-left: 210mm;
        page-break-before: always;
    }
}

/* ==================== */
/* STYLES POUR LISTEDOSSIERS.razor */
/* ==================== */

/* Container principal */
.dossier-container {
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: calc(100vh - 80px);
}

/* En-tête de page */
.dossier-header {
    background: white;
    padding: 24px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-left: 6px solid #4f46e5;
    position: relative;
    overflow: hidden;
}

    .dossier-header::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 200px;
        height: 200px;
        background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(124, 58, 237, 0.05));
        border-radius: 50%;
        transform: translate(100px, -100px);
    }

.dossier-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dossier-header-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

.dossier-header-text h1 {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
}

.dossier-header-text p {
    color: #64748b;
    margin: 8px 0 0 0;
    font-size: 1.1rem;
}

.dossier-header-right .btn-modern {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
}

/* Barre de recherche */
.dossier-search-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.search-container {
    position: relative;
}

.input-group-modern {
    position: relative;
}

.form-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.2rem;
    z-index: 2;
}

.form-control-modern {
    width: 100%;
    padding: 16px 20px 16px 50px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    transition: all 0.3s ease;
}

    .form-control-modern:focus {
        outline: none;
        border-color: #4f46e5;
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        background: white;
    }

.search-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 10px;
    border: 1px solid #bae6fd;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0369a1;
}

    .results-info i {
        font-size: 1.2rem;
    }

.results-count {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Statistiques */
.dossier-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

    .dossier-stats-grid .stat-card {
        background: white;
        border-radius: 16px;
        padding: 20px;
        display: flex;
        align-items: center;
        gap: 20px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
        border: 1px solid #e2e8f0;
        position: relative;
        overflow: hidden;
    }

        .dossier-stats-grid .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
        }

        .dossier-stats-grid .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 6px;
            height: 100%;
            background: linear-gradient(180deg, var(--card-color, #4f46e5), var(--card-color-dark, #3730a3));
        }

        .dossier-stats-grid .stat-card.bg-primary::before {
            --card-color: #4f46e5;
            --card-color-dark: #3730a3;
        }

        .dossier-stats-grid .stat-card.bg-success::before {
            --card-color: #10b981;
            --card-color-dark: #059669;
        }

        .dossier-stats-grid .stat-card.bg-warning::before {
            --card-color: #f59e0b;
            --card-color-dark: #d97706;
        }

        .dossier-stats-grid .stat-card.bg-danger::before {
            --card-color: #ef4444;
            --card-color-dark: #dc2626;
        }

    .dossier-stats-grid .stat-icon {
        width: 60px;
        height: 60px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: white;
        flex-shrink: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .dossier-stats-grid .stat-content h3 {
        font-size: 1.8rem;
        font-weight: 700;
        margin: 0;
        color: #1e293b;
        line-height: 1;
    }

    .dossier-stats-grid .stat-content p {
        color: #64748b;
        margin: 8px 0 0 0;
        font-size: 0.9rem;
        font-weight: 500;
    }

/* Carte principale du tableau */
.dossier-table-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 30px;
}

/* En-tête du tableau */
.table-header {
    background: linear-gradient(90deg, #f8fafc, #f1f5f9);
    padding: 20px 24px;
    border-bottom: 2px solid #e2e8f0;
}

.table-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
}

    .table-title i {
        color: #4f46e5;
    }

.table-count {
    color: #64748b;
    font-weight: 500;
    margin-left: 8px;
    font-size: 1rem;
}

/* Tableau moderne */
.table-responsive-modern {
    overflow-x: auto;
    padding: 0 24px;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1200px;
}

    .modern-table thead {
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .modern-table th {
        background: linear-gradient(135deg, #4f46e5, #7c3aed);
        color: white;
        font-size: 0.85rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 18px 12px;
        border-bottom: 3px solid #3730a3;
        white-space: nowrap;
        position: relative;
    }

        .modern-table th::after {
            content: '';
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 1px;
            height: 60%;
            background: rgba(255, 255, 255, 0.2);
        }

        .modern-table th:last-child::after {
            display: none;
        }

    .modern-table td {
        padding: 16px 12px;
        font-size: 0.9rem;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
        transition: all 0.2s ease;
    }

    .modern-table tbody tr {
        transition: all 0.3s ease;
        border-left: 4px solid transparent;
    }

        .modern-table tbody tr:hover {
            background: linear-gradient(90deg, rgba(79, 70, 229, 0.05), rgba(124, 58, 237, 0.02));
            border-left-color: #4f46e5;
            transform: translateX(2px);
        }

        .modern-table tbody tr:nth-child(even) {
            background-color: #f8fafc;
        }

            .modern-table tbody tr:nth-child(even):hover {
                background: linear-gradient(90deg, rgba(79, 70, 229, 0.08), rgba(124, 58, 237, 0.04));
            }

/* Style des cellules */
.badge-code {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #4f46e5;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    letter-spacing: 0.5px;
    display: inline-block;
    border: 1px solid #cbd5e1;
}

.tier-name {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    color: #334155;
}

.amount {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-weight: 600;
    font-size: 0.95rem;
}

.amount-total {
    color: #1e293b;
}

.amount-rest {
    color: #f59e0b;
}

/* Badges de statut */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-inactive {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.situation-badge {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #475569;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    display: inline-block;
    border: 1px solid #cbd5e1;
}

/* Boutons d'action */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

    .btn-action:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }

.btn-info-modern {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
}

    .btn-info-modern:hover {
        background: linear-gradient(135deg, #0284c7, #0369a1);
    }

.btn-primary-modern {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
}

    .btn-primary-modern:hover {
        background: linear-gradient(135deg, #4338ca, #6d28d9);
    }

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

    .btn-danger:hover {
        background: linear-gradient(135deg, #dc2626, #b91c1c);
    }

/* Pagination */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(90deg, #f8fafc, #f1f5f9);
    border-top: 1px solid #e2e8f0;
}

.pagination-info {
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    gap: 6px;
}

.btn-pagination {
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 10px;
    color: #475569;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .btn-pagination:hover:not(:disabled) {
        border-color: #4f46e5;
        color: #4f46e5;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
    }

    .btn-pagination.active {
        background: linear-gradient(135deg, #4f46e5, #7c3aed);
        color: white;
        border-color: #4f46e5;
    }

    .btn-pagination:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
    }

/* État vide */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: #64748b;
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.empty-state p {
    color: #94a3b8;
    max-width: 500px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

/* Chargement */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

    .loading-container .spinner {
        width: 60px;
        height: 60px;
        border: 4px solid #e2e8f0;
        border-top-color: #4f46e5;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin: 0 auto 20px;
    }

    .loading-container p {
        color: #64748b;
        font-size: 1rem;
        font-weight: 500;
    }

/* Animation spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animation d'entrée */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dossier-header,
.dossier-search-card,
.dossier-stats-grid .stat-card,
.dossier-table-card {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dossier-container {
        padding: 15px;
    }

    .dossier-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .dossier-header-left {
        flex-direction: column;
        text-align: center;
    }

    .table-responsive-modern {
        margin: 0 -15px;
        padding: 0 15px;
    }
}

@media (max-width: 992px) {
    .dossier-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dossier-header h1 {
        font-size: 1.8rem;
    }

    .dossier-header-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .dossier-stats-grid {
        grid-template-columns: 1fr;
    }

    .table-pagination {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .action-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn-action {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .badge-code, .situation-badge {
        font-size: 0.8rem;
        padding: 4px 8px;
        color: #252c36;
    }
}

@media (max-width: 576px) {
    .dossier-header {
        padding: 20px;
    }

    .dossier-search-card {
        padding: 20px;
    }

    .table-header {
        padding: 16px;
    }

    .table-responsive-modern {
        margin: 0 -10px;
        padding: 0 10px;
    }

    .modern-table td,
    .modern-table th {
        padding: 12px 8px;
        font-size: 0.85rem;
    }

    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn-pagination {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* Scrollbar personnalisée pour table */
.table-responsive-modern::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-responsive-modern::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-responsive-modern::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

    .table-responsive-modern::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

/* Boutons modernes généraux */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-primary-modern {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
}

    .btn-primary-modern:hover {
        background: linear-gradient(135deg, #4338ca, #6d28d9);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
    }

.btn-outline-modern {
    background: transparent;
    border: 2px solid #cbd5e1;
    color: #475569;
}

    .btn-outline-modern:hover {
        background: #f8fafc;
        border-color: #94a3b8;
        transform: translateY(-2px);
    }

    .btn-outline-modern.btn-sm {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

/* Focus states */
.form-control-modern:focus,
.btn-modern:focus,
.btn-action:focus,
.btn-pagination:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* États désactivés */
.btn-modern:disabled,
.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
/* Correction alignement tableau */
.modern-table {
    table-layout: fixed; /* Ajoutez cette ligne */
}

    /* Largeurs fixes pour chaque colonne */
    .modern-table th:nth-child(1), /* Code */
    .modern-table td:nth-child(1) {
        width: 120px !important;
        min-width: 120px;
        max-width: 120px;
    }

    .modern-table th:nth-child(2), /* Créancier */
    .modern-table td:nth-child(2),
    .modern-table th:nth-child(3), /* Débiteur */
    .modern-table td:nth-child(3) {
        width: 200px !important;
        min-width: 200px;
        max-width: 200px;
    }

    .modern-table th:nth-child(4), /* Date création */
    .modern-table td:nth-child(4),
    .modern-table th:nth-child(5) { /* Date clôture */
        width: 110px !important;
        min-width: 110px;
        max-width: 110px;
    }

    .modern-table th:nth-child(6), /* Total */
    .modern-table td:nth-child(6),
    .modern-table th:nth-child(7) { /* Reste */
        width: 120px !important;
        min-width: 120px;
        max-width: 120px;
    }

    .modern-table th:nth-child(8), /* Statut */
    .modern-table td:nth-child(8) {
        width: 100px !important;
        min-width: 100px;
        max-width: 100px;
    }

    .modern-table th:nth-child(9), /* Situation */
    .modern-table td:nth-child(9) {
        width: 120px !important;
        min-width: 120px;
        max-width: 120px;
    }

    .modern-table th:nth-child(10), /* Actions */
    .modern-table td:nth-child(10) {
        width: 150px !important;
        min-width: 150px;
        max-width: 150px;
    }

    /* Assurer que le texte ne déborde pas */
    .modern-table td {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        word-wrap: break-word;
    }

/* Pour les cellules de texte long */
.tier-name {
    max-width: 180px; /* Réduit de 250px */
    display: inline-block;
    vertical-align: middle;
}

/* Ajuster les colonnes date pour qu'elles s'affichent mieux */
.modern-table td:nth-child(4),
.modern-table td:nth-child(5) {
    text-align: center;
    font-size: 0.85rem;
}
/* Ajustement pour le tableau */
.modern-table {
    font-size: 0.9rem;
}

/* Alignement spécifique des colonnes */
.text-end {
    text-align: right !important;
    padding-right: 20px !important;
}

.text-center {
    text-align: center !important;
}

/* Ajuster le padding des cellules pour mieux aligner */
.modern-table td {
    padding: 14px 10px !important;
    vertical-align: middle !important;
}

    /* Pour la colonne Montant et Reste */
    .modern-table td:nth-child(6),
    .modern-table td:nth-child(7) {
        font-family: 'SF Mono', 'Roboto Mono', monospace;
        font-weight: 600;
        padding-right: 20px !important;
    }

/* Pour la colonne Actions - centrer mieux */
.action-buttons {
    justify-content: center !important;
    gap: 6px !important;
}

/* Réduire un peu la taille des boutons d'action */
.btn-action {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.85rem !important;
}
/* Pour les petits textes sous les statistiques */
.stat-content small {
    font-size: 0.75rem;
    color: #94a3b8;
    display: block;
    margin-top: 4px;
}

/* Ajuster l'espacement dans les cartes de stats */
.dossier-stats-grid .stat-content {
    flex: 1;
    min-width: 0;
}

    .dossier-stats-grid .stat-content h3 {
        margin-bottom: 4px;
    }

    .dossier-stats-grid .stat-content p {
        margin-bottom: 2px;
        font-weight: 600;
    }
/* ==================== */
/* CORRECTIONS ALIGNEMENT TABLEAU */
/* ==================== */

/* Forcer le tableau à utiliser des largeurs fixes */
.modern-table {
    width: 100%;
    table-layout: fixed !important; /* Force le layout fixe */
    border-collapse: separate;
    border-spacing: 0;
}

    /* Largeurs fixes explicites pour chaque colonne */
    .modern-table th:nth-child(1), /* Code */
    .modern-table td:nth-child(1) {
        width: 130px !important;
        min-width: 130px !important;
        max-width: 130px !important;
    }

    .modern-table th:nth-child(2), /* Créancier */
    .modern-table td:nth-child(2) {
        width: 220px !important;
        min-width: 220px !important;
        max-width: 220px !important;
    }

    .modern-table th:nth-child(3), /* Débiteur */
    .modern-table td:nth-child(3) {
        width: 220px !important;
        min-width: 220px !important;
        max-width: 220px !important;
    }

    .modern-table th:nth-child(4), /* Date création */
    .modern-table td:nth-child(4) {
        width: 125px !important;
        min-width: 125px !important;
        max-width: 125px !important;
    }

    .modern-table th:nth-child(5), /* Date clôture */
    .modern-table td:nth-child(5) {
        width: 125px !important;
        min-width: 125px !important;
        max-width: 125px !important;
    }

    .modern-table th:nth-child(6), /* Total */
    .modern-table td:nth-child(6) {
        width: 135px !important;
        min-width: 135px !important;
        max-width: 135px !important;
    }

    .modern-table th:nth-child(7), /* Reste */
    .modern-table td:nth-child(7) {
        width: 135px !important;
        min-width: 135px !important;
        max-width: 135px !important;
    }

    .modern-table th:nth-child(8), /* Statut */
    .modern-table td:nth-child(8) {
        width: 110px !important;
        min-width: 110px !important;
        max-width: 110px !important;
    }

    .modern-table th:nth-child(9), /* Situation */
    .modern-table td:nth-child(9) {
        width: 130px !important;
        min-width: 130px !important;
        max-width: 130px !important;
    }

    .modern-table th:nth-child(10), /* Actions */
    .modern-table td:nth-child(10) {
        width: 160px !important;
        min-width: 160px !important;
        max-width: 160px !important;
    }

    /* Assurer l'alignement vertical */
    .modern-table td {
        vertical-align: middle !important;
        padding: 14px 8px !important;
        height: 60px; /* Hauteur fixe */
    }

/* Alignement spécifique */
.text-end {
    text-align: right !important;
    padding-right: 15px !important;
}

.text-center {
    text-align: center !important;
}

/* ==================== */
/* STYLES TABLEAU ET PAGINATION UNIFIÉS */
/* ==================== */
/* ==================== */
/* STYLES TABLEAU ET PAGINATION UNIFIÉS - EXISTANT */
/* ==================== */

/* VOTRE CODE EXISTANT (à conserver) */
.tier-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    line-height: 1.4;
}

.amount {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-weight: 600;
    display: block;
}

.amount-total {
    color: #1e293b;
}

.amount-rest {
    color: #f59e0b;
}

.text-danger {
    color: #dc2626 !important;
    font-size: 0.75rem;
    margin-left: 4px;
}

.align-middle {
    vertical-align: middle !important;
}

/* TABLEAU MODERNE */
.table-modern.table-fixed {
    table-layout: fixed;
    width: 100%;
}

    .table-modern.table-fixed th,
    .table-modern.table-fixed td {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.table-responsive-modern {
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    max-height: 600px;
}

/* EN-TÊTES DE TABLEAU */
.table-modern th {
    padding: 16px 8px !important;
    text-align: center;
}

    .table-modern th:first-child {
        text-align: left;
        padding-left: 12px !important;
    }

    .table-modern th:nth-child(2),
    .table-modern th:nth-child(3) {
        text-align: left;
    }

/* LIGNES ET CELLULES */
.table-modern tbody tr {
    transition: background-color 0.2s;
    animation: fadeIn 0.3s ease-in;
}

    .table-modern tbody tr:hover {
        background-color: rgba(0, 123, 255, 0.05) !important;
    }

.table-modern td {
    padding: 10px 8px !important;
    vertical-align: middle !important;
    border-top: 1px solid #dee2e6;
}

/* BADGES */
.status-badge,
.situation-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.bg-success {
    background-color: #198754 !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

.bg-info {
    background-color: #0dcaf0 !important;
}

.bg-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.bg-info {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
}

/* BOUTONS D'ACTION */
.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* BOUTONS DÉSACTIVÉS */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline-secondary:disabled {
    border-color: #dee2e6;
    background-color: transparent;
}

/* STATISTIQUES */
.dossier-stats-grid .stat-content h3 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.dossier-stats-grid .stat-content p {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.dossier-stats-grid .stat-content small {
    font-size: 0.8rem;
    color: #94a3b8;
    display: block;
}

/* PAGINATION SIMPLIFIÉE */
.pagination-simple {
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.pagination-info {
    text-align: center;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

    .pagination-buttons .btn {
        min-width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.25rem 0.5rem;
    }

/* BADGE ADMIN */
.admin-badge {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0.7;
    }

    to {
        opacity: 1;
    }
}

/* INFOBULLES */
[title]:hover:after {
    content: attr(title);
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    z-index: 1000;
    white-space: nowrap;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .table-responsive-modern {
        margin: 0;
        padding: 0;
    }

    .table-modern {
        min-width: 1400px;
    }
}

@media (max-width: 768px) {
    .table-responsive-modern {
        font-size: 0.85rem;
        margin: 0 -15px;
    }

    .tier-name {
        max-width: 120px;
    }

    .pagination-buttons {
        gap: 5px;
    }

        .pagination-buttons .btn {
            min-width: 35px;
            height: 35px;
            padding: 0.2rem 0.4rem;
            font-size: 0.85rem;
        }

    .btn-group-sm > .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .pagination-buttons {
        flex-wrap: wrap;
        gap: 3px;
    }

    .tier-name {
        max-width: 100px;
    }
}

/* ==================== */
/* NOUVEAUX STYLES MODERNES - À AJOUTER APRÈS */
/* ==================== */

/* CONTAINER PRINCIPAL */
.dossier-container {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: calc(100vh - 70px);
}

/* EN-TÊTE MODERNE */
.dossier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.dossier-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dossier-header-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.dossier-header-text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.dossier-header-text p {
    color: #64748b;
    margin: 0.25rem 0 0 0;
    font-size: 0.95rem;
}

/* BOUTONS MODERNES */
.btn-modern {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-primary-modern {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

    .btn-primary-modern:hover {
        background: linear-gradient(135deg, #2563eb, #1e40af);
        transform: translateY(-2px);
        box-shadow: 0 6px 8px -1px rgba(59, 130, 246, 0.4);
    }

.btn-outline-modern {
    background: white;
    border: 2px solid #e2e8f0;
    color: #475569;
}

    .btn-outline-modern:hover {
        border-color: #3b82f6;
        color: #3b82f6;
        background: #f8fafc;
    }

/* RECHERCHE MODERNE */
.dossier-search-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.search-container {
    position: relative;
}

.input-group-modern {
    position: relative;
    display: flex;
    align-items: center;
}

.form-icon {
    position: absolute;
    left: 1rem;
    color: #94a3b8;
    font-size: 1.1rem;
    z-index: 10;
}

.form-control-modern {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

    .form-control-modern:focus {
        outline: none;
        border-color: #3b82f6;
        background: white;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

.search-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 10px;
    border: 1px solid #bae6fd;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0369a1;
    font-weight: 500;
}

.results-count {
    font-size: 0.95rem;
}

/* STATISTIQUES MODERNES */
.dossier-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 12px -1px rgba(0, 0, 0, 0.15);
    }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-content {
    flex: 1;
}

    .stat-content h3 {
        font-size: 2rem;
        font-weight: 800;
        margin: 0;
        background: linear-gradient(135deg, #1e293b, #475569);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .stat-content p {
        font-size: 1rem;
        font-weight: 600;
        color: #334155;
        margin: 0.25rem 0;
    }

    .stat-content small {
        font-size: 0.85rem;
        color: #94a3b8;
    }

/* CARTE TABLEAU MODERNE */
.dossier-table-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.table-header {
    padding: 1.5rem 1.5rem 0.75rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.table-title {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.table-count {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: normal;
    margin-left: 0.5rem;
}

/* CORRECTION ALIGNEMENT TABLEAU */
.table-modern th {
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

    /* Alignement précis des colonnes */
    .table-modern th:nth-child(1) {
        text-align: left;
    }
    /* Code */
    .table-modern th:nth-child(2) {
        text-align: left;
    }
    /* Créancier */
    .table-modern th:nth-child(3) {
        text-align: left;
    }
    /* Débiteur */
    .table-modern th:nth-child(4) {
        text-align: center;
    }
    /* Création */
    .table-modern th:nth-child(5) {
        text-align: center;
    }
    /* Clôture */
    .table-modern th:nth-child(6) {
        text-align: right;
    }
    /* Total */
    .table-modern th:nth-child(7) {
        text-align: right;
    }
    /* Reste */
    .table-modern th:nth-child(8) {
        text-align: center;
    }
    /* Statut */
    .table-modern th:nth-child(9) {
        text-align: center;
    }
    /* Situation */
    .table-modern th:nth-child(10) {
        text-align: center;
    }
/* Actions */

.table-modern td {
    vertical-align: middle;
    border-top: 1px solid #f1f5f9;
    padding: 1rem 0.75rem !important;
}

/* Badge code amélioré */
.badge-code {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #bae6fd;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: #0369a1;
}

/* Boutons d'action améliorés */
.btn-group-sm > .btn {
    border-radius: 8px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-info {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border: none;
    color: white;
}

    .btn-info:hover {
        background: linear-gradient(135deg, #0284c7, #0369a1);
        transform: scale(1.05);
    }

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    color: white;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #2563eb, #1e40af);
        transform: scale(1.05);
    }

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    color: white;
}

    .btn-danger:hover {
        background: linear-gradient(135deg, #dc2626, #b91c1c);
        transform: scale(1.05);
    }

/* PAGINATION AMÉLIORÉE */
.pagination-simple {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-top: 1px solid #e2e8f0;
}

.pagination-info {
    text-align: center;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

    .pagination-buttons .btn {
        min-width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
        border-radius: 10px;
        border: 2px solid #e2e8f0;
        background: white;
        color: #475569;
        font-weight: 600;
        transition: all 0.3s ease;
    }

        .pagination-buttons .btn:hover {
            border-color: #3b82f6;
            color: #3b82f6;
            background: #f8fafc;
            transform: translateY(-2px);
        }

    .pagination-buttons .btn-primary {
        background: linear-gradient(135deg, #3b82f6, #1d4ed8);
        border-color: transparent;
        color: white;
    }

        .pagination-buttons .btn-primary:hover {
            background: linear-gradient(135deg, #2563eb, #1e40af);
            border-color: transparent;
            color: white;
        }

    .pagination-buttons .btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
        border-color: #e2e8f0;
        background: #f8fafc;
        color: #94a3b8;
    }

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.empty-state h4 {
    color: #475569;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #94a3b8;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

/* LOADING */
.loading-container {
    text-align: center;
    padding: 4rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* RESPONSIVE - NOUVEAUX STYLES */
@media (max-width: 1200px) {
    .dossier-container {
        padding: 1rem;
    }

    .dossier-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dossier-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .dossier-header-left {
        justify-content: center;
        text-align: center;
    }

    .dossier-stats-grid {
        grid-template-columns: 1fr;
    }

    .pagination-buttons {
        flex-wrap: wrap;
    }

        .pagination-buttons .btn {
            min-width: 36px;
            height: 36px;
            font-size: 0.85rem;
        }
}

@media (max-width: 576px) {
    .dossier-header-text h1 {
        font-size: 1.5rem;
    }

    .btn-modern {
        width: 100%;
    }

    .table-header {
        padding: 1rem;
    }

    .tier-name {
        max-width: 100px;
    }

    .btn-group-sm > .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}
/* ==================== */
/* CORRECTIONS TABLEAU */
/* ==================== */

/* Supprimer le scroll vertical pour 20 dossiers */
.table-responsive-modern {
    overflow-x: auto;
    overflow-y: visible !important; /* Important: pas de scroll vertical */
    max-height: none !important;
}

/* Correction largeurs colonnes */
.table-modern.table-fixed th:nth-child(1) {
    width: 120px;
}
/* Code */
.table-modern.table-fixed th:nth-child(2) {
    width: 200px;
}
/* Créancier */
.table-modern.table-fixed th:nth-child(3) {
    width: 200px;
}
/* Débiteur */
.table-modern.table-fixed th:nth-child(4) {
    width: 110px;
}
/* Création */
.table-modern.table-fixed th:nth-child(5) {
    width: 110px;
}
/* Clôture */
.table-modern.table-fixed th:nth-child(6) {
    width: 120px;
}
/* Total */
.table-modern.table-fixed th:nth-child(7) {
    width: 120px;
}
/* Reste */
.table-modern.table-fixed th:nth-child(8) {
    width: 100px;
}
/* Statut */
.table-modern.table-fixed th:nth-child(9) {
    width: 120px;
}
/* Situation */
.table-modern.table-fixed th:nth-child(10) {
    width: 150px;
}
/* Actions */

/* Alignement TD cohérent avec TH */
.table-modern td:nth-child(1) {
    text-align: left !important;
}
/* Code */
.table-modern td:nth-child(2) {
    text-align: left !important;
}
/* Créancier */
.table-modern td:nth-child(3) {
    text-align: left !important;
}
/* Débiteur */
.table-modern td:nth-child(4) {
    text-align: center !important;
}
/* Création */
.table-modern td:nth-child(5) {
    text-align: center !important;
}
/* Clôture */
.table-modern td:nth-child(6) {
    text-align: right !important;
}
/* Total */
.table-modern td:nth-child(7) {
    text-align: right !important;
}
/* Reste */
.table-modern td:nth-child(8) {
    text-align: center !important;
}
/* Statut */
.table-modern td:nth-child(9) {
    text-align: center !important;
}
/* Situation */
.table-modern td:nth-child(10) {
    text-align: center !important;
}
/* Actions */

/* Amélioration visuelle des données */
.amount-total {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-weight: 600;
    color: #1e293b;
}

.amount-rest {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-weight: 600;
    color: #f59e0b;
}

.badge-code {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #bae6fd;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: #0369a1;
    display: inline-block;
}

/* Statistiques simplifiées */
.stat-icon.bg-info {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
}
/* Supprimer tout scroll du tableau */
.table-responsive {
    overflow-x: visible !important;
    overflow-y: visible !important;
    max-height: none !important;
    width: 100%;
}

/* Tableau sans limites */
.table-modern {
    width: 100% !important;
    table-layout: auto !important;
    margin-bottom: 0;
}

/* En-têtes fixes */
.table-header-custom th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem !important;
}

/* Lignes du tableau */
.table-row-custom td {
    padding: 0.75rem !important;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

/* Largeurs fixes pour contrôle */
.table-modern th:first-child,
.table-modern td:first-child {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
}

/* Style pour les badges de code */
.badge-code {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    border: 1px solid #bbdefb;
}

/* Assurer que tout tient dans l'écran */
.dossier-table-card {
    max-width: 100%;
    overflow: visible !important;
}

/* Responsive: si vraiment trop large, on laisse un peu de scroll */
@media (max-width: 1400px) {
    .table-responsive {
        overflow-x: auto !important;
    }

    .table-modern {
        min-width: 1200px;
    }
}

/* Pour les petits écrans, on simplifie */
@media (max-width: 768px) {
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }

    .table-responsive {
        font-size: 0.85rem;
    }

    .table-modern th,
    .table-modern td {
        padding: 0.5rem !important;
    }

    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}
/* Utiliser l'espace de la navmenu */
.dossier-container {
    padding-left: 5px !important;
    padding-right: 5px !important;
    margin-left: -10px;
    margin-right: -10px;
}

/* Tableau élargi */
.table-responsive {
    margin-left: -20px !important;
    margin-right: -20px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: calc(100% + 40px) !important;
}

/* Largeurs de colonnes optimisées */
.table-modern th:nth-child(1), /* Code */
.table-modern td:nth-child(1) {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    padding-left: 30px !important;
}

.table-modern th:nth-child(2), /* Créancier */
.table-modern td:nth-child(2),
.table-modern th:nth-child(3), /* Débiteur */
.table-modern td:nth-child(3) {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
}

.table-modern th:nth-child(4), /* Création */
.table-modern td:nth-child(4),
.table-modern th:nth-child(5), /* Clôture */
.table-modern td:nth-child(5) {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
}

.table-modern th:nth-child(6), /* Total */
.table-modern td:nth-child(6),
.table-modern th:nth-child(7), /* Reste */
.table-modern td:nth-child(7) {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
}

.table-modern th:nth-child(8), /* Statut */
.table-modern td:nth-child(8) {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
}

.table-modern th:nth-child(9), /* Situation */
.table-modern td:nth-child(9) {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
}

.table-modern th:nth-child(10), /* Actions */
.table-modern td:nth-child(10) {
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    padding-right: 30px !important;
}

/* Badge code amélioré */
.badge-code {
    background: #e8f4fd;
    color: #0d6efd;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 0.85rem;
    border: 1px solid #b6d4fe;
    display: inline-block;
    white-space: nowrap;
}

/* Boutons d'action compacts */
.btn-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.8rem !important;
    min-width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Ajustement responsive */
@media (max-width: 1400px) {
    .dossier-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .table-responsive {
        margin-left: -10px !important;
        margin-right: -10px !important;
        width: calc(100% + 20px) !important;
    }

    .table-modern th:nth-child(2),
    .table-modern td:nth-child(2),
    .table-modern th:nth-child(3),
    .table-modern td:nth-child(3) {
        width: 180px !important;
        min-width: 180px !important;
        max-width: 180px !important;
    }
}

@media (max-width: 1200px) {
    /* Sur écrans moyens, on réduit un peu */
    .table-modern th:nth-child(2),
    .table-modern td:nth-child(2),
    .table-modern th:nth-child(3),
    .table-modern td:nth-child(3) {
        width: 160px !important;
        min-width: 160px !important;
        max-width: 160px !important;
    }

    .table-modern th:nth-child(1),
    .table-modern td:nth-child(1) {
        padding-left: 20px !important;
    }

    .table-modern th:nth-child(10),
    .table-modern td:nth-child(10) {
        padding-right: 20px !important;
    }
}

/* Pour les très petits écrans, on garde un peu de scroll horizontal */
@media (max-width: 992px) {
    .table-responsive {
        overflow-x: auto !important;
    }

    .table-modern {
        min-width: 1000px;
    }
}
/* Statuts sans arrière-plan coloré */
.status-active {
    color: #198754; /* Vert */
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.status-inactive {
    color: #6c757d; /* Gris */
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.status-active i {
    color: #198754;
    font-size: 0.9rem;
}

.status-inactive i {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Situations sans arrière-plan coloré */
.situation-text {
    color: #0dcaf0; /* Bleu cyan */
    font-weight: 500;
    display: inline-block;
}

    /* Variantes de couleurs pour différentes situations */
    .situation-text[data-situation="En cours"],
    .situation-text:contains("En cours") {
        color: #0d6efd; /* Bleu */
    }

    .situation-text[data-situation="Terminé"],
    .situation-text:contains("Terminé"),
    .situation-text:contains("Clôturé") {
        color: #198754; /* Vert */
    }

    .situation-text[data-situation="En attente"],
    .situation-text:contains("En attente") {
        color: #fd7e14; /* Orange */
    }

    .situation-text[data-situation="Urgent"],
    .situation-text:contains("Urgent") {
        color: #dc3545; /* Rouge */
    }

    .situation-text[data-situation="Suspendu"],
    .situation-text:contains("Suspendu") {
        color: #6c757d; /* Gris */
    }

/* Supprimer les styles d'infobulles existants */
[title]:hover:after {
    display: none !important;
}

/* Supprimer tooltips Bootstrap si présents */
.tooltip {
    display: none !important;
}

/* Désactiver les tooltips natifs */
*[title] {
    text-decoration: none !important;
    cursor: default !important;
}

/* Boutons sans tooltips */
.btn[title]::after,
.btn[data-bs-toggle="tooltip"]::after {
    display: none !important;
}

/* Assurer que le texte tronqué n'a pas de tooltip */
.text-truncate {
    cursor: default !important;
}

/* Style pour les montants */
.text-success {
    color: #198754 !important; /* Vert pour Total */
}

.text-warning {
    color: #fd7e14 !important; /* Orange pour Reste */
}

/* Badge code simplifié */
.badge-code {
    background: transparent;
    color: #0d6efd;
    padding: 0;
    border-radius: 0;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    border: none;
    font-weight: 600;
}

/* Boutons d'action sans tooltips */
.btn-sm {
    cursor: pointer !important;
}

    .btn-sm:disabled {
        cursor: not-allowed !important;
        opacity: 0.6;
    }

/* Pour les très petits écrans */
@media (max-width: 768px) {
    .status-active,
    .status-inactive {
        font-size: 0.85rem;
    }

        .status-active i,
        .status-inactive i {
            font-size: 0.8rem;
        }

    .situation-text {
        font-size: 0.85rem;
    }
}

.situation-en-cours {
    color: #0d6efd; /* Bleu */
    font-weight: 500;
}

.situation-termine {
    color: #198754; /* Vert */
    font-weight: 500;
}

.situation-attente {
    color: #fd7e14; /* Orange */
    font-weight: 500;
}

.situation-urgent {
    color: #dc3545; /* Rouge */
    font-weight: 600;
}

.situation-suspendu {
    color: #6c757d; /* Gris */
    font-weight: 500;
}

.situation-default {
    color: #0dcaf0; /* Cyan par défaut */
    font-weight: 500;
}
/* Style pour la page Nouveau Dossier */
.nouveau-dossier-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Table des détails financiers */
.table-financial {
    font-size: 0.85rem;
    margin-bottom: 0;
}

    .table-financial thead th {
        background-color: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
        padding: 0.5rem;
        white-space: nowrap;
    }

    .table-financial tbody td {
        padding: 0.5rem;
        vertical-align: middle;
    }

    .table-financial .form-control-sm {
        height: calc(1.5em + 0.5rem + 2px);
        padding: 0.25rem 0.5rem;
        font-size: 0.85rem;
    }

    .table-financial .input-group-sm {
        min-width: 100px;
    }

        .table-financial .input-group-sm .input-group-text {
            padding: 0.25rem 0.375rem;
            font-size: 0.75rem;
        }

/* Version mobile */
.mobile-financial-card {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

    .mobile-financial-card .card-header-modern {
        background-color: #f8f9fa;
        border-bottom: 1px solid #dee2e6;
        padding: 0.5rem 1rem;
    }

    .mobile-financial-card .form-control-sm {
        font-size: 0.85rem;
    }

/* Style pour les champs de saisie */
.popup-form-control:disabled {
    background-color: #e9ecef;
    opacity: 1;
    cursor: not-allowed;
}

/* Style pour les montants */
.popup-amount-input {
    text-align: right;
}

/* Style pour le récapitulatif */
.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
    border-top: 2px solid #dee2e6;
}

.summary-label {
    font-weight: 500;
    color: #495057;
}

.summary-value {
    font-weight: 600;
    color: #212529;
}

.summary-label-total {
    font-weight: 700;
    color: #495057;
    font-size: 1.1rem;
}

.summary-value-total {
    font-weight: 800;
    color: #0d6efd;
    font-size: 1.1rem;
}

/* Style pour les informations */
.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #e9ecef;
}

    .info-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

.popup-label {
    font-weight: 500;
    color: #6c757d;
}

.popup-value {
    font-weight: 600;
    color: #495057;
}

/* Style pour le switch */
.popup-switch-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.popup-switch {
    position: relative;
    width: 3rem;
    height: 1.5rem;
    appearance: none;
    background: #dee2e6;
    border-radius: 0.75rem;
    transition: all 0.3s;
    cursor: pointer;
}

    .popup-switch:checked {
        background: #0d6efd;
    }

    .popup-switch:before {
        content: '';
        position: absolute;
        width: 1.25rem;
        height: 1.25rem;
        border-radius: 50%;
        background: white;
        top: 0.125rem;
        left: 0.125rem;
        transition: all 0.3s;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

    .popup-switch:checked:before {
        left: 1.625rem;
    }

.popup-switch-label {
    cursor: pointer;
    user-select: none;
}

.popup-switch-text {
    font-weight: 500;
    color: #495057;
}

/* Style pour les sections */
.section-divider {
    padding: 1rem 0;
    border-top: 2px solid #f0f0f0;
    margin: 1rem 0;
}

.section-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

/* Indicateur de chargement */
.data-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Style pour les messages d'alerte */
.alert-modern {
    border: none;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
}

/* Responsive */
@media (max-width: 768px) {
    .nouveau-dossier-container {
        padding: 0.5rem;
    }

    .table-responsive {
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .popup-switch-container {
        justify-content: center;
        padding: 1rem 0;
    }
}

/* Animation pour les transitions */
.modern-card {
    transition: all 0.3s ease;
}

    .modern-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

/* Style pour les boutons désactivés */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* ============================================
   STYLES POUR LA PAGE NOUVEAU DOSSIER
   ============================================ */

.nouveau-dossier-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* En-tête de page */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

    .page-header h1 {
        font-size: 1.8rem;
        font-weight: 600;
        color: #2c3e50;
    }

/* Section générique */
.dossier-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

    .dossier-section .card-header {
        background-color: #f8f9fa;
        border-bottom: 2px solid #e0e0e0;
        padding: 1rem 1.5rem;
    }

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* Formulaire */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

    .form-label.required::after {
        content: " *";
        color: #dc3545;
    }

/* Section Informations Bancaires */
.bank-info-section {
    border-left: 2px solid #e9ecef;
    padding-left: 1.5rem;
    height: 100%;
}

.bank-info-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

/* Tableau des détails financiers */
.table-container {
    margin-top: 1rem;
}

.financial-table {
    font-size: 0.9rem;
}

    .financial-table thead th {
        background-color: #f1f5f9;
        border-bottom: 2px solid #dee2e6;
        font-weight: 600;
        color: #495057;
        padding: 0.75rem;
        white-space: nowrap;
    }

    .financial-table tbody td {
        padding: 0.5rem;
        vertical-align: middle;
        border-bottom: 1px solid #f0f0f0;
    }

    .financial-table .form-control-sm,
    .financial-table .form-select-sm {
        height: calc(1.5em + 0.5rem + 2px);
        padding: 0.25rem 0.5rem;
        font-size: 0.85rem;
    }

    .financial-table .readonly-field {
        background-color: #f8f9fa;
        border-color: #e9ecef;
        color: #6c757d;
    }

/* Version mobile des détails financiers */
.mobile-financial-container {
    display: none;
}

.mobile-financial-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 1rem;
    background-color: #fff;
}

    .mobile-financial-card .card-header {
        background-color: #f8f9fa;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #e0e0e0;
    }

/* États vides */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

    .empty-state i {
        font-size: 3rem;
        margin-bottom: 1rem;
        color: #adb5bd;
    }

.loading-container {
    text-align: center;
    padding: 4rem 1rem;
}

/* Sections du bas */
.bottom-sections {
    margin-top: 2rem;
}

    .bottom-sections .card {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        height: 100%;
    }

    .bottom-sections .card-header {
        background-color: #f8f9fa;
        border-bottom: 1px solid #e0e0e0;
        padding: 1rem 1.5rem;
    }

/* Informations de création */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px dashed #e9ecef;
}

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

.info-label {
    font-weight: 500;
    color: #6c757d;
}

.info-value {
    font-weight: 600;
    color: #495057;
}

.switch-container {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.info-note {
    font-size: 0.85rem;
    color: #6c757d;
    padding: 0.5rem;
    background-color: #e8f4fd;
    border-radius: 4px;
    border-left: 3px solid #0d6efd;
}

/* Récapitulatif financier */
.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-label {
    font-weight: 500;
    color: #495057;
}

.summary-value {
    font-weight: 600;
    color: #2c3e50;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-top: 0.5rem;
    border-top: 2px solid #dee2e6;
}

.summary-label-total {
    font-weight: 700;
    color: #495057;
    font-size: 1.1rem;
}

.summary-value-total {
    font-weight: 800;
    color: #0d6efd;
    font-size: 1.1rem;
}

/* Actions */
.actions-container {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid #e9ecef;
}

/* Indicateur de chargement */
.data-loading {
    opacity: 0.6;
    pointer-events: none;
}

    .data-loading::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.5);
        z-index: 1;
        border-radius: 8px;
    }

/* Responsive */
@media (max-width: 768px) {
    .nouveau-dossier-page {
        padding: 10px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .bank-info-section {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #e9ecef;
        padding-top: 1.5rem;
        margin-top: 1.5rem;
    }

    .table-container {
        display: none;
    }

    .mobile-financial-container {
        display: block;
    }

    .bottom-sections .col-md-6 {
        margin-bottom: 1rem;
    }

    .actions-container {
        flex-direction: column;
    }

        .actions-container .btn {
            width: 100%;
        }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .financial-table {
        font-size: 0.85rem;
    }

        .financial-table th,
        .financial-table td {
            padding: 0.5rem;
        }
}

/* Animation pour les transitions */
.dossier-section {
    transition: all 0.3s ease;
}

    .dossier-section:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

/* Style pour les champs désactivés */
.form-control:disabled,
.form-select:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Style pour les champs de montant */
.input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: #495057;
}

/* Amélioration visuelle pour les cartes */
.card {
    transition: transform 0.2s ease;
}

    .card:hover {
        transform: translateY(-2px);
    }
/* ============================================
   STYLES POUR LA PAGE NOUVEAU DOSSIER - SANS BOOTSTRAP
   ============================================ */

/* Reset et base */
.nouveau-dossier-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* En-tête de page */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.header-content h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
}

.header-subtitle {
    color: #6c757d;
    margin: 0;
    font-size: 14px;
}

.icon-primary {
    color: #0d6efd;
    margin-right: 10px;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    gap: 6px;
}

    .btn i {
        font-size: 16px;
    }

.btn-primary {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

    .btn-primary:hover:not(:disabled) {
        background-color: #0b5ed7;
        border-color: #0a58ca;
    }

    .btn-primary:disabled {
        opacity: 0.65;
        cursor: not-allowed;
    }

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

    .btn-secondary:hover {
        background-color: #5c636a;
        border-color: #565e64;
    }

.btn-danger {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

    .btn-danger:hover {
        background-color: #bb2d3b;
        border-color: #b02a37;
    }

.btn-outline-danger {
    background-color: transparent;
    color: #dc3545;
    border-color: #dc3545;
}

    .btn-outline-danger:hover {
        background-color: #dc3545;
        color: white;
    }

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-icon:hover {
        background-color: #f8f9fa;
    }

/* Alertes */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
    border: 1px solid #b6effb;
}

.alert-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.alert-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    padding: 0;
    margin-left: 10px;
}

/* Cartes */
.card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background-color: #f8f9fa;
    padding: 16px 20px;
    border-bottom: 1px solid #dee2e6;
}

.card-body {
    padding: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Layout en colonnes */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-left {
    flex: 0 0 60%;
    max-width: 60%;
    padding: 0 10px;
}

.col-right {
    flex: 0 0 40%;
    max-width: 40%;
    padding: 0 10px;
}

.bottom-sections {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.bottom-col {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 10px;
    margin-bottom: 20px;
}

/* Formulaire */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
}

    .form-label.required::after {
        content: " *";
        color: #dc3545;
    }

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    color: #495057;
    background-color: white;
    transition: border-color 0.15s ease-in-out;
}

    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
        outline: none;
        border-color: #86b7fe;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
    }

    .form-input:disabled,
    .form-select:disabled,
    .form-textarea:disabled {
        background-color: #e9ecef;
        cursor: not-allowed;
        opacity: 0.7;
    }

    .form-input.input-error {
        border-color: #dc3545;
    }

    .form-input.input-success {
        border-color: #198754;
    }

.input-group {
    display: flex;
}

    .input-group .form-input {
        flex: 1;
        border-right: none;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

.input-group-text {
    padding: 8px 12px;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-left: none;
    color: #495057;
    display: flex;
    align-items: center;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Messages de validation */
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.success-message {
    color: #198754;
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hint-message {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Section Informations Bancaires */
.bank-info-section {
    border-left: 1px solid #e9ecef;
    padding-left: 20px;
    height: 100%;
}

.bank-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tableau */
.table-container {
    margin-top: 16px;
    overflow-x: auto;
}

.table-responsive {
    min-width: 1200px;
}

.financial-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .financial-table thead {
        background-color: #f8f9fa;
    }

    .financial-table th {
        padding: 12px 8px;
        text-align: left;
        font-weight: 600;
        color: #495057;
        border-bottom: 2px solid #dee2e6;
        white-space: nowrap;
    }

    .financial-table td {
        padding: 8px;
        border-bottom: 1px solid #e9ecef;
        vertical-align: middle;
    }

    .financial-table tbody tr:hover {
        background-color: #f8f9fa;
    }

.table-input,
.table-textarea {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    font-size: 13px;
    background: white;
}

    .table-input:focus,
    .table-textarea:focus {
        outline: none;
        border-color: #86b7fe;
    }

    .table-input.readonly {
        background-color: #f8f9fa;
        border-color: #e9ecef;
        color: #6c757d;
        cursor: not-allowed;
    }

.table-textarea {
    resize: vertical;
    min-height: 32px;
    max-height: 64px;
}

.required-star {
    color: #dc3545;
}

/* Version mobile */
.mobile-container {
    display: none;
}

.mobile-card {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 12px;
    background: white;
}

.mobile-card-header {
    padding: 12px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-card-title {
    font-weight: 600;
    color: #495057;
}

.mobile-card-body {
    padding: 12px;
}

.mobile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mobile-form-group {
    margin-bottom: 12px;
}

    .mobile-form-group.full-width {
        grid-column: 1 / -1;
    }

.mobile-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.mobile-input,
.mobile-textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    font-size: 13px;
}

.mobile-textarea {
    resize: vertical;
    min-height: 60px;
}

/* Header avec action */
.header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* États vides */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

    .empty-state i {
        font-size: 48px;
        margin-bottom: 16px;
        color: #adb5bd;
        display: block;
    }

    .empty-state p {
        margin: 0 0 8px 0;
        font-size: 16px;
    }

.empty-hint {
    font-size: 14px;
    color: #6c757d;
}

/* Chargement */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Informations de création */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #e9ecef;
}

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

.info-label {
    color: #6c757d;
    font-weight: 500;
}

.info-value {
    color: #495057;
    font-weight: 600;
}

/* Switch */
.switch-container {
    margin: 20px 0;
}

.switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

    .switch input {
        display: none;
    }

.slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    background-color: #ccc;
    border-radius: 13px;
    transition: .4s;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        border-radius: 50%;
        transition: .4s;
    }

.switch input:checked + .slider {
    background-color: #0d6efd;
}

    .switch input:checked + .slider:before {
        transform: translateX(24px);
    }

.switch-label {
    font-weight: 500;
    color: #495057;
}

.info-note {
    font-size: 13px;
    color: #6c757d;
    padding: 10px;
    background-color: #e8f4fd;
    border-radius: 4px;
    border-left: 3px solid #0d6efd;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Récapitulatif financier */
.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-label {
    color: #495057;
    font-weight: 500;
}

.summary-value {
    color: #2c3e50;
    font-weight: 600;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-top: 8px;
    border-top: 2px solid #dee2e6;
}

.summary-label-total {
    font-weight: 700;
    color: #495057;
    font-size: 16px;
}

.summary-value-total {
    font-weight: 800;
    color: #0d6efd;
    font-size: 16px;
}

/* Actions */
.actions-container {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Responsive */
@media (max-width: 992px) {
    .col-left,
    .col-right {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .bank-info-section {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #e9ecef;
        padding-top: 20px;
        margin-top: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nouveau-dossier-page {
        padding: 10px;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .bottom-col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .table-container {
        display: none;
    }

    .mobile-container {
        display: block;
    }

    .header-with-action {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

        .header-with-action .btn {
            width: 100%;
        }

    .actions-container {
        flex-direction: column;
    }

        .actions-container .btn {
            width: 100%;
        }
}

@media (max-width: 480px) {
    .mobile-form-grid {
        grid-template-columns: 1fr;
    }

    .mobile-form-group {
        margin-bottom: 12px;
    }
}

/* Animation pour les transitions */
.card {
    transition: all 0.3s ease;
}

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

/* Indicateur de chargement */
.data-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

    .data-loading::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.5);
        z-index: 10;
        border-radius: 8px;
    }

/* Hauteur égale pour les cartes du bas */
.h-100 {
    height: 100%;
}
/* ============================================
   STYLES POUR LA PAGE NOUVEAU DOSSIER - SANS BOOTSTRAP
   AVEC TABLEAU ÉLARGI
   ============================================ */

/* Reset et base */
.nouveau-dossier-page {
    max-width: 1800px; /* Augmenté de 1400px à 1800px */
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* En-tête de page */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.header-content h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
}

.header-subtitle {
    color: #6c757d;
    margin: 0;
    font-size: 14px;
}

.icon-primary {
    color: #0d6efd;
    margin-right: 10px;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    gap: 6px;
}

    .btn i {
        font-size: 16px;
    }

.btn-primary {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

    .btn-primary:hover:not(:disabled) {
        background-color: #0b5ed7;
        border-color: #0a58ca;
    }

    .btn-primary:disabled {
        opacity: 0.65;
        cursor: not-allowed;
    }

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

    .btn-secondary:hover {
        background-color: #5c636a;
        border-color: #565e64;
    }

.btn-danger {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

    .btn-danger:hover {
        background-color: #bb2d3b;
        border-color: #b02a37;
    }

.btn-outline-danger {
    background-color: transparent;
    color: #dc3545;
    border-color: #dc3545;
}

    .btn-outline-danger:hover {
        background-color: #dc3545;
        color: white;
    }

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-icon:hover {
        background-color: #f8f9fa;
    }

    .btn-icon.expanded {
        width: 36px;
        height: 36px;
    }

/* Alertes */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
    border: 1px solid #b6effb;
}

.alert-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.alert-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    padding: 0;
    margin-left: 10px;
}

/* Cartes */
.card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background-color: #f8f9fa;
    padding: 16px 20px;
    border-bottom: 1px solid #dee2e6;
}

.card-body {
    padding: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Layout en colonnes */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-left {
    flex: 0 0 60%;
    max-width: 60%;
    padding: 0 10px;
}

.col-right {
    flex: 0 0 40%;
    max-width: 40%;
    padding: 0 10px;
}

.bottom-sections {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.bottom-col {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 10px;
    margin-bottom: 20px;
}

/* Formulaire */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
}

    .form-label.required::after {
        content: " *";
        color: #dc3545;
    }

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    color: #495057;
    background-color: white;
    transition: border-color 0.15s ease-in-out;
}

    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
        outline: none;
        border-color: #86b7fe;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
    }

    .form-input:disabled,
    .form-select:disabled,
    .form-textarea:disabled {
        background-color: #e9ecef;
        cursor: not-allowed;
        opacity: 0.7;
    }

    .form-input.input-error {
        border-color: #dc3545;
    }

    .form-input.input-success {
        border-color: #198754;
    }

.input-group {
    display: flex;
}

    .input-group .form-input {
        flex: 1;
        border-right: none;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

.input-group-text {
    padding: 8px 12px;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-left: none;
    color: #495057;
    display: flex;
    align-items: center;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Messages de validation */
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.success-message {
    color: #198754;
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hint-message {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Section Informations Bancaires */
.bank-info-section {
    border-left: 1px solid #e9ecef;
    padding-left: 20px;
    height: 100%;
}

.bank-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   TABLEAU ÉLARGI - Détails Financiers
   ============================================ */

.card.expanded {
    margin-bottom: 25px;
}

.table-container.expanded {
    margin-top: 20px;
    margin-bottom: 10px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    min-width: 1400px; /* Augmenté de 1200px à 1400px */
}

.financial-table.expanded {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px; /* Augmenté de 13px à 14px */
}

    .financial-table.expanded thead {
        background-color: #f1f5f9;
    }

    .financial-table.expanded th {
        padding: 14px 12px; /* Augmenté le padding */
        text-align: left;
        font-weight: 600;
        color: #2c3e50;
        border-bottom: 2px solid #0d6efd;
        white-space: nowrap;
        font-size: 14px;
        background-color: #f8fafc;
    }

    .financial-table.expanded td {
        padding: 12px 12px; /* Augmenté le padding */
        border-bottom: 1px solid #e2e8f0;
        vertical-align: middle;
        background-color: white;
    }

    .financial-table.expanded tbody tr:hover {
        background-color: #f7f9fc;
    }

    .financial-table.expanded tbody tr:nth-child(even) {
        background-color: #fafcff;
    }

        .financial-table.expanded tbody tr:nth-child(even):hover {
            background-color: #f1f7ff;
        }

/* Champs de saisie dans le tableau élargi */
.table-input.expanded {
    width: 100%;
    padding: 10px 12px; /* Augmenté de 4px 8px à 10px 12px */
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    min-height: 40px;
    box-sizing: border-box;
}

    .table-input.expanded:focus {
        outline: none;
        border-color: #0d6efd;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    }

    .table-input.expanded.readonly {
        background-color: #f8f9fa;
        border-color: #e5e7eb;
        color: #4b5563;
        cursor: not-allowed;
        font-weight: 500;
    }

.table-textarea.expanded {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    resize: vertical;
    min-height: 42px;
    max-height: 100px;
    font-family: inherit;
}

    .table-textarea.expanded:focus {
        outline: none;
        border-color: #0d6efd;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    }

/* Champs spécifiques pour montant */
.amount-input-group {
    position: relative;
}

.amount-input {
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

/* Cellule actions élargie */
.actions-cell {
    text-align: center;
    vertical-align: middle;
}

.required-star {
    color: #dc3545;
    font-weight: bold;
    margin-left: 2px;
}

/* Version mobile */
.mobile-container {
    display: none;
}

.mobile-card {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 12px;
    background: white;
}

.mobile-card-header {
    padding: 12px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-card-title {
    font-weight: 600;
    color: #495057;
    font-size: 15px;
}

.mobile-card-body {
    padding: 15px;
}

.mobile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.mobile-form-group {
    margin-bottom: 15px;
}

    .mobile-form-group.full-width {
        grid-column: 1 / -1;
    }

.mobile-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #4b5563;
    font-weight: 500;
}

.mobile-input,
.mobile-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

    .mobile-input:focus,
    .mobile-textarea:focus {
        outline: none;
        border-color: #0d6efd;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
    }

.mobile-textarea {
    resize: vertical;
    min-height: 70px;
    font-family: inherit;
}

/* Header avec action */
.header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* États vides */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

    .empty-state i {
        font-size: 48px;
        margin-bottom: 16px;
        color: #adb5bd;
        display: block;
    }

    .empty-state p {
        margin: 0 0 8px 0;
        font-size: 16px;
    }

.empty-hint {
    font-size: 14px;
    color: #6c757d;
}

/* Chargement */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Informations de création */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #e9ecef;
}

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

.info-label {
    color: #6c757d;
    font-weight: 500;
}

.info-value {
    color: #495057;
    font-weight: 600;
}

/* Switch */
.switch-container {
    margin: 20px 0;
}

.switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

    .switch input {
        display: none;
    }

.slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    background-color: #ccc;
    border-radius: 13px;
    transition: .4s;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        border-radius: 50%;
        transition: .4s;
    }

.switch input:checked + .slider {
    background-color: #0d6efd;
}

    .switch input:checked + .slider:before {
        transform: translateX(24px);
    }

.switch-label {
    font-weight: 500;
    color: #495057;
}

.info-note {
    font-size: 13px;
    color: #6c757d;
    padding: 10px;
    background-color: #e8f4fd;
    border-radius: 4px;
    border-left: 3px solid #0d6efd;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Récapitulatif financier */
.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-label {
    color: #495057;
    font-weight: 500;
}

.summary-value {
    color: #2c3e50;
    font-weight: 600;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-top: 8px;
    border-top: 2px solid #dee2e6;
}

.summary-label-total {
    font-weight: 700;
    color: #495057;
    font-size: 16px;
}

.summary-value-total {
    font-weight: 800;
    color: #0d6efd;
    font-size: 16px;
}

/* Actions */
.actions-container {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Responsive */
@media (max-width: 1200px) {
    .nouveau-dossier-page {
        max-width: 100%;
        padding: 15px;
    }

    .table-responsive {
        min-width: 1200px;
    }
}

@media (max-width: 992px) {
    .col-left,
    .col-right {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .bank-info-section {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #e9ecef;
        padding-top: 20px;
        margin-top: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nouveau-dossier-page {
        padding: 10px;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .bottom-col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .table-container {
        display: none;
    }

    .mobile-container {
        display: block;
    }

    .header-with-action {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

        .header-with-action .btn {
            width: 100%;
        }

    .actions-container {
        flex-direction: column;
    }

        .actions-container .btn {
            width: 100%;
        }
}

@media (max-width: 480px) {
    .mobile-form-grid {
        grid-template-columns: 1fr;
    }

    .mobile-form-group {
        margin-bottom: 12px;
    }
}

/* Animation pour les transitions */
.card {
    transition: all 0.3s ease;
}

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

/* Indicateur de chargement */
.data-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

    .data-loading::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.5);
        z-index: 10;
        border-radius: 8px;
    }

/* Hauteur égale pour les cartes du bas */
.h-100 {
    height: 100%;
}
/* ============================================
   STYLES SPÉCIFIQUES POUR LE TABLEAU DE BORD (HOME)
   ============================================ */

/* En-tête du dashboard - MODIFIÉ */
.dashboard-header {
    background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%); /* Ajout d'un fond */
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    .dashboard-header h1 {
        font-size: 1.75rem;
        font-weight: 700;
        color: white !important; /* Changé en blanc */
        margin: 0;
        background: none !important; /* Supprime le dégradé de texte */
        -webkit-text-fill-color: white !important;
        background-clip: border-box !important;
    }

    .dashboard-header p {
        color: rgba(255, 255, 255, 0.9) !important; /* Changé en blanc avec transparence */
        margin: 0.5rem 0 0 0;
        font-size: 0.95rem;
    }

/* Grille des cartes de statistiques */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Cartes de statistiques améliorées */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        border-color: #c7d2fe;
    }

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    flex-shrink: 0;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0;
    line-height: 1;
}

.stat-content p {
    color: #6b7280;
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Grille principale du contenu */
.dashboard-content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 1.5rem;
    width: 100%;
}

/* Section Dossiers Récents */
.dossiers-section {
    min-height: 500px;
}

/* Section de droite améliorée (Activités + Actions) */
.right-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

/* Carte simplifiée pour les activités */
.dashboard-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    height: fit-content;
}

.card-header-simple {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

    .card-header-simple h3 {
        font-size: 1.1rem;
        font-weight: 600;
        color: #374151;
        margin: 0;
        display: flex;
        align-items: center;
    }

        .card-header-simple h3 i {
            margin-right: 0.5rem;
            color: #4361ee;
        }

.card-body-simple {
    padding: 1.5rem;
}

/* Activités récentes - design simple et propre */
.activity-list-simple {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item-simple {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

    .activity-item-simple:hover {
        background: white;
        border-color: #e0e7ff;
        transform: translateX(4px);
    }

.activity-icon-simple {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

    .activity-icon-simple .text-success {
        background: #d1fae5;
        color: #059669;
    }

    .activity-icon-simple .text-primary {
        background: #dbeafe;
        color: #3b82f6;
    }

    .activity-icon-simple .text-warning {
        background: #fef3c7;
        color: #f59e0b;
    }

.activity-content-simple {
    flex: 1;
    min-width: 0;
}

    .activity-content-simple p {
        margin: 0;
        color: #374151;
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .activity-content-simple .activity-time {
        font-size: 0.75rem;
        color: #6b7280;
        margin-top: 0.25rem;
        display: flex;
        align-items: center;
    }

        .activity-content-simple .activity-time i {
            margin-right: 0.25rem;
            font-size: 0.7rem;
        }

/* Actions rapides - design simple */
.actions-grid-simple {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.action-btn-simple {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

    .action-btn-simple:hover {
        background: #f8fafc;
        border-color: #c7d2fe;
        color: #4361ee;
        transform: translateX(4px);
    }

    .action-btn-simple i {
        margin-right: 0.75rem;
        font-size: 1rem;
        color: #4361ee;
    }

.action-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
}

    .action-btn-success:hover {
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
        color: white;
    }

    .action-btn-success i {
        color: white;
    }

/* Tableau des dossiers récents */
.dossiers-section .modern-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dossiers-section .card-header-modern {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-bottom: none;
}

    .dossiers-section .card-header-modern h3 {
        color: white;
    }

        .dossiers-section .card-header-modern h3 i {
            color: white;
        }

.dossiers-section .table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .dossiers-section .table-modern thead th {
        background: #f8fafc;
        color: #4b5563;
        font-weight: 600;
        border-bottom: 2px solid #e5e7eb;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .dossiers-section .table-modern tbody td {
        padding: 0.875rem 1rem;
        border-bottom: 1px solid #f3f4f6;
        vertical-align: middle;
    }

    .dossiers-section .table-modern tbody tr:hover {
        background: #f9fafb;
    }

/* Badges modernes pour les statuts */
.status-badge-simple {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #10b981;
}

.status-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #f59e0b;
}

.status-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #ef4444;
}

.status-secondary {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    border: 1px solid #d1d5db;
}

/* Chargement et erreurs */
.dashboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

    .dashboard-loading .standard-spinner {
        width: 60px;
        height: 60px;
        border: 4px solid #f3f3f3;
        border-top: 4px solid #4361ee;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-bottom: 1.5rem;
    }

    .dashboard-loading p {
        color: #6b7280;
        font-size: 1rem;
    }

.dashboard-error {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    margin: 2rem auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.error-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1.5rem;
}

.dashboard-error h3 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.dashboard-error p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.dashboard-error .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

/* Bouton "Voir tous les dossiers" */
.btn-view-all {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .btn-view-all:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
        background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    }

    .btn-view-all i {
        margin-right: 0.5rem;
    }

/* Responsive */
@media (max-width: 1200px) {
    .dashboard-content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .right-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .dashboard {
        padding: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .stat-content h3 {
        font-size: 1.5rem;
    }

    .right-section {
        grid-template-columns: 1fr;
    }

    .dossiers-section .table-modern {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .stat-content h3 {
        font-size: 1.75rem;
    }
}

/* Animation spin pour le spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ============================================
   STYLES SPÉCIFIQUES POUR LA PAGE HOME.RAZOR
   ============================================ */

/* Ajustements spécifiques pour le contenu de Home.razor */
.dossiers-section .table-responsive {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
}

/* Personnalisation des boutons d'action dans le tableau */
.dossiers-section .btn-outline-primary,
.dossiers-section .btn-outline-secondary {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

    .dossiers-section .btn-outline-primary:hover {
        background-color: #0d6efd;
        border-color: #0d6efd;
        color: white;
    }

    .dossiers-section .btn-outline-secondary:hover {
        background-color: #6c757d;
        border-color: #6c757d;
        color: white;
    }

/* Message d'état vide pour les dossiers */
.text-center.py-4 i {
    opacity: 0.5;
}

.text-center.py-4 p {
    margin-top: 0.75rem;
    color: #9ca3af;
}

/* Ligne de séparation subtile entre les activités */
.activity-item-simple:not(:last-child) {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.75rem;
}

/* Animation de fondu pour les nouvelles activités */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.activity-item-simple {
    animation: fadeInUp 0.3s ease-out;
}

/* Effet de profondeur pour les cartes au survol */
.dashboard-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #c7d2fe;
}
/* ============================================
   CORRECTION URGENTE POUR MODIFIERDOSSIER
   ============================================ */

/* FORCER LE CONTAINER À ÊTRE RESPONSIVE */
.modifier-dossier-container.content-area {
    max-width: 100vw !important;
    width: 100vw !important;
    overflow-x: auto !important;
    padding: 20px 15px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* DÉSACTIVER LES LARGEURS FIXES TROP GRANDES */
.modifier-dossier-container .modern-cards-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important; /* Important pour flexibilité */
}

/* TABLEAUX AVEC DÉFILEMENT HORIZONTAL */
.modifier-dossier-container .table-wrapper,
.modifier-dossier-container .details-financiers-table-container,
.modifier-dossier-container .suivis-history-table-container {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    background: white !important;
}

/* RÉDUIRE LA LARGEUR MINIMALE DES TABLEAUX */
.modifier-dossier-container .details-financiers-table,
.modifier-dossier-container .suivis-history-table {
    min-width: 1900px !important; /* Réduit de 2500px */
    width: auto !important;
    margin-bottom: 0 !important;
}

    /* COMPRESSER LES COLONNES */
    .modifier-dossier-container .details-financiers-table th,
    .modifier-dossier-container .details-financiers-table td {
        min-width: 100px !important;
        max-width: 250px !important;
        padding: 6px 4px !important;
        font-size: 0.75rem !important;
    }

    .modifier-dossier-container .suivis-history-table th,
    .modifier-dossier-container .suivis-history-table td {
        min-width: 60px !important;
        max-width: 180px !important;
        padding: 6px 4px !important;
        font-size: 0.7rem !important;
    }

        /* COLONNE OBSERVATION FIXE */
        .modifier-dossier-container .suivis-history-table td:nth-child(7) {
            min-width: 180px !important;
            max-width: 220px !important;
        }

.modifier-dossier-container .observation-scroll {
    width: 100% !important;
    max-width: 150% !important;
    height: 60px !important;
    font-size: 0.7rem !important;
}

/* AJUSTER LES CARTES */
.modifier-dossier-container .modern-card {
    min-width: 0 !important; /* Important pour flexibilité */
    overflow: visible !important;
}

/* SUR PETITS ÉCRANS */
@media (max-width: 1400px) {
    .modifier-dossier-container .details-financiers-table,
    .modifier-dossier-container .suivis-history-table {
        min-width: 1200px !important;
    }
}

@media (max-width: 1200px) {
    .modifier-dossier-container .modern-cards-container {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .modifier-dossier-container {
        padding: 15px 10px !important;
    }

        .modifier-dossier-container .details-financiers-table,
        .modifier-dossier-container .suivis-history-table {
            min-width: 1200px !important;
            font-size: 0.7rem !important;
        }

            .modifier-dossier-container .suivis-history-table td:nth-child(7) {
                min-width: 150px !important;
                max-width: 200px !important;
            }
}

/* SCROLLBAR VISIBLE */
.modifier-dossier-container::-webkit-scrollbar {
    height: 10px !important;
}

.modifier-dossier-container::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 5px !important;
}

.modifier-dossier-container::-webkit-scrollbar-thumb {
    background: #888 !important;
    border-radius: 5px !important;
}

    .modifier-dossier-container::-webkit-scrollbar-thumb:hover {
        background: #555 !important;
    }

/* Animation globale */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Effet de hover pour toutes les cartes */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .card-hover:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
/***************************************************************************************/
/********************************* portal client **************************************/
/**************************************************************************************/

/* Styles spécifiques client */
.client-dashboard {
    padding: 20px;
}

.dashboard-header {
    background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

    .dashboard-header h2 {
        color: white;
        margin-bottom: 5px;
    }

.card-statistic {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

    .card-statistic:hover {
        transform: translateY(-5px);
    }

    .card-statistic.card-primary {
        border-left: 4px solid #4361ee;
    }

    .card-statistic.card-success {
        border-left: 4px solid #28a745;
    }

    .card-statistic.card-warning {
        border-left: 4px solid #ffc107;
    }

    .card-statistic.card-info {
        border-left: 4px solid #17a2b8;
    }

    .card-statistic .card-icon {
        width: 50px;
        height: 50px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: white;
    }

        .card-statistic .card-icon.bg-primary {
            background-color: #4361ee;
        }

        .card-statistic .card-icon.bg-success {
            background-color: #28a745;
        }

        .card-statistic .card-icon.bg-warning {
            background-color: #ffc107;
        }

        .card-statistic .card-icon.bg-info {
            background-color: #17a2b8;
        }

    .card-statistic .card-value {
        font-size: 28px;
        font-weight: 700;
        margin: 10px 0;
    }

    .card-statistic .card-title {
        font-size: 14px;
        color: #6c757d;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 5px;
    }

    .card-statistic .card-progress {
        margin-top: 15px;
    }

    .card-statistic .card-footer-stats {
        border-top: 1px solid #eee;
        padding-top: 10px;
        margin-top: 10px;
    }

.client-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 36px;
    color: white;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

    .timeline::before {
        content: '';
        position: absolute;
        left: 15px;
        top: 0;
        bottom: 0;
        width: 2px;
        background-color: #e9ecef;
    }

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid #4361ee;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .timeline-marker i {
        color: #4361ee;
        font-size: 12px;
    }

.timeline-content {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

    .timeline-header h6 {
        margin-bottom: 0;
        font-size: 14px;
    }

.timeline-time {
    font-size: 12px;
    color: #6c757d;
}

.mes-dossiers .page-header {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filters-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

    .filters-card .card-body {
        padding: 20px;
    }

.table-hover tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.card-summary {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

    .card-summary .card-value {
        font-size: 24px;
        font-weight: 700;
        margin: 10px 0;
    }

.detail-dossier-client .page-header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.statut-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 36px;
    color: white;
}

    .statut-badge.statut-actif {
        background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    }

    .statut-badge.statut-inactif {
        background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    }

    .statut-badge.statut-resolu {
        background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    }

    .statut-badge.statut-regle {
        background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    }

.stats-client .chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.statut-legend {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 15px;
    }

    .card-statistic .card-value {
        font-size: 24px;
    }

    .client-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline-marker {
        left: -20px;
        width: 24px;
        height: 24px;
    }
}
/* Styles spécifiques client */
.client-dashboard {
    padding: 20px;
}

.dashboard-header {
    background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

    .dashboard-header h2 {
        color: white;
        margin-bottom: 5px;
    }

.card-statistic {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

    .card-statistic:hover {
        transform: translateY(-5px);
    }

    .card-statistic .card-icon {
        width: 50px;
        height: 50px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: white;
    }

        .card-statistic .card-icon.bg-primary {
            background-color: #4361ee;
        }

        .card-statistic .card-icon.bg-success {
            background-color: #28a745;
        }

        .card-statistic .card-icon.bg-warning {
            background-color: #ffc107;
        }

        .card-statistic .card-icon.bg-info {
            background-color: #17a2b8;
        }

    .card-statistic .card-value {
        font-size: 28px;
        font-weight: 700;
        margin: 10px 0;
    }

    .card-statistic .card-title {
        font-size: 14px;
        color: #6c757d;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 5px;
    }

.client-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 36px;
    color: white;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

    .timeline::before {
        content: '';
        position: absolute;
        left: 15px;
        top: 0;
        bottom: 0;
        width: 2px;
        background-color: #e9ecef;
    }

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid #4361ee;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .timeline-marker i {
        color: #4361ee;
        font-size: 12px;
    }

.timeline-content {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mes-dossiers .page-header {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-summary {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

    .card-summary .card-value {
        font-size: 24px;
        font-weight: 700;
        margin: 10px 0;
    }

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 15px;
    }

    .card-statistic .card-value {
        font-size: 24px;
    }

    .client-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .timeline {
        padding-left: 20px;
    }
}
/* Styles pour les stats client */
.stats-client .page-header {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.statut-chart-item {
    text-align: center;
    padding: 15px;
    margin: 0 10px;
    min-width: 120px;
}

.statut-legend {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin: 0 auto 10px;
}

    .statut-legend.bg-success {
        background-color: #28a745;
    }

    .statut-legend.bg-secondary {
        background-color: #6c757d;
    }

    .statut-legend.bg-warning {
        background-color: #ffc107;
    }

.finances-stats {
    padding: 20px 0;
}

.finance-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

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

.finance-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 5px;
}

.finance-value {
    font-size: 18px;
    font-weight: 700;
}

.detail-dossier-client .statut-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 36px;
    color: white;
}

.statut-badge.statut-actif {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

.statut-badge.statut-inactif {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.statut-badge.statut-resolu {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.statut-badge.statut-regle {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}
/***********************************************************************/
/* Améliorations générales pour les tables */
.detail-dossier-client .table {
    margin-bottom: 0;
}

/* Tables plus aérées */
.detail-dossier-client .table-borderless td,
.detail-dossier-client .table-borderless th {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
}

/* Pour les tables de données (Supports financiers) */
.detail-dossier-client .table-sm {
    --bs-table-cell-padding: 0.75rem;
    font-size: 0.95rem;
}

    .detail-dossier-client .table-sm thead th {
        padding-top: 1rem;
        padding-bottom: 1rem;
        font-weight: 600;
        background-color: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
    }

    .detail-dossier-client .table-sm tbody td {
        padding: 0.75rem 0.5rem;
        border-bottom: 1px solid #f0f0f0;
    }

    .detail-dossier-client .table-sm tbody tr:hover {
        background-color: #f8f9fa;
    }

/* Espacement amélioré pour les cartes */
.detail-dossier-client .card-body {
    padding: 1.5rem;
}

/* Largeur des colonnes optimisée */
.detail-dossier-client .table th {
    white-space: nowrap;
    min-width: 120px;
}

.detail-dossier-client .table td {
    word-break: break-word;
}

/* Badges améliorés */
.detail-dossier-client .badge {
    padding: 0.5em 0.8em;
    font-size: 0.85em;
    font-weight: 500;
}
/* Styles pour les cartes financières */
.financial-card {
    height: 100%;
    background: linear-gradient(to bottom right, #f8f9fa, #e9ecef);
}

.info-section {
    background: linear-gradient(to bottom right, #f8f9fa, #ffffff);
}

/* Amélioration des bordures */
.detail-dossier-client .border {
    border-color: #e0e0e0 !important;
}

/* Espacement entre les lignes */
.detail-dossier-client .table tr > * {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .detail-dossier-client .table-responsive {
        font-size: 0.9rem;
    }

    .detail-dossier-client .card-body {
        padding: 1rem;
    }

    .detail-dossier-client .financial-card,
    .detail-dossier-client .info-section {
        padding: 1rem !important;
    }
}
/* ===== DESIGN PROFESSIONNEL DOSSIERS ===== */

.detail-dossier-client {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

    /* En-tête amélioré */
    .detail-dossier-client .page-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 2rem 1.5rem;
        border-radius: 12px;
        margin-bottom: 2rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

        .detail-dossier-client .page-header h2 {
            font-weight: 600;
            letter-spacing: -0.5px;
        }

    /* Cards élégantes */
    .detail-dossier-client .card {
        border: none;
        border-radius: 12px;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        margin-bottom: 1.5rem;
        overflow: hidden;
    }

        .detail-dossier-client .card:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
        }

    .detail-dossier-client .card-header {
        border-bottom: none;
        padding: 1.5rem 1.5rem 0.5rem;
        background: transparent;
    }

        .detail-dossier-client .card-header h5 {
            font-weight: 600;
            color: #2c3e50;
            font-size: 1.25rem;
        }

        /* En-têtes colorés */
        .detail-dossier-client .card-header.bg-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        }

            .detail-dossier-client .card-header.bg-primary h5 {
                color: white !important;
            }

    /* ===== TABLES PROFESSIONNELLES ===== */

    /* Table principale */
    .detail-dossier-client .table-main {
        --table-border-radius: 10px;
        --table-padding: 1rem;
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
    }

        .detail-dossier-client .table-main thead th {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            color: #495057;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.85rem;
            letter-spacing: 0.5px;
            padding: 1.25rem 1rem;
            border: none;
            position: relative;
        }

            .detail-dossier-client .table-main thead th:first-child {
                border-top-left-radius: var(--table-border-radius);
            }

            .detail-dossier-client .table-main thead th:last-child {
                border-top-right-radius: var(--table-border-radius);
            }

        .detail-dossier-client .table-main tbody td {
            padding: 1.25rem 1rem;
            vertical-align: middle;
            border-bottom: 1px solid #f0f0f0;
            background: white;
        }

        .detail-dossier-client .table-main tbody tr {
            transition: all 0.2s ease;
        }

            .detail-dossier-client .table-main tbody tr:hover {
                background-color: #f8f9ff;
                transform: scale(1.002);
                box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
            }

            .detail-dossier-client .table-main tbody tr:last-child td {
                border-bottom: none;
            }

    /* Badges élégants */
    .detail-dossier-client .badge-support {
        padding: 0.5rem 1rem;
        border-radius: 20px;
        font-weight: 500;
        font-size: 0.85rem;
        letter-spacing: 0.3px;
        display: inline-block;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    /* Espacement amélioré entre colonnes */
    .detail-dossier-client .table-main th:nth-child(1),
    .detail-dossier-client .table-main td:nth-child(1) {
        padding-left: 1.5rem;
        min-width: 200px; /* Plus d'espace pour Type */
    }

    .detail-dossier-client .table-main th:nth-child(2),
    .detail-dossier-client .table-main td:nth-child(2) {
        min-width: 120px; /* Espace pour N° */
        padding-left: 2rem; /* Espacement entre Type et N° */
    }

    /* Alignement des nombres */
    .detail-dossier-client .text-end {
        font-family: 'SF Mono', Monaco, 'Courier New', monospace;
        font-weight: 500;
    }

/* ===== SECTIONS IDENTITE ET REGLEMENTS ===== */

/* Section identité */
.identity-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 1px solid #e3e6ff;
    border-radius: 10px;
    padding: 1.75rem;
    height: 100%;
    position: relative;
    overflow: hidden;
}

    .identity-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(to bottom, #667eea, #764ba2);
    }

    .identity-card h6 {
        color: #2c3e50;
        font-weight: 600;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid #e3e6ff;
    }

    .identity-card .info-row {
        display: flex;
        align-items: flex-start;
        margin-bottom: 1.25rem;
        padding: 0.5rem 0;
    }

    .identity-card .info-label {
        width: 120px;
        color: #6c757d;
        font-weight: 500;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .identity-card .info-value {
        flex: 1;
        color: #2c3e50;
        font-weight: 500;
        font-size: 1rem;
        line-height: 1.5;
    }

/* Section règlements */
.payments-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fff9 100%);
    border: 1px solid #e3ffe6;
    border-radius: 10px;
    padding: 1.75rem;
    height: 100%;
    position: relative;
    overflow: hidden;
}

    .payments-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(to bottom, #00b09b, #96c93d);
    }

/* ===== STATISTIQUES FINANCIERES ===== */

.financial-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

    .stat-card .stat-value {
        font-size: 2rem;
        font-weight: 700;
        color: #2c3e50;
        line-height: 1;
        margin: 0.5rem 0;
    }

    .stat-card .stat-label {
        color: #6c757d;
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 0.5rem;
    }

    .stat-card .stat-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

/* ===== BADGES DE STATUT ===== */

.statut-badge {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.statut-actif .statut-badge {
    background: linear-gradient(135deg, #00b09b, #96c93d);
    color: white;
}

.statut-regle .statut-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.statut-resolu .statut-badge {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: white;
}

.statut-inactif .statut-badge {
    background: linear-gradient(135deg, #8e9eab, #eef2f3);
    color: #6c757d;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .detail-dossier-client .page-header {
        padding: 1.5rem 1rem;
    }

    .financial-stats {
        grid-template-columns: 1fr;
    }

    .detail-dossier-client .table-responsive {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
}
/* Styles pour les nombres compacts */
.compact-number {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Consolas', monospace;
    font-size: 1.5rem !important; /* Réduit de 2rem à 1.5rem */
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-card {
    min-height: 140px;
    display: flex;
    flex-direction: column;
}

    .stat-card .stat-value {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 0;
        margin: 0.25rem 0;
    }

/* Adaptation pour écrans plus petits */
@media (max-width: 1200px) {
    .compact-number {
        font-size: 1.3rem !important;
    }

    .stat-card {
        min-height: 130px;
    }
}

@media (max-width: 768px) {
    .compact-number {
        font-size: 1.1rem !important;
    }

    .financial-stats {
        gap: 1rem;
    }

    .stat-card {
        min-height: 120px;
        padding: 1rem;
    }
}

/* Texte compact pour la barre de progression */
.compact-text {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.85rem;
}

/* Optimisation pour très grands nombres */
.compact-number.smaller {
    font-size: 1.3rem !important;
}

/* Version ultra compacte pour les très grands montants */
.compact-number.ultra-compact {
    font-size: 1.1rem !important;
    font-weight: 700;
}
/* Améliorations pour le tableau */
.table-responsive {
    overflow-x: auto;
    max-height: 600px;
    scrollbar-width: thin;
}

    .table-responsive::-webkit-scrollbar {
        height: 8px;
        width: 8px;
    }

    .table-responsive::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .table-responsive::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }

        .table-responsive::-webkit-scrollbar-thumb:hover {
            background: #a1a1a1;
        }

/* Styles pour les cellules du tableau */
.table td {
    vertical-align: middle;
    padding: 12px 8px;
}

.table th {
    padding: 15px 8px;
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Style pour les codes dossiers */
.code-dossier-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Tooltip personnalisé */
[title] {
    position: relative;
}

    [title]:hover::after {
        content: attr(title);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: #333;
        color: white;
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 0.8rem;
        white-space: nowrap;
        z-index: 1000;
        pointer-events: none;
    }

/* Badges améliorés */
.badge {
    padding: 4px 8px;
    font-weight: 500;
    border-radius: 4px;
}

/* Boutons d'action */
.actions-cell .btn-group-vertical {
    gap: 4px;
}

.actions-cell .btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
/* Styles pour les sections Admin/Contentieux */
.admin-contentieux-section {
    border-left: 4px solid #6f42c1;
    padding-left: 15px;
    margin-top: 20px;
    margin-bottom: 15px;
    background-color: rgba(111, 66, 193, 0.05);
    border-radius: 5px;
    padding: 15px;
}

.admin-section-title {
    color: #6f42c1;
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

    .admin-section-title i {
        font-size: 1.1rem;
    }

/* Styles pour l'affichage de la différence de dates */
.date-difference-info {
    background-color: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.15);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.date-difference-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 500;
    color: #0d6efd;
    font-size: 0.95rem;
}

    .date-difference-header i {
        font-size: 1.2rem;
    }

.date-difference-values {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.date-diff-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: white;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

    .date-diff-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

.date-diff-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0d6efd;
    min-width: 20px;
    text-align: center;
}

.date-diff-label {
    font-size: 0.85rem;
    color: #6c757d;
    white-space: nowrap;
}

.date-diff-empty {
    color: #6c757d;
    font-style: italic;
    padding: 8px 0;
}

.date-difference-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #dee2e6;
    text-align: center;
    font-size: 0.85rem;
}

    .date-difference-total i {
        margin-right: 5px;
        color: #6c757d;
    }

/* Styles pour les champs Admin dans les résumés */
.admin-summary {
    background-color: rgba(111, 66, 193, 0.1);
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #6f42c1;
    margin: 10px 0;
}

    .admin-summary .summary-label {
        color: #6f42c1;
        font-weight: 500;
    }

        .admin-summary .summary-label i {
            margin-right: 6px;
        }

.admin-value {
    color: #6f42c1;
    font-weight: 700;
}

.admin-info-note {
    background-color: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    border-left: 3px solid #6f42c1;
}

    .admin-info-note i {
        font-size: 1.1rem;
        flex-shrink: 0;
    }

/* Validation des dates */
.input-error {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.05) !important;
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-contentieux-section {
        padding: 12px;
        margin-left: -10px;
        margin-right: -10px;
        border-left-width: 3px;
    }

    .date-difference-values {
        gap: 8px;
        justify-content: center;
    }

    .date-diff-item {
        padding: 6px 10px;
        flex: 1;
        min-width: 80px;
        justify-content: center;
    }

    .date-diff-number {
        font-size: 1.1rem;
    }

    .date-diff-label {
        font-size: 0.8rem;
    }
}

/* Animation pour le calcul */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.date-difference-info {
    animation: fadeIn 0.3s ease-out;
}

/* Tooltip pour les infobulles */
.hint-message {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .hint-message i {
        font-size: 0.9rem;
    }
/* Dans votre fichier CSS */
.admin-contentieux-section {
    border-left: 4px solid #6f42c1;
    padding-left: 15px;
    margin-top: 20px;
    background-color: rgba(111, 66, 193, 0.05);
    border-radius: 5px;
    padding: 15px;
}

.admin-section-title {
    color: #6f42c1;
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-summary {
    background-color: rgba(111, 66, 193, 0.1);
    padding: 8px;
    border-radius: 5px;
    border-left: 3px solid #6f42c1;
}

.admin-value {
    color: #6f42c1;
    font-weight: bold;
}

.admin-info-note {
    background-color: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
    padding: 10px;
    border-radius: 5px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}
/* Styles pour les composants de recherche */
.search-select-container {
    position: relative;
    margin-bottom: 0.5rem;
}

.search-input-wrapper {
    position: relative;
}

.search-input {
    padding-right: 2.5rem !important;
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    margin-top: 0.25rem;
}

    .select-dropdown.show {
        display: block;
    }

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: #f8f9fa;
        outline: none;
    }

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

.option-code {
    font-weight: 600;
    color: #0d6efd;
    min-width: 80px;
}

.option-name {
    flex-grow: 1;
    margin: 0 0.5rem;
}

.option-meta {
    font-size: 0.85rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.no-results {
    color: #6c757d;
    text-align: center;
    cursor: default;
}

    .no-results:hover {
        background-color: white;
    }

.selected-item-display {
    margin-top: 0.5rem;
}

.selected-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #e7f1ff;
    border: 1px solid #b6d4fe;
    border-radius: 0.375rem;
    color: #052c65;
}

.clear-selection {
    background: none;
    border: none;
    color: #6c757d;
    padding: 0.125rem;
    cursor: pointer;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .clear-selection:hover {
        background-color: rgba(0, 0, 0, 0.1);
        color: #dc3545;
    }

.debiteur-meta {
    font-size: 0.875rem;
    color: #6c757d;
    margin-left: 0.5rem;
}

.filtered-count {
    margin-left: 0.5rem;
    font-weight: 600;
    color: #0d6efd;
}

/* Pour les écrans mobiles */
@@media (max-width: 768px) {
    .select-dropdown {
        position: fixed;
        left: 1rem;
        right: 1rem;
        max-height: 50vh;
        z-index: 1050;
    }

    .dropdown-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .option-code, .option-name, .option-meta {
        width: 100%;
    }
}
/* Styles pour les composants de recherche */
.search-select-container {
    position: relative;
    margin-bottom: 0.5rem;
}

.search-input-wrapper {
    position: relative;
}

.search-input {
    padding-right: 2.5rem !important;
    width: 100%;
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    margin-top: 0.25rem;
}

    .select-dropdown.show {
        display: block;
    }

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: #f8f9fa;
        outline: none;
    }

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

.option-code {
    font-weight: 600;
    color: #0d6efd;
    min-width: 80px;
}

.option-name {
    flex-grow: 1;
    margin: 0 0.5rem;
}

.option-meta {
    font-size: 0.85rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.no-results {
    color: #6c757d;
    text-align: center;
    cursor: default;
}

    .no-results:hover {
        background-color: white;
    }

.selected-item-display {
    margin-top: 0.5rem;
}

.selected-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #e7f1ff;
    border: 1px solid #b6d4fe;
    border-radius: 0.375rem;
    color: #052c65;
}

.clear-selection {
    background: none;
    border: none;
    color: #6c757d;
    padding: 0.125rem;
    cursor: pointer;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .clear-selection:hover {
        background-color: rgba(0, 0, 0, 0.1);
        color: #dc3545;
    }

.debiteur-meta {
    font-size: 0.875rem;
    color: #6c757d;
    margin-left: 0.5rem;
}

.filtered-count {
    margin-left: 0.5rem;
    font-weight: 600;
    color: #0d6efd;
}

/* Pour les écrans mobiles */
@@media (max-width: 768px) {
    .select-dropdown {
        position: fixed;
        left: 1rem;
        right: 1rem;
        max-height: 50vh;
        z-index: 1050;
    }

    .dropdown-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .option-code, .option-name, .option-meta {
        width: 100%;
    }
}
/* Styles pour la section Informations Impayé */
.admin-contentieux-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.admin-section-title {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.impaye-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.impaye-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.impaye-label {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

.impaye-value {
    font-size: 0.8rem;
    color: #495057;
    word-break: break-word;
}

.date-difference-values {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.date-diff-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: #f8f9fa;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

.date-diff-number {
    font-weight: 600;
    color: #495057;
}

.date-diff-label {
    color: #6c757d;
}

.impaye-item.admin-only {
    grid-column: span 2;
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 0.25rem;
    border-left: 3px solid #dc3545;
}

    .impaye-item.admin-only .impaye-label {
        color: #dc3545;
        font-weight: 600;
    }

    .impaye-item.admin-only .impaye-value.admin-value {
        color: #dc3545;
        font-weight: 600;
    }

/* Pour les écrans plus petits */
@media (max-width: 768px) {
    .impaye-info-grid {
        grid-template-columns: 1fr;
    }

    .impaye-item.admin-only {
        grid-column: span 1;
    }
}

.btn-orange-gradient-calc-date {
    color: white; /* texte blanc */
    background: linear-gradient(45deg, #FF8C00, #FF4500); /* orange foncé vers orange rouge */
    border: 1px solid #FF4500;
    transition: background 0.3s;
}

    .btn-orange-gradient-calc-date:hover {
        background: linear-gradient(45deg, #FF4500, #FF8C00);
        border-color: #FF8C00;
    }
/* Style pour les lignes verrouillées */
.row-locked {
    background-color: #f8f9fa !important;
    opacity: 0.9;
}

    .row-locked td {
        background-color: #f8f9fa !important;
    }

.highlight-new {
    background-color: #e8f5e9 !important;
    border-left: 3px solid #28a745 !important;
}

.readonly-field {
    background-color: #e9ecef !important;
    cursor: not-allowed !important;
    color: #6c757d !important;
}

/* Tooltips améliorés */
.action-button-with-tooltip {
    position: relative;
    display: inline-block;
    margin: 0 2px;
}

    .action-button-with-tooltip:hover::after {
        content: attr(title);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background-color: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        white-space: nowrap;
        z-index: 1000;
        margin-bottom: 5px;
    }

/* Boutons avec permissions */
.btn-action {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-view {
    background-color: #6c757d;
    color: white;
}

    .btn-view:hover {
        background-color: #5a6268;
    }

.btn-edit {
    background-color: #0d6efd;
    color: white;
}

    .btn-edit:hover {
        background-color: #0b5ed7;
    }

    .btn-edit:disabled {
        background-color: #6c757d;
        cursor: not-allowed;
    }

.btn-danger {
    background-color: #dc3545;
    color: white;
}

    .btn-danger:hover {
        background-color: #bb2d3b;
    }

.btn-locked {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Badges d'information */
.permission-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    margin-left: 0.5rem;
}

    .permission-badge.admin {
        background-color: #dc3545;
        color: white;
    }

    .permission-badge.manager {
        background-color: #0d6efd;
        color: white;
    }

    .permission-badge.contentieux {
        background-color: #198754;
        color: white;
    }

    .permission-badge.agent {
        background-color: #6f42c1;
        color: white;
    }
/* Styles pour la popup de suivi */
.popup-form-control:disabled,
.popup-amount-input:disabled,
.popup-textarea:disabled,
.popup-switch:disabled {
    background-color: #f8f9fa !important;
    cursor: not-allowed !important;
    color: #6c757d !important;
    border-color: #dee2e6 !important;
    opacity: 0.8;
}

    .popup-switch:disabled + .popup-switch-label {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* Messages d'information */
.popup-help-text {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

    .popup-help-text.text-warning {
        color: #ffc107;
    }

    .popup-help-text.text-danger {
        color: #dc3545;
    }

/* Badges d'état */
.badge.badge-info {
    background-color: #0dcaf0;
    color: #000;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Résumé financier */
.financial-summary-card {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
}

.financial-summary-title {
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 0.75rem;
}

.financial-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.financial-summary-item {
    display: flex;
    flex-direction: column;
}

.financial-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.financial-value.monetary-field-warning {
    color: #fd7e14;
    font-weight: 500;
}

/* Message d'information */
.info-message.info {
    background-color: #e7f1ff;
    border: 1px solid #b3d7ff;
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-size: 0.9rem;
}
/* Styles pour la page des encaissements */
.encaissements-table th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.encaissements-table td {
    vertical-align: middle;
}

/* Badges cliquables */
.badge[style*="cursor: pointer"] {
    transition: opacity 0.2s;
}

    .badge[style*="cursor: pointer"]:hover {
        opacity: 0.8;
    }

/* Modal */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Pagination active */
.page-item.active .page-link {
    background-color: #4361ee;
    border-color: #4361ee;
}

/* Accordion */
.accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: #4361ee;
}

/* Sub-menu scrollable */
.scrollable-submenu {
    max-height: 300px;
    overflow-y: auto;
}
/* Style pour l'interface contentieux */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.badge {
    font-size: 0.85em;
}

.card-header {
    font-weight: 600;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

/* Style pour les dates */
input[type="date"] {
    max-width: 200px;
}

/* Style pour la pagination */
.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Responsive table */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.9em;
    }
}
/* Styles pour les observations */
.observation-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    max-height: 2.8em;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .observation-cell:hover {
        background-color: #f8f9fa;
        border-radius: 4px;
        padding: 4px;
    }

.observation-modal-content {
    white-space: pre-line;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

/* Tooltip custom */
.custom-tooltip {
    position: relative;
    display: inline-block;
}

    .custom-tooltip .tooltip-text {
        visibility: hidden;
        width: 300px;
        background-color: #333;
        color: #fff;
        text-align: left;
        padding: 10px;
        border-radius: 4px;
        position: absolute;
        z-index: 1000;
        bottom: 125%;
        left: 50%;
        margin-left: -150px;
        opacity: 0;
        transition: opacity 0.3s;
        white-space: pre-line;
        font-size: 0.9em;
        line-height: 1.4;
    }

    .custom-tooltip:hover .tooltip-text {
        visibility: visible;
        opacity: 1;
    }
/* Styles pour l'observation */
.observation-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    max-height: 2.8em;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

    .observation-cell:hover {
        background-color: #e9ecef;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

.observation-modal-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Styles pour le tableau */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transition: background-color 0.2s;
}

.badge {
    font-size: 0.85em;
    font-weight: 500;
}

/* État vide */
.empty-state {
    color: #6c757d;
}

    .empty-state .display-1 {
        opacity: 0.3;
    }

/* Pagination améliorée */
.pagination .page-link {
    border-radius: 4px;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Responsive */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.85em;
    }

    .observation-cell {
        max-width: 150px;
        font-size: 0.8em;
    }
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    font-weight: bold;
}

.pagination .page-link {
    min-width: 40px;
    text-align: center;
}

/* Mettre en évidence la pagination */
.pagination {
    margin-bottom: 0;
}

/* Style pour le sélecteur de page */
.page-size-selector {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 5px 10px;
}

/* Badges d'état */
.badge-etat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

    .badge-etat.actif {
        background-color: #e7f5ff;
        color: #0d6efd;
        border: 1px solid #b3d7ff;
    }

    .badge-etat.cloture {
        background-color: #e8f5e8;
        color: #198754;
        border: 1px solid #c3e6cb;
    }

    .badge-etat small {
        font-size: 0.75rem;
        opacity: 0.8;
        margin-left: 4px;
    }

/* Boutons de filtre */
.filter-buttons {
    display: flex;
    gap: 8px;
}

.btn-filter {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    font-weight: 500;
}

    .btn-filter.active {
        background: #0d6efd;
        color: white;
        border-color: #0d6efd;
    }

    .btn-filter:hover:not(.active) {
        background: #f8f9fa;
    }

/* Stat cards améliorées */
.stat-content small {
    font-size: 0.75rem;
    display: block;
    margin-top: 2px;
    opacity: 0.8;
}

/* Amélioration des colonnes du tableau */
.col-etat {
    width: 120px;
    min-width: 120px;
}

.col-statut {
    width: 140px;
    min-width: 140px;
}

/* Carte d'activités */
.activity-item-simple .activity-content-simple p {
    margin-bottom: 2px;
}

/* Responsive */
@media (max-width: 1200px) {
    .filter-buttons {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .btn-filter {
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .col-etat {
        width: 100px;
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .card-header-modern .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }

    .filter-buttons {
        align-self: stretch;
    }

    .col-etat, .col-statut, .col-actions {
        display: none;
    }
}
/* Styles pour la recherche */
.search-section {
    animation: slideDown 0.3s ease;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: #6c757d;
    font-size: 1rem;
}

.search-input {
    padding-left: 40px;
    padding-right: 40px;
    height: 48px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

    .search-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
        outline: none;
    }

.btn-clear-search {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #6c757d;
    padding: 4px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .btn-clear-search:hover {
        background-color: #f8f9fa;
        color: #dc3545;
    }

.search-stats {
    font-size: 0.95rem;
    padding: 0 12px;
}

.btn-clear-filter {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 4px 8px;
}

    .btn-clear-filter:hover {
        color: var(--primary-dark);
        text-decoration: underline;
    }

/* Surbrillance des résultats */
.highlight {
    background-color: #fff3cd;
    color: #856404;
    padding: 2px 0;
    border-radius: 3px;
    font-weight: 600;
}

/* En-têtes triables */
.sortable-header {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

    .sortable-header:hover {
        color: var(--primary-color);
    }

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .search-stats {
        text-align: left !important;
        margin-top: 12px;
    }

    .search-box {
        width: 100%;
    }
}
/* Badge spécifique pour les codes dans TypeSupports */
.badge.badge-support-code {
    background-color: white !important;
    color: #262e3b !important;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    border: none;
    box-shadow: 0 2px 4px rgba(38, 46, 59, 0.1);
    display: inline-block;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

    /* Effet hover optionnel */
    .badge.badge-support-code:hover {
        background-color: #ccd7e3 !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(38, 46, 59, 0.15);
        transition: all 0.2s ease;
    }
---------------
.badge.badge-statut-code {
    background-color: white !important;
    color: #262e3b !important;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    border: none;
    box-shadow: 0 2px 4px rgba(38, 46, 59, 0.1);
    display: inline-block;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

/* Effet hover optionnel */
.badge.badge-statut-code:hover {
    background-color: #ccd7e3 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(38, 46, 59, 0.15);
    transition: all 0.2s ease;
}
---------------
.badge.badge-situation-code {
    background-color: white !important;
    color: #262e3b !important;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    border: none;
    box-shadow: 0 2px 4px rgba(38, 46, 59, 0.1);
    display: inline-block;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

/* Effet hover optionnel */
.badge.badge-situation-code:hover {
    background-color: #ccd7e3 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(38, 46, 59, 0.15);
    transition: all 0.2s ease;
}
---------------
.badge.badge-sort-code {
    background-color: white !important;
    color: #262e3b !important;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    border: none;
    box-shadow: 0 2px 4px rgba(38, 46, 59, 0.1);
    display: inline-block;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

/* Effet hover optionnel */
.badge.badge-sort-code:hover {
    background-color: #ccd7e3 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(38, 46, 59, 0.15);
    transition: all 0.2s ease;
}
/* ===== NAVIGATION ULTRA-COMPACTE ===== */

.nav-group {
    margin-bottom: 0.75rem !important;
}

.nav-group-title {
    padding: 0.4rem 1rem !important;
    font-size: 0.65rem !important;
}

.nav-item {
    padding: 0.3rem 1rem !important;
    min-height: 28px !important;
}

.nav-item-content i {
    font-size: 1rem !important;
    min-width: 18px !important;
}

.nav-item-content span {
    font-size: 0.8rem !important;
}

.sub-nav-item {
    padding: 0.25rem 0.5rem 0.25rem 1.6rem !important;
    font-size: 0.75rem !important;
    min-height: 24px !important;
}

.sub-nav-section {
    margin-bottom: 0.5rem !important;
}

.sub-nav-section-title {
    padding: 0.2rem 0.5rem !important;
    font-size: 0.65rem !important;
}
/* Styles pour les montants formatés */
.formatted-montant {
    font-family: 'Courier New', monospace;
    font-weight: 500;
    display: inline-block;
    min-width: 100px;
    text-align: right;
    padding: 0.375rem 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
}

.formatted-montant-large {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    display: inline-block;
    min-width: 120px;
    text-align: right;
}

/* Pour les champs éditables */
.monetary-field {
    text-align: right !important;
    font-family: 'Courier New', monospace !important;
}

/* Dans le tableau */
.details-financiers-table td .formatted-montant,
.suivis-history-table td .formatted-montant {
    background-color: transparent;
    border: none;
    padding: 0.25rem 0.5rem;
    min-width: 80px;
}

/* Pour les montants dans les popups */
.popup-form-control .formatted-montant {
    background-color: #f1f3f5;
    border: 1px solid #ced4da;
    width: 100%;
}
/* Notifications dans le popup */
.popup-notification {
    margin: 10px 20px;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    animation: slideIn 0.3s ease;
}

    .popup-notification ul {
        margin: 0;
        padding-left: 20px;
    }

    .popup-notification li {
        margin: 2px 0;
    }

.popup-notification-info {
    background-color: #e7f3ff;
    border-left: 4px solid #0066cc;
    color: #004080;
}

.popup-notification-success {
    background-color: #e6ffe6;
    border-left: 4px solid #28a745;
    color: #1e7e34;
}

.popup-notification-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.popup-notification-danger {
    background-color: #ffe6e6;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.btn-close-notification {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    margin-left: auto;
    padding: 4px 8px;
    opacity: 0.7;
}

    .btn-close-notification:hover {
        opacity: 1;
    }

.input-error {
    border-color: #dc3545 !important;
    background-color: #fff8f8 !important;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}
/* Notifications dans le popup */
.popup-notification {
    margin: 10px 20px;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    animation: slideIn 0.3s ease;
    font-size: 14px;
}

    .popup-notification ul {
        margin: 0;
        padding-left: 20px;
        flex: 1;
    }

    .popup-notification li {
        margin: 2px 0;
    }

.popup-notification-info {
    background-color: #e7f3ff;
    border-left: 4px solid #0066cc;
    color: #004080;
}

.popup-notification-success {
    background-color: #e6ffe6;
    border-left: 4px solid #28a745;
    color: #1e7e34;
}

.popup-notification-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.popup-notification-danger {
    background-color: #ffe6e6;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.btn-close-notification {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    margin-left: auto;
    padding: 4px 8px;
    opacity: 0.7;
    font-size: 16px;
}

    .btn-close-notification:hover {
        opacity: 1;
    }

.input-error {
    border-color: #dc3545 !important;
    background-color: #fff8f8 !important;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}
/*-----------------------------------------
modifier dossier
-----------------------------------------*/
/* STYLES UNIFORMISÉS POUR LA TABLE DES SUIVIS */
.suivis-history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px; /* Taille de base uniforme */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

    .suivis-history-table th {
        background: #f8fafd;
        color: #34495e;
        font-weight: 600;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        padding: 12px 8px;
        white-space: nowrap;
        border-bottom: 2px solid #e0e7ed;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .suivis-history-table td {
        padding: 10px 8px;
        border-bottom: 1px solid #ecf0f1;
        color: #2c3e50;
        font-size: 12px;
        line-height: 1.4;
    }

    /* Uniformisation des dates */
    .suivis-history-table .date-value {
        font-size: 12px;
        font-family: 'Inter', monospace;
        color: #34495e;
        white-space: nowrap;
    }

    /* Uniformisation des montants */
    .suivis-history-table .monetary-value {
        font-size: 12px;
        font-family: 'Inter', monospace;
        font-weight: 500;
        white-space: nowrap;
    }

    .suivis-history-table .reglement-cr {
        color: #27ae60;
    }

    .suivis-history-table .reglement-ex {
        color: #2980b9;
    }

    .suivis-history-table .charge {
        color: #e67e22;
    }

    .suivis-history-table .frais-contentieux {
        color: #8e44ad;
    }

    .suivis-history-table .total-creance {
        color: #16a085;
    }

    .suivis-history-table .total-excellia {
        color: #3498db;
    }

    .suivis-history-table .reste-creance {
        color: #e74c3c;
    }

    .suivis-history-table .reste-excellia {
        color: #c0392b;
    }

    .suivis-history-table .reste-total {
        color: #d35400;
        font-weight: 600;
    }

    /* Badges uniformisés */
    .suivis-history-table .badge {
        font-size: 11px;
        font-weight: 500;
        padding: 4px 8px;
        border-radius: 12px;
        text-transform: none;
    }

    .suivis-history-table .bg-success {
        background: #27ae60 !important;
        color: white;
    }

    .suivis-history-table .bg-secondary {
        background: #95a5a6 !important;
        color: white;
    }

    /* Observations avec défilement */
    .suivis-history-table .observation-scroll {
        max-width: 250px;
        overflow-x: auto;
        white-space: nowrap;
        padding: 2px 4px;
        font-size: 12px;
        color: #34495e;
        scrollbar-width: thin;
    }

        .suivis-history-table .observation-scroll::-webkit-scrollbar {
            height: 4px;
        }

        .suivis-history-table .observation-scroll::-webkit-scrollbar-thumb {
            background: #bdc3c7;
            border-radius: 4px;
        }

    /* Cellules textuelles uniformisées */
    .suivis-history-table .status-badge {
        display: inline-block;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 11px;
        font-weight: 500;
        text-align: center;
        white-space: nowrap;
    }

    .suivis-history-table .status-active {
        background: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
    }

    .suivis-history-table .status-inactive {
        background: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
    }

    .suivis-history-table .action-value,
    .suivis-history-table .sort-value,
    .suivis-history-table .charge-value,
    .suivis-history-table .region-value,
    .suivis-history-table .tier-value,
    .suivis-history-table .modified-by,
    .suivis-history-table .modified-date {
        font-size: 12px;
        color: #34495e;
        white-space: nowrap;
    }

    /* Ligne du dernier suivi */
    .suivis-history-table .last-suivi-row {
        background-color: #f0f9ff;
        border-left: 3px solid #3498db;
    }

    /* Actions boutons */
    .suivis-history-table .action-buttons {
        display: flex;
        gap: 6px;
        justify-content: center;
    }

    .suivis-history-table .btn-action {
        width: 28px;
        height: 28px;
        border-radius: 6px;
        border: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .suivis-history-table .btn-view {
        background: #ecf0f1;
        color: #34495e;
    }

        .suivis-history-table .btn-view:hover {
            background: #bdc3c7;
            color: #2c3e50;
        }

    .suivis-history-table .btn-edit {
        background: #fff3cd;
        color: #856404;
    }

        .suivis-history-table .btn-edit:hover {
            background: #ffe69c;
        }

    .suivis-history-table .btn-danger {
        background: #f8d7da;
        color: #721c24;
    }

        .suivis-history-table .btn-danger:hover {
            background: #f1b0b7;
        }

    .suivis-history-table .btn-locked {
        background: #e9ecef;
        color: #6c757d;
        cursor: not-allowed;
        opacity: 0.65;
    }

/* En-tête du tableau des suivis */
.suivis-history-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
}

    .suivis-history-header .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .suivis-history-header .title-section {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .suivis-history-header .title-icon {
        width: 48px;
        height: 48px;
        background: rgba(255,255,255,0.2);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .suivis-history-header .title-icon i {
            font-size: 24px;
            color: white;
        }

    .suivis-history-header .suivis-title {
        font-size: 20px;
        font-weight: 600;
        color: white;
        margin: 0 0 4px 0;
    }

    .suivis-history-header .suivis-badge {
        background: rgba(255,255,255,0.2);
        color: white;
        font-size: 13px;
        font-weight: 500;
        padding: 4px 12px;
        border-radius: 20px;
        margin-left: 12px;
    }

    .suivis-history-header .suivis-subtitle {
        font-size: 13px;
        color: rgba(255,255,255,0.9);
        margin: 0;
    }

    .suivis-history-header .last-update {
        display: inline-block;
        margin-left: 16px;
        font-size: 12px;
        background: rgba(255,255,255,0.1);
        padding: 4px 10px;
        border-radius: 20px;
    }
/* Styles pour la section financière avec montants uniformisés */
.modern-financial-section {
    background: #f8fafd;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.modern-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .modern-section-title i {
        font-size: 16px;
        color: #3498db;
    }

.modern-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.modern-money-group {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

    .modern-money-group label {
        display: block;
        font-size: 11px;
        font-weight: 500;
        color: #7f8c8d;
        margin-bottom: 6px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

/* UNIFORMISATION DES MONTANTS */
.modern-money-input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px; /* Taille uniforme */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', monospace;
    font-weight: 500;
    line-height: 1.4;
}

    .modern-money-input .formatted-montant {
        font-size: 14px;
        font-weight: 500;
        color: #2c3e50;
    }

    .modern-money-input .currency {
        font-size: 11px;
        color: #95a5a6;
        font-weight: 400;
        margin-left: 4px;
    }

/* Totaux en taille légèrement plus grande mais harmonisée */
.modern-total-box {
    background: linear-gradient(135deg, #f8fafd 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 14px;
    border-left: 4px solid;
}

    .modern-total-box.success {
        border-left-color: #2ecc71;
    }

    .modern-total-box.info {
        border-left-color: #3498db;
    }

    .modern-total-box label {
        font-size: 11px;
        font-weight: 500;
        color: #7f8c8d;
        margin-bottom: 6px;
        display: block;
    }

    .modern-total-box .modern-money-total {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
    }

    .modern-total-box .formatted-montant-large {
        font-size: 16px; /* Légèrement plus grand mais toujours harmonisé */
        font-weight: 600;
        color: #2c3e50;
        font-family: 'Inter', monospace;
    }

    .modern-total-box .currency {
        font-size: 11px;
        color: #95a5a6;
    }

/* Règlements et restes */
.modern-reglement-box, .modern-reste-box {
    background: white;
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #ecf0f1;
}

    .modern-reglement-box label, .modern-reste-box label {
        font-size: 11px;
        font-weight: 500;
        color: #7f8c8d;
        margin-bottom: 6px;
        display: block;
    }

    .modern-reglement-box .modern-money-total,
    .modern-reste-box .modern-money-total {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .modern-reglement-box .formatted-montant,
    .modern-reste-box .formatted-montant {
        font-size: 14px;
        font-weight: 600;
        font-family: 'Inter', monospace;
    }

    .modern-reglement-box .formatted-montant {
        color: #27ae60;
    }

    .modern-reste-box.warning .formatted-montant {
        color: #e67e22;
    }

    .modern-reste-box.danger .formatted-montant {
        color: #e74c3c;
    }

/* Champ éditable */
.modern-money-input.editable input {
    font-size: 14px;
    font-family: 'Inter', monospace;
    font-weight: 500;
    padding: 6px 10px;
    border: 1px solid #dde6e9;
    border-radius: 6px;
    width: 120px;
    text-align: right;
}

    .modern-money-input.editable input:focus {
        border-color: #3498db;
        outline: none;
        box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
    }

/* Synthèse */
.modern-synth-box {
    background: white;
    border-radius: 10px;
    padding: 12px;
    border-top: 3px solid;
}

    .modern-synth-box.primary {
        border-top-color: #3498db;
    }

    .modern-synth-box.danger {
        border-top-color: #e74c3c;
    }

    .modern-synth-box label {
        font-size: 11px;
        font-weight: 500;
        color: #7f8c8d;
        margin-bottom: 6px;
        display: block;
    }

    .modern-synth-box .modern-money-total {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
    }

    .modern-synth-box .formatted-montant {
        font-size: 14px;
        font-weight: 600;
        font-family: 'Inter', monospace;
    }

    .modern-synth-box.primary .formatted-montant {
        color: #2980b9;
    }

    .modern-synth-box.danger .formatted-montant {
        color: #c0392b;
    }
/* Style pour toute la ligne d'en-tête */
.suivis-history-table thead tr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Style pour chaque cellule d'en-tête */
.suivis-history-table th {
    background: transparent; /* Laisse voir le fond du tr */
    color: white;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 12px 8px;
    white-space: nowrap;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 10;
    text-align: center;
}
/* Admin - Export Logs */
.admin-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.date-filters {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

    .filter-group label {
        font-size: 0.85rem;
        color: #6b7280;
    }

    .filter-group input {
        padding: 0.5rem;
        border: 1px solid #d1d5db;
        border-radius: 4px;
    }

.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

    .table th {
        background: #f3f4f6;
        padding: 1rem;
        text-align: left;
        font-weight: 600;
        color: #374151;
    }

    .table td {
        padding: 1rem;
        border-bottom: 1px solid #e5e7eb;
    }

    .table tbody tr:hover {
        background: #f9fafb;
    }

.table-danger {
    background: #fee2e2;
}

    .table-danger:hover {
        background: #fecaca !important;
    }

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.bg-success {
    background: #10b981;
    color: white;
}

.bg-danger {
    background: #ef4444;
    color: white;
}

.bg-info {
    background: #3b82f6;
    color: white;
}

.bg-secondary {
    background: #6b7280;
    color: white;
}

.fingerprint {
    font-family: monospace;
    font-size: 0.8rem;
    background: #f3f4f6;
    padding: 0.25rem;
    border-radius: 4px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

@media (max-width: 768px) {
    .filters-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .date-filters {
        flex-direction: column;
        width: 100%;
    }

    .filter-group {
        width: 100%;
    }

        .filter-group input {
            width: 100%;
        }
}
.scrollable-submenu {
    max-height: 300px; /* ou une valeur appropriée */
    overflow-y: auto;
}