/* ==========================================================================
   PORTFOLIO MANAGER - CSS FRONT-END
   ========================================================================== */

/* Container principal du portfolio */
.oapm-portfolio-container {
    margin: 2rem 0;
    padding: 0;
}

/* Filtres de portfolio */
.oapm-portfolio-filters {
    margin-bottom: 2rem;
    text-align: center;
}

.oapm-portfolio-filters h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
}

.oapm-filter-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.oapm-filter-btn {
    background: #f8fafc;
    border: 2px solid #3b82f6;
    color: #3b82f6;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
}

.oapm-filter-btn:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    text-decoration: none;
}

.oapm-filter-btn.active {
    background: #3b82f6;
    color: white;
}

.filter-icon {
    font-size: 1.1em;
}

/* Boîte de recherche */
.oapm-search-box {
    position: relative;
    max-width: 400px;
    margin: 0 auto 2rem auto;
}

.oapm-search-box input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    outline: none;
}

.oapm-search-box input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    color: #9ca3af;
}

/* Grille de portfolio */
.oapm-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Carte de projet */
.oapm-project-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
    border: 1px solid #f1f5f9;
}

.oapm-project-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.oapm-project-item.filtering {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.project-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Image du projet */
.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.oapm-project-item:hover .project-image img {
    transform: scale(1.05);
}

/* Badge featured */
.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f59e0b;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 2;
}

/* Overlay au survol */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.oapm-project-item:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    width: 48px;
    height: 48px;
    background: white;
    color: #1f2937;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5em;
    transition: all 0.2s ease;
}

.project-link:hover {
    background: #3b82f6;
    color: white;
    transform: scale(1.1);
    text-decoration: none;
}

/* Contenu du projet */
.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.project-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.project-title a:hover {
    color: #3b82f6;
    text-decoration: none;
}

/* Meta informations */
.project-meta {
    margin-bottom: 1rem;
}

.project-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.project-category {
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.project-difficulty {
    font-size: 1.2em;
    color: #f59e0b;
    margin-left: 0.5rem;
}

/* Excerpt */
.project-excerpt {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
    font-size: 0.95rem;
}

/* Technologies */
.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tech {
    padding: 0.25rem 0.75rem;
    border: 1px solid;
    border-radius: 8px;
    font-size: 0.875rem;
    color: inherit;
    background: transparent;
    font-weight: 500;
}

/* Statut du projet */
.project-status {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    display: inline-block;
    margin-top: auto;
}

.project-status.status-completed {
    background: #dcfce7;
    color: #166534;
}

.project-status.status-in_progress {
    background: #fef3c7;
    color: #92400e;
}

.project-status.status-maintenance {
    background: #e0e7ff;
    color: #3730a3;
}

/* Message aucun projet */
.oapm-no-projects {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
    grid-column: 1 / -1;
}

.oapm-no-projects h3 {
    margin-bottom: 0.5rem;
    color: #374151;
}

/* Bouton Load More */
.oapm-load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.oapm-load-more-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.oapm-load-more-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.oapm-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .oapm-portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .oapm-filter-group {
        flex-direction: column;
        align-items: center;
    }
    
    .oapm-filter-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .project-links {
        gap: 0.75rem;
    }
    
    .project-link {
        width: 40px;
        height: 40px;
        font-size: 1.25em;
    }
    
    .project-image {
        height: 200px;
    }
    
    .project-content {
        padding: 1.25rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.oapm-project-item {
    animation: fadeInUp 0.6s ease forwards;
}

.oapm-project-item:nth-child(2) { animation-delay: 0.1s; }
.oapm-project-item:nth-child(3) { animation-delay: 0.2s; }
.oapm-project-item:nth-child(4) { animation-delay: 0.3s; }
.oapm-project-item:nth-child(5) { animation-delay: 0.4s; }
.oapm-project-item:nth-child(6) { animation-delay: 0.5s; }