* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 17px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

body { min-height: 100dvh; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
img { display: block; }
[hidden] { display: none !important; }

/* ---------- Scène et en-têtes ---------- */

#scene {
  padding: calc(var(--haut) + 12px) max(var(--marge), env(safe-area-inset-right, 0px)) calc(max(10px, var(--bas) - 10px) + 66px) max(var(--marge), env(safe-area-inset-left, 0px));
  max-width: 760px;
  margin: 0 auto;
}

.titre { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 8px 0 16px; }
/* Un nom de rangée qui ouvre sa liste complète. */
.sous-titre .chevron { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; margin: -8px 0; }
.sous-titre .chevron::after { width: 6px; height: 6px; }
/* Un bouton ne reprend pas de lui-même les capitales de son titre. */
.sous-titre button { text-transform: inherit; letter-spacing: inherit; }
.sous-titre { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-2); margin: 26px 4px 8px; }
.discret { color: var(--texte-2); font-size: 15px; }
.centre { text-align: center; padding: 48px 12px; }
.entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- Barre d'onglets flottante ---------- */

/* Comme les apps d'iOS 26 : une capsule fine pour les onglets, la recherche à part dans un rond.
   Elle descend dans la zone de l'indicateur d'accueil (34 px → 24 px du bord) et garde 10 px
   sur les iPhone à bouton, où cette zone vaut 0. */
#barre {
  --barre: 46px;
  --assise: max(10px, calc(var(--bas) - 10px));
  position: fixed;
  left: max(20px, env(safe-area-inset-left, 0px));
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: var(--assise);
  max-width: 520px;
  margin-inline: auto;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}
#barre > * { pointer-events: auto; }
/* Web app installée sur iPhone (voir app.js) : cachée le temps que la fenêtre prenne sa taille ;
   si iOS la laisse trop courte, il n'y a pas d'indicateur d'accueil à éviter au bas de la fenêtre. */
#barre { transition: opacity .2s; }
.lancement #barre { opacity: 0; transition: none; }
.fenetre-courte #barre { --assise: 8px; }
.fenetre-courte .lecteur-barre.bas { bottom: 14px; }
#onglets { display: flex; gap: 2px; padding: 3px; height: var(--barre); }
#onglets a {
  display: grid;
  place-items: center;
  width: 64px;
  height: 100%;
  border-radius: 999px;
  color: var(--texte-2);
  transition: background .25s, color .25s;
}
#barre svg { width: 21px; height: 21px; fill: currentColor; }
#onglets a.actif { color: var(--accent); background: var(--verre-teinte); box-shadow: inset 0 0 0 .5px var(--verre-bord); }
#loupe { display: grid; place-items: center; width: var(--barre); height: var(--barre); flex: none; color: var(--texte-2); }
#loupe.actif { color: var(--accent); }

