/* =============================================================
   single-photo-video.css
   Styles pour la template single du CPT photo-video
   À inclure dans votre fichier CSS principal ou via wp_enqueue_style
   ============================================================= */

/* ── Reset & base ──────────────────────────────────────────── */
.pv-single *,
.pv-single *::before,
.pv-single *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.single-photo-video {
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Page wrapper ──────────────────────────────────────────── */
.pv-single {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
        padding-bottom: 40px;
}

/* ── Header barre ──────────────────────────────────────────── */
.pv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 20px;
}

.pv-header-title {
    font-size: clamp(18px, 2.5vw, 28px);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.2;
}

.pv-header-counter {
    font-size: 30px;
    font-weight: 400;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
    
}
.pv-header-counter span{
    opacity: .4;
}
span#pv-current {
    opacity: 1 !important;
}
/* .pv-header-counter span {
    color: rgba(255, 255, 255, .4);
} */

.pv-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .6);
    text-decoration: none;
    font-size: 14px;
    transition: color .2s;
    margin-bottom: 6px;
}

.pv-back:hover { color: #fff; }

/* ════════════════════════════════════════════════════════════
   PHOTOS
════════════════════════════════════════════════════════════ */

.pv-photos-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
        position: relative;
}

/* ── Viewer principal ──────────────────────────────────────── */
.pv-viewer {
    position: relative;
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.pv-viewer-inner {
    display: flex;
    transition: transform .4s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

.pv-viewer-slide {
    flex-shrink: 0;
    width: 100%;
}

.pv-viewer-slide img {
   width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 5px;
}

/* ── Flèches viewer ────────────────────────────────────────── */
.pv-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ffff;
    border: 1px solid rgba(255, 255, 255, 1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 10;
}

.pv-nav-btn:hover { background: rgba(255, 255, 255, .25); }
.pv-nav-btn.prev  { left: 20px; }
.pv-nav-btn.next  { right: 20px; }
.pv-nav-btn svg   { width: 22px; height: 22px; }

/* ── Caption ───────────────────────────────────────────────── */
.pv-caption {
   padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    gap: 5px;
    flex-shrink: 0;
    position: absolute;
    bottom: 20px;
    left: 20px;
    flex-direction: column;
    max-width: 350px;
}

.pv-caption-title {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
    min-width: 200px;
}

.pv-caption-meta {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
}

/* ── Thumbnails bande ──────────────────────────────────────── */
.pv-thumbs {
    display: flex;
    gap: 8px;
    padding: 16px 40px;
    overflow-x: auto;
    background: #05193e;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .2) transparent;
}

.pv-thumbs::-webkit-scrollbar        { height: 4px; }
.pv-thumbs::-webkit-scrollbar-track  { background: transparent; }
.pv-thumbs::-webkit-scrollbar-thumb  { background: rgba(255,255,255,.2); border-radius: 2px; }

.pv-thumb {
    flex-shrink: 0;
    width: 140px;
    height: 94px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s, opacity .2s;
    opacity: .6;
}

.pv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pv-thumb.active,
.pv-thumb:hover {
    border-color: #fff;
    opacity: 1;
}

/* ════════════════════════════════════════════════════════════
   VIDÉOS
════════════════════════════════════════════════════════════ */

.pv-videos-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ── Player principal ──────────────────────────────────────── */
.pv-player-wrap {
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

.pv-player-wrap iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 5px;
}

/* ── Info vidéo active ─────────────────────────────────────── */
.pv-video-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 10px;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.pv-video-info-title {
    font-size: 17px;
    font-weight: 600;
}

.pv-video-info-duration {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, .6);
    white-space: nowrap;
}

/* ── Grille thumbnails vidéo ───────────────────────────────── */
.pv-video-thumbs {
    display: flex;
    gap: 12px;
    padding: 24px 40px;
    overflow-x: auto;
    flex-wrap: wrap;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .2) transparent;
}

.pv-video-thumb {
    flex-shrink: 0;
    width: 220px;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color .2s;
}

