/* Importation des fichiers CSS */
@import 'variables.css';
@import 'typography.css';
@import 'layout.css';

/* Importation des composants */
@import 'components/navbar.css';
@import 'components/footer.css';
@import 'components/buttons.css';
@import 'components/book-card.css';
@import 'components/author-card.css';
@import 'components/blog-card.css';
@import 'components/testimonial-card.css';
@import 'components/newsletter.css';
@import 'components/partner-card.css';

/* Importation des sections */
@import 'sections/hero.css';
@import 'sections/featured.css';
@import 'sections/popular.css';
@import 'sections/categories.css';
@import 'sections/bestsellers.css';
@import 'sections/authors.css';
@import 'sections/blog.css';
@import 'sections/testimonials.css';
@import 'sections/cta.css';
@import 'sections/partners.css';

/* Utilitaires et animations */
@import 'utilities.css';
@import 'animations.css';
@import 'responsive.css';

/* Styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--light-bg);
    scroll-behavior: smooth;
}

/* Loading Spinner */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.book-loader {
    position: relative;
    width: 80px;
    height: 60px;
    perspective: 500px;
}

.book-loader .page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    background-color: white;
    border-radius: 0 5px 5px 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    animation: pageFlip 1.5s infinite;
    animation-timing-function: ease-in-out;
}

.book-loader .page:nth-child(1) {
    animation-delay: 0s;
    background-color: #fafafa;
    z-index: 5;
}

.book-loader .page:nth-child(2) {
    animation-delay: 0.25s;
    background-color: #f5f5f5;
    z-index: 4;
}

.book-loader .page:nth-child(3) {
    animation-delay: 0.5s;
    background-color: #f0f0f0;
    z-index: 3;
}

.book-loader .page:nth-child(4) {
    animation-delay: 0.75s;
    background-color: #e8e8e8;
    z-index: 2;
}

.book-loader .page:nth-child(5) {
    animation-delay: 1s;
    background-color: #e0e0e0;
    z-index: 1;
}

@keyframes pageFlip {
    0% {
        transform: rotateY(0deg);
    }
    20% {
        transform: rotateY(-180deg);
    }
    100% {
        transform: rotateY(-180deg);
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    cursor: pointer;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: white;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 1010;
    padding: 2rem;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    margin: 2rem 0;
    padding: 0;
}

.mobile-nav-item {
    margin-bottom: 1rem;
}

.mobile-nav-link {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    display: block;
    padding: 0.5rem 0;
}

.mobile-nav-link:hover {
    color: var(--secondary-color);
}

.mobile-icons {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-top: 2rem;
}

.mobile-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    position: relative;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1005;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Swiper Customization */
.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background-color: var(--primary-color);
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-color);
    background-color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--box-shadow);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 1.2rem;
    font-weight: bold;
}