/**
 * ===================================================
 * HELIOS - CORRECTIONS CRITIQUES THÈME
 * Correctifs pour modules avec textes invisibles
 * ===================================================
 *
 * Ce fichier corrige:
 * - Variables CSS manquantes (--goodies-*, --admin-*, etc.)
 * - Textes blancs sur fond blanc (light theme)
 * - Textes noirs sur fond noir (dark theme)
 * - Labels invisibles
 * - Headers non compacts
 */

/* ===================================================
   1. CORRECTIONS VARIABLES GOODIES MODULE
   Replace --goodies-* avec variables globales
   =================================================== */

:root {
    /* Goodies variables → Global variables mapping */
    --goodies-text-primary: var(--text-primary);
    --goodies-text-secondary: var(--text-secondary);
    --goodies-text-muted: var(--text-muted);
    --goodies-card-dark: var(--bg-glass);
    --goodies-border-dark: var(--border-color);
    --goodies-primary: var(--accent-primary);
    --goodies-danger: var(--danger);
    --goodies-gradient: var(--accent-gradient);

    /* Administration variables */
    --admin-text-primary: var(--text-primary);
    --admin-text-secondary: var(--text-secondary);
    --admin-card-dark: var(--bg-glass);
    --admin-border-dark: var(--border-color);

    /* Factures variables */
    --invoice-text-primary: var(--text-primary);
    --invoice-text-secondary: var(--text-secondary);
    --invoice-card-dark: var(--bg-glass);
    --invoice-border-dark: var(--border-color);
}

/* ===================================================
   2. CORRECTIONS LABELS INVISIBLES
   =================================================== */

/* Labels toujours visibles en dark theme */
body:not(.light-theme) label,
body:not(.light-theme) .form-label,
body:not(.light-theme) .input-label,
body:not(.light-theme) .field-label {
    color: var(--text-primary, var(--phi-gray-900)) !important;
}

/* Labels toujours visibles en light theme */
body.light-theme label,
body.light-theme .form-label,
body.light-theme .input-label,
body.light-theme .field-label {
    color: var(--text-primary, var(--text-dark)) !important;
}

/* ===================================================
   3. CORRECTIONS TEXTES GÉNÉRAUX
   =================================================== */

/* Dark theme - Force white text
   Excludes phi-kpi-* elements (managed by helios-phi-components.css design system) */
body:not(.light-theme) p,
body:not(.light-theme) span:not(.badge):not([class*="status-"]):not([class*="phi-kpi-"]),
body:not(.light-theme) div:not(.badge):not([class*="status-"]):not(.modal):not(.card):not([class*="phi-kpi-"]),
body:not(.light-theme) td,
body:not(.light-theme) th {
    color: var(--text-primary, var(--phi-gray-900));
}

/* Light theme - Force dark text
   Excludes phi-kpi-* elements (managed by helios-phi-components.css design system) */
body.light-theme p,
body.light-theme span:not(.badge):not([class*="status-"]):not([class*="phi-kpi-"]),
body.light-theme div:not(.badge):not([class*="status-"]):not(.modal):not(.card):not([class*="phi-kpi-"]),
body.light-theme td,
body.light-theme th {
    color: var(--text-primary, var(--text-dark));
}

/* ===================================================
   4. CORRECTIONS HEADERS MODULES
   Force headers compacts partout
   =================================================== */

/* Force compact class sur tous les headers de modules */
.module-header:not(.compact),
.page-header:not(.compact),
.page-header-hero:not(.compact),
.ats-page-header:not(.compact),
.admin-header:not(.compact) {
    padding: var(--space-3) var(--space-5) !important;
    margin-top: 0 !important;
    margin-bottom: var(--space-3) !important;
    min-height: auto !important;
    max-height: var(--size-89, 89px) !important;
    overflow: hidden;
}

/* Force h1 size dans headers */
.module-header h1,
.page-header h1,
.page-header-hero h1,
.ats-page-header h1,
.admin-header h1 {
    font-size: var(--text-xl) !important;
    margin-bottom: 0 !important;
    line-height: var(--leading-snug, 1.35);
}

/* ===================================================
   5. CORRECTIONS MODULE GOODIES SPÉCIFIQUES
   =================================================== */

/* Goodies Admin - Stats cards */
.admin-header-stats .stat-card {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-color) !important;
}

.admin-header-stats .stat-value {
    color: var(--text-primary) !important;
}

