.sticky-tabs { position: fixed; top: 50%; /* Center vertically */ right: 0; /* Stick to the right of the screen */ transform: translateY(-50%); /* Offset to perfectly center */ display: flex; flex-direction: column; gap: 5px; /* Space between the tabs */ align-items: flex-end; /* Ensure tabs align to the right edge */ z-index: 2000; /* Forcer à être par dessus la page */ } .tab { width: 152px; height: 40px; background-color: #40e0d04d; border-radius: 8px 0 0 8px; /* Rounded left corners */ display: flex; align-items: center; padding-left: 10px; transition: transform 0.3s ease, width 0.3s ease; cursor: pointer; color: white; text-decoration: none; position: relative; box-sizing: border-box; /* Ensure padding and border are included in width */ overflow: hidden; /* Hide overflow to ensure color consistency */ line-height: 40px; text-transform: capitalize; font-size: 15px; font-family: 'Nunito Sans'; } .tab:hover { width: 180px; transform: scaleX(1.2); /* Use scaleX to extend color background */ /* background-color: #0cd2df; */ color: #000; } .tab i { margin-right: 10px; } .tab span { white-space: nowrap; /* Prevent text from wrapping */ font-size: 16px; } .mist { position: absolute; top: 0; right: 0; width: 10px; height: 100%; background: rgba(255, 255, 255, 0.5); /* Light semi-transparent white */ transform: translateX(100%); animation: mistAnimation 5.25s linear infinite; background: rgba(255, 255, 255, 0.5); /* Light semi-transparent white */ box-shadow: 0 0 20px rgba(255, 255, 255, 0.8); /* Larger and more visible white shadow */ } /* Adjusting delays to create the effect of a V shape */ .tab:nth-child(1) .mist { animation-delay: 0s; /* No delay for the first tab */ } .tab:nth-child(2) .mist { animation-delay: 0.02s; /* Slight delay for the middle tab */ } .tab:nth-child(3) .mist { animation-delay: 0s; /* Slight delay for the last tab */ } @keyframes mistAnimation { 0% { transform: translateX(100%); } 25% { transform: translateX(-8000%); } 100% { transform: translateX(-8000%); } } /* Version 1 : Glissé depuis la droite : */ .sticky-tabs { opacity: 0; /* Caché par défaut */ transform: translateX(100%) translateY(-50%); /* Décalé à droite */ transition: transform 0.5s ease, opacity 0.5s ease; /* Transition fluide */ } .sticky-tabs.visible { opacity: 1; /* Visible */ transform: translateX(0) translateY(-50%); /* À sa position normale */ } /* Version 2 : Version 2 : Fondu (Fade-in) : * / .sticky-tabs { opacity: 0; /* Caché par défaut * / transition: opacity 0.5s ease; /* Transition fluide pour l'opacité * / } .sticky-tabs.visible { opacity: 1; /* Visible * / } /**/