/* Styles modernisés pour les controls */
.gallery-controls {
    background-color: var(--white);
    padding: 30px 20px;
    box-shadow: var(--shadow);
}

.controls-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Boutons de navigation d'année */
.year-nav-btn {
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    color: var(--gray-dark);
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.year-nav-btn:hover:not(:disabled) {
    background-color: var(--gray-light);
    border-color: var(--blue-primary);
    color: var(--blue-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.year-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: var(--gray-light);
    border-color: #e0e0e0;
}

/* Affichage de l'année */
.year-display {
    position: relative;
    min-width: 200px;
    text-align: center;
}

.year-select-hidden {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.year-text {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--blue-primary);
    color: var(--white);
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(32, 141, 204, 0.3);
}

.year-text:hover {
    background-color: #1a7aad;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(32, 141, 204, 0.4);
}

.gallery-section {
    padding: 0px 20px 60px 20px;
    background-color: var(--white);
    min-height: 70vh;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(32, 141, 204, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay i {
    font-size: 3rem;
    color: var(--white);
}

/* Modal Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.lightbox.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%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
}

.lightbox-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.lightbox-btn {
    background-color: var(--blue-primary);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lightbox-btn:hover {
    background-color: #1a7aad;
    transform: translateY(-2px);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--red-primary);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background-color: #cc0000;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.no-images {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-dark);
}

.no-images i {
    font-size: 4rem;
    color: var(--blue-primary);
    margin-bottom: 20px;
}

.no-images h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Pagination moderne */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 45px;
    height: 45px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    color: var(--gray-dark);
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--gray-light);
    border-color: var(--blue-primary);
    color: var(--blue-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.page-btn.active {
    background-color: var(--blue-primary);
    color: var(--white);
    border-color: var(--blue-primary);
    box-shadow: 0 4px 12px rgba(32, 141, 204, 0.3);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: var(--gray-light);
    border-color: #e0e0e0;
}

.page-btn.page-nav {
    min-width: 45px;
    font-size: 1.1rem;
}

.page-btn.page-nav i {
    margin: 0;
}

.page-btn.page-number {
    min-width: 45px;
}

.page-dots {
    color: var(--gray-dark);
    font-weight: bold;
    padding: 0 8px;
    display: flex;
    align-items: center;
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .control-group {
        gap: 10px;
    }

    .year-nav-btn {
        min-width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .year-display {
        min-width: 180px;
    }

    .year-text {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 15px;
    }

    .pagination {
        gap: 6px;
        margin-top: 40px;
    }

    .page-btn {
        min-width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .page-btn.page-nav {
        min-width: 40px;
        font-size: 1rem;
    }

    .page-dots {
        padding: 0 4px;
        font-size: 1rem;
    }

    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .lightbox-nav.prev {
        left: 10px;
    }

    .lightbox-nav.next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    .lightbox-controls {
        flex-direction: column;
        width: 100%;
    }

    .lightbox-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .controls-wrapper {
        padding: 0 10px;
    }

    .control-group {
        gap: 8px;
        width: 100%;
        max-width: 350px;
    }

    .year-nav-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .year-display {
        min-width: 150px;
        flex: 1;
    }

    .year-text {
        padding: 8px 16px;
        font-size: 0.95rem;
        width: 100%;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        gap: 10px;
    }

    .pagination {
        gap: 4px;
        margin-top: 30px;
    }

    .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
        padding: 0 8px;
    }

    .page-btn.page-nav {
        min-width: 36px;
        font-size: 0.9rem;
    }

    .page-dots {
        padding: 0 2px;
        font-size: 0.9rem;
    }
}