.pv-video-thumb.active,
.pv-video-thumb:hover { border-color: #4a90d9; }

.pv-video-thumb-img {
       position: relative;
    width: 100%;
    overflow: hidden;
    height: 100%;
}

.pv-video-thumb-img:before{
    position: absolute;
    content: '';
    width: 100%;
    height: 100%;
    background: #000;
    opacity: .3;
}
.pv-video-thumb.active .pv-video-thumb-img:before{
    opacity: 0;
}
.pv-video-thumb-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Badge durée */
.pv-duration-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, .75);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: .03em;
    line-height: 1.4;
}

/* Icône play overlay */
.pv-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .2);
    transition: background .2s;
}

.pv-video-thumb:hover .pv-play-icon   { background: rgba(0, 0, 0, .4); }
.pv-video-thumb.active .pv-play-icon  { display: none; }

.pv-play-icon svg {
    width: 32px;
    height: 32px;
    fill: #fff;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5));
}

.pv-video-thumb-label {
    padding: 8px 10px;
       font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: #ffff;
    position: absolute !important;
    bottom: 1px;
}
.photo-video_bg{
    background-color: transparent;
    background-image: linear-gradient(180deg, var(--e-global-color-kadence6) 0%, var(--e-global-color-kadence2) 40%);
}
/* ── Breadcrumb ── */
.pv-breadcrumb {
       font-size: 13px;
    color: #ffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    flex-wrap: wrap;
    gap: 10px;
}

.pv-breadcrumb a {
    color: #ffff;
    text-decoration: none;
    transition: color .2s;
    white-space: nowrap;
}

.pv-breadcrumb a:hover { color: #fff; }

.pv-breadcrumb strong {
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.pv-bc-sep { color: rgba(255, 255, 255, .25); }

.pv-bc-retour {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff !important;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
header.pv-header {
    padding-top: 45px;
    padding-bottom: 20px;
}
.pv-play-icon img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}
/* @media (max-width: 768px) {
    .pv-breadcrumb        { padding: 12px 20px; gap: 6px; }
    .pv-breadcrumb strong { max-width: 160px; }
} */
/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .pv-caption       { padding: 12px 20px; }
    .pv-thumbs        { padding: 12px 20px; }



    .pv-thumb         { width: 110px; height: 74px; }
    .pv-video-thumb   { width: 160px; }
    .pv-viewer-slide img { height: 50vh; }
}

/* ════════════════════════════════════════════════════════════
   THUMBNAILS SWIPER (photos & vidéos)
════════════════════════════════════════════════════════════ */

/* Outer : masque le débordement Swiper */
.pv-thumbs-outer {
    overflow: hidden;
    padding: 10px 0;
    box-sizing: border-box;
}

/* Swiper container : overflow visible pour que Swiper calcule bien */
.pv-thumbs-swiper {
    overflow: visible !important;
}

/* ── Thumbnails photos ── */
.pv-thumbs-swiper .pv-thumb {
    height: 142px;
    /* width géré exclusivement par Swiper via slidesPerView */
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color .2s, opacity .2s;
    opacity: .6;
    flex-shrink: 0;
}

.pv-thumbs-swiper .pv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pv-thumbs-swiper .pv-thumb.active,
.pv-thumbs-swiper .pv-thumb:hover {
    border-color: #fff;
    opacity: 1;
}

/* ── Thumbnails vidéos ── */
.pv-thumbs-swiper .pv-video-thumb {
        cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid transparent;
    transition: border-color .2s;
    height: 142px;
    position: relative;
}

.pv-thumbs-swiper .pv-video-thumb.active,
.pv-thumbs-swiper .pv-video-thumb:hover {
    border-color: #ffff;
}

/* Supprimer les anciens styles de largeur fixe devenus inutiles */
.pv-thumbs { display: none; }         /* ancienne bande non-swiper */
.pv-video-thumbs { display: none; }   /* ancienne grille non-swiper */

/* ── Responsive padding ── */
@media (max-width: 768px) {
    .pv-breadcrumb {
        justify-content: flex-start;
    }
}