/* Bibliothèque Autres : l'imprimé en risographie. Un papier crème au grain léger, une encre presque noire, et deux encres
   fluo (rose et bleu) posées avec parcimonie : un surlignage, un tampon, le décalage d'une impression mal calée au survol
   d'une couverture. Typo de taille normale (Inter), étiquettes en petites capitales, angles doux. Le thème sombre imprime
   sur un papier noir. Tout passe par les variables d'app.css, sans bloc propre en tête de l'accueil (la citation du jour a été retirée). */
body[data-library="autres"], .library-card[href="#/autres"] {
  --bg: #f3efe6;
  --surface: #faf7f0;
  --surface-2: #e9e3d6;
  --border: #ddd5c4;
  --text: #1b1a1f;
  --text-2: #6f6a60;
  --pink: #ff4fa3; /* encre fluo rose */
  --blue: #2f6bff; /* encre bleue */
  --accent: #ff4fa3;
  --accent-ink: #d61f78; /* le rose quand il est du texte (lisible sur le papier) */
  --accent-text: #1b1a1f;
  --danger: #c4281c;
  --logo: #1b1a1f;
  --grain: 0.09;
  --shadow: none;
  --shadow-cover: none;
  --radius: 6px;
  color: var(--text);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(body[data-library="autres"], .library-card[href="#/autres"]) {
    --bg: #17161a; --surface: #1e1d22; --surface-2: #29272e; --border: #34323a; --text: #f1ece2; --text-2: #9d978c;
    --pink: #ff5cad; --blue: #5b8cff; --accent: #ff5cad; --accent-ink: #ff7dbd; --accent-text: #17161a; --danger: #ff7b6e; --logo: #f1ece2;
    --grain: 0.06;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] :is(body[data-library="autres"], .library-card[href="#/autres"]) {
  --bg: #17161a; --surface: #1e1d22; --surface-2: #29272e; --border: #34323a; --text: #f1ece2; --text-2: #9d978c;
  --pink: #ff5cad; --blue: #5b8cff; --accent: #ff5cad; --accent-ink: #ff7dbd; --accent-text: #17161a; --danger: #ff7b6e; --logo: #f1ece2;
  --grain: 0.06;
  color-scheme: dark;
}
html:has(body[data-library="autres"]) { background: #f3efe6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):has(body[data-library="autres"]) { background: #17161a; } }
:root[data-theme="dark"]:has(body[data-library="autres"]) { background: #17161a; }

/* Le grain du papier, posé sur tout l'écran sans gêner les clics */
body[data-library="autres"]::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: var(--grain); mix-blend-mode: multiply;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body[data-library="autres"]::after { mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body[data-library="autres"]::after { mix-blend-mode: screen; } }
body[data-library="autres"].reading::after { content: none; } /* pas de grain sur les pages d'un PDF */

body[data-library="autres"] {
  background: var(--bg);
  ::selection { background: var(--pink); color: #1b1a1f; }

  /* Typographie : sobre et de taille normale ; le rose surligne, ne crie pas */
  :is(h1, h2) { font-weight: 700; letter-spacing: -0.02em; }
  .section-head h2 { font-size: 1.15rem; }
  .section-head h2::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; margin-right: 0.5em; border-radius: 50%; background: var(--pink); vertical-align: 0.08em; }
  .section-head .meta { font-size: 0.8rem; }
  .tabs button { font-size: 1.15rem; }
  .tabs button[aria-selected="true"] { background: linear-gradient(transparent 58%, color-mix(in srgb, var(--pink) 45%, transparent) 58%, color-mix(in srgb, var(--pink) 45%, transparent) 92%, transparent 92%); }
  .tabs button[aria-selected="true"]::after { display: none; }
  :is(.eyebrow, .grimoire-label, .hero-side h2) { font-variant-caps: all-small-caps; letter-spacing: 0.06em; font-size: 0.82rem; }
  .eyebrow::before { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
  .see-all { font-size: 0.82rem; font-weight: 600; color: var(--text); }
  .see-all:hover { color: var(--accent-ink); }

  /* Formes : angles doux ; le bouton principal est un aplat d'encre */
  :is(button, .button, input, select, .iconbtn, .chip, .segmented, .segmented button, .searchbox input, .shelf-lib, .shelf-item, .choice, .hero, .feature, .dice) { border-radius: 6px; }
  .pill, .badge { border-radius: 999px; }
  .primary { background: var(--text); border-color: var(--text); color: var(--bg); }
  .primary:hover:not(:disabled) { background: var(--pink); border-color: var(--pink); color: #1b1a1f; }
  .pill:hover { background: var(--pink); border-color: var(--pink); color: #1b1a1f; }
  .chip:is([aria-current="true"], [aria-pressed="true"]), .segmented button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
  .avatar { background: var(--pink); color: #1b1a1f; }

  /* Barre du haut et menu */
  .topbar { background: var(--bg); border-bottom: 1px solid var(--border); }
  .shelf { background: var(--bg); border-right: 1px solid var(--border); }
  .shelf-lib[aria-current] { background: color-mix(in srgb, var(--pink) 18%, transparent); color: var(--text); }
  .shelf-item[aria-current] { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--text); }
  .shelf-brand b { color: var(--accent-ink); }

  /* Couvertures : à plat ; au survol, deux tirages décalés (rose et bleu) comme un calage raté */
  .cover { border-radius: 3px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 10%, transparent); transition: box-shadow 0.18s, transform 0.18s; }
  .card:hover .cover, .grimoire-cover .cover { box-shadow: -4px -3px 0 color-mix(in srgb, var(--blue) 80%, transparent), 5px 4px 0 color-mix(in srgb, var(--pink) 85%, transparent); }
  .card:hover .cover { transform: translate(-1px, -1px); }
  .card-title { font-weight: 650; }
  .card:hover .card-title { background: linear-gradient(transparent 55%, color-mix(in srgb, var(--pink) 40%, transparent) 55%); }
  :is(.bar, .cover-progress) { height: 4px; border-radius: 999px; background: var(--surface-2); }
  :is(.bar > i, .cover-progress > i) { border-radius: 999px; background: var(--blue); }
  .badge { background: var(--surface); color: var(--text); }

  /* Blocs de l'accueil : à plat, sur un papier un ton plus clair */
  :is(.hero, .feature, .dice) { background: var(--surface); border: 1px solid var(--border); box-shadow: none; }
  .hero-art { display: none; }
  .hero-cover .cover { transform: rotate(-1.5deg); box-shadow: -4px -3px 0 var(--blue), 5px 4px 0 var(--pink); }
  .grimoire { border-block: 1px dashed var(--text-2); }
  .grimoire-label { color: var(--accent-ink); }
  .choice { border: 1px solid transparent; background: transparent; }
  .choice:hover { background: var(--surface); border-color: var(--border); }
  .choice[aria-selected="true"] { background: var(--surface); border-color: var(--text); color: var(--text); box-shadow: 3px 3px 0 var(--pink); }
  :is(.d20, .welcome-die, .empty-icon, .loading-die) { color: var(--blue); }
  .dice-verdict { color: var(--accent-ink); }
}

/* Sa carte sur l'écran de choix */
.library-card[href="#/autres"] { border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.library-card[href="#/autres"] strong { font-weight: 700; color: var(--text); background: linear-gradient(transparent 58%, color-mix(in srgb, var(--pink) 45%, transparent) 58%); }
.library-card[href="#/autres"] :is(.library-count, .library-empty) { color: var(--blue); }
.library-card[href="#/autres"] .cover { border-radius: 3px; box-shadow: none; }
.library-card[href="#/autres"]:hover { border-color: var(--text); box-shadow: 5px 5px 0 var(--pink), -3px -3px 0 var(--blue); }
