radiantrh/Bootstrap_new/css/ux_enhancements.css
2025-12-20 21:07:26 +00:00

138 lines
2.7 KiB
CSS

/* ============================================
UX ENHANCEMENTS - ANIMATIONS ET MICRO-INTERACTIONS
============================================ */
/* Effet de vague au clic */
.ripple {
position: relative;
overflow: hidden;
}
.ripple::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 5px;
height: 5px;
background: rgba(255, 255, 255, 0.5);
opacity: 0;
border-radius: 100%;
transform: scale(1, 1) translate(-50%);
transform-origin: 50% 50%;
}
.ripple:focus:not(:active)::after {
animation: ripple 1s ease-out;
}
@keyframes ripple {
0% {
transform: scale(0, 0);
opacity: 0.5;
}
20% {
transform: scale(25, 25);
opacity: 0.3;
}
100% {
opacity: 0;
transform: scale(40, 40);
}
}
/* Effet de levitation pour les cartes */
.content-card {
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.content-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
/* Animation du bouton contexte */
.context-toggle {
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.context-toggle:hover {
transform: scale(1.1) translateY(-2px);
box-shadow: 0 8px 20px rgba(183, 71, 42, 0.4);
}
/* Loading skeleton */
.skeleton {
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 200% 100%;
animation: loading 1.5s infinite;
}
@keyframes loading {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
/* Smooth scrolling */
html {
scroll-behavior: smooth;
}
/* Focus styles améliorés */
:focus-visible {
outline: 3px solid var(--office-secondary);
outline-offset: 2px;
border-radius: 4px;
}
/* Animation d'entrée */
.fade-in-up {
animation: fadeInUp 0.6s ease forwards;
opacity: 0;
transform: translateY(20px);
}
@keyframes fadeInUp {
to {
opacity: 1;
transform: translateY(0);
}
}
/* Tooltip personnalisé */
[data-tooltip] {
position: relative;
}
[data-tooltip]:hover::before {
content: attr(data-tooltip);
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
background: var(--office-dark);
color: white;
padding: 6px 12px;
border-radius: 4px;
font-size: 12px;
white-space: nowrap;
z-index: 1000;
margin-bottom: 8px;
animation: fadeIn 0.2s ease;
}
[data-tooltip]:hover::after {
content: '';
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
border: 6px solid transparent;
border-top-color: var(--office-dark);
margin-bottom: 2px;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}