/* ============================================
   Sequoia Rh - Design CRM Moderne
   Basé sur le design NouveauCSS
   ============================================ */

/* ===== VARIABLES CSS ===== */
:root {
    /* Couleurs principales */
    --primary: #030213;
    --primary-foreground: #ffffff;
    --secondary: #f3f3f5;
    --secondary-foreground: #030213;
    
    /* Couleurs de statut */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #d4183d;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    /* Couleurs neutres */
    --background: #ffffff;
    --foreground: #1e293b;
    --muted: #ececf0;
    --muted-foreground: #717182;
    --accent: #e9ebef;
    --accent-foreground: #030213;
    
    /* Couleurs de bordure */
    --border: rgba(0, 0, 0, 0.1);
    --border-light: #e2e8f0;
    --border-dark: #cbd5e1;
    
    /* Couleurs de fond */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-page: #f9fafb;
    
    /* Couleurs de texte */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-muted: #717182;
    
    /* Espacements */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;
    --spacing-3xl: 3rem;
    
    /* Rayons de bordure */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.625rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typographie */
    --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-base: 15.2px; /* Réduction de 5% (16px * 0.95) */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

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

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-light);
    padding: var(--spacing-lg) var(--spacing-2xl);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
}

header h1 {
    display: none;
}

nav {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
}

nav .nav-logo {
    height: 52px;
    width: auto;
    flex-shrink: 0;
    margin: 0 var(--spacing-lg);
    vertical-align: middle;
    display: inline-block;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-medium);
    font-size: 0.95rem;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background-color: var(--info);
    transition: transform var(--transition-base);
    border-radius: 2px;
}

nav a:hover {
    color: var(--info);
    background-color: var(--info-light);
    transform: translateY(-1px);
}

nav a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

nav a[style*="font-weight: bold"] {
    color: var(--info);
    background-color: var(--info-light);
    font-weight: var(--font-weight-semibold);
}

nav a[style*="font-weight: bold"]::after {
    transform: translateX(-50%) scaleX(1);
}

/* ===== MAIN CONTENT ===== */
main {
    min-height: calc(100vh - 200px);
    padding: var(--spacing-2xl);
    max-width: 1280px;
    margin: 0 auto;
}

/* ===== FOOTER ===== */
footer {
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-align: center;
    padding: var(--spacing-xl);
    margin-top: var(--spacing-3xl);
    border-top: 1px solid var(--border-light);
    font-size: 0.83125rem; /* Réduction de 5% */
}

/* ===== CONTAINERS ===== */
.admin-container,
.documents-container,
.envoi-container,
.detail-container,
.account-container,
.test-container,
.form-container {
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-dark); /* Bordure plus visible */
    padding: var(--spacing-2xl);
    margin-bottom: calc(var(--spacing-2xl) + 0.5rem); /* Marge augmentée */
}

/* ===== HEADERS DE SECTIONS ===== */
.admin-header,
.documents-header,
.envoi-header,
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--spacing-2xl) + 0.5rem); /* Marge augmentée */
    padding-bottom: var(--spacing-xl);
    border-bottom: 2px solid var(--border-dark); /* Bordure plus visible */
}

.admin-header h2,
.documents-header h2,
.envoi-header h2,
.detail-header h2 {
    color: var(--text-primary);
    font-size: 1.78125rem; /* Réduction de 5% */
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.025em;
}

/* ===== SECTIONS ===== */
.detail-section,
.section,
.envoi-section {
    margin-bottom: calc(var(--spacing-2xl) + 0.75rem); /* Marge augmentée */
    padding: var(--spacing-2xl);
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-dark); /* Bordure plus visible */
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.detail-section:hover,
.section:hover {
    box-shadow: var(--shadow-md);
}

.detail-section h3,
.section h3,
.envoi-section h3 {
    color: var(--text-primary);
    font-size: 1.1875rem; /* Réduction de 5% */
    font-weight: var(--font-weight-semibold);
    margin-bottom: calc(var(--spacing-xl) + 0.5rem); /* Marge augmentée */
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-dark); /* Bordure plus visible */
}

/* ===== FORMULAIRES ===== */
.form-section {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-2xl);
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    display: none;
    box-shadow: var(--shadow-sm);
}

.form-section.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

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

.form-group {
    margin-bottom: var(--spacing-xl);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
    font-size: 0.890625rem; /* Réduction de 5% */
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    font-size: 0.95rem; /* Réduction de 5% */
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--info);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: var(--border-dark);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: var(--spacing-sm);
    cursor: pointer;
    width: 20px;
    height: 20px;
    accent-color: var(--info);
}

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

