/* css/style.css - Styles communs pour le site */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a0c10;
    color: #e9ecef;
    scroll-behavior: smooth;
    position: relative;
}

/* Background animation avec particules */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #0a0c10 0%, #12151c 50%, #0f1117 100%);
}

.bg-animation::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 60s linear infinite;
    opacity: 0.6;
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-50px, -50px);
    }
}

/* Floating orbs animation */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    z-index: -1;
    animation: floatOrb 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: #4f46e5;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #2563eb;
    bottom: -150px;
    left: -150px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #7c3aed;
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Modern Navbar Dark */
.navbar {
    background: rgba(10, 12, 16, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(79, 70, 229, 0.2);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #818cf8, #4f46e5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.navbar-brand i {
    background: none;
    color: #4f46e5;
    margin-right: 8px;
}

.nav-link {
    color: #cbd5e1 !important;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #818cf8 !important;
}

/* Hero Section */
.hero {
    padding: 3rem 0 2rem 0;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-weight: 800;
    font-size: 3rem;
    background: linear-gradient(135deg, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.1s backwards;
}

.badge-android {
    background: rgba(61, 220, 132, 0.2);
    border: 1px solid rgba(61, 220, 132, 0.5);
    color: #3ddc84;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 40px;
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

/* Categories Filter */
.categories-filter {
    margin: 2rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

.filter-btn {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: #94a3b8;
    padding: 8px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    background: linear-gradient(95deg, #4f46e5, #6366f1);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* Cards Section */
.app-section {
    padding: 2rem 0 4rem 0;
}

.app-card {
    background: rgba(18, 22, 28, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border: 1px solid rgba(79, 70, 229, 0.15);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #818cf8, #4f46e5);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.app-card:hover::before {
    transform: scaleX(1);
}

.app-card:hover {
    transform: translateY(-8px);
    border-color: rgba(79, 70, 229, 0.4);
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.5);
    background: rgba(22, 26, 34, 0.95);
}

.img-wrapper {
    overflow: hidden;
    position: relative;
    background: #1e293b;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.app-card:hover .app-image {
    transform: scale(1.05);
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #4f46e5;
    font-size: 3rem;
}

.card-body {
    padding: 1.5rem;
    flex: 1;
}

.card-title {
    font-weight: 700;
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    color: #f1f5f9;
}

.card-text {
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.publish-date {
    font-size: 0.7rem;
    color: #818cf8;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.publish-date i {
    font-size: 0.7rem;
}

.version-badge {
    background: rgba(79, 70, 229, 0.2);
    color: #a5b4fc;
    font-size: 0.7rem;
    border-radius: 50px;
    padding: 4px 10px;
    display: inline-block;
    font-weight: 600;
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.categories-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.category-tag {
    background: rgba(79, 70, 229, 0.15);
    color: #a5b4fc;
    font-size: 0.65rem;
    padding: 3px 10px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s;
}

.category-tag:hover {
    background: rgba(79, 70, 229, 0.3);
    color: white;
}

.btn-download {
    background: linear-gradient(95deg, #4f46e5, #6366f1);
    border: none;
    padding: 10px 0;
    font-weight: 600;
    border-radius: 40px;
    transition: all 0.3s ease;
    color: white;
    width: 100%;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.btn-download:hover {
    background: linear-gradient(95deg, #6366f1, #818cf8);
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    color: white;
}

.btn-download i {
    margin-right: 8px;
}


 /* Styles pour les boutons de sélection de fichiers */
        .filemanager-btn {
            background: #334155;
            border: 1px solid #4f46e5;
            padding: 10px 20px;
            border-radius: 8px;
            color: white;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
        }
        
        .filemanager-btn:hover {
            background: #4f46e5;
            transform: translateY(-2px);
        }
        
        .file-preview {
            background: #1e293b;
            border-radius: 12px;
            padding: 15px;
            margin-top: 15px;
            position: relative;
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        .file-preview img {
            max-width: 80px;
            max-height: 80px;
            border-radius: 8px;
            object-fit: cover;
        }
        
        .file-preview .file-info {
            flex: 1;
        }
        
        .file-preview .file-name {
            color: #f1f5f9;
            font-size: 0.9rem;
            word-break: break-all;
        }
        
        .file-preview .remove-file {
            background: rgba(220, 38, 38, 0.9);
            color: white;
            border: none;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .file-preview .remove-file:hover {
            background: #dc2626;
            transform: scale(1.1);
        }
        
        .file-preview .file-icon {
            font-size: 3rem;
            color: #4f46e5;
        }
        
        .selected-file {
            border: 2px solid #4f46e5;
            background: rgba(79, 70, 229, 0.1);
        }
        
        /* Modal personnalisé */
        .modal-custom {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 9999;
            overflow: auto;
        }
        
        .modal-custom-content {
            position: relative;
            margin: 2% auto;
            width: 95%;
            height: 90%;
            background: #0f172a;
            border-radius: 16px;
            overflow: hidden;
        }
        
        .modal-custom-header {
            padding: 15px 20px;
            background: #1e293b;
            border-bottom: 1px solid #334155;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .modal-custom-body {
            height: calc(100% - 70px);
            overflow: auto;
        }
        
        .modal-custom iframe {
            width: 100%;
            height: 100%;
            border: none;
        }
        
        .close-modal {
            background: none;
            border: none;
            color: white;
            font-size: 28px;
            cursor: pointer;
            padding: 0 10px;
        }
        
        .close-modal:hover {
            color: #4f46e5;
        }
        
        /* Animation */
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        .modal-custom {
            animation: fadeIn 0.3s ease;
        }

/* Footer */
footer {
    background: rgba(5, 6, 10, 0.95);
    border-top: 1px solid rgba(79, 70, 229, 0.2);
    color: #64748b;
    padding: 2rem 0;
    margin-top: 2rem;
    text-align: center;
}

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

.app-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.app-card:nth-child(1) { animation-delay: 0.1s; }
.app-card:nth-child(2) { animation-delay: 0.2s; }
.app-card:nth-child(3) { animation-delay: 0.3s; }
.app-card:nth-child(4) { animation-delay: 0.4s; }
.app-card:nth-child(5) { animation-delay: 0.5s; }
.app-card:nth-child(6) { animation-delay: 0.6s; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem;
    background: rgba(18, 22, 28, 0.6);
    border-radius: 24px;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.empty-state i {
    font-size: 4rem;
    color: #4f46e5;
    margin-bottom: 1rem;
}

.stats-badge {
    background: rgba(79, 70, 229, 0.2);
    border-radius: 40px;
    padding: 4px 12px;
    font-size: 0.75rem;
    color: #a5b4fc;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 0.9rem;
    }
    .app-image, .no-image {
        height: 140px;
    }
    .card-body {
        padding: 1.2rem;
    }
    .filter-btn {
        padding: 6px 16px;
        font-size: 0.75rem;
    }
}

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

::-webkit-scrollbar-track {
    background: #0a0c10;
}

::-webkit-scrollbar-thumb {
    background: #4f46e5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #818cf8;
}

/* Boutons génériques */
.btn-primary {
    background: linear-gradient(95deg, #4f46e5, #6366f1);
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: linear-gradient(95deg, #6366f1, #818cf8);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.btn-outline-secondary {
    border-color: #334155;
    color: #94a3b8;
}

.btn-outline-secondary:hover {
    background: #334155;
    border-color: #4f46e5;
    color: white;
}