/**
 * Hub Condensia - Styles CSS
 * Interface moderne et responsive pour le hub principal
 */

/* Variables CSS pour cohérence */
:root {
    --condensia-primary: #3b82f6;
    --condensia-primary-hover: #2563eb;
    --condensia-secondary: #6366f1;
    --condensia-success: #10b981;
    --condensia-error: #ef4444;
    --condensia-warning: #f59e0b;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Reset et base */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: white;
    color: var(--gray-900);
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation Tabs */
.nav-tab {
    position: relative;
    transition: all var(--transition-normal);
    color: var(--gray-700);
}

.nav-tab:hover {
    color: var(--condensia-primary);
}

.nav-tab.active {
    color: var(--condensia-primary);
    border-bottom-color: var(--condensia-primary) !important;
    background-color: rgba(59, 130, 246, 0.05);
    border-left: 3px solid var(--condensia-primary);
}

.nav-tab i {
    transition: color var(--transition-normal);
}

.nav-tab:hover i,
.nav-tab.active i {
    color: var(--condensia-primary) !important;
}

/* Sidebar Styles */
.sidebar-nav .nav-tab {
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-tab.active {
    background-color: rgba(59, 130, 246, 0.08);
    border-left-color: var(--condensia-primary);
    border-bottom: none;
}

.sidebar-nav .nav-tab:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

/* Main Content */
.hub-main {
    min-height: 100vh;
    background: var(--gray-50);
    position: relative;
}

/* Sections */
.hub-section {
    display: none;
    animation: fadeInUp 0.6s ease-out;
}

.hub-section.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Stats Cards */
.stat-card {
    background: white;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}

/* Tool Cards */
.tool-card {
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Form Elements */
input, select, textarea {
    background: white;
    border: 1px solid var(--gray-300);
    transition: all var(--transition-normal);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--condensia-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

/* Buttons */
button {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

button:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

button:active:before {
    width: 300px;
    height: 300px;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Drop Zone */
.drop-zone {
    transition: all var(--transition-normal);
    position: relative;
    background: var(--gray-50);
    border: 2px dashed var(--gray-300);
}

.drop-zone:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.drop-zone.drag-over {
    border-color: var(--condensia-primary) !important;
    background: rgba(59, 130, 246, 0.05) !important;
    transform: scale(1.02);
}

/* Preview Cards */
.video-preview, .pdf-preview {
    animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Result Sections */
.video-result, .pdf-result {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#video-summary, #pdf-summary {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    max-height: 70vh;
    overflow-y: auto;
    line-height: 1.7;
    position: relative;
    color: var(--gray-800);
}

/* Scrollbar personnalisé */
#video-summary::-webkit-scrollbar,
#pdf-summary::-webkit-scrollbar {
    width: 6px;
}

#video-summary::-webkit-scrollbar-track,
#pdf-summary::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

#video-summary::-webkit-scrollbar-thumb,
#pdf-summary::-webkit-scrollbar-thumb {
    background: var(--condensia-primary);
    border-radius: 3px;
}

/* Action Buttons */
.action-btn {
    transition: all var(--transition-fast);
    position: relative;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Mobile Menu - Adapted for light theme */
.mobile-menu-btn {
    transition: all var(--transition-normal);
    background: white;
    border: 1px solid var(--gray-200);
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
    background: var(--gray-50);
    box-shadow: var(--shadow-md);
}

/* Notifications */
.notification {
    background: white;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
}

/* Loading Overlay */
.loading-overlay {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hub-main {
        margin-left: 0;
    }
    
    .tool-card:hover {
        transform: translateY(-2px) scale(1.01);
    }
    
    .stat-card:hover {
        transform: translateY(-1px);
    }
    
    /* Améliorer l'UX mobile */
    input, select, button {
        min-height: 44px; /* Taille recommandée pour le touch */
    }
    
    .drop-zone {
        padding: 2rem 1rem;
        min-height: 120px;
    }
    
    /* Navigation mobile améliorée */
    .nav-tab {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hub-section {
        padding: 1rem;
    }
    
    .stat-card, .tool-card {
        margin-bottom: 1rem;
    }
    
        .result-section {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

/* Animations avancées */
@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

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

/* New animations for enhanced sections */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out;
}

.animate-slide-in {
    animation: slide-in 0.4s ease-out;
}

/* Enhanced Input Fields */
.input-enhanced {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.input-enhanced:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.input-enhanced:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Enhanced Drop Zone */
.drop-zone-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.drop-zone-enhanced::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(239, 68, 68, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.drop-zone-enhanced:hover::after {
    opacity: 1;
}

.drop-zone-enhanced.drag-over {
    transform: scale(1.02);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(252, 165, 165, 0.05) 100%) !important;
}

/* Enhanced Preview Cards */
.preview-card-enhanced {
    position: relative;
    overflow: hidden;
}

.preview-card-enhanced::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--condensia-primary) 0%, 
        var(--condensia-secondary) 50%, 
        var(--condensia-primary) 100%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.preview-card-enhanced:hover::before {
    opacity: 0.1;
    animation: gradient-rotate 3s linear infinite;
}

@keyframes gradient-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Enhanced Result Headers */
.result-header-enhanced {
    position: relative;
    overflow: hidden;
}

.result-header-enhanced::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--condensia-primary) 0%, 
        var(--condensia-secondary) 50%, 
        var(--condensia-primary) 100%);
    background-size: 200% 100%;
    animation: gradient-slide 3s ease infinite;
}

@keyframes gradient-slide {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Feature Cards Hover Effects */
.feature-card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.feature-card-hover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0) 0%, 
        rgba(59, 130, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

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

.feature-card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* États de focus améliorés pour l'accessibilité */
button:focus-visible,
input:focus-visible,
select:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid var(--condensia-primary);
    outline-offset: 2px;
}

/* Amélioration des transitions pour les performances */
.tool-card,
.stat-card,
.nav-tab,
button {
    will-change: transform;
}

/* Dégradés personnalisés pour thème clair */
.gradient-primary {
    background: linear-gradient(135deg, var(--condensia-primary) 0%, var(--condensia-secondary) 100%);
}

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

.gradient-light {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
}

/* Effets glassmorphism pour thème clair */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

/* États d'erreur et de succès */
.state-error {
    border-color: var(--condensia-error) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.state-success {
    border-color: var(--condensia-success) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Micro-interactions */
.nav-tab i {
    transition: transform var(--transition-fast);
}

.nav-tab:hover i {
    transform: scale(1.1);
}

.tool-card .fas.fa-arrow-right {
    transition: transform var(--transition-normal);
}

.tool-card:hover .fas.fa-arrow-right {
    transform: translateX(4px);
}

/* Premium Dashboard Styles */

/* Glassmorphism Effects Enhanced */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.1);
}

/* Advanced Gradient Backgrounds */
.gradient-hero {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(239, 246, 255, 0.2) 25%, 
        rgba(219, 234, 254, 0.3) 100%);
}


/* Shadow Enhancement */
.shadow-3xl {
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.25);
}

/* Premium Tool Cards */
.tool-card-premium {
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card-premium:hover {
    transform: translateY(-16px) rotateY(5deg);
    box-shadow: 
        0 35px 60px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(59, 130, 246, 0.1);
}



/* Advanced Hover Effects */
.hover-lift-3d {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hover-lift-3d:hover {
    transform: translateY(-12px) rotateX(5deg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Ripple Effect */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 1;
}

.ripple-effect:active::before {
    width: 300px;
    height: 300px;
}

/* Micro-interactions for Stats */
.stat-number {
    transition: all 0.3s ease;
}

.stat-card:hover .stat-number {
    transform: scale(1.1);
    color: var(--condensia-primary);
}


/* Enhanced Recent Activity Cards */
.activity-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.activity-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Background Patterns */
.pattern-dots {
    background-image: radial-gradient(circle, #3b82f6 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.1;
}

.pattern-honeycomb {
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%233b82f6' fill-opacity='0.4'%3E%3Cpolygon points='20,0 30,10 20,20 10,10'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.03;
}


/* Loading Shimmer */
.shimmer {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.2) 20%, 
        rgba(255, 255, 255, 0.5) 60%, 
        rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* Enhanced Tool Card Previews */
.tool-preview {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.tool-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s ease;
}

.tool-card:hover .tool-preview::before {
    left: 100%;
}

/* Progress Indicators */
.progress-circle {
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s ease-in-out;
}

.progress-circle.animate {
    stroke-dashoffset: 198; /* 30% progress */
}

/* Advanced Button States */
.btn-premium {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s ease;
}

.btn-premium:hover::before {
    left: 100%;
}


/* Mobile Enhancements */
@media (max-width: 768px) {
    .tool-card-premium:hover {
        transform: translateY(-8px);
    }
    
    .hover-lift-3d:hover {
        transform: translateY(-6px);
    }
    
    .glass-card {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* Dark Mode Support (Future-proofing) */
@media (prefers-color-scheme: dark) {
    .glass-card {
        background: rgba(17, 24, 39, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .pattern-honeycomb {
        background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2367e8f9' fill-opacity='0.2'%3E%3Cpolygon points='20,0 30,10 20,20 10,10'/%3E%3C/g%3E%3C/svg%3E");
    }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Success and Error States for Enhanced Sections */
.success-animation {
    animation: success-pulse 0.5s ease;
}

@keyframes success-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Smooth Height Transitions */
.smooth-height {
    transition: height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

/* Enhanced Loading States */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--condensia-primary);
    border-radius: 50%;
    animation: loading-bounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}