/* Bonfils Carousel CSS */

/* Container */
/* Mobile Nav Hidden by Default */
.bonfils-mobile-nav {
    display: none;
}

/* Container */
.bonfils-carousel-container {
    width: 100%;
    margin: 20px 0;
    position: relative;
}

/* Slides */
.bonfils-swiper {
    width: 100%;
    padding-bottom: 50px;
    padding-top: 80px;
    /* Space for top overlay */
    overflow: hidden;
    /* Main container clips everything else */
}

.bonfils-swiper .swiper-wrapper {
    transition-timing-function: linear;
}

.bonfils-slide {
    position: relative;
    /* OVERFLOW VISIBLE is crucial for the top tip to exist outside */
    overflow: visible;
    cursor: grab;
    /* Indicate draggable */
}

.bonfils-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    /* Crop the image here instead */
    overflow: hidden;
}

.bonfils-team-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    /* Assure que l'image remplit la zone */
    transition: transform 0.5s ease;
}

/* === IDENTITY OVERLAY (TOP) === */
.bonfils-identity {
    position: absolute;
    top: 50px;
    /* Initial position inside (hidden) */
    left: 50%;
    /* Center nicely */
    transform: translateX(-50%) translateY(-20px);
    width: auto;
    min-width: 140px;
    max-width: 90%;

    /* White Glassmorphism with Black Text */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    padding: 10px 15px;
    border-radius: 8px;
    /* Soft square */

    opacity: 0;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 30;
    /* Higher than tooltip */

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    /* Softer shadow for light card */
    pointer-events: none;
}

