/* Pensé pour l'encre électronique : noir sur blanc, aucune animation, gros boutons. */
* { box-sizing: border-box; transition: none !important; animation: none !important; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: #000; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.4; }
[hidden] { display: none !important; }
button, select, label.gros { font: inherit; color: #000; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* ---------- Bibliothèque ---------- */
#biblio { max-width: 40rem; margin: 0 auto; padding: 1.5rem 1.2rem 3rem; }
h1 { font-size: 2rem; margin: .5rem 0 1.5rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 .6rem; }
.gros { display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; padding: 1.1rem 1.2rem; margin: 0 0 1rem;
  background: #fff; border: 3px solid #000; border-radius: 14px; font-size: 1.3rem; cursor: pointer; }
.gros.principal { background: #000; color: #fff; }
.gros .icone { font-size: 2rem; line-height: 1; width: 2.2rem; text-align: center; }
.gros small { font-size: .85rem; }
#continuer-titre { font-size: 1.05rem; }
.note { color: #333; font-size: .95rem; }
.alerte { border: 2px solid #000; border-radius: 10px; padding: .8rem 1rem; background: #f0f0f0; }
#livres { list-style: none; padding: 0; margin: 0; }
#livres li { display: flex; align-items: stretch; border-bottom: 1px solid #999; }
#livres .ouvrir { flex: 1; text-align: left; background: none; border: 0; padding: .9rem .2rem; font-size: 1.1rem; }
#livres .ouvrir small { display: block; color: #333; font-size: .9rem; }
#livres .retirer { background: none; border: 0; font-size: 1.3rem; padding: 0 .9rem; color: #555; }
.lien { background: none; border: 0; text-decoration: underline; font-size: 1rem; padding: .8rem 0; margin-top: 1rem; }

/* ---------- Lecteur ---------- */
#lecteur { min-height: 100vh; }
.btn { background: #fff; border: 2px solid #000; border-radius: 10px; padding: .45rem .8rem; font-size: 1.1rem; min-height: 2.8rem; min-width: 2.8rem; }
.barre-haut { position: fixed; top: 0; left: 0; right: 0; display: flex; gap: .5rem; align-items: center; padding: .5rem .7rem; background: #fff; border-bottom: 2px solid #000; z-index: 5; }
.barre-haut .chap { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center; }
.barre-bas { position: fixed; bottom: 0; left: 0; right: 0; display: flex; gap: 1.2rem; align-items: center; justify-content: center;
  padding: .6rem .7rem calc(.6rem + env(safe-area-inset-bottom)); background: #fff; border-top: 2px solid #000; z-index: 5; }
.rond { border-radius: 50%; width: 3.6rem; height: 3.6rem; font-size: 1.5rem; padding: 0; }
.rond.grand { width: 5rem; height: 5rem; font-size: 2.2rem; background: #000; color: #fff; }
#progres { position: absolute; right: .8rem; font-size: .85rem; color: #333; }

/* Mode page */
#texte { max-width: 42rem; margin: 0 auto; padding: 4.5rem 1.2rem 9rem; font-family: Georgia, "Times New Roman", serif;
  font-size: calc(1.35rem * var(--taille, 1)); line-height: 1.6; }
#texte p { margin: 0 0 .9em; }
#texte p.titre { font-weight: bold; font-size: 1.2em; margin: 1.2em 0 .8em; }
#texte .ph { cursor: pointer; }
#texte .ph.actu { background: #ddd; color: #000; box-decoration-break: clone; -webkit-box-decoration-break: clone; outline: 2px solid #ddd; }

/* Mode karaoké */
#karaoke { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; max-width: 46rem; margin: 0 auto;
  padding: 5rem 1.4rem 9rem; font-family: Georgia, "Times New Roman", serif; }
#k-actuelle { font-size: calc(2.1rem * var(--taille, 1)); line-height: 1.45; font-weight: 600; margin: 1rem 0; }
.k-autre { font-size: calc(1.15rem * var(--taille, 1)); color: #555; margin: 0; line-height: 1.4; }
#k-avant { min-height: 1.4em; }

/* Mot en cours */
.mot.lu { background: #000; color: #fff; border-radius: 4px; box-shadow: 0 0 0 2px #000; }

/* ---------- Panneaux ---------- */
.panneau { position: fixed; inset: 0; background: #fff; z-index: 10; overflow-y: auto; padding: 0 1.2rem 2rem; }
.panneau-tete { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; padding: .6rem 0; border-bottom: 2px solid #000; }
.panneau-tete h2 { margin: 0; }
#liste-chap { padding-left: 2.2rem; font-size: 1.15rem; }
#liste-chap li { padding: .2rem 0; }
#liste-chap button { background: none; border: 0; text-align: left; padding: .6rem 0; width: 100%; font-size: inherit; }
#liste-chap li.ici button { font-weight: bold; text-decoration: underline; }
.reglage { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid #999; font-size: 1.15rem; max-width: 36rem; }
.reglage.colonne { flex-direction: column; align-items: stretch; }
.choix { display: flex; gap: .6rem; align-items: center; }
.choix b { min-width: 3.5rem; text-align: center; }
.btn.choisi { background: #000; color: #fff; }
select { font-size: 1.05rem; padding: .6rem; border: 2px solid #000; border-radius: 10px; background: #fff; width: 100%; }

/* Téléchargement de la voix intégrée */
#piper-etat{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);max-width:92vw;background:#000;color:#fff;padding:10px 16px;border-radius:10px;font-size:15px;z-index:50;text-align:center}
#piper-etat[hidden]{display:none}
