/**
 * BWA Timeline - Horizontal Full Styles
 * Based on Unlimited Element widget design
 *
 * @package BwaTimeline
 */

/* Gallery Button Container */
.bwatimeline-slide-actions,
.bwatimeline-actions {
	position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Gallery Button */
.bwatimeline-gallery-btn {
	padding: 12px 24px;
	background: var(--bwa-primary-color, #4f46e5);
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 10;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bwatimeline-gallery-btn:hover {
	background: var(--bwa-primary-color-dark, #4338ca);
	transform: translate(-50%, -50%) scale(1.05);
	box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

/* Content opacity on hover */
.bwatimeline-slide-content,
.bwatimeline-content {
	transition: opacity 0.3s ease;
}

/* Show button on hover for desktop */
@media (min-width: 1025px) {

    .bwatimeline-slide-item .bwatimeline-gallery-btn{
        pointer-events: none;
        opacity: 0;
        transition: all 0.3s ease;
    }
    .bwatimeline-slide-item:hover .bwatimeline-gallery-btn{
		pointer-events: all;
        opacity: 1;
	}

	/* Reduce content opacity on hover only if gallery button exists */

    .bwatimeline-slide-item:has(.bwatimeline-gallery-btn) .bwatimeline-slide-description,
    .bwatimeline-slide-item:has(.bwatimeline-gallery-btn) .bwatimeline-slide-title{
        opacity: 1;
        transition: opacity 0.3s ease-out;
    }

	.bwatimeline-slide-item:has(.bwatimeline-gallery-btn):hover .bwatimeline-slide-description,
	.bwatimeline-slide-item:has(.bwatimeline-gallery-btn):hover .bwatimeline-slide-title{
		opacity: 0.3;
	}

}

/* Always show button on mobile and tablet */
@media (max-width: 1024px) {
	.bwatimeline-gallery-btn {
		display: inline-block;
	}
}

/* ===========================
   Main Container
   =========================== */

.bwatimeline-horizontal.bwatimeline-full {
    gap: 4em;
    display: flex;
    padding: 5em 2em;
    overflow: hidden;
    min-height: 625px;
    flex-direction: column;
    justify-content: center;
    background-color: #fff;
}

/* ===========================
   Slider Container
   =========================== */

.bwatimeline-horizontal__slider {
    margin: 0 auto;
    max-width: 1380px;
    position: relative;
    width: 100%;
}

/* ===========================
   Navigation Container & Arrows
   =========================== */

.bwatimeline-navigation-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    width: 100%;
}

.bwatimeline-slider-arrow {
    width: 66px;
    height: 66px;
    display: flex;
    cursor: pointer;
    position: relative;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #fff;
    background-color: #3a6daf;
    border: none;
    z-index: 10;
}

.bwatimeline-slider-arrow:hover {
    background-color: #2e5a8f;
    color: #fff;
}

.bwatimeline-slider-arrow.bwatimeline-disabled,
.bwatimeline-slider-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #b8c5d6;
}

.bwatimeline-slider-arrow.bwatimeline-disabled:hover,
.bwatimeline-slider-arrow:disabled:hover {
    background-color: #b8c5d6;
}

.bwatimeline-arrow-icon {
    width: 20px;
    height: 15px;
    display: block;
}

.bwatimeline-slide-next .bwatimeline-arrow-icon {
    transform: rotate(180deg);
}

/* ===========================
   Swiper Container
   =========================== */

.bwatimeline-horizontal__slider .swiper {
    overflow: hidden;
    position: relative;
}

.bwatimeline-swiper .swiper-slide {
    width: fit-content;
}

.bwatimeline-horizontal__slider .swiper-slide {
    color: #3a6daf;
    text-align: left;
}

/* ===========================
   Global Timeline Line
   =========================== */

.bwatimeline-global-line {
    position: absolute;
    left: 0;
    top: 58px;
    height: 3px;
    background-color: #3a6daf;
    z-index: 1;
    width: 100%;
    pointer-events: none;
}

/* ===========================
   Slide Item
   =========================== */

.bwatimeline-slide-item {
    gap: 0;
    width: 100%;
    height: auto;
    min-height: 322px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
}

/* ===========================
   Date
   =========================== */

.bwatimeline-horizontal__slider .bwatimeline-date {
    color: #3a6daf;
    font-weight: 500;
    line-height: normal;
    font-size: 1.5625rem; /* 25px */
    letter-spacing: -0.5px;
    font-family: var(--e-global-typography-primary-font-family), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: all 0.3s ease-in-out;
    margin-bottom: 18px;
}

.bwatimeline-horizontal__slider .swiper-slide-active .bwatimeline-date {
    font-size: 1.5625rem; /* 25px - même taille que non-actif */
    color: #3a6daf;
}

/* ===========================
   Point / Dot
   =========================== */

.bwatimeline-horizontal__slider .bwatimeline-point-wrapper {
    margin-bottom: 25px;
    position: relative;
    z-index: 2; /* Au-dessus de la ligne globale */
}

.bwatimeline-horizontal__slider .bwatimeline-point {
    width: 21px;
    height: 21px;
    display: flex;
    position: relative;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
    background-color: #3a6daf;
    z-index: 2;
}

/* Point Icon/Number */
.bwatimeline-horizontal__slider .bwatimeline-point .bwatimeline-point-number,
.bwatimeline-horizontal__slider .bwatimeline-point .bwatimeline-icon {
    font-size: 0.75rem;
    color: #fff;
    display: none; /* Hidden in this design, only dot visible */
}

/* ===========================
   Slide Content (In Each Item)
   =========================== */

.bwatimeline-slide-content {
    width: 100%;
    text-align: left;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.bwatimeline-slide-content h3.bwatimeline-slide-title {
    color: #3a6daf;
    font-weight: 700;
    font-size: 1rem; /* 16px */
    line-height: 1.5625rem; /* 25px */
    margin: 0;
    text-transform: uppercase;
    font-family: var(--e-global-typography-primary-font-family), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bwatimeline-slide-content .bwatimeline-slide-description {
    color: #677990;
    font-weight: 300;
    font-size: 1rem; /* 16px */
    line-height: 1.5625rem; /* 25px */
    margin: 0;
    font-family: var(--e-global-typography-primary-font-family), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ===========================
   Content Area (Description)
   =========================== */

.bwatimeline-content-area {
    display: none; /* Hidden - content now displayed in each slide */
    color: #213451;
    min-height: 150px;
    font-weight: 600;
    text-align: center;
    align-items: flex-start;
    line-height: 24px;
    font-size: 20px;
    justify-content: center;
    font-family: var(--e-global-typography-primary-font-family), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin-top: 2em;
}

.bwatimeline-content-inner {
    max-width: 660px;
    padding: 0 1em;
}

.bwatimeline-content-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5em;
    color: #213451;
}

.bwatimeline-content-subtitle {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1em;
    color: #6490b2;
}

.bwatimeline-content-description {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 1em;
}

.bwatimeline-content-link {
    display: inline-block;
    color: #6490b2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.bwatimeline-content-link:hover {
    color: #213451;
}

/* ===========================
   Standard Grid (< threshold)
   =========================== */

.bwatimeline-horizontal.bwatimeline-full .bwatimeline-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2em;
    padding: 2em;
}

.bwatimeline-horizontal.bwatimeline-full .bwatimeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1em;
    padding: 2em;
    background: #f8f9fa;
    border-radius: 8px;
	transition: transform 0.3s, box-shadow 0.3s, border-radius 0.3s, background-color 0.3s, color 0.3s;
}

.bwatimeline-horizontal.bwatimeline-full .bwatimeline-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.bwatimeline-horizontal.bwatimeline-full .bwatimeline-items .bwatimeline-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #213451;
    margin-bottom: 0.5em;
}

.bwatimeline-horizontal.bwatimeline-full .bwatimeline-items .bwatimeline-subtitle {
    font-size: 0.9rem;
    color: #6490b2;
    margin-bottom: 0.75em;
}

.bwatimeline-horizontal.bwatimeline-full .bwatimeline-items .bwatimeline-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
}

.bwatimeline-horizontal.bwatimeline-full .bwatimeline-items .bwatimeline-link {
    display: inline-block;
    color: #6490b2;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1em;
    transition: color 0.3s;
}

.bwatimeline-horizontal.bwatimeline-full .bwatimeline-items .bwatimeline-link:hover {
    color: #213451;
}

/* ===========================
   RESPONSIVE
   =========================== */

/* Phone */
@media (max-width: 767px) {
    .bwatimeline-horizontal.bwatimeline-full {
        min-height: 400px;
        padding: 3em 1em;
        gap: 2.25em;
    }

    .bwatimeline-horizontal.bwatimeline-full .bwatimeline-slide-actions,
    .bwatimeline-horizontal.bwatimeline-full .bwatimeline-actions {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        margin-top: 10px;
        display: flex;
        justify-content: flex-start;
    }

    .bwatimeline-horizontal.bwatimeline-full .bwatimeline-slide-item {
        min-height: 280px;
    }

    .bwatimeline-horizontal.bwatimeline-full .bwatimeline-slide-content {
        gap: 6px;
    }

    .bwatimeline-horizontal.bwatimeline-full .bwatimeline-gallery-btn {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        font-size: 0.875rem;
        line-height: 1.2;
        max-width: 100%;
        padding: 10px 14px;
        white-space: normal;
        text-align: center;
    }

    .bwatimeline-horizontal.bwatimeline-full .bwatimeline-gallery-btn:hover {
        transform: none;
    }

    .bwatimeline-horizontal__slider .bwatimeline-date {
        font-size: 1.25rem; /* 20px */
    }

    .bwatimeline-horizontal__slider .swiper-slide-active .bwatimeline-date {
        font-size: 1.25rem; /* 20px */
    }

    .bwatimeline-horizontal__slider .bwatimeline-point {
        width: 16px;
        height: 16px;
    }

    .bwatimeline-horizontal.bwatimeline-full .bwatimeline-slide-title {
        font-size: 0.875rem; /* 14px */
        line-height: 1.375rem; /* 22px */
    }

    .bwatimeline-horizontal.bwatimeline-full .bwatimeline-slide-description {
        font-size: 0.875rem; /* 14px */
        line-height: 1.375rem; /* 22px */
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .bwatimeline-global-line {
        top: 49px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .bwatimeline-horizontal.bwatimeline-full {
        min-height: 500px;
        padding: 4em 1.25em;
        gap: 3em;
    }

    .bwatimeline-horizontal.bwatimeline-full .bwatimeline-slide-item {
        min-height: 300px;
    }

    .bwatimeline-horizontal.bwatimeline-full .bwatimeline-slide-description {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .bwatimeline-horizontal__slider .bwatimeline-point {
        width: 18px;
        height: 18px;
    }

    .bwatimeline-global-line {
        top: 47px; /* Ajusté pour tablette */
    }
}

/* Mobile and Tablet */
@media (max-width: 1024px) {
    .bwatimeline-horizontal.bwatimeline-full {
        min-height: auto;
    }

    .bwatimeline-horizontal__slider {
        max-width: 100%;
    }

    .bwatimeline-navigation-container {
        margin-top: 20px;
        gap: 10px;
    }

    .bwatimeline-slider-arrow {
        width: 50px;
        height: 50px;
    }

    .bwatimeline-arrow-icon {
        width: 16px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .bwatimeline-horizontal.bwatimeline-full {
        padding: 2.5em 0.75em;
        gap: 1.75em;
    }

    .bwatimeline-horizontal.bwatimeline-full .bwatimeline-slide-item {
        min-height: 240px;
    }

    .bwatimeline-horizontal__slider .bwatimeline-date,
    .bwatimeline-horizontal__slider .swiper-slide-active .bwatimeline-date {
        font-size: 1.0625rem;
        margin-bottom: 14px;
    }

    .bwatimeline-horizontal__slider .bwatimeline-point-wrapper {
        margin-bottom: 18px;
    }

    .bwatimeline-global-line {
        top: 43px;
    }

    .bwatimeline-slider-arrow {
        width: 44px;
        height: 44px;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    /* Global line positioning is already correct at 53px for desktop */
}

/* Laptop 1 */
@media (min-width: 1025px) and (max-width: 1439px) {
    .bwatimeline-horizontal.bwatimeline-full {
        min-height: 560px;
    }

    .bwatimeline-horizontal__slider {
        max-width: 1152px;
    }
}

/* Laptop 2 */
@media (min-width: 1440px) and (max-width: 1700px) {
    .bwatimeline-horizontal.bwatimeline-full {
        min-height: 600px;
    }
}
