.projets-container {
    flex: 1;
    padding: 8rem 4rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 2;
}

.projets-title {
    font-size: 4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}

/* Filtres */
.projets-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    position: sticky;
    top: calc(var(--navbar-h, 4.5rem) - 1px);
    z-index: 50;
    padding: 0.75rem 0;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(12px);
}

.filter-button {
    padding: 0.55rem 1.25rem;
    background: transparent;
    color: var(--text-white);
    border: none;
    box-shadow: inset 0 0 0 1px rgba(74, 111, 165, 0.4);
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.filter-button:hover {
    background: rgba(74, 111, 165, 0.12);
    box-shadow: inset 0 0 0 1px rgba(74, 111, 165, 0.65);
}

.filter-button.active {
    background: linear-gradient(135deg, #2b3a87 0%, #4a6fa5 100%);
    box-shadow: none;
}

.filter-button.active:hover {
    background: linear-gradient(135deg, #3545a0 0%, #5a80c5 100%);
}

/* Sections */
.projets-section {
    margin-bottom: 3rem;
}

.projets-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.projets-section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 0.85em;
    background: linear-gradient(135deg, #2b3a87, #4a6fa5);
    border-radius: 2px;
    flex-shrink: 0;
}

/* Animation d'apparition des cartes au filtrage */
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.projet-card.filtered-hidden {
    display: none;
}

.projet-card.filtered-visible {
    animation: cardFadeIn 0.22s ease-out both;
}

/* Grille — 3 colonnes fixes, transitions prévisibles */
.projets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Carte projet */
.projet-card {
    background: rgba(20, 26, 55, 0.6);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 193, 219, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
}

.projet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(74, 111, 165, 0.3);
}



/* Image du projet */
.projet-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.projet-type {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(114, 164, 242, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
}

.projet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.projet-card:hover .projet-image img {
    transform: scale(1.03);
}

/* Contenu de la carte */
.projet-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.projet-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.projet-name {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--text-white);
    line-height: 1.3;
}

.projet-date {
    font-size: 0.8rem;
    color: var(--text-gray);
    background: rgba(74, 111, 165, 0.2);
    padding: 0.35rem 0.7rem;
    border-radius: 10px;
    border: 1px solid rgba(74, 111, 165, 0.3);
    white-space: nowrap;
    font-weight: 500;
    flex-shrink: 0;
}

.projet-description {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.filter-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-gray);
    font-size: 1.05rem;
}

/* Liens du projet */
.projet-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    flex-wrap: wrap;
}

/* Statut — tag informatif, pas un bouton */
.projet-prive {
    display: inline-flex;
    align-items: center;
    color: var(--text-gray);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: transparent;
    border: 1px solid rgba(184, 193, 219, 0.18);
    border-radius: 6px;
    padding: 0.28rem 0.65rem;
}

.projet-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.github-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(184, 193, 219, 0.1);
    color: var(--text-white);
    flex-shrink: 0;
}

.github-link:hover {
    background: rgba(184, 193, 219, 0.2);
    transform: scale(1.1);
}

.test-link {
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, #2b3a87 0%, #4a6fa5 100%);
    color: var(--text-white);
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
}

.test-link:hover {
    background: linear-gradient(135deg, #3545a0 0%, #5a80c5 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(74, 111, 165, 0.35);
}

.about-link {
    padding: 0.65rem 1.5rem;
    background: transparent;
    color: var(--text-white);
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1.5px solid rgba(184, 193, 219, 0.35);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.about-link:hover {
    background: rgba(184, 193, 219, 0.08);
    border-color: rgba(184, 193, 219, 0.65);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1100px) {
    .projets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .projets-container {
        padding: 6rem 2rem 2rem;
    }

    .projets-title {
        font-size: 3rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 640px) {
    .projets-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .projet-image {
        height: 200px;
    }

    .projet-name {
        font-size: 1.25rem;
    }

    .projet-header {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .projets-container {
        padding: 6rem 1rem 2rem;
    }

    .projets-title {
        font-size: 2.5rem;
    }

    .projet-image {
        height: 175px;
    }

    .projet-content {
        padding: 1.25rem;
    }

    .projet-description {
        font-size: 0.9rem;
    }

    .test-link,
    .about-link {
        padding: 0.55rem 1.1rem;
        font-size: 0.875rem;
    }
}
