/* Archives CSS - Modern Style following global theme */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #001a33 0%, #003366 50%, #001a33 100%);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(77, 148, 255, 0.1) 0%, transparent 70%);
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    color: var(--accent-primary);
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(77, 148, 255, 0.5));
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-family: var(--font-accent);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 400;
}

/* Floating particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: particleFloat 15s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Main Content */
.main-content {
    min-height: 100vh;
    padding: 4rem 2rem;
    position: relative;
}

/* Intro Section */
.intro-section {
    max-width: 1000px;
    margin: 0 auto 4rem;
    text-align: center;
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.intro-section.visible {
    transform: translateY(0);
    opacity: 1;
}

.intro-text {
    background: rgba(240, 248, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-style: italic;
    position: relative;
    overflow: hidden;
}

.intro-text::before {
    content: '📚';
    position: absolute;
    top: 1rem;
    left: 2rem;
    font-size: 4rem;
    opacity: 0.3;
}

/* Archives Container */
.archives-container {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.archives-container.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Sidebar */
.archives-sidebar {
    background: rgba(240, 248, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 100px;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.archives-sidebar:hover {
    border-color: var(--accent-primary);
    box-shadow: 
        0 25px 50px rgba(0, 26, 51, 0.3),
        0 0 50px rgba(77, 148, 255, 0.1);
}

.sidebar-header {
    margin-bottom: 2rem;
}

.sidebar-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header h2::before {
    content: '◈';
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px rgba(77, 148, 255, 0.5));
}

/* Search Container */
.search-container {
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(77, 148, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: all var(--transition-normal);
}

.search-container input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(77, 148, 255, 0.15);
    box-shadow: var(--glow-primary);
}

.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-primary);
    font-size: 0.9rem;
}

/* Categories Section */
.categories-section {
    margin-bottom: 2rem;
}

.categories-section h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-filters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(77, 148, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: var(--font-main);
    font-weight: 500;
}

.category-btn:hover {
    background: rgba(77, 148, 255, 0.1);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateX(5px);
}

.category-btn.active {
    background: rgba(77, 148, 255, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: var(--glow-primary);
}

.category-btn i {
    margin-right: 0.75rem;
}

.category-btn .count {
    background: rgba(77, 148, 255, 0.2);
    color: var(--accent-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* Status Section */
.status-section {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.status-section h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicators {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(77, 148, 255, 0.05);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(77, 148, 255, 0.1);
}

.status-label {
    font-family: var(--font-main);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.status-value {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 1rem;
}

.status-value.available {
    color: #00ff88;
}

.status-value.locked {
    color: #ffaa00;
}

/* Archives Grid */
.archives-main {
    position: relative;
}

.archives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.archive-card {
    background: rgba(240, 248, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
}

.archive-card.visible {
    transform: translateY(0);
    opacity: 1;
}

.archive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(77, 148, 255, 0.1),
        transparent
    );
    transition: left 0.8s ease;
}

.archive-card:hover::before {
    left: 100%;
}

.archive-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 
        0 25px 50px rgba(0, 26, 51, 0.3),
        0 0 50px rgba(77, 148, 255, 0.15);
}

.archive-card.locked {
    border-left: 4px solid #ffaa00;
}

.archive-card.locked::after {
    content: '🔒';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.2rem;
    opacity: 0.7;
}

.archive-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.archive-icon {
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px rgba(77, 148, 255, 0.3));
}

.archive-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.archive-category {
    display: inline-block;
    background: rgba(77, 148, 255, 0.2);
    color: var(--accent-primary);
    padding: 0.3rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.archive-description {
    font-family: var(--font-main);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.archive-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.archive-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff88;
}

.status-dot.locked {
    background: #ffaa00;
}

/* Reader Interface */
.reader-interface {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(240, 248, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.reader-interface.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.reader-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(77, 148, 255, 0.05);
    border-radius: 20px 20px 0 0;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(77, 148, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: var(--font-main);
    font-weight: 500;
}

.back-btn:hover {
    background: rgba(77, 148, 255, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.archive-info h3 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.reader-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: rgba(77, 148, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--accent-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(77, 148, 255, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

#zoomLevel {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    min-width: 60px;
    text-align: center;
}

.reader-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#reader {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: rgba(0, 26, 51, 0.02);
    border-radius: 0 0 20px 20px;
}

#reader iframe {
    border: none;
    width: 100%;
    height: 100%;
    background: transparent;
}

.navigation-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(77, 148, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: var(--font-main);
    font-weight: 500;
}

.nav-btn:hover {
    background: rgba(77, 148, 255, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 26, 51, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
    width: 90%;
    max-width: 450px;
    position: relative;
    z-index: 1001;
    box-shadow: 
        0 25px 50px rgba(0, 26, 51, 0.5),
        0 0 50px rgba(77, 148, 255, 0.1);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.modal-body {
    margin-bottom: 2rem;
}

.password-container {
    position: relative;
    margin-bottom: 1rem;
}

.password-container input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    background: rgba(77, 148, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.password-container input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: var(--glow-primary);
}

.toggle-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-normal);
}

.toggle-btn:hover {
    color: var(--accent-primary);
}

.security-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: var(--font-main);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn.primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.btn.primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(77, 148, 255, 0.3);
}

.btn.secondary {
    background: rgba(77, 148, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn.secondary:hover {
    background: rgba(77, 148, 255, 0.2);
    border-color: var(--accent-primary);
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(77, 148, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-weight: 500;
    box-shadow: 
        0 10px 30px rgba(0, 26, 51, 0.3),
        0 0 20px rgba(77, 148, 255, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.notification.active {
    opacity: 1;
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-icon {
    font-size: 1.1rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 26, 51, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    text-align: center;
    color: var(--text-primary);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(77, 148, 255, 0.3);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 12vh;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    animation: bounce 2s infinite;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Loading animation states */
.loading {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.loading.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .archives-container {
        grid-template-columns: 300px 1fr;
        gap: 2rem;
    }
}

@media (max-width: 1024px) {
    .archives-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .archives-sidebar {
        position: static;
    }
    
    .archives-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 80vh;
    }
    
    .main-content {
        padding: 2rem 1rem;
    }
    
    .intro-text {
        padding: 2rem;
        font-size: 1.1rem;
    }
    
    .archives-sidebar {
        padding: 1.5rem;
    }
    
    .archive-card {
        padding: 1.5rem;
    }
    
    .modal-content {
        padding: 2rem;
        margin: 1rem;
    }
    
    .reader-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .archives-grid {
        grid-template-columns: 1fr;
    }
    
    .category-btn {
        padding: 0.75rem;
    }
    
    .navigation-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .archives-container {
        gap: 1rem;
    }
    
    .archive-card {
        padding: 1rem;
    }
    
    .sidebar-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* EPUB Reader Styles */
#reader {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: rgba(0, 26, 51, 0.02);
    border-radius: 0 0 20px 20px;
}

#reader iframe {
    border: none;
    width: 100%;
    height: 100%;
    background: transparent;
}

/* Styles pour le contenu EPUB */
.epub-container {
    background: transparent !important;
}

.epub-view {
    background: transparent !important;
}

.epub-view iframe {
    background: transparent !important;
}

/* Personnalisation de la sélection de texte */
.epub-view ::selection {
    background: rgba(77, 148, 255, 0.3) !important;
    color: var(--text-primary) !important;
}

/* Styles pour les contrôles de navigation */
.reader-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: rgba(0, 26, 51, 0.05);
    border-top: 1px solid var(--border-color);
}

.reader-controls button {
    background: rgba(77, 148, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: var(--font-main);
    font-weight: 500;
}

.reader-controls button:hover {
    background: rgba(77, 148, 255, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.reader-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.zoom-controls button {
    padding: 0.5rem;
    font-size: 1.2rem;
}

.zoom-level {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.9rem;
    min-width: 4rem;
    text-align: center;
}

/* Styles pour le mode sombre */
@media (prefers-color-scheme: dark) {
    .epub-view {
        color-scheme: dark;
    }
    
    .epub-view iframe {
        color-scheme: dark;
    }
}

/* Styles pour le mode plein écran */
.reader-interface.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    border-radius: 0;
}

.reader-interface.fullscreen .reader-header,
.reader-interface.fullscreen .reader-controls {
    background: rgba(0, 26, 51, 0.9);
    backdrop-filter: blur(10px);
}

body.reader-mode {
    background: linear-gradient(135deg, #001a33 0%, #002147 50%, #001a33 100%);
}

/* Container du lecteur EPUB optimisé */
#reader {
    flex: 1;
    overflow: auto; /* Changé de hidden à auto pour le scroll */
    position: relative;
    border-radius: 0 0 20px 20px;
    /* Fond avec dégradé subtil pour la zone de lecture */
    background: linear-gradient(
        135deg, 
        rgba(240, 248, 255, 0.02) 0%, 
        rgba(230, 243, 255, 0.05) 50%, 
        rgba(240, 248, 255, 0.02) 100%
    );
    padding: 1rem;
    /* Scrollbar personnalisée */
    scrollbar-width: thin;
    scrollbar-color: rgba(77, 148, 255, 0.3) transparent;
}

/* Scrollbar WebKit pour la zone de lecture */
#reader::-webkit-scrollbar {
    width: 8px;
}

#reader::-webkit-scrollbar-track {
    background: rgba(77, 148, 255, 0.1);
    border-radius: 4px;
}

#reader::-webkit-scrollbar-thumb {
    background: rgba(77, 148, 255, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

#reader::-webkit-scrollbar-thumb:hover {
    background: rgba(77, 148, 255, 0.5);
}

/* Container pour le contenu EPUB */
#reader iframe {
    border: none;
    width: 100%;
    min-height: 100%;
    background: transparent;
    border-radius: 12px;
}

/* Navigation améliorée pour le mode scroll */
.navigation-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 26, 51, 0.05);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(77, 148, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: var(--font-main);
    font-weight: 500;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(77, 148, 255, 0.2),
        transparent
    );
    transition: left 0.6s ease;
}

.nav-btn:hover {
    background: rgba(77, 148, 255, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 
        0 10px 20px rgba(0, 26, 51, 0.2),
        0 0 20px rgba(77, 148, 255, 0.15);
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.nav-btn:disabled::before {
    display: none;
}

/* Indicateur de position de lecture */
.reading-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.progress-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(77, 148, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(77, 148, 255, 0.2);
}

.progress-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s infinite ease-in-out;
}

/* Contrôles du lecteur améliorés */
.reader-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 2rem;
    background: rgba(0, 26, 51, 0.05);
    backdrop-filter: blur(15px);
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(77, 148, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.control-btn {
    width: 36px;
    height: 36px;
    background: rgba(77, 148, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--accent-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.control-btn:hover {
    background: rgba(77, 148, 255, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77, 148, 255, 0.2);
}

.control-btn:active {
    transform: translateY(0);
}

#zoomLevel {
    font-family: var(--font-mono);
    color: var(--text-primary);
    min-width: 60px;
    text-align: center;
    font-weight: 600;
}

/* Styles pour le thème sombre du contenu EPUB */
.epub-container {
    background: transparent !important;
}

/* Amélioration de l'interface en mode plein écran */
.reader-interface.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    border-radius: 0;
    background: rgba(0, 26, 51, 0.98);
}

.reader-interface.fullscreen .reader-header {
    background: rgba(0, 26, 51, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(77, 148, 255, 0.2);
}

/* Bouton pour le mode plein écran */
.fullscreen-btn {
    background: rgba(77, 148, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--accent-primary);
    padding: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 1rem;
}

.fullscreen-btn:hover {
    background: rgba(77, 148, 255, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

/* Styles pour les métadonnées du livre */
.book-metadata {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(77, 148, 255, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(77, 148, 255, 0.15);
}

/* Mode table des matières */
.toc-panel {
    position: absolute;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: rgba(0, 26, 51, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 2rem;
    overflow-y: auto;
    z-index: 10;
}

.toc-panel.open {
    right: 0;
}

.toc-header {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.toc-item {
    padding: 0.75rem;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}

.toc-item:hover {
    background: rgba(77, 148, 255, 0.1);
    border-left-color: var(--accent-primary);
    color: var(--text-primary);
}

.toc-item.active {
    background: rgba(77, 148, 255, 0.15);
    border-left-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Raccourcis clavier - aide */
.keyboard-shortcuts {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0, 26, 51, 0.9);
    padding: 1rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.reader-interface:hover .keyboard-shortcuts {
    opacity: 1;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.shortcut-key {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Responsive pour le lecteur */
@media (max-width: 1024px) {
    .toc-panel {
        width: 100%;
        right: -100%;
    }
    
    .navigation-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .reader-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    #reader {
        padding: 0.5rem;
    }
    
    .reader-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .reader-controls {
        gap: 1rem;
        padding: 1rem;
    }
    
    .zoom-controls {
        order: -1;
        width: 100%;
        justify-content: center;
    }
    
    .keyboard-shortcuts {
        display: none; /* Masquer sur mobile */
    }
}