diff --git a/index.css b/index.css index 8d1b543..e8c7259 100644 --- a/index.css +++ b/index.css @@ -209,3 +209,26 @@ body { /* Hide scrollbars on horizontal lists where we still want scrolling */ .no-scrollbar::-webkit-scrollbar { display: none; } .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; } + +/* --- Sidebar: scrollbar visible au survol / focus uniquement --------------- */ +.sidebar-scroll { + overflow-y: hidden; + scrollbar-width: thin; + scrollbar-color: #334155 transparent; + scrollbar-gutter: stable; +} +.sidebar-scroll:hover, +.sidebar-scroll:focus, +.sidebar-scroll:focus-within { + overflow-y: auto; +} +.sidebar-scroll::-webkit-scrollbar { width: 6px; } +.sidebar-scroll::-webkit-scrollbar-track { background: transparent; } +.sidebar-scroll::-webkit-scrollbar-thumb { background: #334155; border-radius: 9999px; } +@media (hover: none) { + /* tactile / mobile : toujours scrollable */ + .sidebar-scroll { overflow-y: auto; } +} +@media (prefers-reduced-motion: reduce) { + .sidebar-scroll { scroll-behavior: auto; } +} diff --git a/src/components/sidebar/sidebar.component.html b/src/components/sidebar/sidebar.component.html index 5f98d90..8f360a3 100644 --- a/src/components/sidebar/sidebar.component.html +++ b/src/components/sidebar/sidebar.component.html @@ -1,4 +1,4 @@ -