:root {
    --accent: #00B4FF;
    --dark: #030a16;
    --card-bg: rgba(255, 255, 255, 0.03);
}

.portfolio-page { background: var(--dark); color: white; }

.portfolio-hero { padding: 150px 0 60px; text-align: center; }
.badge-status { background: rgba(0, 180, 255, 0.1); color: var(--accent); padding: 8px 20px; border-radius: 50px; font-size: 0.8rem; font-weight: 700; border: 1px solid var(--accent); }
.portfolio-hero h1 { font-size: 3.5rem; font-family: 'Montserrat'; margin: 20px 0; }

/* BARRE DE FILTRE */
.filter-bar { margin-top: 40px; display: flex; justify-content: center; gap: 15px; }
.filter-btn {
    background: transparent; border: 1px solid rgba(255,255,255,0.1);
    color: white; padding: 12px 30px; border-radius: 12px; cursor: pointer;
    font-weight: 600; transition: 0.3s;
}
.filter-btn.active, .filter-btn:hover { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 20px rgba(0, 180, 255, 0.3); }

/* GRILLE ASYMÉTRIQUE */
.projects-masonry {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding-top: 50px;
}

.featured { grid-column: span 2; } /* Le premier projet prend toute la largeur */

.project-card-v2 {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    height: 450px;
    border: 1px solid rgba(255,255,255,0.05);
}

.project-img {
    width: 100%; height: 100%;
    background-size: cover; background-position: center;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.project-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 50px;
    background: linear-gradient(to top, rgba(3,10,22,1) 0%, transparent 100%);
    transform: translateY(30px);
    transition: 0.5s;
}

.project-card-v2:hover .project-img { transform: scale(1.1); }
.project-card-v2:hover .project-overlay { transform: translateY(0); }

.project-cat { color: var(--accent); font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; }
.project-overlay h3 { font-size: 2rem; margin: 10px 0; font-family: 'Montserrat'; }

.btn-view {
    margin-top: 20px;
    padding: 12px 25px;
    background: white; color: black;
    border: none; border-radius: 8px;
    font-weight: 700; cursor: pointer;
}

/* MODAL V2 STYLE */
.modal-v2 {
    position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(3, 10, 22, 0.95);
    backdrop-filter: blur(15px);
    display: none; align-items: center; justify-content: center; z-index: 9999;
}
.modal-v2.active { display: flex; animation: fadeIn 0.3s; }

.modal-body {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%; max-width: 900px;
    border-radius: 40px; padding: 60px; position: relative;
}

.close-v2 { position: absolute; top: 30px; right: 40px; font-size: 2rem; cursor: pointer; }

.modal-stats { display: flex; gap: 20px; margin-top: 30px; }
.s-card { background: rgba(0, 180, 255, 0.1); padding: 20px; border-radius: 20px; flex: 1; text-align: center; }
.s-card span { display: block; font-size: 2rem; font-weight: 900; color: var(--accent); }

/* FILTERING ANIMATION */
/* S'assurer que les items masqués ne prennent pas de place */
.filter-item {
    display: none; 
}

/* La classe .show doit être impérativement en display: block ou grid */
.filter-item.show {
    display: block;
    animation: scaleIn 0.5s ease forwards;
}

/* Correction pour le premier item "featured" qui doit rester large même filtré */
.project-item.filter-item.featured.show {
    display: block;
}
@media (min-width: 769px) {
    .project-item.filter-item.featured.show {
        grid-column: span 2;
    }
}

@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* RESPONSIVE */
@media (max-width: 768px) {
    .projects-masonry { grid-template-columns: 1fr; }
    .featured { grid-column: span 1; }
    .modal-body { padding: 30px; }
}