/* Reset and base styles for the MAHAVELO platform */
html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Lenis smooth scroll support */
html.lenis, html.lenis body {
    height: auto;
}
.lenis-smooth {
    scroll-behavior: auto !important;
}
.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}
.lenis-stopped {
    overflow: hidden;
}

body {
    background-color: #0A0E1A !important; /* Base Dark theme */
    color: #F5F5F7;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Layout structure */
.horizontal-scroller {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
}

.book-page {
    width: 100%;
    height: auto;
    min-height: 100vh;
    flex-shrink: 0;
    position: relative;
    background: transparent;
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.shader-bg {
    position: fixed;
    inset: 0;
    z-index: -10;
}

/* Desktop Horizontal View Override */
@media (min-width: 1024px) {
    body:not(.accessible-mode) {
        overflow-x: hidden;
        overflow-y: scroll;
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }
    body:not(.accessible-mode)::-webkit-scrollbar {
        display: none; /* Chrome, Safari and Opera */
    }

    body:not(.accessible-mode) .horizontal-scroller {
        flex-direction: row;
        width: 800vw; /* 8 pages total (0 to 7) */
        height: 100vh;
    }

    body:not(.accessible-mode) .book-page {
        width: 100vw;
        height: 100vh;
        padding-top: 5rem;
        padding-bottom: 2rem;
        border-bottom: none;
    }
}

/* Accessibility Mode overrides */
body.accessible-mode {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

body.accessible-mode .horizontal-scroller {
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    transition: none !important;
}

body.accessible-mode .book-page {
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    padding-top: 6rem !important;
    padding-bottom: 4rem !important;
    border-right: none !important;
}

/* Top Progress Indicator Bar */
.progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 100;
}

.progress-bar {
    height: 100%;
    background: #0077E6; /* Bleu MAHAVELO */
    width: 0%;
    transition: width 0.3s ease-out;
}

/* Custom browser scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0A0E1A;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Hide scrollbar for carousels */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
