/* ========================================
   CORRECTION GLOBALE DESIGN CRM - 12/02/2026
   Force un design propre sur TOUT le CRM
   ======================================== */

/* PRIORITÉ: Force fond blanc et texte noir partout */
body {
  background: #f9fafb !important;
  color: #111827 !important;
}

/* Tous les conteneurs de contenu */
.container,
.card,
.card-pro,
[class*="card"] {
  background: white !important;
  color: #111827 !important;
}

/* DÉSACTIVER LE HOVER GRIS SUR LES CARTES */
.card:hover,
.card-pro:hover,
[class*="card"]:hover,
body[data-role="ADMIN"] .card:hover,
body[data-role="TECHNICIAN"] .card:hover {
  background: white !important;
  transform: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  border-color: #e5e7eb !important;
}

/* FIX PAGES INTERVENTIONS ET FINANCE - BLANC SUR BLANC */
/* Forcer fond blanc et texte noir sur TOUTES les pages */
#interventionsList table,
#interventionsList thead,
#interventionsList tbody,
#interventionsList tr,
#interventionsList th,
#interventionsList td {
  background: white !important;
  color: #111827 !important;
}

#interventionsList thead tr {
  background: #f9fafb !important;
  border-bottom: 2px solid #e5e7eb !important;
}

#interventionsList th {
  color: #6b7280 !important;
  font-weight: 700 !important;
}

#interventionsList tbody tr {
  background: white !important;
  border-bottom: 1px solid #e5e7eb !important;
}

#interventionsList tbody tr:hover {
  background: #f3f4f6 !important;
}

#interventionsList tbody td {
  color: #374151 !important;
}

/* Page Finance - Texte gris MAIS garder les backgrounds colorés */
#financeContent h1,
#financeContent h2,
#financeContent h3,
#financeContent h4,
#financeContent p,
#financeContent span:not([style*="background:"]):not([class*="badge"]) {
  color: #6b7280 !important;
}

/* Titres principaux Finance en gris foncé */
#financeContent > div > h1 {
  color: #374151 !important;
}

/* Boutons onglets Finance - texte gris sauf actif */
#financeTabEntretien,
#financeTabInstallation,
#financeTabGlobal {
  color: #6b7280 !important;
}

#financeTabEntretien[style*="background: #2563eb"],
#financeTabInstallation[style*="background: #2563eb"],
#financeTabGlobal[style*="background: #2563eb"] {
  color: #ffffff !important;
}

/* PAGE CAISSE - Forcer lisibilité complète */
#app .container .card,
#app .container .card *,
#app .container .card h1,
#app .container .card h2,
#app .container .card h3,
#app .container .card p,
#app .container .card span,
#app .container .card div,
#app .container .card table,
#app .container .card thead,
#app .container .card tbody,
#app .container .card tr,
#app .container .card th,
#app .container .card td,
#app .container .card input,
#app .container .card select,
#app .container .card label {
  color: #374151 !important;
}

#app .container .card {
  background: white !important;
}

#app .container .card table thead tr {
  background: #f9fafb !important;
}

#app .container .card table th {
  color: #6b7280 !important;
  font-weight: 700 !important;
}

#app .container .card .text-muted {
  color: #9ca3af !important;
}

/* PAGE FACTURATION TECHNICIEN - Forcer lisibilité */
.journee-card,
.journee-card *,
.journee-card h3,
.journee-card span,
.journee-card div,
.journee-card table,
.journee-card th,
.journee-card td {
  color: #374151 !important;
}

.journee-card h3 {
  color: #1e293b !important;
}

.journee-card table thead tr {
  background: rgba(0,0,0,0.03) !important;
}

.journee-card table th {
  color: #475569 !important;
}

.journee-card .text-muted {
  color: #64748b !important;
}

/* Valeurs KPI - garder couleur bleue mais plus visible */
#financeContent [style*="font-size: 2"],
#financeContent [style*="font-weight: 800"],
#financeContent .kpi-value {
  color: #2563eb !important;
}

/* Tables Finance - fond blanc, texte gris */
#financeContent table {
  background: white !important;
}

#financeContent th {
  color: #6b7280 !important;
  background: #f9fafb !important;
}

#financeContent td {
  color: #374151 !important;
}

/* Tableaux Finance */
#financeContent table thead {
  background: white !important;
}

#financeContent table th {
  color: #111827 !important;
  font-weight: 700 !important;
}

#financeContent table tbody tr {
  background: white !important;
}

#financeContent table tbody td {
  color: #111827 !important;
}

/* Tous les tableaux */
table,
.table,
.table-pro,
[class*="table"] {
  background: white !important;
  color: #111827 !important;
}

table thead,
.table thead,
.table-pro thead {
  background: white !important;
}

table th,
.table th,
.table-pro th,
[class*="table"] th {
  background: white !important;
  color: #111827 !important;
  font-weight: 700 !important;
  padding: 0.5rem 0.75rem !important;
}

table tbody tr,
.table tbody tr,
.table-pro tbody tr {
  background: white !important;
}

table td,
.table td,
.table-pro td,
[class*="table"] td {
  background: white !important;
  color: #111827 !important;
  padding: 0.5rem 0.75rem !important;
}

/* Hover léger sur les lignes de tableau uniquement */
table tbody tr:hover,
.table tbody tr:hover,
.table-pro tbody tr:hover {
  background: #f9fafb !important;
}

/* Headers et titres */
h1, h2, h3, h4, h5, h6 {
  color: #111827 !important;
}

/* Labels et textes de formulaire */
label,
.form-label {
  color: #111827 !important;
  font-weight: 600 !important;
}

