/* MODALE PHILOSOPHIQUE */
#bookModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: #1e1e2e;
    color: #e0e0e0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 25px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid #3a3a4a;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
    background: none;
    border: none;
}

.close-btn:hover {
    color: #ff7b5a;
}

.modal-content h2 {
    margin-top: 0;
    color: #ff7b5a;
    font-size: 1.5rem;
}

.modal-subtitle {
    color: #aaa;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #ff7b5a;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    background: #2a2a3a;
    border: 1px solid #3a3a4a;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #ff7b5a;
}

.btn {
    background: #ff7b5a;
    color: #1e1e2e;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    background: #ff5a3a;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #3a3a4a;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background: #4a4a5a;
}

.result-section {
    margin-top: 20px;
    border-top: 1px solid #3a3a4a;
    padding-top: 20px;
}

.result-section h3 {
    color: #ff7b5a;
    margin-bottom: 15px;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.loading-icon {
    font-size: 48px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 15px;
    font-weight: bold;
    color: #ff7b5a;
}

.loading-hint {
    font-size: 12px;
    color: #888;
}

.book-title {
    color: #ff7b5a;
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.book-subtitle {
    color: #aaa;
    font-style: italic;
    margin-top: 0;
    margin-bottom: 15px;
}

.meta-metaphor {
    background: #2a2a3a;
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    font-style: italic;
    border-left: 3px solid #ff7b5a;
}

.abstract {
    background: #2a2a3a;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    line-height: 1.6;
}

.book-separator {
    border: none;
    height: 1px;
    background: #3a3a4a;
    margin: 20px 0;
}

.chapter {
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 2px solid #3a3a4a;
}

.chapter h5 {
    color: #ff7b5a;
    margin-bottom: 8px;
    font-size: 1rem;
}

.chapter p {
    margin: 0;
    line-height: 1.5;
    color: #ccc;
}

.mechanics-note {
    background: #2a2a2a;
    padding: 12px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.85rem;
    color: #aaa;
    border-top: 1px solid #3a3a4a;
}