/**
 * Styles pour le widget Brand Active Offer
 * Design split jaune/blanc avec barre d'accent
 */

/* Container des offres */
.on-offers-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

/* Carte d'offre */
.on-offer-card {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.on-offer-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Layout split */
.on-offer-content {
    display: grid;
    grid-template-columns: 40% 60%;
    min-height: 280px;
}

/* Zone jaune (gauche) */
.on-offer-left {
    background-color: #F4F285;
    padding: 20px 40px;
    display: grid;
    place-content: center; /* Centre le groupe verticalement et horizontalement */
    justify-items: start;  /* Mais les éléments sont alignés à gauche entre eux */
}

.on-offer-label {
    font-family: "Sharp Grotesk";
    font-size: 15px;
    font-weight: 400;
    color: #000;
    margin-bottom: 5px;
    text-transform: none;
}

.on-offer-value {
    font-family: "Sharp Grotesk";
    font-size: 40px;
    font-weight: 900;
    line-height: 1;
    color: #000;
    margin: 0;
}

/* Zone blanche (droite) */
.on-offer-right {
    background-color: #fff;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.on-offer-dates {
    font-family: "Muli", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #999;
    margin-bottom: 5px;
    text-transform: none;
}

.on-offer-title {
    font-family: "Muli", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 25px;
    font-weight: 900;
    line-height: 1.2;
    color: #000;
    margin: 0 0 20px 0;
}
.on-offer-title::after {
    content: '';
    background-color: #FEFC8D;
    width: 70px;
    height: 5px;
    display: block;
    margin-top: 5px;
}

.on-offer-text {
    font-family: "Muli", sans-serif;
    font-size: 15px;
    font-weight: 200;
    line-height: 1.2;
    color: #666;
    margin-bottom: 30px;
}

.on-offer-text p {
    margin: 0 0 10px 0;
}

.on-offer-text p:last-child {
    margin-bottom: 0;
}

/* Boutons de partage */
.on-offer-share {
    display: flex;
    gap: 5px;
    margin-top: auto;
}

.on-offer-share a.on-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: transparent;
    color: #d8d8d8;
    fill: #d8d8d8;
    transition: all 0.3s ease;
    text-decoration: none;
}

a.on-share-btn svg {
    width: 25px;
    height: 25px;
}

.on-offer-share a.on-share-twitter:hover {
    color: #000;
    fill: #000;
}

.on-offer-share a.on-share-facebook:hover {
    color: #000;
    fill: #000;
}

.on-offer-share a.on-share-email:hover {
    color: #000;
    fill: #000;
}

/* Barre d'accent jaune en bas */
.on-offer-accent {
    height: 4px;
    background-color: #F4F285;
    width: 100%;
}

/* ========================================
   Slider Swiper (2+ offres)
   ======================================== */

/* Container principal du slider : flèches en position absolue */
.on-offers-slider {
    position: relative;
    width: 100%;
    padding: 0 50px;
    box-sizing: border-box;
}

/* Container Swiper */
.on-offers-swiper {
    overflow: hidden;
    position: relative;
}

/* Masquer TOUS les boutons Swiper par défaut */
.on-offers-swiper .swiper-button-prev,
.on-offers-swiper .swiper-button-next {
    display: none !important;
}

/* Padding sur les slides pour laisser l'ombre visible */
.on-offers-swiper .swiper-slide {
    height: auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Flèches custom positionnées en absolu à gauche et à droite */
.on-slider-prev,
.on-slider-next {
    position: absolute;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
    padding: 0;
    outline: none;
    width: 2.6em;
    height: 4.2em;
}

.on-slider-prev {
    left: -10px;
    top: 50%;
    -webkit-transform: translateY(-50%) rotate(180deg);
    -ms-transform: translateY(-50%) rotate(180deg);
    transform: translateY(-50%) rotate(180deg);
}

.on-slider-next {
    right: -10px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
}

.on-slider-prev:hover,
.on-slider-next:hover,
.on-slider-prev:focus,
.on-slider-next:focus {
    opacity: 0.5;
    background-color: transparent;
    color: inherit;
    text-decoration: none;
}

.on-slider-prev svg.flickity-button-icon,
.on-slider-next svg.flickity-button-icon {
    width: 100%;
    height: 100%;
    fill: #000;
    left: -20px;
    top: 0px;
}

/* Notice (si erreur) */
.on-offer-notice {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-size: 14px;
}

/* Responsive - Tablette */
@media (max-width: 1024px) {
    .on-offer-content {
        grid-template-columns: 1fr;
    }

    .on-offer-left,
    .on-offer-right {
        padding: 40px 30px;
    }

    .on-offer-value {
        font-size: 60px;
    }

    .on-offer-title {
        font-size: 28px;
    }
}

/* Responsive - Tablette : slider */
@media (max-width: 1024px) {
    .on-slider-prev svg,
    .on-slider-next svg {
        width: 22px;
        height: 10px;
    }

    .on-offers-slider {
        padding: 0 40px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .on-offers-wrapper {
        gap: 20px;
    }

    /* Sur mobile : pas de flèches, swipe tactile + pagination */
    .on-slider-prev,
    .on-slider-next {
        display: none;
    }

    .on-offers-slider {
        padding: 0;
    }

    .on-offers-swiper .swiper-slide {
        padding: 10px;
    }

    .on-offer-content {
        min-height: auto;
    }

    .on-offer-left {
        padding: 40px 25px;
        text-align: center;
        align-items: center;
    }

    .on-offer-right {
        padding: 30px 25px;
    }

    .on-offer-value {
        font-size: 50px;
    }

    .on-offer-title {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .on-offer-text {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .on-offer-share {
        justify-content: flex-start;
    }

    .on-share-btn {
        width: 36px;
        height: 36px;
    }

    .on-share-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Animation d'apparition */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.on-offer-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Compatibilité mode édition Elementor */
.elementor-editor-active .on-offer-card {
    animation: none;
}
