/* ====================== CSS Diapo55 ====================== */
/*
body{
    background:url("<?= $ground ?? '' ?>") center/cover no-repeat fixed;
    margin:0; height:100%;
}

*/




.page-diapo{ display:flex; flex-direction:column; height:100vh; overflow:hidden; }
.header-bar{ display:flex; align-items:center; justify-content:space-between; padding:6px 10px; gap:10px; }
.header-left,.header-center,.header-right{ flex:1; display:flex; align-items:center; }
.header-left{ justify-content:flex-start; }
.header-center{ justify-content:center; }
.header-right{ justify-content:flex-end; }
.gallery-title{ margin:0; font-size:1.4rem; background:rgba(0,0,0,0.5); color:white; white-space:nowrap; }
.audio-player{ max-width:180px; }
@media(max-width:600px){ .gallery-title{font-size:1.1rem;} .audio-player{max-width:120px;} }

/* Carousel */
.carousel-item{
    display:flex;
    align-items:center;
    justify-content:center;
    height:100%;
}

.viewer-diapo{ width:100%; flex:1; overflow:hidden; position:relative; }
.carousel-item img{ 
    max-width:100%;
    max-height:100%;
    width:auto;
    height:auto;
    object-fit:contain;
    display:block;
    margin:auto;}

.img-wrap{
    position:relative;
    display:flex;
    justify-content:center;
    align-items:center;
}

.img-title{
    position:absolute;
    bottom:12px;
    left:50%;
    transform:translateX(-50%);
    padding:6px 14px;
    background:rgba(0,0,0,0.6);
    color:white;
    font-size:1rem;
    border-radius:6px;
    white-space:nowrap;
    text-align:center;
    z-index:5;
}

/* Titre hover */
.hover-title{
    position:absolute; bottom:10px; left:50%; transform:translateX(-50%);
    padding:6px 12px; background:rgba(0,0,0,0.55); color:white; font-size:1rem; border-radius:6px;
    white-space:nowrap; max-width:90vw; width:fit-content;
    opacity:0; transition:opacity .4s ease; pointer-events:none;
}
.carousel-item:hover .hover-title{ opacity:1; }

/* Titre vidéo 2 */
.video-title{
    color:#4da3ff;
    font-weight:600;
    cursor:pointer;
}
.video-title::before{
    content:"▶ ";
    font-size:1.2em;
}

/* Vignettes centrées n2 */
.thumbs-zone{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    width:100%;
    overflow:hidden;
}

.thumbs-strip{
    display:flex;
    gap:6px;
    max-width:80vw;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-behavior:smooth;

    scrollbar-width:none;          /* Firefox */
}
.thumbs-strip::-webkit-scrollbar{
    display:none;                  /* Chrome / Edge / Safari */
}

.thumb{
    width:80px;
    height:80px;
    object-fit:cover;
    aspect-ratio:1/1;
    cursor:pointer;
    border:2px solid transparent;
    border-radius:6px;
    flex-shrink:0;
}

.thumb.active{
    border-color:#0d6efd;
    box-shadow:0 0 6px rgba(13,110,253,.9);
}

/* Flèches des vignettes */
.thumb-btn{
    background:rgba(13,110,253,0.15);
    border:2px solid #0d6efd;
    color:#0d6efd;
    font-size:22px;
    width:38px;
    height:38px;
    border-radius:50%;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    transition:all .25s ease;
}

.thumb-btn:hover{
    background:#0d6efd;
    color:white;
    transform:scale(1.1);
}

.thumb-btn:active{
    transform:scale(0.95);
}

/* Flèches carousel */
.carousel-control-prev, .carousel-control-next{ width:5%; }

/* Immersive */
/* IMMERSIVE MODE */
body.immersive{
    overflow:hidden;
}

/* image plein écran */
body.immersive .carousel-item img{
    width:100vw;
    height:100vh;
    object-fit:contain;
}

/* carousel prend tout l’écran */
/* IMMERSIVE MODE IMAGE PLEIN ÉCRAN */
body.immersive .carousel,
body.immersive .carousel-inner,
body.immersive .carousel-item,
body.immersive .img-wrap{
    height:100vh !important;
}


/* cacher interface */
body.immersive .thumbs-zone,
body.immersive audio{
    display:none !important;
}

/* titre image caché */
body.immersive .img-title{
    display:none !important;
}

body.immersive .carousel-control-prev,
body.immersive .carousel-control-next {
    top: 50%;
    transform: translateY(-50%);
}

/* HEADER IMMERSIF 2 */
body.immersive .header-bar{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    z-index:9999;
    background:rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    opacity:0;
    pointer-events:none;
    transition:opacity .4s ease;
}

/* header visible temporairement */
body.immersive .header-bar.visible{
    opacity:1;
    pointer-events:auto;
}

/* Popup vidéo */
.video-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.85);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:10000;
}

.video-overlay.show{ display:flex; }
.video-box{ max-width:90%; max-height:90%; }
.video-box video{
    max-width:90vw;
    max-height:90vh;
    border-radius:10px;
}
/*  por fleches du carousel */
.carousel-control-prev,
.carousel-control-next {
    align-items: center;
}

.carousel-control-prev,
.carousel-control-next {
    top: 0;
    bottom: 0;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    transform: translateY(0);
}

.carousel-control-prev,
.carousel-control-next {
    top: 50%;
    transform: translateY(-50%);
    height: auto;
    display: flex;
    align-items: center;
}

/* pour flèche carousel */
/* Positionnement flèches centré sur l'image */

/* MODE NORMAL */
body:not(.immersive) .carousel-control-prev,
body:not(.immersive) .carousel-control-next {
    top: 40vh;
    transform: translateY(-50%);
}

/* MODE IMMERSIF */
body.immersive .carousel-control-prev,
body.immersive .carousel-control-next {
    top: 50%;
    transform: translateY(-50%);
}

/* Flèches carousel plus visibles (propre & pro) */
.carousel-control-prev-icon,
.carousel-control-next-icon{
    background-color: rgba(0,0,0,0.6);
    border-radius:50%;
    width:48px;
    height:48px;
    background-size: 60% 60%;
}

.carousel-control-prev,
.carousel-control-next{
    opacity:1;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon{
    background-color: rgba(13,110,253,0.9); /* bleu bootstrap */
}
