/**
 * BienHabillé - Elementor Widgets CSS
 * 
 * Contient les styles pour :
 * 1. BH Slider
 * 2. BH Category Bar
 * 3. BH Category Grid
 * 4. BH Category Carousel
 */

/* ============================================== */
/* 1. BH SLIDER */
/* ============================================== */
.bh-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.bh-slider .swiper-slide {
    position: relative;
    overflow: hidden;
}

/* IMPORTANT: Fix z-index mobile */
.bh-slider .swiper-slide-active {
    z-index: 2 !important;
}

.bh-slide__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bh-slide__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bh-slide__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bh-slide__video iframe,
.bh-slide__video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bh-slide__video--youtube iframe,
.bh-slide__video--vimeo iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

@media (min-aspect-ratio: 16/9) {
    .bh-slide__video--youtube iframe,
    .bh-slide__video--vimeo iframe {
        height: 56.25vw;
    }
}

@media (max-aspect-ratio: 16/9) {
    .bh-slide__video--youtube iframe,
    .bh-slide__video--vimeo iframe {
        width: 177.78vh;
    }
}

.bh-slide__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.bh-slide__content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    z-index: 3;
    box-sizing: border-box;
}

.bh-slide__content--left {
    align-items: flex-start;
    text-align: left;
}

.bh-slide__content--center {
    align-items: center;
    text-align: center;
}

.bh-slide__content--right {
    align-items: flex-end;
    text-align: right;
}

.bh-slide__content--v-top {
    justify-content: flex-start;
    padding-top: 80px;
}

.bh-slide__content--v-center {
    justify-content: center;
}

.bh-slide__content--v-bottom {
    justify-content: flex-end;
    padding-bottom: 80px;
}

.bh-slide__subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.bh-slide__title {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.bh-slide__description {
    font-size: 18px;
    color: #ffffff;
    margin: 0 0 30px 0;
    max-width: 600px;
}

.bh-slide__buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.bh-slide__button {
    display: inline-block;
    padding: 16px 40px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.bh-slide__button--primary {
    background-color: #ffffff;
    color: #000000;
}

.bh-slide__button--primary:hover {
    background-color: #000000;
    color: #ffffff;
}

.bh-slide__button--secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.bh-slide__button--secondary:hover {
    background-color: #ffffff;
    color: #000000;
}

/* Slider Navigation */
.bh-slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bh-slider__arrow:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.bh-slider__arrow--prev {
    left: 20px;
}

.bh-slider__arrow--next {
    right: 20px;
}

.bh-slider .swiper-pagination {
    bottom: 20px !important;
}

.bh-slider .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.bh-slider .swiper-pagination-bullet-active {
    background-color: #ffffff;
}

/* Slider Responsive */
@media (max-width: 767px) {
    .bh-slide__content {
        padding: 20px;
    }
    
    .bh-slide__title {
        font-size: 28px;
    }
    
    .bh-slide__subtitle {
        font-size: 12px;
    }
    
    .bh-slide__description {
        font-size: 14px;
    }
    
    .bh-slide__button {
        padding: 12px 24px;
        font-size: 12px;
    }
    
    .bh-slider__arrow {
        width: 40px;
        height: 40px;
    }
    
    .bh-slider__arrow--prev {
        left: 10px;
    }
    
    .bh-slider__arrow--next {
        right: 10px;
    }
}

/* ============================================== */
/* 2. BH CATEGORY BAR */
/* ============================================== */
.bh-catbar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background-color: #ffffff;
}

.bh-catbar__wrapper {
    flex: 1;
    overflow: hidden;
}

.bh-catbar__list {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bh-catbar__list::-webkit-scrollbar {
    display: none;
}

.bh-catbar__item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    height: 120px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 4px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.bh-catbar__item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.bh-catbar__item--has-image {
    background-color: transparent;
}

.bh-catbar__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.bh-catbar__title {
    position: relative;
    z-index: 2;
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    text-align: center;
    text-transform: uppercase;
}

.bh-catbar__item--has-image .bh-catbar__title {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Category Bar Arrows - Desktop only */
.bh-catbar__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 100%);
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.bh-catbar__arrow:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.bh-catbar__arrow--prev {
    background: linear-gradient(270deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 100%);
}

/* Category Bar Responsive */
@media (max-width: 767px) {
    .bh-catbar {
        padding: 15px;
        gap: 10px;
    }
    
    /* IMPORTANT: Masquer les flèches sur mobile */
    .bh-catbar__arrow {
        display: none !important;
    }
    
    .bh-catbar__item {
        min-width: 120px;
        height: 100px;
    }
    
    .bh-catbar__title {
        font-size: 12px;
    }
}

/* ============================================== */
/* 3. BH CATEGORY GRID */
/* ============================================== */
.bh-catgrid {
    padding: 20px;
}

.bh-catgrid__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px;
}

.bh-catgrid__item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: all 0.3s ease;
}

