.projet-container {
    padding: 20px;
}

.projet-filters {
    text-align: center;
    margin-bottom: 30px;
}

.filter-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #e0e0e0;
}

.filter-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.projet-count {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #555;
}

.projet-item {
    transition: all 0.5s ease-in-out;
    opacity: 1;
    transform: scale(1);
}

.projet-item.hidden {
    opacity: 0;
    transform: scale(0.95);
    /* display: none; will be set by JS after animation */
}

.projet-item.filtering {
    transition: none; /* Disable transition during filtering to prevent visual glitches */
}

.projet-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
    height: 100%; /* Ensure cards take full height */
    display: flex;
    flex-direction: column;
}

.projet-card:hover {
    transform: translateY(-5px);
}

.image-container {
    width: 100%;
    padding-bottom: 75%; /* 4:3 Aspect Ratio */
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease-in-out;
}

.image-container img.lazy-load {
    opacity: 0;
}

.image-container img.loaded {
    opacity: 1;
}

.loading-spinner {
    position: absolute;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-spinner.show {
    opacity: 1;
}

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

.no-image-placeholder {
    width: 100%;
    padding-bottom: 75%; /* Same aspect ratio as images */
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-style: italic;
}

.projet-titre {
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    text-align: center;
    flex-grow: 1; /* Allow title section to grow */
    display: flex;
    align-items: center;
    justify-content: center;
}

.projet-titre-content {
    /* Additional styling for the title content if needed */
}

#no-results {
    margin-top: 20px;
    font-size: 1.1em;
    color: #888;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-btn {
        margin-bottom: 10px;
    }
}


