/* Anointed Romances : refonte portée depuis prototype-navigation (voir docs/design-ui-ux.md).
   Jetons sémantiques de shadcn/ui, accent violet, panneaux pastel, thème graphite, polices Onest et Public Sans
   hébergées par le site. Tailles : texte courant 16 px, secondaire 14 px, étiquettes 13 px, cibles tactiles 44 px.
   Le thème se pose sur <html data-theme="light|dark"> et jamais sur un enfant. */

@font-face { font-family: Onest; src: url("/fonts/Onest.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/fonts/PublicSans.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --background: #f5f5f6;
  --card: #ffffff;
  --foreground: #17181c;
  --muted-foreground: #62656f;
  --primary: #17181c;
  --primary-hover: #35373e;
  --primary-foreground: #ffffff;
  --border: #e4e5e9;
  --input: #eeeff2;
  --ring: #2f6fed;
  --destructive: #b4233b;
  --success: #19714d;
  --info: #2f6fed;
  --warning: #b45309;
  --badge: #d92d20;
  --soft: #f0f0f2;
  --lavender: #e9eaee;
  --lavender-ink: #2a2c33;
  --mint: #e8f4ed;
  --mint-ink: #245d47;
  --peach: #f9ede5;
  --peach-ink: #835235;
  --dock: #ffffff;
  --dock-ink: #17181c;
  --dock-actif: #ebebee;
  --radius: 1.125rem;
  --taille: 20px;
  --police-titre: Onest, system-ui, sans-serif;
  --police-texte: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #0e0f11; --card: #18191d; --foreground: #f0f1f5; --muted-foreground: #a2a5b0; --primary: #f0f1f5;
    --primary-hover: #ffffff; --primary-foreground: #121316; --border: #2a2c33; --input: #202127; --ring: #6ea0ff;
    --destructive: #ff9eaa; --success: #91d6b2; --info: #8db4ff; --warning: #f2b66b; --badge: #ef5a4d; --soft: #202127; --lavender: #2a2b31; --lavender-ink: #e6e7ec;
    --mint: #1a3027; --mint-ink: #a8d8c2; --peach: #34251e; --peach-ink: #ecc2a6; --dock: #202127; --dock-ink: #f0f1f5; --dock-actif: #33353d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --background: #0e0f11; --card: #18191d; --foreground: #f0f1f5; --muted-foreground: #a2a5b0; --primary: #f0f1f5;
  --primary-hover: #ffffff; --primary-foreground: #121316; --border: #2a2c33; --input: #202127; --ring: #6ea0ff;
  --destructive: #ff9eaa; --success: #91d6b2; --info: #8db4ff; --warning: #f2b66b; --badge: #ef5a4d; --soft: #202127; --lavender: #2a2b31; --lavender-ink: #e6e7ec;
  --mint: #1a3027; --mint-ink: #a8d8c2; --peach: #34251e; --peach-ink: #ecc2a6; --dock: #202127; --dock-ink: #f0f1f5; --dock-actif: #33353d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* Masquer uniquement la barre du document, sans supprimer son défilement. */
html { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--background); color: var(--foreground); font: 16px/1.6 var(--police-texte); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--police-titre); font-weight: 600; letter-spacing: -.035em; margin: 0 0 .6rem; }
h1 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.15; }
h2 { font-size: 24px; line-height: 1.3; }
h3 { font-size: 18px; line-height: 1.35; letter-spacing: -.02em; }
p { margin: 0 0 1.1rem; }
.discret, small { color: var(--muted-foreground); }
small { font-size: 14px; }
svg { width: 21px; height: 21px; flex-shrink: 0; vertical-align: middle; }
button svg, a svg { pointer-events: none; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
::selection { background: color-mix(in srgb, var(--info) 28%, transparent); color: inherit; }
[hidden] { display: none !important; }

.saut { position: fixed; left: 12px; top: -120px; padding: 12px 16px; background: var(--card); border-radius: 10px; z-index: 100; }
.saut:focus { top: 12px; }

/* Boutons : arrondis, 48 px de haut, trois variantes. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px; padding: .75rem 1.4rem;
  border: 1px solid transparent; border-radius: 999px; background: var(--primary); color: var(--primary-foreground);
  font: 600 15px/1.3 var(--police-texte); text-align: center; transition: background-color .15s; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--primary-hover); }
.btn.outline { background: var(--card); border-color: var(--border); color: var(--foreground); }
.btn.outline:hover { background: var(--soft); }
.btn.soft { background: var(--lavender); color: var(--lavender-ink); }
.btn.soft:hover { background: color-mix(in srgb, var(--lavender-ink) 14%, var(--lavender)); }
.btn.plein { width: 100%; }
.btn:disabled { cursor: not-allowed; opacity: .5; }
.btn.is-loading { pointer-events: none; opacity: .8; }
.btn.is-loading::after { content: ""; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tourner .8s linear infinite; }
@keyframes tourner { to { transform: rotate(360deg); } }
.btn-icone { flex: none; width: 44px; min-width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--card); color: var(--foreground); }
.btn-icone:hover { background: var(--soft); }
.lien:hover { text-decoration: underline; text-underline-offset: 3px; }
.lien { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; color: var(--primary); font-weight: 600; font-size: 15px; }
.lien svg { width: 17px; height: 17px; }
.lien:hover { text-decoration: underline; text-underline-offset: 5px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px; background: var(--soft); color: var(--muted-foreground); font-size: 13px; line-height: 1.4; white-space: nowrap; }
.tag.violet { background: var(--lavender); color: var(--lavender-ink); }
.tag.vert { background: var(--mint); color: var(--mint-ink); }

/* Coque : rail à gauche sur grand écran, barre du haut, navigation flottante sur téléphone. */
.rail { position: fixed; inset: 0 auto 0 0; width: 88px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 24px 12px 18px; background: var(--card); border-right: 1px solid var(--border); z-index: 40; }
.rail .marque { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 26px; border-radius: 15px; background: var(--foreground); color: var(--card); --logo-coeur: #e0566c; }
.rail .marque svg { width: 32px; height: auto; }
.rail a, .rail button { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 14px; background: none; color: var(--muted-foreground); }
.rail a:hover, .rail button:hover { color: var(--primary); background: var(--soft); }
.rail a[aria-current="page"] { color: var(--primary); background: var(--lavender); }
.rail .etiquette-bulle { position: absolute; left: 62px; padding: 7px 12px; border-radius: 8px; background: var(--foreground); color: var(--background); font-size: 13px; white-space: nowrap; visibility: hidden; opacity: 0; pointer-events: none; }
.rail a:hover .etiquette-bulle, .rail a:focus-visible .etiquette-bulle, .rail button:hover .etiquette-bulle, .rail button:focus-visible .etiquette-bulle { visibility: visible; opacity: 1; }
.rail .bas { margin-top: auto; }
.coque { margin-left: 88px; min-height: 100vh; }
.barre-haut { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 84px; padding: 0 48px; }
.nom-site { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.nom-site .logo-marque { width: 40px; flex: none; color: var(--foreground); --logo-coeur: #d6455d; }
.nom-site-texte { display: flex; flex-direction: column; font: 700 18px/1.1 var(--police-titre); letter-spacing: -.05em; }
.nom-site-texte span { font-size: 14px; font-weight: 450; letter-spacing: .02em; }
.logo-marque { display: block; height: auto; }
.outils { display: flex; align-items: center; gap: 10px; }
.outils select { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--muted-foreground); font-size: 14px; max-width: 120px; }
.connexion { min-height: 44px; padding: .6rem 1.2rem; font-size: 14px; background: var(--foreground); color: var(--background); }
.connexion:hover { background: var(--muted-foreground); }
.contenu { max-width: 1280px; margin: 0 auto; padding: 24px 48px 60px; }
.dock { display: none; }

/* Accueil */
.intro { display: grid; gap: 14px; margin: 8px 0 28px; max-width: 760px; }
.intro p { color: var(--muted-foreground); font-size: 17px; max-width: 62ch; margin: 0; }
.rassurance { display: flex; align-items: center; gap: 10px; color: var(--muted-foreground); font-size: 14px; margin: 4px 0 0; }
.rassurance svg { color: var(--primary); }
.a-la-une { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 28px; align-items: center; min-height: 300px; padding: 30px; border-radius: 24px; background: var(--card); border: 1px solid var(--border); color: var(--foreground); }
.a-la-une h2 { font-size: 32px; line-height: 1.15; max-width: 16ch; letter-spacing: -.04em; color: var(--foreground); }
.a-la-une p { max-width: 44ch; font-size: 15px; }
.a-la-une .tag { background: var(--soft); color: var(--muted-foreground); margin-bottom: 14px; }
.a-la-une .couverture { transform: rotate(6deg); width: 160px; justify-self: center; box-shadow: 9px 15px 22px #25244718; }
.en-tete-section { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 34px 0 18px; }
.en-tete-section h2 { margin: 0; font-size: 22px; }
.grille-livres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; list-style: none; padding: 0; margin: 0; }
.livre-item :is(h2, h3) { margin: 12px 0 4px; }
.livre-item small { display: block; }
.livre-item .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.bandeau-abo { display: flex; align-items: center; gap: 16px; margin-top: 34px; padding: 22px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bandeau-abo h2 { font-size: 18px; margin-bottom: 4px; }
.bandeau-abo p { margin: 0; color: var(--muted-foreground); font-size: 15px; max-width: 70ch; }
.pastille-icone { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--lavender); color: var(--lavender-ink); flex-shrink: 0; }

/* Couvertures : image si elle existe, sinon composition typographique. */
.couverture { position: relative; display: flex; flex-direction: column; aspect-ratio: 2 / 2.9; overflow: hidden; max-width: 100%;
  border-radius: 6px 14px 14px 6px; padding: 16px 14px; background: #dce6de; color: #28463a; isolation: isolate; }
.couverture.c2 { background: #f0e2d4; color: #6e4536; }
.couverture.c3 { background: #e3e7d6; color: #4b5230; }
.couverture.c4 { background: #e0e8f2; color: #344e6a; }
.couverture::before { content: ""; position: absolute; inset: 0 auto 0 5px; border-left: 1px solid currentColor; opacity: .14; }
.couverture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.couverture-haut { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; letter-spacing: .04em; line-height: 1.2; z-index: 1; }
.couverture-haut svg { width: 19px; height: 19px; stroke-width: 1.3; }
.couverture strong { margin: auto 0 18px; max-width: 11ch; font: 600 clamp(19px, 2vw, 26px)/1.08 var(--police-titre); letter-spacing: -.05em; overflow-wrap: anywhere; z-index: 1; }
.couverture-bas { font-size: 11px; z-index: 1; }
.cercles { position: absolute; width: 190px; height: 190px; right: -55px; top: 19%; opacity: .3; z-index: -1; }
.cercles span { position: absolute; inset: 0; border: 1px solid currentColor; border-radius: 50%; }
.cercles span:nth-child(2) { inset: 17px; }
.cercles span:nth-child(3) { inset: 34px; }

/* Catalogue : recherche et filtres */
.entete-page { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.entete-page p { margin: 0; max-width: 62ch; color: var(--muted-foreground); }
.recherche { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 20px; }
.champ-recherche { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 200px; padding: 0 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.champ-recherche svg { width: 18px; height: 18px; color: var(--muted-foreground); }
.champ-recherche input { width: 100%; min-width: 0; min-height: 50px; border: 0; background: none; color: var(--foreground); font-size: 16px; outline: none; }
.champ-recherche:focus-within { outline: 2px solid var(--ring); outline-offset: 2px; }
.filtres { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--soft); }
.filtres a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 9px; color: var(--muted-foreground); font-size: 14px; }
.filtres a[aria-current="true"] { background: var(--card); color: var(--foreground); }
.compte-resultats { color: var(--muted-foreground); font-size: 14px; margin-bottom: 18px; }

/* Fiche d'un livre */
.fiche { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 52px; align-items: center; margin: 22px 0 40px; }
.fiche .couverture { width: 240px; }
.fiche h1 { max-width: 19ch; }
.fiche .description { max-width: 62ch; line-height: 1.8; }
.liste-chapitres { overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--card); list-style: none; padding: 0; margin: 0; }
.liste-chapitres a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 64px; padding: 14px 22px; border-bottom: 1px solid var(--border); font-size: 15px; }
.liste-chapitres li:last-child a { border-bottom: 0; }
.liste-chapitres a > span:not(.num):not(.tag) { flex: 1 1 120px; min-width: 0; }
.liste-chapitres a > svg { flex: none; margin-inline-start: auto; }
.liste-chapitres a:hover { background: var(--soft); }
.liste-chapitres .num { color: var(--muted-foreground); font-size: 14px; font-variant-numeric: tabular-nums; }
.liste-chapitres .tag { margin-left: auto; }
.liste-chapitres svg { width: 16px; height: 16px; color: var(--muted-foreground); }

/* Panneaux : accès refusé, session, erreur, état vide */
.panneau-centre { max-width: 560px; margin: 40px auto; padding: 44px 28px; text-align: center; border: 1px solid var(--border); border-radius: 22px; background: var(--card); }
.panneau-centre > svg { width: 32px; height: 32px; margin-bottom: 20px; color: var(--primary); }
.panneau-centre p { max-width: 46ch; margin-left: auto; margin-right: auto; color: var(--muted-foreground); }
.panneau-centre .code { font: 700 64px/1 var(--police-titre); color: var(--primary); margin-bottom: 8px; }
.panneau-centre .actions { justify-content: center; }

/* Comptes : formulaires de connexion, d'inscription et de récupération. */
.carte-formulaire { max-width: 460px; margin: 40px auto; padding: 32px 28px; border: 1px solid var(--border); border-radius: 22px; background: var(--card); }
.carte-formulaire h1 { margin: 0 0 16px; }
.carte-formulaire form { display: grid; gap: 16px; margin: 20px 0 8px; }
.groupe-champ { display: grid; gap: 6px; min-width: 0; }
.groupe-champ input, .groupe-champ select { width: 100%; min-width: 0; box-sizing: border-box; }
.groupe-champ select { min-height: 48px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--input); color: var(--foreground); font-size: 16px; }
.groupe-champ input[type="file"] { padding: 10px 14px; height: auto; }
.groupe-champ label { font-size: 14px; font-weight: 600; }
.groupe-champ input { min-height: 48px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--input); color: var(--foreground); font-size: 16px; }
.groupe-champ input:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.groupe-champ input[aria-invalid="true"] { border-color: #b3261e; }
.champ-erreur { margin: 0; font-size: 14px; color: #b3261e; }
.alerte { margin: 12px 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.alerte.ok { background: var(--lavender); color: var(--lavender-ink); }
.aide { margin: 14px 0 0; font-size: 14px; color: var(--muted-foreground); }
.aide a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--foreground); text-decoration: underline; text-underline-offset: 3px; }
.separateur { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 13px; color: var(--muted-foreground); }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.cle-totp { display: inline-block; padding: 8px 12px; border-radius: 10px; background: var(--soft); letter-spacing: .08em; word-break: break-all; }

/* Lecteur */
.coque-lecteur { margin-left: 0; }
.barre-lecteur { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 24px;
  border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--background) 86%, transparent); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); }
.barre-lecteur .gauche { display: flex; align-items: center; gap: 12px; min-width: 0; }
.barre-lecteur .droite { display: flex; align-items: center; gap: 8px; }
.btn-icone[aria-pressed="true"] { background: var(--lavender); color: var(--lavender-ink); border-color: var(--primary); }
.btn-icone[aria-pressed="true"] svg { fill: currentColor; }
mark.annotation { border-radius: 3px; color: inherit; background: color-mix(in srgb, #f4c430 38%, transparent); cursor: pointer; }
mark.annotation.note { border-bottom: 2px solid var(--primary); }
.barre-selection { position: fixed; left: 50%; bottom: 20px; z-index: 40; display: flex; gap: 8px; padding: 10px; transform: translateX(-50%); border: 1px solid var(--border); border-radius: 18px; background: var(--card); box-shadow: 0 10px 30px #1515262e; }
.barre-selection[hidden] { display: none; }
.recherche-livre { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.note-carte { margin: 16px 0; padding: 18px 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--card); }
.note-carte blockquote { margin: 8px 0 12px; padding-inline-start: 14px; border-inline-start: 3px solid var(--primary); }
.liste-chapitres.resultats a { align-items: flex-start; }
#dialogue-note textarea { width: 100%; margin: 8px 0 16px; resize: vertical; }
.nav-admin { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.nav-admin a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); font-size: 14px; }
.nav-admin a[aria-current="page"] { background: var(--lavender); color: var(--lavender-ink); border-color: var(--primary); font-weight: 600; }
.grille-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.chiffre { display: grid; gap: 4px; padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--card); }
.chiffre strong { font: 700 30px/1 var(--police-titre); color: var(--primary); }
.chiffre span { font-size: 14px; color: var(--muted-foreground); }
.formulaire-ligne { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 12px; }
.formulaire-ligne .groupe-champ { flex: 1 1 180px; }
.case { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.case input { flex: none; width: 24px; height: 24px; margin-top: 1px; }
.table-defilante { overflow-x: auto; }
.table-admin { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-admin th, .table-admin td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: top; }
.liste-simple { padding: 0; list-style: none; }
.zone-danger { border-color: #b3261e66; }
.btn.danger { color: #b3261e; border-color: #b3261e; }
/* Administration : volet latéral sur grand écran, tiroir sur petit écran, cartes douces, tableaux lisibles. */
.tag.ok { background: color-mix(in srgb, var(--success) 14%, var(--card)); color: var(--success); }
.tag.attention { background: color-mix(in srgb, #b45309 14%, var(--card)); color: #92400e; }
.tag.alerte { background: color-mix(in srgb, var(--destructive) 13%, var(--card)); color: var(--destructive); }
.adm-coque { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.adm-menu { position: sticky; top: 0; align-self: start; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 18px 14px; overflow-y: auto; background: var(--soft); border-inline-end: 1px solid var(--border); }
.adm-marque { display: flex; align-items: center; gap: 12px; padding: 4px 8px; font: 700 16px/1.2 var(--police-titre); letter-spacing: -.02em; }
.adm-marque .logo-marque { flex: none; width: 42px; height: 36px; color: var(--primary); }
.adm-marque span span { color: var(--primary); }
.adm-marque small { display: block; margin-top: 3px; font: 500 13px/1.2 var(--police-texte, inherit); letter-spacing: 0; color: var(--muted-foreground); }
.adm-nav { display: grid; gap: 4px; }
.adm-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 12px; color: var(--muted-foreground); font-size: 15px; font-weight: 500; }
.adm-nav a svg { flex: none; width: 20px; height: 20px; }
.adm-nav a:hover { background: var(--soft); color: var(--foreground); }
.adm-nav a[aria-current="page"] { background: var(--lavender); color: var(--foreground); font-weight: 650; }
.adm-groupe { margin: 14px 14px 4px; font-size: 13px; font-weight: 600; color: var(--muted-foreground); }
.adm-pastille { margin-inline-start: auto; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--badge); color: #fff; font-size: 12px; font-weight: 700; }
.adm-bas { margin-top: auto; display: grid; gap: 14px; padding-top: 16px; border-top: 1px solid var(--border); }
.adm-site { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 12px; font-size: 14px; color: var(--muted-foreground); }
.adm-site:hover { background: var(--soft); color: var(--foreground); }
.adm-site svg { width: 18px; height: 18px; }
.adm-moi { display: flex; align-items: center; gap: 10px; padding: 0 6px; min-width: 0; }
.adm-avatar { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--lavender); color: var(--lavender-ink); font-weight: 700; }
.adm-moi-texte { display: grid; min-width: 0; }
.adm-moi-texte strong { font-size: 14px; }
.adm-moi-texte small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted-foreground); }
.adm-bas-actions { display: flex; align-items: center; gap: 8px; }
.adm-bas-actions form { flex: 1; }
.adm-bas-actions .btn { width: 100%; min-height: 44px; padding: .5rem 1rem; font-size: 14px; }
.adm-principal { min-width: 0; background: var(--card); }
.adm-haut { display: none; }
.adm-voile { display: none; }
.adm-contenu { max-width: 1180px; padding: 36px clamp(18px, 4vw, 52px) 72px; }
.adm-entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.adm-entete h1 { margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
.adm-entete p { margin: 6px 0 0; max-width: 62ch; }
.adm-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.adm-grille { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-bottom: 24px; }
.adm-deux { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; margin-bottom: 24px; }
.adm-champs-deux { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.adm-carte { margin-bottom: 20px; padding: 22px 24px; border: 1px solid var(--border); border-radius: 20px; background: var(--card);  }
.adm-deux .adm-carte, .adm-grille .adm-carte { margin-bottom: 0; }
.adm-carte h2 { margin: 0 0 6px; font-size: 1.1rem; }
.adm-carte > p:first-of-type { margin-top: 0; }
.adm-carte form { margin-top: 14px; }
.adm-stat { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border: 1px solid var(--border); border-radius: 20px; background: var(--card);  }
a.adm-stat:hover { border-color: var(--primary); }
.adm-stat .puce { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--lavender); color: var(--lavender-ink); }
.adm-stat .puce svg { width: 22px; height: 22px; }
.adm-stat .puce.attention { background: color-mix(in srgb, #b45309 14%, var(--card)); color: #92400e; }
.adm-stat strong { display: block; font: 700 28px/1.1 var(--police-titre); letter-spacing: -.02em; }
.adm-stat span.libelle { display: block; margin-top: 2px; font-size: 14px; color: var(--muted-foreground); }
.adm-tableau { overflow-x: auto; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 20px; background: var(--card);  }
.adm-tableau table { width: 100%; border-collapse: collapse; font-size: 15px; }
.adm-tableau th { padding: 13px 18px; background: var(--soft); color: var(--muted-foreground); font-size: 13px; font-weight: 600; text-align: start; white-space: nowrap; }
.adm-tableau td { padding: 15px 18px; border-top: 1px solid var(--border); vertical-align: middle; }
.adm-tableau tbody tr:hover td { background: color-mix(in srgb, var(--soft) 60%, transparent); }
.adm-tableau td a:not(.btn) { font-weight: 600; color: var(--primary); }
.adm-tableau td.numero { width: 64px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.adm-tableau td.droite, .adm-tableau th.droite { text-align: end; }
.adm-vide { padding: 40px 20px; text-align: center; color: var(--muted-foreground); }
.adm-vide svg { width: 30px; height: 30px; margin-bottom: 10px; color: var(--primary); }
.adm-def { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 12px 0 0; }
.adm-def dt { color: var(--muted-foreground); font-size: 14px; }
.adm-def dd { margin: 0; font-weight: 550; }
.adm-sous { margin: 26px 0 12px; font-size: 1.1rem; }
/* Tableau de bord : points à traiter puis vue d'ensemble, comme une liste d'activité. */
.adm-priorite h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 1rem; }
.adm-priorite h2 svg { width: 20px; height: 20px; }
.adm-priorite h2.attention { color: var(--warning); }
.adm-priorite h2.ok { color: var(--success); }
.adm-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 0; border-top: 1px solid var(--border); }
.adm-priorite h2 + .adm-ligne { margin-top: 14px; }
.adm-ligne > svg { flex: none; width: 20px; height: 20px; color: var(--warning); }
.adm-ligne-texte { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; }
.adm-ligne-texte strong { overflow-wrap: anywhere; }
.adm-ligne-texte span { font-size: 14px; color: var(--muted-foreground); }
.adm-resume dl { margin: 12px 0 0; }
.adm-resume dl a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; border-top: 1px solid var(--border); }
.adm-resume dl a:hover dt { color: var(--foreground); }
.adm-resume dt { display: flex; align-items: center; gap: 12px; color: var(--muted-foreground); font-size: 15px; }
.adm-resume dt svg { width: 18px; height: 18px; }
.adm-resume dd { margin: 0; font: 650 17px/1 var(--police-titre); font-variant-numeric: tabular-nums; }
.adm-lecture { max-width: 70ch; margin-inline: auto; }
@media (max-width: 1023px) {
  .adm-coque { grid-template-columns: minmax(0, 1fr); }
  .adm-menu { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 60; width: min(86vw, 304px); height: 100dvh; transform: translateX(-105%); transition: transform .22s var(--ease-sortie, ease-out); box-shadow: 0 0 40px #15152640; }
  html[dir="rtl"] .adm-menu { transform: translateX(105%); }
  body.adm-ouvert .adm-menu { transform: none; }
  body.adm-ouvert .adm-voile { display: block; position: fixed; inset: 0; z-index: 50; background: rgb(20 20 40 / .45); }
  .adm-haut { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--card); }
  .adm-fil { flex: 1; margin: 0; font: 650 15px/1.2 var(--police-titre); }
  .adm-contenu { padding-top: 24px; }
}
@media (min-width: 1024px) { .adm-burger { display: none; } }
@media (prefers-reduced-motion: reduce) { .adm-menu { transition: none; } }
/* Pages d'information, pied de page, bandeau de choix. */
.page-texte { max-width: 70ch; margin: 8px auto 40px; }
.page-texte h1 { margin-bottom: 8px; }
.page-texte .chapeau { font-size: 18px; color: var(--muted-foreground); margin-top: 0; }
.page-texte h2 { margin: 34px 0 8px; font-size: 1.25rem; }
.page-texte p, .page-texte li { line-height: 1.7; }
.page-texte ul { padding-inline-start: 1.2rem; }
.page-texte .alerte { background: var(--soft); color: var(--foreground); border: 1px solid var(--border); }
.questions { margin-top: 28px; border-top: 1px solid var(--border); }
.questions details { border-bottom: 1px solid var(--border); }
.questions summary { display: flex; align-items: center; min-height: 56px; padding: 12px 0; font-weight: 600; cursor: pointer; list-style: none; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; margin-inline-start: auto; padding-inline-start: 16px; font-size: 22px; font-weight: 400; color: var(--muted-foreground); }
.questions details[open] summary::after { content: "\2212"; }
.questions details p { margin: 0 0 18px; color: var(--muted-foreground); }
.pied { margin-top: 56px; padding: 40px 0 28px; border-top: 1px solid var(--border); }
.pied-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 32px 48px; }
.pied-titre { margin: 0 0 12px; font: 650 15px/1.3 var(--police-titre); }
.pied ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.pied li a { display: inline-flex; align-items: center; min-height: 40px; color: var(--muted-foreground); font-size: 15px; }
.pied li a:hover { color: var(--foreground); text-decoration: underline; text-underline-offset: 3px; }
.pied-lettre { display: grid; gap: 14px; max-width: 420px; margin-top: 12px; }
.pied-droits { margin: 32px 0 0; font-size: 14px; color: var(--muted-foreground); }
.bandeau-cookies { position: fixed; inset: auto 16px 16px 16px; z-index: 70; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; max-width: 760px; margin-inline: auto; padding: 18px 22px; border: 1px solid var(--border); border-radius: 20px; background: var(--card); box-shadow: 0 16px 40px -12px rgb(20 20 30 / .3); }
.bandeau-cookies p { margin: 0; font-size: 15px; }
.bandeau-cookies .bandeau-titre { margin-bottom: 4px; font-weight: 650; }
.bandeau-cookies > div { flex: 1 1 320px; }
.bandeau-cookies form { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 720px) { .pied { padding-bottom: 120px; } .bandeau-cookies { bottom: 100px; } }
.lecteur-video { position: relative; width: 100%; max-width: 900px; aspect-ratio: 16 / 9; margin: 18px 0; overflow: hidden; border-radius: 18px; background: #000; }
.lecteur-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sr-seul { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.barre-lecteur .titre-livre { margin: 0; font: 550 15px/1.3 var(--police-titre); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lecture { width: 100%; max-width: 870px; margin: 0 auto; padding: 48px max(24px, 5vw) 90px; }
.lecture header { text-align: center; margin-bottom: 30px; }
.lecture header .etiquette { margin: 0 0 10px; color: var(--muted-foreground); font-size: 14px; }
.lecture header h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 550; margin: 0; }
.texte-livre { max-width: 65ch; margin: 0 auto; font: var(--taille)/1.9 var(--police-texte); letter-spacing: -.01em; }
.texte-livre p { margin: 0 0 1.5em; hyphens: auto; }
.texte-livre hr.scene { border: 0; text-align: center; margin: 2rem 0; }
.texte-livre hr.scene::after { content: "* * *"; color: var(--primary); letter-spacing: .4em; }
.fin-apercu { max-width: 65ch; margin: 2rem auto 1rem; padding: 14px 18px; border-radius: 14px; background: var(--lavender); color: var(--lavender-ink); font-size: 15px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; max-width: 65ch; margin: 34px auto 0; padding-top: 24px; border-top: 1px solid var(--border); }
.marque-lecteur { position: fixed; right: .6rem; bottom: .4rem; font: 11px/1 var(--police-texte); color: var(--foreground); opacity: .12; pointer-events: none; user-select: none; -webkit-user-select: none; }

/* Drapeaux ronds et sélecteur de langue (modèle : sélecteur de Hostinger) */
.drapeau { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; border: 1px solid var(--border); background: var(--soft); }
.drapeau svg { width: 100%; height: 100%; }
.drapeau-code { font-size: 9px; font-weight: 700; color: var(--muted-foreground); }
.declencheur-langue { min-height: 44px; padding: .5rem 1rem; gap: 8px; font-size: 14px; }
.ligne-langue { justify-content: flex-start; gap: 12px; font-weight: 500; }
.ligne-langue .discret { margin-inline-start: auto; font-weight: 400; }
dialog.feuille.selecteur { padding: 22px 22px 16px; }
.selecteur-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.selecteur-tete h2 { margin: 0; font-size: 22px; }
.selecteur .champ-recherche { margin-bottom: 8px; }
.aucun-resultat { margin: 14px 4px; color: var(--muted-foreground); font-size: 15px; }
.liste-langues { list-style: none; margin: 0; padding: 0; max-height: min(380px, 48dvh); overflow-y: auto; overscroll-behavior: contain; }
.liste-langues button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 12px; border: 0; border-radius: 12px; background: none; color: var(--foreground); font-size: 16px; text-align: start; }
.liste-langues button:hover { background: var(--soft); }
.liste-langues button[aria-current="true"] { background: var(--lavender); color: var(--lavender-ink); }
.liste-langues .pays { font-weight: 600; }
.liste-langues .langue-nom { color: var(--muted-foreground); font-size: 15px; }
.liste-langues button[aria-current="true"] .langue-nom { color: inherit; opacity: .8; }
.liste-langues .coche { margin-inline-start: auto; display: grid; }
.liste-langues .coche svg { width: 18px; height: 18px; }
@media (min-width: 721px) {
  dialog.feuille.selecteur { margin: 0; inset-block-start: 76px; inset-inline-end: 24px; inset-inline-start: auto; inset-block-end: auto; width: 400px; max-width: calc(100% - 30px); border-radius: var(--radius); }
}

/* Écriture de droite à gauche (arabe, hébreu) */
html[dir="rtl"] .rail { inset: 0 0 0 auto; border-right: 0; border-left: 1px solid var(--border); }
html[dir="rtl"] .coque { margin-left: 0; margin-right: 88px; }
html[dir="rtl"] .coque.coque-lecteur { margin-right: 0; }
html[dir="rtl"] .rail .etiquette-bulle { left: auto; right: 62px; }
html[dir="rtl"] .btn svg[class], html[dir="rtl"] .lien svg { transform: scaleX(-1); }
@media (max-width: 720px) {
  html[dir="rtl"] .coque { margin-right: 0; }
}

/* Feuille de réglages (élément dialog) : en bas sur téléphone, fenêtre centrée sur grand écran. */
dialog.feuille { width: min(470px, calc(100% - 30px)); max-height: 88dvh; overflow-y: auto; padding: 30px; border: 0; border-radius: 24px; background: var(--card); color: var(--foreground); box-shadow: 0 20px 70px #10102026; }
dialog.feuille::backdrop { background: #15172355; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog.feuille h2 { font-size: 24px; margin: 4px 0 20px; }
.reglage { border: 0; padding: 0; margin: 0 0 22px; }
.reglage legend, .reglage > label { display: block; padding: 0; margin: 0 0 8px; font-weight: 600; font-size: 15px; }
.reglage-taille { display: flex; align-items: center; gap: 12px; }
.reglage-taille output { min-width: 4.2rem; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--soft); }
.segments label { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 9px; font-size: 15px; color: var(--muted-foreground); cursor: pointer; }
.segments input { position: absolute; opacity: 0; pointer-events: none; }
.segments label:has(input:checked) { background: var(--card); color: var(--foreground); box-shadow: 0 2px 6px #1515261a; }
.segments label:has(input:focus-visible) { outline: 3px solid var(--ring); outline-offset: 2px; }
.champ { display: block; width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid transparent; border-radius: 12px; background: var(--soft); color: var(--foreground); font-size: 16px; }
.champ:focus { outline: none; border-color: var(--ring); }

@media (max-width: 1200px) {
  .barre-haut { padding: 0 30px; }
  .contenu { padding: 22px 30px 50px; }
  .grille-livres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .a-la-une { grid-template-columns: minmax(0, 1fr) 140px; }
  .a-la-une .couverture { width: 130px; }
  .fiche { grid-template-columns: 210px minmax(0, 1fr); gap: 34px; }
  .fiche .couverture { width: 210px; }
}
@media (max-width: 720px) {
  .rail { display: none; }
  .connexion { display: none; } /* la barre du bas porte déjà « Compte » */
  .coque { margin-left: 0; }
  .barre-haut { height: 72px; padding: 0 20px; }
  .barre-haut .btn-icone { width: 44px; height: 44px; border: 0; background: none; }
  .contenu { padding: 20px 20px 120px; }
  .intro p { font-size: 16px; }
  .a-la-une { grid-template-columns: minmax(0, 1fr) 110px; gap: 14px; padding: 22px 20px; border-radius: 22px; min-height: 0; }
  .a-la-une h2 { font-size: 24px; max-width: 12ch; }
  .a-la-une p { font-size: 14px; }
  .a-la-une .couverture { width: 104px; padding: 10px; }
  .a-la-une .couverture .couverture-haut, .a-la-une .couverture .couverture-bas { display: none; }
  .a-la-une .couverture strong { font-size: 14px; margin: auto 0; }
  .grille-livres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
  .couverture strong { font-size: 22px; }
  .livre-item .tag { display: none; }
  .bandeau-abo { align-items: flex-start; }
  .entete-page { flex-direction: column; align-items: flex-start; gap: 14px; }
  .fiche { grid-template-columns: 120px minmax(0, 1fr); gap: 20px; align-items: start; margin: 18px 0 28px; }
  .fiche .couverture { width: 120px; padding: 10px; }
  .fiche .couverture strong { font-size: 18px; }
  .fiche .couverture .couverture-haut, .fiche .couverture .couverture-bas { display: none; }
  .fiche .actions { grid-column: 1 / -1; }
  .liste-chapitres a { padding: 14px 16px; gap: 12px; }
  .barre-lecteur { padding: 8px 14px; }
  .barre-lecteur .titre-livre { max-width: 55vw; }
  .lecture { padding: 32px 22px 70px; }
  dialog.feuille { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; border-radius: 27px 27px 0 0; padding: 32px 24px calc(24px + env(safe-area-inset-bottom)); }
  dialog.feuille::before { content: ""; position: absolute; top: 11px; left: calc(50% - 18px); width: 36px; height: 4px; border-radius: 6px; background: var(--border); }
  dialog.feuille[open] { animation: monter .3s cubic-bezier(.16, 1, .3, 1); }
  @keyframes monter { from { transform: translateY(100%); } to { transform: none; } }
  .dock { position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: space-evenly; gap: 4px;
    width: calc(100% - 40px); max-width: 410px; height: 68px; padding: 6px 8px; border-radius: 999px; background: var(--dock); color: var(--dock-ink); border: 1px solid color-mix(in srgb, var(--dock-ink) 12%, transparent); box-shadow: 0 12px 32px -10px rgb(20 20 30 / .28), inset 0 1px 0 rgb(255 255 255 / .3); z-index: 35; }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .dock { background: color-mix(in srgb, var(--dock) 62%, transparent); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); }
  }
  .dock a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; flex: 1; min-width: 0; height: 56px; border-radius: 28px; font-size: 13px; font-weight: 600; color: var(--dock-ink); }
  .dock a[aria-current="page"], .dock button[aria-expanded="true"] { background: color-mix(in srgb, var(--dock-actif) 72%, transparent); box-shadow: inset 0 1px 0 rgb(255 255 255 / .12); }
  .dock button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; flex: 1; min-width: 0; height: 56px; padding: 0; border: 0; border-radius: 28px; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--dock-ink); }
  .dock svg { width: 22px; height: 22px; }
  .dock span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  @media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    .dock { background: var(--dock); -webkit-backdrop-filter: none; backdrop-filter: none; }
    .dock a[aria-current="page"], .dock button[aria-expanded="true"] { background: var(--dock-actif); }
  }
}
@media (min-width: 721px) {
  dialog.feuille[open] { animation: apparaitre .2s ease; }
  @keyframes apparaitre { from { opacity: 0; } to { opacity: 1; } }
}
@media (max-width: 420px) {
  .barre-haut { padding: 0 14px; gap: 6px; }
  .outils { gap: 2px; }
  .outils select { max-width: none; padding: 0 2px; }
  .connexion { padding: .5rem .9rem; white-space: nowrap; }
  .contenu { padding-left: 16px; padding-right: 16px; }
}
html[dir="rtl"] .texte-livre p { text-align: start; }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .btn.is-loading::after { animation: none; }
}