.admin-header-stats .stat-label {
    color: var(--text-secondary) !important;
}

/* Goodies Admin - Tabs */
.admin-tabs {
    border-bottom: var(--space-1) solid var(--border-color) !important;
}

.admin-tab {
    color: var(--text-secondary) !important;
}

.admin-tab:hover,
.admin-tab.active {
    color: var(--accent-primary) !important;
}

/* Goodies Admin - Search & Filters */
.toolbar-search input,
.search-box input,
.toolbar-filters select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.toolbar-search input::placeholder,
.search-box input::placeholder {
    color: var(--text-muted) !important;
}

/* Goodies Admin - Order cards */
.order-card {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-color) !important;
}

.order-user strong,
.order-amount span {
    color: var(--text-primary) !important;
}

.order-user small,
.order-date,
.order-items-count {
    color: var(--text-secondary) !important;
}

/* Goodies Catalog - Product cards */
.product-card {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-color) !important;
}

.product-name {
    color: var(--text-primary) !important;
}

.product-description,
.product-category {
    color: var(--text-secondary) !important;
}

/* ===================================================
   6. CORRECTIONS MODULE ADMINISTRATION
   =================================================== */

.admin-card,
.admin-section {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.admin-card h3,
.admin-card h4,
.admin-section h3,
.admin-section h4 {
    color: var(--text-primary) !important;
}

.admin-card p,
.admin-section p {
    color: var(--text-secondary) !important;
}

/* ===================================================
   7. CORRECTIONS MODULE FACTURES
   =================================================== */

.invoice-card,
.invoice-item {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-color) !important;
}

.invoice-number,
.invoice-amount {
    color: var(--text-primary) !important;
}

.invoice-date,
.invoice-status {
    color: var(--text-secondary) !important;
}

/* ===================================================
   8. CORRECTIONS INPUTS & FORM CONTROLS GLOBAUX
   =================================================== */

/* Dark theme inputs */
body:not(.light-theme) input:not([type="checkbox"]):not([type="radio"]),
body:not(.light-theme) textarea,
body:not(.light-theme) select,
body:not(.light-theme) .form-control,
body:not(.light-theme) .form-select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary, var(--phi-gray-900)) !important;
}

