/* =============================================================================
   BWA Coach
   Section coachs : bloc texte sticky + cartes draggables dispersées sur
   les deux côtés — GSAP drag + inertie, hover/click lift, gradient titre.
   ============================================================================= */

/* ── Section ──────────────────────────────────────────────────────────────── */

.bwa-coach {
    position: relative;
    height: 270vh;
    /* PAS d'overflow:hidden ici — il casse position:sticky sur les enfants */

    /* Fond clair — dégradé bleu pâle vers blanc (maquette Figma) */
    background: linear-gradient(155deg, rgba(75, 189, 226, 0.18) 0%, #ffffff 55%);

    isolation: isolate;
}

/* ── Bloc texte sticky ────────────────────────────────────────────────────── */

.bwa-coach .bwa-coach__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: auto;
}

.bwa-coach .bwa-coach__sticky .bwa-coach__text {
	pointer-events: auto;
	max-width: 600px;
	width: min(600px, 40%);
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	position: relative;
	z-index: 3;
}

/* ── Titre ────────────────────────────────────────────────────────────────── */

.bwa-coach .bwa-coach__text .bwa-coach__title {
    margin: 0;
    color: #151A1C;
    font-family: var(--font-primary, inherit);
    font-size: clamp(36px, 5vw, 80px);
    font-weight: 500;
    line-height: 1.125;
    letter-spacing: -0.05em;
    text-align: center;
    text-wrap: balance;

}

/* Gradient sur les balises <strong> du wysiwyg */
.bwa-coach .bwa-coach__text .bwa-coach__title strong {
    font-weight: inherit;
    background: linear-gradient(135deg, #207BC7 0%, #02A2D6 48%, #1AA3FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bwa-coach .bwa-coach__text .bwa-coach__title p {
    /*background: #ffffff;*/
    /*border-radius: 50px;*/
}

/* ── Description ──────────────────────────────────────────────────────────── */

.bwa-coach .bwa-coach__text .bwa-coach__desc {
    margin: 0;
    color: #151A1C;
    font-family: var(--font-primary, inherit);
    font-size: clamp(14px, 1.1vw, 18px);
    font-weight: 400;
    line-height: 1.39;
    text-align: center;
    text-wrap: pretty;
    opacity: 0.75;
    /*background: #ffffff;*/
    /*border-radius: 50px;*/
}

/* ── Bouton ───────────────────────────────────────────────────────────────── */

.bwa-coach .bwa-coach__text .bwa-coach__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 40px;
    height: 61px;
    border-radius: 50px;
    background: linear-gradient(135deg, #02A2D6 0%, #1EC9FF 100%);
    color: #ffffff;
    font-family: var(--font-primary, inherit);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.bwa-coach .bwa-coach__text .bwa-coach__btn:hover {
    opacity: 0.88;
    transform: translateY(-2px);
}

.bwa-coach .bwa-coach__text .bwa-coach__btn:focus-visible {
    outline: 2px solid #02A2D6;
    outline-offset: 3px;
}

.bwa-coach .bwa-coach__text .bwa-coach__btn .bwa-coach__btn-arrow {
    display: inline-flex;
    align-items: center;
    transition: transform 0.18s ease;
}

.bwa-coach .bwa-coach__text .bwa-coach__btn:hover .bwa-coach__btn-arrow {
    transform: translateX(3px);
}

/* ── Zone des cartes ──────────────────────────────────────────────────────── */

.bwa-coach .bwa-coach__cards,
.bwa-coach .bwa-coach__pile {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
}

/* ── Carte individuelle ───────────────────────────────────────────────────── */

.bwa-coach .bwa-coach__cards .bwa-coach__card,
.bwa-coach .bwa-coach__pile .bwa-coach__card {
	position: absolute;
	transform-origin: center center;
	border-radius: 15px;
	overflow: hidden;
	cursor: pointer;
	pointer-events: auto;
	user-select: none;
	touch-action: auto;
	will-change: transform;
	visibility: hidden;
	max-height: 400px;
	box-shadow:
		0 6px 24px rgba(0, 0, 0, 0.12),
		0 2px 6px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.25s ease;
}

/* ── Image de la carte ────────────────────────────────────────────────────── */

.bwa-coach .bwa-coach__card .bwa-coach__card-img {
    display: block;
    width: 100%;
    height: 100%;
    filter: grayscale(1);
    object-fit: cover;
    object-position: top center;
    pointer-events: none;
    border-radius: inherit;
    -webkit-user-drag: none;
}

/* ── Responsive — tablette ────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .bwa-coach {
        height: 320vh;
    }

    .bwa-coach .bwa-coach__sticky .bwa-coach__text {
        width: min(480px, 55%);
    }

    .bwa-coach .bwa-coach__cards .bwa-coach__card,
    .bwa-coach .bwa-coach__pile .bwa-coach__card {
        width: clamp(140px, 18vw, 260px);
    }
}

/* ── Responsive — mobile ──────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .bwa-coach {
        height: auto !important;
        min-height: 100svh;
        overflow: visible;
        padding-bottom: 40px;
    }

    .bwa-coach .bwa-coach__sticky-wrap,
    .bwa-coach .bwa-coach__sticky {
        position: relative;
        height: auto;
        padding: 80px 20px 40px;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 28px;
    }

    .bwa-coach .bwa-coach__sticky .bwa-coach__text {
        width: 100%;
        max-width: 100%;
    }

    .bwa-coach .bwa-coach__text .bwa-coach__title {
        font-size: clamp(32px, 9vw, 48px);
    }

    .bwa-coach .bwa-coach__cards {
        position: relative;
        inset: unset;
        width: calc(100% + 40px);
        height: auto;
        margin-inline: -20px;
        box-sizing: border-box;
        overflow-x: auto;
        overflow-y: hidden;
        display: flex;
        gap: 16px;
        padding: 20px 24px 40px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        pointer-events: auto;
    }

    .bwa-coach .bwa-coach__pile {
        display: contents;
    }

    .bwa-coach .bwa-coach__cards::-webkit-scrollbar {
        display: none;
    }

    .bwa-coach .bwa-coach__cards .bwa-coach__card,
    .bwa-coach .bwa-coach__pile .bwa-coach__card {
        position: relative;
        left: auto !important;
        top: auto !important;
        width: 160px !important;
        height: auto !important;
        aspect-ratio: 30 / 37;
        transform: none !important;
        visibility: visible !important;
        flex-shrink: 0;
        cursor: default;
    }
}

/* ── Préférence réduire les animations ────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .bwa-coach .bwa-coach__cards .bwa-coach__card,
    .bwa-coach .bwa-coach__pile .bwa-coach__card {
        transition: box-shadow 0.18s ease;
    }

    .bwa-coach .bwa-coach__text .bwa-coach__btn,
    .bwa-coach .bwa-coach__text .bwa-coach__btn .bwa-coach__btn-arrow {
        transition: none;
    }
}
