/* ===== PROJETS CSS MODERNE ===== */

/* ===== SECTIONS COMMUNES ===== */
.stats-section {
    padding: var(--spacing-3xl) 0;
    background: linear-gradient(135deg, var(--color-light) 0%, rgba(var(--color-secondary-rgb), 0.05) 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.stat-card {
    background: white;
    padding: var(--spacing-2xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: all var(--transition-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    font-size: var(--font-size-2xl);
    position: relative;
    overflow: hidden;
}

.stat-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all var(--transition-slow);
}

.stat-card:hover .stat-icon::before {
    animation: shimmer 1.5s ease-in-out infinite;
}

.stat-icon.active {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-light));
}

.stat-icon.completed {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
}

.stat-content h3 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--color-dark);
    margin: 0;
    font-family: var(--font-primary);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-content p {
    color: var(--color-gray-600);
    margin: var(--spacing-sm) 0 0;
    font-weight: 500;
    font-family: var(--font-secondary);
}

/* ===== FILTRES MODERNES AVEC BOUTONS ===== */
.filters-section-modern {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(135deg, white 0%, var(--color-light) 100%);
    border-bottom: 1px solid var(--color-gray-200);
}

.filters-container {
    background: white;
    padding: var(--spacing-2xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-gray-200);
}

.filter-category {
    margin-bottom: var(--spacing-xl);
}

.filter-category:last-of-type {
    margin-bottom: 0;
}

.filter-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.filter-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--border-radius-sm);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.filter-btn {
    background: var(--color-light);
    color: var(--color-gray-700);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-full);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    transition: all var(--transition-normal) var(--ease-out);
    border: 2px solid var(--color-gray-300);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left var(--transition-normal);
}

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

.filter-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.filter-btn.active:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== FILTRES ACTIFS ===== */
.active-filters {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 2px solid var(--color-gray-200);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-sm);
}

.active-filters-label {
    font-weight: 700;
    color: var(--color-gray-700);
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
}

.active-filter-tag {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-light));
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    font-family: var(--font-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    box-shadow: var(--shadow-sm);
}

.remove-filter {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.2);
    border-radius: var(--border-radius-full);
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all var(--transition-fast);
}

.remove-filter:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
    transform: scale(1.1);
}

.clear-all-filters {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-full);
    text-decoration: none;
    font-size: var(--font-size-xs);
    font-weight: 600;
    font-family: var(--font-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: all var(--transition-normal) var(--ease-out);
    box-shadow: var(--shadow-sm);
}

.clear-all-filters:hover {
    background: linear-gradient(135deg, var(--color-accent-dark), var(--color-accent));
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .filters-container {
        padding: var(--spacing-lg);
    }
    
    .filter-category {
        margin-bottom: var(--spacing-lg);
    }
    
    .filter-title {
        font-size: var(--font-size-md);
    }
    
    .filter-buttons {
        gap: var(--spacing-xs);
    }
    
    .filter-btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: var(--font-size-xs);
    }
    
    .active-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .filters-section-modern {
        padding: var(--spacing-lg) 0;
    }
    
    .filters-container {
        padding: var(--spacing-md);
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .filter-btn {
        flex: 1;
        text-align: center;
        min-width: 80px;
    }
}

/* ===== ANIMATIONS ===== */
.filter-btn {
    animation: fadeInScale 0.6s var(--ease-out);
}

.filter-btn:nth-child(1) { animation-delay: 0.1s; }
.filter-btn:nth-child(2) { animation-delay: 0.15s; }
.filter-btn:nth-child(3) { animation-delay: 0.2s; }
.filter-btn:nth-child(4) { animation-delay: 0.25s; }
.filter-btn:nth-child(5) { animation-delay: 0.3s; }
.filter-btn:nth-child(6) { animation-delay: 0.35s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== SECTIONS PROJETS ===== */
.projects-section {
    padding: var(--spacing-3xl) 0;
}

.projects-section:nth-child(even) {
    background: linear-gradient(135deg, var(--color-light) 0%, rgba(var(--color-primary-rgb), 0.02) 100%);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-2xl);
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.section-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin: 0;
    font-family: var(--font-primary);
}

