refacto page mon profile

This commit is contained in:
styve Lioumba
2025-11-15 17:30:09 +01:00
parent 620b781219
commit b669190bce
29 changed files with 1702 additions and 743 deletions

View File

@@ -0,0 +1,345 @@
// ============================================
// ANIMATIONS
// ============================================
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulseSlow {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.8;
}
}
.animate-fade-in {
animation: fadeIn 0.6s ease-out;
}
.animate-slide-up {
animation: slideUp 0.6s ease-out;
}
.animate-pulse-slow {
animation: pulseSlow 3s ease-in-out infinite;
}
.animation-delay-100 {
animation-delay: 0.1s;
opacity: 0;
animation-fill-mode: forwards;
}
.animation-delay-200 {
animation-delay: 0.2s;
opacity: 0;
animation-fill-mode: forwards;
}
.animation-delay-300 {
animation-delay: 0.3s;
opacity: 0;
animation-fill-mode: forwards;
}
// ============================================
// NAVIGATION PAR ONGLETS
// ============================================
.tab-button {
@apply bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300;
@apply hover:bg-indigo-50 dark:hover:bg-gray-600 hover:text-indigo-600 dark:hover:text-indigo-400;
&.active-tab {
@apply bg-gradient-to-r from-indigo-600 to-purple-600 text-white;
@apply shadow-lg;
svg {
@apply text-white;
}
}
// Animation au hover
&:hover:not(.active-tab) {
transform: translateY(-2px);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
// Effet au clic
&:active {
transform: scale(0.98);
}
}
// ============================================
// CARDS
// ============================================
.card {
@apply bg-white dark:bg-gray-800 rounded-xl shadow-lg p-6;
@apply transition-shadow duration-300;
&:hover {
@apply shadow-xl;
}
}
// ============================================
// RESPONSIVE BREAKPOINTS
// ============================================
// Mobile (par défaut)
@media (max-width: 640px) {
.tab-button {
min-width: auto;
padding: 0.625rem;
span {
display: none;
}
}
}
// Tablet
@media (min-width: 768px) and (max-width: 1023px) {
.tab-button {
font-size: 0.875rem;
}
}
// Desktop
@media (min-width: 1024px) {
// Grille sidebar + contenu
.sidebar-layout {
display: grid;
grid-template-columns: 300px 1fr;
gap: 1.5rem;
}
}
// ============================================
// BOUTON D'ÉDITION SUR L'AVATAR
// ============================================
.edit-button {
@apply absolute -top-2 -right-2 z-10;
@apply w-8 h-8 bg-indigo-600 hover:bg-indigo-700;
@apply rounded-full flex items-center justify-center;
@apply shadow-lg transition-all duration-300;
&:hover {
transform: scale(1.1);
}
svg {
@apply w-4 h-4 text-white;
}
}
// ============================================
// AVATAR
// ============================================
.avatar-wrapper {
position: relative;
.avatar-ring {
@apply w-28 h-28 md:w-36 md:h-36;
@apply rounded-full bg-gradient-to-br from-indigo-500 to-purple-600;
@apply p-1 shadow-2xl;
@apply transition-transform duration-300;
&:hover {
transform: scale(1.05);
}
}
.avatar-image {
@apply w-full h-full rounded-full overflow-hidden bg-white;
img {
@apply object-cover w-full h-full;
}
}
}
// ============================================
// BANNIÈRE
// ============================================
.banner {
@apply relative rounded-2xl overflow-hidden shadow-xl;
.banner-image {
@apply h-48 md:h-64 bg-cover bg-center;
}
.banner-overlay {
@apply absolute inset-0 bg-gradient-to-b from-transparent to-black/30;
}
.banner-content {
@apply relative z-10 p-4 flex justify-between items-start;
}
}
// ============================================
// BACK BUTTON
// ============================================
.back-button {
@apply flex items-center justify-center;
@apply w-10 h-10 md:w-12 md:h-12;
@apply bg-white/20 backdrop-blur-md rounded-full;
@apply hover:bg-white/30 transition-all duration-300;
&:hover {
transform: scale(1.1);
svg {
transform: translateX(-4px);
}
}
svg {
@apply w-6 h-6 text-white transition-transform;
}
}
// ============================================
// BADGE VÉRIFIÉ
// ============================================
.verified-badge {
@apply flex items-center gap-2;
@apply bg-purple-500/20 backdrop-blur-md;
@apply px-3 py-2 rounded-full;
svg {
@apply w-5 h-5 md:w-6 md:h-6 text-purple-300;
}
span {
@apply text-white text-sm font-medium;
}
}
// ============================================
// SECTIONS AVEC ICÔNES
// ============================================
.section-title {
@apply text-lg font-bold text-gray-900 dark:text-white mb-3;
@apply flex items-center gap-2;
svg {
@apply h-5 w-5 text-indigo-500;
}
}
// ============================================
// AMÉLIORATION DE L'ACCESSIBILITÉ
// ============================================
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
// Focus visible pour l'accessibilité
*:focus-visible {
outline: 2px solid #4f46e5;
outline-offset: 2px;
border-radius: 0.25rem;
}
// ============================================
// MODE SOMBRE
// ============================================
@media (prefers-color-scheme: dark) {
.card {
background-color: rgba(31, 41, 55, 0.8);
border: 1px solid rgba(55, 65, 81, 0.3);
}
.tab-button {
&:not(.active-tab) {
background-color: rgba(55, 65, 81, 0.5);
color: rgba(209, 213, 219, 1);
}
}
}
// ============================================
// UTILITAIRES PERSONNALISÉS
// ============================================
// Divider avec gradient
.divider-gradient {
height: 4px;
background: linear-gradient(90deg, transparent, #4f46e5, transparent);
border-radius: 9999px;
}
// Card avec hover effect
.hover-lift {
transition: all 0.3s ease;
&:hover {
transform: translateY(-4px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
}
// Glassmorphism effect
.glass {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
// ============================================
// PRINT STYLES (optionnel)
// ============================================
@media print {
.banner,
.back-button,
.edit-button,
.tab-button {
display: none;
}
.card {
box-shadow: none;
border: 1px solid #e5e7eb;
}
}