/* GALERIE HERO SECTION */
.gallery-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.6s ease forwards;
}

.gallery-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: white;
}

.gallery-hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
}

/* GALLERY CONTAINER */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    opacity: 0;
    animation: slideUp 0.6s ease forwards 0.1s;
}

/* FILTER BUTTONS */
.gallery-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* GALLERY GRID */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

/* GALLERY CARDS */
.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    aspect-ratio: 4 / 3;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.gallery-card:hover img {
    transform: scale(1.1) rotate(1deg);
}

/* GALLERY OVERLAY */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(236, 72, 153, 0.9));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
    padding: 2rem;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.gallery-overlay p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.view-btn {
    padding: 0.6rem 1.5rem;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.view-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* LIGHTBOX */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    padding: 2rem;
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    width: 100%;
    height: auto;
    max-width: 900px;
    max-height: 800px;
    border-radius: 1rem;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 300;
}

.lightbox-close:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(99, 102, 241, 0.5);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

/* ANIMATIONS AVANCÉES */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-item {
    animation: fadeInScale 0.5s ease forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.2s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.3s; }
.gallery-item:nth-child(7) { animation-delay: 0.35s; }
.gallery-item:nth-child(8) { animation-delay: 0.4s; }
.gallery-item:nth-child(9) { animation-delay: 0.45s; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .gallery-hero h1 {
        font-size: 2.2rem;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 0.75rem 1rem;
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .gallery-hero {
        padding: 2rem 1rem;
    }

    .gallery-hero h1 {
        font-size: 1.8rem;
    }

    .gallery-controls {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .gallery-overlay {
        padding: 1rem;
    }

    .gallery-overlay h3 {
        font-size: 1.1rem;
    }

    .gallery-overlay p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .view-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 0.5rem 0.75rem;
        font-size: 1.2rem;
    }
}

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

    .gallery-hero h1 {
        font-size: 1.5rem;
    }

    .gallery-controls {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-btn {
        width: 100%;
    }

    .gallery-card {
        aspect-ratio: 16 / 10;
    }

    .lightbox-close {
        top: -35px;
        font-size: 2rem;
    }

    .lightbox-prev,
    .lightbox-next {
        position: fixed;
        top: auto;
        transform: none;
    }

    .lightbox-prev {
        bottom: 1rem;
        left: 1rem;
    }

    .lightbox-next {
        bottom: 1rem;
        right: 1rem;
    }
}
