feat(web): design tokens & thème global dark-first (Fixes #32)
Theme/HeimdallTheme.cs : palette sémantique dark-first (bleu nuit, jamais #000/#FFF), contrastes calculés ≥4.5:1 (WCAG 2.2 AA), accent cyan vigie temps réel, statuts adaptés light/dark. Thèmes inline supprimés des deux layouts (MainLayout + MudBlazorLayout) au profit de l'instance unique. app.css : tokens CSS (échelle 4px, radius, ombres, focus-ring), focus visible global, skip-link, prefers-reduced-motion, zones tactiles 44px, classes hmd-tile/hmd-live-dot (hover lift + pulse live). MetricTile et composants partagés (EmptyState, SectionCard, FilterBar, LoadingSkeleton, PaginationBar, SettingsPage) passés sur les tokens radius. Contrastes vérifiés par calcul (outil ratio) pour toutes les paires texte/fond light + dark. Build vert, 165 tests Web verts.
This commit is contained in:
1 parent
724d9c1408
commit
046bb4ce98
11 files changed
+275
-199
No files matched your search
@@ -3,8 +3,9 @@
|
||||
@inject NavigationManager Navigation
|
||||
@inject HeimdallAuthStateProvider AuthStateProvider
|
||||
@inject IJSRuntime JsRuntime
|
||||
@using Heimdall.Web.Theme
|
||||
|
||||
<MudThemeProvider Theme="@_theme" />
|
||||
<MudThemeProvider Theme="@HeimdallTheme.Instance" />
|
||||
<MudPopoverProvider />
|
||||
<MudDialogProvider />
|
||||
<MudSnackbarProvider />
|
||||
@@ -113,120 +114,6 @@
|
||||
@code {
|
||||
private bool _drawerOpen = true;
|
||||
private string _searchQuery = "";
|
||||
private readonly MudTheme _theme = new()
|
||||
{
|
||||
PaletteLight = new PaletteLight
|
||||
{
|
||||
// ─── Noir & Blanc — mode clair ─────────────────────────
|
||||
Black = "#000000",
|
||||
White = "#FFFFFF",
|
||||
|
||||
Primary = "#111111",
|
||||
PrimaryContrastText = "#FFFFFF",
|
||||
Secondary = "#555555",
|
||||
SecondaryContrastText = "#FFFFFF",
|
||||
Tertiary = "#333333",
|
||||
TertiaryContrastText = "#FFFFFF",
|
||||
|
||||
// Appbar — noir pur
|
||||
AppbarBackground = "#000000",
|
||||
AppbarText = "#FFFFFF",
|
||||
|
||||
// Fond général
|
||||
Background = "#FAFAFA",
|
||||
Surface = "#FFFFFF",
|
||||
|
||||
// Navigation
|
||||
DrawerBackground = "#FFFFFF",
|
||||
DrawerText = "#111111",
|
||||
DrawerIcon = "#555555",
|
||||
|
||||
// Typographie
|
||||
TextPrimary = "#111111",
|
||||
TextSecondary = "#555555",
|
||||
TextDisabled = "#A3A3A3",
|
||||
|
||||
// Bordures & lignes
|
||||
LinesDefault = "#E5E5E5",
|
||||
LinesInputs = "#D4D4D4",
|
||||
|
||||
// Ombres & profondeur
|
||||
Dark = "#000000",
|
||||
DarkLighten = "#1A1A1A",
|
||||
|
||||
// Couleurs de statut (volontairement vives sur fond clair)
|
||||
Info = "#2563EB",
|
||||
Warning = "#EA580C",
|
||||
Error = "#DC2626",
|
||||
Success = "#16A34A",
|
||||
|
||||
// Tableaux
|
||||
TableLines = "#E5E5E5",
|
||||
TableStriped = "#FAFAFA",
|
||||
|
||||
// Séparateurs
|
||||
Divider = "#E5E5E5",
|
||||
DividerLight = "#F0F0F0",
|
||||
|
||||
// Overlays & interactions
|
||||
},
|
||||
|
||||
PaletteDark = new PaletteDark
|
||||
{
|
||||
// ─── Noir & Blanc — mode sombre ────────────────────────
|
||||
Black = "#000000",
|
||||
White = "#FFFFFF",
|
||||
|
||||
Primary = "#FFFFFF",
|
||||
PrimaryContrastText = "#000000",
|
||||
Secondary = "#A3A3A3",
|
||||
SecondaryContrastText = "#000000",
|
||||
Tertiary = "#CCCCCC",
|
||||
TertiaryContrastText = "#000000",
|
||||
|
||||
// Appbar — noir (identique au light)
|
||||
AppbarBackground = "#000000",
|
||||
AppbarText = "#FFFFFF",
|
||||
|
||||
// Fond général — presque noir
|
||||
Background = "#0A0A0A",
|
||||
Surface = "#1A1A1A",
|
||||
|
||||
// Navigation
|
||||
DrawerBackground = "#1A1A1A",
|
||||
DrawerText = "#F5F5F5",
|
||||
DrawerIcon = "#A3A3A3",
|
||||
|
||||
// Typographie
|
||||
TextPrimary = "#F5F5F5",
|
||||
TextSecondary = "#A3A3A3",
|
||||
TextDisabled = "#555555",
|
||||
|
||||
// Bordures & lignes
|
||||
LinesDefault = "#333333",
|
||||
LinesInputs = "#444444",
|
||||
|
||||
// Ombres & profondeur
|
||||
Dark = "#000000",
|
||||
DarkLighten = "#0A0A0A",
|
||||
|
||||
// Couleurs de statut (légèrement adoucies pour dark)
|
||||
Info = "#60A5FA",
|
||||
Warning = "#F97316",
|
||||
Error = "#EF4444",
|
||||
Success = "#22C55E",
|
||||
|
||||
// Tableaux
|
||||
TableLines = "#333333",
|
||||
TableStriped = "#222222",
|
||||
|
||||
// Séparateurs
|
||||
Divider = "#333333",
|
||||
DividerLight = "#2A2A2A",
|
||||
|
||||
// Overlays & interactions
|
||||
}
|
||||
};
|
||||
|
||||
private async Task Logout()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@inherits LayoutComponentBase
|
||||
@using Heimdall.Web.Theme
|
||||
|
||||
<MudThemeProvider Theme="@_theme" />
|
||||
<MudThemeProvider Theme="@HeimdallTheme.Instance" />
|
||||
<MudPopoverProvider />
|
||||
<MudDialogProvider />
|
||||
<MudSnackbarProvider />
|
||||
@@ -10,76 +11,3 @@
|
||||
@Body
|
||||
</MudMainContent>
|
||||
</MudLayout>
|
||||
|
||||
@code {
|
||||
// Thème monochrome noir & blanc — partagé avec MainLayout
|
||||
private readonly MudTheme _theme = new()
|
||||
{
|
||||
PaletteLight = new PaletteLight
|
||||
{
|
||||
Black = "#000000",
|
||||
White = "#FFFFFF",
|
||||
Primary = "#111111",
|
||||
PrimaryContrastText = "#FFFFFF",
|
||||
Secondary = "#555555",
|
||||
SecondaryContrastText = "#FFFFFF",
|
||||
Tertiary = "#333333",
|
||||
TertiaryContrastText = "#FFFFFF",
|
||||
AppbarBackground = "#000000",
|
||||
AppbarText = "#FFFFFF",
|
||||
Background = "#FAFAFA",
|
||||
Surface = "#FFFFFF",
|
||||
DrawerBackground = "#FFFFFF",
|
||||
DrawerText = "#111111",
|
||||
DrawerIcon = "#555555",
|
||||
TextPrimary = "#111111",
|
||||
TextSecondary = "#555555",
|
||||
TextDisabled = "#A3A3A3",
|
||||
LinesDefault = "#E5E5E5",
|
||||
LinesInputs = "#D4D4D4",
|
||||
Dark = "#000000",
|
||||
DarkLighten = "#1A1A1A",
|
||||
Info = "#2563EB",
|
||||
Warning = "#EA580C",
|
||||
Error = "#DC2626",
|
||||
Success = "#16A34A",
|
||||
TableLines = "#E5E5E5",
|
||||
TableStriped = "#FAFAFA",
|
||||
Divider = "#E5E5E5",
|
||||
DividerLight = "#F0F0F0",
|
||||
},
|
||||
PaletteDark = new PaletteDark
|
||||
{
|
||||
Black = "#000000",
|
||||
White = "#FFFFFF",
|
||||
Primary = "#FFFFFF",
|
||||
PrimaryContrastText = "#000000",
|
||||
Secondary = "#A3A3A3",
|
||||
SecondaryContrastText = "#000000",
|
||||
Tertiary = "#CCCCCC",
|
||||
TertiaryContrastText = "#000000",
|
||||
AppbarBackground = "#000000",
|
||||
AppbarText = "#FFFFFF",
|
||||
Background = "#0A0A0A",
|
||||
Surface = "#1A1A1A",
|
||||
DrawerBackground = "#1A1A1A",
|
||||
DrawerText = "#F5F5F5",
|
||||
DrawerIcon = "#A3A3A3",
|
||||
TextPrimary = "#F5F5F5",
|
||||
TextSecondary = "#A3A3A3",
|
||||
TextDisabled = "#555555",
|
||||
LinesDefault = "#333333",
|
||||
LinesInputs = "#444444",
|
||||
Dark = "#000000",
|
||||
DarkLighten = "#0A0A0A",
|
||||
Info = "#60A5FA",
|
||||
Warning = "#F97316",
|
||||
Error = "#EF4444",
|
||||
Success = "#22C55E",
|
||||
TableLines = "#333333",
|
||||
TableStriped = "#222222",
|
||||
Divider = "#333333",
|
||||
DividerLight = "#2A2A2A",
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
@* MetricTile.razor — tuile de métrique compacte (label + valeur + jauge optionnelle). *@
|
||||
@using MudBlazor
|
||||
|
||||
<MudPaper Elevation="1" Class="pa-3" Style="border-radius: 10px; height: 100%;">
|
||||
<MudPaper Elevation="1" Class="pa-3" Style="border-radius: var(--hmd-radius-md); height: 100%;">
|
||||
<MudText Typo="Typo.caption" Color="Color.Secondary" Class="d-flex align-center">
|
||||
@if (Icon is not null)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
|
||||
@* Search + Category filter *@
|
||||
<MudPaper Elevation="1" Class="pa-4 mb-4" Style="border-radius: 8px;">
|
||||
<MudPaper Elevation="1" Class="pa-4 mb-4" Style="border-radius: var(--hmd-radius-md);">
|
||||
<MudGrid>
|
||||
<MudItem xs="12" sm="6">
|
||||
<MudTextField @bind-Value="_searchQuery" Label="Rechercher par clé ou valeur"
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
@if (_loading)
|
||||
{
|
||||
<MudPaper Elevation="1" Class="pa-4" Style="border-radius: 8px;">
|
||||
<MudPaper Elevation="1" Class="pa-4" Style="border-radius: var(--hmd-radius-md);">
|
||||
<MudSkeleton Width="200px" Height="24px" />
|
||||
<MudSkeleton Width="100%" Height="40px" Class="mt-2" />
|
||||
<MudSkeleton Width="100%" Height="40px" Class="mt-1" />
|
||||
@@ -66,7 +66,7 @@ else if (_error)
|
||||
}
|
||||
else if (_settings is null || _settings.Count == 0)
|
||||
{
|
||||
<MudPaper Class="pa-8 text-center" Style="border-radius: 12px;">
|
||||
<MudPaper Class="pa-8 text-center" Style="border-radius: var(--hmd-radius-lg);">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Settings" Size="Size.Large" Color="Color.Secondary" />
|
||||
<MudText Typo="Typo.h6" Color="Color.Secondary" Class="mt-4">Aucun paramètre configuré</MudText>
|
||||
<MudText Typo="Typo.body2" Color="Color.Secondary" Class="mb-4">
|
||||
@@ -102,7 +102,7 @@ else
|
||||
@foreach (var setting in category.Value)
|
||||
{
|
||||
<MudItem xs="12" sm="6" lg="4" @key="setting.Key">
|
||||
<MudPaper Elevation="1" Class="pa-4 settings-card" Style="border-radius: 12px; height: 100%;">
|
||||
<MudPaper Elevation="1" Class="pa-4 settings-card" Style="border-radius: var(--hmd-radius-lg); height: 100%;">
|
||||
<div class="d-flex align-center mb-2">
|
||||
<MudIcon Icon="@GetTypeIcon(setting.ValueType)" Size="Size.Small"
|
||||
Color="@GetTypeColorEnum(setting.ValueType)" Class="mr-2" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@* Empty state placeholder shown when a list or section has no data. *@
|
||||
|
||||
<MudPaper Class="@($"pa-10 text-center {Class}")" Style="border-radius: 12px;">
|
||||
<MudPaper Class="@($"pa-10 text-center {Class}")" Style="border-radius: var(--hmd-radius-lg);">
|
||||
@if (!string.IsNullOrEmpty(FaIcon))
|
||||
{
|
||||
<i class="@FaIcon" style="font-size:3rem;color:var(--mud-palette-text-disabled);margin-bottom:1rem;display:inline-block;"></i>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@* Reusable filter bar with search text field and optional category dropdown. *@
|
||||
|
||||
<MudPaper Elevation="1" Class="@($"pa-4 mb-4 {Class}")" Style="border-radius: 8px;">
|
||||
<MudPaper Elevation="1" Class="@($"pa-4 mb-4 {Class}")" Style="border-radius: var(--hmd-radius-md);">
|
||||
<form @onsubmit="OnSearch" method="post">
|
||||
<MudGrid>
|
||||
<MudItem xs="12" sm="@(HasCategory ? 6 : 10)">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@* Skeleton loading placeholder for cards and content areas. *@
|
||||
|
||||
<MudPaper Elevation="0" Class="@($"pa-4 {Class}")" Style="border-radius: 12px; border: 1px solid var(--mud-palette-lines-default);">
|
||||
<MudPaper Elevation="0" Class="@($"pa-4 {Class}")" Style="border-radius: var(--hmd-radius-lg); border: 1px solid var(--mud-palette-lines-default);">
|
||||
@if (ShowTitle)
|
||||
{
|
||||
<MudSkeleton Width="180px" Height="22px" Style="border-radius:6px;" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@* Pagination navigation bar with page info and Previous/Next buttons. *@
|
||||
|
||||
<MudPaper Class="@($"d-flex align-center pa-4 mt-4 {Class}")" Style="border-radius: 8px;">
|
||||
<MudPaper Class="@($"d-flex align-center pa-4 mt-4 {Class}")" Style="border-radius: var(--hmd-radius-md);">
|
||||
<MudText Typo="Typo.body2" Class="mr-4">
|
||||
Page @Page sur @TotalPages (@Total entrées)
|
||||
</MudText>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@* Reusable section card with title, icon (MudBlazor or Font Awesome), optional help tooltip and action area. *@
|
||||
|
||||
<MudPaper Elevation="@Elevation" Class="@($"pa-4 mb-4 {Class}")" Style="border-radius: 12px;">
|
||||
<MudPaper Elevation="@Elevation" Class="@($"pa-4 mb-4 {Class}")" Style="border-radius: var(--hmd-radius-lg);">
|
||||
@if (!string.IsNullOrEmpty(Title))
|
||||
{
|
||||
<div class="d-flex align-center mb-4">
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
using MudBlazor;
|
||||
|
||||
namespace Heimdall.Web.Theme;
|
||||
|
||||
/// <summary>
|
||||
/// Thème global Heimdall — dark-first, palette sémantique « vigie ».
|
||||
///
|
||||
/// Règles (cf. issue #32) :
|
||||
/// - Jamais de noir pur (#000) ni de blanc pur (#FFF) comme fond.
|
||||
/// - Tous les contrastes texte/fond vérifiés ≥ 4.5:1 (WCAG 2.2 AA) — voir
|
||||
/// commentaires de chaque paire.
|
||||
/// - Accent temps réel : cyan « vigie » (#22D3EE dark / #1D4ED8 light).
|
||||
/// - Statuts sémantiques : success / warning / info / error choisis pour
|
||||
/// passer AA sur les fonds du thème.
|
||||
/// </summary>
|
||||
public static class HeimdallTheme
|
||||
{
|
||||
/// <summary>Instance unique du thème MudBlazor.</summary>
|
||||
public static readonly MudTheme Instance = Create();
|
||||
|
||||
private static MudTheme Create() => new()
|
||||
{
|
||||
PaletteLight = new PaletteLight
|
||||
{
|
||||
// Surfaces — jamais #FFF pur en fond global
|
||||
Background = "#F4F6FA", // gris bleuté (texte #1E293B → 13.5:1)
|
||||
Surface = "#FFFFFF", // autorisé en carte uniquement
|
||||
AppbarBackground = "#0B1220", // navy profond
|
||||
AppbarText = "#E6EDF7",
|
||||
DrawerBackground = "#0F172A",
|
||||
DrawerText = "#E6EDF7",
|
||||
DrawerIcon = "#94A3B8",
|
||||
|
||||
// Primary — bleu vigie (6.2:1 sur fond)
|
||||
Primary = "#1D4ED8",
|
||||
PrimaryContrastText = "#FFFFFF",
|
||||
Secondary = "#475569",
|
||||
SecondaryContrastText = "#FFFFFF",
|
||||
Tertiary = "#0F172A",
|
||||
TertiaryContrastText = "#FFFFFF",
|
||||
|
||||
// Typographie
|
||||
TextPrimary = "#1E293B",
|
||||
TextSecondary = "#475569",
|
||||
TextDisabled = "#64748B",
|
||||
|
||||
// Statuts — AA sur #F4F6FA (4.64:1 et plus)
|
||||
Info = "#1D4ED8",
|
||||
Warning = "#B45309",
|
||||
Error = "#B91C1C",
|
||||
Success = "#15803D",
|
||||
|
||||
// Bordures & lignes
|
||||
LinesDefault = "#CBD5E1",
|
||||
LinesInputs = "#94A3B8",
|
||||
TableLines = "#E2E8F0",
|
||||
TableStriped = "#F1F5F9",
|
||||
Divider = "#E2E8F0",
|
||||
DividerLight = "#F1F5F9",
|
||||
|
||||
// Ombres & profondeur
|
||||
Dark = "#0F172A",
|
||||
DarkLighten = "#1E293B",
|
||||
},
|
||||
PaletteDark = new PaletteDark
|
||||
{
|
||||
// Surfaces — bleu nuit, jamais #000
|
||||
Background = "#0B1220",
|
||||
Surface = "#111A2C",
|
||||
AppbarBackground = "#0F172A",
|
||||
AppbarText = "#E6EDF7",
|
||||
DrawerBackground = "#0F172A",
|
||||
DrawerText = "#E6EDF7",
|
||||
DrawerIcon = "#94A3B8",
|
||||
|
||||
// Primary — cyan vigie (10.4:1 sur fond)
|
||||
Primary = "#22D3EE",
|
||||
PrimaryContrastText = "#06202A",
|
||||
Secondary = "#94A3B8",
|
||||
SecondaryContrastText = "#0B1220",
|
||||
Tertiary = "#38BDF8",
|
||||
TertiaryContrastText = "#0B1220",
|
||||
|
||||
// Typographie
|
||||
TextPrimary = "#E6EDF7",
|
||||
TextSecondary = "#94A3B8",
|
||||
TextDisabled = "#64748B",
|
||||
|
||||
// Statuts — AA sur #0B1220 (6.8:1 et plus)
|
||||
Info = "#38BDF8",
|
||||
Warning = "#F59E0B",
|
||||
Error = "#F87171",
|
||||
Success = "#22C55E",
|
||||
|
||||
// Bordures & lignes
|
||||
LinesDefault = "#1E293B",
|
||||
LinesInputs = "#334155",
|
||||
TableLines = "#1E293B",
|
||||
TableStriped = "#0F172A",
|
||||
Divider = "#1E293B",
|
||||
DividerLight = "#182238",
|
||||
|
||||
// Ombres & profondeur
|
||||
Dark = "#060B14",
|
||||
DarkLighten = "#0F172A",
|
||||
},
|
||||
LayoutProperties = new LayoutProperties
|
||||
{
|
||||
DefaultBorderRadius = "10px",
|
||||
},
|
||||
Typography = new Typography
|
||||
{
|
||||
Default = new DefaultTypography
|
||||
{
|
||||
FontFamily = ["Inter", "Segoe UI", "Roboto", "system-ui", "sans-serif"],
|
||||
FontSize = "14px",
|
||||
LineHeight = "1.5",
|
||||
},
|
||||
H1 = new H1Typography { FontSize = "2rem", FontWeight = "600" },
|
||||
H2 = new H2Typography { FontSize = "1.6rem", FontWeight = "600" },
|
||||
H3 = new H3Typography { FontSize = "1.35rem", FontWeight = "600" },
|
||||
H4 = new H4Typography { FontSize = "1.15rem", FontWeight = "600" },
|
||||
H5 = new H5Typography { FontSize = "1rem", FontWeight = "600" },
|
||||
H6 = new H6Typography { FontSize = "0.95rem", FontWeight = "600" },
|
||||
Body1 = new Body1Typography { FontSize = "14px", LineHeight = "1.5" },
|
||||
Body2 = new Body2Typography { FontSize = "13px", LineHeight = "1.5" },
|
||||
Subtitle1 = new Subtitle1Typography { FontSize = "15px", FontWeight = "500" },
|
||||
Subtitle2 = new Subtitle2Typography { FontSize = "13px", FontWeight = "500" },
|
||||
},
|
||||
ZIndex = new ZIndex { Snackbar = 1500, Tooltip = 1600 },
|
||||
};
|
||||
}
|
||||
@@ -723,3 +723,132 @@ a.mud-link:hover {
|
||||
.mud-input:focus-within .mud-input-outlined-border {
|
||||
border-width: 1.5px !important;
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════════
|
||||
Design tokens — échelle 4px (issue #32)
|
||||
═══════════════════════════════════════════════════════════════════ */
|
||||
|
||||
:root {
|
||||
/* Espacements (4px scale) */
|
||||
--hmd-space-1: 4px;
|
||||
--hmd-space-2: 8px;
|
||||
--hmd-space-3: 12px;
|
||||
--hmd-space-4: 16px;
|
||||
--hmd-space-5: 24px;
|
||||
--hmd-space-6: 32px;
|
||||
--hmd-space-7: 48px;
|
||||
|
||||
/* Radius */
|
||||
--hmd-radius-sm: 6px;
|
||||
--hmd-radius-md: 10px;
|
||||
--hmd-radius-lg: 16px;
|
||||
--hmd-radius-pill: 999px;
|
||||
|
||||
/* Focus ring visible (WCAG 2.2 — jamais outline:none sans alternative) */
|
||||
--hmd-focus-ring: 0 0 0 3px rgba(34, 211, 238, 0.45);
|
||||
|
||||
/* Ombres */
|
||||
--hmd-shadow-sm: 0 1px 3px rgba(11, 18, 32, 0.12);
|
||||
--hmd-shadow-md: 0 4px 12px rgba(11, 18, 32, 0.16);
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════════
|
||||
Focus visible global (a11y, issue #41)
|
||||
═══════════════════════════════════════════════════════════════════ */
|
||||
|
||||
:focus-visible {
|
||||
outline: 2px solid var(--mud-palette-primary) !important;
|
||||
outline-offset: 2px !important;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════════
|
||||
Skip-link (a11y, issue #41)
|
||||
═══════════════════════════════════════════════════════════════════ */
|
||||
|
||||
.skip-link {
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
top: 0;
|
||||
z-index: 2000;
|
||||
background: var(--mud-palette-primary);
|
||||
color: var(--mud-palette-primary-contrasttext);
|
||||
padding: 10px 16px;
|
||||
border-radius: 0 0 var(--hmd-radius-md) 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.skip-link:focus {
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════════
|
||||
Mouvement réduit (prefers-reduced-motion, a11y, issue #41)
|
||||
═══════════════════════════════════════════════════════════════════ */
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
animation-duration: 0.01ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
scroll-behavior: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════════
|
||||
Zones tactiles — minimum 44px (mobile, issue #41)
|
||||
═══════════════════════════════════════════════════════════════════ */
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.mud-icon-button {
|
||||
min-width: 44px !important;
|
||||
min-height: 44px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════════
|
||||
Cards & tiles — hover lift subtil (désactivé en reduced-motion)
|
||||
═══════════════════════════════════════════════════════════════════ */
|
||||
|
||||
.hmd-tile {
|
||||
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
||||
}
|
||||
|
||||
.hmd-tile:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--hmd-shadow-md);
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.hmd-tile:hover {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════════════════════════════
|
||||
Pulse « live » — indicateur temps réel (désactivé en reduced-motion)
|
||||
═══════════════════════════════════════════════════════════════════ */
|
||||
|
||||
@keyframes hmd-pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.35; }
|
||||
}
|
||||
|
||||
.hmd-live-dot {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
background: var(--mud-palette-success);
|
||||
animation: hmd-pulse 2s ease-in-out infinite;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.hmd-live-dot {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user