/* Theme Styles - Système de thèmes pour l'application */

/* ==========================================
   THÈME SOMBRE (DEFAULT - Actuel)
   ========================================== */
.rs-theme-dark {
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #1a1a1d;
    --bg-card: #16161a;
    --bg-header: #111113;
    --bg-sidebar: #0f0f11;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
    --accent-blue: #0B5ED7;
    --accent-blue-hover: #0a52c4;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    --accent-purple: #8b5cf6;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* ==========================================
   THÈME TRÈS SOMBRE
   ========================================== */
.rs-theme-darker {
    --bg-primary: #000000;
    --bg-secondary: #050505;
    --bg-tertiary: #0a0a0a;
    --bg-card: #0f0f0f;
    --bg-header: #050505;
    --bg-sidebar: #030303;
    --border-color: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #555;
    --accent-blue: #0B5ED7;
    --accent-blue-hover: #0a52c4;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    --accent-purple: #8b5cf6;
    --shadow: rgba(0, 0, 0, 0.5);
}

/* ==========================================
   THÈME CLAIR (Gris clair)
   ========================================== */
.rs-theme-light {
    --bg-primary: #e8e8ea;
    --bg-secondary: #f0f0f2;
    --bg-tertiary: #f5f5f7;
    --bg-card: #f0f0f2;
    --bg-header: #f0f0f2;
    --bg-sidebar: #e8e8ea;
    --border-color: rgba(0, 0, 0, 0.12);
    --text-primary: #0a0a0a;
    --text-secondary: #2a2a2a;
    --text-muted: #4a4a4a;
    --accent-blue: #0B5ED7;
    --accent-blue-hover: #0a52c4;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    --accent-purple: #8b5cf6;
    --shadow: rgba(0, 0, 0, 0.15);
}

/* ==========================================
   APPLICATION DES VARIABLES CSS
   ========================================== */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header */
header.MuiAppBar-root,
.MuiAppBar-root {
    background-color: var(--bg-header) !important;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary) !important;
}

/* Sidebar */
.MuiDrawer-paper,
.MuiPaper-root.MuiDrawer-paper {
    background-color: var(--bg-sidebar) !important;
    border-right: 1px solid var(--border-color);
    color: var(--text-primary) !important;
}

/* Logo dans le menu sidebar */
/* Cible uniquement l'image du logo, pas le conteneur */
.MuiDrawer-paper img[alt="Logo"],
.MuiPaper-root.MuiDrawer-paper img[alt="Logo"] {
    width: 100% !important;
    max-width: 160px !important; /* Taille maximale du logo - MODIFIABLE ICI */
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Cards */
.MuiCard-root,
.MuiPaper-root.MuiCard-root {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color);
    color: var(--text-primary) !important;
}

/* Text Colors */
.MuiTypography-root {
    color: var(--text-primary) !important;
}

.MuiTypography-body1,
.MuiTypography-body2 {
    color: var(--text-secondary) !important;
}

.MuiTypography-caption {
    color: var(--text-muted) !important;
}

/* Buttons */
.MuiButton-containedPrimary {
    background-color: var(--accent-blue) !important;
    color: white !important;
}

.MuiButton-containedPrimary:hover {
    background-color: var(--accent-blue-hover) !important;
}

.MuiButton-textPrimary {
    color: var(--accent-blue) !important;
}

/* Inputs */
.MuiInputBase-root,
.MuiTextField-root input,
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.MuiInputBase-root::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-muted) !important;
}