.bonfils-name {
    margin: 0;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: #111111;
    /* Black text */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bonfils-role {
    margin-top: 3px;
    font-size: 10px;
    color: #666666;
    /* Dark grey role */
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Active State for Identity */
.bonfils-slide.active-state .bonfils-identity {
    /* Move UP outside the image container - much higher */
    top: -65px;
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Tooltip */
.bonfils-tooltip {
    position: absolute;
    /* Desktop: Side Overlay Panel */
    top: 10px;
    right: 10px;
    bottom: 10px;
    width: 65%;
    /* Covers right side */

    /* Premium Glassmorphism (Dark Theme Choice) */
    background-color: rgba(20, 20, 20, 0.75);
    /* Dark semi-transparent */
    color: #ffffff;
    /* White text for max contrast */

    font-family: var(--bonfils-font-family, inherit);
    font-size: var(--bonfils-font-size, 14px);

    padding: 20px;
    /* More breathing room */
    border-radius: 12px;
    /* Softer corners */

    /* Glass Effect */
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);

    /* Border & Shadow */
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* Subtle white border */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);

    opacity: 0;
    visibility: hidden;
    z-index: 20;

    /* Animation settings */
    transform: translateX(20px);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;

    /* Layout */
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.bonfils-tooltip-content {
    max-height: 100%;
    overflow-y: auto;
    padding-right: 5px;
    /* Space for scrollbar */
    text-align: left;
    line-height: 1.5;
}

/* Custom Scrollbar for Tooltip Text */
.bonfils-tooltip-content::-webkit-scrollbar {
    width: 4px;
}

.bonfils-tooltip-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

.bonfils-tooltip-content::-webkit-scrollbar-thumb {
    background: currentColor;
    opacity: 0.5;
    border-radius: 2px;
}

/* Active State */
.bonfils-tooltip.active,
.bonfils-slide.active-state .bonfils-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* Arrow - Hidden for desktop overlay */
.bonfils-tooltip:after {
    display: none;
}

/* === NAVIGATION SCROLLBAR === */
.bonfils-carousel-container .swiper-scrollbar {
    background: rgba(0, 0, 0, 0.08);
    /* Proper visible track lane */
    height: 8px;
    /* Thicker for ergonomics */
    bottom: 10px;
    /* Lifted up slightly */
    left: 10% !important;
    /* Centered layout */
    width: 80% !important;
    /* Not full width - looks like a control */
    border-radius: 10px;
    /* Fully rounded capsule */
    position: absolute;
    z-index: 50;
    opacity: 1 !important;
    cursor: pointer;
    transition: background 0.3s;
}

.bonfils-carousel-container .swiper-scrollbar:hover {
    background: rgba(0, 0, 0, 0.12);
    /* Slightly darker on hover */
}

/* The Draggable Handle - Black */
.bonfils-carousel-container .swiper-scrollbar-drag {
    background: #000000;
    border-radius: 10px;
    /* Fully rounded */
    cursor: grab;
}

.bonfils-carousel-container .swiper-scrollbar-drag:active {
    cursor: grabbing;
}


/* Mobile Specifics overrides */
/* Mobile & Tablet Portrait (< 1024px) - Refined Redesign */
@media (max-width: 1023px) {

    /* Layout & Height */
    .bonfils-swiper {
        height: 600px !important;
        padding-top: 60px !important;
        padding-bottom: 60px !important;
        /* More space at bottom for buttons */
    }

    /* 1. Mobile Nav BUTTONS (Restored) */
    .bonfils-mobile-nav {
        display: flex !important;
        position: absolute;
        bottom: 10px;
        /* At the bottom */
        left: 0;
        width: 100%;
        justify-content: center;
        gap: 30px;
        /* Spaced out */
        z-index: 100 !important;
        pointer-events: auto !important;
    }

    .bonfils-nav-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #fff;
        border: 1px solid #e5e5e5;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        /* Soft shadow */
        cursor: pointer;
        color: #333;
        transition: all 0.2s;
    }

    .bonfils-nav-btn:active {
        transform: scale(0.95);
        background: #f9f9f9;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    }

    .bonfils-nav-btn svg {
        width: 20px;
        height: 20px;
    }

    /* Hide Pagination */
    .bonfils-swiper .swiper-pagination {
        display: none !important;
    }

    /* 2. Slide Layout */
    .bonfils-slide {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        overflow: visible !important;
        height: 100% !important;
        padding: 0 15px !important;
    }

    /* Image: Circle Top (Centered) */
    .bonfils-image-wrapper {
        width: 140px !important;
        height: 140px !important;
        border-radius: 50% !important;
        overflow: hidden !important;
        flex-shrink: 0 !important;
        margin-bottom: 30px !important;
        order: 1 !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
        border: 3px solid #fff !important;
    }

    .bonfils-team-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Tooltip (Testimonial) */
    .bonfils-tooltip {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 320px !important;
        height: auto !important;
        max-height: 200px !important;
        overflow-y: auto !important;

        background: transparent !important;
        backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;

        color: #333333 !important;
        font-size: 15px !important;
        line-height: 1.6 !important;
        font-style: italic !important;

        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;

        order: 2 !important;
        margin-bottom: 30px !important;
        transition: none !important;
    }

    /* 3. Enhanced Scrollbar for Tooltip Text */
    .bonfils-tooltip-content::-webkit-scrollbar {
        width: 10px !important;
        /* Even wider as requested */
    }

    .bonfils-tooltip-content::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05) !important;
        border-radius: 5px !important;
    }

    .bonfils-tooltip-content::-webkit-scrollbar-thumb {
        background: #000000 !important;
        /* PITCH BLACK */
        border-radius: 5px !important;
    }

    .bonfils-tooltip.active,
    .bonfils-slide.active-state .bonfils-tooltip {
        transform: none !important;
    }

    .bonfils-tooltip-content {
        padding-right: 8px !important;
        /* More space for scrollbar */
        text-align: center !important;
    }

    /* Identity (Name/Role) */
    .bonfils-identity {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;

        background: transparent !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        padding: 0 !important;

        opacity: 1 !important;
        display: flex !important;
        flex-direction: column !important;

        order: 3 !important;
    }

    .bonfils-slide.active-state .bonfils-identity {
        transform: none !important;
        top: auto !important;
    }

    .bonfils-name {
        color: #000000 !important;
        font-size: 18px !important;
        margin-bottom: 5px !important;
        font-weight: 700 !important;
    }

    .bonfils-role {
        color: #666666 !important;
        font-size: 12px !important;
        font-weight: 600 !important;
    }

    /* Arrow hidden */
    .bonfils-tooltip:after {
        display: none !important;
    }

    /* Scrollbar HIDDEN on Mobile as requested */
    .bonfils-carousel-container .swiper-scrollbar {
        display: none !important;
        opacity: 0 !important;
    }
}

/* Responsive Adjustments */
@media (min-width: 768px) and (max-width: 1280px) {
    .bonfils-tooltip {
        width: 80% !important;
        /* Wider tooltip on smaller desktops */
        right: 10% !important;
        left: auto;
        padding: 15px !important;
    }

    .bonfils-tooltip-content {
        font-size: 13px !important;
        /* Slightly smaller text */
    }
}