/* Light theme inputs */
body.light-theme input:not([type="checkbox"]):not([type="radio"]),
body.light-theme textarea,
body.light-theme select,
body.light-theme .form-control,
body.light-theme .form-select {
    background: var(--bg-input, var(--bg-lightest, #f9fafb)) !important;
    border: 1px solid var(--border-color, var(--border-light, #d1d5db)) !important;
    color: var(--text-primary, var(--text-dark)) !important;
}

/* Placeholders */
body:not(.light-theme) input::placeholder,
body:not(.light-theme) textarea::placeholder {
    color: var(--text-muted, var(--phi-gray-500)) !important;
}

body.light-theme input::placeholder,
body.light-theme textarea::placeholder {
    color: var(--text-muted, var(--text-muted-light)) !important;
}

/* ===================================================
   9. CORRECTIONS MODALS UNIVERSELLES
   =================================================== */

/* Modal body labels */
.modal-body label,
.modal-body .form-label {
    color: var(--text-primary) !important;
}

body.light-theme .modal-body label,
body.light-theme .modal-body .form-label {
    color: var(--text-dark-secondary) !important;
}

/* ===================================================
   10. CORRECTIONS TABLES
   =================================================== */

/* Dark theme tables */
body:not(.light-theme) .table {
    color: var(--text-primary) !important;
}

body:not(.light-theme) .table th {
    color: var(--text-secondary) !important;
}

body:not(.light-theme) .table td {
    color: var(--text-primary) !important;
}

/* Light theme tables */
body.light-theme .table {
    color: var(--text-dark) !important;
}

body.light-theme .table th {
    color: var(--text-secondary-dark) !important;
}

body.light-theme .table td {
    color: var(--text-dark) !important;
}

/* ===================================================
   11. CORRECTIONS DROPDOWNS & SELECTS
   =================================================== */

/* Dark theme dropdowns */
body:not(.light-theme) .dropdown-menu {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

body:not(.light-theme) .dropdown-item {
    color: var(--text-primary) !important;
}

body:not(.light-theme) .dropdown-item:hover {
    background: var(--bg-card-hover) !important;
}

/* EXCEPTION: Dropdown glassmorphism opaque (ATS "Ajouter un candidat") */
body:not(.light-theme) .dropdown-menu.dropdown-menu-glass,
body:not(.light-theme) .add-candidate-dropdown .dropdown-menu {
    background: rgba(17, 24, 39, 0.98) !important;
    backdrop-filter: blur(21px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(21px) saturate(180%) !important;
}

/* Light theme dropdowns */
body.light-theme .dropdown-menu {
    background: var(--white, #ffffff) !important;
    border: 1px solid var(--bg-light, var(--phi-gray-700)) !important;
}

body.light-theme .dropdown-item {
    color: var(--text-dark) !important;
}

body.light-theme .dropdown-item:hover {
    background: var(--bg-lighter, var(--phi-gray-800)) !important;
}

/* EXCEPTION: Dropdown glassmorphism opaque (ATS "Ajouter un candidat") - Light theme */
body.light-theme .dropdown-menu.dropdown-menu-glass,
body.light-theme .add-candidate-dropdown .dropdown-menu {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(21px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(21px) saturate(180%) !important;
    border: 1px solid var(--phi-dark-200) !important;
}

/* ===================================================
   12. CORRECTIONS SIDEBAR ATS (CTA Recrutement)
   =================================================== */

/* Sidebar section ATS */
.sidebar-section[data-section="ats"] .nav-link,
.sidebar .ats-section .nav-link {
    color: var(--text-secondary) !important;
}

.sidebar-section[data-section="ats"] .nav-link:hover,
.sidebar-section[data-section="ats"] .nav-link.active {
    color: var(--accent-secondary) !important;
    background: var(--accent-secondary-10, rgba(102, 126, 234, 0.1)) !important;
}

body.light-theme .sidebar-section[data-section="ats"] .nav-link {
    color: var(--text-secondary-dark) !important;
}

body.light-theme .sidebar-section[data-section="ats"] .nav-link:hover,
body.light-theme .sidebar-section[data-section="ats"] .nav-link.active {
    color: var(--accent-secondary) !important;
    background: var(--accent-secondary-10, rgba(102, 126, 234, 0.1)) !important;
}

/* ===================================================
   13. CORRECTIONS BADGES & STATUS
   =================================================== */

/* Ensure status badges are always readable */
.badge,
[class*="status-"],
[class*="badge-"] {
    font-weight: 600 !important;
}

/* ===================================================
   14. CORRECTIONS EMPTY STATES
   =================================================== */

.empty-state,
.no-results,
.no-data {
    color: var(--text-secondary) !important;
}

.empty-state h3,
.empty-state h4,
.no-results h3,
.no-results h4 {
    color: var(--text-primary) !important;
}

/* ===================================================
   15. CORRECTIONS SPÉCIFIQUES DOCUMENTS MODULE
   =================================================== */

.documents-container .document-card {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-color) !important;
}

.documents-container .document-title {
    color: var(--text-primary) !important;
}

.documents-container .document-meta {
    color: var(--text-secondary) !important;
}

/* ===================================================
   16. CORRECTIONS DEMANDES SPÉCIALES
   =================================================== */

.special-requests-container .request-card {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-color) !important;
}

.special-requests-container .request-title {
    color: var(--text-primary) !important;
}

.special-requests-container .request-description {
    color: var(--text-secondary) !important;
}

/* ===================================================
   17. CORRECTIONS MODULE PRIMES
   =================================================== */

.primes-container .prime-card {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-color) !important;
}

.primes-container .prime-amount {
    color: var(--text-primary) !important;
}

.primes-container .prime-label {
    color: var(--text-secondary) !important;
}

/* ===================================================
   18. CORRECTIONS GÉNÉRATEUR DE CONTRATS
   =================================================== */

.contract-generator-container .contract-preview {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* ===================================================
   19. CORRECTIONS PROPOSITIONS COMMERCIALES
   =================================================== */

.sales-container .proposal-card {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-color) !important;
}

.sales-container .proposal-title {
    color: var(--text-primary) !important;
}

.sales-container .proposal-amount {
    color: var(--accent-primary) !important;
}

/* ===================================================
   20. CORRECTIONS MESSAGERIE
   =================================================== */

.chat-container .message-input {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.chat-container .message-bubble {
    background: var(--bg-glass) !important;
    color: var(--text-primary) !important;
}

/* ===================================================
   21. CORRECTIONS SEARCH BOXES - Part 3 Bugs
   Fix BUG-050, BUG-068, BUG-073, BUG-074, BUG-076, BUG-078
   =================================================== */

/* Search box inputs - TOUS les modules */
.search-box-modern input,
.search-input,
input[type="search"],
input[placeholder*="Rechercher"],
input[placeholder*="Search"] {
    color: var(--text-primary) !important;
    background: var(--bg-input) !important;
}

body.light-theme .search-box-modern input,
body.light-theme .search-input,
body.light-theme input[type="search"],
body.light-theme input[placeholder*="Rechercher"],
body.light-theme input[placeholder*="Search"] {
    color: var(--text-dark) !important;
    background: var(--bg-lightest, #f9fafb) !important;
}

/* Fix chevauchement texte/placeholder - BUG-050, BUG-068 */
.floating-label input:not(:placeholder-shown) + label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.search-box-modern input:not(:placeholder-shown) + label {
    transform: translateY(calc(-1 * var(--space-5))) scale(0.85) !important;
    background: var(--bg-card) !important;
    padding: 0 var(--space-1) !important;
    color: var(--text-muted) !important;
}

/* ===================================================
   22. CORRECTIONS SELECT/OPTIONS NATIVES
   Fix BUG-046, BUG-047, BUG-048, BUG-055, BUG-057
   =================================================== */

/* Selects natifs - dark theme */
body:not(.light-theme) select,
body:not(.light-theme) select option,
body:not(.light-theme) .form-select,
body:not(.light-theme) .form-select option {
    background: var(--bg-secondary, #1e293b) !important;
    color: var(--text-primary) !important;
}

/* Selects natifs - light theme */
body.light-theme select,
body.light-theme select option,
body.light-theme .form-select,
body.light-theme .form-select option {
    background: var(--white, #ffffff) !important;
    color: var(--text-dark, #1f2937) !important;
}

/* Select2 / Tom-select / Custom selects */
.select2-container--default .select2-selection--single,
.ts-control,
.choices__inner {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.select2-dropdown,
.ts-dropdown,
.choices__list--dropdown {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

.select2-results__option,
.ts-dropdown .option,
.choices__item {
    color: var(--text-primary) !important;
}

.select2-results__option--highlighted,
.ts-dropdown .option.active,
.choices__item--selectable.is-highlighted {
    background: var(--accent-primary-10) !important;
    color: var(--accent-primary) !important;
}

/* ===================================================
   23. CORRECTIONS SALARY DASHBOARD
   Fix BUG-049, BUG-050, BUG-051, BUG-052, BUG-054
   =================================================== */

/* Salary table - ensure all text is visible */
.salary-table,
.salary-table th,
.salary-table td,
.salary-table tbody tr {
    color: var(--text-primary) !important;
}

.salary-table thead th {
    color: var(--text-secondary) !important;
    background: var(--bg-glass) !important;
}

body.light-theme .salary-table,
body.light-theme .salary-table th,
body.light-theme .salary-table td {
    color: var(--text-dark) !important;
}

body.light-theme .salary-table thead th {
    color: var(--text-secondary-dark) !important;
    background: var(--bg-lighter) !important;
}

/* Employee info in salary table */
.employee-name,
.employee-info .name,
.employee-details .department {
    color: var(--text-primary) !important;
}

body.light-theme .employee-name,
body.light-theme .employee-info .name,
body.light-theme .employee-details .department {
    color: var(--text-dark) !important;
}

/* Salary amounts */
.salary-amount,
.gross-salary,
.net-salary,
.amount-value,
td.amount,
.salary-brut,
.salary-net {
    color: var(--text-primary) !important;
    font-weight: 600;
}

/* Simulation modal - BUG-052 */
.simulation-modal .modal-body,
.simulation-result,
.simulation-output {
    background: var(--bg-glass) !important;
    color: var(--text-primary) !important;
}

.simulation-modal label,
.simulation-modal .form-label {
    color: var(--text-primary) !important;
}

/* Projections tab - BUG-054 */
.projections-table td,
.projections-table th,
.costs-table td,
.costs-table th {
    color: var(--text-primary) !important;
}

/* Charts labels - BUG-051 */
.chart-legend,
.chart-label,
canvas + .legend,
.chart-container text {
    color: var(--text-primary) !important;
    fill: var(--text-primary) !important;
}

/* ===================================================
   24. CORRECTIONS MESSAGING MODULE
   Fix BUG-062, BUG-063, BUG-064, BUG-065, BUG-066
   =================================================== */

/* Campaign modal */
.campaign-modal .modal-content,
.campaign-modal .modal-body,
#newCampaignModal .modal-content,
#newCampaignModal .modal-body {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.campaign-modal label,
.campaign-modal .form-label,
#newCampaignModal label {
    color: var(--text-primary) !important;
}

.campaign-modal input,
.campaign-modal textarea,
.campaign-modal select,
#newCampaignModal input,
#newCampaignModal textarea {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

/* Recipients section */
.recipients-section,
.destinataires-panel,
.recipient-list {
    background: var(--bg-glass) !important;
    color: var(--text-primary) !important;
}

.recipient-item,
.recipient-chip {
    color: var(--text-primary) !important;
}

/* Signatures modal - BUG-064 */
.signatures-modal .modal-content,
#signaturesModal .modal-content {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.signature-item,
.signature-card {
    background: var(--bg-glass) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.signature-name,
.signature-content {
    color: var(--text-primary) !important;
}

/* Email history - BUG-062 */
.email-history-table td,
.email-history-table th,
.history-table td,
.history-table th {
    color: var(--text-primary) !important;
}

/* Campaign filters - BUG-065 */
.campaign-filters .filter-btn,
.campaign-filters button {
    color: var(--text-secondary) !important;
}

.campaign-filters .filter-btn.active,
.campaign-filters button.active {
    color: var(--accent-primary) !important;
}

/* ===================================================
   25. CORRECTIONS FORUM MODULE
   Fix BUG-075
   =================================================== */

/* Forum channel modal */
.forum-modal .modal-content,
#manageChannelsModal .modal-content,
#newChannelModal .modal-content {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.forum-modal label,
.forum-modal input,
.forum-modal textarea {
    color: var(--text-primary) !important;
}

.forum-modal input,
.forum-modal textarea {
    background: var(--bg-input) !important;
    border-color: var(--border-color) !important;
}

/* Channel list */
.channel-item,
.forum-channel {
    color: var(--text-primary) !important;
}

/* Forum messages */
.forum-message-content,
.message-text,
.post-content {
    color: var(--text-primary) !important;
}

/* ===================================================
   26. CORRECTIONS GOODIES MODULE
   Fix BUG-082, BUG-083
   =================================================== */

/* Budget section - BUG-083 */
.budget-section,
.goodies-budget,
#budgetTab {
    color: var(--text-primary) !important;
}

.budget-section .alert,
.budget-message,
.budget-info {
    background: var(--bg-glass) !important;
    color: var(--text-primary) !important;
}

.budget-table td,
.budget-table th,
.employee-budget-table td,
.employee-budget-table th {
    color: var(--text-primary) !important;
}

body.light-theme .budget-section,
body.light-theme .goodies-budget,
body.light-theme #budgetTab {
    color: var(--text-dark) !important;
}

body.light-theme .budget-table td,
body.light-theme .budget-table th {
    color: var(--text-dark) !important;
}

/* Price verified toggle - BUG-082 */
.price-verified-btn,
.verify-price-btn {
    cursor: pointer !important;
}

.price-verified-btn.verified,
.verify-price-btn.verified {
    color: var(--success) !important;
}

.price-verified-btn:not(.verified),
.verify-price-btn:not(.verified) {
    color: var(--text-muted) !important;
}

/* ===================================================
   27. CORRECTIONS ORGANIGRAMME
   Fix BUG-067, BUG-068, BUG-069
   =================================================== */

/* Available employees panel */
.orgchart-available,
.disponibles-panel,
#availableEmployees {
    color: var(--text-primary) !important;
}

.available-employee,
.employee-draggable {
    background: var(--bg-glass) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

/* Unassigned count - BUG-068 pluriel */
.unassigned-count {
    color: var(--text-secondary) !important;
}

/* Filter dropdown fix */
.orgchart-filters select,
.role-filter select {
    position: relative;
    z-index: 10;
}

.orgchart-sidebar,
.orgchart-panel {
    overflow: visible !important;
}

/* ===================================================
   28. CORRECTIONS CLIENTS MODULE
   Fix BUG-039, BUG-041, BUG-042
   =================================================== */

/* Client edit modal */
.client-modal .modal-content,
#editClientModal .modal-content,
#clientFormModal .modal-content {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.client-modal label,
.client-modal input,
.client-modal textarea,
.client-modal select {
    color: var(--text-primary) !important;
}

.client-modal input,
.client-modal textarea,
.client-modal select {
    background: var(--bg-input) !important;
    border-color: var(--border-color) !important;
}

/* Client table names - BUG-042 */
.client-name,
.enterprise-name,
.clients-table td:first-child {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* Hierarchy/Cards views - BUG-041 */
.clients-hierarchy,
.clients-cards-view,
#hierarchyView,
#cardsView {
    color: var(--text-primary) !important;
}

.hierarchy-node,
.client-card {
    background: var(--bg-glass) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

/* ===================================================
   29. CORRECTIONS INVOICES/PAYMENTS
   Fix BUG-043, BUG-044, BUG-046
   =================================================== */

/* Year selector */
.year-selector select,
.invoice-year-filter select,
#yearFilter {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

/* Payment tracking dropdowns */
.payment-filters select,
.account-filter select,
.status-filter select {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
}

body.light-theme .payment-filters select,
body.light-theme .account-filter select {
    background: var(--white) !important;
    color: var(--text-dark) !important;
}

/* ===================================================
   30. CORRECTIONS TRAININGS/FORMATIONS
   Fix BUG-078, BUG-079, BUG-080
   =================================================== */

/* Trainings list */
.training-card,
.formation-card {
    background: var(--bg-glass) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.training-title,
.formation-title {
    color: var(--text-primary) !important;
}

.training-description,
.formation-description {
    color: var(--text-secondary) !important;
}

/* Enrollment button */
.enroll-btn,
.start-training-btn {
    cursor: pointer !important;
}

/* ===================================================
   31. CORRECTIONS ANNIVERSAIRES
   Fix BUG-071
   =================================================== */

.birthday-list-container,
.anniversaires-section {
    max-height: 400px;
    overflow-y: auto;
}

.birthday-item,
.anniversaire-item {
    color: var(--text-primary) !important;
}

/* ===================================================
   32. CORRECTIONS BLOG
   Fix BUG-073, BUG-074
   =================================================== */

/* Blog search */
.blog-search input {
    color: var(--text-primary) !important;
    background: var(--bg-input) !important;
}

body.light-theme .blog-search input {
    color: var(--text-dark) !important;
}

/* Blog articles */
.blog-article,
.article-card {
    color: var(--text-primary) !important;
}

.article-title {
    color: var(--text-primary) !important;
}

.article-excerpt,
.article-content {
    color: var(--text-secondary) !important;
}

/* ===================================================
   33. CORRECTIONS REVOLUT CONFIG
   Fix BUG-045 - Ne jamais exposer les chemins serveur
   =================================================== */

/* Cache les messages d'erreur avec paths serveur */
.error-message:contains('/var/www/'),
.alert:contains('/var/www/') {
    /* Handled by PHP - this is just a reminder */
}

/* ===================================================
   34. CORRECTIONS GLOBALES TABLEAUX THEAD
   Fix contraste texte sur fond - tous les modules
   =================================================== */

/*
 * PROBLÈME: Dans certains modules, le thead a un fond semi-transparent
 * qui laisse transparaître le background du body, créant un mauvais contraste.
 *
 * SOLUTION: Forcer un fond opaque et un texte contrasté pour tous les tableaux.
 */

/* Dark Theme - Fond sombre + texte clair */
.table thead th,
table.table thead th,
.phi-card .table thead th,
.glass-card .table thead th,
.h-glass-box .table thead th,
#contractsTable thead th {
    background: var(--phi-gray-50, rgba(255, 255, 255, 0.05)) !important;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7)) !important;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1)) !important;
    font-weight: 600;
    font-size: var(--text-xs, 0.786rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Light Theme - Fond clair + texte sombre */
body.light-theme .table thead th,
body.light-theme table.table thead th,
body.light-theme .phi-card .table thead th,
body.light-theme .glass-card .table thead th,
body.light-theme .h-glass-box .table thead th,
body.light-theme #contractsTable thead th {
    background: var(--phi-dark-50, rgba(0, 0, 0, 0.03)) !important;
    color: var(--text-secondary-dark, rgba(0, 0, 0, 0.7)) !important;
    border-bottom: 1px solid var(--phi-dark-100, rgba(0, 0, 0, 0.1)) !important;
}

/* ===================================================
   FIN DES CORRECTIONS CRITIQUES Part 3
   =================================================== */
