/**
 * Mansa Explorer Block - Styles
 * Version: 1.1.9
 */

 :root {
    --explorer-primary: #000;
    --explorer-secondary: #fff;
    --explorer-gray-light: #f5f5f5;
    --explorer-gray: #e0e0e0;
    --explorer-gray-dark: #ccc;
    --explorer-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    --explorer-shadow-hover: 0px 0px 20px rgba(0, 0, 0, 0.2);
    --explorer-transition: all 0.3s ease;
    --trait-color: #999999;
}

.kl-section-block-explorer {
    padding: clamp(2.5rem, 5vw, 3.75rem) 0;
    width: 100%;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.kl-filter-header {
    margin-bottom: 2.5rem;
}

.kl-filter-header h2 {
    font-family: 'Degular Text', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
    font-weight: 400;
    color: var(--explorer-primary);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2rem);
}

.kl-filter-header h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--trait-color);
    opacity: 1;
}

@media (max-width: 767px) {
    .kl-filter-header h2 {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }
    .kl-filter-header h2::after {
        width: 15px;
    }
}

@media (max-width: 375px) {
    .kl-filter-header h2::after {
        width: 12px;
    }
}

.kl-explorer-filters-wrap {
    display: flex;
    gap: clamp(0.625rem, 2vw, 0.9375rem);
    flex-wrap: wrap;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    align-items: center;
}

/* Style des boutons de filtre */
.kl-btn-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #FFFFFF;
    border: 1px solid #000000;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    color: #666666;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    text-decoration: none;
    outline: none;
    box-shadow: none;
    line-height: 1.6;
    font-family: inherit;
}

/* Icônes dans les boutons de filtre : 14px */
.kl-btn-secondary .mansa-icon {
    flex-shrink: 0;
    transition: var(--explorer-transition);
    width: 14px;
    height: 14px;
    color: currentColor;
}

.kl-btn-secondary.kl-btn-white {
    border-color: #000000;
    background: #FFFFFF;
    color: #666666;
}

.kl-btn-secondary.kl-btn-white:hover,
.kl-btn-secondary.kl-btn-white.active {
    background: #000000;
    color: #FFFFFF;
}

.kl-btn-secondary.kl-btn-white:hover .mansa-icon,
.kl-btn-secondary.kl-btn-white.active .mansa-icon {
    color: #FFFFFF;
}

/* Bouton "Toutes les publications" */
.kl-view-all-btn {
    text-decoration: none;
}

.kl-view-all-btn .mansa-icon {
    margin-left: 0.5rem;
    /* Taille conservée (20px par défaut) */
}

/* Swiper Container */
.kl-explorer-listing {
    position: relative;
    width: 100%;
}

.kl-explorer-listing .swiper {
    overflow: visible;
    padding: 0.5rem 0;
    margin: -0.5rem 0;
    position: relative;
}

.kl-explorer-listing .swiper-wrapper {
    display: flex;
}

.kl-explorer-listing .swiper-slide {
    width: 350px;
    height: auto;
    transition: var(--explorer-transition);
}

/* Cartes */
.kl-explorer-wrap {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--explorer-secondary);
    box-shadow: var(--explorer-shadow);
    transition: var(--explorer-transition);
    overflow: hidden;
}

.kl-explorer-wrap:hover {
    box-shadow: var(--explorer-shadow-hover);
    transform: translateY(-2px);
}

.kl-explorer-link {
    position: relative;
    display: block;
    width: 100%;
    text-decoration: none;
}

.kl-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--explorer-gray-light) 0%, var(--explorer-gray) 100%);
}

.kl-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    will-change: transform;
}

.kl-explorer-wrap:hover .kl-image-container img {
    transform: scale(1.05);
}

.kl-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--explorer-gray-light) 0%, var(--explorer-gray) 100%);
    display: block;
}

/* Icône de coin : 20px */
.kl-corner-icon-wrapper {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 3;
    background-color: #ffffff;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.kl-corner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.kl-corner-icon .mansa-icon {
    color: #000000;
    width: 20px;
    height: 20px;
}

.kl-explorer-wrap:hover .kl-corner-icon-wrapper {
    background-color: #ffffff;
}

.kl-explorer-wrap:hover .kl-corner-icon .mansa-icon {
    color: #000000;
}

.kl-explorer-caption {
    padding: clamp(0.75rem, 2vw, 0.9375rem);
    background: var(--explorer-secondary);
}

