
/* Reset potential body/html margins that create white space */
body:has(.home-slider),
html:has(.home-slider) {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Remove Elementor container spacing */
.elementor-section:has(.home-slider),
.elementor-container:has(.home-slider),
.elementor-widget-wrap:has(.home-slider),
.elementor-widget:has(.home-slider) {
    margin: 0 !important;
    padding: 0 !important;
}

.home-slider {
    position: relative;
    overflow: hidden;
    height: 100vh;
    min-height: 100vh;
    background-color: #000;
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw;
    margin-left: calc(50% - 50vw) !important;
}

/* Crossfade: keep slides visible and stack via z-index to avoid white flash */
.home-slider .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    /* FIX */
    z-index: 0;
    /* FIX */
    transition: opacity .6s ease;
    /* FIX */
}

.home-slider .slide-media {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.home-slider .slide-media .slide-video-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gradient overlay left->right for better contrast (light) */
.home-slider .slide-media::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    transition: opacity .6s ease;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.18) 40%, rgba(0, 0, 0, 0) 100%)
}

.home-slider .slide-media img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    display: block;
    background-color: #000;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 1.2s cubic-bezier(0.65, 0, 0.35, 1), opacity .3s ease;
}

.home-slider .slide.active .slide-media img {
    transform: translateX(0);
    opacity: 1;
}

.home-slider .slide.active {
    z-index: 2;
    pointer-events: auto;
    opacity: 1;
    /* FIX */
}

.home-slider .slide.exiting {
    z-index: 1;
    opacity: 1;
    /* FIX */
}

.home-slider .slide.exiting .slide-media img {
    transform: translateX(-100%);
    opacity: 1;
    transition: transform 1.2s cubic-bezier(0.65, 0, 0.35, 1), opacity .3s ease .9s;
}

/* Left-aligned content (desktop), centered on small screens */
.home-slider .slide-content {
    position: absolute;
    left: 6%;
    bottom: auto;
    top: 55%;
    color: #fff;
    text-align: left;
    padding: 1rem;
    z-index: 100;
    max-width: 50%;
}

.home-slider .slide-title {
    font-size: 3.5rem;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    font-family: 'ivypresto-display';
}

.home-slider .slide-content .slide-subtitle {
    font-size: 1.6rem;
    font-weight: 300;
    margin-bottom: 24px;
    margin-top: 25px;
    position: relative;
    padding-left: 65px;
}

.home-slider .slide-title,
.home-slider .slide-content .slide-subtitle,
.home-slider .slide-button,
.home-slider .slide-navs {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s ease, transform .8s ease;
}

.home-slider .slide-content .slide-subtitle {
    transition-delay: .15s;
}

.home-slider .slide-button {
    transition-delay: .3s;
}

.home-slider .slide-navs {
    transition-delay: .45s;
    margin-top: 15%;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* small line positioned at the top of the first line of text, to the left */
.home-slider .slide-content .slide-subtitle:before {
    position: absolute;
    content: "";
    left: 0;
    top: 0.5em;
    width: 50px;
    height: 2px;
    background: var(--e-global-color-3cbd3e9);
}


.home-slider .slider-prev,
.home-slider .slider-next {
    z-index: 5
}

/* slide-navs below the button, arrows side-by-side */

.home-slider .slide-nav {
    background: transparent;
    cursor: pointer;
    width: 70px;
    height: 70px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform .18s ease, background .18s ease;
}

.home-slider .slide-nav.slide-next {
    border: 1px solid rgba(255, 255, 255, 1);
}


.home-slider .slide-nav img {
    width: 25px;
    height: auto;
    display: block;
}

.home-slider .slide.active .slide-content .slide-title,
.home-slider .slide.active .slide-content .slide-subtitle,
.home-slider .slide.active .slide-content .slide-button,
.home-slider .slide.active .slide-content .slide-navs {
    opacity: 1 !important;
    transform: translateY(0);
}

.home-slider .slide-button {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    font-size: 1.3rem;
    border-radius: 0;
    margin-bottom: 24px;
    font-weight: 700;
    position: relative;
    padding-right: 28px;
}

.home-slider .slide-button::before {
    position: absolute;
    content: url(/wp-content/uploads/2026/02/chevron-droit-aprime-architectes-dinan.svg);
    opacity: 0;
    right: 0;
    top: 65%;
    transform: translateY(-50%) translateX(-10px);
    transition: transform .3s ease, opacity .3s ease;
}

.home-slider .slide-button:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.home-slider .slider-prev,
.home-slider .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .5);
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer
}

