/* ============================================
   GALLERY SECTION - ÉLECTRICIEN PRO
   ============================================ */

.gallery {
    padding: var(--space-24) 0;
    position: relative;
}

.gallery__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-12);
}

.gallery__title span {
    color: var(--color-electric-blue);
}

/* Filtres */
.gallery__filters {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-10);
    flex-wrap: wrap;
}

.gallery__filter {
    padding: var(--space-2) var(--space-5);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-all);
}

.gallery__filter:hover {
    border-color: var(--color-electric-blue);
    color: var(--color-electric-blue);
}

.gallery__filter--active {
    background: var(--color-electric-blue);
    border-color: var(--color-electric-blue);
    color: var(--color-deep-black);
}

/* Grid */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

/* Item */
.gallery__item {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: all var(--transition-base);
}

.gallery__item:hover {
    transform: translateY(-5px);
    border-color: var(--color-electric-blue);
    box-shadow: 0 20px 40px -10px rgba(0, 212, 255, 0.15);
}

.gallery__item--tall {
    grid-row: span 2;
    aspect-ratio: auto;
}

.gallery__item--wide {
    grid-column: span 2;
    aspect-ratio: 16/9;
}

.gallery__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery__item:hover .gallery__image {
    transform: scale(1.05);
}

.gallery__overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    opacity: 0;
    transition: opacity var(--transition-base);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-6);
}

.gallery__item:hover .gallery__overlay {
    opacity: 1;
}

.gallery__category {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--color-electric-blue);
    color: var(--color-deep-black);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-2);
    transform: translateY(20px);
    opacity: 0;
    transition: all var(--transition-base) 0.1s;
    align-self: flex-start;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.gallery__item:hover .gallery__category {
    transform: translateY(0);
    opacity: 1;
}

.gallery__item-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-1);
    transform: translateY(20px);
    opacity: 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all var(--transition-base) 0.15s;
}

.gallery__item:hover .gallery__item-title {
    transform: translateY(0);
    opacity: 1;
}

.gallery__item-location {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.8);
    transform: translateY(20px);
    opacity: 0;
    transition: all var(--transition-base) 0.2s;
}

.gallery__item:hover .gallery__item-location {
    transform: translateY(0);
    opacity: 1;
}

.gallery__zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-full);
    color: var(--color-deep-black);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery__item:hover .gallery__zoom {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Animation filtre */
.gallery__item {
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.gallery__item--hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.lightbox--open {
    opacity: 1;
    visibility: visible;
}

.lightbox__content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox__image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
}

.lightbox__close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-all);
}

.lightbox__close:hover {
    background: var(--color-error);
    border-color: var(--color-error);
    color: var(--color-white);
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-all);
}

.lightbox__nav:hover {
    background: var(--color-electric-blue);
    border-color: var(--color-electric-blue);
    color: var(--color-deep-black);
}

.lightbox__nav--prev {
    left: -70px;
}

.lightbox__nav--next {
    right: -70px;
}

.lightbox__info {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
}

.lightbox__title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-1);
}

.lightbox__meta {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery__item--wide {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .gallery__grid {
        grid-template-columns: 1fr;
    }

    .gallery__item--wide,
    .gallery__item--tall {
        grid-column: span 1;
        grid-row: span 1;
        aspect-ratio: 4/3;
    }

    .lightbox__nav--prev {
        left: 10px;
    }

    .lightbox__nav--next {
        right: 10px;
    }
}