/* ==========================================================================
   1. LAYOUT & BASE
   ========================================================================== */
.book-page {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

@media (max-width: 1024px) {
    .book-page { padding: 6rem 5% 2rem; }
}


/* ==========================================================================
   2. HERO SECTION (Cover & Pitch)
   ========================================================================== */
.book-hero {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 80px;
    background: rgba(15, 12, 41, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.book-header h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--text-bright);
    line-height: 1.1;
}

.pitch {
    margin-top: 1.5rem;
    color: #f1f1f1;
    line-height: 1.8;
    font-size: 1.15rem;
}

.book-cover img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 20px rgba(108, 99, 255, 0.2);
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   3. PROGRESSION & GRILLES
   ========================================================================== */
.status-badge {
    background: var(--accent-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
}

.mana-bar {
    width: 100%; height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px; margin-top: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.mana-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #a29dff);
    box-shadow: 0 0 15px var(--accent-color);
}

.races-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.race-card {
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.race-card:hover { transform: translateY(-5px); border-color: var(--accent-color); }

/* ==========================================================================
   4. SYSTÈME DE MAGIE
   ========================================================================== */
.magic-system { margin-top: 4rem; padding: 40px; }

.magic-levels {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    gap: 20px;
}

.level { text-align: center; }

.level span {
    width: 60px; height: 60px;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; margin: 0 auto 10px;
    font-weight: bold;
}

.level.active span {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-color);
    color: var(--accent-color);
}

/* ==========================================================================
   5. TABLE DES MATIÈRES & BOUTONS
   ========================================================================== */
.chapters-list {
    display: flex; flex-direction: column; gap: 12px;
    max-width: 800px; margin: 2rem auto;
}

.chapter-link {
    display: flex; align-items: center;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px; text-decoration: none;
    transition: 0.3s;
}

.chapter-link:hover {
    background: rgba(108, 99, 255, 0.1);
    transform: translateX(10px);
    border-color: var(--accent-color);
}

.ch-number { font-family: 'Courier New', monospace; color: var(--accent-color); margin-right: 20px; font-weight: bold; }
.ch-title { flex-grow: 1; color: #FFF; font-weight: 500; }
.ch-status { font-size: 0.7rem; text-transform: uppercase; opacity: 0.6; }

/* FIX VOIR PLUS */
.is-hidden { display: none !important; }

.show-more-btn {
    display: block; margin: 2rem auto;
    background: rgba(108, 99, 255, 0.1);
    border: 1px dashed var(--accent-color);
    color: var(--accent-color);
    padding: 15px 30px; border-radius: 12px;
    cursor: pointer; font-weight: 600; transition: 0.3s;
}

.show-more-btn:hover { background: var(--accent-color); color: white; border-style: solid; }

/* ==========================================================================
   6. TROU NOIR (SINGULARITÉ) - FIXÉ
   ========================================================================== */
.singularity-container {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw; height: 100vh;
    z-index: -2;
    opacity: 0.6;
    pointer-events: none;
    display: flex; justify-content: center; align-items: center;
    /* purple background*/ 
    background: rgba(20, 12, 41, 1);
    background-image: radial-gradient(circle at 50% 50%, rgba(108, 99, 255, 0.1) 0%, transparent 80%);
}

.black-hole {
    position: relative;
    width: 400px; height: 400px;
    display: flex; justify-content: center; align-items: center;
}

.event-horizon {
    position: absolute;
    width: 150px; height: 150px;
    background: #000;
    border-radius: 50%;
    z-index: 5;
    box-shadow: 0 0 50px #000, 0 0 20px rgba(108, 99, 255, 0.5);
}

.accretion-disk {
    position: absolute;
    width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 30%, rgba(108, 99, 255, 0.2) 40%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    animation: rotateVortex 10s linear infinite;
}

@keyframes rotateVortex {
    from { transform: rotate(0deg) scale(1); }
    to { transform: rotate(360deg) scale(1.1); }
}

/* ==========================================================================
   7. MEDIA QUERIES (MOBILE)
   ========================================================================== */
@media (max-width: 850px) {
    .book-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 30px 20px;
    }

    .book-cover { max-width: 260px; margin: 0 auto; }
    .book-header h1 { font-size: 2.5rem; }
    .pitch { font-size: 1rem; text-align: left; }

    .magic-levels {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }

    .level { display: flex; align-items: center; gap: 20px; }
    .level span { margin: 0; width: 50px; height: 50px; }

    .ch-status { display: none; }
    
    .black-hole { width: 250px; height: 250px; }
    .event-horizon { width: 80px; height: 80px; }
    .singularity-container { opacity: 0.4; }
}

