/* =====================================
   FINANCE MODULE HUB - Custom Styles
   ===================================== */

/* Line clamp pour les descriptions */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animations supplémentaires */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.glass-card {
    animation: fadeIn 0.3s ease-out;
}

#moduleModal > div {
    animation: slideIn 0.2s ease-out;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 30, 50, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

/* Effets de hover améliorés */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    pointer-events: none;
}

.glass-card:hover::before {
    opacity: 1;
}

/* Indicateur de phase sur le côté gauche */
.phase-mvp {
    position: relative;
}

.phase-v1 {
    position: relative;
}

.phase-v2 {
    position: relative;
}

/* Pulse animation pour les badges HOT */
.badge-hot {
    position: relative;
    overflow: hidden;
}

.badge-hot::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    animation: shine 2s infinite;
    transform: rotate(30deg);
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(30deg);
    }
    100% {
        transform: translateX(100%) rotate(30deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .glass-card {
        padding: 1rem;
    }
    
    .module-icon {
        width: 36px;
        height: 36px;
    }
}

/* Focus states pour accessibilité */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Skeleton loading (si nécessaire) */
.skeleton {
    background: linear-gradient(90deg, rgba(30, 30, 50, 0.5) 25%, rgba(50, 50, 80, 0.5) 50%, rgba(30, 30, 50, 0.5) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.75rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 5px);
}
