/* ====== Video Galérie ====== */

/* Conteneur scrollable pour les galeries */
.table-scroll.scrollHeight-videos {
    height: 77.5vh;
    max-height: 77.5vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

#videoGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

/* video galery */
#videoGrid figure {
    display: flex;
    flex-direction: column;
    margin: 0.2em 0px;
	padding: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    min-height: 100%;
}

#videoGrid figure video {
    max-height: 200px;
    width: 100%;
    object-fit: contain;/* pour que la vidéo ne soit pas déformée */
}

#videoGrid figure figcaption {
    color: #333;
}

div#video_btns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
}

/* Plein écran vidéo personnalisé */
.video-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #111;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-fullscreen video {
    max-width: 95%;
    max-height: 85vh;
    width: auto;
    height: auto;
}

.video-fullscreen figcaption {
    color: #f0f8ff;
    font-size: 1.1rem;
    text-align: center;
    margin-top: 15px;
}

.video-fullscreen .btn-close-fullscreen {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* adaptation mobile */
@media screen and (max-width: 768px) {
 	.table-scroll.scrollHeight-videos {
		max-height: 68vh; /* hauteur visible */
		min-height: 68vh;	
	}
	#videoGrid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	}
	#videoGrid figure video { 
	}
}

