/* ===================================================================
   ODALE CRÉATION — Page Galerie Réalisations
   =================================================================== */

/* --- Page Hero (banner) --- */
.page-hero {
    position: relative;
    height: 45vh;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
}

.page-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 26, 0.7) 0%,
        rgba(26, 26, 26, 0.5) 50%,
        rgba(26, 26, 26, 0.8) 100%
    );
}

.page-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.page-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 12px;
}

.page-hero__subtitle {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
}

.page-hero__breadcrumb {
    margin-top: 20px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.page-hero__breadcrumb a {
    color: var(--color-gold);
}

.page-hero__breadcrumb a:hover {
    color: var(--color-gold-light);
}

/* --- Filter Buttons --- */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 10px 24px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--color-text-light);
    background-color: var(--color-cream);
    border: 2px solid transparent;
    border-radius: 30px;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover {
    color: var(--color-brown);
    border-color: var(--color-gold);
    background-color: var(--color-white);
}

.filter-btn.active {
    background-color: var(--color-gold);
    color: var(--color-black);
    border-color: var(--color-gold);
    font-weight: 600;
}

.filter-btn .filter-count {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 1px 8px;
    border-radius: 10px;
}

.filter-btn.active .filter-count {
    background-color: rgba(0, 0, 0, 0.15);
}

/* --- Gallery Grid --- */
.gallery-page {
    padding: 80px 0 100px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-grid__item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-grid__item.hiding {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.gallery-grid__item.hidden {
    display: none;
}

.gallery-grid__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-grid__item:hover img {
    transform: scale(1.08);
}

.gallery-grid__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.85) 0%, rgba(26, 26, 26, 0.1) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity var(--transition);
}

.gallery-grid__item:hover .gallery-grid__overlay {
    opacity: 1;
}

.gallery-grid__category {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 4px;
}

.gallery-grid__label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-white);
}

.gallery-grid__zoom {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background-color: rgba(201, 169, 110, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition);
}

.gallery-grid__item:hover .gallery-grid__zoom {
    opacity: 1;
    transform: scale(1);
}

.gallery-grid__zoom svg {
    width: 18px;
    height: 18px;
    color: var(--color-black);
}

/* --- No results message --- */
.gallery-empty {
    text-align: center;
    padding: 60px 20px;
    display: none;
}

.gallery-empty.show {
    display: block;
}

.gallery-empty p {
    font-size: 1.1rem;
    color: var(--color-text-light);
}

/* --- Lightbox Enhanced --- */
.lightbox-gallery {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.lightbox-gallery.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-gallery__img {
    max-width: 85%;
    max-height: 80vh;
    border-radius: 6px;
    transform: scale(0.9);
    transition: transform var(--transition);
    user-select: none;
}

.lightbox-gallery.active .lightbox-gallery__img {
    transform: scale(1);
}

.lightbox-gallery__close {
    position: absolute;
    top: 20px;
    right: 28px;
    font-size: 2.5rem;
    color: var(--color-white);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
    z-index: 10;
}

.lightbox-gallery__close:hover {
    color: var(--color-gold);
}

.lightbox-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-white);
    transition: all var(--transition);
    z-index: 10;
}

.lightbox-gallery__nav:hover {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-black);
}

.lightbox-gallery__nav svg {
    width: 20px;
    height: 20px;
}

.lightbox-gallery__prev {
    left: 24px;
}

.lightbox-gallery__next {
    right: 24px;
}

.lightbox-gallery__counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.lightbox-gallery__caption {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    color: var(--color-white);
    font-weight: 500;
    text-align: center;
}

/* --- CTA Section --- */
.gallery-cta {
    background-color: var(--color-brown);
    padding: 60px 0;
    text-align: center;
}

.gallery-cta__title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--color-white);
    margin-bottom: 12px;
}

.gallery-cta__text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 28px;
    font-weight: 300;
}

.gallery-cta .btn--primary {
    background-color: var(--color-gold);
    color: var(--color-black);
}

.gallery-cta .btn--primary:hover {
    background-color: var(--color-white);
    color: var(--color-brown);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ===================================================================
   RESPONSIVE — Tablette
   =================================================================== */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================================================
   RESPONSIVE — Mobile
   =================================================================== */
@media (max-width: 768px) {
    .page-hero {
        height: 35vh;
        min-height: 260px;
    }

    .gallery-page {
        padding: 50px 0 70px;
    }

    .gallery-filters {
        gap: 8px;
        margin-bottom: 30px;
    }

    .filter-btn {
        padding: 8px 18px;
        font-size: 0.8rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .gallery-grid__overlay {
        padding: 16px;
    }

    .gallery-grid__label {
        font-size: 0.85rem;
    }

    /* Lightbox mobile */
    .lightbox-gallery__img {
        max-width: 95%;
        max-height: 70vh;
    }

    .lightbox-gallery__nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-gallery__prev {
        left: 12px;
    }

    .lightbox-gallery__next {
        right: 12px;
    }
}

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

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