/* Wrapper global du slider – on reprend ton style MotoPress */
.ag-slider-wrapper {
    position: relative;
    overflow: hidden;
    max-width: 100%;
    max-height: 680px;
    background-color: #d6d9dc;
    margin-top: -293px; /* si tu veux toujours compenser ton header */
    font-family: 'Archer Medium';
    color: white;
    font-weight: bolder;
    text-shadow: #FFF 0px 0px 20px,
                 #0d1e2f 0px 0px 30px,
                 #0d1e2f 0px 0px 40px,
                 #0d1e2f 0px 0px 50px,
                 #0d1e2f 0px 0px 75px;
}
@media screen and (max-width: 767px) {
    .ag-slider-wrapper {
        max-height: 325px;
    }
}


/* Ancienne classe recyclée pour compat */
.motoslider_wrapper h1,
.ag-slide-title {
    font-family: 'Archer Medium';
    color: white;
    font-weight: bolder;
    text-shadow: #FFF 0px 0px 40px,
                 #0d1e2f 0px 0px 50px,
                 #0d1e2f 0px 0px 75px;
}

/* Conteneur interne */
.ag-slider {
    position: relative;
}

/* Chaque slide */
.ag-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.ag-slide.ag-slide-active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

/* Image (avec ton filtre) */
.ag-slide-image {
    width: 100%;
    height: 680px;
    overflow: hidden;
}
@media screen and (max-width: 767px) {
    .ag-slide-image {
        height: 360px;
    }
}


.ag-slide-image img,
.ms_image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: opacity(60%);
    -webkit-filter: opacity(60%);
}
@media screen and (max-width: 767px) {
    .ag-slide-image img, 
    .ms_image img {
        object-fit: contain;
        object-position: bottom;
    }
}


/* Bloc texte superposé */
.ag-slide-content {
    position: absolute;
    top: 65%;
    left: 50%;
    /* On le remonte un peu pour qu’il soit visuellement entre header et bas du slide */
    transform: translate(-50%, -55%);
    max-width: 80%;
    padding: 15px 20px;
    border-radius: 0;
    background: none;
    text-align: center;
}

/* Texte */
/* Titre du slide = même logique que #page-sub-header h1 */
.ag-slide-title {
    line-height: 1.6;
    /* taille fluide : min 2rem, max 4rem, en fonction de la largeur */
    font-size: clamp(2rem, 3vw + 1rem, 4rem);
    font-family: 'Archer Medium';
    margin: 0;
    border: 0;
    padding: 0;
}

/* Tu peux garder ce media si tu veux coller à ton header */
@media screen and (min-width: 768px) {
    .ag-slide-title {
        font-size: clamp(2.5rem, 3vw + 1rem, 3.75rem);
    }
}

.ag-slide-text {
    font-size: 1.25rem;
    text-align: center;
}

@media screen and (max-width: 767px) {
    .ag-slide-content {
        display: none; /* sur mobile, on ne garde que l’image */
    }
}


/* Bouton – repris de ton CSS */
.ag-slider-wrapper a {
    color: #53b8ba;
    border: 2px solid #fff !important;
    font-family: 'Arial';
    font-size: medium;
    padding: 10px 59px;
    display: inline-block;
    transition: all 0.3s ease;
    text-shadow: none;
    background: white;
    border: white;
}

.ag-slider-wrapper a:hover {
    background-color: #fff;
    border: 2px solid #fff !important;
    color: #0d1d2f;
    -webkit-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
    text-decoration: none;
}

/* Masquer ancien bouton d’édition éventuel */
.ag-slider-wrapper:hover .mpsl-edit-btn {
    display: none !important;
    opacity: 0 !important;
}

/* Navigation */
.ag-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    padding: 8px 12px;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
}

.ag-slider-prev {
    left: 10px;
}

.ag-slider-next {
    right: 10px;
}

/* Dots */
.ag-slider-dots {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
}

.ag-slider-dots button {
    border: none;
    width: 10px;
    height: 10px;
    margin: 0 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
}

.ag-slider-dots button.ag-dot-active {
    background: #fff;
}

/* État par défaut : invisible */
.ag-slide-content {
    opacity: 0;
    transition: opacity 0.8s ease;
}

/* Quand le slide devient actif → fade in */
.ag-slide-active .ag-slide-content {
    opacity: 1;
}
/* Caché par défaut pour éviter le flash */
.ag-slider-nav {
    display: none;
}

