/* ==========================================================================
   VERSION ULTRA-LENTE : FONDU MAXIMAL SANS SACADE
   ========================================================================== */

/* 1. Bloquer définitivement tout mouvement de glissement (swipe) */
.lity,
.lity-wrap,
.lity-container,
.lity-content,
.box_mediabox .lity-container {
    transform: none !important;
    -webkit-transform: none !important;
}

/* 2. Animation de l'image en mode ultra-lent (1.5 seconde) */
.lity-opened .lity-content img,
.lity-opened .lity-content iframe {
    animation: mediaboxFadeInUltraSlow 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

/* Définition du fondu très progressif */
@keyframes mediaboxFadeInUltraSlow {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 3. Ralentir aussi l'apparition du fond noir pour accompagner le mouvement */
.lity {
    opacity: 0;
    transition: opacity 0.8s ease-in-out !important;
}
.lity.lity-opened {
    opacity: 1;
}

/* 4. Éviter tout résidu visuel ou sursaut au chargement */
.lity-loading .lity-container,
.lity-closing .lity-container {
    opacity: 0 !important;
}


/* ==========================================================================
   CAROUSEL : ESPACEMENT INFAILLIBLE DES IMAGES (CSS PADDING)
   ========================================================================== */

/* 1. Décollage global pour conserver les flèches extérieures */
.owl-carousel {
    position: relative;
    box-sizing: border-box;
    width: calc(100% - 100px) !important; 
    margin: 0 auto !important;             
    padding: 0 !important; 
}

/* 2. FORCER L'ESPACE DE SÉPARATION (Ajustez les 20px selon vos goûts) */
.owl-carousel .owl-item {
    padding: 0 20px !important; /* Ajoute 20px de blanc à gauche et à droite de chaque image */
    box-sizing: border-box !important;
}

/* Assurer la fluidité de l'affichage interne */
.owl-carousel .owl-stage-outer {
    overflow: hidden !important;
}

/* 3. Positionnement horizontal global de la navigation */
.owl-carousel .owl-nav {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    margin-top: 0 !important;
    pointer-events: none;
}

/* 4. Boutons nus et transparents */
.owl-carousel .owl-nav button.owl-prev,
.owl-carousel .owl-nav button.owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 50px;
    background: transparent !important; 
    border: none !important;
    border-radius: 0 !important;
    pointer-events: auto;
    cursor: pointer;
    color: transparent !important; 
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* 5. Flèche gauche (<) calée dans l'espace extérieur blanc */
.owl-carousel .owl-nav button.owl-prev {
    left: -45px; 
}
.owl-carousel .owl-nav button.owl-prev::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    border-left: 3px solid #555; 
    border-bottom: 3px solid #555;
    transform: rotate(45deg);
    transition: border-color 0.2s ease;
}

/* 6. Flèche droite (>) calée dans l'espace extérieur blanc */
.owl-carousel .owl-nav button.owl-next {
    right: -45px;
}
.owl-carousel .owl-nav button.owl-next::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    border-right: 3px solid #555;
    border-top: 3px solid #555;
    transform: rotate(45deg);
    transition: border-color 0.2s ease;
}

/* Changement de couleur au survol */
.owl-carousel .owl-nav button.owl-prev:hover::before,
.owl-carousel .owl-nav button.owl-next:hover::before {
    border-color: #000; 
}