/* Inputs et selects */
input,
select,
textarea,
.form-control {
  background: white !important;
  color: #111827 !important;
  border: 1px solid #d1d5db !important;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af !important;
}

/* Select options */
select option {
  background: white !important;
  color: #111827 !important;
}

/* Texte muted/secondaire doit rester visible */
.text-muted,
.text-secondary,
[class*="muted"] {
  color: #6b7280 !important;
}

/* Liens */
a {
  color: #2563eb !important;
  text-decoration: none !important;
}

a:hover {
  color: #1d4ed8 !important;
  text-decoration: underline !important;
}

/* ========================================
   CORRECTIONS SUPPLÉMENTAIRES - 15/02/2026
   Modales, Inputs, Badges
   ======================================== */

/* MODALES - Blanc sur noir */
.modal,
.modal-content,
.modal-header,
.modal-body,
.modal-footer,
[class*="modal"] {
  background: white !important;
  color: #111827 !important;
  border-color: #d1d5db !important;
}

.modal-header {
  border-bottom-color: #e5e7eb !important;
}

.modal-title {
  color: #111827 !important;
  font-weight: 700 !important;
}

/* INPUTS ET FORMULAIRES */
input,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="time"],
textarea,
select {
  background: white !important;
  color: #111827 !important;
  border-color: #d1d5db !important;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #3b82f6 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* BOUTONS */
button,
.btn {
  border-color: #d1d5db !important;
}

.btn-primary,
[class*="btn-primary"] {
  background: #2563eb !important;
  color: white !important;
  border-color: #2563eb !important;
}

.btn-primary:hover,
[class*="btn-primary"]:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}

.btn-secondary,
[class*="btn-secondary"] {
  background: #6b7280 !important;
  color: white !important;
  border-color: #6b7280 !important;
}

.btn-danger,
[class*="btn-danger"] {
  background: #ef4444 !important;
  color: white !important;
  border-color: #ef4444 !important;
}

/* LABELS */
label {
  color: #374151 !important;
  font-weight: 600 !important;
}

/* TABLES SUPPLÉMENTAIRES */
table,
thead,
tbody,
tr,
th,
td {
  background: white !important;
  color: #111827 !important;
  border-color: #e5e7eb !important;
}

thead tr {
  background: #f9fafb !important;
}

tbody tr:hover {
  background: #f3f4f6 !important;
}

th {
  color: #6b7280 !important;
  font-weight: 700 !important;
  background: #f9fafb !important;
}

/* BADGES - Texte blanc sur fond coloré */
[class*="badge"],
.badge {
  border-radius: 4px !important;
  padding: 4px 8px !important;
  font-weight: 600 !important;
}

.badge-success,
[class*="badge-success"] {
  background: #10b981 !important;
  color: white !important;
}

.badge-danger,
[class*="badge-danger"] {
  background: #ef4444 !important;
  color: white !important;
}

.badge-warning,
[class*="badge-warning"] {
  background: #f59e0b !important;
  color: white !important;
}

.badge-info,
[class*="badge-info"] {
  background: #3b82f6 !important;
  color: white !important;
}

/* LISTES */
ul, ol {
  color: #111827 !important;
}

li {
  color: #374151 !important;
}

/* LIENS */
a {
  color: #2563eb !important;
  text-decoration: none !important;
}

a:hover {
  color: #1d4ed8 !important;
  text-decoration: underline !important;
}

/* TEXTE GRIS SUR GRIS - FORCE CONTRASTE */
.text-muted,
.text-gray,
.text-secondary,
[class*="text-muted"],
[class*="text-gray"] {
  color: #6b7280 !important;
}

.text-dark,
[class*="text-dark"] {
  color: #111827 !important;
}

/* FIX : Gris sur gris → Noir */
*[style*="color: #9ca3af"],
*[style*="color: gray"],
*[style*="color: #999"],
*[style*="color: #666"] {
  color: #374151 !important;
}

/* TITRE / HEADINGS */
h1, h2, h3, h4, h5, h6 {
  color: #111827 !important;
}

h1, h2, h3 {
  font-weight: 700 !important;
}

/* SECTIONS */
section,
article,
aside,
nav {
  background: white !important;
  color: #111827 !important;
}

/* DROPDOWNS */
.dropdown-menu,
[class*="dropdown"] {
  background: white !important;
  color: #111827 !important;
  border-color: #d1d5db !important;
}

.dropdown-item,
[class*="dropdown-item"] {
  color: #111827 !important;
  background: transparent !important;
}

.dropdown-item:hover,
[class*="dropdown-item"]:hover {
  background: #f3f4f6 !important;
  color: #111827 !important;
}

/* ALERTS */
.alert,
[class*="alert"] {
  border-radius: 4px !important;
  border: 1px solid !important;
}

.alert-success,
[class*="alert-success"] {
  background: #f0fdf4 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
}

.alert-danger,
.alert-error,
[class*="alert-danger"],
[class*="alert-error"] {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #991b1b !important;
}

.alert-warning,
[class*="alert-warning"] {
  background: #fefce8 !important;
  border-color: #f59e0b !important;
  color: #92400e !important;
}

.alert-info,
[class*="alert-info"] {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
  color: #0c2340 !important;
}

/* PAGINATION */
.pagination,
[class*="pagination"] {
  color: #111827 !important;
}

.pagination a,
.page-link {
  background: white !important;
  color: #2563eb !important;
  border-color: #d1d5db !important;
}

.pagination a:hover,
.page-link:hover {
  background: #f3f4f6 !important;
  color: #1d4ed8 !important;
}

.pagination .active,
.page-item.active .page-link {
  background: #2563eb !important;
  color: white !important;
  border-color: #2563eb !important;
}

