/* ==========================================================================
   theme/lectures.css — « des lectures » : les onglets, « mes lectures » (la liste par année,
   l'étagère) ; et « livres à lire », la page privée, dans la même DA (le bleu de Kruger, le Times
   blanc). Chargé par page-reading.php quand il y a des livres, et par page-a-lire.php.
   Essais : _apercus/des-lectures/.
   ========================================================================== */

/* --- « livres à lire » : la DA de « des lectures » -------------------------------------------- */
body.tpl-page-a-lire { background: #0f3cc0; color: #fff; }
body.tpl-page-a-lire a, body.tpl-page-a-lire a:visited { color: #fff; }
body.tpl-page-a-lire .page-title, body.tpl-page-a-lire .back a { color: #fff; }

/* --- Les onglets : « des articles », « mes lectures » ; la liste, l'étagère -------------------- */
.lectures-onglets { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1.6rem; margin: -.4rem 0 1.8rem; max-width: 46rem; }
.reading-body .lectures-onglets a { text-decoration: none; color: rgba(255, 255, 255, .7); }
.lectures-onglets a .n { font-size: .7em; vertical-align: .35em; margin-left: .15em; }
.reading-body .lectures-onglets a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.lectures-vue { margin-left: auto; font-size: .8rem; display: flex; gap: .9rem; }
.reading-body .lectures-vue a { color: rgba(255, 255, 255, .5); }
.reading-body .lectures-vue a[aria-current="true"] { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 640px) { .lectures-vue { margin-left: 0; width: 100%; } }

/* --- La liste, par année de lecture --------------------------------------------------------- */
.lectures-chapo { margin: 0 0 1.4rem; }
.lectures-annee { margin: 0 0 2.2rem; }
.lectures-annee[hidden] { display: none; }
.lectures-annee-titre { font-weight: normal; font-size: 1.15rem; margin: 0 0 .9rem; padding-bottom: .3rem; border-bottom: 1px solid rgba(255, 255, 255, .28); max-width: 46rem; }
.lectures-annee-titre .n { font-size: .65em; vertical-align: .35em; margin-left: .3em; color: rgba(255, 255, 255, .7); }
.reading-list .livre-lu { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr); column-gap: .6rem; margin: 0 0 1.1rem; }
.reading-list .livre-lu[hidden] { display: none; }
.livre-mois { color: rgba(255, 255, 255, .7); font-size: .85rem; padding-top: .2rem; }
.livre-lu .reading { display: block; padding-left: 1.6rem; text-indent: -1.6rem; line-height: 1.4; }
.livre-note { display: block; text-indent: 0; font-style: italic; color: rgba(255, 255, 255, .75); font-size: .9rem; margin-top: .25rem; }
/* Le texte entier, libre en ligne : sous la référence, avant la note. */
.livre-pdf { display: table; text-indent: 0; font-size: .9rem; margin-top: .2rem; }
/* Un extrait recopié, propre à la lecture (admin → Livres → « extrait » ; pas dans « des extraits ») :
   sous la référence, au filet, en romain ; la page entre parenthèses, comme une citation. */
.livre-extrait { display: block; text-indent: 0; margin: .5rem 0 .35rem; padding-left: .9rem; border-left: 1px solid rgba(255, 255, 255, .45); font-size: .95rem; line-height: 1.45; }
.livre-extrait-p { display: block; }
.livre-extrait-p + .livre-extrait-p { margin-top: .45em; }
.livre-extrait-page { color: rgba(255, 255, 255, .7); font-size: .9em; white-space: nowrap; }
.livre-extrait + .livre-note { margin-top: .4rem; }
.a-lire .livre-extraits { margin: .1rem 0 0 1.6rem; }
.livre-fiche-extrait { margin: .7rem 0 0; }
.livre-fiche-extrait .livre-extrait { margin: 0; }
@media (max-width: 640px) {
    .reading-list .livre-lu { grid-template-columns: 1fr; }
    .livre-mois { padding: 0 0 .1rem; }
}

/* --- L'étagère ------------------------------------------------------------------------------- */
.biblio[hidden], .biblio-repli[hidden] { display: none; }
.biblio-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.6rem; margin: 0 0 1.2rem; font-size: .9rem; }
.biblio-textes { margin: 1rem 0 0; font-size: .9rem; opacity: .8; }
/* Le filtre par thèmes (lectures-themes.php) : la liste, l'étagère, « livres à lire ». */
.lectures-themes { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; margin: 0 0 1.6rem; font-size: .9rem; color: rgba(255, 255, 255, .7); }
.lectures-themes[hidden] { display: none; }
.lectures-themes button {
    font: inherit; background: none; border: 0; padding: 0; cursor: pointer; color: #fff;
    text-decoration: underline; text-underline-offset: .2em; text-decoration-color: rgba(255, 255, 255, .35);
}
.lectures-themes button[aria-pressed="true"] { text-decoration-color: #fff; text-decoration-thickness: 2px; }
.lectures-themes .n { font-size: .75em; margin-left: .25em; opacity: .6; }
.hors-theme { display: none !important; }
.biblio-reglages { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; color: rgba(255, 255, 255, .7); }
.biblio-reglages button {
    font: inherit; background: none; border: 0; padding: 0 .1rem; cursor: pointer; color: rgba(255, 255, 255, .7);
    text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .2em;
}
.biblio-reglages button:hover { color: #fff; }
.biblio-reglages button[aria-pressed="true"] { color: #fff; text-decoration-color: currentColor; }
.rayon {
    display: flex; align-items: flex-end; gap: 1px; min-height: 2rem;
    padding-top: 1.6rem; border-bottom: 3px solid #fff; margin-bottom: .2rem;
    box-shadow: 0 6px 0 -3px rgba(0, 0, 0, .18);
}
.dos {
    position: relative; flex: none; width: var(--l); height: var(--h); padding: 0; margin: 0;
    background: var(--fond); color: var(--encre); border: 0; border-radius: 1px 1px 0 0; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between; overflow: hidden;
    font-family: "Times New Roman", Times, serif;
    transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
/* Le relief : un peu d'ombre sur les bords, comme un dos arrondi. */
.dos::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 0, 0, .16), rgba(0, 0, 0, 0) 22%, rgba(255, 255, 255, .06) 50%, rgba(0, 0, 0, 0) 78%, rgba(0, 0, 0, .18));
}
.dos-filet { box-shadow: inset 0 14px 0 -12px var(--filet), inset 0 -26px 0 -24px var(--filet); }
.dos:hover { transform: translateY(-6px); }
.dos-choisi, .dos-choisi:hover { transform: translateY(-18px); }
.dos:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* Le titre de bas en haut, à la française. */
.dos-texte {
    flex: 1; min-height: 0; writing-mode: vertical-rl; transform: rotate(180deg);
    display: flex; align-items: center; justify-content: flex-start; gap: .6em; padding: .7em 0;
    white-space: nowrap; overflow: hidden; line-height: 1;
}
@supports (writing-mode: sideways-lr) {
    .dos-texte { writing-mode: sideways-lr; transform: none; }   /* l'apostrophe tourne avec les lettres */
}
.dos-auteur { font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.dos-titre { font-size: 12px; color: var(--titre); overflow: hidden; text-overflow: ellipsis; }
.dos-pied { flex: none; font-size: 7px; letter-spacing: .04em; padding: 0 0 .5em; opacity: .8; white-space: nowrap; }

.biblio-fiche {
    position: relative; max-width: 46rem; margin: 1.4rem 0 2rem; padding: 1.1rem 1.2rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, .28); background: rgba(0, 0, 0, .08);
}
.biblio-fiche[hidden] { display: none; }
.livre-fiche-titre { font-size: 1.5rem; line-height: 1.15; margin: 0 2rem .8rem 0; }
.livre-fiche-apa { font-size: .9rem; margin: 0 0 .7rem; padding-left: 1.6rem; text-indent: -1.6rem; }
.livre-fiche-meta { font-size: .85rem; color: rgba(255, 255, 255, .7); margin: 0; }
.livre-fiche-note { font-style: italic; margin: .7rem 0 0; }
.livre-fiche-pdf { font-size: .85rem; margin: .5rem 0 0; }
.livre-fiche-pdf + .livre-fiche-pdf { margin-top: .15rem; }
.livre-fiche-fermer { position: absolute; top: .4rem; right: .6rem; background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: #fff; font-family: inherit; }

/* --- « livres à lire » ----------------------------------------------------------------------- */
.a-lire-prive { font-size: .8rem; color: rgba(255, 255, 255, .7); margin: 0 0 .6rem; }
.a-lire-prive svg { width: .8em; height: .8em; vertical-align: -.05em; margin-right: .3em; }
.a-lire-outils { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-items: baseline; margin: 0 0 1.8rem; font-size: .9rem; color: rgba(255, 255, 255, .7); }
.a-lire-outils button, .livre-actions button {
    font: inherit; background: none; border: 0; padding: 0; cursor: pointer; color: #fff;
    text-decoration: underline; text-underline-offset: .2em; text-decoration-color: rgba(255, 255, 255, .5);
}
.a-lire-outils button[hidden] { display: none; }
.a-lire-outils button[aria-pressed="true"] { text-decoration-color: #fff; text-decoration-thickness: 2px; }
.a-lire .livre { margin: 0 0 1.5rem; max-width: 46rem; }
.a-lire .livre[hidden] { display: none; }
.a-lire .reading { padding-left: 1.6rem; text-indent: -1.6rem; line-height: 1.4; }
.livre-meta { font-size: .85rem; color: rgba(255, 255, 255, .7); margin: .25rem 0 0 1.6rem; }
.livre-actions { margin: .35rem 0 0 1.6rem; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; }
.a-lire .ou { margin: .4rem 0 0 1.6rem; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
.a-lire .ou[hidden] { display: none; }
.a-lire .livre.est-tire { outline: 1px solid #fff; outline-offset: .6rem; }

@media (prefers-reduced-motion: reduce) { .dos { transition: none; } }
