body {
    background-color: black;
    color: #e0e0e0;
}

/* Dark mode for cards, modals, tables, sidebar, etc. */
.card,
.modal-content {
    background-color: #23272b;
    color: #e0e0e0;
    border-color: #343a40;
}

/* Tableau dark mode */
.table {
    background-color: #23272b;
    color: #e0e0e0;
    border-color: #343a40;
}
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #202225;
}
.table-hover > tbody > tr:hover {
    background-color: #343a40;
    color: #fff;
}
.table th,
.table td {
    border-color: #343a40;
}

.table th,
.table td {
    border-color: #343a40;
}
.table .text-end a{
    padding: 0;
    border: none;
}
table thead th{
    font-size: 12px;
    color: #777 !important;
}
.admin-sidebar {
    background-color: #23272b;
    color: #e0e0e0;
}

.list-group-item {
    background-color: #23272b;
    color: #e0e0e0;
    border-color: #343a40;
}

.list-group-item.active {
    background-color: #495057;
    color: #fff;
    border-color: #495057;
}

.btn-primary {
    background-color: #495057;
    border-color: #495057;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #343a40;
    border-color: #343a40;
}

input, select, textarea {
    background-color: #23272b;
    color: #e0e0e0;
    border-color: #343a40;
}

input:focus, select:focus, textarea:focus {
    background-color: #181a1b;
    color: #fff;
    border-color: #495057;
}
/* Modal backdrop for dark mode */
.modal-backdrop.show {
    background-color: #181a1b;
    opacity: 0.85;
}
}

.card,
.modal-content {
    border-radius: 0.8rem;
}

.table td,
.table th {
    vertical-align: middle;
}

/* Accordéon dark mode */
.accordion-button {
    font-weight: 600;
    background-color: #23272b;
    color: #e0e0e0;
    border-color: #343a40;
}
.accordion-button:not(.collapsed) {
    background-color: #343a40;
    color: #fff;
}
.accordion-item {
    background-color: #23272b;
    border-color: #343a40;
}
.accordion-body {
    background-color: #202225;
    color: #e0e0e0;
}

/* Bouton de fermeture (btn-close) en blanc pour dark mode */
.btn-close {
    filter: invert(1) grayscale(1) brightness(2);
    opacity: 1;
}
/* Pour les versions Bootstrap qui supportent --bs-btn-close-color */
.btn-close {
    --bs-btn-close-color: #fff;
}
}

.modal-body .form-label {
    font-size: 0.92rem;
    font-weight: 600;
}

.admin-sidebar {
    position: sticky;
    top: 1rem;
}

.admin-sidebar .list-group-item:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

@media (max-width: 767.98px) {
    .modal-dialog {
        margin: 0.5rem;
    }

    .btn {
        white-space: normal;
    }

    .admin-sidebar {
        position: static;
    }
}