﻿/* ================================================================= */
/* 1. CONFIGURATION DU FOND ET RESET DES TRANSITIONS PARASITES       */
/* ================================================================= */
/* ⚠️ ANTI-CONFLIT MOBILE ⚠️  */
/* On retire .pswp__container et .pswp__zoom-wrap pour laisser la magie de PhotoSwipe opérer */
.pswp.pswp .pswp__item,
.pswp.pswp .pswp__bg,
.pswp.pswp img.pswp__img {
  transition: none;
  animation: none;
}

/* Nettoyage des marges extérieures par défaut */
.pswp__img {
  margin: 0 !important;
}

/* ================================================================= */
/* 1.5. NETTOYAGE RADICAL DES FONDS PARASITES                        */
/* ================================================================= */

/* On force TOUS les conteneurs à être transparents pour qu'aucun */
/* bloc gris de Mobirise ne vienne couvrir le fond noir */
.pswp, 
.pswp__scroll-wrap, 
.pswp__container, 
.pswp__item {
  background: transparent !important;
  background-color: transparent !important;
}

/* Le SEUL élément qui a le droit d'avoir une couleur, c'est le calque de fond */
.pswp__bg {
  background: #000000 !important;
  background-color: #000000 !important;
}

/* ================================================================= */
/* 2. ÉTAT VISIBLE DES ÉLÉMENTS (BOUTONS, COMPTEURS)                 */
/* ================================================================= */
.pswp .pswp__button .pswp__icn,
.pswp .pswp__counter,
.pswp__button--play-pause-ctrl {
  opacity: 0.30 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out !important;
}
.pswp__preloader {
  visibility: hidden !important;
}
.pswp__button--play-pause-ctrl {
  background: transparent !important;
}

/* Effet Hover global pour les boutons UI */
.pswp .pswp__button:hover .pswp__icn,
.pswp .pswp__button--arrow--left:hover .pswp__icn,
.pswp .pswp__button--arrow--right:hover .pswp__icn,
.pswp__button--play-pause-ctrl:hover {
  opacity: 1 !important;
}

/* ================================================================= */
/* 3. MASQUAGE DES BOUTONS UNIQUEMENT AU CLIC                         */
/* ================================================================= */
.pswp:not(.pswp--ui-visible) .pswp__custom-caption,
.pswp:not(.pswp--ui-visible) .pswp__button,
.pswp:not(.pswp--ui-visible) .pswp__counter,
.pswp:not(.pswp--ui-visible) .pswp__top-bar { 
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;   
}

/* ================================================================= */
/* 4. STYLE DE LA LÉGENDE PERSONNALISÉE                              */
/* ================================================================= */
.pswp__custom-caption {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  box-sizing: border-box;
  text-align: center; 
  font-family: sans-serif;
  max-height: 35%;
  overflow-y: auto;
  border-radius: 8px;
  z-index: 1000;
  transition: opacity 0.3s ease;
  opacity: 1;
  pointer-events: none;
  overflow: hidden;
}

.pswp-caption-title {
  font-size: 16px; 
  margin-bottom: 4px; 
  font-weight: normal;
  color: #fff;
}

.pswp-caption-exif {
  font-size: 13px; 
  color: #dfdfdf;
}
.legendeMiniature.zoom {
  background: rgba(0, 0, 0, 0.40) !important;
  display: inline-block !important;
  color: #D6D3D1;
}
/* --- STYLE POUR LES DONNÉES EXIF --- */
.texteExifs {
  display: block;             /* Permet de faire un retour à la ligne automatique après le bloc EXIF */
  white-space: pre-line;
  margin: 0 auto 0px auto;
}

/* ================================================================= */
/* 5. ADAPTATION DU CURSEUR SOURIS (POINTEUR UNIQUE PARTOUT)         */
/* ================================================================= */

/* 🎯 MODIFIÉ : Quel que soit l'endroit (image, fond noir, zoom ou non), 
   le curseur devient la main cliquable (pointer) */
.pswp__scroll-wrap, 
.pswp__container, 
.pswp__item,
.pswp__img,
.pswp--zoom-allowed .pswp__pointer-handler,
.pswp--zoom-allowed .pswp__img,
.pswp--zoomed-in .pswp__item,
.pswp--zoomed-in .pswp__img {
  cursor: pointer !important;
}

/* Style de l'image (inchangé) */
.pswp__img {
  box-sizing: border-box !important; 
  border: 1px solid rgba(255, 255, 255, 0.25) !important; 
  pointer-events: auto !important;
}

/* ================================================================= */
/* 6. BOUTONS PERSONNALISÉS (DIAPORAMA / PLEIN ÉCRAN)                */
/* ================================================================= */
.pswp__top-bar .pswp__button--play-pause-ctrl,
.pswp__button--fullscreen {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  width: 60px !important;
  height: 60px !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.pswp__top-bar .pswp__button--play-pause-ctrl {
  float: right !important;
  position: relative !important;
}

.pswp__top-bar .pswp__button--play-pause-ctrl svg,
.pswp__button--fullscreen svg {
  width: 32px !important; 
  height: 32px !important;
  flex-shrink: 0;
  pointer-events: none;
}

.pswp__top-bar .pswp__button--play-pause-ctrl svg path {
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

/* ================================================================= */
/* 7. SUPPRESSION DU COMPOSANT PARASITE LIÉ AU BOUTON PLAY            */
/* ================================================================= */
.pswp__precounter,
.pswp__icn-loading,
.pswp__button--play-pause-ctrl .pswp__precounter,
.pswp__button--play-pause-ctrl + .pswp__precounter {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
}

/* ================================================================= */
/* 8. BLOCAGE DE L'EFFACEMENT AU SURVOL DES FLÈCHES ET BOUTONS       */
/* ================================================================= */
.pswp:has(.pswp__top-bar:hover) .pswp__ui,
.pswp:has(.pswp__button--arrow--left:hover) .pswp__ui,
.pswp:has(.pswp__button--arrow--right:hover) .pswp__ui {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

.pswp:has(.pswp__button--arrow--left:hover) .pswp__button--arrow--left,
.pswp:has(.pswp__button--arrow--right:hover) .pswp__button--arrow--right {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

.pswp__top-bar:hover .pswp__icn,
.pswp__top-bar:hover .pswp__counter {
  opacity: 0.50 !important;
}

/* ================================================================= */
/* 9. GESTION DU DÉFILEMENT (VITESSES DISSOCIÉES TACTILE / FLÈCHES)   */
/* ================================================================= */

.mbr-gallery-item, 
.mbr-gallery-item * {
  touch-action: manipulation !important;
  cursor: pointer;
}

/* Vitesse de croisière standard pour les clics sur les flèches */
.pswp__container {
  transition: transform 333ms linear !important; 
}

/* Désactivation totale pendant le drag */
.pswp.pswp--is-touching .pswp__container,
.pswp.pswp--dragging .pswp__container {
  transition: none !important;
}

/* ================================================================= */
/* 10. MASQUAGE DU CURSEUR PENDANT LE DIAPORAMA                      */
/* ================================================================= */
.pswp.pswp--hide-cursor,
.pswp.pswp--hide-cursor * {
  cursor: none !important;
}