/* --- Global & Typography --- */
:root {
    --brand-red: #b91c1c;
    --brand-red-dark: #7f1111;
    --brand-gray: #1f2937;
    --brand-gray-soft: #374151;
    --surface: #f6f6f7;
    --text: #1f2937;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--surface);
    color: var(--text);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: -0.5px;
}

/* --- Boutons Incroyables (Modern Buttons) --- */
.btn {
    border-radius: 50px; /* Forme pilule */
    padding: 10px 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    border: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Effet de survol (Lift & Shadow) */
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0,0,0,0.15);
}

/* Effet de clic */
.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
}

/* Gradients Modernes pour les boutons */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #64748b 0%, #334155 100%);
    color: white;
}

.btn-dark {
    background: linear-gradient(135deg, var(--brand-gray-soft) 0%, var(--brand-gray) 100%);
    color: white;
}

/* --- Cartes (Cards) Modernes --- */
.card {
    border: none;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #f0f0f0;
    padding: 1.5rem;
    font-weight: 700;
    border-radius: 16px 16px 0 0 !important;
}

/* --- Conversation Headers (Better contrast) --- */
.conversation-header {
    background: #0b3d91 !important;
    color: #ffffff !important;
}

.conversation-header .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* --- Navbar Moderne --- */
.navbar {
    background: linear-gradient(90deg, #1b1b1b 0%, #2b2f36 100%) !important;
    padding: 0.8rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.brand-mark {
    color: #fff !important;
    text-transform: uppercase;
}

.brand-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 2px;
}

.nav-link {
    font-weight: 500;
    margin: 0 5px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #fca5a5 !important;
}

/* --- Formulaires (Inputs) --- */
.form-control, .form-select {
    border-radius: 12px;
    padding: 12px 15px;
    border: 1px solid #e1e1e1;
    background-color: #fdfdfd;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 4px rgba(118, 75, 162, 0.15);
    border-color: #764ba2;
    background-color: #fff;
}

/* --- Tableaux (Tables) --- */
.table {
    border-collapse: separate;
    border-spacing: 0 8px; /* Espace entre les lignes */
}

.table thead th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 0.5px;
}

.table tbody tr {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: transform 0.2s;
}

.table tbody tr:hover {
    transform: scale(1.01); /* Léger zoom au survol */
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.table td {
    border: none;
    vertical-align: middle;
    padding: 15px;
}

.table td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.table td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* --- Dark Mode --- */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
    color: #ffffff;
}

body.dark-mode .card {
    background-color: #1e1e1e;
    color: #e0e0e0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

body.dark-mode .card-header {
    border-bottom: 1px solid #333;
}

body.dark-mode .bg-light {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

body.dark-mode .navbar {
    background: linear-gradient(90deg, #0f0f0f 0%, #1f2937 100%) !important;
}

body.dark-mode .text-muted {
    color: #b0b0b0 !important;
}

body.dark-mode .form-control, 
body.dark-mode .form-select {
    background-color: #2c2c2c;
    border-color: #444;
    color: #fff;
}

body.dark-mode .form-control:focus, 
body.dark-mode .form-select:focus {
    background-color: #333;
    border-color: #764ba2;
}

body.dark-mode .table tbody tr {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode .table tbody tr:hover {
    background-color: #2a2a2a;
}

body.dark-mode .list-group-item {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #333;
}

body.dark-mode .modal-content {
    background-color: #1e1e1e;
    color: #e0e0e0;
}