.home-slider .slider-prev {
    left: 10px
}

.home-slider .slider-next {
    right: 10px
}

/* Tablette */
@media screen and (max-width: 1200px) {
    .home-slider .slide::before {
        background: linear-gradient(to right, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.35) 50%, rgba(0, 0, 0, 0.1) 100%);
    }

    .home-slider .slide-content .slide-subtitle br {
        display: none;
    }

    .home-slider .slide-title {
        font-size: 2.8rem;
    }

    .home-slider .slide-content .slide-subtitle {
        font-size: 1.4rem;
    }

    .home-slider .slide-button {
        font-size: 1.2rem;
    }

    .home-slider .slide-content {
        position: absolute;
        left: 6%;
        bottom: auto;
        top: 35%;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .home-slider {
        height: 100vh;
        min-height: 100vh;
        height: 100dvh;
        min-height: 100dvh;
    }

    .home-slider .slide-media img {
        height: 100%;
    }

    .home-slider .slide-media::before {
background: linear-gradient(
  to top,
  rgba(0, 0, 0, 0.45) 0%,
  rgba(0, 0, 0, 0.18) 40%,
  rgba(0, 0, 0, 0) 100%
);
    }

    .home-slider .slide-content .slide-subtitle br {
        display: none;
    }

    .home-slider .slide-content .slide-subtitle:before {
        width: 2px;
        height: 100%;
        top: 0;
        left: 0;
    }

    .home-slider .slide-title {
        font-size: 2.2rem;
    }

    .home-slider .slide-content .slide-subtitle {
        font-size: 1.2rem;
        padding-left: 20px;
    }

    .home-slider .slide-button {
        font-size: 1.1rem;
    }

    .home-slider .slide-nav {
        width: 60px;
        height: 60px;
    }

    .home-slider .slide-nav img {
        width: 20px;
    }

    .home-slider .slide-content {
        max-width: 85%;
        padding: 1rem;
    }
}

@media screen and (min-width: 1366px) and (max-width: 2000px) {
    .home-slider .slide-content {
        position: absolute;
        left: 6%;
        bottom: auto;
        top: 35%;
    }
}

.home-slider .slide.has-video.video-control-anchor {
    position: relative;
}

.home-slider .slide.has-video .slide-video-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    z-index: 20;
}

.home-slider .slide.has-video .slide-video-control-icon {
    display: block;
    width: 70px;
    height: 70px;
    box-sizing: border-box;
    object-fit: contain;
    border: 1px solid var(--e-global-color-ec713e4);
    padding: 17px;
    border-radius: 50%;
}

.home-slider .slide.has-video .slide-navs {
    position: relative;
}

.home-slider .slide.has-video .slide-pause-btn {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 20;
    display: none;
    width: 70px;
    height: 70px;
    border-radius: 0;
    opacity: 1;
    visibility: visible;
}

@media screen and (max-width: 768px) {
    .home-slider .slide.has-video .slide-video-control-icon {
        width: 60px;
        height: 60px;
    }

    .home-slider .slide.has-video .slide-pause-btn {
        width: 60px;
        height: 60px;
    }
}

.home-slider .slide.has-video.video-playing .slide-play-btn {
    visibility: hidden !important;
    pointer-events: none;
}

.home-slider .slide.has-video.video-playing .slide-pause-btn {
    display: inline-flex;
}