/* ===== BOUTONS ===== */
.btn,
.btn-primary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-edit,
.btn-delete,
.btn-add,
.btn-save,
.btn-back,
.logout-btn,
.edit-toggle,
.toggle-form-btn {
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.890625rem; /* Réduction de 5% */
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

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

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-primary,
.btn-edit {
    background: var(--info);
    color: white;
}

.btn-primary:hover,
.btn-edit:hover {
    background: #2563eb;
}

.btn-success,
.btn-add {
    background: var(--success);
    color: white;
}

.btn-success:hover,
.btn-add:hover {
    background: #059669;
}

.btn-danger,
.btn-delete,
.logout-btn {
    background: var(--danger);
    color: white;
}

.btn-danger:hover,
.btn-delete:hover,
.logout-btn:hover {
    background: #b91c1c;
}

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

.btn-warning:hover {
    background: #d97706;
}

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

.btn-back:hover {
    background: #475569;
}

.btn-sm {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.83125rem; /* Réduction de 5% */
}

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

/* ===== TABLEAUX ===== */
.clients-table,
.documents-table,
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: var(--spacing-xl);
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.clients-table th,
.documents-table th,
.data-table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: var(--spacing-lg);
    text-align: left;
    font-weight: var(--font-weight-semibold);
    font-size: 0.83125rem; /* Réduction de 5% */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-light);
}