/* Tables */
.MuiTable-root,
table {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

.MuiTableHead-root th,
th {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.MuiTableBody-root td,
td {
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

tr:hover td {
    background-color: var(--bg-tertiary) !important;
}

/* List Items */
.MuiListItemButton-root {
    color: var(--text-secondary) !important;
}

.MuiListItemButton-root:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

.MuiListItemButton-root.Mui-selected {
    background-color: rgba(11, 94, 215, 0.15) !important;
    color: var(--accent-blue) !important;
}

/* Icons */
.MuiSvgIcon-root,
svg {
    color: var(--text-secondary) !important;
}

/* Amélioration du contraste pour le thème clair */
.rs-theme-light .MuiSvgIcon-root,
.rs-theme-light svg,
.rs-theme-light .anticon {
    color: var(--text-primary) !important;
    opacity: 0.9 !important;
}

/* Fond clair pour les boutons d'icônes du header dans le thème clair */
.rs-theme-light header .MuiIconButton-root,
.rs-theme-light .MuiAppBar-root .MuiIconButton-root,
.rs-theme-light .MuiToolbar-root .MuiIconButton-root,
.rs-theme-light button[aria-label="open localization"],
.rs-theme-light button[aria-label="settings toggler"],
.rs-theme-light button[aria-label="open drawer"] {
    background-color: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.rs-theme-light header .MuiIconButton-root:hover,
.rs-theme-light .MuiAppBar-root .MuiIconButton-root:hover,
.rs-theme-light .MuiToolbar-root .MuiIconButton-root:hover,
.rs-theme-light button[aria-label="open localization"]:hover,
.rs-theme-light button[aria-label="settings toggler"]:hover,
.rs-theme-light button[aria-label="open drawer"]:hover {
    background-color: rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Icônes du header - garder les couleurs d'origine mais avec meilleur contraste */
.rs-theme-light header .MuiIconButton-root .MuiSvgIcon-root,
.rs-theme-light header .MuiIconButton-root svg,
.rs-theme-light header .MuiIconButton-root .anticon,
.rs-theme-light header .anticon svg,
.rs-theme-light .MuiAppBar-root .MuiIconButton-root .MuiSvgIcon-root,
.rs-theme-light .MuiAppBar-root .MuiIconButton-root svg,
.rs-theme-light .MuiAppBar-root .MuiIconButton-root .anticon,
.rs-theme-light .MuiAppBar-root .anticon svg,
.rs-theme-light .MuiToolbar-root .MuiIconButton-root svg,
.rs-theme-light .MuiToolbar-root .MuiIconButton-root .anticon svg,
.rs-theme-light .MuiToolbar-root .anticon svg,
.rs-theme-light button[aria-label="open localization"] svg,
.rs-theme-light button[aria-label="settings toggler"] svg,
.rs-theme-light button[aria-label="open drawer"] svg,
.rs-theme-light button[aria-label="open profile"] svg,
.rs-theme-light button[aria-label="open profile"] .MuiSvgIcon-root,
.rs-theme-light .MuiToolbar-root button[aria-label*="localization"] svg,
.rs-theme-light .MuiToolbar-root button[aria-label*="settings"] svg,
.rs-theme-light .MuiToolbar-root button[aria-label*="drawer"] svg,
.rs-theme-light .MuiToolbar-root button[aria-label*="profile"] svg,
.rs-theme-light header button svg,
.rs-theme-light header button .anticon svg,
.rs-theme-light .MuiToolbar-root button svg,
.rs-theme-light .MuiToolbar-root button .anticon svg,
.rs-theme-light .MuiAppBar-root button svg,
.rs-theme-light .MuiAppBar-root button .anticon svg {
    opacity: 1 !important;
}

/* Icônes dans les spans anticon du header - ciblage renforcé */
.rs-theme-light .MuiToolbar-root .anticon svg,
.rs-theme-light header .anticon svg,
.rs-theme-light .MuiAppBar-root .anticon svg,
.rs-theme-light .MuiToolbar-root .anticon svg[fill="currentColor"],
.rs-theme-light header .anticon svg[fill="currentColor"],
.rs-theme-light .MuiToolbar-root button div .anticon svg,
.rs-theme-light header button div .anticon svg,
.rs-theme-light .MuiAppBar-root button div .anticon svg {
    color: #1a1a1a !important;
    fill: #1a1a1a !important;
    opacity: 1 !important;
}

/* Cibler tous les SVG dans les boutons du header, même dans des divs */
.rs-theme-light .MuiToolbar-root button div svg,
.rs-theme-light header button div svg,
.rs-theme-light .MuiAppBar-root button div svg {
    color: #1a1a1a !important;
    fill: #1a1a1a !important;
    opacity: 1 !important;
}

/* Avatar utilisateur dans le header - garder blanc sur fond bleu */
.rs-theme-light .MuiAvatar-root .MuiSvgIcon-root,
.rs-theme-light .MuiAvatar-root svg {
    color: white !important;
    fill: white !important;
}



/* ==========================================
   MESSAGES D'ACCUEIL (fs-alert)
   ========================================== */

/* Thème sombre (défaut) */
.rs-theme-dark .fs-alert {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1b0f11;
    color: #f5f5f5;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 18px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
}

.rs-theme-dark .fs-alert--error {
    border-color: #7a1f1f;
    background: #20090a;
}

.rs-theme-dark .fs-alert--info {
    border-color: #1f3fa6;
    background: #0c142d;
}

.rs-theme-dark .fs-alert__icon svg {
    color: #f97066;
}

.rs-theme-dark .fs-alert--info .fs-alert__icon svg {
    color: #60a5fa;
}

/* Thème très sombre */
.rs-theme-darker .fs-alert {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: #0a0506;
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 18px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

.rs-theme-darker .fs-alert--error {
    border-color: #5a1515;
    background: #150505;
}

.rs-theme-darker .fs-alert--info {
    border-color: #153080;
    background: #050a1a;
}

.rs-theme-darker .fs-alert__icon svg {
    color: #f97066;
}

.rs-theme-darker .fs-alert--info .fs-alert__icon svg {
    color: #60a5fa;
}

/* Thème clair */
.rs-theme-light .fs-alert {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #ffffff;
    color: #1a1a1a;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rs-theme-light .fs-alert--error {
    border-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

.rs-theme-light .fs-alert--info {
    border-color: #0B5ED7;
    background: #eff6ff;
    color: #1e40af;
}

.rs-theme-light .fs-alert__icon svg {
    color: #ef4444;
}

.rs-theme-light .fs-alert--info .fs-alert__icon svg {
    color: #0B5ED7;
}

.rs-theme-light .fs-alert__message {
    color: inherit;
}

.rs-theme-light .fs-alert__message strong {
    color: inherit;
    font-weight: 600;
}

/* ==========================================
   MODALS - Styles adaptatifs pour tous les thèmes
   ========================================== */

/* Modal backdrop */
.rs-theme-light .modal-overlay,
.rs-theme-light #solutionsModal,
.rs-theme-light #order-modal,
.rs-theme-light #ticket-modal {
    background: rgba(0, 0, 0, 0.5) !important;
}

.rs-theme-dark .modal-overlay,
.rs-theme-darker .modal-overlay {
    background: rgba(0, 0, 0, 0.75) !important;
}

/* Modal content - Thème clair */
.rs-theme-light .modal,
.rs-theme-light .solutions-modal-content,
.rs-theme-light #order-modal > div,
.rs-theme-light #ticket-modal > div {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.rs-theme-light .modal-header,
.rs-theme-light .solutions-modal-content > div:first-child {
    background: #f5f5f7 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #1a1a1a !important;
}

.rs-theme-light .modal-title,
.rs-theme-light .solutions-modal-content h2 {
    color: #1a1a1a !important;
}

.rs-theme-light .modal-close,
.rs-theme-light .solutions-modal-content button,
.rs-theme-light #order-modal button,
.rs-theme-light #ticket-modal button {
    color: #4a4a4a !important;
}

.rs-theme-light .modal-close:hover,
.rs-theme-light .solutions-modal-content button:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #1a1a1a !important;
}

.rs-theme-light .modal-body {
    color: #1a1a1a !important;
    background: #ffffff !important;
}

.rs-theme-light .modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: #f5f5f7 !important;
}

/* Solutions modal spécifique - Thème clair */
.rs-theme-light .solutions-modal-content {
    background: #ffffff !important;
    color: #1a1a1a !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
}

.rs-theme-light .solutions-modal-content > div:first-child {
    background: #f5f5f7 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.rs-theme-light .solutions-modal-content h2 {
    color: #1a1a1a !important;
}

.rs-theme-light .solutions-modal-content [style*="background: linear-gradient"],
.rs-theme-light .solutions-modal-content [style*="background:rgba(11,94,215"] {
    background: linear-gradient(135deg, rgba(11, 94, 215, 0.1) 0%, rgba(11, 94, 215, 0.05) 100%) !important;
    border: 1px solid rgba(11, 94, 215, 0.2) !important;
    color: #1e40af !important;
}

.rs-theme-light .solutions-modal-content [style*="color: #9e9e9e"],
.rs-theme-light .solutions-modal-content [style*="color:#9e9e9e"] {
    color: #6a6a6a !important;
}

.rs-theme-light .solutions-modal-content [style*="color: #f5f5f5"],
.rs-theme-light .solutions-modal-content [style*="color:#f5f5f5"] {
    color: #1a1a1a !important;
}

.rs-theme-light .solutions-modal-content [style*="color: #e0e0e0"],
.rs-theme-light .solutions-modal-content [style*="color:#e0e0e0"] {
    color: #2a2a2a !important;
}

.rs-theme-light .solutions-modal-content [style*="color: #b0b0b0"],
.rs-theme-light .solutions-modal-content [style*="color:#b0b0b0"] {
    color: #4a4a4a !important;
}

/* Order modal et Ticket modal - Thème clair */
.rs-theme-light #order-modal > div,
.rs-theme-light #ticket-modal > div {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.rs-theme-light #order-modal h3,
.rs-theme-light #ticket-modal h3,
.rs-theme-light #order-modal h4,
.rs-theme-light #ticket-modal h4 {
    color: #1a1a1a !important;
}

.rs-theme-light #order-modal p,
.rs-theme-light #ticket-modal p,
.rs-theme-light #order-modal span,
.rs-theme-light #ticket-modal span {
    color: #2a2a2a !important;
}

.rs-theme-light #order-modal [style*="color: #808080"],
.rs-theme-light #ticket-modal [style*="color: #808080"],
.rs-theme-light #order-modal [style*="color:#808080"],
.rs-theme-light #ticket-modal [style*="color:#808080"] {
    color: #6a6a6a !important;
}

