/* ==========================================================================
   CHJ Hero Slider — Styles
   Remplacement du Revolution Slider pour Charente Habitat Jeunes
   ========================================================================== */

/* ---------- Container ---------- */
.chj-hero-slider {
    position: relative;
    width: 100%;
    height: 720px;
    overflow: hidden;
}

.chj-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ---------- Slides ---------- */
.chj-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.chj-slide.active {
    opacity: 1;
    z-index: 2;
    transform: translateX(0);
    pointer-events: auto;
}

/* Background image */
.chj-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* ---------- Slide content ---------- */
.chj-slide-content {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
    max-width: 1290px;
    margin: 0 auto;
    padding: 0 60px;
    box-sizing: border-box;
}

/* Title */
.chj-slide-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 70px;
    line-height: 80px;
    font-weight: 700;
    color: #ffffff;
    text-align: left;
    margin: 0 0 10px 0;
    padding: 0;
    white-space: normal;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Subtitle */
.chj-slide-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 30px;
    line-height: normal;
    font-weight: 400;
    color: #ffffff;
    text-align: left;
    margin: 0 0 30px 0;
    padding: 0;
    white-space: nowrap;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* CTA Button */
.chj-slide-btn {
    display: inline-block;
    font-family: 'Open Sans', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    background-color: #e22e86;
    border: none;
    border-radius: 3px;
    padding: 15px 50px;
    cursor: pointer;
    text-decoration: none;
    text-align: left;
    transition: background-color 0.2s ease;
}

.chj-slide-btn:hover,
.chj-slide-btn:focus {
    background-color: #c4276d;
    color: #ffffff;
    text-decoration: none;
}

/* ---------- Transitions (sliding overlay horizontal) ---------- */
.chj-slide.slide-in-next {
    opacity: 1;
    z-index: 3;
    pointer-events: none;
    animation: chjSlideInFromRight 800ms ease-in-out forwards;
}

.chj-slide.slide-in-prev {
    opacity: 1;
    z-index: 3;
    pointer-events: none;
    animation: chjSlideInFromLeft 800ms ease-in-out forwards;
}

@keyframes chjSlideInFromRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

@keyframes chjSlideInFromLeft {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}

/* ---------- Navigation arrows (Persephone style) ---------- */
.chj-slider-arrow {
    cursor: pointer;
    background: rgba(0, 0, 0, 0.75);
    width: 62px;
    height: 62px;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0);
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    transition: background-color 0.3s ease;
}

.chj-arrow-prev { left: 30px; }
.chj-arrow-next { right: 30px; }

.chj-slider-arrow:hover {
    background: #ff7024;
}

.chj-slider-arrow svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Responsive — Tablet (≤1239px)
   RevSlider level 2: gridwidth 1024, gridheight 700
   ========================================================================== */
@media (max-width: 1239px) {
    .chj-hero-slider {
        height: 700px;
    }

    .chj-slide-content {
        max-width: 1024px;
        padding: 0 50px;
    }

    .chj-slide-title {
        font-size: 60px;
        line-height: 80px;
    }

    .chj-slide-subtitle {
        font-size: 25px;
    }
}

/* ==========================================================================
   Responsive — Small tablet (≤1023px)
   RevSlider level 3: gridwidth 778, gridheight 600
   ========================================================================== */
@media (max-width: 1023px) {
    .chj-hero-slider {
        height: 600px;
    }

    .chj-slide-content {
        max-width: 778px;
        padding: 0 40px;
    }

    .chj-slide-title {
        font-size: 50px;
        line-height: 80px;
    }

    .chj-slide-subtitle {
        font-size: 25px;
    }

    .chj-slide-btn {
        padding: 20px 35px;
    }

    .chj-arrow-prev { left: 15px; }
    .chj-arrow-next { right: 15px; }
}

/* ==========================================================================
   Responsive — Mobile (≤777px)
   RevSlider level 4: gridwidth 480, gridheight 480
   ========================================================================== */
@media (max-width: 777px) {
    .chj-hero-slider {
        height: 480px;
    }

    .chj-slide-content {
        max-width: 480px;
        padding: 0 25px;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .chj-slide-title {
        font-size: 30px;
        line-height: 52px;
        text-align: center;
    }

    .chj-slide-subtitle {
        font-size: 15px;
        line-height: 30px;
        text-align: center;
        white-space: normal;
    }

    .chj-slide-btn {
        padding: 20px 35px;
        text-align: center;
    }

    /* Hide arrows on mobile — swipe only */
    .chj-slider-arrow {
        display: none;
    }
}
