  :root {
    --paper: #eae6db;
    --card: #f5f2ea;
    --card-hover: #efebe0;
    --ink: #23201b;
    --ink-soft: #453f37;
    --ink-faint: #5f584d;
    --line: #d8d2c5;
    --line-soft: #e0dbd0;
    --line-strong: #8a8272;
    --formal: #59693a;
    --formal-bg: #eceedf;
    --thematic: #96502e;
    --thematic-bg: #f2e5d9;
    --authorlink: #5b6470;
    --authorlink-bg: #e3e5e8;
    --worklink: #765a2b;
    --worklink-bg: #efe6d7;
    --accent-ring: #23201b;
    --hull-s: 30%;
    --hull-l: 46%;
    --hull-label-l: 37%;
    --m-litterature: #8f4a3a;
    --m-essai: #3f7a6e;
    --m-theatre: #a83250;
    --m-cinema: #2e7da6;
    --m-musique: #a83f9c;
    --m-bd: #b55d27;
    --m-arts: #4a4a8a;
    --auto-s: 40%;
    --auto-l: 42%;
    --on-medium: #fff;
  }
  /* Palette sombre — un seul jeu de valeurs, appliqué soit par préférence système
     (tant que l'utilisateur n'a pas forcé le thème clair), soit par le bouton de thème. */
  :root:not([data-theme="light"]) {
    @media (prefers-color-scheme: dark) {
      --paper: #16130f;
      --card: #211d18;
      --card-hover: #29241f;
      --ink: #ece7df;
      --ink-soft: #c2b8ab;
      --ink-faint: #a29a8c;
      --line: #3a352f;
      --line-soft: #2c2822;
      --line-strong: #726a5e;
      --formal: #a9bd7e;
      --formal-bg: #2b3122;
      --thematic: #e6a37c;
      --thematic-bg: #3a2a20;
      --authorlink: #9aa6b4;
      --authorlink-bg: #262b31;
      --worklink: #c9a97a;
      --worklink-bg: #332c20;
      --accent-ring: #d9cfc0;
      --hull-s: 40%;
      --hull-l: 62%;
      --hull-label-l: 66%;
      --m-litterature: #ba6754;
      --m-essai: #47897c;
      --m-theatre: #cc5573;
      --m-cinema: #3285b2;
      --m-musique: #bf54b2;
      --m-bd: #c2632a;
      --m-arts: #7979b7;
      --auto-s: 40%;
      --auto-l: 52%;
      --on-medium: #16130f;
    }
  }
  :root[data-theme="dark"] {
    --paper: #16130f;
    --card: #211d18;
    --card-hover: #29241f;
    --ink: #ece7df;
    --ink-soft: #c2b8ab;
    --ink-faint: #a29a8c;
    --line: #3a352f;
    --line-soft: #2c2822;
    --line-strong: #726a5e;
    --formal: #a9bd7e;
    --formal-bg: #2b3122;
    --thematic: #e6a37c;
    --thematic-bg: #3a2a20;
    --authorlink: #9aa6b4;
    --authorlink-bg: #262b31;
    --worklink: #c9a97a;
    --worklink-bg: #332c20;
    --accent-ring: #d9cfc0;
    --hull-s: 40%;
    --hull-l: 62%;
    --hull-label-l: 66%;
    --m-litterature: #ba6754;
    --m-essai: #47897c;
    --m-theatre: #cc5573;
    --m-cinema: #3285b2;
    --m-musique: #bf54b2;
    --m-bd: #c2632a;
    --m-arts: #7979b7;
    --auto-s: 40%;
    --auto-l: 52%;
    --on-medium: #16130f;
  }

  * { box-sizing: border-box; }
  html { color-scheme: light dark; }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Spectral", Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    line-height: 1.62;
  }
  ::selection { background: var(--formal-bg); color: var(--ink); }

  /* Barres de défilement discrètes, dans le ton du papier */
  * { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  ::-webkit-scrollbar { width: 9px; height: 9px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 8px;
    border: 2px solid var(--paper);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

  h1, h2, h3, .display {
    font-family: "Spectral", Georgia, serif;
    text-wrap: balance;
    font-weight: 400;
    letter-spacing: -0.012em;
  }

  a { color: inherit; }

  /* ---------- Shell layout ---------- */
  .shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
  }
  @media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
  }

  /* ---------- Sidebar ---------- */
  .sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow-y: auto;
    padding: 2rem 1.5rem 2rem 2rem;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  @media (max-width: 860px) {
    .sidebar {
      position: static;
      max-height: none;
      border-right: none;
      border-bottom: 1px solid var(--line);
    }
  }

  .brand {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
  }
  .brand:hover .brand-mark { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 0.2em; }
  .brand-top { display: flex; align-items: center; gap: 0.55rem; }
  .brand-logo { display: block; flex-shrink: 0; border-radius: 7px; }
  .brand-root { display: block; max-width: 100%; height: auto; margin: -0.15rem 0 0.1rem; }
  .brand-mark {
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1.15;
  }
  .brand-sub {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    color: var(--ink-faint);
  }

  .search-wrap { position: relative; }
  .search-input {
    width: 100%;
    padding: 0.6rem 2.1rem 0.6rem 2.1rem;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: var(--card);
    color: var(--ink);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.85rem;
  }
  .search-input:focus-visible {
    outline: 2px solid var(--accent-ring);
    outline-offset: 1px;
  }
  .search-icon {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-faint);
    pointer-events: none;
    display: flex;
  }
  .search-icon svg { width: 0.95rem; height: 0.95rem; }
  .search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    border: none;
    background: none;
    color: var(--ink-faint);
    cursor: pointer;
    padding: 0;
  }
  .search-clear svg { width: 0.85rem; height: 0.85rem; }

  /* Chevron (repli/dépli) — SVG, pivote quand ouvert */
  .chev {
    width: 0.8em;
    height: 0.8em;
    flex: none;
    color: var(--ink-faint);
    transition: transform 0.15s ease;
  }
  .tools-toggle[aria-expanded="true"] .chev,
  .index-toggle[aria-expanded="true"] .chev,
  .works-index[open] > summary .chev { transform: rotate(180deg); }
  .search-clear:hover { background: var(--card-hover); color: var(--ink); }
  .search-clear[hidden] { display: none; }
  .search-clear:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }

  .tools-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
  }
  .tools-toggle:hover { background: var(--card-hover); }
  .tools-toggle .active-count { color: var(--worklink); font-weight: 600; }
  .tools-toggle:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }

  .sidebar-tools {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
  }
  .sidebar-tools[hidden] { display: none; }

  .sort-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .sort-label {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-faint);
    white-space: nowrap;
  }
  .sort-select {
    flex: 1;
    min-width: 0;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: var(--card);
    color: var(--ink);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
  }
  .sort-select:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }

  .author-index {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
  }
  .author-index-item {
    display: block;
    padding: 0.4rem 0.7rem;
    text-decoration: none;
    font-size: 0.95rem;
    color: var(--ink-soft);
    border: 1px solid transparent;
    border-radius: 0;
  }
  .author-index-item .n {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--ink);
    font-weight: 600;
  }
  .author-index-item:hover { background: var(--card-hover); }
  .author-index-item.active { background: var(--card-hover); }
  .author-index-item[hidden] { display: none; }

  /* En-tête de groupe collant dans l'index (lettre ou siècle, selon le tri) */
  .idx-letter {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--paper);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ink-faint);
    padding: 0.6rem 0.7rem 0.3rem;
    border-bottom: 1px solid var(--line);
  }
  .idx-letter[hidden] { display: none; }

  .idx-dots { display: inline-flex; gap: 0.3rem; flex: none; }

  .index-empty {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    color: var(--ink-faint);
    padding: 0.8rem 0.7rem;
  }
  .index-empty[hidden] { display: none; }

  /* ---------- Filtres (langue / genre / siècle) ---------- */
  .filters {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
  }
  .filter-group-title {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
    margin-bottom: 0.4rem;
  }
  .filter-group[hidden] { display: none; }
  .filter-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }

  /* ---------- Étiquettes ("chips") — un seul langage ----------
     Base commune : mono, petit, angles droits (comme le reste du site).
     .filter-chip = interactif (fond + bordure marquée + hover + actif).
     .author-tag / .medium-badge = statiques (transparent, bordure douce). */
  .filter-chip, .author-tag, .medium-badge {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    line-height: 1.4;
    padding: 0.22rem 0.6rem;
    border: 1px solid var(--line-soft);
    border-radius: 0;
    color: var(--ink-faint);
    background: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }

  .filter-chip {
    color: var(--ink-soft);
    background: var(--card);
    border-color: var(--line-strong);
    cursor: pointer;
  }
  .filter-chip:hover { background: var(--card-hover); color: var(--ink); }
  .filter-chip .cnt { color: var(--ink-faint); }
  .filter-chip.active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
  }
  .filter-chip.active .cnt { color: var(--paper); opacity: 0.7; }
  .filter-reset {
    align-self: flex-start;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    color: var(--ink-soft);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }
  .filter-reset:hover { color: var(--ink); }
  .filter-reset[hidden] { display: none; }

  .empty-note {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    color: var(--ink-faint);
    padding: 0.5rem 0.7rem;
  }

  /* ---------- Main ---------- */
  .main { padding: 2.5rem clamp(1.25rem, 4vw, 3.5rem) 6rem; }

  /* Avertissement discret quand des entrées de auteurs.json ont été ignorées */
  .data-notice {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    color: var(--thematic);
    background: var(--card-hover);
    border: 1px solid var(--line);
    border-left: 2px solid var(--thematic);
    padding: 0.6rem 0.9rem;
    margin-bottom: 1.6rem;
  }
  .data-notice[hidden] { display: none; }

  .intro {
    max-width: 46rem;
    margin-bottom: 2.4rem;
  }
  .intro p { color: var(--ink-soft); margin: 0; font-size: 0.98rem; }

  .author-section { scroll-margin-top: 1.5rem; }

  /* ---------- Accueil : reprendre / un lien / points de passage / derniers ajouts ---------- */
  .home { display: flex; flex-direction: column; gap: 2.6rem; max-width: 46rem; }
  .home-kicker {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    font-weight: 400;
    margin: 0 0 0.9rem;
  }

  /* Reprendre — dernière fiche ouverte (localStorage), discret */
  .home-resume {
    align-self: flex-start;
    margin-bottom: -1.3rem;
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    color: var(--ink-faint);
  }
  .home-resume-k { text-transform: uppercase; letter-spacing: 0.08em; }
  .home-resume-name { font-family: "Spectral", serif; font-size: 0.98rem; color: var(--ink-soft); }
  .home-resume:hover .home-resume-name {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 0.2em;
  }

  /* Un lien — une ramification ou un voisinage tiré au hasard */
  .home-link {
    background: var(--card);
    border: 1px solid var(--line);
    padding: 1.1rem 1.3rem 1rem;
  }
  .home-link-kind {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ink-faint);
    margin-bottom: 0.55rem;
  }
  .home-link-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem 0.55rem;
    font-family: "Spectral", serif;
    font-size: 1.08rem;
    line-height: 1.35;
  }
  .home-link-name {
    font-family: "Spectral", serif;
    font-weight: 600;
    color: var(--ink);
  }
  .home-link-work { color: var(--ink-soft); font-style: italic; }
  .home-link-work .medium-dot { margin-right: 0.3rem; font-style: normal; }
  .home-link-arrow { color: var(--ink-faint); font-family: "IBM Plex Mono", monospace; }
  .home-link-phrase {
    margin: 0.75rem 0 0;
    padding-left: 0.9rem;
    border-left: 2px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.98rem;
    line-height: 1.5;
    max-width: 62ch;
  }
  .home-link-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-top: 0.9rem;
  }
  .home-link-goto,
  .home-link-reroll {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--ink-faint);
  }
  .home-link-goto:hover,
  .home-link-reroll:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }
  .home-link-goto:focus-visible,
  .home-link-reroll:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }

  /* Points de passage — noms proposés par au moins deux fiches */
  .home-passage {
    display: block;
    width: 100%;
    text-align: left;
    border-top: 1px solid var(--line-soft);
    padding: 0.6rem 0.2rem;
    cursor: pointer;
    font: inherit;
    color: inherit;
  }
  .home-passage-top { display: flex; align-items: baseline; gap: 0.5rem; }
  .home-passage-name {
    font-family: "Spectral", serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
  }
  .home-passage.is-proposed .home-passage-name {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: var(--ink-faint);
    text-underline-offset: 0.2em;
  }
  .home-passage:hover .home-passage-name {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 0.2em;
  }
  .home-passage-meta {
    display: block;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    color: var(--ink-faint);
    margin-top: 0.2rem;
  }
  .home-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .home-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-top: 1px solid var(--line-soft);
    padding: 0.6rem 0.2rem;
    cursor: pointer;
    font: inherit;
    color: inherit;
  }
  .home-item:hover .home-item-name {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 0.2em;
  }
  .home-item:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
  .home-item-dots { display: inline-flex; gap: 0.3rem; flex: none; position: relative; top: 0.05em; }
  .home-item-name {
    font-family: "Spectral", serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
  }
  .home-item-meta {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0;
    color: var(--ink-faint);
    margin-left: auto;
    padding-left: 0.6rem;
    text-align: right;
    white-space: nowrap;
  }

  .detail-empty {
    font-family: "IBM Plex Mono", monospace;
    color: var(--ink-faint);
    padding: 4rem 0;
    text-align: center;
  }

  .back-home {
    display: inline-block;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    color: var(--ink-faint);
    text-decoration: none;
    margin-bottom: 1.2rem;
  }
  .back-home:hover { color: var(--ink); text-decoration: underline; text-decoration-style: dotted; }

  /* ---------- Avatar (photo d'auteurice, avec repli sur initiales) ---------- */
  .avatar {
    position: relative;
    flex: none;
    display: inline-block;
    border-radius: 0;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--line);
  }
  .avatar-sm { width: 2.5rem; height: 3.1rem; border-radius: 0; }
  .avatar-lg { width: 7.5rem; height: 9.5rem; border-radius: 0; }
  .avatar-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Spectral", serif;
    font-weight: 700;
    color: var(--on-medium, #fff);
    background: var(--medium-color, var(--ink-faint));
  }
  .avatar-sm .avatar-fallback { font-size: 0.82rem; }
  .avatar-lg .avatar-fallback { font-size: 2.4rem; }
  .avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .avatar.no-photo .avatar-img { display: none; }

  .author-bio-row {
    display: flex;
    gap: 1.3rem;
    align-items: flex-start;
    margin-top: 0.6rem;
  }
  .author-bio-row .author-bio { flex: 1; min-width: 0; margin-top: 0; }
  @media (max-width: 560px) {
    .author-bio-row { gap: 0.9rem; }
    .avatar-lg { width: 3.6rem; height: 4.6rem; }
    .avatar-lg .avatar-fallback { font-size: 1.1rem; }
  }

  .author-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.6rem 1rem;
    margin-bottom: 0.4rem;
  }
  .author-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; }
  /* .author-tag : voir le bloc "Étiquettes" plus haut pour la base commune */
  .author-bio {
    color: var(--ink-soft);
    max-width: 68ch;
    margin: 0.6rem 0 0;
  }
  .author-meta-line {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.74rem;
    letter-spacing: 0;
    color: var(--ink-faint);
  }
  /* Langue · siècle et badges de médium sur une seule ligne, sous le titre */
  .author-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.9rem;
    margin-top: 0.4rem;
  }
  .root-divider { margin: 1.6rem 0; }
  .root-mark { display: block; opacity: 0.5; }

  /* ---------- Badges de médium (livre, film, musique...) — base commune : bloc "Étiquettes" ---------- */
  .medium-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; }
  .medium-badge { padding-left: 0.5rem; }
  .medium-dot { width: 0.45rem; height: 0.45rem; border-radius: 0; flex: none; background: var(--medium-color, currentColor); }
  .filter-chip .medium-dot { margin-right: -0.05rem; }
  /* Carré de médium devant le titre d'une œuvre, dans les cartes de la fiche */
  .work-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    flex: none;
    align-self: center;
    margin-right: 0.45rem;
    position: relative;
    top: 0.06em;
  }

  /* ---------- Onglets internes à une fiche (Œuvres / Recos / Auteurices en lien) ---------- */
  .author-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.3rem 0 1.8rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--line);
  }
  .author-tab {
    font-family: "IBM Plex Mono", monospace;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    padding: 0.4rem 0 0.6rem;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--ink-faint);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    cursor: pointer;
  }
  .author-tabs { gap: 1.6rem; }
  .author-tab:hover { color: var(--ink); }
  .author-tab .dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; flex: none; }
  .author-tab .dot.works { background: var(--worklink); }
  .author-tab .dot.authorlink { background: var(--authorlink); }
  .author-tab .cnt { font-weight: 600; color: var(--ink); }
  .author-tab.type-authorlink { color: var(--authorlink); }
  .author-tab.type-authorlink .cnt { color: var(--authorlink); }
  .author-tab.type-works { color: var(--worklink); }
  .author-tab.type-works .cnt { color: var(--worklink); }
  .author-tab.empty { opacity: 0.4; pointer-events: none; }
  .author-tab.active {
    background: none;
    color: var(--ink);
    border-bottom-color: var(--ink) !important;
  }
  .author-tab.active .cnt { color: var(--ink); }
  .author-tab-panel[hidden] { display: none; }

  /* ---------- Sommaire des œuvres évoquées (sous la bio) ---------- */
  .works-index {
    margin: 1.4rem 0 0;
    border-top: 1px solid var(--line);
  }
  .works-index > summary {
    list-style: none;
    cursor: pointer;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
    padding: 0.7rem 0.15rem 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .works-index > summary::-webkit-details-marker { display: none; }
  .works-index > summary .chev { margin-left: auto; }
  .works-index > summary:hover { color: var(--ink-soft); }
  .works-index > summary:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
  .wi-count { color: var(--ink-soft); font-weight: 600; }

  .works-index-list {
    display: flex;
    flex-direction: column;
    max-height: 15rem;
    overflow-y: auto;
    border-top: 1px solid var(--line-soft);
  }
  .works-index-item {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid var(--line-soft);
    padding: 0.45rem 0.15rem;
    cursor: pointer;
    font: inherit;
    color: var(--ink-soft);
  }
  .works-index-item:last-child { border-bottom: none; }
  .works-index-item .medium-dot { flex: none; align-self: center; width: 0.5rem; height: 0.5rem; }
  .works-index-item:hover { color: var(--ink); }
  .works-index-item:hover .wi-title {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 0.2em;
  }
  .works-index-item:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
  .wi-title {
    font-family: "Spectral", serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
    flex: 1;
    min-width: 0;
  }
  .wi-meta {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    color: var(--ink-faint);
    flex: none;
    max-width: 42%;
    padding-left: 0.7rem;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ---------- Works ---------- */
  .works { display: flex; flex-direction: column; gap: 1.2rem; }
  .work-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 1.1rem 1.3rem 1rem;
    scroll-margin-top: 1rem;
  }
  .work-head {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
  }
  .work-title { font-family: "Spectral", serif; font-weight: 600; font-size: 1.28rem; margin: 0; letter-spacing: 0; }
  .work-meta {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.76rem;
    color: var(--ink-faint);
    letter-spacing: 0;
  }

  .principle-group { margin-top: 1.1rem; }
  .principle-group:first-of-type { margin-top: 0; }
  .principle-kicker {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.45rem;
  }
  .principle-kicker.formal { color: var(--formal); }
  .principle-kicker.thematic { color: var(--thematic); }

  .principle {
    display: flex;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem 0.55rem 0.9rem;
    margin-bottom: 0.5rem;
  }
  .principle.formal { border-left: 2px solid var(--formal); background: var(--card-hover); }
  .principle.thematic { border-left: 2px solid var(--thematic); background: var(--card-hover); }
  .principle-text { flex: 1; min-width: 0; }
  .principle-name {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
  }
  .principle.formal .principle-name { color: var(--formal); }
  .principle.thematic .principle-name { color: var(--thematic); }
  .principle-just {
    font-size: 0.98rem;
    color: var(--ink-soft);
    margin-top: 0.15rem;
  }

  /* ---------- Recommendations ---------- */
  .recos { display: flex; flex-direction: column; gap: 1rem; }
  .reco-card {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 0.4rem 1rem;
    border: 1px solid var(--line);
    border-left: 2px solid var(--worklink);
    border-radius: 0;
    padding: 1rem 1.2rem 1.1rem;
    background: var(--card);
  }
  .reco-link {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 0.15rem;
  }
  .reco-work-from, .reco-work-to {
    font-family: "Spectral", serif;
    font-weight: 600;
    font-size: 1.22rem;
    line-height: 1.25;
  }
  .reco-work-from { color: var(--ink-soft); font-weight: 400; }
  .reco-work-to { color: var(--ink); }
  .reco-to {
    font-family: "Spectral", serif;
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--ink);
  }
  .author-link-btn {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    text-align: left;
    cursor: pointer;
  }
  .author-link-btn:hover { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 0.2em; }
  .author-link-btn:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
  /* Nom sans fiche : souligné pointillé en permanence pour signaler « pas encore de fiche » */
  .author-link-btn.is-proposed {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: var(--ink-faint);
    text-underline-offset: 0.2em;
  }
  .reco-arrow { color: var(--ink-faint); font-family: "IBM Plex Mono", monospace; }
  .reco-disc {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.74rem;
    letter-spacing: 0;
    color: var(--ink-faint);
  }
  .reco-works {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .reco-principle {
    grid-column: 1 / -1;
    margin-top: 0.4rem;
    padding: 0.5rem 0.7rem;
    background: var(--card-hover);
    border-left: 1px solid var(--line);
    font-size: 0.9rem;
  }
  .reco-principle .k {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-faint);
    display: block;
    margin-bottom: 0.25rem;
  }
  .reco-just {
    grid-column: 1 / -1;
    color: var(--ink-soft);
    font-size: 0.99rem;
    margin-top: 0.3rem;
  }

  /* Sources d'un lien (ramification / voisinage / cité·e par) */
  .link-sources {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    color: var(--ink-faint);
    line-height: 1.55;
    margin: 0.7rem 0 0;
  }
  .reco-card .link-sources { grid-column: 1 / -1; }
  .link-sources .src-k {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.5rem;
  }
  .link-sources a {
    color: inherit;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 0.2em;
  }
  .link-sources a:hover { color: var(--ink); }
  .link-sources .src-ext { font-size: 0.9em; }
  .link-sources .src-sep { color: var(--line); }
  /* Liens externes de la fiche (Wikipédia / Babelio / IMDb / Genius) : sous la bio */
  .author-links { margin-top: 1rem; }

  /* ---------- Recommandations d'auteur (liens larges) ---------- */
  .author-recos { display: flex; flex-direction: column; gap: 1.2rem; }
  .author-reco-card {
    border: 1px solid var(--line);
    border-left: 2px solid var(--authorlink);
    border-radius: 0;
    padding: 1rem 1.2rem 1.2rem;
    background: var(--card);
  }
  .author-reco-head {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.15rem;
  }
  .author-reco-to {
    font-family: "Spectral", serif;
    font-weight: 700;
    font-size: 1.2rem;
  }
  .author-reco-disc {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0;
    color: var(--ink-faint);
  }
  .author-reco-resume {
    color: var(--ink-soft);
    font-style: italic;
    margin: 0.2rem 0 0.7rem;
  }
  .author-reco-just {
    font-size: 1.02rem;
    color: var(--ink);
    line-height: 1.65;
  }
  .author-reco-works {
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 1px dashed var(--line);
  }
  .author-reco-works .k {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-faint);
    display: block;
    margin-bottom: 0.5rem;
  }
  .revealing-work {
    display: flex;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem 0.55rem 0.9rem;
    background: var(--card-hover);
    border-left: 2px solid var(--authorlink);
    margin-bottom: 0.4rem;
  }
  .revealing-work:last-child { margin-bottom: 0; }
  .revealing-work-text { flex: 1; min-width: 0; }
  .revealing-work-title {
    font-family: "Spectral", serif;
    font-weight: 600;
    color: var(--authorlink);
    display: block;
  }
  .revealing-work-title .yr {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 500;
    font-size: 0.72em;
    color: var(--ink-faint);
    margin-left: 0.4em;
  }
  .revealing-work-reason {
    font-size: 0.95rem;
    color: var(--ink-soft);
    margin-top: 0.15rem;
  }

  /* ---------- Tabs ---------- */
  .tabs {
    display: inline-flex;
    gap: 1.6rem;
    padding: 0 0 0.7rem;
    background: none;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    margin-bottom: 2.2rem;
  }
  .tab-btn {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-faint);
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.2rem 0 0.55rem;
    cursor: pointer;
  }
  .tab-btn:hover { color: var(--ink); }
  .tab-btn.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
  .tab-btn:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
  .panel[hidden] { display: none; }

  /* ---------- Sous-onglets (ex. Pousses / Nœuds dans l'onglet Rhizome) ---------- */
  .subtabs {
    display: inline-flex;
    gap: 1.4rem;
    padding: 0 0 0.6rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.8rem;
  }
  .subtab-btn {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.2rem 0 0.5rem;
    cursor: pointer;
  }
  .subtab-btn:hover { color: var(--ink); }
  .subtab-btn.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
  .subtab-btn:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
  .subpanel[hidden] { display: none; }

  /* ---------- Cloud ---------- */
  .cloud-intro { max-width: 62ch; color: var(--ink-soft); margin: 0 0 2rem; }
  .cloud-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.2rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    color: var(--ink-soft);
  }
  .cloud-stats b { color: var(--ink); font-size: 1rem; }
  .cloud-legend {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    color: var(--ink-soft);
  }
  .cloud-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
  .graph-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; display: inline-block; background: var(--ink-faint); }
  .graph-dot.no-dossier { background: none; border: 1.5px dashed var(--ink-faint); }

  .cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.55rem 1.1rem;
  }
  /* Tri par fréquence = mode « nuage » : lignes centrées, bords irréguliers.
     Tri A→Z = mode répertoire : bord gauche droit pour balayer les noms. */
  .cloud.is-cloud { justify-content: center; }
  .cloud-item {
    font-family: "Spectral", serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink-soft);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration-line: none;
    text-underline-offset: 0.2em;
  }
  .cloud-item:hover { text-decoration-line: underline; text-decoration-style: dotted; }
  .cloud-item:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 3px; }
  .cloud-item.has-dossier { color: var(--formal); }
  .cloud-item .cnt {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 500;
    font-size: 0.62em;
    color: var(--ink-faint);
    margin-left: 0.2em;
  }
  .cloud-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.55rem 1.4rem;
    margin-bottom: 1.6rem;
  }
  .cloud-controls .cc-group {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
  }
  .cloud-controls .legend-lead {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    color: var(--ink-faint);
    margin-right: 0.15rem;
  }

  /* ---------- Graphe des liens entre auteurices ---------- */
  .graph-wrap {
    position: relative;
    border: 1px solid var(--line);
    background: var(--card);
    height: min(72vh, 640px);
    overflow: hidden;
    touch-action: none;
  }
  .graph-wrap.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 200;
    height: auto;
    border: none;
  }
  .graph-canvas { position: absolute; inset: 0; }
  .graph-svg {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
  }
  .graph-svg.is-panning { cursor: grabbing; }
  #graph-viewport { transition: transform 0.35s ease; }
  #graph-viewport.no-anim { transition: none; }

  /* Fond de sous-groupe : une teinte par communauté (--hull-hue posé en ligne ;
     saturation / clarté suivent le thème via --hull-s / --hull-l). */
  .graph-hull {
    fill: hsl(var(--hull-hue, 90) var(--hull-s) var(--hull-l));
    fill-opacity: 0.11;
    stroke: hsl(var(--hull-hue, 90) var(--hull-s) var(--hull-l));
    stroke-opacity: 0.24;
    stroke-width: 1;
    pointer-events: none;
  }
  .graph-cut-ring { fill: none; stroke: var(--ink-faint); stroke-width: 1; opacity: 0.5; pointer-events: none; }
  .graph-node.hi .graph-cut-ring, .graph-node.focus-root .graph-cut-ring { opacity: 0.85; stroke: var(--ink-soft); }
  .graph-cluster-label {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    fill: hsl(var(--hull-hue, 90) var(--hull-s) var(--hull-label-l));
    opacity: 0.75;
    pointer-events: none;
  }

  .graph-hulls { transition: opacity 0.2s ease; }
  .graph-svg.has-focus .graph-hulls,
  .graph-svg.medium-filtered .graph-hulls { opacity: 0; }

  /* Filtre par médium (chips au-dessus du graphe) */
  .graph-mediums {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 2rem;
  }
  .graph-mediums .legend-lead {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    color: var(--ink-faint);
    margin-right: 0.15rem;
  }
  .graph-mediums.has-active .filter-chip:not(.active) { opacity: 0.5; }

  .graph-hint {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    color: var(--ink-faint);
    margin: -0.4rem 0 0.9rem;
  }
  .cloud-legend--slim {
    gap: 0.9rem 1.1rem;
    font-size: 0.8rem;
    color: var(--ink-faint);
    margin: 0.7rem 0 2rem;
  }
  .graph-find { margin-bottom: 0.9rem; }
  .graph-find input {
    width: 100%;
    max-width: 22rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 0;
  }
  .graph-find input::placeholder { color: var(--ink-faint); }
  .graph-find input:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }

  .graph-node.medium-off { opacity: 0.05 !important; pointer-events: none; }
  .graph-node.medium-off text { display: none; }
  .graph-edge.medium-off { opacity: 0.025 !important; }

  .graph-edge {
    stroke: var(--authorlink);
    stroke-linecap: round;
    opacity: 0.3;
    transition: opacity 0.15s ease, x1 0.3s ease, y1 0.3s ease, x2 0.3s ease, y2 0.3s ease;
  }
  .graph-edge.is-cross-group { stroke: var(--ink-faint); opacity: 0.5; }
  .graph-edge.hi { opacity: 0.9; }
  .graph-edge.dim { opacity: 0.05; }
  .graph-edge.faded { opacity: 0.04; }
  .graph-edge.is-leaf-edge { opacity: 0; }
  .graph-svg.has-focus .graph-edge.is-leaf-edge:not(.faded) { opacity: 0.22; }

  .graph-node circle {
    fill: var(--node-color, var(--ink-faint));
    stroke: var(--card);
    stroke-width: 1.2;
    cursor: pointer;
    transition: opacity 0.15s ease, stroke 0.15s ease, cx 0.3s ease, cy 0.3s ease;
  }
  .graph-node.no-dossier circle { stroke: var(--node-color, var(--ink-faint)); stroke-dasharray: 1.4 1.4; }
  .graph-node.is-leaf { opacity: 0.4; }
  .graph-node.is-leaf circle { stroke: none; cursor: default; }
  .graph-node.is-leaf.labelled, .graph-node.is-leaf.hi { opacity: 1; }

  .graph-node text {
    font-family: "IBM Plex Mono", monospace;
    font-size: 9px;
    fill: var(--ink-soft);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, x 0.3s ease, y 0.3s ease;
  }
  .graph-node.is-hub text {
    font-size: 11px;
    opacity: 1;
    fill: var(--ink);
    font-weight: 600;
    paint-order: stroke;
    stroke: var(--card);
    stroke-width: 2.5px;
    stroke-linejoin: round;
  }
  .graph-svg.zoomed .graph-node.is-bridge text { opacity: 0.9; }
  .graph-node.is-hub text,
  .graph-node.is-bridge.labelled text,
  .graph-svg.zoomed .graph-node.is-bridge text { pointer-events: auto; cursor: pointer; }
  .graph-node.labelled text { opacity: 1; fill: var(--ink); }
  .graph-node.hi circle { stroke: var(--ink); stroke-width: 2; }
  .graph-node.hi text { opacity: 1; fill: var(--ink); font-weight: 600; }
  .graph-node.dim { opacity: 0.18; }
  .graph-node.faded { opacity: 0.06; pointer-events: none; }
  .graph-node.faded text { opacity: 0 !important; }
  .graph-node.is-leaf.faded { opacity: 0.03; }
  .graph-node.focus-root circle { stroke: var(--accent-ring); stroke-width: 2.5; }
  .graph-node.focus-root text { opacity: 1; fill: var(--ink); font-weight: 700; }
  .graph-node:focus:not(:focus-visible) { outline: none; }
  .graph-node:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 3px; }
  .graph-node:focus circle { stroke: var(--accent-ring); stroke-width: 2; }

  /* Résultat d'une recherche : bref halo qui se résorbe. */
  .graph-node.found circle { animation: graph-found 1.8s ease-out; }
  @keyframes graph-found {
    0% { stroke: var(--accent-ring); stroke-width: 7; }
    70% { stroke: var(--accent-ring); stroke-width: 2.5; }
    100% { stroke: var(--card); stroke-width: 1.2; }
  }
  @media (prefers-reduced-motion: reduce) {
    .graph-node.found circle { animation: none; stroke: var(--accent-ring); stroke-width: 2.5; }
  }

  /* Nom de fiche qu'on n'a pas pu poser sans chevauchement : masqué au repos,
     révélé au survol / à l'isolement / au focus clavier. */
  .graph-node.name-off text { opacity: 0 !important; }
  .graph-node.name-off.hi text,
  .graph-node.name-off.labelled text,
  .graph-node.name-off.focus-root text,
  .graph-node.name-off:focus text { opacity: 1 !important; }

  /* Filet fin reliant un point à son nom quand celui-ci a été écarté. */
  .graph-label-leaders { transition: opacity 0.2s ease; }
  .graph-svg.has-focus .graph-label-leaders,
  .graph-svg.medium-filtered .graph-label-leaders { opacity: 0; }
  .graph-label-leader { stroke: var(--ink-faint); stroke-width: 0.6; opacity: 0.4; pointer-events: none; fill: none; }

  /* ---------- Ego-graphe d'une fiche (onglet « Rhizome ») ---------- */
  .ego { margin-top: 0.4rem; }
  .ego-lead { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 0.9rem; max-width: 54ch; }
  .ego-legend {
    display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem;
    font-family: "IBM Plex Mono", monospace; font-size: 0.8rem; color: var(--ink-faint);
    margin: 0 0 1rem;
  }
  .ego-k { display: inline-flex; align-items: center; gap: 0.45em; }
  .ego-swatch { width: 16px; height: 0; border-top: 2px solid var(--ink-faint); flex: none; }
  .ego-swatch.is-ramif { border-top-color: var(--worklink); }
  .ego-swatch.is-vois { border-top-color: var(--authorlink); }
  .ego-swatch.is-in { border-top-style: dashed; }
  .ego-swatch.is-hop2 { width: 6px; height: 6px; border: 0; border-radius: 50%; background: var(--ink-faint); }

  .ego-canvas { border: 1px solid var(--line); background: var(--card); padding: 0.5rem; }
  .ego-svg { display: block; width: 100%; height: auto; max-height: 80vh; margin: 0 auto; }

  .ego-edge { fill: none; stroke: var(--ink-faint); opacity: 0.5; stroke-width: 1.1; }
  .ego-edge.is-ramif { stroke: var(--worklink); opacity: 0.75; stroke-width: 1.4; }
  .ego-edge.is-vois { stroke: var(--authorlink); opacity: 0.75; stroke-width: 1.4; }
  .ego-edge.is-in { color: var(--ink-faint); stroke-dasharray: 3 3; opacity: 0.7; }
  .ego-edge.is-cross { stroke: var(--formal); opacity: 0.4; stroke-dasharray: 2 4; }
  .ego-edge.is-hop2 { opacity: 0.3; }

  .ego-node { cursor: pointer; }
  .ego-node.is-center { cursor: default; }
  .ego-node circle {
    fill: var(--ego-color, var(--ink-faint));
    stroke: var(--card); stroke-width: 1.5;
    transition: stroke 0.15s ease, stroke-width 0.15s ease;
  }
  .ego-node.is-proposed circle {
    fill: var(--card); stroke: var(--ego-color, var(--ink-faint)); stroke-dasharray: 1.6 1.6;
  }
  .ego-node.is-center circle { fill: var(--accent-ring); stroke: var(--card); stroke-width: 2; }
  .ego-node.is-hop2 circle { opacity: 0.7; }
  .ego-node text {
    font-family: "IBM Plex Mono", monospace; font-size: 8.5px;
    fill: var(--ink-soft); pointer-events: none;
    paint-order: stroke; stroke: var(--card); stroke-width: 2.5px; stroke-linejoin: round;
  }
  .ego-node.is-hop1 text { fill: var(--ink); }
  .ego-node.is-hop2 text { font-size: 7.5px; fill: var(--ink-faint); opacity: 0.78; }
  .ego-node.is-center text { font-size: 10px; fill: var(--ink); font-weight: 600; }
  .ego-node:hover circle { stroke: var(--ink); stroke-width: 2; stroke-dasharray: none; }
  .ego-node:hover text, .ego-node:focus-visible text { fill: var(--ink); opacity: 1; }
  .ego-node:focus:not(:focus-visible) { outline: none; }
  .ego-node:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 3px; }
  .ego-node:focus-visible circle { stroke: var(--accent-ring); stroke-width: 2; }

  .ego-to-graph {
    margin-top: 1rem;
    font-family: "IBM Plex Mono", monospace; font-size: 0.8rem;
    padding: 0.45rem 0.7rem;
    background: var(--card); color: var(--ink-soft);
    border: 1px solid var(--line); cursor: pointer;
  }
  .ego-to-graph:hover { color: var(--ink); border-color: var(--ink-faint); }
  .ego-to-graph:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }

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

  .graph-tools {
    position: absolute;
    display: flex;
    gap: 0.3rem;
    z-index: 2;
  }
  .graph-tools.top-right { top: 0.5rem; right: 0.5rem; }
  .graph-tools.bottom-right { bottom: 0.5rem; right: 0.5rem; }
  .graph-btn {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    line-height: 1;
    padding: 0.4rem 0.55rem;
    background: var(--card);
    color: var(--ink-soft);
    border: 1px solid var(--line);
    cursor: pointer;
  }
  .graph-btn:hover { color: var(--ink); border-color: var(--ink-faint); }
  .graph-btn:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
  .graph-btn:disabled { opacity: 0.35; cursor: default; }
  .graph-btn:disabled:hover { color: var(--ink-soft); border-color: var(--line); }

  .graph-focusbar {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2;
    max-width: calc(100% - 1rem);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.55rem;
    padding: 0.45rem 0.6rem;
    background: var(--card);
    border: 1px solid var(--line);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    color: var(--ink-soft);
  }
  .graph-focusbar[hidden] { display: none; }
  .graph-focusbar .fb-name { color: var(--ink); font-weight: 600; }
  .graph-focusbar .fb-meta { color: var(--ink-faint); }

  /* ---------- Statistiques ---------- */
  .stat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2.6rem;
  }
  .stat-tile {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 0.9rem 1.1rem 1.1rem;
  }
  .stat-tile .num {
    font-family: "Spectral", serif;
    font-weight: 700;
    font-size: 2rem;
    line-height: 1;
    color: var(--ink);
    display: block;
  }
  .stat-tile .lbl {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0;
    color: var(--ink-faint);
    margin-top: 0.5rem;
    display: block;
  }
  .stat-section { margin-bottom: 3rem; }
  .stat-section:last-child { margin-bottom: 0; }
  /* Titre de zone : kicker mono capitales, comme l'accueil et les filtres */
  .stat-title {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    margin: 0 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
  }
  .stat-subgroup { margin-bottom: 2rem; }
  .stat-subgroup:last-child { margin-bottom: 0; }
  .stat-subtitle {
    font-family: "Spectral", serif;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 0.9rem;
  }
  .stat-note {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    line-height: 1.65;
    color: var(--ink-soft);
    margin: 0 0 1rem;
    max-width: 64ch;
  }
  .stat-note:last-child { margin-bottom: 0; }
  .stat-note b { color: var(--ink); font-weight: 600; }
  .stat-legend {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    color: var(--ink-faint);
    margin: 0.7rem 0 0;
  }
  /* Sens du temps : une barre en trois segments (passé · contemporain · postérieur) */
  .stat-split {
    display: flex;
    height: 0.55rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    margin: 0.2rem 0 0.7rem;
  }
  .stat-split .seg { height: 100%; }
  .stat-split .seg-edge { background: var(--ink-soft); }
  .stat-split .seg-mid { background: var(--line); }
  .stat-split .seg + .seg { border-left: 1px solid var(--paper); }
  .stat-split-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 1.1rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    color: var(--ink-faint);
  }
  .stat-split-legend b { color: var(--ink); font-weight: 600; }
  /* Liste des paires de fiches qui se recommandent mutuellement */
  .stat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
  .stat-list li { display: flex; align-items: center; gap: 0.5rem; }
  .stat-list .author-link-btn { font-family: "Spectral", serif; font-size: 0.98rem; color: var(--ink); flex: none; }
  .stat-list .sep { color: var(--ink-faint); font-family: "IBM Plex Mono", monospace; padding: 0 0.15rem; }
  /* Matrice de la traversée des arts : lignes = médium source, colonnes = médium visé */
  .stat-matrix { overflow-x: auto; margin-top: 0.4rem; }
  .stat-matrix table { border-collapse: collapse; }
  .stat-matrix th,
  .stat-matrix td {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    padding: 0.36rem 0.62rem;
    text-align: center;
  }
  .stat-matrix td.cell { border: 1px solid var(--line-soft); }
  .stat-matrix th {
    font-weight: 400;
    color: var(--ink-faint);
  }
  .stat-matrix th.col-h { vertical-align: bottom; border-bottom: 1px solid var(--line); }
  .stat-matrix th.row-h { text-align: right; white-space: nowrap; color: var(--ink-soft); border-right: 1px solid var(--line); }
  .stat-matrix .cell-dot {
    display: inline-block;
    border-radius: 50%;
    background: var(--ink-soft);
    vertical-align: middle;
  }
  .stat-matrix td.diag .cell-dot { opacity: 0.28; }
  .stat-matrix td.zero { color: var(--line); }
  .stat-bars { display: flex; flex-direction: column; gap: 0.6rem; }
  .stat-bar-row {
    display: grid;
    grid-template-columns: minmax(120px, 180px) 1fr 2.5rem;
    align-items: center;
    gap: 0.8rem;
  }
  .stat-bar-label {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    overflow-wrap: anywhere;
  }
  .stat-bar-track {
    background: var(--paper);
    box-shadow: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    height: 0.55rem;
    overflow: hidden;
  }
  .stat-bar-fill { display: block; height: 100%; border-radius: 6px; }
  .stat-bar-count {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    color: var(--ink-faint);
    text-align: right;
  }

  /* ---------- Frise chronologique ---------- */
  .frise {
    --frise-name-w: 172px;
    --frise-gap: 1.1rem;
  }

  /* Puces de médium (mêmes chips que le graphe) : filtrent la frise */
  .frise-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.4rem;
  }
  .frise-controls .legend-lead {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    color: var(--ink-faint);
    margin-right: 0.15rem;
  }
  .frise-controls.has-active .filter-chip:not(.active) { opacity: 0.5; }

  /* Histogramme : nombre d'œuvres datées par décennie, même échelle que la frise */
  .frise-histo {
    display: grid;
    grid-template-columns: var(--frise-name-w) 1fr;
    column-gap: var(--frise-gap);
    align-items: end;
    margin-bottom: 0.15rem;
  }
  .frise-histo-lead {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
    padding-bottom: 0.2rem;
  }
  .frise-histo-track {
    position: relative;
    height: 46px;
    border-bottom: 1px solid var(--line);
  }
  .frise-histo-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
  }
  .frise-histo-fill {
    display: block;
    width: 100%;
    min-height: 1px;
    background: var(--ink-soft);
    opacity: 0.26;
    transition: opacity 0.12s ease, background 0.12s ease;
  }
  .frise-histo-bar:hover .frise-histo-fill { opacity: 0.45; }
  .frise-histo-bar.active .frise-histo-fill { opacity: 0.9; background: var(--thematic); }
  .frise-histo.has-active .frise-histo-bar:not(.active) .frise-histo-fill { opacity: 0.12; }
  .frise-histo-bar:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }

  .frise-scroll { position: relative; }

  /* Filets verticaux alignés sur les graduations, sur toute la hauteur de la liste */
  .frise-lines {
    position: absolute;
    left: calc(var(--frise-name-w) + var(--frise-gap));
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
  }
  .frise-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--line-soft);
  }
  .frise-line.strong { background: var(--line); }

  /* Axe collant en haut du panneau pendant le défilement */
  .frise-axis {
    position: sticky;
    top: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: var(--frise-name-w) 1fr;
    column-gap: var(--frise-gap);
    background: var(--paper);
  }
  .frise-axis-track {
    position: relative;
    height: 1.6rem;
    border-bottom: 1px solid var(--line);
  }
  .frise-tick {
    position: absolute;
    bottom: 0.2rem;
    transform: translateX(-50%);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    color: var(--ink-faint);
    white-space: nowrap;
  }

  .frise-rows {
    display: grid;
    grid-template-columns: var(--frise-name-w) 1fr;
    row-gap: 0.5rem;
    column-gap: var(--frise-gap);
    align-items: center;
    padding-top: 0.4rem;
  }

  /* En-tête de siècle collant, juste sous l'axe */
  .frise-cent {
    grid-column: 1 / -1;
    position: sticky;
    top: calc(1.6rem + 1px);
    z-index: 2;
    background: var(--paper);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ink-faint);
    padding: 0.5rem 0 0.3rem;
    border-bottom: 1px solid var(--line);
  }

  .frise-name {
    position: relative;
    z-index: 1;
    font-family: "Spectral", serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink);
    background: none;
    border: none;
    padding: 0.1rem 0;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity 0.15s ease;
  }
  .frise-name:hover,
  .frise-name:hover + .frise-track { background: var(--card-hover); }
  .frise-name:hover { text-decoration: underline; text-decoration-style: dotted; }
  .frise-name:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
  .frise-name.is-dim, .frise-track.is-dim { opacity: 0.22; }
  .frise-track.is-dim { pointer-events: none; }

  .frise-track {
    position: relative;
    z-index: 1;
    height: 1.6rem;
    transition: opacity 0.15s ease;
  }
  .frise-track::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--line);
  }
  .frise-bar {
    position: absolute;
    top: 50%;
    height: 0.28rem;
    border-radius: 999px;
    transform: translateY(-50%);
    opacity: 0.5;
  }
  .frise-dot {
    position: absolute;
    top: 50%;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 2px var(--card);
  }
  /* Années d'extrémité : posées de part et d'autre du point (jamais centrées dessus),
     pour qu'elles s'écartent l'une de l'autre quand la barre est courte. */
  .frise-edge {
    position: absolute;
    top: -0.8rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    color: var(--ink-faint);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.12s ease;
  }
  .frise-edge-start { transform: translateX(calc(-100% - 5px)); }
  .frise-edge-end { transform: translateX(5px); }
  .frise-name:hover + .frise-track .frise-edge,
  .frise-track:hover .frise-edge { opacity: 1; }

  @media (max-width: 600px) {
    .frise { --frise-name-w: 104px; --frise-gap: 0.6rem; }
    .frise-name { font-size: 0.8rem; }
    .frise-histo-lead { font-size: 0.72rem; }
  }

  /* ---------- Loader ---------- */
  .shell[hidden], .loader[hidden] { display: none; }
  .loader {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
  }
  .loader-box {
    max-width: 46ch;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 2rem 2.2rem;
  }
  .loader-box h2 { margin: 0 0 0.8rem; font-size: 1.35rem; }
  .loader-box p { color: var(--ink-soft); margin: 0 0 0.8rem; font-size: 0.95rem; }
  .loader-box code {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.85em;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 0.1em 0.35em;
  }
  .loader-hint { font-size: 0.88rem !important; }
  .loader-btn {
    display: inline-block;
    margin-top: 0.6rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--paper);
    background: var(--ink);
    border-radius: 8px;
    padding: 0.65rem 1.1rem;
    cursor: pointer;
  }
  .loader-btn:hover { opacity: 0.88; }
  .loader-error {
    margin-top: 1rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    color: var(--thematic);
  }

  @media (prefers-reduced-motion: no-preference) {
    .author-index-item, .work-card, .reco-card, .cloud-item { transition: background-color 0.15s ease, color 0.15s ease; }
  }

  /* ---------- Bascule de thème (clair / sombre / système) ---------- */
  .theme-switch {
    display: flex;
    gap: 0.2rem;
    padding: 0.2rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
  }
  .theme-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-faint);
    background: none;
    border: none;
    border-radius: 6px;
    padding: 0.35rem 0.3rem;
    cursor: pointer;
    white-space: nowrap;
    min-width: 0;
  }
  .theme-btn:hover { color: var(--ink); }
  .theme-btn[aria-pressed="true"] {
    background: var(--card-hover);
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .theme-btn:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
  .theme-btn svg { width: 0.85rem; height: 0.85rem; flex: none; }

  /* ---------- Bouton "Parcourir" (ouvre l'index sur mobile) ---------- */
  .index-toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
  }
  .index-toggle:hover { background: var(--card-hover); }
  .index-toggle:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }

  @media (max-width: 860px) {
    .index-toggle { display: flex; }
    .author-index, .index-empty { display: none; }
    .sidebar.index-open .author-index { display: flex; max-height: 70vh; overflow-y: auto; }
    .sidebar.index-open .index-empty:not([hidden]) { display: block; }
  }

  /* Indice de correspondance de recherche (quand le match ne porte pas sur le nom) */
  .idx-match {
    display: block;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    color: var(--worklink);
    margin-top: 0.15rem;
  }
  .idx-match[hidden] { display: none; }
  .idx-match mark {
    background: var(--worklink-bg);
    color: inherit;
    padding: 0 0.15em;
  }

  /* ---------- "Cité·e par" (liens réciproques) ---------- */
  .citedby { display: flex; flex-direction: column; gap: 1.2rem; }
  .citedby-card {
    border: 1px solid var(--line);
    border-left: 2px solid var(--ink-faint);
    border-radius: 0;
    padding: 0.9rem 1.2rem 1rem;
    background: var(--card);
  }
  .citedby-from {
    font-family: "Spectral", serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ink);
    display: inline-block;
    margin-bottom: 0.5rem;
  }
  .citedby-hit {
    padding: 0.5rem 0.7rem;
    margin-top: 0.5rem;
    background: var(--card-hover);
    border-left: 2px solid var(--line);
  }
  .citedby-hit.works { border-left-color: var(--worklink); }
  .citedby-hit.authorlink { border-left-color: var(--authorlink); }
  .citedby-kind {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0;
    display: block;
    margin-bottom: 0.25rem;
  }
  .citedby-hit.works .citedby-kind { color: var(--worklink); }
  .citedby-hit.authorlink .citedby-kind { color: var(--authorlink); }
  .citedby-works {
    font-family: "Spectral", serif;
    font-weight: 600;
    font-size: 1rem;
    display: block;
    margin-bottom: 0.2rem;
  }
  .citedby-works .arr { color: var(--ink-faint); font-family: "IBM Plex Mono", monospace; margin: 0 0.3em; }
  .citedby-resume { color: var(--ink-soft); font-style: italic; margin: 0.1rem 0 0.3rem; font-size: 0.95rem; }
  .citedby-just { color: var(--ink-soft); font-size: 0.96rem; margin: 0.15rem 0 0; }

  .home-item:focus-visible,
  .author-tab:focus-visible,
  .filter-chip:focus-visible,
  .author-index-item:focus-visible,
  .back-home:focus-visible,
  .brand:focus-visible,
  .index-toggle:focus-visible,
  .filter-reset:focus-visible {
    outline: 2px solid var(--accent-ring);
    outline-offset: 2px;
  }

  /* ---------- Crédits photos : lien discret en pied de sidebar + page dédiée ---------- */
  .credits-link {
    margin-top: auto;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    color: var(--ink-faint);
    text-decoration: none;
  }
  .credits-link:hover { color: var(--ink); text-decoration: underline; }
  .credits-page {
    max-width: 44rem;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
  }
  .credits-page h1 { font-weight: 400; font-size: 1.4rem; color: var(--ink); }
  .credits-page ul { list-style: none; padding: 0; line-height: 1.7; }
  .credits-page a { color: var(--ink-faint); }

  /* ---------- Mobile : barre latérale compacte (marque + thème, recherche, deux dépliants) ---------- */
  @media (max-width: 860px) {
    .sidebar {
      display: grid;
      grid-template-columns: 1fr 1fr;
      align-items: center;
      gap: 0.7rem 0.6rem;
      padding: 1rem;
    }
    .brand { grid-column: 1; grid-row: 1; }
    .brand-root, .brand-sub { display: none; }
    .brand-mark { font-size: 1.4rem; }
    .theme-switch { grid-column: 2; grid-row: 1; justify-self: end; }
    .theme-btn { font-size: 0; gap: 0; padding: 0.4rem 0.6rem; }
    .search-wrap { grid-column: 1 / -1; grid-row: 2; }
    .tools-toggle { grid-column: 1; grid-row: 3; }
    .index-toggle { grid-column: 2; grid-row: 3; }
    .sidebar-tools { grid-column: 1 / -1; grid-row: 4; }
    .author-index, .index-empty { grid-column: 1 / -1; grid-row: 5; }
    .credits-link { grid-column: 1 / -1; grid-row: 6; margin-top: 0; }
  }

  /* ---------- Mobile : cibles tactiles (≥44 px ; 36 px pour les puces de filtre, qui s'enchaînent) ---------- */
  @media (max-width: 860px) {
    .tabs {
      display: flex;
      gap: 1.3rem;
      max-width: 100%;
      overflow-x: auto;
      white-space: nowrap;
      padding-bottom: 0;
      margin-bottom: 1.6rem;
    }
    .tab-btn, .subtab-btn, .author-tab {
      min-height: 44px;
      padding-top: 0;
      padding-bottom: 0;
      display: inline-flex;
      align-items: center;
    }
    .subtabs { padding-bottom: 0; }
    .theme-btn, .tools-toggle, .index-toggle, .graph-btn, .filter-reset,
    .home-link-reroll { min-height: 44px; }
    .home-link-reroll, .filter-reset { display: inline-flex; align-items: center; }
    .search-input, .sort-select { min-height: 44px; }
    .search-clear { width: 44px; height: 44px; right: 0; border-radius: 8px; }
    .filter-chip { min-height: 36px; }
    .theme-btn { min-width: 44px; }
  }

  /* ---------- Tactile : le graphe ne doit pas capter le défilement de la page ----------
     Glissement vertical = défilement ; glissement horizontal et pincement = navigation du graphe.
     En plein écran (fixe, sans page dessous), tous les gestes reviennent au graphe. */
  .graph-hint-touch { display: none; }
  @media (pointer: coarse) {
    .graph-hint-pointer { display: none; }
    .graph-hint-touch { display: block; }
    .graph-wrap:not(.is-fullscreen),
    .graph-wrap:not(.is-fullscreen) .graph-svg { touch-action: pan-y; }
  }

  /* Titre de page pour les lecteurs d'écran : présent dans l'arbre d'accessibilité, invisible à l'écran */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  #page-title:focus { outline: none; }

  /* Chargement en ligne en échec : message court + « Réessayer », sans les consignes de fichier local */
  .loader.is-online .loader-local { display: none; }
  .noscript-note { max-width: 40rem; margin: 3rem auto; padding: 0 1rem; color: var(--ink-soft); }
