/* Galerie d'œuvres IA - Styles */

/* Fil d'ariane */
.breadcrumb-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px 0;
    margin-bottom: 20px;
    background-color: #f5f5f5;
    border-radius: 4px;
    padding: 15px 20px;
}

.breadcrumb-link {
    color: #ff6f00;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.breadcrumb-link:hover {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.breadcrumb-link i {
    font-size: 18px;
}

.breadcrumb-separator {
    margin: 0 5px;
    color: #999;
}

/* Grille de galerie responsive */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

@media screen and (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media screen and (min-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Item de galerie */
.gallery-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Wrapper d'image */
.gallery-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.gallery-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

video.gallery-thumbnail {
    background-color: #000;
    cursor: pointer;
}

/* Overlay au survol */
.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 ease;
}

.gallery-image-wrapper:hover .gallery-overlay {
    opacity: 1;
}

.view-btn {
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-image-wrapper:hover .view-btn {
    transform: scale(1);
}

/* Nom de fichier sous l'image */
.gallery-filename {
    padding: 8px 12px;
    text-align: center;
    background-color: #fafafa;
    border-top: 1px solid #e0e0e0;
}

.gallery-filename small {
    font-size: 10px;
    color: #757575;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    line-height: 1.3;
}

/* Actions de la galerie */
.gallery-actions {
    padding: 15px;
    display: flex;
    justify-content: center;
    background-color: #fafafa;
}

.gallery-actions .btn {
    width: 100%;
    margin: 0;
}

/* Modal plein écran */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

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

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

/* Bouton de fermeture du modal */
.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.modal-close-btn:hover {
    transform: scale(1.1);
}

/* Boutons de navigation du modal */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.modal-prev-btn {
    left: 20px;
}

.modal-next-btn {
    right: 20px;
}

.modal-nav-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

.modal-nav-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Compteur d'images */
.modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    pointer-events: none;
}

@media screen and (max-width: 600px) {
    .modal-nav-btn {
        display: none; /* Masquer les boutons sur mobile, on utilise le swipe */
    }

    .modal-counter {
        bottom: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Contenu du modal */
.modal-content-wrapper {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Image et vidéo dans le modal */
#modalImage,
#modalVideo {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

#modalImage {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: pan-y; /* Permet le scroll vertical mais pas horizontal */
}

#modalVideo {
    background-color: #000;
}

/* Cards pour les thèmes */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.hoverable:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.card-action a {
    color: #ff6f00 !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.card-action a:hover {
    color: #e65100 !important;
}

/* Animations de chargement */
.gallery-thumbnail {
    animation: imageLoad 0.5s ease;
}

@keyframes imageLoad {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Message vide */
.section.center {
    padding: 60px 20px;
}

.section.center .material-icons {
    font-size: 80px;
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    .breadcrumb-wrapper {
        padding: 10px 15px;
        font-size: 14px;
    }

    .breadcrumb-link {
        padding: 3px 8px;
    }

    .modal-close-btn {
        top: 10px;
        right: 10px;
    }

    .modal-content-wrapper {
        padding: 10px;
    }

    .gallery-actions {
        padding: 10px;
    }

    .gallery-filename {
        padding: 6px 8px;
    }

    .gallery-filename small {
        font-size: 9px;
    }
}
