/* ============================================
   UTILITIES.CSS - Design System Premium
   Classes utilitaires pour une UX "Wow"
   ============================================ */

/* === GLASSMORPHISM === */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.glass-panel-dark {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* === GRADIENT TEXT === */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-subtle {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* === SHADOWS PREMIUM === */
.shadow-soft {
    box-shadow:
        0 4px 24px -4px rgba(0, 0, 0, 0.08),
        0 12px 48px -8px rgba(0, 0, 0, 0.05);
}

.shadow-glow {
    box-shadow:
        0 0 20px rgba(79, 70, 229, 0.15),
        0 8px 32px rgba(79, 70, 229, 0.1);
}

.shadow-lift {
    box-shadow:
        0 10px 40px -10px rgba(0, 0, 0, 0.15),
        0 20px 60px -20px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.shadow-lift:hover {
    transform: translateY(-4px);
    box-shadow:
        0 20px 50px -15px rgba(0, 0, 0, 0.2),
        0 30px 70px -25px rgba(0, 0, 0, 0.15);
}

/* === ANIMATIONS KEYFRAMES === */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-soft {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* === ANIMATION CLASSES === */
.animate-slide-up {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.animate-slide-left {
    animation: slideInLeft 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.animate-slide-right {
    animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.animate-pulse-soft {
    animation: pulse-soft 2s ease-in-out infinite;
}

/* Animation delays pour staggered effect */
.animate-delay-100 {
    animation-delay: 100ms;
}

.animate-delay-200 {
    animation-delay: 200ms;
}

.animate-delay-300 {
    animation-delay: 300ms;
}

.animate-delay-400 {
    animation-delay: 400ms;
}

.animate-delay-500 {
    animation-delay: 500ms;
}

/* === GRADIENTS === */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.bg-gradient-accent {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-accent) 100%);
}

.bg-gradient-subtle {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(249, 250, 251, 1) 100%);
}

/* === BUTTONS PREMIUM === */
.btn-premium {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow:
        0 4px 15px rgba(79, 70, 229, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(79, 70, 229, 0.35),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.btn-premium:active {
    transform: translateY(0);
}

.btn-premium svg,
.btn-premium i {
    width: 18px;
    height: 18px;
}

/* === SKELETON LOADER === */
.skeleton {
    background: linear-gradient(90deg,
            var(--bg-tertiary) 25%,
            var(--bg-secondary) 50%,
            var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    border-radius: var(--radius-sm);
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* === CARD PREMIUM === */
.card-premium {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-base);
}

.card-premium:hover {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 3px rgba(79, 70, 229, 0.1),
        var(--shadow-lg);
}

/* === BADGE GLOW === */
.badge-glow {
    position: relative;
}

.badge-glow::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: inherit;
    border-radius: inherit;
    filter: blur(6px);
    opacity: 0.4;
    z-index: -1;
}

/* === TEXT UTILITIES === */
.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

/* === ICONS SVG === */
.icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    vertical-align: middle;
}

.icon-xs {
    width: 0.875rem;
    height: 0.875rem;
}

.icon-sm {
    width: 1rem;
    height: 1rem;
}

.icon-md {
    width: 1.25rem;
    height: 1.25rem;
}

.icon-lg {
    width: 1.5rem;
    height: 1.5rem;
}

.icon-xl {
    width: 2rem;
    height: 2rem;
}

.icon-2xl {
    width: 2.5rem;
    height: 2.5rem;
}

/* === SPIN ANIMATION === */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

.spin-slow {
    animation: spin 2s linear infinite;
}

/* === ICON BUTTON === */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.icon-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}