/* ==========================================================================
   GLAMEETO - AGENDA SLIDER V2 (TITRE & SOUS-TITRE)
   ========================================================================== */

.glameeto-agenda-section {
    position: relative !important;
    overflow: hidden !important;
    width: 100%;
    padding: 80px 0;
    box-sizing: border-box;
}

.glameeto-agenda-section a, 
.glameeto-agenda-section a:hover {
    text-decoration: none;
}

.glameeto-agenda-section .icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    stroke-width: 0;
    stroke: currentColor;
    fill: currentColor;
}

/* Fond dégradé confiné */
.agenda-background {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 0;
    
    /* On garde l'image de fond */
    background-size: cover;
    background-position: center;
    
    /* Le secret pour superposer la couleur : */
    background-blend-mode: multiply; /* ou 'overlay' selon l'effet voulu */
}
/* Masque de focus blanc dynamique */
.item-bg {
    width: 300px;
    height: 500px;
    position: absolute;
    top: 0;
    left: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 26px 6px rgba(0,0,0,0.25);
    opacity: 0;
    transition: all 0.3s ease-out;
    z-index: 1;
    pointer-events: none;
}

.item-bg.active {
    opacity: 1;
}

/* Structure du Slider */
.news-slider {
    z-index: 2;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
}
.news-slider__item.swiper-slide-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
}

@media screen and (max-width: 1300px) {
    .news-slider { max-width: 1000px; }
}
@media screen and (max-width: 576px) {
    .news-slider { padding: 0 15px; }
}