.bh-catgrid__item:hover {
    transform: translateY(-5px);
}

.bh-catgrid__image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.bh-catgrid__image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.bh-catgrid__item:hover .bh-catgrid__image {
    transform: scale(1.05);
}

.bh-catgrid__image--placeholder {
    background-color: #f0f0f0;
}

.bh-catgrid__title {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    text-align: center;
}

.bh-catgrid__item:hover .bh-catgrid__title {
    text-decoration: underline;
}

/* Category Grid Responsive */
@media (max-width: 1024px) {
    .bh-catgrid__grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .bh-catgrid__image {
        height: 150px;
    }
}

@media (max-width: 767px) {
    .bh-catgrid {
        padding: 15px;
    }
    
    .bh-catgrid__grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    
    .bh-catgrid__image {
        height: 120px;
    }
    
    .bh-catgrid__title {
        font-size: 12px;
        margin-top: 8px;
    }
    
    /* Mobile scroll mode - 2 lignes horizontales */
    .bh-catgrid--mobile-scroll .bh-catgrid__grid {
        display: flex !important;
        flex-wrap: wrap;
        overflow-x: auto;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .bh-catgrid--mobile-scroll .bh-catgrid__grid::-webkit-scrollbar {
        display: none;
    }
    
    .bh-catgrid--mobile-scroll .bh-catgrid__item {
        flex: 0 0 calc(50% - 5px);
        max-width: calc(50% - 5px);
    }
}

/* ============================================== */
/* 4. BH CATEGORY CAROUSEL */
/* ============================================== */
.bh-catcarousel {
    padding: 40px 20px;
    text-align: center;
}

.bh-catcarousel__title {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 40px 0;
    text-align: center;
}

.bh-catcarousel__container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.bh-catcarousel__wrapper {
    flex: 1;
    overflow: hidden;
    max-width: 900px;
}

.bh-catcarousel__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.bh-catcarousel__circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.bh-catcarousel__item:hover .bh-catcarousel__circle {
    transform: scale(1.05);
}

.bh-catcarousel__circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bh-catcarousel__circle-text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    padding: 10px;
    line-height: 1.3;
}

.bh-catcarousel__label {
    margin-top: 15px;
    font-size: 15px;
    font-weight: 500;
    color: #000000;
    text-align: center;
}

.bh-catcarousel__item:hover .bh-catcarousel__label {
    text-decoration: underline;
}

/* Category Carousel Arrows */
.bh-catcarousel__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid #d0d0d0;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.bh-catcarousel__arrow:hover {
    border-color: #000000;
    color: #000000;
}

.bh-catcarousel__arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Category Carousel Responsive */
@media (max-width: 1024px) {
    .bh-catcarousel__title {
        font-size: 26px;
        margin-bottom: 30px;
    }
    
    .bh-catcarousel__circle {
        width: 100px;
        height: 100px;
    }
    
    .bh-catcarousel__circle-text {
        font-size: 12px;
    }
    
    .bh-catcarousel__label {
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    .bh-catcarousel {
        padding: 30px 15px;
    }
    
    .bh-catcarousel__title {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .bh-catcarousel__container {
        gap: 10px;
    }
    
    .bh-catcarousel__arrow {
        width: 40px;
        height: 40px;
    }
    
    .bh-catcarousel__arrow svg {
        width: 16px;
        height: 16px;
    }
    
    .bh-catcarousel__circle {
        width: 80px;
        height: 80px;
    }
    
    .bh-catcarousel__circle-text {
        font-size: 11px;
        padding: 5px;
    }
    
    .bh-catcarousel__label {
        font-size: 12px;
        margin-top: 10px;
    }
}