.kl-explorer-caption--title {
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 700;
    line-height: 1.4;
    color: var(--explorer-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Flèches de navigation */
.kl-explorer-arrow.swiper-button-prev,
.kl-explorer-arrow.swiper-button-next {
    border-radius: 0;
    background-color: #fff;
    border: 1px solid #000;
    color: #000;
    width: 65px;
    height: 65px;
    margin-top: 0;
    top: 50%;
    transform: translateY(-50%);
    position: absolute;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--explorer-transition);
    font-size: 0;
}

.kl-explorer-arrow.swiper-button-prev {
    left: 10px;
    right: auto;
}

.kl-explorer-arrow.swiper-button-next {
    right: 10px;
    left: auto;
}

.kl-explorer-arrow.swiper-button-prev:hover,
.kl-explorer-arrow.swiper-button-next:hover {
    background-color: #000;
    color: #fff;
}

.kl-explorer-arrow.swiper-button-prev::after,
.kl-explorer-arrow.swiper-button-next::after {
    display: none;
}

.kl-explorer-arrow.swiper-button-prev::before {
    content: "<";
    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px;
    font-weight: normal;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.kl-explorer-arrow.swiper-button-next::before {
    content: ">";
    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px;
    font-weight: normal;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.kl-explorer-arrow.swiper-button-prev.swiper-button-disabled,
.kl-explorer-arrow.swiper-button-next.swiper-button-disabled {
    opacity: 0;
    cursor: auto;
    pointer-events: none;
    visibility: hidden;
}

.kl-explorer-navs {
    position: relative;
    margin-top: clamp(1.5rem, 3vw, 1.875rem);
}

.kl-explorer-navs .swiper-pagination-bullet {
    width: clamp(0.625rem, 1.5vw, 0.75rem);
    height: clamp(0.625rem, 1.5vw, 0.75rem);
    background: var(--explorer-gray-dark);
    opacity: 1;
    margin: 0 0.3125rem;
    transition: var(--explorer-transition);
}

.kl-explorer-navs .swiper-pagination-bullet-active {
    background: var(--explorer-primary);
    transform: scale(1.2);
}

.kl-explorer-navs .swiper-pagination-bullet:hover {
    background: var(--explorer-primary);
    opacity: 0.8;
}

/* Breakpoints responsifs */
@media (min-width: 375px) {
    .kl-explorer-listing .swiper-slide {
        width: 320px;
    }
}

@media (min-width: 1024px) {
    .kl-explorer-listing .swiper-slide {
        width: 350px;
    }
    .kl-explorer-arrow.swiper-button-prev {
        left: 10px;
    }
    .kl-explorer-arrow.swiper-button-next {
        right: 10px;
    }
}

@media (max-width: 1023px) {
    .kl-explorer-listing .swiper {
        padding-left: 1rem;
        padding-right: 1rem;
        margin-left: -1rem;
        margin-right: -1rem;
    }
    .kl-explorer-listing .swiper-slide:first-child {
        margin-left: 1rem;
    }
    .kl-explorer-listing .swiper-slide:last-child {
        margin-right: 1rem;
    }
    .kl-explorer-arrow.swiper-button-prev,
    .kl-explorer-arrow.swiper-button-next {
        width: 50px;
        height: 50px;
    }
    .kl-explorer-arrow.swiper-button-prev::before,
    .kl-explorer-arrow.swiper-button-next::before {
        font-size: 24px;
    }
    .kl-view-all-btn {
        width: auto;
    }
}

@media (max-width: 767px) {
    .kl-explorer-listing .swiper-slide {
        width: 280px;
    }
    .kl-btn-secondary {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Accessibilité */
.kl-btn-secondary:focus-visible,
.kl-explorer-arrow.swiper-button-prev:focus-visible,
.kl-explorer-arrow.swiper-button-next:focus-visible,
.kl-view-all-btn:focus-visible {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .kl-btn-secondary,
    .kl-explorer-wrap,
    .kl-image-container img,
    .kl-corner-icon-wrapper,
    .kl-explorer-arrow.swiper-button-prev,
    .kl-explorer-arrow.swiper-button-next,
    .kl-view-all-btn,
    .swiper-pagination-bullet {
        transition: none;
    }
}

/* Utilities */
.kl-mb-sp-5 {
    margin-bottom: clamp(2rem, 5vw, 2.5rem);
}

.kl-img-cover {
    object-fit: cover;
}

.position-unset {
    position: static !important;
}