/* --- GRILLE PHOTOS (Inchangé, c'était bon) --- */
.swimrun-photos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}
@media (max-width: 1024px) { .swimrun-photos-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .swimrun-photos-grid { grid-template-columns: 1fr; } }

.swimrun-photo-item {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}
.swimrun-photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.swimrun-photo-item:hover img { transform: scale(1.05); }
.photo-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; }
.swimrun-photo-item:hover .photo-overlay { opacity: 1; }


/* --- GALERIE VIDÉOS --- */
.swimrun-video-gallery {
    margin-bottom: 40px;
}

/* Slider Principal */
.sw-video-main {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    background: #000;
}

.video-embed-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}
.video-embed-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* Boutons Slider Principal (sur la vidéo) */
.main-next, .main-prev {
    color: #fff;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.main-next:hover, .main-prev:hover { opacity: 1; }


/* Wrapper des miniatures (pour placer les flèches à l'extérieur) */
.thumbs-container-wrapper {
    position: relative;
    /* padding: 0 40px;  <-- Géré inline dans le PHP, ou décommente ici */
}

/* Slider Miniatures */
.sw-video-thumbs {
    width: 100%;
    height: auto; /* Laisse la hauteur s'adapter au ratio */
}

.sw-video-thumbs .swiper-slide {
    width: 100%; /* Sera géré par slidesPerView: 4 */
    aspect-ratio: 16/9; /* Format vidéo pour les vignettes aussi */
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s;
    position: relative;
    border: 2px solid transparent; /* Pour éviter le saut au hover */
}

/* Etat Actif */
.sw-video-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #fedd02; /* Bordure Jaune */
}

.sw-video-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.thumb-play-icon {
    position: absolute;
    top:50%; left:50%;
    transform: translate(-50%,-50%);
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    padding: 5px;
    display: flex;
}

/* Flèches Miniatures (Jaunes) */
.thumbs-next, .thumbs-prev {
    color: #fedd02 !important;
    width: 30px;
    height: 30px;
    margin-top: -15px; /* Centrage vertical fin */
}

/* Positionnement précis des flèches Thumbs */
.thumbs-prev { left: 0px !important; }
.thumbs-next { right: 0px !important; }

/* Enlève le style par défaut swiper un peu moche */
.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 20px !important;
    font-weight: bold;
}