.news-slider__wrp {
    display: flex;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   MODIFICATION 1 : Affichage des 3 slides sur PC
   ========================================================================== */
.news-slider__item {
    width: 33.3333%; /* Remplace l'ancien 400px pour afficher 3 cartes pile sur PC */
    flex-shrink: 0;
}
@media screen and (max-width: 992px) {
    .news-slider__item { width: 340px; } /* Format mobile inchangé */
}

.news-slider__item.swiper-slide {
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
}

.news-slider__item.swiper-slide-active,
.news-slider__item.swiper-slide-prev,
.news-slider__item.swiper-slide-next {
    opacity: 1;
    pointer-events: auto;
}

/* Contenu de la Carte */
.news__item {
    padding: 40px;
    color: #fff;
    border-radius: 10px;
    display: block;
    transition: all 0.3s;
    position: relative;
    z-index: 3;
}
@media screen and (max-width: 992px) {
    .news__item { padding: 30px; }
}
@media screen and (max-width: 576px) {
    .news__item { padding: 20px; }
    .glameeto-agenda-section {
        padding-bottom:60px;
        padding-top:60px;
    }
}

/* Hovers et États Actifs */
@media screen and (min-width: 800px) {
    .news__item:hover {
        color: #222222;
        transition-delay: 0.1s;
    }
    .news__item:hover .news__main-title,
    .news__item:hover .news__subtitle,
    .news__item:hover .news__txt {
        opacity: 1;
        transition-delay: 0.1s;
    }
    .news__item:hover .news__img {
        box-shadow: none;
    }
}

.news__item.active {
    color: #222222;
}
.news__item.active .news__main-title,
.news__item.active .news__subtitle,
.news__item.active .news__txt {
    opacity: 1;
}
.news__item.active .news__img {
    box-shadow: none;
}

/* Titre Principal */
.news__main-title {
    font-size: 32px;
    font-weight: 500;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 2px solid;
    display: block;
    opacity: 0.8;
    transition: opacity 0.3s;
    line-height: 1.2;
}
@media screen and (max-width: 576px) {
    .news__main-title {
        font-size: 26px;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
    .agenda-header {display:none;}
}

/* Sous-Titre */
.news__subtitle {
    font-size: 20px;
    font-weight: 500;
    opacity: 0.7;
    margin-top: 5px;
    margin-bottom: 15px;
    transition: opacity 0.3s;
    line-height: 1.3;
}
@media screen and (max-width: 576px) {
    .news__subtitle { font-size: 18px; margin-bottom: 10px; }
}

/* Description */
.news__txt {
    margin: 10px 0;
    line-height: 1.6em;
    font-size: 15px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

/* Image de la carte */
.news__img {
    border-radius: 10px;
    box-shadow: 0 6px 26px 6px rgba(0,0,0,0.25);
    height: 200px;
    margin-top: 30px;
    width: 100%;
    transition: all 0.3s;
    transform-origin: 0% 0%;
}
@media screen and (max-width: 576px) {
    .news__img { height: 180px; margin-top: 20px; }
}
.news__img img {
    max-width: 100%;
    border-radius: 10px;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* Éléments de Navigation & Pagination */
.news-slider__ctr {
    position: relative;
    z-index: 12;
}

.news-slider__arrow {
    background: #fff;
    border: none;
    display: inline-flex;
    width: 50px;
    height: 50px;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 26px 6px rgba(0,0,0,0.25);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    z-index: 12;
    cursor: pointer;
    outline: none !important;
}
.news-slider__arrow .icon-font {
    display: inline-flex;
}
.news-slider__arrow.news-slider-prev {
    left: 15px;
    transform: translateY(-50%);
}
.news-slider__arrow.news-slider-next {
    right: 15px;
    transform: translateY(-50%);
}

.news-slider__pagination {
    text-align: center;
    margin-top: 20px;
}
.news-slider__pagination .swiper-pagination-bullet {
    width: 13px;
    height: 10px;
    display: inline-block;
    background: #fff;
    opacity: 0.2;
    margin: 0 5px;
    border-radius: 20px;
    transition: opacity 0.5s, background-color 0.5s, width 0.5s;
    transition-delay: 0.5s, 0.5s, 0s;
}
.news-slider__pagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: #ffffff;
    width: 100px;
    transition-delay: 0s;
}
@media screen and (max-width: 576px) {
    .news-slider__pagination .swiper-pagination-bullet-active { width: 70px; }
}

/* ==========================================================================
   MODIFICATION 2 : Masquer la navigation sur PC si moins de 3 éléments
   ========================================================================== */
@media screen and (min-width: 993px) {
    .news-slider:not(:has(.news-slider__item:nth-child(3))) .news-slider__ctr {
        display: none !important;
    }
}

/* ==========================================================================
   URBANISATION STRUCTURELLE - AGENDA SLIDER (COHÉRENCE BOOMERANG)
   ========================================================================== */

/* --- CONFIGURATION DESKTOP (Grands écrans) --- */
@media (min-width: 992px) {
    
    /* L'APLAT AGENDA : On transforme le bloc header en aplat noir absolu */
    .glameeto-agenda-section .agenda-header {
        position: absolute !important;
        top: 0 !important;
        width: 480px !important;
        height: 50% !important;
        background: #1e1e1e !important;
        padding: 80px 45px !important;
        box-sizing: border-box !important;
        z-index: 10 !important;
        text-align: left !important;
        margin-bottom: 0 !important;
        
        /* État initial masqué (Effet Parachute) */
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    }

    /* Style du titre à l'intérieur de l'aplat */
    .glameeto-agenda-section .agenda-header .agenda-main-title {
        font-size: 34px !important;
        font-weight: 900 !important;
        color: #ffffff !important;
        line-height: 1.2 !important;
        text-transform: uppercase !important;
        margin: 0 !important;
    }

    /* Alignement de l'aplat à GAUCHE */
    .glameeto-agenda-section.align-left .agenda-header {
        left: 100px !important;
        right: auto !important;
    }
    
    /* Alignement de l'aplat à DROITE */
    .glameeto-agenda-section.align-right .agenda-header {
        right: 100px !important;
        left: auto !important;
    }

    /* Déclenchement de l'animation de descente au scroll */
    .glameeto-agenda-section.scroll-visible .agenda-header {
        transform: translateY(0) !important;
        opacity: 1 !important;
    }

    /* PROTECTION DU SLIDER : On décale Swiper pour éviter qu'il chevauche l'aplat */
    .glameeto-agenda-section .news-slider {
        position: relative;
        z-index: 5;
    }

    /* CORRIGÉ : Si l'aplat est à gauche, on pousse de 25px supplémentaires à gauche (580px + 25px = 605px) */
    .glameeto-agenda-section.align-left .news-slider {
        padding-left: 605px !important;
        padding-right: 10px !important;
    }

    /* CORRIGÉ : Si l'aplat est à droite, on pousse de 25px supplémentaires à droite (580px + 25px = 605px) */
    .glameeto-agenda-section.align-right .news-slider {
        padding-right: 605px !important;
        padding-left: 10px !important;
    }

} /* <--- L'ACCOLADE CORRECTEMENT REFERMÉE ICI POUR ISOLER LE DESKTOP */

/* ==========================================================================
   VERSION MOBILE (ISOLEMENT ET REMISE EN PLACE ISO)
   ========================================================================== */
@media (max-width: 991px) {
    .glameeto-agenda-section .agenda-header {
        position: relative !important;
        text-align: center !important;
        margin-bottom: 30px;
        transform: none !important;
        opacity: 1 !important;
        width: 100% !important;
        height: auto !important;
        background: transparent;
        padding: 0 20px;
    }
    
    .glameeto-agenda-section .news-slider {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 auto !important;
    }
}

/* ==========================================================================
   MISE EN VALEUR PREMIUM ET CORRECTION DU TEXTE BLANC
   ========================================================================== */


/* Style de secours pour le sous-titre quand il n'est pas actif (sur fond dégradé) */
.agenda-subtitle {
    color: #ffffff;
}
.news-slider__item.swiper-slide-active .news__subtitle,
.news-slider__item.swiper-slide-visible .news__subtitle {
    color: #ff9800 !important;
    background: rgba(255, 152, 0, 0.12) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
    font-size: 13px !important;
    padding: 4px 14px !important;
    border-radius: 50px !important;
    display: inline-block !important;
    margin-top: 5px !important;
    margin-bottom: 15px !important;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.05) !important;
}

/* 1. Style de base du bouton (quand il est actif) */
.news-slider__arrow {
    opacity: 1;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 2. Style quand le bouton est désactivé (quand il y a 3 items ou moins sur PC) */
.news-slider__arrow.swiper-button-disabled {
    opacity: 0 !important;       /* On le rend invisible */
    cursor: default !important;  /* On change le curseur */
    pointer-events: none;        /* On bloque le clic */
}

/* 1. Cibler uniquement les items qui NE sont PAS actifs */
.news-slider__item:not(.active) .news__item {
    /* Ajout d'un fond blanc avec opacité 0.2 */
    background-color: rgba(255, 255, 255, 0.2) !important;
    
    /* Optionnel : ajouter des bordures arrondies pour que ça fasse "propre" */
    border-radius: 10px;
    
    /* Optionnel : un peu de transition pour éviter que ça clignote */
    transition: background-color 0.3s ease !important;
}

/* 2. S'assurer que l'élément ACTIF garde son style normal (sans ce fond semi-transparent) */
.news-slider__item.active .news__item {
    background-color: transparent !important; /* Ou la couleur que tu as définie pour l'actif */
}

