/* ========================================
   REALISATION.CSS - Page Réalisations
   Full Responsive
   ======================================== */

/* Hero Section */
.hero-section {
    max-width: 1512px;
    margin: 0 auto;
    padding: 100px 100px 75px;
    text-align: center;
}

.hero-title {
    font-size: 96px;
    line-height: 1;
    margin-bottom: 25px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
}

/* Projects Section */
.projects-section {
    max-width: 1512px;
    margin: 0 auto;
    padding: 0 100px 100px;
}

.project-card {
    margin-bottom: 100px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Project Gallery */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 35px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    background: var(--bg-gray);
}

/* Points du carrousel : mobile uniquement (voir media queries) */
.gallery-dots {
    display: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Layout 1: 2 small left, 1 large right */
.project-card:nth-child(3n+1) .project-gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 292.5px);
}

.project-card:nth-child(3n+1) .gallery-item:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.project-card:nth-child(3n+1) .gallery-item:nth-child(2) {
    grid-column: 2;
    grid-row: 1 / 3;
}

.project-card:nth-child(3n+1) .gallery-item:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
}

/* Layout 2: 1 large left, 2 small right */
.project-card:nth-child(3n+2) .project-gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 292.5px);
}

.project-card:nth-child(3n+2) .gallery-item:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / 3;
}

.project-card:nth-child(3n+2) .gallery-item:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.project-card:nth-child(3n+2) .gallery-item:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

/* Layout 3: 2 small left, 1 large right */
.project-card:nth-child(3n) .project-gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 292.5px);
}

.project-card:nth-child(3n) .gallery-item:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.project-card:nth-child(3n) .gallery-item:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
}

.project-card:nth-child(3n) .gallery-item:nth-child(3) {
    grid-column: 2;
    grid-row: 1 / 3;
}

/* Project Info */
.project-info {
    max-width: 900px;
}

.project-info h2 {
    font-size: 56px;
    margin-bottom: 20px;
}

.project-meta {
    display: flex;
    gap: 40px;
    margin-bottom: 25px;
    font-size: 16px;
    color: var(--text-muted);
}

.project-meta i {
    margin-right: 8px;
}

.project-description {
    font-size: 18px;
    line-height: 1.6;
    font-weight: 300;
}

/* CTA Section */
.cta-section {
    max-width: 1512px;
    margin: 0 auto;
    padding: 0 100px 100px;
}

.cta-card {
    background: var(--bg-gray);
    padding: 75px 100px;
    text-align: center;
}

.cta-card h2 {
    font-size: 56px;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 35px;
}

.cta-button {
    display: inline-block;
    background: var(--text-dark);
    color: white;
    padding: 20px 50px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.cta-button:hover {
    background: #000;
}

/* ========================================
   RESPONSIVE - TABLET (1024px)
   ======================================== */

@media (max-width: 1024px) {
    .hero-section {
        padding: 60px 40px 40px;
    }

    .hero-title {
        font-size: 64px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .projects-section {
        padding: 0 40px 60px;
    }

    .project-card {
        margin-bottom: 60px;
    }

    /* Reset all layouts to 1 column */
    .project-card:nth-child(3n+1) .project-gallery,
    .project-card:nth-child(3n+2) .project-gallery,
    .project-card:nth-child(3n) .project-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .project-card:nth-child(3n+1) .gallery-item:nth-child(1),
    .project-card:nth-child(3n+1) .gallery-item:nth-child(2),
    .project-card:nth-child(3n+1) .gallery-item:nth-child(3),
    .project-card:nth-child(3n+2) .gallery-item:nth-child(1),
    .project-card:nth-child(3n+2) .gallery-item:nth-child(2),
    .project-card:nth-child(3n+2) .gallery-item:nth-child(3),
    .project-card:nth-child(3n) .gallery-item:nth-child(1),
    .project-card:nth-child(3n) .gallery-item:nth-child(2),
    .project-card:nth-child(3n) .gallery-item:nth-child(3) {
        grid-column: 1;
        grid-row: auto;
        height: 400px;
    }

    .project-info h2 {
        font-size: 40px;
    }

    .project-description {
        font-size: 16px;
    }

    .cta-section {
        padding: 0 40px 60px;
    }

    .cta-card {
        padding: 50px 40px;
    }

    .cta-card h2 {
        font-size: 40px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE (768px)
   ======================================== */

@media (max-width: 768px) {
    .hero-section {
        padding: 40px 20px 30px;
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .projects-section {
        padding: 0 20px 40px;
    }

    .project-card {
        margin-bottom: 50px;
    }

    /* Carrousel horizontal auto-défilant (sans flèches) */
    .project-card:nth-child(3n+1) .project-gallery,
    .project-card:nth-child(3n+2) .project-gallery,
    .project-card:nth-child(3n) .project-gallery {
        display: flex;
        grid-template-columns: none;
        grid-template-rows: none;
        gap: 8px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 20px;
    }

    .project-gallery::-webkit-scrollbar {
        display: none;
    }

    .project-card:nth-child(3n+1) .project-gallery > .gallery-item,
    .project-card:nth-child(3n+2) .project-gallery > .gallery-item,
    .project-card:nth-child(3n) .project-gallery > .gallery-item {
        grid-column: auto;
        grid-row: auto;
        flex: 0 0 86%;
        height: auto;
        aspect-ratio: 4 / 3;
        scroll-snap-align: center;
    }

    /* Points indicateurs */
    .gallery-dots {
        display: flex;
        justify-content: center;
        gap: 6px;
        margin: -8px 0 24px;
    }

    .gallery-dots span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: rgba(25, 25, 25, 0.2);
        transition: background 0.3s, transform 0.3s;
    }

    .gallery-dots span.is-active {
        background: var(--text-dark, #191919);
        transform: scale(1.35);
    }

    .project-info h2 {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .project-meta {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }

    .project-description {
        font-size: 15px;
    }

    .cta-section {
        padding: 0 20px 40px;
    }

    .cta-card {
        padding: 40px 20px;
    }

    .cta-card h2 {
        font-size: 32px;
    }

    .cta-text {
        font-size: 16px;
    }

    .cta-button {
        padding: 18px 40px;
        font-size: 15px;
    }
}

/* ========================================
   RESPONSIVE - SMALL MOBILE (480px)
   ======================================== */

@media (max-width: 480px) {
    .hero-title {
        font-size: 36px;
    }

    .project-card {
        margin-bottom: 40px;
    }

    .project-card:nth-child(3n+1) .project-gallery > .gallery-item,
    .project-card:nth-child(3n+2) .project-gallery > .gallery-item,
    .project-card:nth-child(3n) .project-gallery > .gallery-item {
        flex-basis: 88%;
    }

    .project-info h2 {
        font-size: 28px;
    }

    .project-meta {
        font-size: 14px;
    }

    .project-description {
        font-size: 14px;
    }

    .cta-card h2 {
        font-size: 28px;
    }

    .cta-text {
        font-size: 15px;
    }
}