body {
    background: #f4f8fb;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.header-bar {
    background: linear-gradient(90deg, #1a237e 60%, #3949ab 100%);
    color: #fff;
    padding: 18px 0 12px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(26,35,126,0.08);
}

.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #283593 80%, #1a237e 100%);
    color: #fff;
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
    box-shadow: 2px 0 8px rgba(26,35,126,0.08);
}
.sidebar h5 {
    color: #bbdefb;
    letter-spacing: 1px;
    font-weight: 600;
}
.sidebar a {
    color: #e3f2fd;
    text-decoration: none;
    display: block;
    padding: 12px 22px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
}
.sidebar a:hover, .sidebar .active {
    background: #1565c0;
    color: #fff;
}

.btn-primary, .btn-success, .btn-outline-primary {
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.btn-primary {
    background: #1976d2;
    border: none;
}
.btn-primary:hover {
    background: #1565c0;
}
.btn-success {
    background: #43a047;
    border: none;
}
.btn-success:hover {
    background: #2e7d32;
}
.btn-outline-primary {
    color: #1976d2;
    border-color: #1976d2;
}
.btn-outline-primary:hover {
    background: #1976d2;
    color: #fff;
}

.card {
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(26,35,126,0.07);
    border: none;
    opacity: 0;
    transform: translateY(20px);
    animation: cardFadeIn 0.7s cubic-bezier(.4,2,.6,1) forwards;
}
.card-header {
    background: #1976d2;
    color: #fff;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.table {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}
.table thead th {
    background: #e3f2fd;
    color: #1a237e;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 2;
}
.table-striped > tbody > tr:nth-of-type(odd) {
    background: #f0f7fa;
}
.table-striped > tbody > tr:hover {
    background: #bbdefb;
}

.badge.bg-primary {
    background: #1976d2 !important;
}
.badge.bg-info {
    background: #90caf9 !important;
    color: #1a237e !important;
}
.badge.bg-success {
    background: #43a047 !important;
}

.alert-success {
    background: #e3fcec;
    color: #256029;
    border: 1px solid #b2dfdb;
    border-radius: 8px;
}
.alert-danger {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
}

@media (max-width: 991px) {
    .sidebar {
        min-height: auto;
        border-radius: 0;
    }
}

/* Mode sombre */
body.dark-mode {
    background-color: #181a1b !important;
    color: #e0e0e0 !important;
}

body.dark-mode .card,
body.dark-mode .container,
body.dark-mode .card-header,
body.dark-mode .card-body,
body.dark-mode .table,
body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: #23272b !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

body.dark-mode .btn,
body.dark-mode .btn-primary,
body.dark-mode .btn-secondary,
body.dark-mode .btn-success,
body.dark-mode .btn-danger {
    background-color: #333 !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

body.dark-mode .table {
    background: #23272b !important;
    color: #e0e0e0 !important;
}
body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #232a3b !important;
}
body.dark-mode .table-striped > tbody > tr:nth-of-type(even) {
    background-color: #181a1b !important;
}
body.dark-mode .table-striped > tbody > tr:hover {
    background: #2d3a4a !important;
}
body.dark-mode .table thead th {
    background: #232a3b !important;
    color: #e0e0e0 !important;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #23272b !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

body.dark-mode .badge {
    background-color: #444 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .header-bar {
    background: linear-gradient(90deg, #232a3b 60%, #232a3b 100%) !important;
    color: #e0e0e0 !important;
}
body.dark-mode .sidebar {
    background: linear-gradient(180deg, #232a3b 80%, #181a1b 100%) !important;
    color: #e0e0e0 !important;
}
body.dark-mode .card-header {
    background: #232a3b !important;
    color: #e0e0e0 !important;
}
body.dark-mode .btn-info,
body.dark-mode .btn-outline-primary,
body.dark-mode .btn-primary {
    background-color: #2d3a4a !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}
body.dark-mode .btn-info:hover,
body.dark-mode .btn-outline-primary:hover,
body.dark-mode .btn-primary:hover {
    background-color: #3a4a5a !important;
    color: #fff !important;
}
body.dark-mode .bg-primary,
body.dark-mode .bg-info,
body.dark-mode .bg-success,
body.dark-mode .bg-secondary {
    background-color: #2d3a4a !important;
    color: #e0e0e0 !important;
}
body.dark-mode .table tbody tr {
    background-color: #232a3b !important;
    color: #e0e0e0 !important;
}
body.dark-mode .table tbody tr:hover {
    background: #2d3a4a !important;
}

.message-bubble {
    background: #f0f7fa;
    display: inline-block;
    max-width: 80%;
}
body.dark-mode .message-bubble {
    background: #232a3b !important;
    color: #e0e0e0 !important;
}

#darkModeToggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    background: #232a3b;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: background 0.2s, box-shadow 0.2s;
    outline: none;
    position: relative;
}
#darkModeToggle:hover {
    background: #2d3a4a;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
#darkModeIcon {
    transition: transform 0.4s cubic-bezier(.4,2,.6,1), color 0.2s;
    display: inline-block;
}
body.dark-mode #darkModeIcon {
    color: #ffe066;
    transform: rotate(180deg) scale(1.15);
}

/* Transitions douces sur les cartes, boutons, menus */
.card, .card-header, .card-body, .table, .alert, .badge, .sidebar, .header-bar {
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.btn, .form-control, .form-select {
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.menu, .dropdown-menu, .sidebar {
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s, opacity 0.3s;
}
/* Effet slide/fade à l'apparition des cartes */
@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: none;
    }
} 