/* Formulaires dans les modals - Thème clair */
.rs-theme-light .modal input,
.rs-theme-light .modal select,
.rs-theme-light .modal textarea,
.rs-theme-light .solutions-modal-content input,
.rs-theme-light .solutions-modal-content select,
.rs-theme-light .solutions-modal-content textarea,
.rs-theme-light #order-modal input,
.rs-theme-light #order-modal select,
.rs-theme-light #order-modal textarea,
.rs-theme-light #ticket-modal input,
.rs-theme-light #ticket-modal select,
.rs-theme-light #ticket-modal textarea {
    background: #f5f5f7 !important;
    color: #1a1a1a !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

.rs-theme-light .modal input::placeholder,
.rs-theme-light .modal textarea::placeholder,
.rs-theme-light .solutions-modal-content input::placeholder,
.rs-theme-light #order-modal input::placeholder,
.rs-theme-light #ticket-modal input::placeholder {
    color: #8a8a8a !important;
}

/* Labels dans les modals - Thème clair */
.rs-theme-light .modal label,
.rs-theme-light .solutions-modal-content label,
.rs-theme-light #order-modal label,
.rs-theme-light #ticket-modal label {
    color: #1a1a1a !important;
}

/* Boutons dans les modals - Thème clair */
.rs-theme-light .modal .btn,
.rs-theme-light .solutions-modal-content button,
.rs-theme-light #order-modal button,
.rs-theme-light #ticket-modal button {
    color: #1a1a1a !important;
}

.rs-theme-light .modal .btn-primary,
.rs-theme-light .solutions-modal-content .btn-primary {
    background: #0B5ED7 !important;
    color: white !important;
}

