.twal-image-compare-wrapper {
    position: relative;
    overflow: hidden;
}

.twal-image-compare {
    position: relative;
    height: 100%;
}

.twal-image-compare img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.twal-after {
    clip-path: inset(0 0 0 50%);
    z-index: 2;
}

.twal-before {
    z-index: 1;
}

.twal-slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 100%;
    background: #000;
    z-index: 3;
    cursor: ew-resize;
}
.twal-image-compare-wrapper {
    position: relative;
    overflow: hidden;
   
}
.twal-image-compare.portrait .twal-image-compare-wrapper {
	aspect-ratio: 3 / 4;
}

.twal-image-compare.paysage  {
	aspect-ratio: 4 / 3;
}
.twal-image-compare-wrapper[style*="height: auto"] {
    height: auto !important;
}
.twal-slider-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}


.twal-caption-before,
.twal-caption-after {
    position: absolute;
    bottom: 10px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.9em;
    z-index: 4;
    pointer-events: none;
    max-width: 45%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.twal-caption-before,
.twal-caption-after {
    transition: opacity 0.2s ease-in-out;
}
.twal-caption-before {
    left: 10px;
}

.twal-caption-after {
    right: 10px;
    text-align: right;
}

/* évite l'effet bleu de la sélection */

.twal-image-compare-wrapper,
.twal-image-compare *,
.twal-slider-handle {
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