/* ---------- Boutons ---------- */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}
.bouton svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bouton.suivie { color: var(--accent); }
.bouton.plein { background: var(--accent); color: #fff; border-radius: 999px; }
.bouton.large { width: 100%; }
.bouton[disabled] { opacity: .45; pointer-events: none; }
.rond { width: 44px; height: 44px; display: grid; place-items: center; flex: none; }
.rond svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Champs ---------- */

.champ {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  border-radius: 14px;
  background: var(--fond-2);
  box-shadow: inset 0 0 0 .5px var(--trait);
}
.champ::placeholder { color: var(--texte-2); }
.formulaire { display: grid; gap: 12px; }

/* ---------- Grille de couvertures ---------- */

.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 12px; }
.carte { display: block; position: relative; }
.carte .couverture {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  background: var(--fond-2);
  box-shadow: inset 0 0 0 .5px var(--trait), 0 4px 14px rgba(0, 0, 0, .25);
}
.carte .nom {
  margin-top: 7px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pastille {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 24px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.pastille small { font-size: inherit; font-weight: 500; opacity: .7; }
.carte .marque { position: absolute; top: 6px; left: 6px; padding: 2px 8px; font-size: 11px; font-weight: 700; color: #fff; }

.defile { display: flex; gap: 12px; overflow-x: auto; padding: 4px var(--marge) 10px; margin: 0 calc(-1 * var(--marge)); scrollbar-width: none; }
.defile::-webkit-scrollbar { display: none; }
.defile .carte { flex: 0 0 104px; }

/* ---------- Listes ---------- */

/* Listes groupées, à la manière des réglages d'iOS 26 : grands arrondis, lignes hautes, filets en retrait. */
.liste { background: var(--fond-2); border-radius: 24px; overflow: hidden; box-shadow: inset 0 0 0 .5px var(--trait); }
.ligne { display: flex; align-items: center; gap: 12px; padding: 11px 16px; min-height: 52px; position: relative; }
button.ligne { width: 100%; text-align: left; }
.ligne + .ligne::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: .5px; background: var(--trait); }
/* Sous une ligne à symbole, le filet commence au texte. */
.ligne + .ligne:has(> .tuile)::before { left: 58px; }
.tuile { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: rgba(120, 120, 128, .2); box-shadow: inset 0 0 0 .5px var(--trait); }
.tuile svg { width: 19px; height: 19px; fill: none; stroke: var(--teinte); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.vignette { flex: none; width: 40px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 7px; background: var(--fond); }
.ligne .corps { flex: 1; min-width: 0; }
.ligne .nom { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne .detail { font-size: 13px; color: var(--texte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne.lu .nom { color: var(--texte-2); }
.ligne img.icone { width: 34px; height: 34px; border-radius: 8px; background: var(--fond); }
.coche { padding: 12px 6px 12px 2px; margin: -12px 0; flex: none; }
.point { display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.ligne.lu .point { background: transparent; box-shadow: inset 0 0 0 1.5px var(--trait); }
.action { color: var(--accent); font-weight: 600; font-size: 15px; padding: 8px 4px; flex: none; white-space: nowrap; }
/* Une ligne entière qui sert de bouton garde la largeur, le retrait et le corps de texte des autres lignes. */
.ligne.action { width: 100%; padding: 11px 16px; font-size: inherit; font-weight: 500; text-align: left; white-space: normal; }
.ligne.action.centree { justify-content: center; text-align: center; }
.action.danger { color: var(--alerte); }
.jauge { height: 3px; border-radius: 2px; background: var(--trait); margin-top: 5px; overflow: hidden; }
.jauge i { display: block; height: 100%; background: var(--accent); }

/* Téléchargement d'un chapitre sur l'appareil : flèche, anneau d'avancement, puis pastille pleine. */
.telechargement { flex: none; width: 40px; height: 40px; margin: -8px -8px -8px 0; display: grid; place-items: center; color: var(--texte-2); }
.telechargement svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.telechargement.pret { color: var(--accent); }
/* Hors ligne : un chapitre qui n'est pas sur l'appareil ne s'ouvrira pas. */
.ligne.injoignable .corps { opacity: .4; }
.telechargement.actif i {
  width: 20px; height: 20px; border-radius: 50%;
  background: conic-gradient(var(--accent) var(--part, 0%), var(--trait) 0);
  -webkit-mask: radial-gradient(circle, transparent 6.5px, #000 7px);
  mask: radial-gradient(circle, transparent 6.5px, #000 7px);
}

/* ---------- Fiche série ---------- */

.fiche-fond { position: fixed; inset: 0 0 auto 0; height: 46vh; z-index: -1; background-size: cover; background-position: center 20%; filter: blur(30px) saturate(140%); opacity: .5; transform: scale(1.2); -webkit-mask-image: linear-gradient(#000 30%, transparent); mask-image: linear-gradient(#000 30%, transparent); }
/* Bandeau : la couverture flotte à gauche, le titre, les mentions et le résumé tiennent dans sa hauteur. */
.fiche-tete { display: flow-root; margin-top: 54px; }
.fiche-tete img { float: left; width: 118px; margin-right: 14px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); background: var(--fond-2); }
.fiche-tete h1 { font-size: 22px; line-height: 1.15; margin: 0 0 4px; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fiche-tete .discret { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etiquette { padding: 4px 10px; font-size: 12.5px; font-weight: 600; border-radius: 999px; background: var(--fond-2); box-shadow: inset 0 0 0 .5px var(--trait); color: var(--texte-2); }
/* Le nombre de lignes est calé sur la hauteur de la couverture (voir bandeau() dans ui.js). Déplié, le résumé passe dessous. */
.resume { margin: 7px 0 0; color: var(--texte-2); font-size: 14px; line-height: 1.35; white-space: pre-line; cursor: pointer; display: -webkit-box; -webkit-line-clamp: var(--lignes, 4); -webkit-box-orient: vertical; overflow: hidden; }
.resume.ouvert { display: block; overflow: visible; }
.reprise { margin-top: 16px; }
.reprise span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bilan { display: flex; align-items: center; gap: 8px; margin: 16px 4px 0; color: var(--texte-2); font-size: 15px; }
.bilan svg { flex: none; width: 18px; height: 18px; fill: none; stroke: #30d158; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* « J'en suis à » : la valeur s'affiche en texte (coupée proprement), le sélecteur invisible couvre la ligne. */
.ligne.reglage.choix > .libelle { flex: none; }
.ligne.reglage.choix > .valeur { color: var(--accent); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne.choix select { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; padding: 0; opacity: 0; cursor: pointer; }
/* Une longue série : seules les lignes à l'écran sont dessinées. */
.chapitres .ligne { content-visibility: auto; contain-intrinsic-size: auto 56px; }
.actions { display: flex; gap: 10px; margin: 16px 0 4px; }
.actions .bouton { flex: 1; }

.flottant { position: fixed; top: calc(var(--haut) + 10px); z-index: 25; }
.flottant.gauche { left: 14px; }
.flottant.droite { right: 14px; display: flex; align-items: center; gap: 8px; }

/* ---------- Annonce ---------- */

#annonce {
  position: fixed;
  left: 50%;
  top: calc(var(--haut) + 12px);
  transform: translateX(-50%);
  z-index: 60;
  padding: 10px 18px;
  font-size: 14.5px;
  font-weight: 600;
  max-width: calc(100vw - 32px);
  text-align: center;
}

/* Dans un lecteur, sous la barre du haut plutôt que dessus. */
body.lecture #annonce { top: calc(var(--haut) + 72px); }

/* ---------- Attente ---------- */

.attente { width: 26px; height: 26px; margin: 40px auto; border-radius: 50%; border: 2.5px solid var(--trait); border-top-color: var(--texte-2); animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* ---------- Lecteur ---------- */

body.lecture { background: #000; }
body.lecture #scene { padding: 0; max-width: none; }
#bande {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  /* Le lecteur compense lui-même les changements de hauteur : l'ancrage automatique du
     navigateur (absent de Safari, présent ailleurs) ferait double emploi. */
  overflow-anchor: none;
  background: #000;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
#bande .colonne { margin: 0 auto; max-width: 820px; padding: 0 var(--bord, 0px); }
.planche { width: 100%; background: #0c0c0e; overflow: hidden; }
.planche img { width: 100%; height: 100%; -webkit-user-drag: none; pointer-events: none; }
.planche.erreur { display: grid; place-items: center; color: #8e8e93; font-size: 14px; pointer-events: auto; }
/* Page par page : la bande est couchée, une planche par écran, entière. */
#bande.pages { overflow: auto hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
#bande.pages::-webkit-scrollbar { display: none; }
#bande.pages .colonne { display: flex; height: 100%; max-width: none; padding: 0; }
#bande.pages .colonne > * { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
#bande.pages .planche { height: 100%; aspect-ratio: auto !important; background: #000; }
#bande.pages .planche img { object-fit: contain; }
#bande.pages .jonction, #bande.pages .fin { display: grid; place-content: center; padding: 20px; }
.jonction { padding: 44px 20px; text-align: center; color: #8e8e93; font-size: 14px; }
.jonction b { display: block; color: #f5f5f7; font-size: 17px; margin-top: 4px; }
.fin { padding: 60px 20px calc(var(--bas) + 120px); text-align: center; color: #8e8e93; }

.lecteur-barre { position: fixed; left: 14px; right: 14px; z-index: 40; display: flex; align-items: center; gap: 10px; transition: opacity .25s, transform .3s cubic-bezier(.2, .9, .3, 1); color: #f5f5f7; }
.lecteur-barre.haut { top: calc(var(--haut) + 10px); }
.lecteur-barre.bas { bottom: calc(var(--bas) + 14px); padding: 12px 18px; }
.lecteur-barre .legende { flex: 1; min-width: 0; padding: 9px 16px; }
.lecteur-barre .legende b, .lecteur-barre .legende span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lecteur-barre .legende b { font-size: 15px; }
.lecteur-barre .legende span { font-size: 12.5px; opacity: .7; }
.lecteur-barre input[type=range] { flex: 1; accent-color: #fff; min-width: 0; }
.lecteur-barre .compte { font-size: 13px; font-variant-numeric: tabular-nums; opacity: .8; white-space: nowrap; }
body.immersion .lecteur-barre { opacity: 0; pointer-events: none; }
body.immersion .lecteur-barre.haut { transform: translateY(-16px); }
body.immersion .lecteur-barre.bas { transform: translateY(16px); }
/* Dans le lecteur, le verre est toujours sombre : il repose sur des planches, pas sur l'interface. */
body.lecture:not(.liseuse) .verre { --verre-teinte: rgba(40, 40, 46, .45); --verre-bord: rgba(255, 255, 255, .2); --verre-reflet: rgba(255, 255, 255, .34); --verre-reflet-bas: rgba(255, 255, 255, .06); }

/* ---------- Liseuse (livres) ---------- */

/* Un livre se lit sur le fond de l'app, clair ou sombre, pas sur le noir des planches. */
body.liseuse { background: var(--fond); }
#page { position: fixed; inset: 0; padding: var(--haut) 0 var(--bas); background: var(--fond); }
#page foliate-view { display: block; width: 100%; height: 100%; }
body.liseuse .lecteur-barre { color: var(--texte); }
body.liseuse .lecteur-barre input[type=range] { accent-color: var(--accent); }
.lecteur-barre .rond b { font-size: 16px; font-weight: 600; }
.reglages-texte { position: fixed; z-index: 41; top: calc(var(--haut) + 62px); right: 14px; width: min(320px, calc(100vw - 28px)); padding: 4px 0; }
.reglages-texte .rond { font-weight: 600; }
body.immersion .reglages-texte { display: none; }

/* ---------- Réglages ---------- */

.reglage { justify-content: space-between; }
.reglage > span:not(.tuile):not(.discret) { flex: 1; min-width: 0; }
/* Ligne qui ouvre une sous-page. */
.chevron::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 0 -2px; border: solid var(--texte-2); border-width: 2px 2px 0 0; transform: rotate(45deg); opacity: .6; }
.reglage > .discret { flex: none; max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reglage input[type=range] { max-width: 45%; accent-color: var(--accent); }
.reglage select { -webkit-appearance: none; appearance: none; max-width: 58%; padding: 6px 0; border: 0; outline: 0; background: none; color: var(--accent); text-align: right; text-align-last: right; text-overflow: ellipsis; }
/* Interrupteur d'iOS 26 : piste basse et large, bouton en pilule. */
.bascule { appearance: none; -webkit-appearance: none; width: 64px; height: 28px; margin: 0; border-radius: 999px; background: rgba(120, 120, 128, .32); position: relative; transition: background .25s; flex: none; }
.bascule::after { content: ""; position: absolute; top: 2px; left: 2px; width: 38px; height: 24px; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .28); transition: transform .28s cubic-bezier(.3, 1.3, .5, 1); }
.bascule:checked { background: #30d158; }
.bascule:checked::after { transform: translateX(22px); }
.bascule:disabled { opacity: .45; }

/* ---------- Catalogue ---------- */

.carte .legende { font-size: 12px; color: var(--texte-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.defile.large .carte { flex-basis: 118px; }
.etiquette.bon { color: #30d158; }
.etiquette.moyen { color: #ff9f0a; }
.ligne .etiquette { flex: none; }
.ligne.source { width: 100%; text-align: left; }
.ligne.choisie .nom { color: var(--accent); }
.recherche-source { display: flex; align-items: center; gap: 12px; padding: 14px 4px; color: var(--texte-2); font-size: 15px; }
.recherche-source .attente { margin: 0; width: 18px; height: 18px; flex: none; }

/* ---------- Installation ---------- */

.voile { position: fixed; inset: 0; z-index: 70; display: grid; align-items: end; justify-items: center; padding: 12px 12px calc(var(--bas) + 12px); background: rgba(0, 0, 0, .45); animation: voile .25s; }
/* Une feuille porte du texte : le verre y est presque opaque. */
.feuille { width: 100%; max-width: 440px; padding: 24px 20px 18px; border-radius: 32px; background: color-mix(in srgb, var(--fond-2) 82%, transparent); text-align: center; animation: feuille .38s cubic-bezier(.2, .9, .3, 1); }
.feuille > img { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 15px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.feuille h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.01em; }
.feuille p { margin: 0; }
.etape { display: flex; gap: 14px; min-height: 124px; margin-top: 18px; padding: 16px; border-radius: 20px; background: var(--fond); box-shadow: inset 0 0 0 .5px var(--trait); text-align: left; }
.etape svg { flex: none; width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.etape p { margin-top: 4px; }
.points { display: flex; justify-content: center; gap: 7px; margin-top: 14px; }
.points i { width: 7px; height: 7px; border-radius: 50%; background: rgba(120, 120, 128, .35); }
.points i.actif { background: var(--accent); }
.feuille .pied { margin-top: 12px; font-size: 13px; }
@keyframes voile { from { opacity: 0; } }
@keyframes feuille { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 700px) { .voile { align-items: center; } }
@media (prefers-reduced-motion: reduce) { .voile, .feuille { animation: none; } }

/* ---------- Ordinateur ---------- */

/* Fenêtre large (app Mac, navigateur de bureau, iPad couché) : la navigation monte en haut de la
   fenêtre, comme dans les apps de macOS, et les couvertures grandissent. Un iPhone couché reste
   en dessous de ce seuil. */
@media (min-width: 1000px) {
  #scene { max-width: 1080px; padding-inline: 32px; padding-bottom: 48px; }
  body:has(#barre:not([hidden])) #scene { padding-top: 84px; }
  #barre { top: 18px; bottom: auto; justify-content: center; }
  #annonce { top: auto; bottom: 28px; }
  /* Les boutons flottants suivent la colonne de contenu plutôt que le bord de la fenêtre. */
  .flottant.gauche { left: max(14px, calc(50vw - 540px + 26px)); }
  .flottant.droite { right: max(14px, calc(50vw - 540px + 26px)); }
  .grille { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 26px 20px; }
  .defile { gap: 18px; }
  .defile .carte, .defile.large .carte { flex-basis: 156px; }
  .carte .nom { font-size: 14px; }
  .formulaire { max-width: 420px; }
  .fiche-tete img { width: 170px; }
  .fiche-tete h1 { font-size: 32px; }
  .fiche-tete img { margin-right: 22px; }
  .fiche-tete .discret { font-size: 15px; }
  .resume { font-size: 15px; max-width: 70ch; }
  .actions, .reprise { max-width: 520px; }
  .lecteur-barre { max-width: 820px; margin-inline: auto; }
  .reglages-texte { right: max(14px, calc(50vw - 410px)); }
}

/* Souris ou pavé tactile : ce qui se clique réagit au survol. */
@media (hover: hover) {
  .carte .couverture { transition: transform .25s cubic-bezier(.2, .9, .3, 1), filter .2s; }
  .carte:hover .couverture { transform: translateY(-3px); filter: brightness(1.08); }
  a.ligne:hover, button.ligne:hover, .ligne:has(> a.corps:hover) { background: rgba(120, 120, 128, .1); }
  #onglets a:hover, #loupe:hover { color: var(--texte); }
  #onglets a.actif:hover, #loupe.actif:hover { color: var(--accent); }
}

/* Choix de la catégorie (mangas, BD, livres) en tête de l'accueil et de la bibliothèque. */
/* Sous le titre, sur la largeur de l'écran : à côté de lui, il débordait sur un iPhone. */
.segments { display: flex; padding: 3px; gap: 2px; max-width: 440px; }
.segments button { flex: 1; min-height: 34px; padding: 0 8px; font-size: 14px; font-weight: 600; border-radius: 999px; color: var(--texte-2); white-space: nowrap; }
.segments button[aria-selected="true"] { background: var(--accent); color: #fff; }