.title-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    box-shadow: var(--shadow-md);
}

.projects-count {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-light));
    color: white;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-full);
    font-weight: 600;
    font-size: var(--font-size-sm);
    font-family: var(--font-primary);
    box-shadow: var(--shadow-sm);
}

/* ===== GRILLE PROJETS MODERNE ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: var(--spacing-2xl);
}

.project-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all var(--transition-normal) var(--ease-out);
    position: relative;
    border: 1px solid var(--color-gray-200);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

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

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-gray-100), var(--color-gray-200));
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow) var(--ease-out);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.default-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--font-size-4xl);
    position: relative;
}

.default-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.project-status {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-en-cours, .status-en_cours {
    background: linear-gradient(135deg, rgba(var(--color-secondary-rgb), 0.95), rgba(var(--color-secondary-rgb), 0.8));
}

.status-termine {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.95), rgba(40, 167, 69, 0.8));
}

.status-suspendu {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95), rgba(255, 193, 7, 0.8));
    color: var(--color-dark);
}

.status-annule {
    background: linear-gradient(135deg, rgba(var(--color-accent-rgb), 0.95), rgba(var(--color-accent-rgb), 0.8));
}

/* ===== CONTENU CARTE MODERNE ===== */
.project-content {
    padding: var(--spacing-2xl);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
    gap: var(--spacing-md);
}

.project-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-dark);
    margin: 0;
    line-height: 1.3;
    font-family: var(--font-primary);
}

.project-type {
    background: linear-gradient(135deg, var(--color-light), var(--color-gray-100));
    color: var(--color-gray-700);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    white-space: nowrap;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--color-gray-300);
}

.project-description {
    color: var(--color-gray-600);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
    font-family: var(--font-secondary);
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-sm);
    color: var(--color-gray-600);
    font-family: var(--font-secondary);
}

.project-date,
.project-responsable {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.project-date i,
.project-responsable i {
    color: var(--color-primary);
    width: 16px;
}

.project-technologies {
    margin-bottom: var(--spacing-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.tech-badge {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    font-family: var(--font-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tech-more {
    background: linear-gradient(135deg, var(--color-gray-500), var(--color-gray-600));
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
    font-family: var(--font-primary);
}

.project-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.btn-project-detail {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-md);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-primary);
    transition: all var(--transition-normal) var(--ease-out);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn-project-detail::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 var(--transition-normal);
}

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

.btn-project-detail:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-project-demo {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-light));
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-primary);
    transition: all var(--transition-normal) var(--ease-out);
    box-shadow: var(--shadow-sm);
}

.btn-project-demo:hover {
    background: linear-gradient(135deg, var(--color-secondary-dark), var(--color-secondary));
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== ANIMATIONS ===== */
@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

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

.project-card {
    animation: fadeInUp 0.8s var(--ease-out);
}

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

/* ===== SECTION VIDE MODERNE ===== */
.empty-section {
    padding: var(--spacing-3xl) 0;
    text-align: center;
}

.empty-content {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-3xl);
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.empty-icon {
    font-size: 5rem;
    color: var(--color-gray-400);
    margin-bottom: var(--spacing-2xl);
    background: linear-gradient(135deg, var(--color-gray-400), var(--color-gray-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-content h3 {
    font-size: var(--font-size-2xl);
    color: var(--color-dark);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-primary);
    font-weight: 700;
}

.empty-content p {
    color: var(--color-gray-600);
    margin-bottom: var(--spacing-2xl);
    font-size: var(--font-size-md);
    font-family: var(--font-secondary);
}

/* ===== RESPONSIVE MODERNE ===== */
@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: var(--spacing-xl);
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
    
    .section-title {
        font-size: var(--font-size-2xl);
    }
    
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .projects-section {
        padding: var(--spacing-2xl) 0;
    }
    
    .project-content {
        padding: var(--spacing-lg);
    }
    
    .project-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .project-image {
        height: 180px;
    }
    
    .project-title {
        font-size: var(--font-size-lg);
    }
    
    .section-title {
        font-size: var(--font-size-xl);
    }
    
    .title-icon {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-lg);
    }
}