/* Variables CSS pour les couleurs */
:root {
    --waooh-scroller-content-bg: #4A1758;
    --waooh-scroller-text-color: #fff;
    --waooh-scroller-title-color: var(--waooh-scroller-text-color,#fff);
    --waooh-scroller-button-bg: #FDD543;
    --waooh-scroller-subtitle-color: var( --waooh-scroller-button-bg, #FDD543);
    --waooh-scroller-button-hover: oklch( from var(--waooh-scroller-button-bg) calc(l - 0.2) c h);
    --waooh-scroller-button-text: var(--waooh-scroller-content-bg,#4A1758);
    --waooh-scroller-button-text-hover: var(--waooh-scroller-button-text,#4A1758);
    --waooh-scroller-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);

    --waooh-scroller-title-fs: clamp(2rem, 1.087rem + 3.0435vw, 3.75rem);
    --waooh-scroller-subtitle-fs: clamp(1.25rem, 0.8587rem + 1.3043vw, 2rem);
    --waooh-scroller-text-fs: clamp(1rem, 0.7391rem + 0.8696vw, 1.5rem);;
    --waooh-scroller-button-fs:  clamp(1rem, 0.7391rem + 0.8696vw, 1.5rem);;

    --waooh-scroller-gear-size: 150vw;
    --waooh-scroller-gear-position: 20%;
}

.waooh-post-scroller {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Container des images fixes */
.scroller-images-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
}

.scroller-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroller-image.active {
    opacity: 1;
    transform: translateY(0);
}

.scroller-image.slide-out-up {
    opacity: 0;
    transform: translateY(-100%);
}

.scroller-image.slide-out-down {
    opacity: 0;
    transform: translateY(100%);
}

.scroller-image.slide-in-up {
    opacity: 1;
    transform: translateY(0);
    animation: slideInFromTop 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.scroller-image.slide-in-down {
    opacity: 1;
    transform: translateY(0);
    animation: slideInFromBottom 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations horizontales pour mobile */
.scroller-image.slide-out-left {
    opacity: 1;
    transform: translateX(-100%);
    animation: slideOutToLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.scroller-image.slide-out-right {
    opacity: 1;
    transform: translateX(100%);
    animation: slideOutToRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.scroller-image.slide-in-left {
    opacity: 1;
    transform: translateX(0);
    animation: slideInFromLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.scroller-image.slide-in-right {
    opacity: 1;
    transform: translateX(0);
    animation: slideInFromRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideOutToLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes slideOutToRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scroller-bg-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Roue dentée décorative */
.scroller-decorative-gear {
    position: absolute;
    top: 50%;
    left: var(--waooh-scroller-gear-position, 20%);
    width: var(--waooh-scroller-gear-size, 100vw);
    height:  var(--waooh-scroller-gear-size, 100vw);
    transform: translate(-80%,-50%);
    z-index: 2;
    opacity: 1;
    pointer-events: none;
    @media screen and (min-width: 1024px) and (min-aspect-ratio: 5/7) {
        --waooh-scroller-gear-position: 10%;
    }
    @media screen and (min-width: 1024px) and (min-aspect-ratio: 1) {
        --waooh-scroller-gear-position: 15%;
    }
    @media screen and (min-width: 1024px) and (min-aspect-ratio: 1.2) {
        --waooh-scroller-gear-position: 15%;
    }

    @media screen and (min-width: 1024px) and (min-aspect-ratio: 1.5) {
        --waooh-scroller-gear-position: 10%;
        --waooh-scroller-gear-size: 120vw;
    }

    @media screen and (min-width: 1024px) and (max-height: 1023px)  and (min-aspect-ratio: 1.5) {
        --waooh-scroller-gear-position: 20%;
        --waooh-scroller-gear-size: 120vw;
    }




    /*@media screen and (min-height: 1024px) and (min-width: 1200px) {*/
    /*    left: 15%;*/
    /*}*/

}

.gear-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Container du contenu défilant */
.scroller-content-container {
    position: relative;
    width: 100dvw;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 3;
    /*background: var(--waooh-scroller-content-bg);*/
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;

    color : #fff;
}

.scroller-content-track {
    position: relative;
    padding: 0;
}

/* Styles des posts individuels */
.scroller-post {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 30px;
    box-sizing: border-box;
    scroll-snap-align: start;

}
/** .scroller-post-content **/


.scroller-post-content {
    --spc-max-w: 350px;
    --spc-ml : max(20px, calc(25vw - var(--spc-max-w)));
    width: 100%;
    max-width: var( --spc-max-w );
    min-width: 280px;
    margin-left: var(--spc-ml);
    text-align: left;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
    background: transparent;
    min-height: 50vh;
    display: flex;
    flex-direction: column;

    @media (min-width: 1200px) {
        --spc-max-w: 450px;
    }


    &.active {
        opacity: 1;
        transform: translateY(0);
        min-height: 50vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
    }

    & .scroller-post-title {
        font-size: var(--waooh-scroller-title-fs);
        font-weight: 700;
        color: var(--waooh-scroller-title-color);
        margin-block: .5em;
        line-height: 1.1;
        letter-spacing: -0.02em;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    & .scroller-post-subtitle {
        font-size: var(--waooh-scroller-subtitle-fs);
        font-weight: 700;
        color: var(--waooh-scroller-subtitle-color);
        margin-block: .5em;
        line-height: 1.1;
    }

    & .scroller-post-excerpt {
        font-size: var(--waooh-scroller-text-fs);
        line-height: 1.5;
        color: var(--waooh-scroller-text-color);
        margin-block: .5em;
    }

    & a.scroller-post-button {
        display: inline-block;
        padding: .75rem 2.5em;
        background: var(--waooh-scroller-button-bg);
        color: var(--waooh-scroller-button-text);
        text-decoration: none;
        border-radius: 12px;
        font-weight: 700;
        font-size: var(--waooh-scroller-button-fs);
        text-align: center;
        text-transform: uppercase;
        transition: all 0.3s ease;
        margin-block: auto 1em;
        max-width: 320px;

        &:hover {
            background: var(--waooh-scroller-button-hover);
            color: var(--waooh-scroller-button-text-hover);
        }
    }
}




/* Bouton de navigation vers le slide suivant */
.waooh-post-scroller button.scroller-next-button {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: transparent;
    border: 2px solid white;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: all 0.3s ease;
    z-index: 6;

    &:focus,
    &:hover {
       background: white;
        &::after {
            border-color: #000 #000 transparent transparent;
        }
    }
    
    &::after {
        border-style: solid;
        border-width: 3px;
        border-color: #fff #fff transparent transparent;
        border-radius: 2px;
        content: '';
        display: block;
        height: 20px;
        width: 20px;
        aspect-ratio: 1;
        position: relative;
        transform: rotate(135deg) translate(-20%, 20%);

    }
}

/* Bouton de navigation par type */
.waooh-post-scroller a.scroller-type-button {
    position: absolute;
    bottom: 25vh;
    right: 40px;
    padding: 10px 24px;
    background: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    z-index: 5;

    &:hover {
        background: white;
        color: black;
        text-decoration: none;
    }
}


/* Bullets Navigation */
.scroller-bullets {
    position: absolute !important;
    right: 40px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.bullet {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    border: 3px solid rgba(255, 255, 255, 0.6) !important;
    background: transparent !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    padding: 0 !important;
    display: block !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 0 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    color: transparent !important;
    min-width: auto !important;
    min-height: auto !important;
    flex: none !important;
}

.bullet::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: transparent !important;
    transform: translate(-50%, -50%) !important;
    transition: all 0.3s ease !important;
    opacity: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.bullet:hover {
    border-color: rgba(255, 255, 255, 0.8) !important;
    background: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

.bullet.active {
    border-color: rgba(255, 255, 255, 1) !important;
    background: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

.bullet.active::before {
    background: rgba(255, 255, 255, 1) !important;
    opacity: 1 !important;
}

/* Responsive Design */
@media (max-width: 1023px) {
    .waooh-post-scroller {
        flex-direction: column;
        height: 100vh;
    }
    
    .scroller-images-container {
        position: relative;
        width: 100%;
        height: 55vh;
        top: 0;
        right: auto;
    }
    
    .scroller-content-container {
        position: relative;
        width: 100%;
        height: 45vh;
        margin-top: 0;
        overflow: hidden;
        scroll-behavior: auto;
    }
    
    .scroller-content-track {
        display: flex;
        height: 100%;
        transition: transform 0.6s ease;
    }
    
    .scroller-post {
        flex: 0 0 100%;
        width: 100%;
        height: auto;
        display: flex;
        align-items: flex-start ;
        justify-content: center;
        padding: 0px;
        height: 100%;
        box-sizing: border-box;

    }

    .scroller-post-content {
        max-width: 100%;
        width: 100%;
        height: 100%;
        margin-left: 0;
        opacity: 1;
        transform: translateY(0);
        min-height: auto;
        padding-inline: clamp(16px, 2vw , 32px);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
    }
    
    .scroller-decorative-gear {
        --waooh-scroller-gear-size: 200vw;
        top: 65vh;
        left: 50vw;
        transform: translate(-50%, -20%);

    }
    
    /* Masquer le bouton next sur mobile */
    .waooh-post-scroller button.scroller-next-button {
        display: none;
    }
    .waooh-post-scroller a.scroller-type-button {
        display: grid;
        place-content: center;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        padding: 0;
        position: absolute;
        bottom: 1rem;
        right: 1rem;
        z-index: 5;
        transition: all 0.3s ease;
        pointer-events: all;


        & > span{ display: none; }
        &::before{
            content: '+';
            font-size: 24px;
            font-weight: 700;
            line-height: 1;
        }
    }
    
    /* Repositionner les bullets en haut */
    .scroller-bullets {
        position: absolute !important;
        top: 20px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        flex-direction: row !important;
        gap: 12px !important;
        z-index: 10 !important;
    }
    
    .bullet {
        width: 24px !important;
        height: 24px !important;
        border-width: 2px !important;
    }
}

/* Boutons de navigation mobile */
.scroller-nav-buttons {
    display: none;
}

@media (max-width: 1023px) {
    .scroller-nav-buttons {
        display: flex;
        position: absolute;
        top: 33%;
        left: 0;
        right: 0;
        transform: translateY(-50%);
        justify-content: space-between;
        padding: 0 20px;
        z-index: 15;
        pointer-events: none;
    }
    
    .waooh-post-scroller button.scroller-nav-button {
        width: 50px;
        height: 50px;
        background: transparent;
        border: 3px solid white;
        border-radius: 50%;
        padding:0;
        color: white;
        cursor: pointer;
        display: grid;
        place-content: center;
        transition: all 0.3s ease;
        pointer-events: all;

        &:disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }
        &:focus,
        &:hover {
            background: white;
            &::after {
                border-color: #000 #000 transparent transparent;
            }
        }

        &::after {
            border-style: solid;
            border-width: 3px;
            border-color: #fff #fff transparent transparent;
            border-radius: 2px;
            content: '';
            display: block;
            height: 20px;
            width: 20px;
            aspect-ratio: 1;
            position: relative;
            transform: rotate(45deg) translate(-20%, 20%);

        }

        &.prev::after{
            transform: rotate(-135deg) translate(-20%, 20%);

        }
    }
    
    .scroller-nav-button.prev::after {
        border-right: 8px solid currentColor;
        border-top: 6px solid transparent;
        border-bottom: 6px solid transparent;
        margin-left: -2px;
    }
    
    .scroller-nav-button.next::after {
        border-left: 8px solid currentColor;
        border-top: 6px solid transparent;
        border-bottom: 6px solid transparent;
        margin-right: -2px;
    }
}

@media (max-width: 768px) {
    
    .scroller-images-container {
        /*height: 60vh;*/
    }
    
    .scroller-content-container {
        /*height: 40vh;*/
    }
    
    .scroller-post {
        /*height: 40vh;*/
        /**/
    }
    .scroller-post{
        /*min-height: auto;*/
    }
    
    .scroller-post-title {
    }
    
    .scroller-post-subtitle {
    }
    
    .scroller-post-excerpt {
    }
    
    .scroller-post-button {
        /*padding: 10px 25px;*/
        /*font-size: 0.9rem;*/
    }
    
    /*.scroller-bullets {*/
    /*    bottom: 40px !important;*/
    /*    top: auto !important;*/
    /*    right: 20px !important;*/
    /*    transform: none !important;*/
    /*    flex-direction: row !important;*/
    /*    gap: 12px !important;*/
    /*}*/
    
    .bullet {
        /*width: 24px !important;*/
        /*height: 24px !important;*/
        /*border-width: 2px !important;*/
    }
}

@media (max-width: 480px) {
    .scroller-images-container {
        /*height: 35vh;*/
    }
    
    .scroller-decorative-gear {
        /*top: 35vh;*/
        /*width: 60px;*/
        /*height: 60px;*/
    }
    
    .scroller-content-container {
        /*height: 65vh;*/
        /*margin-top: 35vh;*/
    }
    
    .scroller-post {

    }
    
    .scroller-post-content {
        max-width: 100%;
    }
    
    .scroller-post-title {

    }
    
    .scroller-post-subtitle {
    }
    
    .scroller-post-button {

    }
    
    .scroller-bullets {

    }
    
    .bullet {
        width: 20px !important;
        height: 20px !important;
        border-width: 2px !important;
    }
    
    .bullet::before {
        width: 6px !important;
        height: 6px !important;
    }
}

/* Animations spéciales */
.scroller-post-content.entering {
    animation: slideInFromBottom 0.8s ease-out forwards;
}

.scroller-post-content.exiting {
    animation: slideOutToTop 0.8s ease-out forwards;
}

@keyframes slideInFromBottom {
    from {
        opacity: 0.3;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutToTop {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0.3;
        transform: translateY(-50px);
    }
}

/* Styles pour les transitions d'images */
.scroller-image.fade-in {
    animation: fadeIn 1s ease-in-out forwards;
}

.scroller-image.fade-out {
    animation: fadeOut 1s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}