/* Galerie - Page galerie photos */

.gallery-header {
    background: linear-gradient(135deg, #5a67d8 0%, #434190 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.gallery-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.gallery-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Gallery Filters */
.gallery-filters {
    padding: 2rem 0;
    background: #f8f9fa;
}

.gallery-filters .container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #5a67d8;
    background: #fff;
    color: #5a67d8;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 1rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: #5a67d8;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(90, 103, 216, 0.3);
}

/* Gallery Grid */
.gallery-grid {
    padding: 3rem 0;
    background: #fff;
}

.gallery-grid .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.gallery-image {
    position: relative;
    width: 100%;
    padding-bottom: 20%; /* Aspect ratio très réduit pour format panoramique */
    overflow: hidden;
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.zoom-btn {
    padding: 1rem 2rem;
    background: #fff;
    color: #5a67d8;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.zoom-btn:hover {
    background: #5a67d8;
    color: #fff;
    transform: scale(1.05);
}

/* Hidden items */
.gallery-item.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 968px) {
    .gallery-grid .container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .gallery-header {
        padding: 3rem 0;
    }

    .gallery-header h1 {
        font-size: 2.5rem;
    }

    .gallery-header p {
        font-size: 1rem;
    }

    .gallery-filters {
        padding: 1.5rem 0;
    }

    .gallery-filters .container {
        padding: 0 15px;
        gap: 0.75rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .gallery-grid {
        padding: 2rem 0;
    }

    .gallery-grid .container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
        padding: 0 15px;
    }

    .gallery-image {
        padding-bottom: 25%;
    }

    .zoom-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .gallery-header {
        padding: 2.5rem 0;
    }

    .gallery-header h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .gallery-header p {
        font-size: 0.95rem;
        padding: 0 1rem;
    }

    .gallery-filters {
        padding: 1rem 0;
    }

    .gallery-filters .container {
        gap: 0.5rem;
        padding: 0 10px;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        flex: 1;
        min-width: 0;
    }

    .gallery-grid {
        padding: 1.5rem 0;
    }

    .gallery-grid .container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 10px;
    }

    .gallery-item {
        border-radius: 10px;
    }

    .gallery-image {
        padding-bottom: 30%;
    }

    .zoom-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .gallery-header h1 {
        font-size: 1.75rem;
    }

    .filter-btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.8rem;
    }

    .gallery-grid .container {
        gap: 0.75rem;
    }
}

/* Mode paysage mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .gallery-header {
        padding: 2rem 0;
    }

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

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
    animation: fadeIn 0.3s;
}

.lightbox-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
}

.lightbox-close:hover {
    color: #5a67d8;
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10000;
    user-select: none;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(90, 103, 216, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev:active,
.lightbox-next:active {
    transform: translateY(-50%) scale(0.95);
}

/* Responsive pour le lightbox */
@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 24px;
        padding: 15px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 85%;
    }

    .lightbox-content img {
        max-height: 85vh;
    }
}