.rs-theme-light .modal .btn-secondary,
.rs-theme-light .solutions-modal-content .btn-secondary {
    background: #f0f0f2 !important;
    color: #1a1a1a !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

/* Override des styles inline dans les modals - Thème clair */
.rs-theme-light [style*="background: #1b1b1d"],
.rs-theme-light [style*="background:#1b1b1d"],
.rs-theme-light [style*="background: #16161a"],
.rs-theme-light [style*="background:#16161a"],
.rs-theme-light [style*="background: #1a1a1d"],
.rs-theme-light [style*="background:#1a1a1d"] {
    background: #f5f5f7 !important;
}

.rs-theme-light [style*="color: #f5f5f5"],
.rs-theme-light [style*="color:#f5f5f5"],
.rs-theme-light [style*="color: #e0e0e0"],
.rs-theme-light [style*="color:#e0e0e0"] {
    color: #1a1a1a !important;
}

.rs-theme-light [style*="color: #666"],
.rs-theme-light [style*="color:#666"],
.rs-theme-light [style*="color: #808080"],
.rs-theme-light [style*="color:#808080"] {
    color: #6a6a6a !important;
}

.rs-theme-light [style*="border: 1px solid rgba(255,255,255,0.1)"],
.rs-theme-light [style*="border:1px solid rgba(255,255,255,0.1)"],
.rs-theme-light [style*="border-bottom: 1px solid rgba(255,255,255,0.1)"],
.rs-theme-light [style*="border-bottom:1px solid rgba(255,255,255,0.1)"] {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.rs-theme-light [style*="background: rgba(255,255,255,0.02)"],
.rs-theme-light [style*="background:rgba(255,255,255,0.02)"] {
    background: rgba(0, 0, 0, 0.02) !important;
}

.rs-theme-light [style*="background: rgba(255,255,255,0.1)"],
.rs-theme-light [style*="background:rgba(255,255,255,0.1)"] {
    background: rgba(0, 0, 0, 0.05) !important;
}

/* Formulaires Material-UI - Thème clair */
.rs-theme-light .MuiInputBase-input,
.rs-theme-light .MuiOutlinedInput-input,
.rs-theme-light .MuiInputBase-root input,
.rs-theme-light .MuiInputBase-root textarea {
    color: #1a1a1a !important;
}

.rs-theme-light .MuiInputBase-root::placeholder,
.rs-theme-light .MuiInputBase-input::placeholder {
    color: #8a8a8a !important;
    opacity: 0.7 !important;
}

.rs-theme-light .MuiFormLabel-root,
.rs-theme-light .MuiInputLabel-root {
    color: #2a2a2a !important;
}

.rs-theme-light .MuiFormLabel-root.Mui-focused,
.rs-theme-light .MuiInputLabel-root.Mui-focused {
    color: #0B5ED7 !important;
}

.rs-theme-light .MuiOutlinedInput-notchedOutline {
    border-color: rgba(0, 0, 0, 0.2) !important;
}

.rs-theme-light .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline {
    border-color: rgba(0, 0, 0, 0.3) !important;
}

.rs-theme-light .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
    border-color: #0B5ED7 !important;
    border-width: 2px !important;
}

.rs-theme-light .MuiFormHelperText-root {
    color: #6a6a6a !important;
}

.rs-theme-light .MuiFormHelperText-root.Mui-error {
    color: #d32f2f !important;
}

/* Autocomplete et Select - Thème clair */
.rs-theme-light .MuiAutocomplete-input,
.rs-theme-light .MuiSelect-select {
    color: #1a1a1a !important;
}

.rs-theme-light .MuiSelect-icon {
    color: #4a4a4a !important;
}

/* Checkbox et Radio - Thème clair */
.rs-theme-light .MuiCheckbox-root,
.rs-theme-light .MuiRadio-root {
    color: #4a4a4a !important;
}

.rs-theme-light .MuiCheckbox-root.Mui-checked,
.rs-theme-light .MuiRadio-root.Mui-checked {
    color: #0B5ED7 !important;
}

/* Typography - Thème clair */
.rs-theme-light .MuiTypography-root {
    color: inherit;
}

.rs-theme-light .MuiTypography-h1,
.rs-theme-light .MuiTypography-h2,
.rs-theme-light .MuiTypography-h3,
.rs-theme-light .MuiTypography-h4,
.rs-theme-light .MuiTypography-h5,
.rs-theme-light .MuiTypography-h6 {
    color: #1a1a1a !important;
}

.rs-theme-light .MuiTypography-body1,
.rs-theme-light .MuiTypography-body2 {
    color: #2a2a2a !important;
}

.rs-theme-light .MuiTypography-subtitle1,
.rs-theme-light .MuiTypography-subtitle2 {
    color: #2a2a2a !important;
}

/* Paper et Card - Thème clair */
.rs-theme-light .MuiPaper-root {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.rs-theme-light .MuiCard-root {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Divider - Thème clair */
.rs-theme-light .MuiDivider-root {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* List items - Thème clair */
.rs-theme-light .MuiListItemText-primary,
.rs-theme-light .MuiListItemText-secondary {
    color: var(--text-primary) !important;
}

/* Button text - Thème clair */
.rs-theme-light .MuiButton-textPrimary {
    color: #0B5ED7 !important;
}

.rs-theme-light .MuiButton-textSecondary {
    color: #6a6a6a !important;
}

/* Chip - Thème clair */
.rs-theme-light .MuiChip-root {
    background: #f0f0f2 !important;
    color: #1a1a1a !important;
}

.rs-theme-light .MuiChip-colorPrimary {
    background: rgba(11, 94, 215, 0.1) !important;
    color: #0B5ED7 !important;
}

/* Badges Credit/Debit - Garder les couleurs rouge/vert en thème clair */
.rs-theme-light .css-credit-chip,
.rs-theme-light [style*="background-color: #389e0d"],
.rs-theme-light [style*="background-color:#389e0d"] {
    background-color: #389e0d !important;
    color: white !important;
}

.rs-theme-light .css-debit-chip,
.rs-theme-light [style*="background-color: #cf1322"],
.rs-theme-light [style*="background-color:#cf1322"] {
    background-color: #cf1322 !important;
    color: white !important;
}

/* Table - Thème clair */
.rs-theme-light .MuiTableCell-root {
    color: #1a1a1a !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.rs-theme-light .MuiTableHead .MuiTableCell-root {
    color: #2a2a2a !important;
    font-weight: 600 !important;
}

/* Tabs - Thème clair */
.rs-theme-light .MuiTab-root {
    color: #6a6a6a !important;
}

.rs-theme-light .MuiTab-root.Mui-selected {
    color: #0B5ED7 !important;
}

.rs-theme-light .MuiTabs-indicator {
    background-color: #0B5ED7 !important;
}

/* ==========================================
   ÉLÉMENTS AVEC STYLES INLINE - Thème clair
   ========================================== */

/* Textes avec couleurs fixes - Thème clair */
.rs-theme-light [style*="color: #b0b0b0"],
.rs-theme-light [style*="color:#b0b0b0"],
.rs-theme-light [style*="color: #9e9e9e"],
.rs-theme-light [style*="color:#9e9e9e"] {
    color: #6a6a6a !important;
}

.rs-theme-light [style*="color: #a0a0a0"],
.rs-theme-light [style*="color:#a0a0a0"] {
    color: #5a5a5a !important;
}

/* Backgrounds avec couleurs fixes - Thème clair */
.rs-theme-light [style*="background: rgba(255,255,255,0.03)"],
.rs-theme-light [style*="background:rgba(255,255,255,0.03)"] {
    background: rgba(0, 0, 0, 0.03) !important;
}

.rs-theme-light [style*="background: rgba(255,255,255,0.05)"],
.rs-theme-light [style*="background:rgba(255,255,255,0.05)"] {
    background: rgba(0, 0, 0, 0.05) !important;
}

/* Code blocks - Thème clair */
.rs-theme-light code,
.rs-theme-light [style*="font-family: monospace"] {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #1a1a1a !important;
}

.rs-theme-light [style*="color: #4fc3f7"],
.rs-theme-light [style*="color:#4fc3f7"] {
    color: #0B5ED7 !important;
}

.rs-theme-light [style*="background: rgba(79,195,247,0.1)"],
.rs-theme-light [style*="background:rgba(79,195,247,0.1)"] {
    background: rgba(11, 94, 215, 0.1) !important;
}

/* File analysis sections - Thème clair */
.rs-theme-light [style*="color: #f5f5f5"][style*="File Analysis"],
.rs-theme-light h6[style*="color: #f5f5f5"] {
    color: #1a1a1a !important;
}

/* Status badges et labels - Thème clair */
.rs-theme-light [style*="color: #4caf50"],
.rs-theme-light [style*="color:#4caf50"] {
    color: #22c55e !important;
}

.rs-theme-light [style*="color: #ff9800"],
.rs-theme-light [style*="color:#ff9800"] {
    color: #f59e0b !important;
}

/* Textarea dans modals - Thème clair */
.rs-theme-light textarea[style*="background: rgba(255,255,255,0.03)"] {
    background: rgba(0, 0, 0, 0.03) !important;
    color: #1a1a1a !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

.rs-theme-light textarea[style*="background: rgba(255,255,255,0.03)"]::placeholder {
    color: #8a8a8a !important;
}

/* Inputs dans modals - Thème clair */
.rs-theme-light input[style*="background: #1a1a1d"],
.rs-theme-light input[style*="background:#1a1a1d"],
.rs-theme-light textarea[style*="background: #1a1a1d"],
.rs-theme-light textarea[style*="background:#1a1a1d"] {
    background: #f5f5f7 !important;
    color: #1a1a1a !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Divs avec backgrounds sombres - Thème clair */
.rs-theme-light div[style*="background: #1a1a1d"],
.rs-theme-light div[style*="background:#1a1a1d"] {
    background: #f5f5f7 !important;
}

/* Messages et notes - Thème clair */
.rs-theme-light [style*="color: #a0a0a0"][style*="white-space: pre-wrap"] {
    color: #4a4a4a !important;
}

/* Boutons avec backgrounds - Thème clair */
.rs-theme-light button[style*="background: rgba(211,47,47,0.1)"] {
    background: rgba(211, 47, 47, 0.1) !important;
    color: #d32f2f !important;
    border-color: rgba(211, 47, 47, 0.3) !important;
}

.rs-theme-light button[style*="background: rgba(245, 158, 11, 0.15)"] {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #f59e0b !important;
}

.rs-theme-light button[style*="background: rgba(34, 197, 94, 0.15)"] {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #22c55e !important;
}

.rs-theme-light button[style*="background: rgba(11, 94, 215, 0.1)"] {
    background: rgba(11, 94, 215, 0.1) !important;
    color: #0B5ED7 !important;
}

/* Sections avec gradients - Thème clair */
.rs-theme-light [style*="background: linear-gradient(90deg, rgba(245,158,11,0.15)"] {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%) !important;
    color: #f59e0b !important;
}

.rs-theme-light [style*="background: linear-gradient(90deg, rgba(34,197,94,0.15)"] {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%) !important;
    color: #22c55e !important;
}

.rs-theme-light [style*="background: linear-gradient(90deg, rgba(139,92,246,0.15)"] {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%) !important;
    color: #8b5cf6 !important;
}

/* Spans avec couleurs spécifiques - Thème clair */
.rs-theme-light span[style*="color: #0B5ED7"][style*="background: rgba(11,94,215,0.15)"] {
    background: rgba(11, 94, 215, 0.15) !important;
    color: #0B5ED7 !important;
}

/* Table rows et cards - Thème clair */
.rs-theme-light .MuiTableRow-root:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}

/* Loading spinner text - Thème clair */
.rs-theme-light [style*="color: #b0b0b0"][style*="Analyse du fichier"] {
    color: #6a6a6a !important;
}

/* Messages d'erreur et de validation - Thème clair */
.rs-theme-light .field-error,
.rs-theme-light .MuiFormHelperText-root.Mui-error {
    color: #d32f2f !important;
}

/* Links dans les modals - Thème clair */
.rs-theme-light a[style*="color: #a0d0ff"],
.rs-theme-light a[style*="color:#a0d0ff"],
.rs-theme-light a[style*="color: #0B5ED7"],
.rs-theme-light a[style*="color:#0B5ED7"] {
    color: #0B5ED7 !important;
}

/* Status colors dans les messages - Thème clair */
.rs-theme-light [style*="color: rgba(255,255,255,0.7)"],
.rs-theme-light [style*="color:rgba(255,255,255,0.7)"] {
    color: rgba(0, 0, 0, 0.7) !important;
}

/* Badges de statut - Thème clair */
.rs-theme-light [style*="background:"][style*="color: white"][style*="Ticket"] {
    color: white !important;
}

/* Sections avec uppercase labels - Thème clair */
.rs-theme-light [style*="text-transform: uppercase"][style*="color: #808080"],
.rs-theme-light [style*="text-transform: uppercase"][style*="color:#808080"] {
    color: #6a6a6a !important;
}

/* File info sections - Thème clair */
.rs-theme-light [style*="FILE INFORMATION"],
.rs-theme-light [style*="CHECKSUMS"],
.rs-theme-light [style*="ECU DETECTION"],
.rs-theme-light [style*="DATABASE MATCH"] {
    color: #6a6a6a !important;
}

/* Confidence indicators - Thème clair */
.rs-theme-light [style*="confidence"] {
    color: inherit !important;
}

/* Empty states - Thème clair */
.rs-theme-light [style*="text-align: center"][style*="color: #808080"] {
    color: #6a6a6a !important;
}

/* ==========================================
   AUTODATA - Modal d'aperçu de performance véhicule
   ========================================== */

/* Search container - Thème clair */
.rs-theme-light #search-input {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #1a1a1a !important;
}

.rs-theme-light #search-input::placeholder {
    color: #8a8a8a !important;
}

