.galerie-container {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Sidebar styles */
.galerie-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.search-box {
    margin-bottom: 2rem;
}

.search-box form {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex-grow: 1;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.search-box button {
    background: #333;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background: #555;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.groupe-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.groupe-list li {
    margin-bottom: 0.5rem;
}

.groupe-list a {
    color: #666;
    text-decoration: none;
    display: block;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.groupe-list li.active a,
.groupe-list a:hover {
    background: #f5f5f5;
    color: #333;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #f5f5f5;
    color: #666;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag:hover,
.tag.active {
    background: #333;
    color: white;
}

/* Grid styles */
.galerie-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.media-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.media-card:hover {
    transform: translateY(-5px);
}

.media-container {
    position: relative;
    padding-top: 75%;
    background: #f8f8f8;
    cursor: pointer;
    overflow: hidden;
}

.media-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.media-container:hover img {
    transform: scale(1.05);
}

.video-container {
    position: relative;
    padding-top: 56.25%;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.media-info {
    padding: 1.5rem;
}

.media-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #333;
}

.media-info p {
    color: #666;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.media-metadata {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.media-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.media-tags .tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f8f8;
    border-radius: 12px;
    color: #666;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
}

.no-results h2 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.modal-nav button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.modal-nav button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .galerie-container {
        flex-direction: column;
    }

    .galerie-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .galerie-container {
        padding: 1rem;
    }

    .galerie-grid {
        gap: 1rem;
    }

    .media-card {
        transform: none;
    }
}

/* Loading animation */
.media-container img.loading {
    opacity: 0;
}

.media-container img.loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}