.beforeafter-section {
    text-align: center;
    padding: 60px 0;
}

.ba-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin:50px 0 0 0;
}

.ba-card {
    text-align: center;
}

.ba-slider {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    width: 100%;
    aspect-ratio: 1/1;
}


.ba-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%; /* important pour remplir le conteneur */
    object-fit: cover;
}
.ba-before {
    z-index: 1;
}
.ba-after {
  z-index: 2;
  clip-path: inset(0 0 0 50%); /* initialement à 50% */
}

.ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 40px; /* LARGE */
    height: 100%;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 20;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
}

.ba-handle::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #212529;
    transform: translateX(-50%);
    box-shadow: 0 0 6px rgba(0,0,0,.5);
}

.ba-handle,
.ba-after {
    transition: none !important;
}
.ba-slider.auto-anim .ba-handle,
.ba-slider.auto-anim .ba-after {
    transition: left 0.75s ease, clip-path 0.75s ease !important;
}
/* --- ARROWS --- */
.ba-arrow {
    position: relative;
    color: #212529;
    font-size: 30px;
    font-weight: bold;
    z-index: 30;
    pointer-events: none; /* clic passe à travers */
}

.ba-arrow-left {
   margin-right: 6px;
}

.ba-arrow-right {
    margin-right: 2px;
}

/* --- LABELS --- */
.ba-label {
    position: absolute;
    top: 10px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 13px;
    border-radius: 4px;
    z-index: 20;
    letter-spacing: 0.5px;
}
.ba-label-left,
.ba-label-right {
    transition: opacity 0.3s ease;
}
.ba-label-left {
    left: 10px;
}

.ba-label-right {
    right: 10px;
}

/* --- LINK --- */
.ba-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: underline;
    color: #757575;
}