diff --git a/src/components/HoraireModal/CirculationCalendar.css b/src/components/HoraireModal/CirculationCalendar.css index 4cc20a7..eb17da4 100644 --- a/src/components/HoraireModal/CirculationCalendar.css +++ b/src/components/HoraireModal/CirculationCalendar.css @@ -191,3 +191,85 @@ transform: none !important; cursor: default; } + +/* Dark Mode */ +body.dark-mode .cal-templates, +body.dark-mode .cal-scroll-area, +body.dark-mode .cal-legend, +[data-theme="dark"] .cal-templates, +[data-theme="dark"] .cal-scroll-area, +[data-theme="dark"] .cal-legend { + background: #151f30; + border-color: #243247; + color: #f1f5f9; +} + +body.dark-mode .cal-templates-label, +[data-theme="dark"] .cal-templates-label { + color: #e2e8f0; +} + +body.dark-mode .cal-tpl-btn, +[data-theme="dark"] .cal-tpl-btn { + background: #0b111e; + border-color: #243247; + color: #cbd5e1; +} + +body.dark-mode .cal-tpl-btn:hover, +[data-theme="dark"] .cal-tpl-btn:hover { + background: #1e293b; + border-color: #3b82f6; + color: #f8fafc; +} + +body.dark-mode .cal-month-title, +[data-theme="dark"] .cal-month-title { + color: #f8fafc; + border-bottom-color: #243247; +} + +body.dark-mode .cal-header, +[data-theme="dark"] .cal-header { + color: #94a3b8; +} + +body.dark-mode .cal-day, +[data-theme="dark"] .cal-day { + background: #0b111e; + border-color: #243247; + color: #e2e8f0; +} + +body.dark-mode .cal-day:not(.disabled):not(.empty):hover, +[data-theme="dark"] .cal-day:not(.disabled):not(.empty):hover { + border-color: #38bdf8; + box-shadow: 0 0 0 1px #38bdf8; +} + +body.dark-mode .cal-day.disabled, +[data-theme="dark"] .cal-day.disabled { + background: #111827; + color: #4b5563; + border-color: #1f2937; +} + +body.dark-mode .cal-day.weekend, +[data-theme="dark"] .cal-day.weekend { + background: #1f1b13; + color: #fcd34d; + border-color: #3d2f14; +} + +body.dark-mode .cal-day.ferie, +[data-theme="dark"] .cal-day.ferie { + background: #270d13; + color: #fca5a5; + border-color: #4c1d24; +} + +body.dark-mode .cal-legend-item, +[data-theme="dark"] .cal-legend-item { + color: #94a3b8; +} + diff --git a/src/components/header/AppHeader.css b/src/components/header/AppHeader.css index aaca718..6ee96aa 100644 --- a/src/components/header/AppHeader.css +++ b/src/components/header/AppHeader.css @@ -526,3 +526,164 @@ } } +/* ========================================================================== + DARK MODE + ========================================================================== */ +body.dark-mode .app-header-shell, +[data-theme="dark"] .app-header-shell { + background: #151f30; + border-bottom-color: #243247; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); +} + +body.dark-mode .app-header-title h1, +[data-theme="dark"] .app-header-title h1 { + color: #f8fafc; +} + +body.dark-mode .app-header-title span, +[data-theme="dark"] .app-header-title span { + color: #94a3b8; +} + +body.dark-mode .app-menu-group > a, +body.dark-mode .app-menu-group > button, +[data-theme="dark"] .app-menu-group > a, +[data-theme="dark"] .app-menu-group > button { + color: #cbd5e1; +} + +body.dark-mode .app-menu-group > a:hover, +body.dark-mode .app-menu-group > button:hover, +body.dark-mode .app-menu-group > a.active, +body.dark-mode .app-menu-group > button.active, +[data-theme="dark"] .app-menu-group > a:hover, +[data-theme="dark"] .app-menu-group > button:hover, +[data-theme="dark"] .app-menu-group > a.active, +[data-theme="dark"] .app-menu-group > button.active { + background: #1a2a42; + color: #38bdf8; +} + +body.dark-mode .app-submenu, +[data-theme="dark"] .app-submenu { + background: #151f30; + border-color: #243247; + box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4); +} + +body.dark-mode .app-submenu a, +[data-theme="dark"] .app-submenu a { + color: #cbd5e1; +} + +body.dark-mode .app-submenu a:hover, +body.dark-mode .app-submenu a.active, +[data-theme="dark"] .app-submenu a:hover, +[data-theme="dark"] .app-submenu a.active { + background: #1a2a42; + color: #38bdf8; +} + +body.dark-mode .app-header-notification-btn, +[data-theme="dark"] .app-header-notification-btn { + background: #0e1726; + border-color: #243247; + color: #38bdf8; +} + +body.dark-mode .app-notifications-drawer, +[data-theme="dark"] .app-notifications-drawer { + background: #151f30; + border-left-color: #243247; + color: #f8fafc; +} + +body.dark-mode .app-notifications-head, +[data-theme="dark"] .app-notifications-head { + border-bottom-color: #243247; +} + +body.dark-mode .app-notification-item, +[data-theme="dark"] .app-notification-item { + background: #0e1726; + border-color: #243247; + color: #f8fafc; +} + +body.dark-mode .app-notification-item:hover, +[data-theme="dark"] .app-notification-item:hover { + background: #1a2a42; +} + +body.dark-mode .app-notification-item strong, +[data-theme="dark"] .app-notification-item strong { + color: #f8fafc; +} + +body.dark-mode .app-notification-item span, +body.dark-mode .app-notification-item small, +[data-theme="dark"] .app-notification-item span, +[data-theme="dark"] .app-notification-item small { + color: #94a3b8; +} + +body.dark-mode .app-header-user-pill, +[data-theme="dark"] .app-header-user-pill { + background: #0e1726; + border-color: #243247; +} + +body.dark-mode .app-header-user-pill span, +[data-theme="dark"] .app-header-user-pill span { + color: #f8fafc; +} + +body.dark-mode .app-header-user-accordion, +[data-theme="dark"] .app-header-user-accordion { + background: #151f30; + border-color: #243247; + box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4); +} + +body.dark-mode .app-header-user-accordion a, +body.dark-mode .app-header-user-accordion button, +[data-theme="dark"] .app-header-user-accordion a, +[data-theme="dark"] .app-header-user-accordion button { + color: #cbd5e1; +} + +body.dark-mode .app-header-user-accordion a:hover, +body.dark-mode .app-header-user-accordion button:hover, +[data-theme="dark"] .app-header-user-accordion a:hover, +[data-theme="dark"] .app-header-user-accordion button:hover { + background: #1a2a42; + color: #38bdf8; +} + +body.dark-mode .app-header-menu-toggle, +[data-theme="dark"] .app-header-menu-toggle { + background: #0e1726; + border-color: #243247; + color: #38bdf8; +} + +@media (max-width: 980px) { + body.dark-mode .app-top-menu, + [data-theme="dark"] .app-top-menu { + background: #151f30; + border-color: #243247; + } + + body.dark-mode .app-submenu, + [data-theme="dark"] .app-submenu { + background: #0e1726; + } + + body.dark-mode .app-header-user-accordion, + [data-theme="dark"] .app-header-user-accordion { + background: #0e1726; + } +} + + diff --git a/src/dark-mode.css b/src/dark-mode.css index eaf0767..3ccf383 100644 --- a/src/dark-mode.css +++ b/src/dark-mode.css @@ -208,61 +208,48 @@ body.dark-mode .service-badge { } /* Dashboard Overrides */ -body.dark-mode .dashboard-page { - background-color: #121212 !important; +body.dark-mode .dashboard-page-root, +body.dark-mode .dashboard-page, +[data-theme="dark"] .dashboard-page-root, +[data-theme="dark"] .dashboard-page { + background-color: #0b111e !important; } -body.dark-mode .dashboard-hero { - background: linear-gradient(140deg, #1e1e1e 0%, #2a2a2a 70%, #333 100%) !important; - color: #e0e0e0 !important; - box-shadow: 0 14px 35px rgba(0,0,0,0.5) !important; +body.dark-mode .dashboard-hero-card, +[data-theme="dark"] .dashboard-hero-card { + background: linear-gradient(135deg, #051829 0%, #0d2847 60%, #15416b 100%) !important; + border: 1px solid #243247 !important; + box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45) !important; } -body.dark-mode .dashboard-hero h1, -body.dark-mode .dashboard-hero p, -body.dark-mode .dashboard-hero strong, -body.dark-mode .dashboard-subtitle, -body.dark-mode .dashboard-kicker { - color: #e0e0e0 !important; +body.dark-mode .dashboard-kpi-card, +body.dark-mode .dashboard-widget-card, +body.dark-mode .dashboard-status-bar, +[data-theme="dark"] .dashboard-kpi-card, +[data-theme="dark"] .dashboard-widget-card, +[data-theme="dark"] .dashboard-status-bar { + background-color: #151f30 !important; + border-color: #243247 !important; + color: #f8fafc !important; } -body.dark-mode .stat-card, -body.dark-mode .dashboard-widget, -body.dark-mode .widget-header-panel, -body.dark-mode .widget-content-panel { - background-color: #1e1e1e !important; - border-color: #333 !important; - color: #e0e0e0 !important; +body.dark-mode .dashboard-incident-item, +body.dark-mode .dashboard-schedule-item, +body.dark-mode .dashboard-action-tile, +[data-theme="dark"] .dashboard-incident-item, +[data-theme="dark"] .dashboard-schedule-item, +[data-theme="dark"] .dashboard-action-tile { + background-color: #0e1726 !important; + border-color: #243247 !important; + color: #f8fafc !important; } -body.dark-mode .stat-card-title, -body.dark-mode .stat-card-value, -body.dark-mode .stat-card-subtitle, -body.dark-mode .widget-item-text strong, -body.dark-mode .perturbation-item-route, -body.dark-mode .horaire-item-route, -body.dark-mode .perturbation-item-details, -body.dark-mode .quick-action-row-left { - color: #e0e0e0 !important; -} -body.dark-mode .stat-card-icon-wrap { - background-color: #333 !important; - color: #e0e0e0 !important; -} -body.dark-mode .quick-action-row { - background-color: #2a2a2a !important; - border-color: #333 !important; - color: #e0e0e0 !important; -} -body.dark-mode .quick-action-row:hover { - background-color: #333 !important; - color: #fff !important; -} -body.dark-mode .quick-action-icon { - background-color: #444 !important; - color: #e0e0e0 !important; -} -body.dark-mode .perturbation-item:hover, -body.dark-mode .horaire-item:hover { - background-color: #2a2a2a !important; - border-color: #444 !important; +body.dark-mode .dashboard-incident-item:hover, +body.dark-mode .dashboard-schedule-item:hover, +body.dark-mode .dashboard-action-tile:hover, +[data-theme="dark"] .dashboard-incident-item:hover, +[data-theme="dark"] .dashboard-schedule-item:hover, +[data-theme="dark"] .dashboard-action-tile:hover { + background-color: #152238 !important; + border-color: #38bdf8 !important; } + body.dark-mode .widget-header { background-color: #2a2a2a !important; border-color: #333 !important; @@ -565,6 +552,11 @@ body.dark-mode .materiel-roulant-card body.dark-mode .dashboard-page, body.dark-mode .travaux-page, +body.dark-mode .travaux-page-root, +body.dark-mode .perturbations-page-root, +body.dark-mode .gares-page-root, +body.dark-mode .materiels-page-root, +body.dark-mode .horaires-page-root, body.dark-mode .parametres-page, body.dark-mode .tarifs-page, body.dark-mode .materiel-roulant-page, @@ -577,7 +569,7 @@ body.dark-mode .systeme-maj-page, body.dark-mode .activer-compte-page, body.dark-mode .acces-non-autorise-page, body.dark-mode .menu-page { - background-color: #121212 !important; + background-color: #0b111e !important; } body.dark-mode .premium-checkbox-label.selected { @@ -586,3 +578,4 @@ body.dark-mode .premium-checkbox-label.selected { border-color: #0d47a1 !important; } + diff --git a/src/pages/acces-non-autorise/AccesNonAutorise.css b/src/pages/acces-non-autorise/AccesNonAutorise.css index e44586c..4cf734e 100644 --- a/src/pages/acces-non-autorise/AccesNonAutorise.css +++ b/src/pages/acces-non-autorise/AccesNonAutorise.css @@ -31,3 +31,25 @@ margin: 0 0 18px; } +/* ========================================================================== + DARK MODE + ========================================================================== */ +body.dark-mode .acces-non-autorise-card, +[data-theme="dark"] .acces-non-autorise-card { + background: #151f30; + border-color: #243247; + color: #f8fafc; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); +} + +body.dark-mode .acces-non-autorise-card h2, +[data-theme="dark"] .acces-non-autorise-card h2 { + color: #f8fafc; +} + +body.dark-mode .acces-non-autorise-card p, +[data-theme="dark"] .acces-non-autorise-card p { + color: #94a3b8; +} + + diff --git a/src/pages/activer-compte/ActiverCompte.css b/src/pages/activer-compte/ActiverCompte.css index c415219..87ef398 100644 --- a/src/pages/activer-compte/ActiverCompte.css +++ b/src/pages/activer-compte/ActiverCompte.css @@ -50,3 +50,28 @@ } } +/* ========================================================================== + DARK MODE + ========================================================================== */ +body.dark-mode .activation-account-card, +[data-theme="dark"] .activation-account-card { + background: #0e1726; + border-color: #243247; +} + +body.dark-mode .activation-account-card h3, +[data-theme="dark"] .activation-account-card h3 { + color: #f8fafc; +} + +body.dark-mode .activation-account-card p, +[data-theme="dark"] .activation-account-card p { + color: #cbd5e1; +} + +body.dark-mode .activation-link, +[data-theme="dark"] .activation-link { + color: #38bdf8; +} + + diff --git a/src/pages/annonces-sonores/AnnoncesSonores.css b/src/pages/annonces-sonores/AnnoncesSonores.css index 57f9e2d..c74e06b 100644 --- a/src/pages/annonces-sonores/AnnoncesSonores.css +++ b/src/pages/annonces-sonores/AnnoncesSonores.css @@ -2058,3 +2058,59 @@ background-color: var(--as-gray-100); } +/* Dark Mode */ +body.dark-mode .annonces-page, +[data-theme="dark"] .annonces-page { + background: #0b111e; + color: #f1f5f9; +} + +body.dark-mode .annonces-page-header, +body.dark-mode .as-panel, +body.dark-mode .as-card, +body.dark-mode .as-modal-content, +[data-theme="dark"] .annonces-page-header, +[data-theme="dark"] .as-panel, +[data-theme="dark"] .as-card, +[data-theme="dark"] .as-modal-content { + background: #151f30; + border-color: #243247; + color: #f1f5f9; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); +} + +body.dark-mode .annonces-page-header h2, +[data-theme="dark"] .annonces-page-header h2 { + color: #f8fafc; +} + +body.dark-mode .as-input-select, +body.dark-mode .as-input-text, +body.dark-mode .as-input-textarea, +[data-theme="dark"] .as-input-select, +[data-theme="dark"] .as-input-text, +[data-theme="dark"] .as-input-textarea { + background-color: #0b111e; + border-color: #243247; + color: #f8fafc; +} + +body.dark-mode .as-table th, +[data-theme="dark"] .as-table th { + background-color: #0e1726; + border-bottom-color: #243247; + color: #94a3b8; +} + +body.dark-mode .as-table td, +[data-theme="dark"] .as-table td { + border-bottom-color: #1e293b; + color: #e2e8f0; +} + +body.dark-mode .as-table tbody tr:hover, +[data-theme="dark"] .as-table tbody tr:hover { + background-color: #1a273c; +} + + diff --git a/src/pages/attribution-materiel-roulant/AttributionMaterielRoulant.css b/src/pages/attribution-materiel-roulant/AttributionMaterielRoulant.css index 283a3ba..c22e8a6 100644 --- a/src/pages/attribution-materiel-roulant/AttributionMaterielRoulant.css +++ b/src/pages/attribution-materiel-roulant/AttributionMaterielRoulant.css @@ -373,4 +373,81 @@ } } +/* Dark Mode */ +body.dark-mode .attribution-mr-page, +[data-theme="dark"] .attribution-mr-page { + background-color: #0b111e; + color: #f1f5f9; +} + +body.dark-mode .attribution-mr-header h2, +[data-theme="dark"] .attribution-mr-header h2 { + color: #f8fafc; +} + +body.dark-mode .attribution-mr-description, +[data-theme="dark"] .attribution-mr-description { + color: #94a3b8; +} + +body.dark-mode .attribution-mr-toolbar, +body.dark-mode .attribution-mr-timeline-wrap, +[data-theme="dark"] .attribution-mr-toolbar, +[data-theme="dark"] .attribution-mr-timeline-wrap { + background: #151f30; + border-color: #243247; + color: #f1f5f9; +} + +body.dark-mode .attribution-mr-direction-btn, +[data-theme="dark"] .attribution-mr-direction-btn { + background: #0b111e; + border-color: #243247; + color: #cbd5e1; +} + +body.dark-mode .attribution-mr-direction-btn.is-active, +[data-theme="dark"] .attribution-mr-direction-btn.is-active { + background: #0284c7; + border-color: #0284c7; + color: #ffffff; +} + +body.dark-mode .attribution-mr-gantt-header, +[data-theme="dark"] .attribution-mr-gantt-header { + background: #0e1726; + border-color: #243247; +} + +body.dark-mode .attribution-mr-gantt-row, +[data-theme="dark"] .attribution-mr-gantt-row { + border-bottom-color: #1e293b; +} + +body.dark-mode .attribution-mr-gantt-label, +[data-theme="dark"] .attribution-mr-gantt-label { + background: #111a28; + border-right-color: #243247; + color: #f8fafc; +} + +body.dark-mode .attribution-mr-materiels-group, +[data-theme="dark"] .attribution-mr-materiels-group { + background: #111a28; + border-color: #243247; +} + +body.dark-mode .attribution-mr-materiels-group-title, +[data-theme="dark"] .attribution-mr-materiels-group-title { + color: #f8fafc; +} + +body.dark-mode .attribution-mr-materiel-card, +[data-theme="dark"] .attribution-mr-materiel-card { + background: #151f30; + border-color: #243247; + color: #f1f5f9; +} + + diff --git a/src/pages/attribution-materiel-roulant/VueRoulement.css b/src/pages/attribution-materiel-roulant/VueRoulement.css index 21f509c..304ccfd 100644 --- a/src/pages/attribution-materiel-roulant/VueRoulement.css +++ b/src/pages/attribution-materiel-roulant/VueRoulement.css @@ -196,4 +196,55 @@ .prochains-departs li:last-child { border-bottom: none; +} + +/* Dark Mode */ +body.dark-mode .vue-roulement-container, +[data-theme="dark"] .vue-roulement-container { + background-color: #0b111e; + color: #f1f5f9; +} + +body.dark-mode .materiel-card, +[data-theme="dark"] .materiel-card { + background-color: #151f30; + border-color: #243247; + color: #f1f5f9; +} + +body.dark-mode .materiel-header, +[data-theme="dark"] .materiel-header { + border-bottom-color: #243247; +} + +body.dark-mode .materiel-header h3, +[data-theme="dark"] .materiel-header h3 { + color: #f8fafc; +} + +body.dark-mode .materiel-header p, +[data-theme="dark"] .materiel-header p { + color: #94a3b8; +} + +body.dark-mode .ligne-section h4, +[data-theme="dark"] .ligne-section h4 { + color: #e2e8f0; +} + +body.dark-mode .timeline-body, +[data-theme="dark"] .timeline-body { + background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(100% / 12 - 1px), #243247 calc(100% / 12 - 1px), #243247 calc(100% / 12)); +} + +body.dark-mode .prochains-departs ul, +[data-theme="dark"] .prochains-departs ul { + border-color: #243247; + background: #111a28; +} + +body.dark-mode .prochains-departs li, +[data-theme="dark"] .prochains-departs li { + border-bottom-color: #1e293b; + color: #e2e8f0; } \ No newline at end of file diff --git a/src/pages/dashboard/Dashboard.css b/src/pages/dashboard/Dashboard.css index d97036d..ba42cbd 100644 --- a/src/pages/dashboard/Dashboard.css +++ b/src/pages/dashboard/Dashboard.css @@ -1,384 +1,1210 @@ -.dashboard-page { - background: #f3f7fc; +/* ========================================================================== + DASHBOARD PAGE — MODERN SNCF DESIGN SYSTEM + ========================================================================== */ + +.dashboard-page-root { + min-height: calc(100vh - 72px); + background-color: #f1f5f9; + padding: 24px 20px 48px; + font-family: 'Avenir', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + color: #0f172a; } -.dashboard-page .panel-content { - width: min(1380px, 100%); +.dashboard-container { + max-width: 1380px; margin: 0 auto; } -.dashboard-hero { - background: linear-gradient(140deg, #082e4f 0%, #11507e 70%, #1d5f90 100%); - border-radius: 16px; - color: #f8fbff; - padding: 28px; +/* ========================================================================== + 1. HERO BANNER + ========================================================================== */ +.dashboard-hero-card { + background: linear-gradient(135deg, #062743 0%, #0d3b66 50%, #0088ce 100%); + border-radius: 18px; + padding: 28px 32px; + color: #ffffff; display: flex; justify-content: space-between; - gap: 18px; - align-items: flex-start; - margin-bottom: 22px; - box-shadow: 0 14px 35px rgba(8, 46, 79, 0.22); + align-items: center; + gap: 24px; + margin-bottom: 24px; + box-shadow: 0 16px 36px rgba(6, 39, 67, 0.22); + position: relative; + overflow: hidden; } -.dashboard-kicker { - margin: 0 0 8px; +.dashboard-hero-card::after { + content: ''; + position: absolute; + top: -60px; + right: -60px; + width: 240px; + height: 240px; + border-radius: 50%; + background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%); + pointer-events: none; +} + +.dashboard-hero-content { + max-width: 760px; + z-index: 1; +} + +.dashboard-hero-kicker-row { + display: flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; + margin-bottom: 10px; +} + +.dashboard-hero-kicker { + display: inline-flex; + align-items: center; + gap: 6px; + background: rgba(255, 255, 255, 0.14); + backdrop-filter: blur(8px); + border: 1px solid rgba(255, 255, 255, 0.2); + padding: 4px 12px; + border-radius: 999px; + font-size: 11px; + font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; + color: #e0f2fe; +} + +.dashboard-hero-kicker wcs-mat-icon { + font-size: 14px; + color: #38bdf8; +} + +.dashboard-region-badge { + display: inline-flex; + align-items: center; + gap: 6px; + background: rgba(56, 189, 248, 0.2); + border: 1px solid rgba(56, 189, 248, 0.4); + padding: 4px 12px; + border-radius: 999px; font-size: 12px; + font-weight: 600; + color: #f0f9ff; +} + +.dashboard-region-badge wcs-mat-icon { + font-size: 14px; + color: #7dd3fc; +} + +.dashboard-hero-title { + margin: 0 0 10px; + font-size: 32px; + font-weight: 800; + letter-spacing: -0.02em; + color: #ffffff; + line-height: 1.2; +} + +.dashboard-user-greeting { + font-weight: 400; opacity: 0.9; } -.dashboard-hero h1 { +.dashboard-hero-desc { margin: 0; - font-size: 32px; - color: white; + font-size: 14px; + line-height: 1.6; + color: rgba(240, 249, 255, 0.88); } -.dashboard-subtitle { - margin: 10px 0 0; - max-width: 760px; - color: rgba(247, 251, 255, 0.9); -} - -.dashboard-hero-side { +.dashboard-hero-actions { display: flex; flex-direction: column; align-items: flex-end; - gap: 10px; -} - -.dashboard-hero-side p { - margin: 0; - font-size: 13px; - color: rgba(247, 251, 255, 0.92); -} - -.stats-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; - margin-bottom: 18px; + flex-shrink: 0; + z-index: 1; } -.stat-card { - background: #ffffff; - border-radius: 12px; - padding: 16px; - border: 1px solid #dbe3ed; - box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06); +.dashboard-sync-status { + display: inline-flex; + align-items: center; + gap: 8px; + font-size: 12px; + color: rgba(240, 249, 255, 0.85); + background: rgba(0, 0, 0, 0.18); + padding: 4px 10px; + border-radius: 999px; } -.stat-card-header { +.dashboard-pulse-dot { + width: 8px; + height: 8px; + border-radius: 50%; + background-color: #22c55e; + box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); + animation: pulseGreen 2s infinite; +} + +@keyframes pulseGreen { + 0% { + box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); + } + 70% { + box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); + } + 100% { + box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); + } +} + +.dashboard-btn-group { display: flex; - align-items: flex-start; + align-items: center; gap: 10px; } -.stat-card-icon-wrap { - width: 38px; - height: 38px; +.dashboard-btn-group wcs-button { + --wcs-button-border-radius: 8px; +} + +.dashboard-quick-create-btn { + --wcs-button-background-color: rgba(255, 255, 255, 0.15); + --wcs-button-color: #ffffff; + --wcs-button-border-color: rgba(255, 255, 255, 0.3); +} + +.dashboard-quick-create-btn:hover { + --wcs-button-background-color: rgba(255, 255, 255, 0.25); +} + +/* ========================================================================== + 2. SUPERVISION STATUS BAR + ========================================================================== */ +.dashboard-status-bar { + background: #ffffff; + border: 1px solid #dbe3ed; + border-radius: 14px; + padding: 14px 20px; + margin-bottom: 24px; + display: flex; + align-items: center; + justify-content: space-between; + box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04); +} + +.dashboard-status-item { + display: flex; + align-items: center; + gap: 12px; + flex: 1; +} + +.dashboard-status-indicator { + width: 36px; + height: 36px; border-radius: 10px; - display: inline-flex; + display: flex; align-items: center; justify-content: center; flex-shrink: 0; } -.stat-card-primary .stat-card-icon-wrap { background: #e9f5ff; color: #0d5f97; } -.stat-card-warning .stat-card-icon-wrap { background: #fff6e8; color: #b15d06; } -.stat-card-info .stat-card-icon-wrap { background: #e8f7f8; color: #0f7575; } -.stat-card-secondary .stat-card-icon-wrap { background: #f4efff; color: #5c3bb8; } -.stat-card-success .stat-card-icon-wrap { background: #e9f8ef; color: #1f7f3f; } - -.stat-card-content { - display: flex; - flex-direction: column; - min-width: 0; +.dashboard-status-indicator.is-success { + background: #ecfdf5; + color: #10b981; } -.stat-card-title { - font-size: 12px; - color: #556277; +.dashboard-status-indicator.is-warning { + background: #fef2f2; + color: #ef4444; +} + +.dashboard-status-indicator.is-info { + background: #f0f9ff; + color: #0284c7; +} + +.dashboard-status-indicator.is-secondary { + background: #f5f3ff; + color: #7c3aed; +} + +.dashboard-status-indicator wcs-mat-icon { + font-size: 20px; +} + +.dashboard-status-text { + display: flex; + flex-direction: column; + gap: 2px; +} + +.dashboard-status-label { + font-size: 11px; font-weight: 700; text-transform: uppercase; - letter-spacing: 0.06em; + letter-spacing: 0.04em; + color: #64748b; } -.stat-card-value { - font-size: 30px; - line-height: 1.2; - font-weight: 700; +.dashboard-status-text strong { + font-size: 14px; color: #0f172a; - margin-top: 2px; } -.stat-card-subtitle { - font-size: 13px; - color: #637287; +.dashboard-status-divider { + width: 1px; + height: 32px; + background: #e2e8f0; + margin: 0 16px; } -.widgets-grid { +/* ========================================================================== + 3. KPI CARDS + ========================================================================== */ +.dashboard-kpis-grid { display: grid; - grid-template-columns: 1.15fr 1fr; - gap: 14px; + grid-template-columns: repeat(4, 1fr); + gap: 16px; + margin-bottom: 24px; } -.widgets-column { +.dashboard-kpi-card { + background: #ffffff; + border: 1px solid #dbe3ed; + border-radius: 14px; + padding: 18px 20px; + box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04); + cursor: pointer; display: flex; flex-direction: column; - gap: 14px; -} - -.dashboard-widget { - background: #ffffff; - border-radius: 12px; - border: 1px solid #dbe3ed; - box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06); + transition: all 0.2s ease; + position: relative; overflow: hidden; } -.widget-panel { - transition: transform 0.18s ease, box-shadow 0.18s ease; +.dashboard-kpi-card::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 4px; + background: #cbd5e1; + transition: background 0.2s ease; } -.widget-panel:hover { - transform: translateY(-1px); - box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1); +.dashboard-kpi-card.card-horaires::before { background: #0088ce; } +.dashboard-kpi-card.card-perturbations::before { background: #f59e0b; } +.dashboard-kpi-card.card-gares::before { background: #10b981; } +.dashboard-kpi-card.card-lignes::before { background: #8b5cf6; } + +.dashboard-kpi-card:hover { + transform: translateY(-3px); + box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08); + border-color: #cbd5e1; } -.widget-header { +.dashboard-kpi-top { display: flex; align-items: center; justify-content: space-between; - padding: 14px 16px; - border-bottom: 1px solid #e8eef6; - background: #f8fbff; + margin-bottom: 12px; } -.widget-header-panel { - background: #ffffff; -} - -.widget-title-icon { - width: 28px; - height: 28px; - border-radius: 8px; - background: #eef6ff; - color: #094074; - display: inline-flex; +.dashboard-kpi-icon-wrapper { + width: 40px; + height: 40px; + border-radius: 10px; + display: flex; align-items: center; justify-content: center; } -.widget-content-panel { +.card-horaires .dashboard-kpi-icon-wrapper { background: #e0f2fe; color: #0284c7; } +.card-perturbations .dashboard-kpi-icon-wrapper { background: #fef3c7; color: #d97706; } +.card-gares .dashboard-kpi-icon-wrapper { background: #dcfce7; color: #16a34a; } +.card-lignes .dashboard-kpi-icon-wrapper { background: #ede9fe; color: #7c3aed; } + +.dashboard-kpi-badge { + font-size: 11px; + font-weight: 700; + padding: 3px 8px; + border-radius: 999px; + background: #f1f5f9; + color: #475569; +} + +.dashboard-kpi-badge.badge-danger { + background: #fee2e2; + color: #dc2626; +} + +.dashboard-kpi-badge.badge-neutral { + background: #ecfdf5; + color: #16a34a; +} + +.dashboard-kpi-number { + font-size: 32px; + font-weight: 800; + color: #0f172a; + line-height: 1.1; + margin-bottom: 4px; +} + +.dashboard-kpi-title { + font-size: 14px; + font-weight: 600; + color: #475569; + margin-bottom: 12px; +} + +.dashboard-kpi-footer { + display: flex; + align-items: center; + justify-content: space-between; + font-size: 12px; + color: #64748b; + border-top: 1px solid #f1f5f9; + padding-top: 10px; + margin-top: auto; +} + +.dashboard-kpi-footer wcs-mat-icon { + font-size: 14px; + transition: transform 0.2s ease; +} + +.dashboard-kpi-card:hover .dashboard-kpi-footer wcs-mat-icon { + transform: translateX(3px); + color: #0088ce; +} + +/* ========================================================================== + 4. MAIN GRID LAYOUT + ========================================================================== */ +.dashboard-main-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 20px; + align-items: flex-start; +} + +.dashboard-column { + display: flex; + flex-direction: column; + gap: 20px; +} + +.dashboard-widget-card { background: #ffffff; + border: 1px solid #dbe3ed; + border-radius: 16px; + box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04); + overflow: hidden; } -.widget-link-btn { - --wcs-button-font-size: 13px; +.dashboard-widget-header { + padding: 16px 20px; + border-bottom: 1px solid #eef2f6; + background: #ffffff; + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; } -.widget-list-panel { - padding: 8px; +.dashboard-widget-title-wrap { + display: flex; + align-items: center; + gap: 12px; } -.widget-header h3 { +.dashboard-widget-icon { + width: 38px; + height: 38px; + border-radius: 10px; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; +} + +.dashboard-widget-icon.icon-warning { + background: #fef3c7; + color: #d97706; +} + +.dashboard-widget-icon.icon-info { + background: #e0f2fe; + color: #0284c7; +} + +.dashboard-widget-icon.icon-primary { + background: #e0e7ff; + color: #4338ca; +} + +.dashboard-widget-title { margin: 0; font-size: 16px; font-weight: 700; color: #0f172a; - display: inline-flex; - align-items: center; - gap: 8px; } -.perturbation-item, -.horaire-item { - padding: 12px; - border: 1px solid transparent; - border-radius: 10px; - margin-bottom: 6px; +.dashboard-widget-subtitle { + font-size: 12px; + color: #64748b; } -.perturbation-item:last-child, -.horaire-item:last-child { - margin-bottom: 0; +.dashboard-widget-body { + padding: 16px; } -.perturbation-item:hover, -.horaire-item:hover { - background: #f7fbff; - border-color: #dbe3ed; -} - -.widget-item-main { +/* Incident Items */ +.dashboard-incident-list { display: flex; - justify-content: space-between; - align-items: flex-start; + flex-direction: column; gap: 10px; } -.widget-item-text { - min-width: 0; +.dashboard-incident-item { + background: #f8fafc; + border: 1px solid #e2e8f0; + border-radius: 12px; + padding: 14px 16px; + cursor: pointer; + transition: all 0.15s ease; + display: flex; + flex-direction: column; + gap: 8px; } -.widget-item-text strong { - font-size: 14px; +.dashboard-incident-item:hover { + background: #ffffff; + border-color: #cbd5e1; + box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06); + transform: translateY(-1px); +} + +.dashboard-incident-item.item-suppression { + border-left: 4px solid #ef4444; +} + +.dashboard-incident-item.item-retard { + border-left: 4px solid #f59e0b; +} + +.dashboard-incident-header { + display: flex; + align-items: center; + justify-content: space-between; +} + +.dashboard-incident-train-badge { + display: inline-flex; + align-items: center; + gap: 6px; + font-size: 13px; + font-weight: 700; color: #0f172a; } -.perturbation-item-header, -.horaire-item-header { - display: flex; - justify-content: space-between; - gap: 10px; - align-items: flex-start; -} - -.perturbation-item-route, -.horaire-item-route { - margin-top: 4px; - color: #576579; - font-size: 13px; -} - -.perturbation-item-details { - margin-top: 8px; - display: flex; - justify-content: space-between; - font-size: 13px; - color: #576579; - gap: 10px; -} - -.perturbation-item-details span { +.dashboard-badge-pill { display: inline-flex; align-items: center; gap: 4px; + padding: 3px 8px; + border-radius: 999px; + font-size: 11px; + font-weight: 700; } -.status-active { - color: #1f7f3f; - font-weight: 600; +.dashboard-badge-pill.pill-warning { + background: #fef3c7; + color: #b45309; } -.status-inactive { - color: #7b8798; +.dashboard-badge-pill.pill-danger { + background: #fee2e2; + color: #b91c1c; } -.horaire-item-route { +.dashboard-badge-pill.pill-info { + background: #e0f2fe; + color: #0369a1; +} + +.dashboard-incident-route { display: flex; align-items: center; gap: 8px; + font-size: 13px; + font-weight: 600; + color: #334155; } -.horaire-type-badge { - margin-left: 8px; +.dashboard-incident-route wcs-mat-icon { + font-size: 14px; + color: #94a3b8; } -.quick-actions { - padding: 10px; - display: grid; - gap: 8px; -} - -.quick-action-row { - text-decoration: none; - color: #1f2937; - width: 100%; - border: 1px solid #dbe3ed; - border-radius: 10px; - background: #ffffff; - padding: 10px 12px; +.dashboard-incident-footer { display: flex; align-items: center; justify-content: space-between; - gap: 10px; - cursor: pointer; + font-size: 12px; + color: #64748b; + margin-top: 2px; } -.quick-action-row:hover { - background: #eef6ff; - color: #094074; -} - -.quick-action-row-left { +.dashboard-incident-cause { display: inline-flex; align-items: center; - gap: 8px; - font-size: 14px; - font-weight: 600; + gap: 4px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 80%; } -.quick-action-icon { - width: 24px; - height: 24px; - border-radius: 7px; - background: #f3f8ff; +.dashboard-incident-cause wcs-mat-icon { + font-size: 14px; +} + +.dashboard-status-tag { + font-size: 11px; + font-weight: 700; + padding: 2px 6px; + border-radius: 4px; +} + +.dashboard-status-tag.tag-active { + color: #dc2626; + background: #fef2f2; +} + +.dashboard-status-tag.tag-inactive { + color: #64748b; + background: #f1f5f9; +} + +/* Quick Action Tiles */ +.dashboard-quick-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 12px; +} + +.dashboard-action-tile { + background: #f8fafc; + border: 1px solid #e2e8f0; + border-radius: 12px; + padding: 14px 16px; + text-decoration: none; + display: flex; + align-items: center; + gap: 12px; + transition: all 0.15s ease; + color: #0f172a; +} + +.dashboard-action-tile:hover { + background: #ffffff; + border-color: #0088ce; + box-shadow: 0 4px 14px rgba(0, 136, 206, 0.1); + transform: translateY(-1px); +} + +.dashboard-action-icon { + width: 40px; + height: 40px; + border-radius: 10px; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; +} + +.dashboard-action-icon.bg-amber { background: #fef3c7; color: #d97706; } +.dashboard-action-icon.bg-orange { background: #ffedd5; color: #ea580c; } +.dashboard-action-icon.bg-sky { background: #e0f2fe; color: #0284c7; } +.dashboard-action-icon.bg-indigo { background: #e0e7ff; color: #4f46e5; } + +.dashboard-action-info { + display: flex; + flex-direction: column; + gap: 2px; + min-width: 0; + flex: 1; +} + +.dashboard-action-info strong { + font-size: 13px; + color: #0f172a; +} + +.dashboard-action-info span { + font-size: 11px; + color: #64748b; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.action-chevron { + font-size: 18px; + color: #94a3b8; + transition: transform 0.2s ease, color 0.2s ease; +} + +.dashboard-action-tile:hover .action-chevron { + transform: translateX(3px); + color: #0088ce; +} + +/* Schedule Items */ +.dashboard-schedule-list { + display: flex; + flex-direction: column; + gap: 10px; +} + +.dashboard-schedule-item { + background: #f8fafc; + border: 1px solid #e2e8f0; + border-radius: 12px; + padding: 14px 16px; + cursor: pointer; + transition: all 0.15s ease; + display: flex; + flex-direction: column; + gap: 10px; +} + +.dashboard-schedule-item:hover { + background: #ffffff; + border-color: #cbd5e1; + box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06); + transform: translateY(-1px); +} + +.dashboard-schedule-header { + display: flex; + align-items: center; + justify-content: space-between; +} + +.dashboard-schedule-badges { + display: flex; + align-items: center; + gap: 8px; +} + +.train-id-badge { display: inline-flex; align-items: center; + gap: 5px; + font-size: 13px; + font-weight: 800; + color: #0f172a; + background: #ffffff; + border: 1px solid #cbd5e1; + padding: 3px 8px; + border-radius: 6px; +} + +.train-id-badge wcs-mat-icon { + font-size: 14px; + color: #0088ce; +} + +.train-type-pill { + font-size: 11px; + font-weight: 700; + color: #0284c7; + background: #e0f2fe; + padding: 3px 8px; + border-radius: 999px; +} + +.line-pill { + display: inline-flex; + align-items: center; + gap: 4px; + font-size: 11px; + font-weight: 600; + color: #475569; + background: #f1f5f9; + padding: 3px 8px; + border-radius: 6px; +} + +.line-pill wcs-mat-icon { + font-size: 13px; + color: #64748b; +} + +.dashboard-schedule-timeline { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + padding: 4px 0; +} + +.timeline-station { + display: flex; + flex-direction: column; + gap: 2px; +} + +.timeline-station.arrival { + align-items: flex-end; +} + +.station-time { + font-size: 16px; + font-weight: 800; + color: #0f172a; +} + +.station-title { + font-size: 12px; + font-weight: 600; + color: #475569; +} + +.timeline-connector { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + position: relative; +} + +.connector-line { + position: absolute; + left: 0; + right: 0; + height: 2px; + background: #cbd5e1; +} + +.timeline-connector wcs-mat-icon { + position: relative; + background: #f8fafc; + padding: 0 4px; + font-size: 16px; + color: #0088ce; +} + +.dashboard-schedule-stops { + display: flex; + align-items: center; + gap: 4px; + font-size: 11px; + color: #64748b; + border-top: 1px solid #f1f5f9; + padding-top: 6px; +} + +.dashboard-schedule-stops wcs-mat-icon { + font-size: 14px; +} + +/* System summary card */ +.dashboard-system-card { + background: linear-gradient(135deg, #0e1726 0%, #151f30 100%); + border-radius: 14px; + padding: 16px 20px; + color: #ffffff; +} + +.dashboard-system-header { + display: flex; + align-items: center; + gap: 12px; + margin-bottom: 14px; +} + +.dashboard-system-icon { + width: 36px; + height: 36px; + border-radius: 8px; + background: rgba(56, 189, 248, 0.15); + color: #38bdf8; + display: flex; + align-items: center; justify-content: center; } -.quick-action-row-refresh { - font: inherit; +.dashboard-system-header h4 { + margin: 0; + font-size: 14px; + font-weight: 700; + color: #f8fafc; } -.dashboard-state { - min-height: 190px; +.dashboard-system-header p { + margin: 2px 0 0; + font-size: 12px; + color: #94a3b8; +} + +.dashboard-system-stats { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 10px; + border-top: 1px solid rgba(255, 255, 255, 0.1); + padding-top: 12px; +} + +.system-stat-col { + display: flex; + flex-direction: column; + gap: 2px; +} + +.system-stat-col span { + font-size: 11px; + color: #94a3b8; +} + +.system-stat-col strong { + font-size: 18px; + color: #f8fafc; +} + +.system-stat-col strong.text-warning { + color: #fbbf24; +} + +.system-stat-col strong.text-success { + color: #4ade80; +} + +/* States */ +.dashboard-loading-box, +.dashboard-empty-box { + padding: 36px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; - color: #637287; + text-align: center; gap: 10px; } -.dashboard-state-icon { - font-size: 44px; - opacity: 0.4; +.dashboard-loading-box span { + font-size: 13px; + color: #64748b; } -@media (max-width: 1080px) { - .widgets-grid { +.dashboard-empty-icon { + width: 48px; + height: 48px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 4px; +} + +.dashboard-empty-icon.is-success { + background: #ecfdf5; + color: #10b981; +} + +.dashboard-empty-icon.is-info { + background: #f0f9ff; + color: #0284c7; +} + +.dashboard-empty-icon wcs-mat-icon { + font-size: 28px; +} + +.dashboard-empty-box h4 { + margin: 0; + font-size: 15px; + color: #0f172a; +} + +.dashboard-empty-box p { + margin: 0; + font-size: 13px; + color: #64748b; + max-width: 320px; +} + +/* ========================================================================== + 5. RESPONSIVE BREAKPOINTS + ========================================================================== */ +@media (max-width: 1200px) { + .dashboard-kpis-grid { + grid-template-columns: repeat(2, 1fr); + } +} + +@media (max-width: 980px) { + .dashboard-hero-card { + flex-direction: column; + align-items: stretch; + padding: 24px; + } + + .dashboard-hero-actions { + align-items: flex-start; + width: 100%; + } + + .dashboard-btn-group { + width: 100%; + } + + .dashboard-btn-group wcs-button { + flex: 1; + } + + .dashboard-main-grid { grid-template-columns: 1fr; } - .dashboard-hero { + .dashboard-status-bar { flex-direction: column; + align-items: stretch; + gap: 12px; } - .dashboard-hero-side { - align-items: flex-start; + .dashboard-status-divider { + display: none; } } -@media (max-width: 700px) { - .dashboard-hero { - border-radius: 12px; - padding: 20px; +@media (max-width: 640px) { + .dashboard-page-root { + padding: 14px 12px 36px; } - .dashboard-hero h1 { + .dashboard-hero-card { + border-radius: 14px; + padding: 18px 16px; + } + + .dashboard-hero-title { font-size: 24px; } - .stat-card-value { - font-size: 24px; + .dashboard-kpis-grid { + grid-template-columns: 1fr; } - .widget-header { + .dashboard-quick-grid { + grid-template-columns: 1fr; + } + + .dashboard-btn-group { flex-direction: column; - align-items: flex-start; - gap: 8px; } - .quick-action-row { - padding: 10px; - } - - .horaire-item-route { - flex-wrap: wrap; + .dashboard-btn-group wcs-button { + width: 100%; } } +/* ========================================================================== + 6. DARK MODE + ========================================================================== */ +body.dark-mode .dashboard-page-root, +[data-theme="dark"] .dashboard-page-root { + background-color: #0b111e; + color: #f8fafc; +} + +body.dark-mode .dashboard-hero-card, +[data-theme="dark"] .dashboard-hero-card { + background: linear-gradient(135deg, #051829 0%, #0d2847 60%, #15416b 100%); + border: 1px solid #243247; + box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45); +} + +body.dark-mode .dashboard-status-bar, +[data-theme="dark"] .dashboard-status-bar { + background: #151f30; + border-color: #243247; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); +} + +body.dark-mode .dashboard-status-text strong, +[data-theme="dark"] .dashboard-status-text strong { + color: #f8fafc; +} + +body.dark-mode .dashboard-status-label, +[data-theme="dark"] .dashboard-status-label { + color: #94a3b8; +} + +body.dark-mode .dashboard-status-divider, +[data-theme="dark"] .dashboard-status-divider { + background: #243247; +} + +body.dark-mode .dashboard-kpi-card, +[data-theme="dark"] .dashboard-kpi-card { + background: #151f30; + border-color: #243247; + box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); +} + +body.dark-mode .dashboard-kpi-card:hover, +[data-theme="dark"] .dashboard-kpi-card:hover { + border-color: #38bdf8; + box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4); +} + +body.dark-mode .dashboard-kpi-number, +[data-theme="dark"] .dashboard-kpi-number { + color: #f8fafc; +} + +body.dark-mode .dashboard-kpi-title, +[data-theme="dark"] .dashboard-kpi-title { + color: #94a3b8; +} + +body.dark-mode .dashboard-kpi-footer, +[data-theme="dark"] .dashboard-kpi-footer { + border-top-color: #243247; + color: #64748b; +} + +body.dark-mode .dashboard-widget-card, +[data-theme="dark"] .dashboard-widget-card { + background: #151f30; + border-color: #243247; + box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); +} + +body.dark-mode .dashboard-widget-header, +[data-theme="dark"] .dashboard-widget-header { + background: #151f30; + border-bottom-color: #243247; +} + +body.dark-mode .dashboard-widget-title, +[data-theme="dark"] .dashboard-widget-title { + color: #f8fafc; +} + +body.dark-mode .dashboard-widget-subtitle, +[data-theme="dark"] .dashboard-widget-subtitle { + color: #94a3b8; +} + +body.dark-mode .dashboard-incident-item, +body.dark-mode .dashboard-schedule-item, +[data-theme="dark"] .dashboard-incident-item, +[data-theme="dark"] .dashboard-schedule-item { + background: #0e1726; + border-color: #243247; +} + +body.dark-mode .dashboard-incident-item:hover, +body.dark-mode .dashboard-schedule-item:hover, +[data-theme="dark"] .dashboard-incident-item:hover, +[data-theme="dark"] .dashboard-schedule-item:hover { + background: #152238; + border-color: #334e68; +} + +body.dark-mode .dashboard-incident-train-badge, +[data-theme="dark"] .dashboard-incident-train-badge { + color: #f8fafc; +} + +body.dark-mode .dashboard-incident-route, +[data-theme="dark"] .dashboard-incident-route { + color: #cbd5e1; +} + +body.dark-mode .dashboard-incident-cause, +[data-theme="dark"] .dashboard-incident-cause { + color: #94a3b8; +} + +body.dark-mode .dashboard-action-tile, +[data-theme="dark"] .dashboard-action-tile { + background: #0e1726; + border-color: #243247; + color: #f8fafc; +} + +body.dark-mode .dashboard-action-tile:hover, +[data-theme="dark"] .dashboard-action-tile:hover { + background: #152238; + border-color: #38bdf8; +} + +body.dark-mode .dashboard-action-info strong, +[data-theme="dark"] .dashboard-action-info strong { + color: #f8fafc; +} + +body.dark-mode .dashboard-action-info span, +[data-theme="dark"] .dashboard-action-info span { + color: #94a3b8; +} + +body.dark-mode .train-id-badge, +[data-theme="dark"] .train-id-badge { + background: #151f30; + border-color: #243247; + color: #f8fafc; +} + +body.dark-mode .line-pill, +[data-theme="dark"] .line-pill { + background: #151f30; + color: #cbd5e1; +} + +body.dark-mode .station-time, +[data-theme="dark"] .station-time { + color: #f8fafc; +} + +body.dark-mode .station-title, +[data-theme="dark"] .station-title { + color: #94a3b8; +} + +body.dark-mode .connector-line, +[data-theme="dark"] .connector-line { + background: #243247; +} + +body.dark-mode .timeline-connector wcs-mat-icon, +[data-theme="dark"] .timeline-connector wcs-mat-icon { + background: #0e1726; +} + +body.dark-mode .dashboard-schedule-stops, +[data-theme="dark"] .dashboard-schedule-stops { + border-top-color: #1a2a42; + color: #94a3b8; +} + +body.dark-mode .dashboard-empty-box h4, +[data-theme="dark"] .dashboard-empty-box h4 { + color: #f8fafc; +} + +body.dark-mode .dashboard-empty-box p, +[data-theme="dark"] .dashboard-empty-box p { + color: #94a3b8; +} diff --git a/src/pages/dashboard/Dashboard.js b/src/pages/dashboard/Dashboard.js index 0d84640..e93655c 100644 --- a/src/pages/dashboard/Dashboard.js +++ b/src/pages/dashboard/Dashboard.js @@ -16,6 +16,7 @@ export default function Dashboard() { // État du chargement const [loading, setLoading] = useState(true); + const [lastRefreshed, setLastRefreshed] = useState(new Date()); // Perturbations récentes const [recentPerturbations, setRecentPerturbations] = useState([]); @@ -23,12 +24,14 @@ export default function Dashboard() { // Horaires récents const [recentHoraires, setRecentHoraires] = useState([]); const [scopedRegionId, setScopedRegionId] = useState(null); + const [currentUser, setCurrentUser] = useState(null); // Fonction de chargement des données const loadDashboardData = useCallback(async () => { setLoading(true); try { const user = getCurrentUser(); + setCurrentUser(user); const regionId = getScopedRegionId(user); setScopedRegionId(regionId || null); @@ -88,10 +91,11 @@ export default function Dashboard() { }); // Perturbations récentes (5 dernières) - setRecentPerturbations(perturbations.slice(0, 5)); + setRecentPerturbations(perturbations.slice(0, 6)); - // Horaires récents (5 derniers) - setRecentHoraires(horaires.slice(0, 5)); + // Horaires récents (6 derniers) + setRecentHoraires(horaires.slice(0, 6)); + setLastRefreshed(new Date()); } catch (error) { console.error('Erreur lors du chargement du dashboard:', error); @@ -115,224 +119,472 @@ export default function Dashboard() { window.location.href = path; }; - // Rendu des cartes de statistiques - const renderStatCard = (title, value, icon, color = 'primary', subtitle = null) => ( -
Chargement...
-Aucune perturbation
-Chargement...
-Aucun horaire
-Panel de gestion
-Suivez l'activite des horaires, perturbations et donnees d'exploitation en temps reel.
++ Pilotage centralisé des circulations, gestion du plan de transport, détection des aléas et état des infrastructures en temps réel. +
Region courante : {scopedRegionId}
} -Toutes les circulations ferroviaires s'effectuent conformément au plan de transport.
+Commencez par créer des circulations ou importez une fiche horaire.
+Système opérationnel & données à jour
+Exploitation
-Administrez les gares, quais, transports et informations voyageurs.
-