/* assets/book-reader.css */

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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #121212;
    color: #e0e0e0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.reader-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #121212;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.reader-header {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.left-header {
    display: flex;
    align-items: center;
}

.return-btn {
    background-color: rgba(52, 152, 219, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition:
        background-color 0.3s ease,
        transform 0.2s ease,
        border-color 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    backdrop-filter: blur(5px);
    opacity: 0.8;
}

.return-btn:hover {
    background-color: rgba(41, 128, 185, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
    opacity: 1;
}

.return-btn i {
    margin-right: 0; /* Remove space as text is removed */
    font-size: 1.2rem;
    fill: #ffffff;
}

.reader-header h1 {
    font-size: 1.5rem;
    color: #ffffff;
    margin-left: 20px;
}

.fullscreen-btn {
    background-color: rgba(52, 152, 219, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition:
        background-color 0.3s ease,
        transform 0.2s ease,
        border-color 0.3s ease;
    display: flex;
    align-items: center;
    backdrop-filter: blur(5px);
    opacity: 0.8;
    background: transparent;
}

.fullscreen-btn:hover {
    background-color: rgba(41, 128, 185, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
    opacity: 1;
}

.fullscreen-btn i {
    margin-right: 0; /* Remove space as text is removed */
    font-size: 1.2rem;
    fill: #ffffff;
}

.reader-main {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.page-display {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #000000;
    cursor: ew-resize; /* Indicate horizontal resize for navigation */
}

.page-display img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.5s ease;
    opacity: 1;
    user-select: none; /* Désactive la sélection de l'image */
    -webkit-user-drag: none; /* Désactive le drag pour Safari */
}

.page-display img.hidden {
    opacity: 0;
}

/* Zone cliquable pour navigation */
.page-display::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    cursor: pointer;
}

.page-display::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    cursor: pointer;
}

.status-info {
    position: absolute;
    bottom: 20px;
    right: 30px;
    background-color: rgba(44, 62, 80, 0.8);
    color: #ecf0f1;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 1rem;
    backdrop-filter: blur(5px);
    opacity: 0.9;
}

@media (max-width: 768px) {
    .reader-header h1 {
        font-size: 1.2rem;
        margin-left: 10px;
    }
    .fullscreen-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    .fullscreen-btn i {
        font-size: 1rem;
    }
    .status-info {
        font-size: 0.9rem;
        bottom: 15px;
        right: 20px;
        padding: 8px 12px;
    }
    .return-btn,
    .fullscreen-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    .return-btn i,
    .fullscreen-btn i {
        font-size: 1rem;
    }
}
