/* ============================================================
   PAGE PROJETS - STYLES COMPLETS
   ============================================================ */

:root {
    --project-blue: #3b82f6;
    --project-green: #22c55e;
    --project-purple: #a855f7;
    --project-red: #ef4444;
    --project-orange: #f59e0b;
}

/* ============================================================
   1. HERO SECTION
   ============================================================ */

.projects-hero {
    background: linear-gradient(135deg, #003893 0%, #0052cc 100%);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
    color: white;
}

.projects-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.projects-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.projects-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.projects-hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 15px;
    font-weight: 500;
}

.projects-hero-description {
    font-size: 1.15rem;
    opacity: 0.9;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================================
   2. STATISTIQUES D'IMPACT
   ============================================================ */

.projects-stats {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.projects-stats-header {
    text-align: center;
    margin-bottom: 60px;
}

.projects-stats-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
    text-align: center !important;
    display: block !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
}

.projects-stats-subtitle {
    font-size: 1.15rem;
    color: #6b7280;
    text-align: center;
}

.projects-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.projects-stat-card {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
}

.projects-stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.projects-stat-card[data-color="blue"] {
    border-top-color: var(--project-blue);
}

.projects-stat-card[data-color="green"] {
    border-top-color: var(--project-green);
}

.projects-stat-card[data-color="purple"] {
    border-top-color: var(--project-purple);
}

.projects-stat-card[data-color="red"] {
    border-top-color: var(--project-red);
}

.projects-stat-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.projects-stat-card[data-color="blue"] .projects-stat-icon {
    color: var(--project-blue);
}

.projects-stat-card[data-color="green"] .projects-stat-icon {
    color: var(--project-green);
}

.projects-stat-card[data-color="purple"] .projects-stat-icon {
    color: var(--project-purple);
}

.projects-stat-card[data-color="red"] .projects-stat-icon {
    color: var(--project-red);
}

.projects-stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 10px;
    line-height: 1;
}

.projects-stat-label {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 600;
}

/* ============================================================
   3. FILTRES DE PROJETS
   ============================================================ */

.projects-filters {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 50px;
}

.projects-filters-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.projects-filters-header i {
    font-size: 1.5rem;
    color: var(--project-blue);
}

.projects-filters-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.projects-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    color: #1f2937;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:hover {
    border-color: var(--project-blue);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--project-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ============================================================
   4. GRILLE DE PROJETS
   ============================================================ */

.projects-grid-section {
    padding: 80px 0;
    background: white;
}

.projects-grid-header {
    text-align: center;
    margin-bottom: 60px;
}

.projects-grid-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
    text-align: center !important;
    display: block !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
}

.projects-grid-subtitle {
    font-size: 1.15rem;
    color: #6b7280;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.project-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    display: none; /* Caché par défaut, affiché par le script de pagination */
}

.project-card.visible {
    display: block;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.project-card-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    position: relative;
    overflow: hidden;
}

.project-card-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 4rem;
    color: rgba(59, 130, 246, 0.2);
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.project-card-badge.status-en-cours {
    background: linear-gradient(135deg, var(--project-blue), #2563eb);
}

.project-card-badge.status-termine {
    background: linear-gradient(135deg, var(--project-green), #16a34a);
}

.project-card-badge.status-planifie {
    background: linear-gradient(135deg, var(--project-orange), #d97706);
}

.project-card-badge.urgent {
    background: linear-gradient(135deg, var(--project-red), #dc2626);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.project-card-content {
    padding: 30px;
}

.project-card-sector {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 15px;
}

.project-card-sector i {
    color: var(--project-blue);
}

.project-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.3;
}

.project-card-description {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-card-progress {
    margin-bottom: 20px;
}

.project-card-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.project-card-progress-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
}

.project-card-progress-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--project-blue);
}

.project-card-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.project-card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--project-blue), #2563eb);
    border-radius: 10px;
    transition: width 1s ease;
}

.project-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.project-card-meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.project-card-meta-label {
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 500;
}

.project-card-meta-value {
    font-size: 0.95rem;
    color: #1f2937;
    font-weight: 600;
}

.project-card-meta-value i {
    color: var(--project-blue);
    margin-right: 5px;
}

.project-card-actions {
    display: flex;
    gap: 10px;
}