.clients-table td,
.documents-table td,
.data-table td {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.clients-table tr:last-child td,
.documents-table tr:last-child td,
.data-table tr:last-child td {
    border-bottom: none;
}

.clients-table tr:hover,
.documents-table tr:hover,
.data-table tr:hover {
    background: var(--bg-secondary);
    transition: background var(--transition-fast);
}

.clients-table tr:nth-child(even),
.documents-table tr:nth-child(even),
.data-table tr:nth-child(even) {
    background: var(--bg-tertiary);
}

.clients-table tr:nth-child(even):hover,
.documents-table tr:nth-child(even):hover,
.data-table tr:nth-child(even):hover {
    background: var(--bg-secondary);
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 9999px;
    font-size: 0.7125rem; /* Réduction de 5% */
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.025em;
}

.badge-success {
    background: var(--success-light);
    color: #065f46;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400e;
}

.badge-danger {
    background: var(--danger-light);
    color: #991b1b;
}

.badge-info {
    background: var(--info-light);
    color: #1e40af;
}

.badge-obligatoire {
    background: var(--danger-light);
    color: #991b1b;
}

.badge-optionnel {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* ===== MESSAGES ===== */
.error,
.success {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    font-weight: var(--font-weight-medium);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.error {
    background: var(--danger-light);
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.success {
    background: var(--success-light);
    color: #065f46;
    border-left: 4px solid var(--success);
}

/* ===== INFO GRID ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

.info-item {
    background: var(--bg-primary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.info-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--info);
}

.info-label {
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    font-size: 0.7125rem; /* Réduction de 5% */
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    color: var(--text-primary);
    font-size: 1.06875rem; /* Réduction de 5% */
    font-weight: var(--font-weight-medium);
}

/* ===== STATISTIQUES ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

.stat-card {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

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

.stat-card.success {
    border-left: 4px solid var(--success);
}

.stat-card.warning {
    border-left: 4px solid var(--warning);
}

.stat-card.info {
    border-left: 4px solid var(--info);
}

.stat-value {
    font-size: 1.9rem; /* Réduction de 5% */
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-xs);
    line-height: 1;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.83125rem; /* Réduction de 5% */
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

/* ===== FILTRES ===== */
.filters-section {
    background: var(--bg-primary);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-2xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn var(--transition-base);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: var(--spacing-2xl);
    border-radius: var(--radius-2xl);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 1.425rem; /* Réduction de 5% */
    font-weight: var(--font-weight-bold);
}

.close {
    color: var(--text-secondary);
    font-size: 1.6625rem; /* Réduction de 5% */
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition: all var(--transition-base);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.close:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

/* ===== CHECKBOX LIST ===== */
.documents-checkbox-list {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    background: var(--bg-primary);
}

.documents-checkbox-list::-webkit-scrollbar {
    width: 8px;
}

.documents-checkbox-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.documents-checkbox-list::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: var(--radius-sm);
}

.documents-checkbox-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.document-checkbox-item {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-fast);
}

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

.document-checkbox-item:hover {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.document-checkbox-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.document-checkbox-item input[type="checkbox"] {
    margin-right: var(--spacing-md);
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ===== BUREAU ===== */
.bureau-list {
    margin-top: var(--spacing-xl);
}

.bureau-item {
    padding: var(--spacing-xl);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.bureau-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--info);
}

.bureau-item.inactive {
    opacity: 0.6;
    background: var(--bg-tertiary);
}

.bureau-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.bureau-title {
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    font-size: 1.06875rem; /* Réduction de 5% */
}

.bureau-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.bureau-info {
    color: var(--text-secondary);
    font-size: 0.890625rem; /* Réduction de 5% */
    line-height: 1.6;
}

/* ===== ÉTATS VIDES ===== */
.empty-message,
.empty-state {
    text-align: center;
    padding: var(--spacing-3xl);
    color: var(--text-secondary);
    font-style: italic;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--border-light);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.5;
}

/* ===== ACTIONS ===== */
.action-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* ===== HERO SECTION ===== */
.hero {
    text-align: center;
    padding: var(--spacing-3xl) 0;
}

.hero h2 {
    font-size: 2.375rem; /* Réduction de 5% */
    margin-bottom: var(--spacing-xl);
    color: var(--text-primary);
    font-weight: var(--font-weight-bold);
}

.hero p {
    font-size: 1.1875rem; /* Réduction de 5% */
    color: var(--text-secondary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .detail-container,
    .admin-container,
    .documents-container,
    .envoi-container,
    .account-container {
        padding: var(--spacing-xl);
    }
    
    .info-grid,
    .form-row,
    .filters-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        gap: var(--spacing-md);
        padding: var(--spacing-md);
        min-height: auto;
    }
    
    nav .nav-logo {
        height: 47px;
        margin: var(--spacing-sm) 0;
        order: -1;
        width: 100%;
        text-align: center;
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    nav a {
        font-size: 0.83125rem; /* Réduction de 5% */
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    main {
        padding: var(--spacing-md);
    }
    
    .admin-header,
    .documents-header,
    .envoi-header,
    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
    
    .clients-table,
    .documents-table,
    .data-table {
        font-size: 0.83125rem; /* Réduction de 5% */
        display: block;
        overflow-x: auto;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

/* ===== UTILITAIRES ===== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }
.p-4 { padding: var(--spacing-xl); }

/* ===== ICÔNES SVG ===== */
.icon {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 0.4em;
    fill: currentColor;
}

.icon-email::before {
    content: '';
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 0.4em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-add::before {
    content: '';
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 0.4em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'%3E%3C/line%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-search::before {
    content: '';
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 0.4em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-file::before {
    content: '';
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 0.4em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3Cline x1='16' y1='13' x2='8' y2='13'%3E%3C/line%3E%3Cline x1='16' y1='17' x2='8' y2='17'%3E%3C/line%3E%3Cpolyline points='10 9 9 9 8 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-calendar::before {
    content: '';
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 0.4em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-list::before {
    content: '';
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 0.4em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='8' y1='6' x2='21' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='12' x2='21' y2='12'%3E%3C/line%3E%3Cline x1='8' y1='18' x2='21' y2='18'%3E%3C/line%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'%3E%3C/line%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-warning::before {
    content: '';
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 0.4em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'%3E%3C/path%3E%3Cline x1='12' y1='9' x2='12' y2='13'%3E%3C/line%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-success::before {
    content: '';
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 0.4em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'%3E%3C/path%3E%3Cpolyline points='22 4 12 14.01 9 11.01'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-error::before {
    content: '';
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 0.4em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='15' y1='9' x2='9' y2='15'%3E%3C/line%3E%3Cline x1='9' y1='9' x2='15' y2='15'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ===== MODE NUIT (INVERSION DES COULEURS) ===== */
body.dark-mode {
    filter: invert(1) hue-rotate(180deg);
    background-color: #000;
}

/* Ré-inverser les images et vidéos pour qu'elles s'affichent correctement */
body.dark-mode img,
body.dark-mode video,
body.dark-mode iframe,
body.dark-mode embed,
body.dark-mode object,
body.dark-mode canvas {
    filter: invert(1) hue-rotate(180deg);
}

/* Style pour le bouton toggle du mode nuit */
.dark-mode-toggle {
    background: transparent !important;
    border: 1px solid var(--border-dark, #cbd5e1) !important;
    padding: 0.5rem !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    margin-left: 1rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    min-width: 32px;
    min-height: 32px;
}

.dark-mode-toggle:hover {
    background-color: var(--bg-secondary, #f8fafc) !important;
    border-color: var(--info, #3b82f6) !important;
}

body.dark-mode .dark-mode-toggle {
    background: transparent !important;
}

body.dark-mode .dark-mode-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Assurer que les éléments SVG dans le bouton toggle sont ré-inversés pour être visibles */
body.dark-mode .dark-mode-toggle svg,
body.dark-mode .dark-mode-toggle .theme-icon svg {
    filter: invert(1) hue-rotate(180deg);
}

/* Pour les PDF et autres contenus embarqués, on peut essayer de les ré-inverser aussi */
body.dark-mode object,
body.dark-mode embed {
    filter: invert(1) hue-rotate(180deg);
}
