/**
 * Styles Frontend pour le plugin Bannières
 * 
 * Styles complets pour fonctionner avec ou sans Divi
 */

/* Assurer la compatibilité avec les styles Divi existants */
.sbcd-banniere-wrapper .et_pb_slider,
.sbcd-banniere-wrapper .et_pb_section {
    margin-bottom: 0;
}

/* Structure de base du slider */
.et_pb_slider {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.et_pb_slides {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Masquer les slides non actifs */
.et_pb_slider .et_pb_slide {
    display: none;
    float: left;
    margin-right: -100%;
    position: relative;
    width: 100%;
    text-align: center;
    list-style: none !important;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    /* min-height sera géré par JavaScript selon le contenu */
}

.et_pb_slider .et_pb_slide:first-child,
.et_pb_slider .et_pb_slide.et-pb-active-slide {
    display: list-item;
}

/* Rendre les slides temporaires visibles pour le calcul de hauteur */
.et_pb_slides .et_pb_temp_slide {
    display: block;
}

.et_pb_slides:after {
    content: "";
    display: block;
    clear: both;
    visibility: hidden;
    line-height: 0;
    height: 0;
    width: 0;
}

/* Container et contenu - Styles Divi */
.et_pb_slider .et_pb_container {
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.et_pb_fullwidth_post_slider.et_pb_slider .et_pb_container {
    width: 80%;
    max-width: 1080px;
}

.et_pb_slides .et_pb_container {
    display: table;
    table-layout: fixed;
}

.et_pb_slides .et_pb_slider_container_inner {
    display: table-cell;
    width: 100%;
    vertical-align: middle;
}

.et_pb_slide_description {
    word-wrap: break-word;
    padding: 16% 8%;
    width: auto;
    margin: auto;
    text-align: left;
}

/* Animation fadeBottom pour la description du slide actif */
@-webkit-keyframes fadeBottom {
    0% {
        -webkit-transform: translate3d(0, 100%, 0);
        transform: translate3d(0, 100%, 0);
        opacity: 0;
    }
    to {
        opacity: 1;
        -webkit-transform: none;
        transform: none;
    }
}

@keyframes fadeBottom {
    0% {
        -webkit-transform: translate3d(0, 100%, 0);
        transform: translate3d(0, 100%, 0);
        opacity: 0;
    }
    to {
        opacity: 1;
        -webkit-transform: none;
        transform: none;
    }
}

.et-pb-active-slide .et_pb_slide_description {
    -webkit-animation-duration: 0.7s;
    animation-duration: 0.7s;
    -webkit-animation-delay: 0.9s;
    animation-delay: 0.9s;
    -webkit-animation-timing-function: ease-in-out;
    animation-timing-function: ease-in-out;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    -webkit-animation-name: fadeBottom;
    animation-name: fadeBottom;
}

.et_pb_slide_description .et_pb_slide_title {
    font-weight: 300;
    margin-top: 0;
    font-size: 46px;
    line-height: 1.2em;
}

.et_pb_slide_title a {
    color: inherit;
    text-decoration: none;
}

.et_pb_slide_content {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 0;
}

.et_pb_slide_content p:last-of-type {
    padding-bottom: 0;
}

/* Flèches de navigation */
.et-pb-slider-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.et_pb_slider:hover .et-pb-slider-arrows {
    opacity: 1;
}

.et-pb-slider-arrows a {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 20px;
    pointer-events: all;
    transition: background-color 0.3s ease;
}

.et-pb-slider-arrows a:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.et-pb-arrow-prev {
    left: 20px;
}

.et-pb-arrow-next {
    right: 20px;
}

.et-pb-slider-arrows a span {
    text-indent: -9999px;
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
}

.et-pb-arrow-prev span {
    border-width: 8px 12px 8px 0;
    border-color: transparent #fff transparent transparent;
    margin-left: -4px;
}

.et-pb-arrow-next span {
    border-width: 8px 0 8px 12px;
    border-color: transparent transparent transparent #fff;
    margin-right: -4px;
}

/* Points de contrôle */
.et-pb-controllers {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.et-pb-controllers a {
    display: inline-block;
    background-color: hsla(0, 0%, 100%, 0.5);
    text-indent: -9999px;
    border-radius: 7px;
    width: 7px;
    height: 7px;
    margin-right: 10px;
    padding: 0;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.et-pb-controllers a:last-child {
    margin-right: 0;
}

.et-pb-controllers .et-pb-active-control {
    opacity: 1;
    background-color: #fff;
}

.et-pb-controllers a:hover {
    opacity: 0.8;
}

/* Bouton "Lire l'article" - Styles Divi */
.et_pb_module.et_pb_button {
    display: inline-block;
    color: inherit;
}

.et_pb_slide_description .et_pb_more_button {
    display: inline-block;
    margin-top: 20px;
}

/* Styles pour les cartes - Utilisation des styles Divi natifs */
/* Les styles sont gérés par Divi, on ajoute juste le minimum nécessaire pour l'image de fond */
.sbcd-banniere-wrapper .et_pb_column[style*="background-image"] {
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sbcd-banniere-wrapper .et_pb_column[style*="background-image"] .et_pb_module {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Responsive */
@media (max-width: 980px) {
    .et-pb-controllers {
        bottom: 5%;
    }
}

@media (max-width: 768px) {
    .sbcd-banniere-wrapper .et_pb_column {
        margin-bottom: 20px;
    }
    
    .et-pb-slider-arrows a {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .et-pb-arrow-prev {
        left: 10px;
    }
    
    .et-pb-arrow-next {
        right: 10px;
    }
    
    .et_pb_slide .et_pb_container {
        width: 90%;
    }
    
    /* Responsive pour les cartes */
    .sbcd-banniere-wrapper .et_pb_column[style*="background-image"] {
        min-height: 250px;
        padding: 15px;
    }
}


