/* Styles généraux */
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    transition: all 0.3s ease-in-out;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease-in-out;
}

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

/* Titres des œuvres */
.title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 16px;
    padding: 10px;
    text-align: center;
    font-family: 'Itim', cursive;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

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

/* Filtrage par catégorie */
.filter-buttons {
    text-align: center;
    margin-bottom: 20px;
    margin-top: 50px;
}

.filter-button {
    background: #ff6600;
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 5px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.3s ease-in-out;
}

.filter-button:hover, .filter-button.active {
    background: #cc5200;
}

/* Animation de transition pour le filtrage */
.gallery-item {
    opacity: 1;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

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

/* Animation subtile au chargement */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.gallery-item {
    animation: fadeIn 0.8s ease-in-out;
}

/* Adaptation responsive */
@media (max-width: 768px) {
    .gallery {
        flex-direction: column;
        align-items: center;
    }
    .filter-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
}


.filter-btn.active {
    background-color: #ff4500; /* Une couleur qui contraste bien */
    color: white;
    border: 2px solid #ff4500;
}

