/* ============================================
   CSS DÉDIÉ PAGE PROJETS AGENCEMENT
   ============================================ */

/* Section principale */
.projets-agen-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 70px;
    background: #f0f0f0;
}

/* ============================================
   BARRE DE FILTRES (fond gris)
   ============================================ */
.projets-agen-filter-bar {
    background: #f0f0f0;
    padding: 0.5rem 1rem;
    border-bottom: none;
    position: relative;
    z-index: 90;
    opacity: 0; /* Caché pour animation GSAP, puis affichée */
}

.projets-agen-filter-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end; /* Onglets alignés à droite */
    align-items: center;
}

/* Onglets catégories (droite) */
.projets-agen-tabs {
    display: flex;
    gap: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    opacity: 0; /* Caché pour animation GSAP */
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    color: #000;
    font-weight: 500;
}

.tab-btn.active .tab-text {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ============================================
   ZONE DE CONTENU (fond gris)
   ============================================ */
.projets-agen-content {
    flex: 1;
    background: #f0f0f0;
    padding: 2rem 1rem 4rem;
}

/* Grille de projets (2 par ligne) */
.projets-agen-grid {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 2.5rem;
}

/* Carte projet */
.projet-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.projet-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    font-weight: 400;
    color: #111;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
}

.projet-card-title strong {
    font-weight: 700;
}

.arrow-icon {
    font-size: 1.1rem;
    color: #333;
    transition: transform 0.3s ease;
}

.projet-card:hover .arrow-icon {
    transform: translateX(5px);
}

.projet-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* Image wrapper pour l'overlay */
.projet-card-image-wrapper {
    position: relative;
    overflow: hidden;
}

/* Voile noir venant de la gauche */
.projet-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 35%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.5) 70%, rgba(0,0,0,0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem 1rem;
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    pointer-events: none;
}

.projet-card:hover .projet-card-overlay {
    transform: translateX(0);
}