/* Direction approuvée : surfaces minérales, cartes blanches et accent citron.
   Les couvertures et les préférences de lecture conservent leur identité. */
:root {
  --background: #edf0f1;
  --border: #e2e7e8;
  --input: #f3f5f5;
  --soft: #f1f4f4;
  --accent-citron: #f0ff79;
  --accent-citron-hover: #e1f45b;
  --accent-ink: #20251d;
  --lavender: #f0ff79;
  --lavender-ink: #30391d;
  --dock-actif: #f0ff79;
  --radius: 1.5rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --background: #141918; --card: #202725; --border: #35403b; --input: #29322e; --soft: #29322e; --lavender: #394626; --lavender-ink: #efffa3; --dock: #27302c; --dock-actif: #f0ff79; }
}
:root[data-theme="dark"] { --background: #141918; --card: #202725; --border: #35403b; --input: #29322e; --soft: #29322e; --lavender: #394626; --lavender-ink: #efffa3; --dock: #27302c; --dock-actif: #f0ff79; }
.btn:not(.outline):not(.soft) { background: var(--accent-citron); color: var(--accent-ink); }
.btn:not(.outline):not(.soft):hover { background: var(--accent-citron-hover); }
.btn:disabled { opacity: .5; }
.rail { inset: 18px auto 18px 16px; width: 76px; border: 1px solid var(--border); border-radius: 32px; }
.rail a[aria-current="page"] { background: var(--accent-citron); color: var(--accent-ink); border-radius: 50%; }
.coque { margin-left: 108px; }
.barre-haut { height: 96px; }
.contenu { padding-top: 18px; }
.intro { gap: 16px; margin-bottom: 32px; }
.intro h1 { font-size: clamp(32px, 4.5vw, 52px); max-width: 19ch; line-height: 1.08; }
.intro p { max-width: 54ch; }
.a-la-une { padding: 32px; border: 5px solid var(--card); border-radius: 32px; background: color-mix(in srgb, var(--soft) 75%, var(--card)); gap: 36px; }
.a-la-une .couverture { transform: none; width: 180px; border-radius: 16px; box-shadow: 0 12px 24px rgb(22 36 30 / .12); }
.a-la-une .tag { background: var(--accent-citron); color: var(--accent-ink); border-radius: 999px; }
.grille-livres { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.livre-item { min-width: 0; padding: 10px 10px 16px; background: var(--card); border: 1px solid color-mix(in srgb, var(--border) 55%, transparent); border-radius: 26px; }
.livre-item > a:first-child { display: flex; justify-content: center; padding: 18px; border-radius: 19px; background: var(--soft); overflow: hidden; }
.livre-item > a:first-child .couverture { width: min(100%, 210px); border-radius: 10px; box-shadow: 0 8px 18px rgb(22 36 30 / .1); }
.livre-item :is(h2, h3), .livre-item > small, .livre-item .meta { margin-inline: 8px; }
.livre-item :is(h2, h3) { font-size: 19px; margin-top: 16px; }
.livre-item .meta { padding-top: 10px; border-top: 1px solid var(--border); margin-top: 14px; }
.tag { border-radius: 999px; }
.livre-item .tag.violet { background: var(--soft); color: var(--muted-foreground); }
.livre-item .lien { font-size: 14px; }
.bandeau-abo { padding: 24px; border: 0; background: var(--card); border-radius: 26px; }
.champ-recherche { border-radius: 999px; border-color: transparent; }
.filtres { gap: 8px; padding: 0; background: none; }
.filtres a { padding-inline: 20px; border-radius: 999px; background: var(--card); color: var(--foreground); }
.filtres a[aria-current="true"] { background: var(--accent-citron); color: var(--accent-ink); font-weight: 600; }
.fiche { padding: 28px; border: 6px solid var(--card); border-radius: 32px; background: var(--card); gap: 40px; }
.fiche .couverture { border-radius: 18px; }
.liste-chapitres, .carte-formulaire, .panneau-centre, .adm-carte { border-radius: 26px; border-color: transparent; }
.groupe-champ input, .groupe-champ select, .champ { border-radius: 16px; }
.carte-formulaire { padding: 36px; }
@media (max-width: 1000px) and (min-width: 721px) {
  .grille-livres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .coque { margin-left: 0; }
  .barre-haut { height: 82px; padding-inline: 20px; }
  .contenu { padding: 14px 18px 112px; }
  .intro { margin: 8px 2px 24px; gap: 12px; }
  .intro h1 { font-size: 34px; }
  .intro p { font-size: 15px; }
  .intro .rassurance { font-size: 13px; }
  .a-la-une { grid-template-columns: minmax(0, 1fr) 105px; padding: 20px 16px; gap: 16px; border-radius: 28px; min-height: 0; }
  .a-la-une h2 { font-size: 25px; }
  .a-la-une p { font-size: 14px; }
  .a-la-une .couverture { width: 105px; }
  .a-la-une .btn { padding-inline: 16px; font-size: 13px; }
  .grille-livres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .livre-item { padding: 7px 7px 12px; border-radius: 22px; }
  .livre-item > a:first-child { padding: 12px; border-radius: 16px; }
  .livre-item :is(h2, h3) { font-size: 16px; }
  .livre-item > small { font-size: 12px; }
  .livre-item :is(h2, h3), .livre-item > small, .livre-item .meta { margin-inline: 4px; }
  .livre-item .tag { font-size: 11px; white-space: normal; }
  .livre-item .lien { font-size: 12px; }
  .recherche { gap: 12px; }
  .recherche .champ-recherche { flex-basis: 100%; }
  .filtres { width: 100%; overflow-x: auto; }
  .filtres a { flex: 1 0 auto; justify-content: center; padding-inline: 16px; }
  .fiche { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 22px; border-radius: 28px; }
  .fiche .couverture { width: min(65%, 220px); justify-self: center; }
  .carte-formulaire { padding: 26px 22px; margin-top: 16px; }
  .dock { width: calc(100% - 36px); max-width: 390px; height: 64px; padding: 7px; gap: 3px; }
  .dock a, .dock button { height: 48px; font-size: 11px; gap: 2px; border-radius: 999px; }
  .dock a[aria-current="page"], .dock button[aria-expanded="true"] { background: var(--accent-citron); color: var(--accent-ink); box-shadow: none; }
  .dock svg { width: 20px; height: 20px; }
}
@media (max-width: 350px) {
  .grille-livres { grid-template-columns: 1fr; }
  .a-la-une { grid-template-columns: minmax(0, 1fr) 80px; }
  .a-la-une .couverture { width: 80px; }
}

/* Touchbar : seul l’onglet choisi porte un libellé, dans une pilule mobile. */
@media (max-width: 720px) {
  .dock { isolation: isolate; max-width: 350px; height: 62px; padding: 7px; gap: 2px; }
  .dock a, .dock button { flex: 1 1 0; flex-direction: row; height: 46px; gap: 8px; min-width: 44px; font-size: 12px; font-weight: 650; background: none; z-index: 1; }
  .dock a[aria-current="page"], .dock button[aria-expanded="true"] { background: var(--accent-citron); color: var(--accent-ink); }
  .dock:has(button[aria-expanded="true"]) a[aria-current="page"] { background: none; color: var(--dock-ink); }
  .dock a span, .dock button span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .dock a[aria-current="page"], .dock button[aria-expanded="true"], .dock .dock-choisi { flex-grow: 1.85; }
  .dock a[aria-current="page"] span, .dock button[aria-expanded="true"] span, .dock .dock-choisi span { position: static; width: auto; height: auto; margin: 0; clip-path: none; max-width: 100%; }
  .dock:has(button[aria-expanded="true"]) a[aria-current="page"] { flex-grow: 1; }
  .dock:has(button[aria-expanded="true"]) a[aria-current="page"] span { position: absolute; width: 1px; height: 1px; margin: -1px; clip-path: inset(50%); }
  .dock.dock-anime a, .dock.dock-anime button { background: none; }
  .dock.dock-anime .dock-choisi { color: var(--accent-ink); }
  .dock .dock-pilule { position: absolute; inset: 7px auto 7px 0; height: auto; margin: 0; clip-path: none; border-radius: 999px; background: var(--accent-citron); pointer-events: none; z-index: 0; transform-origin: left center; }
  .dock a:active svg, .dock button:active svg { transform: scale(.9); }
  .dock svg { transition: transform 150ms ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  .dock svg { transition: none; }
}

/* Découverte : recherche directe, couvertures en éventail et reprise compacte. */
.recherche-accueil { max-width: 680px; margin: 0 0 28px; flex-wrap: nowrap; gap: 10px; }
.recherche-accueil .champ-recherche { min-width: 0; background: var(--card); }
.recherche-accueil .btn-icone { width: 50px; height: 50px; border: 0; background: var(--accent-citron); color: var(--accent-ink); }
.a-la-une { grid-template-columns: minmax(0, 1fr) 290px; }
.eventail { position: relative; width: 280px; height: 300px; justify-self: center; }
.eventail-livre { position: absolute; top: 20px; left: 55px; width: 170px; transform-origin: 50% 90%; border-radius: 16px; }
.eventail-livre .couverture { width: 100%; transform: none; }
.eventail-0 { z-index: 3; }
.eventail-1 { z-index: 2; transform: translateX(-48px) rotate(-13deg); }
.eventail-2 { z-index: 1; transform: translateX(48px) rotate(13deg); }
.eventail-solo .eventail-livre { width: 180px; left: 50px; }
.eventail-decoration { pointer-events: none; }
.eventail-decoration .couverture { filter: brightness(.94); }
.eventail-livre:focus-visible { outline-offset: 7px; z-index: 4; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .eventail-livre { transition: transform 200ms ease-out; }
  .eventail-0:hover { transform: translateY(-6px); }
  .eventail-1:hover { transform: translateX(-58px) rotate(-15deg); }
  .eventail-2:hover { transform: translateX(58px) rotate(15deg); }
}
.cartes-reprises { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.carte-reprise { display: flex; align-items: center; gap: 16px; min-width: 0; padding: 14px; margin-bottom: 12px; border-radius: 22px; background: var(--card); border: 1px solid var(--border); }
.cartes-reprises .carte-reprise { margin-bottom: 0; }
.carte-reprise .couverture { width: 62px; flex: none; border-radius: 8px; padding: 6px; }
.carte-reprise .couverture strong { font-size: 11px; margin: auto 0; }
.carte-reprise .couverture-haut, .carte-reprise .couverture-bas { display: none; }
.reprise-texte { display: grid; gap: 5px; flex: 1; min-width: 0; }
.reprise-texte strong { font: 600 16px/1.3 var(--police-titre); }
.reprise-texte > span { font-size: 13px; color: var(--muted-foreground); }
.carte-reprise > svg { width: 20px; color: var(--foreground); }
@media (max-width: 720px) {
  .recherche-accueil { margin: 2px 0 24px; }
  .recherche-accueil .champ-recherche { flex-basis: auto; }
  .intro .actions, .intro .rassurance { display: none; }
  .intro h1 { font-size: 30px; }
  .intro p { font-size: 14px; }
  .a-la-une { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px 20px 24px; }
  .eventail { grid-row: 1; width: min(100%, 280px); height: 265px; }
  .eventail-livre { width: 150px; left: calc(50% - 75px); top: 12px; }
  .eventail-solo .eventail-livre { width: 160px; left: calc(50% - 80px); }
  .eventail .couverture { width: 100%; }
  .a-la-une h2 { max-width: none; font-size: 26px; }
  .a-la-une > div:first-child > p:not(.etiquette) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .a-la-une .btn { width: 100%; font-size: 14px; }
  .cartes-reprises { grid-template-columns: minmax(0, 1fr); }
  .carte-reprise { gap: 12px; }
}

/* Cartes immersives : visuel intégral, légende contrastée et action blanche. */
.livre-item.livre-immersif { position: relative; display: flex; align-items: flex-end; isolation: isolate; min-height: 420px; aspect-ratio: 3 / 4.6; padding: 0; border: 5px solid var(--card); border-radius: 30px; background: #242722; overflow: hidden; }
.livre-item.livre-immersif > a.livre-visuel { position: absolute; inset: 0; display: block; padding: 0; border-radius: 24px; background: none; z-index: 0; }
.livre-item.livre-immersif > a.livre-visuel .couverture { width: 100%; height: 100%; max-width: none; aspect-ratio: auto; border-radius: 0; box-shadow: none; padding: 20px; }
.livre-immersif .couverture img { object-fit: cover; object-position: center top; }
.livre-immersif .couverture strong, .livre-immersif .couverture-bas { visibility: hidden; }
.livre-immersif::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 18%, rgb(10 14 12 / .08) 35%, rgb(10 14 12 / .78) 66%, #0a0e0c 100%); z-index: 1; }
.livre-immersif .livre-visuel:focus-visible { outline: 3px solid #c6ff34; outline-offset: -5px; }
.livre-legende { position: relative; width: 100%; padding: 22px 18px 16px; z-index: 2; color: #fff; pointer-events: none; }
.livre-legende a { pointer-events: auto; }
.livre-item.livre-immersif h2, .livre-item.livre-immersif h3 { margin: 0 0 5px; font-size: clamp(21px, 2vw, 28px); line-height: 1.14; color: #fff; letter-spacing: -.035em; }
.livre-autrice { margin: 0 0 15px; color: #eceeec; font-size: 14px; }
.livre-details { display: flex; align-items: center; gap: 7px; margin: 0 0 18px; color: #f5f6f5; font-size: 13px; line-height: 1.4; }
.livre-details svg { width: 16px; height: 16px; }
.livre-extrait { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 999px; background: #fff; color: #171b18; font-size: 14px; font-weight: 650; text-align: center; }
.livre-extrait svg { width: 17px; height: 17px; }
.livre-extrait:focus-visible { outline-color: var(--accent-citron); }
@media (hover: hover) {
  .livre-extrait:hover { background: var(--accent-citron); }
  .livre-legende h2 a:hover, .livre-legende h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
}
@media (max-width: 720px) {
  .livre-item.livre-immersif { min-height: 330px; border-width: 4px; border-radius: 25px; }
  .livre-item.livre-immersif > a.livre-visuel { border-radius: 20px; }
  .livre-legende { padding: 18px 10px 10px; }
  .livre-item.livre-immersif h2, .livre-item.livre-immersif h3 { font-size: 20px; }
  .livre-autrice { font-size: 12px; margin-bottom: 10px; }
  .livre-details { font-size: 11px; gap: 5px; margin-bottom: 12px; }
  .livre-details svg { width: 14px; height: 14px; }
  .livre-extrait { min-height: 44px; padding-inline: 7px; font-size: 12px; gap: 5px; }
}
@media (max-width: 390px) {
  .grille-livres:has(.livre-immersif) { grid-template-columns: minmax(0, 1fr); }
  .livre-item.livre-immersif { min-height: 400px; }
  .livre-legende { padding: 22px 18px 16px; }
  .livre-item.livre-immersif h2, .livre-item.livre-immersif h3 { font-size: 26px; }
  .livre-extrait { font-size: 14px; }
}

/* Contraste des champs (WCAG 1.4.11, 3:1) : le contour d'un champ de saisie doit se distinguer de la carte et du fond.
   Mesuré le 20 octobre 2026 : avant ce bloc, 1,25 : 1 sur la carte blanche. Les couleurs de la direction citron sont inchangées. */
:root { --champ-bord: #7d8883; }
:root[data-theme="dark"] { --champ-bord: #7f8c86; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --champ-bord: #7f8c86; } }
.groupe-champ input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .groupe-champ select, .champ, .champ-recherche { border: 1px solid var(--champ-bord); }
.groupe-champ input[type="file"] { border: 1px dashed var(--champ-bord); }
.groupe-champ input[aria-invalid="true"] { border: 2px solid var(--destructive); }

/* Ordinateur : deux zones équilibrées, éventail centré avec marge pour les cartes inclinées. */
@media (min-width: 721px) {
  .a-la-une { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 48px); padding: 36px clamp(28px, 4vw, 56px); }
  .eventail { width: 100%; max-width: 380px; }
  .eventail-livre { left: calc(50% - 85px); }
  .eventail-solo .eventail-livre { left: calc(50% - 90px); }
}
@media (min-width: 721px) and (max-width: 1050px) {
  .a-la-une { grid-template-columns: minmax(0, 1fr); }
  .a-la-une .eventail { grid-row: 1; }
}

/* Vitrine publique : entrée éditoriale distincte de l’espace lecteur. */
.site-vitrine .rail, .site-vitrine .dock { display: none; }
.site-vitrine .coque { margin-left: 0; }
.site-vitrine .barre-haut { max-width: 1240px; margin-inline: auto; height: 90px; padding-inline: 32px; }
.site-vitrine .contenu { max-width: 1240px; padding: 0 32px 60px; }
.vitrine-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding-block: 12px 22px; border-bottom: 1px solid var(--border); font-size: 14px; }
.vitrine-menu > a { min-height: 44px; display: inline-flex; align-items: center; }
.vitrine-menu > a:last-child { margin-inline-start: auto; }
.vitrine-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 60px; padding-block: 66px; }
.vitrine-hero h1 { max-width: 16ch; font-size: clamp(36px, 4.5vw, 62px); line-height: 1.06; margin-block: 20px; }
.vitrine-texte { max-width: 52ch; color: var(--muted-foreground); font-size: 18px; }
.vitrine-hero .rassurance { margin-top: 20px; }
.vitrine-portrait { display: flex; align-items: center; flex-direction: column; justify-content: center; min-height: 400px; padding: 32px 16px; border-radius: 40px; background: var(--card); }
.vitrine-portrait .eventail { width: 100%; max-width: 380px; height: 310px; }
.vitrine-portrait .couverture { border-radius: 16px; box-shadow: 0 14px 24px rgb(10 14 12 / .15); }
.vitrine-signature { margin-top: 8px; font: 550 16px var(--police-titre); letter-spacing: .04em; }
.vitrine-section { padding-block: 40px; scroll-margin-top: 24px; }
.vitrine-section > h2, .vitrine-offre h2 { font-size: clamp(26px, 3vw, 36px); max-width: 24ch; }
.vitrine-section .en-tete-section { margin-top: 0; }
.vitrine-section .en-tete-section h2 { font-size: clamp(24px, 3vw, 34px); max-width: 26ch; }
.vitrine-section .en-tete-section p { margin-top: 12px; }
.vitrine-etapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 28px; }
.vitrine-etapes article { padding: 24px 0; border-top: 1px solid var(--border); }
.vitrine-numero { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--accent-citron); color: var(--accent-ink); font-weight: 650; margin-bottom: 20px; }
.vitrine-etapes p { color: var(--muted-foreground); font-size: 15px; }
.vitrine-offre { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-block: 32px; padding: 40px; border-radius: 32px; background: var(--card); scroll-margin-top: 24px; }
.vitrine-offre p { max-width: 52ch; color: var(--muted-foreground); }
.vitrine-offre ul { list-style: none; margin: 0 0 24px; padding: 0; }
.vitrine-offre li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.vitrine-faq { max-width: 850px; margin-inline: auto; }
.vitrine-faq details { border-bottom: 1px solid var(--border); padding-block: 20px; }
.vitrine-faq summary { cursor: pointer; font-weight: 600; min-height: 44px; }
.vitrine-faq details p { color: var(--muted-foreground); margin: 8px 0; max-width: 70ch; }
@media (max-width: 720px) {
  .site-vitrine .barre-haut { padding-inline: 18px; height: 80px; }
  .site-vitrine .contenu { padding: 0 18px 40px; }
  .vitrine-menu { gap: 8px 18px; font-size: 13px; padding-bottom: 12px; }
  .vitrine-menu > a:last-child { margin-inline-start: 0; }
  .vitrine-hero { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-block: 32px; }
  .vitrine-hero h1 { font-size: 39px; }
  .vitrine-texte { font-size: 16px; }
  .vitrine-hero .actions { display: grid; }
  .vitrine-portrait { min-height: 330px; padding-block: 24px; border-radius: 30px; }
  .vitrine-portrait .eventail { height: 265px; }
  .vitrine-etapes, .vitrine-offre { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .vitrine-etapes article { padding-block: 20px 0; }
  .vitrine-offre { padding: 26px 22px; }
  .vitrine-section { padding-block: 26px; }
  .vitrine-section .en-tete-section { align-items: flex-start; flex-direction: column; }
}

/* Vitrine : couverture réelle, résumé en citation, présentation de l'autrice. */
.vitrine-couverture { display: block; width: min(100%, 260px); transform: rotate(-2deg); transition: transform .25s ease; }
.vitrine-couverture:hover, .vitrine-couverture:focus-visible { transform: rotate(0deg) translateY(-4px); }
.vitrine-couverture .couverture { aspect-ratio: 2 / 3; border-radius: 16px; box-shadow: 0 22px 40px rgb(10 14 12 / .28); overflow: hidden; }
.vitrine-couverture .couverture img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vitrine-portrait:has(.vitrine-couverture) { gap: 20px; }
.vitrine-histoire { max-width: 820px; margin: 24px auto; padding: 40px 0; border-block: 1px solid var(--border); text-align: center; }
.vitrine-histoire blockquote { margin: 14px 0 22px; font: 550 clamp(22px, 2.6vw, 30px)/1.35 var(--police-titre); text-wrap: balance; }
.vitrine-autrice { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-block: 40px; padding: 32px 40px; border-radius: 32px; background: var(--card); }
.vitrine-autrice h2 { font-size: clamp(24px, 3vw, 32px); margin-block: 6px 10px; }
.vitrine-autrice p { max-width: 56ch; color: var(--muted-foreground); margin: 0; }
@media (prefers-reduced-motion: reduce) { .vitrine-couverture { transition: none; } }
@media (max-width: 720px) {
  .vitrine-couverture { width: min(70%, 220px); }
  .vitrine-histoire { padding-block: 28px; text-align: start; }
  .vitrine-autrice { flex-direction: column; align-items: flex-start; padding: 24px 22px; }
}

/* Nouveautés et lettre d'information de la vitrine. */
.livre-visuel { position: relative; }
.livre-nouveau { position: absolute; top: 12px; inset-inline-start: 12px; background: var(--accent-citron); color: var(--accent-ink); font-weight: 650; }
.vitrine-lettre { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; margin-block: 32px; padding: 40px; border-radius: 32px; background: var(--card); }
.vitrine-lettre h2 { font-size: clamp(24px, 3vw, 34px); max-width: 22ch; margin-block: 12px; }
.vitrine-lettre p { max-width: 52ch; color: var(--muted-foreground); }
.vitrine-lettre .pied-lettre { max-width: 460px; margin-top: 0; }
@media (max-width: 720px) {
  .vitrine-lettre { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 26px 22px; }
}

/* Vitrine : le pied de page suit la même largeur et les mêmes marges que le contenu. */
.site-vitrine .pied { max-width: 1240px; margin-inline: auto; padding-inline: 32px; }
@media (max-width: 720px) { .site-vitrine .pied { padding-inline: 18px; } }

/* Vitrine sur téléphone : le résumé tient en trois lignes, le lien mène à la suite. */
@media (max-width: 720px) {
  .vitrine-histoire blockquote { font-size: 20px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

/* Vitrine : livres à venir. */
.a-venir { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.a-venir li { padding: 24px; border: 1px dashed var(--border); border-radius: 24px; }
.a-venir h3 { margin: 14px 0 8px; font-size: 22px; }
.a-venir p { margin: 0; color: var(--muted-foreground); font-size: 15px; }

/* Pied de page : droits à gauche, signature du réalisateur à droite (sous les droits sur téléphone). */
.pied-bas { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-top: 32px; }
.pied-bas .pied-droits { margin: 0; }
.pied-signature { margin: 0; font-size: 14px; color: var(--muted-foreground); }
.pied-signature strong { font-weight: 600; color: var(--foreground); }

/* Vitrine : atouts, menu qui suit la lecture, apparition douce (idées reprises de modèles de sites réussis, sans code ni image copiés). */
.vitrine-atouts { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 20px; }
.vitrine-atouts li { padding: 24px; border-radius: 24px; background: var(--card); }
.vitrine-atouts .pastille-icone { margin-bottom: 18px; }
.vitrine-atouts h3 { margin: 0 0 8px; font-size: 18px; }
.vitrine-atouts p { margin: 0; color: var(--muted-foreground); font-size: 15px; }
.vitrine-menu { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--background) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.vitrine-menu > a[aria-current="location"] { font-weight: 650; text-decoration: underline; text-decoration-color: var(--accent-trait); text-decoration-thickness: 3px; text-underline-offset: 8px; }
html { scroll-padding-top: 76px; }

/* Administration : le texte masqué des en-têtes de tableau reste dans le cadre défilant (il élargissait la page entière sur téléphone). */
.adm-tableau { position: relative; }

/* Administration, tableau de bord : la vue d'ensemble en tuiles sur grand écran (une liste de quatre lignes très larges laissait un vide entre le libellé et le chiffre). */
@media (min-width: 700px) {
  .adm-resume dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
  .adm-resume dl a { flex-direction: column-reverse; align-items: flex-start; justify-content: flex-end; gap: 10px; min-height: 0; padding: 18px 18px 16px; border-top: 0; border-radius: 18px; background: var(--soft); transition: transform .2s ease, box-shadow .2s ease; }
  .adm-resume dl a:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgb(10 14 12 / .12); }
  .adm-resume dd { font-size: 36px; letter-spacing: -.02em; }
}
@media (prefers-reduced-motion: reduce) { .adm-resume dl a { transition: none; } }

/* Administration, cartes : le texte prend la place restante et les boutons restent à sa droite tant qu'ils tiennent (ils passaient dessous pour 11 px). */
.adm-carte > .adm-entete > div:not(.adm-actions) { flex: 1 1 260px; min-width: 0; }
.adm-carte > .adm-entete > .adm-actions { flex: 0 1 auto; flex-wrap: wrap; min-width: 0; }

/* Message d'erreur d'un champ : un peu d'air avant le champ suivant. */
.groupe-champ .champ-erreur { margin: 6px 0 4px; }
.groupe-champ + .groupe-champ, .groupe-champ + .adm-champs-deux { margin-top: 14px; }

/* ===== Administration : fond doux, panneau flottant, menu à pastille blanche avec compteurs, recherche en haut, initiales (références du porteur). ===== */
body.adm { background: color-mix(in srgb, var(--background) 88%, var(--accent-citron)); }
.adm-nav a { transition: background-color .2s ease, box-shadow .2s ease, color .2s ease; }
.adm-nav a[aria-current="page"] { background: var(--card); color: var(--foreground); font-weight: 650; box-shadow: 0 1px 2px rgb(20 28 24 / .08), 0 10px 22px rgb(20 28 24 / .08); }
.adm-nav a[aria-current="page"] svg { color: var(--foreground); }
.adm-compte { margin-inline-start: auto; color: var(--muted-foreground); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.adm-groupe { margin-top: 18px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.adm-moi { padding: 10px 12px; border-radius: 18px; background: var(--card); box-shadow: 0 1px 2px rgb(20 28 24 / .06), 0 8px 20px rgb(20 28 24 / .05); }
.adm-initiales { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 14px; font-weight: 650; letter-spacing: .02em; color: var(--foreground); }
.adm-initiales.grande { width: 52px; height: 52px; font-size: 17px; }
.adm-initiales.t0 { background: color-mix(in srgb, #e8d9a8 55%, var(--card)); }
.adm-initiales.t1 { background: color-mix(in srgb, #a9dcc2 50%, var(--card)); }
.adm-initiales.t2 { background: color-mix(in srgb, #a8cdf0 50%, var(--card)); }
.adm-initiales.t3 { background: color-mix(in srgb, #f4bfa0 50%, var(--card)); }
.adm-initiales.t4 { background: color-mix(in srgb, var(--accent-citron) 75%, var(--card)); color: var(--accent-ink); }
.adm-avatar.adm-initiales { width: 40px; height: 40px; }
.adm-celle-id { display: flex; align-items: center; gap: 12px; }
.adm-ligne > .adm-initiales { margin-inline-end: -2px; }
.adm-entete > .adm-initiales { align-self: center; }
.adm-entete:has(> .adm-initiales) { justify-content: flex-start; align-items: center; }
.adm-entete:has(> .adm-initiales) > .tag { margin-inline-start: auto; }
.adm-entete-texte { min-width: 0; flex: 1 1 260px; }

/* Barre du haut : recherche, thème, action principale en pastille noire. */
.adm-haut { display: flex; align-items: center; gap: 12px; padding: 18px clamp(18px, 4vw, 52px) 0; }
.adm-fil { margin: 0; flex: none; font-weight: 600; }
.adm-recherche { position: relative; flex: 1 1 auto; max-width: 520px; margin-inline-start: auto; }
.adm-recherche svg { position: absolute; inset-inline-start: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted-foreground); pointer-events: none; }
.adm-recherche input { width: 100%; min-height: 48px; padding: 0 18px 0 44px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: inherit; font: inherit; font-size: 15px; box-shadow: 0 1px 2px rgb(20 28 24 / .05); }
html[dir="rtl"] .adm-recherche input { padding: 0 44px 0 18px; }
.adm-recherche input:focus-visible { outline: 3px solid var(--accent-trait); outline-offset: 2px; }
.adm-haut .btn.noir { background: var(--foreground); color: var(--background); border-color: var(--foreground); }
.adm-haut .btn.noir:hover { background: color-mix(in srgb, var(--foreground) 88%, var(--background)); }
.adm-nouveau { flex: none; min-height: 48px; }
.adm-haut .adm-fil { display: none; }
.adm-burger { display: none; }
.adm-contenu { padding-top: 22px; }

@media (min-width: 1024px) {
  .adm-coque { margin: 16px; min-height: calc(100vh - 32px); border-radius: 32px; background: var(--card); box-shadow: 0 30px 70px rgb(20 28 24 / .10), 0 0 0 1px var(--border); }
  .adm-menu { top: 16px; height: calc(100vh - 32px); border-radius: 32px 0 0 32px; }
  .adm-principal { border-radius: 0 32px 32px 0; }
}
@media (max-width: 1023px) {
  .adm-haut { padding-top: 14px; }
  .adm-burger { display: inline-grid; }
  .adm-haut .adm-fil { display: block; }
  .adm-recherche { display: none; }
  .adm-nouveau { margin-inline-start: auto; }
}
@media (max-width: 560px) { .adm-nouveau span { display: none; } .adm-nouveau { width: 48px; padding: 0; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .adm-nav a { transition: none; } }

/* ===== Administration, suite : surface grise, cartes blanches à ombre douce, tableaux aérés, étiquettes à point de couleur. ===== */
.adm-principal { background: color-mix(in srgb, var(--soft) 60%, var(--card)); }
.adm-carte, .adm-stat, .adm-tableau { border: 0; border-radius: 24px; background: var(--card); box-shadow: 0 1px 2px rgb(20 28 24 / .05), 0 14px 32px rgb(20 28 24 / .05); }
.adm-tableau { overflow-x: auto; }
.adm-tableau th { background: transparent; padding: 16px 20px 12px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-foreground); }
.adm-tableau td { padding: 14px 20px; border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.adm-tableau tbody tr { transition: background-color .15s ease; }
.adm-tableau tbody tr:hover td { background: color-mix(in srgb, var(--soft) 70%, transparent); }
.adm-tableau tbody tr:first-child td { border-top-color: var(--border); }
.adm-vignette { flex: none; width: 34px; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 6px rgb(20 28 24 / .18); }
.adm-vignette .couverture { width: 100%; margin: 0; padding: 0; border-radius: 6px; font-size: 3px; box-shadow: none; }
.adm-vignette .couverture strong, .adm-vignette .couverture-haut, .adm-vignette .couverture-bas, .adm-vignette .cercles { display: none; }
.adm-vignette .couverture img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Étiquettes de statut : un point de couleur devant le texte (sens seulement : vert, orange, rouge, neutre). */
.adm-contenu .tag { gap: 7px; padding: 5px 12px; font-weight: 550; }
.adm-contenu .tag::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.adm-contenu .tag.violet { background: var(--soft); color: var(--foreground); }

/* En-têtes de page et cartes d'action : plus d'air. */
.adm-entete h1 { letter-spacing: -.03em; }
.adm-carte { padding: 24px 26px; }
.adm-carte h2 { font-size: 1.05rem; letter-spacing: -.01em; }
.adm-stat strong { font-size: 32px; }
@media (prefers-reduced-motion: reduce) { .adm-tableau tbody tr { transition: none; } }

/* Cellules avec pastille ou vignette : elles restent des cellules de tableau (un td en flex écrasait le titre lettre par lettre). */
td.adm-celle-id { display: table-cell; min-width: 230px; }
td.adm-celle-id > .adm-initiales, td.adm-celle-id > .adm-vignette { display: inline-grid; vertical-align: middle; margin-inline-end: 12px; }
td.adm-celle-id > .adm-vignette { width: 34px; }
td.adm-celle-id > strong, td.adm-celle-id > a { vertical-align: middle; }


/* Navigation ordinateur : pilule horizontale, références Utile 132–143.
   Les libellés restent visibles à la souris et au clavier. */
@media (min-width: 721px) {
  body:not(.site-vitrine) > .rail {
    position: absolute; inset: 100px auto auto 50%; transform: translateX(-50%);
    width: max-content; max-width: calc(100% - 48px); height: auto;
    flex-direction: row; justify-content: center; gap: 6px; padding: 7px;
    border: 1px solid var(--border); border-radius: 999px; background: var(--card);
  }
  body:not(.site-vitrine) > .rail .marque { display: none; }
  body:not(.site-vitrine) > .rail nav { display: flex !important; gap: 6px !important; }
  body:not(.site-vitrine) > .rail .bas { margin: 0; }
  body:not(.site-vitrine) > .rail a,
  body:not(.site-vitrine) > .rail button {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    width: auto; min-width: 44px; height: 48px; padding: 0 18px;
    border-radius: 999px; color: var(--muted-foreground); font-size: 14px; font-weight: 550;
  }
  body:not(.site-vitrine) > .rail .etiquette-bulle {
    position: static; padding: 0; border-radius: 0; background: none; color: inherit;
    font-size: inherit; visibility: visible; opacity: 1; pointer-events: none;
  }
  body:not(.site-vitrine) > .rail a[aria-current="page"],
  body:not(.site-vitrine) > .rail button[aria-expanded="true"] { background: var(--dock-actif); color: var(--accent-ink); }
  body:not(.site-vitrine) > .rail a:hover,
  body:not(.site-vitrine) > .rail button:hover { color: var(--foreground); }
  body:not(.site-vitrine) > .rail svg { width: 20px; height: 20px; }
  body:not(.site-vitrine) > .rail ~ .coque { margin-left: 0; }
  body:not(.site-vitrine) > .rail ~ .coque > .contenu { padding-top: 112px; }
}
@media (min-width: 721px) and (max-width: 900px) {
  body:not(.site-vitrine) > .rail a, body:not(.site-vitrine) > .rail button { padding-inline: 14px; }
}

/* 22 octobre 2026 : palette Carbone et Lime (référence dyslove.design : Carbon #171717, Lime #C6FF34).
   Les noms de jetons restent ceux du projet. --accent-citron désigne désormais le lime.
   Règle : le lime est un remplissage sous encre carbone (15 : 1) ou un texte sur fond carbone ;
   en clair il ne sert jamais de texte, de trait ou d'anneau de focus (1,2 : 1), d'où --accent-trait. */
:root {
  --background: #f4f4f1;
  --card: #ffffff;
  --foreground: #171717;
  --muted-foreground: #5f625b;
  --primary: #171717;
  --primary-hover: #34342f;
  --primary-foreground: #ffffff;
  --border: #e2e2dd;
  --input: #f0f0ec;
  --soft: #eeeeea;
  --ring: #171717;
  --accent-citron: #c6ff34;
  --accent-citron-hover: #b4ec1f;
  --accent-ink: #171717;
  --accent-trait: #171717;
  --lavender: #eefbc8;
  --lavender-ink: #2f3d00;
  --dock: #ffffff;
  --dock-ink: #171717;
  --dock-actif: #c6ff34;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #0f0f0f; --card: #171717; --foreground: #f2f2ee; --muted-foreground: #a4a69f; --primary: #f2f2ee;
    --primary-hover: #ffffff; --primary-foreground: #171717; --border: #2a2a2a; --input: #202020; --soft: #202020;
    --ring: #c6ff34; --accent-trait: #c6ff34; --lavender: #26300a; --lavender-ink: #d9f58a;
    --dock: #1f1f1f; --dock-ink: #f2f2ee; --dock-actif: #c6ff34;
  }
}
:root[data-theme="dark"] {
  --background: #0f0f0f; --card: #171717; --foreground: #f2f2ee; --muted-foreground: #a4a69f; --primary: #f2f2ee;
  --primary-hover: #ffffff; --primary-foreground: #171717; --border: #2a2a2a; --input: #202020; --soft: #202020;
  --ring: #c6ff34; --accent-trait: #c6ff34; --lavender: #26300a; --lavender-ink: #d9f58a;
  --dock: #1f1f1f; --dock-ink: #f2f2ee; --dock-actif: #c6ff34;
}
::selection { background: color-mix(in srgb, var(--accent-citron) 55%, transparent); color: inherit; }

/* 22 octobre 2026, revue de l'administration : un seul lime franc par écran.
   Les actions répétées d'une liste et la déconnexion passent en teinte lime pâle ; le fond n'est plus teinté de vert. */
body.adm { background: color-mix(in srgb, var(--background) 96%, var(--accent-citron)); }
body.adm .adm-actions .btn:not(.outline):not(.soft),
body.adm form[action$="/deconnexion"] .btn:not(.outline):not(.soft) { background: var(--lavender); color: var(--lavender-ink); }
body.adm .adm-actions .btn:not(.outline):not(.soft):hover,
body.adm form[action$="/deconnexion"] .btn:not(.outline):not(.soft):hover { background: color-mix(in srgb, var(--lavender-ink) 12%, var(--lavender)); }

/* 22 octobre 2026 : sur téléphone, une adresse e-mail de lecteur tient sur une ligne au lieu de se couper en fin de mot. */
@media (max-width: 480px) {
  .adm-ligne-texte strong { font-size: 14px; letter-spacing: -.01em; }
}

/* 22 octobre 2026 : pastilles d'initiales en gris carbone (quatre nuances), le lime reste la teinte t4.
   Les couleurs ne portent plus que du sens ; la personne se reconnaît à ses initiales. */
.adm-initiales.t0 { background: color-mix(in srgb, var(--foreground) 8%, var(--card)); }
.adm-initiales.t1 { background: color-mix(in srgb, var(--foreground) 13%, var(--card)); }
.adm-initiales.t2 { background: color-mix(in srgb, var(--foreground) 18%, var(--card)); }
.adm-initiales.t3 { background: color-mix(in srgb, var(--foreground) 23%, var(--card)); }

/* 22 octobre 2026 : accueil du lecteur connecté, composition hors-centre.
   Titre et recherche sur 7/12 à gauche ; la carte « reprendre la lecture » sur 5/12 à droite, plus grande,
   porte l'unique action lime de l'écran. La recherche passe en carbone. Sous 901 px, une seule colonne. */
.recherche-accueil .btn-icone { background: var(--foreground); color: var(--background); }
@media (min-width: 901px) {
  .contenu:has(> .recherche-accueil) { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(24px, 3vw, 48px); align-items: start; }
  .contenu:has(> .recherche-accueil) > * { grid-column: 1 / -1; }
  .contenu:has(> .recherche-accueil) > .intro { grid-column: 1 / span 7; grid-row: 1; align-self: end; margin-block: 16px 20px; max-width: none; }
  .contenu:has(> .recherche-accueil) > .intro h1 { font-size: clamp(38px, 4.8vw, 64px); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; max-width: 14ch; }
  .contenu:has(> .recherche-accueil) > .recherche-accueil { grid-column: 1 / span 7; grid-row: 2; max-width: none; margin: 0 0 8px; }
  .contenu:has(> .recherche-accueil) > .section-reprises { grid-column: 8 / -1; grid-row: 1 / span 2; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; }
  .section-reprises .en-tete-section { margin: 0 0 14px; }
  .section-reprises .cartes-reprises { grid-template-columns: minmax(0, 1fr); }
  .section-reprises .carte-reprise { padding: 20px; gap: 20px; border-radius: 28px; }
  .section-reprises .carte-reprise .couverture { width: 96px; padding: 8px; border-radius: 12px; }
  .section-reprises .reprise-texte strong { font-size: 20px; line-height: 1.2; letter-spacing: -.02em; }
  .section-reprises .reprise-texte > span { font-size: 14px; }
  .section-reprises .carte-reprise > svg { flex: none; box-sizing: content-box; width: 22px; height: 22px; padding: 12px; border-radius: 50%; background: var(--accent-citron); color: var(--accent-ink); }
}

/* 22 octobre 2026 : icônes à deux états et effet clair/sombre (références Iconly et Oliya).
   Non sélectionnée : icône en contour, encre atténuée. Sélectionnée : icône pleine, encre franche, sur un fond d'état.
   Clair : pastille grise neutre, encre carbone. Sombre : pastille lime translucide, encre lime. */
:root { --actif-fond: #e8e8e4; --actif-encre: #171717; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --actif-fond: rgb(198 255 52 / .16); --actif-encre: #c6ff34; } }
:root[data-theme="dark"] { --actif-fond: rgb(198 255 52 / .16); --actif-encre: #c6ff34; }

.ico { display: inline-grid; place-items: center; flex: none; line-height: 0; }
.ico > svg { grid-area: 1 / 1; transition: opacity .18s ease, transform .28s cubic-bezier(.3, 1.4, .5, 1); }
.ico > .ico-p { opacity: 0; transform: scale(.55); }
:is([aria-current="page"], [aria-current="location"], [aria-pressed="true"], [aria-expanded="true"]) .ico > .ico-p { opacity: 1; transform: none; }
:is([aria-current="page"], [aria-current="location"], [aria-pressed="true"], [aria-expanded="true"]) .ico > .ico-c { opacity: 0; transform: scale(.55); }

.adm-nav a { color: var(--muted-foreground); }
.adm-nav a:hover { background: var(--soft); color: var(--foreground); }
.adm-nav a[aria-current="page"] { background: var(--actif-fond); color: var(--actif-encre); font-weight: 650; box-shadow: none; }
.adm-nav a[aria-current="page"] svg { color: inherit; }
.adm-nav a[aria-current="page"] .adm-compte { color: inherit; opacity: .75; }
.btn-icone[aria-pressed="true"] { background: var(--actif-fond); color: var(--actif-encre); border-color: transparent; }

/* Bouton de thème : soleil et lune pleins, permutés par une rotation. */
.bascule-theme { display: inline-grid; place-items: center; }
.bascule-theme > .ico { grid-area: 1 / 1; transition: transform .5s cubic-bezier(.3, 1.3, .4, 1), opacity .3s ease; }
.bascule-theme .ico-c { opacity: 0; }
.bascule-theme .ico-p { opacity: 1; transform: none; }
.bascule-theme .lune { opacity: 0; transform: rotate(-90deg) scale(.4); }
:root[data-theme="dark"] .bascule-theme .soleil { opacity: 0; transform: rotate(90deg) scale(.4); }
:root[data-theme="dark"] .bascule-theme .lune { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bascule-theme .soleil { opacity: 0; transform: rotate(90deg) scale(.4); }
  :root:not([data-theme="light"]) .bascule-theme .lune { opacity: 1; transform: none; }
}

/* Bascule du thème : le nouveau thème se révèle en cercle depuis le bouton (View Transitions). */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
  ::view-transition-new(root) { animation: revele-theme .6s cubic-bezier(.22, .8, .24, 1) both; clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 50%)); }
}
@keyframes revele-theme { to { clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 50%)); } }

/* 22 octobre 2026 : toutes les icônes à deux états sont enveloppées dans .ico ; les règles qui visaient un svg
   enfant direct visent aussi cette enveloppe. */
.liste-chapitres a > .ico { margin-inline-start: auto; }
.panneau-centre > .ico { margin-bottom: 20px; color: var(--primary); }
.panneau-centre > .ico svg { width: 32px; height: 32px; margin: 0; }
.adm-ligne > .ico { color: var(--warning); }
.adm-ligne > .ico svg { width: 20px; height: 20px; }
.adm-vide .ico { margin-bottom: 10px; color: var(--primary); }
.adm-vide .ico svg { margin-bottom: 0; }
/* Une icône reste à sa taille : aucune règle de liste ne doit étirer son enveloppe. */
.ico { flex: none !important; }

/* 23 octobre 2026 : protection de la lecture qui décourage sans promettre l'impossible (voir docs/plan-technique-lecteur.md §5).
   Filigrane répété au pseudonyme du lecteur sur toute la page ; pas d'impression du texte (aucun export intégral n'est proposé). */
.filigrane-lecteur { position: fixed; inset: 0; z-index: 4; pointer-events: none; user-select: none; -webkit-user-select: none; background-repeat: repeat; }
.impression-interdite { display: none; }
@media print {
  .texte-livre, .pagination, .filigrane-lecteur, .marque-lecteur { display: none !important; }
  .impression-interdite { display: block; font-size: 16px; }
}
