/* 
 * Theme Light pour Planning Ménage
 * Palette de couleurs professionnelles et modernes
 */

/* Variables de couleurs pour le mode light */
.light-mode {
    /* Backgrounds principaux */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-sidebar: linear-gradient(to bottom, #f8fafc, #e2e8f0);
    
    /* Couleurs de surface (cards, modals, etc.) */
    --surface-primary: #ffffff;
    --surface-secondary: #f8fafc;
    --surface-hover: #f1f5f9;
    --surface-active: #e2e8f0;
    
    /* Couleurs de texte */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    
    /* Bordures */
    --border-primary: #e2e8f0;
    --border-secondary: #cbd5e1;
    --border-focus: #3b82f6;
    
    /* Couleurs d'accent */
    --accent-primary: #3b82f6;
    --accent-primary-hover: #2563eb;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #06b6d4;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Overlays */
    --overlay-bg: rgba(0, 0, 0, 0.3);
    --modal-overlay: rgba(0, 0, 0, 0.4);
    
    /* Scrollbar */
    --scrollbar-bg: #f1f5f9;
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-thumb-hover: #94a3b8;
}

/* Application des styles light mode */
body.light-mode {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* Header en mode light */
.light-mode .header-container,
.light-mode #app-header {
    background-color: var(--surface-primary);
    border-bottom: 1px solid var(--border-primary);
    box-shadow: var(--shadow-sm);
}

/* Sidebar reste sombre même en light mode pour le contraste */
.light-mode #sidebar {
    /* On garde le thème sombre pour la sidebar pour un meilleur contraste */
    background: linear-gradient(to bottom, #1e293b, #0f172a);
}

/* Cards en mode light */
.light-mode .card-dark,
.light-mode .bg-gray-800,
.light-mode .bg-gray-900 {
    background-color: var(--surface-primary);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-sm);
}

.light-mode .card-dark:hover {
    box-shadow: var(--shadow-md);
}

/* Tables en mode light */
.light-mode table {
    background-color: var(--surface-primary);
}

.light-mode thead {
    background-color: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-primary);
}

.light-mode tbody tr {
    border-bottom: 1px solid var(--border-primary);
}

.light-mode tbody tr:hover {
    background-color: var(--surface-hover);
}

/* Inputs en mode light */
.light-mode input,
.light-mode select,
.light-mode textarea {
    background-color: var(--surface-primary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}

.light-mode input:focus,
.light-mode select:focus,
.light-mode textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.light-mode input::placeholder,
.light-mode textarea::placeholder {
    color: var(--text-muted);
}

/* Buttons en mode light */
.light-mode .btn-primary {
    background-color: var(--accent-primary);
    color: var(--text-inverse);
}

.light-mode .btn-primary:hover {
    background-color: var(--accent-primary-hover);
}

.light-mode .btn-secondary {
    background-color: var(--surface-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.light-mode .btn-secondary:hover {
    background-color: var(--surface-hover);
}

/* Modals en mode light */
.light-mode .modal-content,
.light-mode [class*="modal"] {
    background-color: var(--surface-primary);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-xl);
}

.light-mode .modal-header {
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
}

/* Dropdowns en mode light */
.light-mode .dropdown-menu {
    background-color: var(--surface-primary);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-lg);
}

.light-mode .dropdown-item:hover {
    background-color: var(--surface-hover);
}

/* Planning samedi - lots */
.light-mode .lot-item {
    background-color: var(--surface-primary);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-sm);
}

.light-mode .lot-item:hover {
    box-shadow: var(--shadow-md);
}

.light-mode .lot-item.dragging {
    opacity: 0.8;
    box-shadow: var(--shadow-xl);
}

/* Planning hebdo cells */
.light-mode .planning-cell {
    background-color: var(--surface-primary);
    border: 1px solid var(--border-primary);
}

.light-mode .planning-cell:hover {
    background-color: var(--surface-hover);
}

/* Status badges en mode light */
.light-mode .badge {
    font-weight: 600;
}

.light-mode .badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.light-mode .badge-warning {
    background-color: #fed7aa;
    color: #92400e;
}

.light-mode .badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.light-mode .badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Tabs navigation */
.light-mode .nav-tabs {
    border-bottom: 2px solid var(--border-primary);
}

.light-mode .nav-tab {
    color: var(--text-secondary);
}

.light-mode .nav-tab:hover {
    color: var(--text-primary);
    background-color: var(--surface-hover);
}

.light-mode .nav-tab.active {
    color: var(--accent-primary);
    border-bottom: 2px solid var(--accent-primary);
}

/* Tooltips */
.light-mode .tooltip {
    background-color: var(--text-primary);
    color: var(--text-inverse);
}

/* Notifications */
.light-mode .notification {
    background-color: var(--surface-primary);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-lg);
}

/* Charts - ajuster les couleurs */
.light-mode .chart-container {
    background-color: var(--surface-primary);
}

/* Scrollbar personnalisée */
.light-mode ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.light-mode ::-webkit-scrollbar-track {
    background: var(--scrollbar-bg);
}

.light-mode ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 6px;
}

.light-mode ::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Transitions pour un changement smooth */
.light-mode,
.light-mode * {
    transition: background-color 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Ajustements spécifiques pour les textes */
.light-mode .text-gray-300 { color: var(--text-secondary); }
.light-mode .text-gray-400 { color: var(--text-tertiary); }
.light-mode .text-gray-500 { color: var(--text-muted); }
.light-mode .text-gray-600 { color: var(--text-tertiary); }
.light-mode .text-white { color: var(--text-primary); }

/* Ajustements pour les backgrounds Tailwind */
.light-mode .bg-gray-700 { background-color: var(--surface-secondary); }
.light-mode .bg-gray-600 { background-color: var(--bg-tertiary); }
.light-mode .bg-gray-500 { background-color: var(--surface-hover); }

/* Toggle switch pour le mode */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 28px;
    background-color: #475569;
    border-radius: 34px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.theme-toggle.active {
    background-color: #fbbf24;
}

.theme-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.theme-toggle.active .theme-toggle-slider {
    transform: translateX(32px);
}

/* Icônes du toggle */
.theme-toggle-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

.theme-toggle-icon.moon {
    left: 8px;
    color: #fbbf24;
}

.theme-toggle-icon.sun {
    right: 8px;
    color: #475569;
}