/* GSAP Project Section Styles */

.project-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 0;
}

.project-item {
    position: relative;
    width: 100%;
    border-top: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
    overflow: hidden;
}

.project-item:last-child {
    border-bottom: 1px solid var(--border-color);
}

/* Layout Grid */
.project-header {
    display: grid;
    grid-template-columns: 0.5fr 2fr 1fr 0.5fr;
    align-items: center;
    padding: 3rem 2rem;
    position: relative;
    z-index: 10;
    transition: padding 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Typography */
.project-index {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.project-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.project-category {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    width: fit-content;
}

.project-arrow {
    display: flex;
    justify-content: flex-end;
    color: var(--text-main);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

/* Image Reveal Section */
.project-preview {
    height: 0;
    overflow: hidden;
    position: relative;
    will-change: height;
}

.project-preview-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    padding: 0 2rem 4rem 2rem;
    align-items: start;
}

.project-image-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 1rem;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.2); /* For parallax effect */
    will-change: transform;
    opacity: 0.8;
    transition: opacity 0.5s ease;
}

.project-details {
    opacity: 0;
    transform: translateY(20px);
}

.project-description {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.tech-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #3B82F6; /* Brand color */
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
}

.project-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--text-main);
    color: var(--bg-main);
    padding: 1rem 2rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.project-link-btn:hover {
    background: #3B82F6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, 0.5);
}

/* Hover States managed by JS/CSS */
.project-item:hover .project-header {
    background: var(--bg-surface-hover);
}

.project-item:hover .project-title {
    color: #3B82F6; /* Brand highlight */
}

.project-item:hover .project-arrow {
    opacity: 1;
    transform: translateX(0);
}

.project-item:hover .project-image {
    opacity: 1;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .project-container {
        padding: 0;
        border-top: 1px solid var(--border-color); /* Bordure explicite en haut sur mobile */
    }

    .project-header {
        grid-template-columns: 1fr auto; /* Titre à gauche, Flèche à droite */
        gap: 1rem;
        padding: 1.5rem 0; /* Moins de padding vertical, zéro horizontal (géré par le container parent) */
    }
    
    /* On cache l'index et la catégorie pour épuré le mobile */
    .project-index, .project-category {
        display: none;
    }

    .project-title {
        font-size: 1.75rem; /* Plus petit pour éviter les retours à la ligne forcés */
    }

    .project-arrow {
        opacity: 1; /* Toujours visible sur mobile pour indiquer l'interaction */
        transform: translateX(0);
        color: var(--text-muted);
    }

    .project-preview-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 0 3rem 0; /* Alignement gauche strict */
    }

    .project-image-wrapper {
        height: 220px; /* Moins haut sur mobile */
    }
    
    .project-description {
        font-size: 1rem; /* Texte lisible standard */
    }
}