.rs-theme-light #search-results {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

.rs-theme-light .search-result-item {
    border-bottom-color: rgba(0, 0, 0, 0.05) !important;
}

.rs-theme-light .search-result-item:hover {
    background: rgba(11, 94, 215, 0.1) !important;
}

.rs-theme-light .search-result-item [style*="color: white"] {
    color: #1a1a1a !important;
}

.rs-theme-light .search-result-item [style*="color: #808080"] {
    color: #6a6a6a !important;
}

/* Selectors - Thème clair */
.rs-theme-light .selector-wrapper select {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #1a1a1a !important;
}

.rs-theme-light .selector-wrapper::after {
    color: #6a6a6a !important;
}

.rs-theme-light .selector-wrapper select option {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

/* Breadcrumb - Thème clair */
.rs-theme-light #breadcrumb {
    color: #6a6a6a !important;
}

.rs-theme-light .bc-link {
    color: #0B5ED7 !important;
}

.rs-theme-light .bc-item {
    color: #1a1a1a !important;
}

.rs-theme-light .bc-sep {
    color: #8a8a8a !important;
}

/* Result card - Thème clair */
.rs-theme-light .result-card {
    background: linear-gradient(180deg, #f5f5f7 0%, #ffffff 100%) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.rs-theme-light .result-header-bar {
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

.rs-theme-light .step-label {
    color: #6a6a6a !important;
}

.rs-theme-light .step-title {
    color: #f97316 !important;
}

.rs-theme-light .step-subtitle {
    color: #6a6a6a !important;
}

.rs-theme-light .back-btn {
    background: rgba(11, 94, 215, 0.1) !important;
    border-color: rgba(11, 94, 215, 0.3) !important;
    color: #0B5ED7 !important;
}

.rs-theme-light .back-btn:hover {
    background: rgba(11, 94, 215, 0.2) !important;
}

/* Nav tags - Thème clair */
.rs-theme-light .nav-tags {
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

.rs-theme-light .nav-tag {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #1a1a1a !important;
}

.rs-theme-light .nav-tag-active {
    background: rgba(34, 197, 94, 0.15) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
    color: #22c55e !important;
}

.rs-theme-light .tag-label {
    color: #6a6a6a !important;
}

/* Engine sheet - Thème clair */
.rs-theme-light .engine-sheet {
    background: linear-gradient(135deg, rgba(240, 245, 250, 0.8) 0%, rgba(250, 250, 255, 0.9) 100%) !important;
    border-color: rgba(11, 94, 215, 0.2) !important;
}

.rs-theme-light .sheet-label {
    color: #6a6a6a !important;
}

.rs-theme-light .sheet-title {
    color: #1a1a1a !important;
}

.rs-theme-light .sheet-slug {
    color: #22c55e !important;
}

.rs-theme-light .sheet-tag {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #1a1a1a !important;
}

.rs-theme-light .stag-label {
    color: #6a6a6a !important;
}

/* Power stats - Thème clair */
.rs-theme-light .stat-box {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.rs-theme-light .stat-value {
    color: #1a1a1a !important;
}

.rs-theme-light .stat-suffix {
    color: #6a6a6a !important;
}

/* Specs grid - Thème clair */
.rs-theme-light .specs-section {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

.rs-theme-light .specs-title {
    color: #1a1a1a !important;
}

.rs-theme-light .specs-subtitle {
    color: #6a6a6a !important;
}

.rs-theme-light .spec-box {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

.rs-theme-light .spec-label {
    color: #6a6a6a !important;
}

.rs-theme-light .spec-value {
    color: #1a1a1a !important;
}

/* Options section - Thème clair */
.rs-theme-light .option-tag {
    background: rgba(34, 197, 94, 0.15) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
    color: #22c55e !important;
}

/* CTA - Thème clair */
.rs-theme-light .result-cta {
    border-top-color: rgba(0, 0, 0, 0.1) !important;
    background: rgba(0, 0, 0, 0.02) !important;
}

.rs-theme-light .cta-button {
    background: linear-gradient(135deg, #0B5ED7 0%, #0947a6 100%) !important;
    color: white !important;
}

/* Titre de la page - Thème clair */
.rs-theme-light [style*="color: white"][style*="Autodata"] {
    color: #1a1a1a !important;
}

.rs-theme-light [style*="color: #808080"][style*="Search for performance"] {
    color: #6a6a6a !important;
}

/* ==========================================
   ACCOUNT PAGE - Account Statistics
   ========================================== */

/* Disabled inputs in Account Statistics - Thème clair */
.rs-theme-light input[disabled][id^="account-"],
.rs-theme-light input.Mui-disabled[id^="account-"],
.rs-theme-light input[style*="background-color: rgba(255,255,255,0.1)"] {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

.rs-theme-light input[disabled][id^="account-"]::placeholder,
.rs-theme-light input.Mui-disabled[id^="account-"]::placeholder {
    color: #8a8a8a !important;
    opacity: 0.7 !important;
}

/* Labels in Account Statistics - Thème clair */
.rs-theme-light label[for^="account-"],
.rs-theme-light .MuiFormLabel-root[id^="account-"],
.rs-theme-light label:has(+ * input[id^="account-"]) {
    color: #2a2a2a !important;
}

/* Card content in Account Statistics - Thème clair */
.rs-theme-light .MuiCard-root .MuiCardContent-root h6 {
    color: #1a1a1a !important;
}

.rs-theme-light .MuiCard-root .MuiCardContent-root svg {
    color: #4a4a4a !important;
}

/* Account Statistics section - Thème clair */
.rs-theme-light .MuiCard-root[id*="account"],
.rs-theme-light .MuiCard-root:has(h6:contains("Account Statistics")),
.rs-theme-light .MuiCard-root:has(h6:contains("Statistics")) {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Outlined input borders in Account Statistics - Thème clair */
.rs-theme-light .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline {
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Account status badge - Thème clair */
.rs-theme-light #account-status {
    color: #1a1a1a !important;
}

.rs-theme-light #account-status svg {
    color: inherit !important;
}

.rs-theme-light #account-status span[style*="color: #4caf50"] {
    color: #22c55e !important;
}

.rs-theme-light #account-status span[style*="color: #ff9800"] {
    color: #f59e0b !important;
}

/* Account user name - Thème clair */
.rs-theme-light #account-user-name {
    color: #1a1a1a !important;
}

/* Override inline styles for disabled inputs - Thème clair */
.rs-theme-light input[style*="background-color: rgba(255,255,255,0.1)"] {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

/* All disabled inputs in account page - Thème clair */
.rs-theme-light .MuiInputBase-root.Mui-disabled input,
.rs-theme-light input.Mui-disabled {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

.rs-theme-light .MuiInputBase-root.Mui-disabled input::placeholder {
    color: #8a8a8a !important;
    opacity: 0.7 !important;
    -webkit-text-fill-color: #8a8a8a !important;
}

/* Card headers and icons in account page - Thème clair */
.rs-theme-light .MuiCard-root .MuiBox-root svg[data-testid="InfoIcon"],
.rs-theme-light .MuiCard-root .MuiBox-root svg[data-testid="LanguageIcon"],
.rs-theme-light .MuiCard-root .MuiBox-root svg[data-testid="AccountBoxIcon"] {
    color: #4a4a4a !important;
}

/* Form labels in account page - Thème clair */
.rs-theme-light .MuiFormLabel-root.MuiInputLabel-root {
    color: #2a2a2a !important;
}

.rs-theme-light .MuiFormLabel-root.MuiInputLabel-root.Mui-focused {
    color: #0B5ED7 !important;
}

/* ==========================================
   ACCOUNT PAGE - Account Statistics (Thèmes sombres)
   ========================================== */

/* Disabled inputs in Account Statistics - Thèmes sombres */
.rs-theme-dark input[disabled][id^="account-"],
.rs-theme-dark input.Mui-disabled[id^="account-"],
.rs-theme-darker input[disabled][id^="account-"],
.rs-theme-darker input.Mui-disabled[id^="account-"],
.rs-theme-dark input[style*="background-color: rgba(255,255,255,0.1)"],
.rs-theme-darker input[style*="background-color: rgba(255,255,255,0.1)"] {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
}

.rs-theme-dark input[disabled][id^="account-"]::placeholder,
.rs-theme-dark input.Mui-disabled[id^="account-"]::placeholder,
.rs-theme-darker input[disabled][id^="account-"]::placeholder,
.rs-theme-darker input.Mui-disabled[id^="account-"]::placeholder {
    color: #a0a0a0 !important;
    opacity: 0.7 !important;
    -webkit-text-fill-color: #a0a0a0 !important;
}

/* Labels in Account Statistics - Thèmes sombres */
.rs-theme-dark label[for^="account-"],
.rs-theme-dark .MuiFormLabel-root[id^="account-"],
.rs-theme-dark label:has(+ * input[id^="account-"]),
.rs-theme-darker label[for^="account-"],
.rs-theme-darker .MuiFormLabel-root[id^="account-"],
.rs-theme-darker label:has(+ * input[id^="account-"]) {
    color: #f5f5f5 !important;
}

/* Card content in Account Statistics - Thèmes sombres */
.rs-theme-dark .MuiCard-root .MuiCardContent-root h6,
.rs-theme-darker .MuiCard-root .MuiCardContent-root h6 {
    color: #f5f5f5 !important;
}

.rs-theme-dark .MuiCard-root .MuiCardContent-root svg,
.rs-theme-darker .MuiCard-root .MuiCardContent-root svg {
    color: #a0a0a0 !important;
}

/* All disabled inputs in account page - Thèmes sombres */
.rs-theme-dark .MuiInputBase-root.Mui-disabled input,
.rs-theme-dark input.Mui-disabled,
.rs-theme-darker .MuiInputBase-root.Mui-disabled input,
.rs-theme-darker input.Mui-disabled {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
}

.rs-theme-dark .MuiInputBase-root.Mui-disabled input::placeholder,
.rs-theme-darker .MuiInputBase-root.Mui-disabled input::placeholder {
    color: #a0a0a0 !important;
    opacity: 0.7 !important;
    -webkit-text-fill-color: #a0a0a0 !important;
}

/* Card headers and icons in account page - Thèmes sombres */
.rs-theme-dark .MuiCard-root .MuiBox-root svg[data-testid="InfoIcon"],
.rs-theme-dark .MuiCard-root .MuiBox-root svg[data-testid="LanguageIcon"],
.rs-theme-dark .MuiCard-root .MuiBox-root svg[data-testid="AccountBoxIcon"],
.rs-theme-darker .MuiCard-root .MuiBox-root svg[data-testid="InfoIcon"],
.rs-theme-darker .MuiCard-root .MuiBox-root svg[data-testid="LanguageIcon"],
.rs-theme-darker .MuiCard-root .MuiBox-root svg[data-testid="AccountBoxIcon"] {
    color: #a0a0a0 !important;
}

/* Form labels in account page - Thèmes sombres */
.rs-theme-dark .MuiFormLabel-root.MuiInputLabel-root,
.rs-theme-darker .MuiFormLabel-root.MuiInputLabel-root {
    color: #f5f5f5 !important;
}

.rs-theme-dark .MuiFormLabel-root.MuiInputLabel-root.Mui-focused,
.rs-theme-darker .MuiFormLabel-root.MuiInputLabel-root.Mui-focused {
    color: #0B5ED7 !important;
}

/* Account status badge - Thèmes sombres */
.rs-theme-dark #account-status,
.rs-theme-darker #account-status {
    color: #f5f5f5 !important;
}

.rs-theme-dark #account-status svg,
.rs-theme-darker #account-status svg {
    color: inherit !important;
}

/* Account user name - Thèmes sombres */
.rs-theme-dark #account-user-name,
.rs-theme-darker #account-user-name {
    color: #f5f5f5 !important;
}

/* Outlined input borders in Account Statistics - Thèmes sombres */
.rs-theme-dark .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline,
.rs-theme-darker .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.rs-theme-light .MuiTypography-root {
    color: var(--text-primary) !important;
    font-weight: 500 !important;
}

.rs-theme-light .MuiTypography-body1,
.rs-theme-light .MuiTypography-body2 {
    color: var(--text-secondary) !important;
    font-weight: 400 !important;
}

.rs-theme-light .MuiListItemButton-root {
    color: var(--text-primary) !important;
}

.rs-theme-light .MuiListItemButton-root:hover {
    color: var(--text-primary) !important;
}

/* Badges */
.MuiBadge-badge {
    background-color: var(--accent-blue) !important;
    color: white !important;
}

/* Toolbar */
.MuiToolbar-root {
    background-color: var(--bg-header) !important;
    border-bottom: 1px solid var(--border-color);
}

/* Main Content */
main {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Animation pour le changement de thème */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animation de rotation continue pour l'icône de changement de thème */
@keyframes rotateIcon {
    from {
        transform: rotate(var(--initial-rotation, 0deg)) translateZ(0px);
    }
    to {
        transform: rotate(calc(var(--initial-rotation, 0deg) + 360deg)) translateZ(0px);
    }
}

/* Appliquer l'animation de rotation continue à l'icône de thème */
button[aria-label="Change theme"] div[style*="transform"],
button[aria-label="settings toggler"] div[style*="transform"] {
    --initial-rotation: 137.513deg;
    animation: rotateIcon 3s linear infinite !important;
    transform-origin: center center;
}

/* Ajustements spécifiques pour le thème clair */
.rs-theme-light .MuiCard-root {
    box-shadow: 0 2px 8px var(--shadow) !important;
}

.rs-theme-light header.MuiAppBar-root {
    box-shadow: 0 1px 3px var(--shadow) !important;
}

/* Ajustements spécifiques pour le thème très sombre */
.rs-theme-darker .MuiCard-root {
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
}

.rs-theme-darker .MuiListItemButton-root:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

/* Ajustements pour les graphiques ApexCharts */
.rs-theme-light .apexcharts-tooltip {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #1a1a1a !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.rs-theme-dark .apexcharts-tooltip,
.rs-theme-darker .apexcharts-tooltip {
    background: rgba(30, 30, 30, 0.95) !important;
    color: #ffffff !important;
}