.project-card-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.project-card-btn-primary {
    background: linear-gradient(135deg, var(--project-blue), #2563eb);
    color: white;
    border: none;
}

.project-card-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.project-card-btn-secondary {
    background: white;
    color: var(--project-blue);
    border: 2px solid var(--project-blue);
}

.project-card-btn-secondary:hover {
    background: var(--project-blue);
    color: white;
}

/* ============================================================
   5. PROJETS EN VEDETTE
   ============================================================ */

.projects-featured {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.projects-featured-header {
    text-align: center;
    margin-bottom: 60px;
}

.projects-featured-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
    text-align: center !important;
    display: block !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
}

.projects-featured-subtitle {
    font-size: 1.15rem;
    color: #6b7280;
    text-align: center;
}

.featured-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.featured-project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
    position: relative;
}

.featured-project-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.featured-project-card.urgent::before {
    content: 'URGENT';
    position: absolute;
    top: 20px;
    left: -35px;
    background: var(--project-red);
    color: white;
    padding: 8px 45px;
    font-weight: 700;
    font-size: 0.85rem;
    transform: rotate(-45deg);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    z-index: 10;
}

.featured-project-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    position: relative;
}

.featured-project-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 5rem;
    color: rgba(59, 130, 246, 0.2);
}

.featured-project-content {
    padding: 40px;
}

.featured-project-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
}

.featured-project-description {
    font-size: 1.05rem;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 25px;
}

.featured-project-progress {
    margin-bottom: 25px;
}

.featured-project-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.featured-project-progress-label {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
}

.featured-project-progress-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--project-blue);
}

.featured-project-progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.featured-project-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--project-blue), #2563eb);
    border-radius: 10px;
    transition: width 1.5s ease;
}

.featured-project-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
    padding: 25px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.featured-project-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.featured-project-stat-label {
    font-size: 0.9rem;
    color: #9ca3af;
    font-weight: 500;
}

.featured-project-stat-value {
    font-size: 1.1rem;
    color: #1f2937;
    font-weight: 700;
}

.featured-project-stat-value i {
    color: var(--project-blue);
    margin-right: 8px;
}

.featured-project-actions {
    display: flex;
    gap: 15px;
}

.featured-project-btn {
    flex: 1;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.featured-project-btn-primary {
    background: linear-gradient(135deg, var(--project-red), #dc2626);
    color: white;
    border: none;
}

.featured-project-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.featured-project-btn-secondary {
    background: white;
    color: var(--project-blue);
    border: 2px solid var(--project-blue);
}

.featured-project-btn-secondary:hover {
    background: var(--project-blue);
    color: white;
}

/* ============================================================
   6. CTA FINALE
   ============================================================ */

.projects-cta {
    padding: 100px 0;
    background: linear-gradient(135deg, #003893 0%, #0052cc 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.projects-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.projects-cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.projects-cta-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: white !important;
    text-align: center !important;
    display: block !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: white !important;
    background-clip: unset !important;
}

.projects-cta-description {
    font-size: 1.2rem;
    opacity: 0.95;
    line-height: 1.8;
    margin-bottom: 40px;
}

.projects-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.projects-cta-btn {
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.projects-cta-btn-primary {
    background: linear-gradient(135deg, var(--project-red), #dc2626);
    color: white;
    border: none;
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.3);
}

.projects-cta-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(239, 68, 68, 0.4);
}

.projects-cta-btn-secondary {
    background: white;
    color: var(--project-blue);
    border: 2px solid white;
}

.projects-cta-btn-secondary:hover {
    background: transparent;
    color: white;
    transform: translateY(-3px);
}

/* ============================================================
   8. PAGINATION
   ============================================================ */

.projects-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 60px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.pagination-btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    background: var(--project-blue);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pagination-btn:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.pagination-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.pagination-info .current-page {
    color: var(--project-blue);
    font-size: 1.2rem;
}

.pagination-info .total-pages {
    color: #6b7280;
}

/* ============================================================
   9. MESSAGE AUCUN RÉSULTAT
   ============================================================ */

.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    margin: 20px 0;
}

.no-results-message i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 20px;
    display: block;
}

.no-results-message h3 {
    font-size: 1.8rem;
    color: #374151;
    margin-bottom: 10px;
    font-weight: 600;
}

.no-results-message p {
    color: #6b7280;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.no-results-message .reset-filters-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--project-blue);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.no-results-message .reset-filters-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* ============================================================
   7. RESPONSIVE
   ============================================================ */

@media (max-width: 992px) {
    .projects-hero-title {
        font-size: 2.5rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .featured-projects-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-filters-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-pagination {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .projects-hero {
        padding: 80px 0 60px;
    }
    
    .projects-hero-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .project-card-meta {
        grid-template-columns: 1fr;
    }
    
    .projects-cta-title {
        font-size: 2rem;
    }
    
    .projects-cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .projects-cta-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .projects-pagination {
        flex-direction: column;
        gap: 15px;
    }
    
    .pagination-btn {
        width: 100%;
        justify-content: center;
    }
}
