/* Styles pour la page Galerie */

.page-hero {
    background: var(--gradient-primary);
    padding: 150px 0 80px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(135deg, rgba(255,255,255,0.1) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.1) 75%, transparent 75%);
    background-size: 20px 20px;
    opacity: 0.15;
    animation: slide 30s linear infinite;
}

@keyframes slide {
    from { background-position: 0 0; }
    to { background-position: 100% 100%; }
}

.page-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1rem;
    position: relative;
}

.gallery-intro {
    padding: 4rem 0;
    background-color: transparent;
}

.gallery-intro-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--gray-700);
}

.gallery-tabs {
    background-color: transparent;
    padding: 3rem 0;
    position: relative;
}

/* Suppression de l'overlay qui bloque le background */
.gallery-tabs::before {
    display: none;
}

.tabs-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.tab-button {
    background: white;
    border: none;
    padding: 1rem 2rem;
    margin: 0 0.5rem;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.tab-button:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.tab-button:hover::before {
    opacity: 1;
}

.tab-button.active {
    color: white;
    background: var(--primary);
}

.tab-button.active::before {
    opacity: 1;
}

.tab-content {
    display: none;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.75);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 1200px;
    margin: 0 auto;
    backdrop-filter: blur(5px);
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.category-title {
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--primary);
    text-align: center;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.category-description {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.gallery-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-overlay {
    display: none; /* Masquer complètement les textes par-dessus les images */
}

.gallery-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-caption {
    font-size: 0.9rem;
    opacity: 0.9;
}

.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: opacity 0.3s ease;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--gray-900);
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-close:hover {
    background-color: var(--primary);
    color: white;
    transform: rotate(90deg);
}

.lightbox-prev, .lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-caption {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .tabs-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-button {
        margin: 0.5rem 0;
        width: 100%;
        max-width: 300px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

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