/**
 * Custom Dark Mode Styles
 * Complément au dark-style.css de Sash pour les plugins externes et éléments manquants
 */

/* ================================================
   TEXTES GÉNÉRAUX
   ================================================ */

/* Titres de cartes et modales */
.dark-mode .card-title,
.dark-mode .card-title.mb-0,
.dark-mode h3.card-title,
.dark-mode .modal-title {
    color: #dedefd !important;
}

/* Sous-titres et textes secondaires */
.dark-mode .card-subtitle,
.dark-mode .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Textes en gras */
.dark-mode .fw-bold,
.dark-mode strong,
.dark-mode b {
    color: #dedefd !important;
}

/* Textes généraux */
.dark-mode p,
.dark-mode span,
.dark-mode div {
    color: inherit;
}

/* ================================================
   TABLEAUX ET DATATABLES
   ================================================ */

/* Cellules de tableau */
.dark-mode .table td,
.dark-mode .table th {
    color: #dedefd !important;
}

/* Textes en gras dans les tableaux (ex: première colonne) */
.dark-mode .table td.fw-bold,
.dark-mode .table th.fw-bold {
    color: #dedefd !important;
}

/* Colonnes triées DataTables */
.dark-mode .table td.sorting_1,
.dark-mode .table td.sorting_2,
.dark-mode .table td.sorting_3 {
    color: #dedefd !important;
}

/* Textes secondaires dans les tableaux */
.dark-mode .table td.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Informations DataTables */
.dark-mode .dataTables_info,
.dark-mode .dataTables_length,
.dark-mode .dataTables_length label,
.dark-mode .dataTables_filter label,
.dark-mode .dataTables_paginate {
    color: #dedefd !important;
}

/* Sélecteur "Afficher X entrées" */
.dark-mode .dataTables_length select {
    background-color: #1c1c3a !important;
    color: #dedefd !important;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Champ de recherche DataTables */
.dark-mode .dataTables_filter input {
    background-color: #1c1c3a !important;
    color: #dedefd !important;
    border-color: rgba(255, 255, 255, 0.2);
}

/* ================================================
   FORMULAIRES
   ================================================ */

/* Labels de formulaire */
.dark-mode .form-label,
.dark-mode label {
    color: #dedefd !important;
}

/* Inputs, textareas et selects */
.dark-mode .form-control,
.dark-mode .form-select,
.dark-mode input[type="text"],
.dark-mode input[type="email"],
.dark-mode input[type="password"],
.dark-mode input[type="tel"],
.dark-mode input[type="url"],
.dark-mode input[type="number"],
.dark-mode textarea,
.dark-mode select {
    background-color: #1c1c3a !important;
    color: #dedefd !important;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Placeholder */
.dark-mode .form-control::placeholder,
.dark-mode input::placeholder,
.dark-mode textarea::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Switches custom-switch (thème Sash) - Dark mode */
.dark-mode .custom-switch-input {
    background-color: #2c3e50 !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.dark-mode .custom-switch-input:checked {
    background-color: var(--primary-bg-color) !important;
    border-color: var(--primary-bg-color) !important;
}

.dark-mode .custom-switch-input:focus {
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1) !important;
}

.dark-mode .custom-switch-description {
    color: #dedefd !important;
}

/* Éditeur Quill */
.dark-mode .quill-editor-container,
.dark-mode .ql-container,
.dark-mode .ql-editor {
    background-color: #1c1c3a !important;
    color: #dedefd !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.dark-mode .ql-toolbar {
    background-color: #1c1c3a !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.dark-mode .ql-stroke {
    stroke: #dedefd !important;
}

.dark-mode .ql-fill {
    fill: #dedefd !important;
}

.dark-mode .ql-picker-label {
    color: #dedefd !important;
}

.dark-mode .ql-picker-options {
    background-color: #1c1c3a !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.dark-mode .ql-picker-item {
    color: #dedefd !important;
}

.dark-mode .ql-picker-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* ================================================
   MODALES / POPUPS
   ================================================ */

/* Contenu de modale */
.dark-mode .modal-content {
    background-color: #191932 !important;
    color: #dedefd !important;
}

/* En-tête de modale */
.dark-mode .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    background-color: #191932 !important;
}

/* Corps de modale */
.dark-mode .modal-body {
    background-color: #191932 !important;
    color: #dedefd !important;
}

/* Pied de modale */
.dark-mode .modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
    background-color: #191932 !important;
}

/* Cartes dans les modales */
.dark-mode .modal-body .card,
.dark-mode #chequeModalBody .card {
    background-color: #1c1c3a !important;
    color: #dedefd !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .modal-body .card-body,
.dark-mode #chequeModalBody .card-body {
    background-color: #1c1c3a !important;
    color: #dedefd !important;
}

/* Titres dans les modales */
.dark-mode .modal-body h1,
.dark-mode .modal-body h2,
.dark-mode .modal-body h3,
.dark-mode .modal-body h4,
.dark-mode .modal-body h5,
.dark-mode .modal-body h6 {
    color: #dedefd !important;
}

/* Listes dans les modales */
.dark-mode .modal-body ul,
.dark-mode .modal-body ol,
.dark-mode .modal-body li {
    color: #dedefd !important;
}

/* Bouton de fermeture */
.dark-mode .btn-close,
.dark-mode .btn-close i {
    color: #fff !important;
    opacity: 0.8;
}

.dark-mode .btn-close:hover {
    opacity: 1;
}

/* ================================================
   ÉLÉMENTS SPÉCIFIQUES
   ================================================ */

/* Messages de danger/erreur */
.dark-mode .text-danger {
    color: #ff6b81 !important;
}

/* Messages de succès */
.dark-mode .text-success {
    color: #2ecc71 !important;
}

/* Messages d'avertissement */
.dark-mode .text-warning {
    color: #f39c12 !important;
}

/* Petits textes */
.dark-mode small,
.dark-mode .small {
    color: rgba(255, 255, 255, 0.7) !important;
}
