body {
    margin: 0;
    padding: 20px;
    background: #eee;
    display: flex;
    justify-content: center;
    font-family: "Scheherazade", Arial, sans-serif;
}

.page {
    background: white;
    padding: 8px;
    border: 8px solid #c65a1f; /* bordure rouge style manuel */
    max-width: 420px;
    width: 100%;
}

/* BOITE DU TITRE */
.title-box {
    border: 3px solid #c96b28;
    padding: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.title-box h2 {
    font-size: 18px;
    color: #a84a1b;
    margin: 0;
}

.arabic-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 45px;
    cursor: pointer;
    transition: 0.15s;
}

.arabic-table td,
.arabic-table th {
    border: 1px solid black;
    padding: 12px;
}

.arabic-table td:hover {
    background: #fff4e6;
    transform: scale(1.05);
}

@media (max-width: 400px) {

    body {
        padding: 10px;
    }

    .page {
        padding: 5px;
        border-width: 4px;
    }

    .arabic-table td {
        font-size: 26px;
        padding: 10px 6px;
    }
}

/* Met en rouge TOUTES les diacritiques arabes */
.diacritics {
    color: red;
}



/* ===== NOUVEAU : BARRE DE NAVIGATION AJOUTÉE À LA FIN ===== */
/* ===== SANS MODIFIER TES STYLES EXISTANTS ===== */

.cours-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 2px solid #d98c40;  /* Harmonisé avec ta couleur */
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.navigation-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: white;
    color: #b45f06;  /* Harmonisé avec ta couleur */
    text-decoration: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid #d98c40;  /* Harmonisé avec ta couleur */
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-btn.disabled {
    opacity: 0.5;
    border-color: #ccc;
    color: #999;
    background: #f5f5f5;
    cursor: default;
    pointer-events: none;
}

.nav-btn:not(.disabled):hover {
    background: #d98c40;  /* Harmonisé avec ta couleur */
    color: white;
    border-color: #b45f06;
}


/* Adaptation mobile pour la barre de navigation */
@media screen and (max-width: 768px) {
    .cours-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
    }

    .navigation-buttons {
        justify-content: center;
        order: 2;
    }

    /* Ton .instruction reste inchangé */
    .document .instruction {
        order: 1;
        margin-bottom: 10px;
    }

    .nav-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .nav-btn span:not(.icon) {
        display: none;
    }

    .nav-btn {
        padding: 8px 10px;
    }

    .nav-btn .icon {
        font-size: 18px;
        margin: 0;
    }

    .page-indicator {
        font-size: 12px;
        padding: 4px 10px;
    }
}