.projet-card-overlay-top,
.projet-card-overlay-bottom {
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.projet-card-overlay-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.overlay-categorie {
    font-weight: 500;
}

.overlay-lieu {
    color: #e67e22;
    font-weight: 400;
    text-transform: none;
}

.overlay-description {
    font-weight: 400;
    text-transform: none;
    font-size: 0.75rem;
    line-height: 1.5;
}

.projet-card-lieu {
    display: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .projets-agen-filter-container {
        justify-content: flex-end;
    }
    
    .projets-agen-tabs {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .projets-agen-grid {
        gap: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .projets-agen-section {
        padding-top: 60px;
    }
    
    .projets-agen-filter-bar {
        padding: 0.5rem 0.75rem;
    }
    
    .projets-agen-tabs {
        gap: 0.25rem;
    }
    
    .tab-btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .projets-agen-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .projets-agen-content {
        padding: 1rem 0.75rem 2rem;
    }

    .projet-card-title {
        font-size: 0.75rem;
    }
    
    /* Overlay mobile */
    .projet-card-overlay {
        width: 45%;
        padding: 1rem 0.75rem;
    }
    
    .projet-card-overlay-top,
    .projet-card-overlay-bottom {
        font-size: 0.7rem;
    }
    
    .overlay-description {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .projets-agen-section {
        padding-top: 55px;
    }
    
    .projets-agen-tabs {
        width: 100%;
        justify-content: center;
    }
    
    .tab-btn {
        padding: 0.3rem 0.4rem;
        font-size: 0.65rem;
    }
    
    .projets-agen-content {
        padding: 0.75rem 0.5rem 2rem;
    }
    
    .projets-agen-grid {
        gap: 1.25rem;
    }
    
    .projet-card-title {
        font-size: 0.7rem;
        gap: 8px;
        margin-bottom: 6px;
    }
    
    .arrow-icon {
        font-size: 0.9rem;
    }
    
    /* Overlay petit écran */
    .projet-card-overlay {
        width: 50%;
        padding: 0.75rem 0.5rem;
    }
    
    .projet-card-overlay-top {
        font-size: 0.65rem;
    }
    
    .projet-card-overlay-bottom {
        font-size: 0.6rem;
    }
}

/* ============================================
   MODAL DÉTAIL PROJET
   ============================================ */
body.detail-open {
    overflow: hidden;
}

.projet-detail-modal {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.35);
    z-index: 4000;
    display: none;
    padding: 0.4rem;
}

.projet-detail-modal.open {
    display: block;
}

.projet-detail-shell {
    width: min(99.2vw, 1600px);
    height: calc(100vh - 0.8rem);
    margin: 0 auto;
    background: #f5f5f5;
    display: grid;
    grid-template-columns: 300px 1fr;
    overflow: hidden;
}

.projet-detail-sidebar {
    padding: 1.1rem 0.9rem;
    overflow: hidden;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 0.9rem;
    text-transform: uppercase;
}

.detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.2rem 0.8rem;
    margin-bottom: 1rem;
}

.detail-meta p {
    margin: 0;
    font-size: 0.86rem;
    color: #222;
}

.detail-materials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.detail-material-chip {
    background: #fff;
    border: 1px solid #ddd;
    color: #1f1f1f;
    font-size: 0.76rem;
    padding: 0.32rem 0.5rem;
}

.detail-surface {
    margin-bottom: 1rem;
}

.detail-surface p {
    margin: 0 0 0.35rem;
    font-size: 0.86rem;
    font-weight: 600;
}

.detail-surface-value {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.detail-surface-value strong {
    font-size: 3.2rem;
    line-height: 1;
    font-weight: 600;
    color: #171717;
}

.detail-surface-value span {
    font-size: 0.76rem;
    color: #555;
    text-transform: uppercase;
}

.detail-similar h3 {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #2a2a2a;
}

.detail-similar-list {
    display: grid;
    gap: 0.45rem;
}

.detail-similar-card {
    border: none;
    background: #fff;
    padding: 0;
    text-align: left;
    cursor: pointer;
}

.detail-similar-card img {
    width: 100%;
    display: block;
}

.detail-similar-title {
    margin: 0;
    padding: 0.35rem 0.45rem;
    font-size: 0.69rem;
    font-style: italic;
    color: #333;
}

.detail-similar-card span {
    display: block;
    padding: 0.25rem 0.45rem 0.5rem;
    font-size: 0.74rem;
    color: #1a1a1a;
}

.projet-detail-media {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0.55rem 0.75rem 0.8rem;
}

.detail-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.detail-next-project,
.detail-close,
.detail-nav,
.detail-dot {
    border: 1px solid #d0d0d0;
    background: #f8f8f8;
    color: #1a1a1a;
    cursor: pointer;
}

.detail-next-project {
    font-size: 0.79rem;
    padding: 0.55rem 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    border-color: #151515;
    background: #151515;
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.detail-next-project:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    background: #222;
}

.detail-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.15rem;
    line-height: 1;
}

.detail-slider-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
    background: #ececec;
}

.detail-slider-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.detail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.05rem;
    z-index: 5;
}

.detail-prev {
    left: 10px;
}

.detail-next {
    right: 10px;
}

.detail-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.detail-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    padding: 0;
}

.detail-dot.active {
    background: #222;
    border-color: #222;
}

@media (max-width: 1024px) {
    .projet-detail-shell {
        grid-template-columns: 1fr;
        height: calc(100vh - 1rem);
    }

    .projet-detail-sidebar {
        order: 2;
        padding: 1rem;
        max-height: 40vh;
        overflow-y: auto;
    }

    .projet-detail-media {
        order: 1;
        min-height: 45vh;
    }

    .detail-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .detail-meta {
        grid-template-columns: 1fr;
    }

    .detail-surface-value strong {
        font-size: 2.6rem;
    }
}
