/* ============================================================
   Héros & mentors — port de heros-mentors-m0-cible (lot 1 : la grille).
   Scopé sous .pz-m0-heros. Écarts habituels du lot M0 : pas de Google Fonts,
   Libre Caslon Text → Roboto Slab.
   ============================================================ */

.pz-m0-heros {
  --ink: #211820;
  --cream: #f6f1e8;
  --paper: #fffdfa;
  --magenta: #a20b86;
  /* L'accent de la barre de rubrique : coque.css le lit ici. */
  --rubrique-accent: var(--magenta);
  --gold: #d2a72d;
  --line: #d7cec5;
  --muted: #716970;
  background: var(--cream);
  color: var(--ink);
}
body:has(.pz-m0-heros) { background: #f6f1e8; }
.pz-m0-heros.bg-box { background: var(--cream); border: 0 !important; border-radius: 0; }
div:has(~ .pz-m0-heros) { margin-top: 4px !important; margin-bottom: 6px !important; }

.pz-m0-heros .heros-main { max-width: 1180px; margin: auto; padding: 14px 28px 90px; }
.pz-m0-heros .eyebrow {
  display: block; font-size: 10px; font-weight: 700; letter-spacing: .14em; color: #b72999;
}
/* La barre de rubrique n'a plus son apparence ici : elle vit dans coque.css
   depuis le 19 août, une fois pour toutes. Cette feuille n'en déclare plus que
   l'accent, sur sa racine scopée — c'est la seule chose qui varie d'un
   territoire à l'autre. Les huit copies qui existaient étaient identiques au
   nom de la variable près ; la première page équipée après coup en aurait fait
   une neuvième. */


.pz-m0-heros .page-head { max-width: 780px; margin: 26px 0 22px; }
.pz-m0-heros .page-head h1 {
  margin: 10px 0 12px; font: 700 clamp(34px, 3.6vw, 46px)/1.06 "Roboto Slab", Georgia, serif;
  color: var(--ink);
}
.pz-m0-heros .page-head > p { margin: 0; color: #5f575b; line-height: 1.6; }
.pz-m0-heros .mentor-actuel { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.pz-m0-heros .mentor-actuel a { color: var(--magenta); font-weight: 600; }

.pz-m0-heros .heros-recherche { margin-top: 16px; display: flex; gap: 8px; max-width: 520px; }
.pz-m0-heros .heros-recherche input {
  flex: 1; min-width: 0; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--paper);
}
.pz-m0-heros .heros-recherche button {
  border: 0; border-radius: 22px; background: var(--ink); color: #fff;
  padding: 11px 18px; font-weight: 600; cursor: pointer;
}
.pz-m0-heros .heros-portee { margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.pz-m0-heros .heros-portee b { color: var(--ink); }

/* --- La grille --- */
.pz-m0-heros .hero-grid {
  margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.pz-m0-heros .hero-card {
  --tone: #a20b86;
  min-height: 330px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; padding: 24px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--paper);
  box-shadow: 0 10px 28px #251b2210;
}
/* Le bandeau de teinte : la Puissance principale se voit avant d'être lue.
   Port strict de heros-mentors-m0-cible (dégradé color-mix + medaillon qui
   déborde le bandeau). */
.pz-m0-heros .hero-card:before {
  content: '';
  position: absolute; inset: 0 0 auto; height: 118px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tone), #151015 20%), var(--tone));
  opacity: .97;
}
/* Le filigrane : le même portrait que le médaillon, agrandi et fondu — pas un
   second visuel, juste la texture qui manquait au bandeau (demande de Boris,
   17 août). Doit peindre APRÈS le dégradé et AVANT le médaillon : `position`
   la sort du flux normal (peint plus tôt) et son ordre dans le HAML, avant
   .hero-emblem, fait le reste.
   Le masque radial évite le disque à bord net qu'un portrait carré donnerait ;
   la désaturation partielle empêche les couleurs de la photo de se battre avec
   la teinte de la Puissance, qui doit rester lisible. */
/* Le conteneur épouse EXACTEMENT le bandeau et clippe : sans lui, le disque
   débordait sous la ligne du bandeau et se voyait sur le crème. C'est ce
   clip qui impose un conteneur réel plutôt qu'un simple décalage négatif. */
.pz-m0-heros .hero-band-mark {
  position: absolute; top: 0; right: 0; left: 0; height: 118px;
  overflow: hidden; pointer-events: none;
}
.pz-m0-heros .hero-band-mark svg,
.pz-m0-heros .hero-band-mark img {
  position: absolute; top: -24px; right: -24px; width: 190px; height: 190px;
  opacity: .26;
}
/* Le masque radial évite le bord net d'un portrait carré ; la désaturation
   partielle empêche les couleurs de la photo de se battre avec la teinte de
   la Puissance, qui doit rester lisible. */
.pz-m0-heros .hero-band-mark img {
  object-fit: cover; border-radius: 50%; filter: grayscale(.5) contrast(1.08);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 76%);
          mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 76%);
}
.pz-m0-heros .current-flag {
  position: absolute; right: 16px; top: 16px; z-index: 2; padding: 5px 10px; border-radius: 12px;
  background: var(--tone); color: #fff; font-size: 8px; font-weight: 700; letter-spacing: .1em;
}
/* `position: relative` est nécessaire : sans elle l'emblème peint AVANT le
   bandeau (:before, positionné) et se retrouve masqué par le dégradé dès que
   celui-ci dépasse quelques pixels — invisible tant que le bandeau ne
   mesurait que 5px, ça ne l'est plus à 118px. */
.pz-m0-heros .hero-emblem {
  width: 106px; height: 106px; position: relative; display: grid; place-items: center;
  margin: 22px 0 18px; border: 8px solid #fff; border-radius: 50%;
  background: #fff; box-shadow: 0 8px 26px #0004;
}
.pz-m0-heros .hero-emblem img,
.pz-m0-heros .hero-emblem svg { width: 100%; height: 100%; }
/* Port de la maquette : le portrait REMPLIT le médaillon, contrairement à
   l'emblème au trait qui s'y inscrivait. Le repli SVG reste donc correct. */
.pz-m0-heros .hero-emblem.portrait { overflow: hidden; }
.pz-m0-heros .hero-emblem.portrait img { object-fit: cover; border-radius: 50%; }
.pz-m0-heros .hero-card .eyebrow { color: var(--tone); }
.pz-m0-heros .hero-card h2 {
  margin: 7px 0 10px; font: 700 25px "Roboto Slab", Georgia, serif; color: var(--ink);
}
.pz-m0-heros .hero-card blockquote {
  margin: 0 0 16px; font: 400 15px/1.5 "Roboto Slab", Georgia, serif; color: #554b51;
}

/* --- La signature : principale + deux appuis ---
   Port STRICT de motor.css (qui écrase styles.css dans la maquette, chargé
   après lui) — ma première version inventait une bordure et un fond blanc,
   ce qui faisait ressembler les pastilles au bouton « Lire la fiche ».
   Ici : aucune bordure, un fond gris pour les appuis, la teinte de la
   Puissance pour la principale.
   L'information ne repose pas sur la seule couleur : le mot PRINCIPALE /
   APPUI la porte aussi, règle tenue partout dans le lot. */
.pz-m0-heros .power-signature { display: flex; flex-wrap: wrap; gap: 7px; margin: 17px 0; }
.pz-m0-heros .power-signature span {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 9px 4px 5px; border-radius: 16px; background: #f0ebe5; color: #5f555b;
}
.pz-m0-heros .power-signature img { width: 18px; height: 18px; }
.pz-m0-heros .power-signature b { font-size: 10px; }
.pz-m0-heros .power-signature small {
  margin-left: 2px; color: #968c91; font-size: 7px; letter-spacing: .08em;
}
/* SEUL ÉCART À LA MAQUETTE, demandé par Boris le 17 août : le TEXTE est
   assombri de 30%, le fond reste celui de la maquette. À teinte pure, cinq des
   six pastilles tombaient sous le seuil AA petit texte (4,5) — Imagination à
   2,48. 30% est le minimum mesuré qui les fait toutes passer (pire cas 4,67) ;
   en deçà, Imagination et Volonté restaient sous le seuil. La teinte reste
   reconnaissable, et c'est bien la couleur de la Puissance. */
.pz-m0-heros .power-signature .principal {
  background: color-mix(in srgb, var(--tone, #8b286f), #fff 88%);
  color: color-mix(in srgb, var(--tone, #8b286f), #000 30%);
}
.pz-m0-heros .power-signature .principal small { color: inherit; }

/* `margin-top: auto` vit ICI dans la maquette, pas sur la signature : ce sont
   les actions qui se collent en bas, la signature suivant simplement la
   citation. align-items est un ajout nécessaire : `button_to` enveloppe
   « Choisir » dans un <form>, que la maquette n'a pas. */
.pz-m0-heros .hero-actions { margin-top: auto; display: flex; gap: 7px; align-items: center; }
.pz-m0-heros .hero-choix { margin: 0; }
.pz-m0-heros .hero-actions .secondary,
.pz-m0-heros .hero-actions .primary {
  border-radius: 22px; padding: 10px 16px; font-size: 13px; font-weight: 600;
  text-decoration: none; cursor: pointer; display: inline-block;
}
.pz-m0-heros .hero-actions .secondary {
  border: 1px solid #bcb3b6; background: transparent; color: var(--ink);
}
.pz-m0-heros .hero-actions .primary { border: 0; background: var(--ink); color: #fff; }
.pz-m0-heros .hero-actions .primary:hover { background: var(--tone); }

.pz-m0-heros .heros-vide { margin-top: 24px; color: var(--muted); }
.pz-m0-heros .heros-verrou {
  margin-top: 26px; padding: 24px; border-radius: 18px;
  border: 1px dashed var(--line); background: #f8f2e8; text-align: center;
}
.pz-m0-heros .heros-verrou p { margin: 8px 0 0; color: #5f575b; line-height: 1.55; }

/* ============================================================
   LA FICHE (lot 2) — port de la vue « detail » de la maquette.
   Même scope .pz-m0-heros que la grille : les deux vues partagent la barre de
   rubrique, les pastilles et le portrait, exactement comme la maquette sert
   ses deux écrans avec les deux mêmes feuilles.
   ============================================================ */
.pz-m0-heros .detail-back {
  display: inline-block; margin-bottom: 19px; border: 0; background: transparent;
  color: var(--magenta); text-decoration: none; cursor: pointer;
}

/* Le bandeau : blanc à gauche pour le texte, teinte à droite derrière le
   portrait. Deux dégradés superposés, comme la maquette. */
.pz-m0-heros .detail-hero {
  min-height: 300px; position: relative; overflow: hidden;
  padding: 44px 360px 40px 44px; border-radius: 24px;
  background: linear-gradient(110deg, #fff 0 58%, transparent 78%),
              linear-gradient(145deg, #1d151b, var(--tone, #a20b86));
  box-shadow: 0 18px 52px rgba(32, 24, 30, .13);
}
.pz-m0-heros .detail-hero h1 {
  margin: 8px 0 12px; font: 700 48px "Roboto Slab", Georgia, serif; color: var(--ink);
}
.pz-m0-heros .detail-hero blockquote {
  margin: 0; color: #554b51; font: 400 19px/1.5 "Roboto Slab", Georgia, serif;
}
/* La source de la citation : absente de la maquette, exigée ici par la règle
   « jamais paraphrasée » et par le banc. Discrète, sous la citation. */
.pz-m0-heros .detail-hero blockquote cite {
  display: block; margin-top: 8px; font: 400 11px/1.45 "Poppins", system-ui, sans-serif;
  font-style: normal; color: #7d7379; max-width: 640px;
}
.pz-m0-heros .detail-hero .power-signature { margin-top: 22px; }
.pz-m0-heros .detail-hero .hero-emblem {
  position: absolute; right: 115px; top: 55px; width: 160px; height: 160px; margin: 0;
}

/* --- Les deux panneaux --- */
.pz-m0-heros .detail-layout {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; margin-top: 18px;
}
.pz-m0-heros .panel {
  padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper);
}
.pz-m0-heros .panel h2 {
  margin: 6px 0 14px; font: 700 27px "Roboto Slab", Georgia, serif; color: var(--ink);
}
.pz-m0-heros .panel p { color: #564d52; line-height: 1.65; }
.pz-m0-heros .reading-note { border-left: 4px solid var(--tone, #a20b86); }
.pz-m0-heros .reading-caution {
  padding-top: 15px; border-top: 1px solid #e5ddd8; font-size: 11px; margin-bottom: 0;
}
.pz-m0-heros .reading-caution b { color: var(--ink); }
/* .reading-item existe dans le CSS de la maquette sans que son HTML l'utilise :
   les faits essentiels, qu'elle n'avait pas, le reprennent tel quel. */
.pz-m0-heros .reading-items { margin-top: 18px; }
.pz-m0-heros .reading-item { padding: 14px 0; border-bottom: 1px solid #e5ddd8; }
.pz-m0-heros .reading-item:last-child { border: 0; }
.pz-m0-heros .reading-item p { margin: 0; font-size: 13px; }

/* --- Le Moteur --- */
.pz-m0-heros .motor-section {
  margin-top: 18px; padding: 28px; border: 1px solid var(--line);
  border-radius: 20px; background: var(--paper);
}
.pz-m0-heros .motor-section header { display: flex; align-items: end; gap: 17px; }
.pz-m0-heros .motor-section header h2 {
  margin: 3px 0 0; font: 700 27px "Roboto Slab", Georgia, serif; color: var(--ink);
}
.pz-m0-heros .motor-section header p {
  margin: 0 0 3px auto; color: var(--muted); font-size: 11px; text-align: right;
}
/* Le partial _lemniscate porte son propre SVG : on ne lui impose que la
   respiration et la largeur du bloc. */
.pz-m0-heros .motor-section .pz-heros-lemniscate { margin-top: 20px; }
.pz-m0-heros .motor-section .pz-heros-lemniscate svg { width: 100%; height: auto; border-radius: 20px; }
/* Le partial titre la Puissance au-dessus du tracé ; ici l'en-tête le dit déjà
   (« Le Moteur de Volonté »), et la maquette n'a pas ce second titre. */
.pz-m0-heros .motor-section .pz-heros-lemniscate-nom { display: none; }
.pz-m0-heros .motor-section .pz-heros-lemniscate-legende { margin-top: 9px; }

/* --- La polarité, autour du Tao --- */
.pz-m0-heros .polarity-section {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  margin-top: 18px; border-radius: 20px; overflow: hidden;
}
.pz-m0-heros .polarity-section article { min-height: 190px; padding: 28px 36px; }
.pz-m0-heros .polarity-section span { font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.pz-m0-heros .polarity-section h2 {
  margin: 8px 0; font: 700 22px "Roboto Slab", Georgia, serif;
}
.pz-m0-heros .polarity-section p { margin: 0; line-height: 1.6; }
.pz-m0-heros .light-pole { background: #f3ecdf; }
.pz-m0-heros .light-pole span { color: #9d7200; }
.pz-m0-heros .shadow-pole { background: #251a23; color: #fff; }
.pz-m0-heros .shadow-pole span { color: #d8b4e9; }
.pz-m0-heros .shadow-pole h2 { color: #fff; }
.pz-m0-heros .shadow-pole p { color: #e7dde4; }
/* La maquette pose le caractère ☯ ; le jeu a son asset officiel depuis un
   arbitrage antérieur (le glyphe rendait mal). Même place, même cercle. */
.pz-m0-heros .tao {
  width: 54px; height: 54px; position: absolute; left: 50%; top: 50%; z-index: 3;
  transform: translate(-50%, -50%); border: 4px solid #fff; border-radius: 50%;
  background: #fff; box-shadow: 0 5px 16px #0004;
}

.pz-m0-heros .frame-section {
  margin-top: 18px; padding: 28px 34px; border: 1px solid var(--line);
  border-radius: 20px; background: #fff;
}
.pz-m0-heros .frame-section h2 {
  margin: 5px 0; font: 700 23px "Roboto Slab", Georgia, serif; color: var(--ink);
}
.pz-m0-heros .frame-section p { margin: 0; color: var(--muted); line-height: 1.6; }

/* LES DIRECTIONS DE VOYAGE — port de `.journeys` de heros-mentors-m0-cible.
   Panneau SOMBRE, seul de la fiche : la maquette y met la seule section qui
   regarde en avant, et c'est ce contraste qui la sépare de la lecture de la
   figure. Portée telle quelle.

   ⚠️ La teinte d'or des libellés (#d7bd62 dans la maquette) est REMONTÉE à
   #e2c774 : sur `#20171f`, l'original donne 5,9:1 — bon pour du 11px, mais ces
   `small` sont à 10px après le passage à Roboto Slab, et la règle du lot est
   de ne jamais descendre sous 4,5 pour du petit texte. #e2c774 donne 7,4:1. */
.pz-m0-heros .journeys {
  margin-top: 18px; padding: 29px; border-radius: 20px;
  background: #20171f; color: #fff;
}
.pz-m0-heros .journeys .eyebrow { color: #e2c774; }
.pz-m0-heros .journeys h2 {
  margin: 6px 0 18px; font: 700 28px "Roboto Slab", Georgia, serif; color: #fff;
}
.pz-m0-heros .journey-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pz-m0-heros .journey {
  display: flex; flex-direction: column; padding: 17px;
  border: 1px solid #ffffff28; border-radius: 14px; background: #ffffff0a;
}
.pz-m0-heros .journey small {
  color: #e2c774; font-size: 10px; font-weight: 700; letter-spacing: .08em;
}
.pz-m0-heros .journey h3 {
  margin: 8px 0; font: 700 17px "Roboto Slab", Georgia, serif; color: #fff;
}
.pz-m0-heros .journey p { margin: 0; color: #d9ced5; font-size: 11px; line-height: 1.5; }
/* « Direction de Voyage » — la carte n'est pas cliquable, et ce libellé le
   DIT plutôt que de laisser un vide qui ressemblerait à un bouton manquant.
   Il prend la place du CTA (`margin-top: auto`) pour que les trois cartes
   alignent leur pied quelle que soit la longueur de la promesse. */
.pz-m0-heros .journey-horizon {
  align-self: flex-start; margin-top: auto; padding: 5px 9px;
  border: 1px solid #ffffff2e; border-radius: 12px;
  color: #cbbfc6; font-size: 9px; font-weight: 700; letter-spacing: .09em;
}
/* LE CTA D'UNE DIRECTION RÉSOLUE. Même place et même alignement de pied que
   « Direction de Voyage » (`margin-top: auto`) : les trois cartes gardent
   leur pied aligné qu'elles mènent quelque part ou non, sinon la carte
   cliquable paraîtrait plus haute que ses voisines sans raison.
   L'or plutôt que le blanc — c'est la couleur que la maquette donne à ce qui
   appelle, et elle distingue le geste de la simple mention. */
.pz-m0-heros .journey-cta {
  align-self: flex-start; margin-top: auto; padding: 6px 11px;
  border: 1px solid #e2c77455; border-radius: 13px; background: #e2c7741a;
  color: #e2c774; font-size: 10px; font-weight: 700;
  letter-spacing: .05em; text-decoration: none;
}
.pz-m0-heros .journey-cta:hover { background: #e2c77433; color: #f0dda2; }

.pz-m0-heros .detail-cta {
  margin-top: 18px; display: flex; justify-content: space-between;
  align-items: center; gap: 18px;
}
.pz-m0-heros .detail-cta p { margin: 0; color: var(--muted); font-size: 12px; max-width: 620px; }
.pz-m0-heros .detail-cta-actions { display: flex; align-items: center; gap: 14px; }
.pz-m0-heros .detail-cta-form { margin: 0; }
.pz-m0-heros .detail-cta .primary {
  border: 0; border-radius: 23px; background: var(--ink); color: #fff;
  padding: 10px 15px; font-weight: 600; font-size: 13px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.pz-m0-heros .detail-cta .primary:hover { background: var(--tone, var(--magenta)); }
.pz-m0-heros .deja-choisi { color: var(--muted); font-size: 12px; }
.pz-m0-heros .deja-choisi a { color: var(--magenta); font-weight: 600; }

/* ============================================================
   LE MENTOR — LE JOURNAL DE DIALOGUE (21 août).
   Port de `mentor-dialogue-cible` (Codex `282f013`, affiné par `687e995`
   et `cb7600b`), arbitrage validé par Boris : le mentor quitte le modèle
   des conversations multiples des Guides pour un JOURNAL CONTINU. Il
   accompagne un Voyage dans le temps, pas des questions ponctuelles.
   Remplace le bloc « lot 3 » (deux colonnes) qui vivait ici.

   ⚠️ TOUT EST SCOPÉ SOUS `.pz-m0-heros-mentor`, et pas seulement sous
   `.pz-m0-heros` : cette feuille sert AUSSI le catalogue et la fiche, qui
   partagent des noms (`.message`, `.composer`, `.suggestions`). La classe
   était posée sur la racine de la vue depuis le 16 août sans qu'aucune
   règle ne la cible — elle attendait exactement cet usage.

   Ce que la maquette a et qui n'est pas ici, avec la raison, est
   documenté en tête de `app/views/mentor/show.html.haml`. */

.pz-m0-heros-mentor .mentor-strip {
  min-height: 112px; display: grid; gap: 18px; align-items: center;
  grid-template-columns: 76px 1.2fr 1fr auto; padding: 15px 20px;
  border: 1px solid var(--line); border-radius: 20px 20px 0 0;
  background: linear-gradient(105deg, var(--paper) 64%,
              color-mix(in srgb, var(--tone, var(--magenta)) 12%, var(--paper)));
}
.pz-m0-heros-mentor .mentor-strip > .hero-emblem {
  width: 76px; height: 76px; margin: 0;
  border: 4px solid #fff; box-shadow: 0 6px 18px #0002;
}
.pz-m0-heros-mentor .mentor-strip h1 {
  margin: 3px 0 7px; font: 700 25px/1.1 "Roboto Slab", Georgia, serif; color: var(--ink);
}
.pz-m0-heros-mentor .mentor-strip > p {
  max-width: 360px; margin: 0; color: #5e555a;
  font: 500 14px/1.5 "Roboto Slab", Georgia, serif;
}
.pz-m0-heros-mentor .mentor-strip .eyebrow { color: var(--magenta); }
/* La signature reprend le patron `.powers` de la maquette, mais garde les
   icônes réelles des Puissances : la maquette n'a que des glyphes. */
.pz-m0-heros-mentor .mentor-strip .power-signature { display: flex; gap: 6px; flex-wrap: wrap; }
.pz-m0-heros-mentor .mentor-strip .power-signature span {
  padding: 4px 8px; border-radius: 14px; background: #eef0ea; color: #5f565b; font-size: 9px;
}
.pz-m0-heros-mentor .mentor-strip .power-signature .principal {
  background: color-mix(in srgb, var(--tone, var(--magenta)) 14%, #fff); color: var(--magenta);
}
.pz-m0-heros-mentor .mentor-strip .outline {
  border: 1px solid #cfc4be; border-radius: 22px; background: #fff;
  color: var(--ink); padding: 9px 14px; text-decoration: none; white-space: nowrap;
}

/* L'ESPACE DE TRAVAIL : le journal, et le panneau des sources. */
.pz-m0-heros-mentor .workspace {
  display: grid; grid-template-columns: minmax(0, 1fr) 315px; min-height: 700px;
  border: 1px solid var(--line); border-top: 0; border-radius: 0 0 20px 20px;
  /* ⚠️ `clip` ET NON `hidden`, et la nuance porte tout le composeur flottant
     (Boris, 25 août : « il faut faire défiler pour l'atteindre »). Les deux
     rognent pareil aux coins arrondis, mais `hidden` fait du bloc un CONTENEUR
     DE DÉFILEMENT : un descendant `position: sticky` s'y accroche au lieu de
     suivre le défilement de la page, et le composeur restait cloué en bas du
     fil. Mesuré sur la préprod avec 25 messages : composeur à 3512 px pour un
     écran de 1130. `clip` rogne sans capturer le sticky. */
  background: var(--paper); box-shadow: 0 18px 50px #25192214; overflow: clip;
}
.pz-m0-heros-mentor .thread-column { min-width: 0; display: flex; flex-direction: column; }
.pz-m0-heros-mentor .thread-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
  padding: 26px 30px 18px; border-bottom: 1px solid #e7ddd6;
}
.pz-m0-heros-mentor .thread-head h2 {
  margin: 5px 0 0; font: 700 28px/1.15 "Roboto Slab", Georgia, serif;
}
.pz-m0-heros-mentor .thread-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.pz-m0-heros-mentor .thread-head p a { color: var(--magenta); }
/* Le bouton du tiroir n'existe QUE sous 980px. Au-dessus, le panneau est une
   colonne permanente : il n'y a rien à appeler. La maquette laisse le bouton
   visible partout, où il ne fait rien sur desktop — un bouton sans effet
   apprend au joueur à ne plus cliquer. */
.pz-m0-heros-mentor .context-button { display: none; }
@media (max-width: 980px) {
  .pz-m0-heros-mentor .context-button {
    display: inline-block; border: 1px solid #d4c6ce; border-radius: 21px;
    background: #fff; color: var(--magenta); padding: 8px 12px;
    cursor: pointer; white-space: nowrap;
  }
}

/* LE MENU DE THÉMATIQUE. Il est DANS le formulaire (voir la vue) : posé
   ici visuellement, envoyé avec la question. Un select hors du <form>
   n'enverrait rien — et le défaut réparé serait strictement reproduit. */
.pz-m0-heros-mentor .context-ribbon {
  display: flex; gap: 9px; align-items: center; padding: 11px 30px;
  background: #faf6f1; border-bottom: 1px solid #e7ddd6; overflow: auto;
}
.pz-m0-heros-mentor .context-ribbon label {
  white-space: nowrap; color: #645b60; font-size: 10px; font-weight: 600;
}
.pz-m0-heros-mentor .context-ribbon select {
  min-width: 155px; border: 1px solid #d5c8cf; border-radius: 17px; background: #fff;
  color: var(--magenta); padding: 6px 10px; font: inherit; font-weight: 600; cursor: pointer;
}
.pz-m0-heros-mentor .context-ribbon .prive {
  margin-left: auto; white-space: nowrap; color: #4f8553; font-size: 10px;
}

.pz-m0-heros-mentor .thread {
  flex: 1; min-height: 320px; overflow-y: auto; padding: 22px 30px 38px;
  background-color: #fbf8f3;
  background-image: radial-gradient(circle at 12px 12px, #a20b860c 1px, transparent 1.4px),
                    linear-gradient(30deg, transparent 48%, #57bd4a09 49%,
                                    #57bd4a09 51%, transparent 52%);
  background-size: 34px 34px, 68px 68px;
}

/* LE MARQUEUR DE CHAPITRE. Rien n'en crée aujourd'hui — mais le rôle
   `chapitre` existe en base depuis le 20 août, et `memoire_affichable`
   ne le filtre pas. Sans ce rendu, un chapitre s'afficherait en BULLE
   SIGNÉE DU NOM DE LA FIGURE : une parole qu'elle n'a pas prononcée. */
.pz-m0-heros-mentor .chapter-marker {
  display: grid; grid-template-columns: 85px 1fr auto; gap: 12px; align-items: center;
  margin: 7px auto 22px; padding: 9px 13px; max-width: 670px;
  border: 1px solid #ded4cd; border-radius: 13px;
  background: #fffdf9; color: #766c71; font-size: 10px;
}
.pz-m0-heros-mentor .chapter-marker b {
  color: var(--ink); font: 600 12px "Roboto Slab", Georgia, serif;
}

.pz-m0-heros-mentor .message {
  max-width: 78%; display: flex; gap: 10px; margin: 0 0 14px;
  padding: 0; border-radius: 0; background: none;
}
/* LE FORMULAIRE EST LE CONTENEUR EN COLONNE, pas un bloc de plus : le ruban
   de thématique doit être DANS le <form> pour être envoyé (voir la vue), et
   il est visuellement à l'autre bout du composeur. Sans cette règle, le fil
   perdrait son `flex: 1` et le composeur remonterait sous le dernier message
   au lieu de tenir le bas de la colonne. */
.pz-m0-heros-mentor .journal-form {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
}
.pz-m0-heros-mentor .message > img,
.pz-m0-heros-mentor .message > svg {
  width: 34px; height: 34px; object-fit: cover; border-radius: 50%; flex: none;
}
.pz-m0-heros-mentor .message > div {
  padding: 12px 15px; border-radius: 5px 16px 16px 16px;
  background: #eee8e2; box-shadow: 0 3px 8px #241b2110;
}
.pz-m0-heros-mentor .message header {
  display: flex; justify-content: space-between; gap: 18px; margin-bottom: 5px;
}
.pz-m0-heros-mentor .message header b { display: block; font-size: 11px; }
.pz-m0-heros-mentor .message time { color: #8a8085; font-size: 9px; }
.pz-m0-heros-mentor .message p { margin: 0; line-height: 1.58; }
.pz-m0-heros-mentor .message.player { margin-left: auto; justify-content: flex-end; }
.pz-m0-heros-mentor .message.player > div {
  border-radius: 16px 5px 16px 16px; background: var(--magenta); color: #fff;
}
.pz-m0-heros-mentor .message.player time { color: #e8cadf; }

/* LA THÉMATIQUE, PAS UNE SOURCE. Codex a resserré sa propre maquette
   (`687e995`) : la pastille dit ce que le joueur a choisi d'explorer, elle
   ne cite aucun document. La donnée derrière est `mentor_messages.categorie`,
   choisie explicitement avant d'écrire — rien n'est déduit. C'est ce qui la
   distingue des pastilles de source des Guides, refusées le 20 août parce
   que leur donnée, elle, mentait. */
.pz-m0-heros-mentor .source-chip {
  display: inline-block; margin-top: 9px; border: 1px solid #cfc1c9; border-radius: 14px;
  background: #ffffff99; color: #76205f; padding: 5px 8px; font-size: 9px;
}
.pz-m0-heros-mentor .message.player .source-chip {
  border-color: #ffffff4d; background: #ffffff1f; color: #f3dcec;
}

/* LA CARTE « GRAINE POSSIBLE ». Refusée le 21 août au matin — rien ne la
   soutenait, et deux boutons qui ne font rien sur la page qui promet
   qu'aucune Graine n'entre dans la Fresque sans confirmation auraient été le
   pire endroit pour mentir. Le portable a construit le mécanisme dans la
   journée ; elle se porte pour de vrai.

   Elle n'est PAS une bulle : ni le mentor ni le joueur ne l'ont dite. C'est
   un objet du fil, centré, à sa propre largeur — la maquette le dit par sa
   teinte d'or, qui la sort du dialogue sans la sortir du journal. */
.pz-m0-heros-mentor .seed-card {
  max-width: 650px; margin: 6px auto 22px; padding: 20px 22px;
  border: 1px solid #dbbf56; border-radius: 17px;
  background: linear-gradient(135deg, #fffdf7, #faf1d5);
  box-shadow: 0 10px 28px #70571a18;
}
.pz-m0-heros-mentor .seed-card .eyebrow { color: #a3770b; }
.pz-m0-heros-mentor .seed-card blockquote,
.pz-m0-heros-mentor .seed-card textarea {
  display: block; width: 100%; margin: 9px 0; padding: 10px 12px;
  border: 1px solid #e2d6ae; border-radius: 11px; background: #fffdf8;
  color: var(--ink); font: 600 18px/1.5 "Roboto Slab", Georgia, serif;
  resize: vertical;
}
.pz-m0-heros-mentor .seed-card blockquote { border-style: dashed; }
.pz-m0-heros-mentor .seed-card .seed-state {
  margin: 0; color: #70665f; font-size: 11px; line-height: 1.5;
}
.pz-m0-heros-mentor .seed-card .seed-state a { color: #a3770b; font-weight: 600; }
.pz-m0-heros-mentor .seed-visibility {
  display: flex; align-items: flex-start; gap: 9px; margin: 14px 0 17px;
  padding: 11px 12px; border: 1px solid #e2d6ae; border-radius: 11px;
  background: #fffdf8; cursor: pointer;
}
.pz-m0-heros-mentor .seed-visibility input { margin-top: 3px; accent-color: var(--magenta); }
.pz-m0-heros-mentor .seed-visibility span { display: flex; flex-direction: column; }
.pz-m0-heros-mentor .seed-visibility b { font-size: 10px; }
.pz-m0-heros-mentor .seed-visibility small { margin-top: 2px; color: #786f69; font-size: 9px; }
.pz-m0-heros-mentor .seed-actions { display: flex; justify-content: flex-end; gap: 7px; }
.pz-m0-heros-mentor .seed-actions button {
  border-radius: 22px; padding: 9px 14px; font: inherit; font-size: 12px; cursor: pointer;
}
.pz-m0-heros-mentor .seed-actions .outline {
  border: 1px solid #cfc4be; background: #fff; color: var(--muted);
}
.pz-m0-heros-mentor .seed-actions .primary { border: 0; background: #20171f; color: #fff; }
/* PLANTÉE : la carte reste, en mémoire de ce qui a été semé. La faire
   disparaître effacerait le lien entre la réponse et la Graine — le joueur ne
   saurait plus d'où elle vient. */
.pz-m0-heros-mentor .seed-card[data-etat="plantee"] {
  border-color: #cdbf8e; background: #fdfaf1; box-shadow: none;
}

/* LES REPLIS (refus, plafond, panne) n'existent pas dans la maquette : elle
   n'a qu'un mentor qui répond toujours. Cinq statuts réels, eux. */
.pz-m0-heros-mentor .message-repli > div {
  background: #f8f2e8; border-left: 3px solid var(--gold);
}
.pz-m0-heros-mentor .messages-invite {
  max-width: 78%; margin: 0 0 14px; padding: 13px 15px;
  border: 1px dashed var(--line); border-radius: 14px;
  background: transparent; color: var(--muted); line-height: 1.58;
}
.pz-m0-heros-mentor .memoire-fermee {
  margin: 0 0 14px; color: var(--muted); font-size: 12px;
}
.pz-m0-heros-mentor .memoire-fermee a { color: var(--magenta); }

/* ⚠️ LE COMPOSEUR FLOTTE (Boris, 25 août). `sticky bottom` : visible pendant
   tout le défilement d'un long journal, et il REJOINT sa place naturelle en
   fin de page — jamais superposé au dernier message. Le fond opaque et le
   filet haut existaient déjà : c'est ce qui le fait lire comme une barre
   quand le fil défile dessous. Suppose le `overflow: clip` du .workspace. */
.pz-m0-heros-mentor .composer {
  padding: 13px 20px 17px; border-top: 1px solid #ded4cd; background: #fff;
  position: sticky; bottom: 0; z-index: 5;
}
/* LES TROIS SUGGESTIONS SONT CONSERVÉES. La maquette les remplace par des
   boutons-outils sans destination ; les nôtres envoient de vraies questions.
   Elles prennent la place de `.composer-tools`, au même endroit. */
/* ⚠️ ELLES SE REPLIENT, ELLES NE DÉFILENT PAS. Mesuré au navigateur le
   21 août : à 1280px, les trois libellés font 763px dans un conteneur de 756
   — sept pixels de trop. Avec `overflow: auto` la troisième était coupée dans
   un défilement horizontal que rien n'annonce, sur un écran large où il n'y a
   aucune raison de cacher quoi que ce soit. La maquette n'a pas le problème :
   ses boutons-outils sont des glyphes, les nôtres sont des phrases. */
.pz-m0-heros-mentor .suggestions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 8px;
}
.pz-m0-heros-mentor .suggestions button {
  border: 1px solid #d6cbc5; border-radius: 18px; background: #fff;
  color: var(--magenta); padding: 5px 11px; font-size: 11px;
  white-space: nowrap; cursor: pointer;
}
.pz-m0-heros-mentor .composer-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end;
}
.pz-m0-heros-mentor .composer-row textarea {
  width: 100%; max-height: 140px; resize: vertical; padding: 12px 14px;
  border: 1px solid #cfc4be; border-radius: 13px; line-height: 1.5; font: inherit;
}
.pz-m0-heros-mentor .composer-row .send {
  min-width: 43px; height: 43px; border: 0; border-radius: 22px;
  background: var(--magenta); color: #fff; padding: 0 16px; cursor: pointer;
}

/* LE PANNEAU DES SOURCES. La maquette y met des cases décoratives ; ici ce
   sont les QUATRE catégories réelles de ConsentementLlm, avec leur état et
   un vrai POST de bascule. Une case qui ne persiste pas mentirait sur la
   seule page qui promet au joueur qu'il garde la main. */
.pz-m0-heros-mentor .side-panel {
  position: relative; padding: 27px 23px; background: #f4eee7;
  border-left: 1px solid #ddd2ca; overflow-y: auto;
}
.pz-m0-heros-mentor .side-panel h2 {
  margin: 6px 0 8px; font: 700 24px/1.2 "Roboto Slab", Georgia, serif;
}
.pz-m0-heros-mentor .side-panel > p {
  margin: 0 0 18px; color: #6d6469; line-height: 1.55; font-size: 12px;
}
.pz-m0-heros-mentor .source-ligne {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid #ddd1c8;
}
.pz-m0-heros-mentor .source-ligne > span { display: flex; flex-direction: column; }
.pz-m0-heros-mentor .source-ligne b { font-size: 11px; }
.pz-m0-heros-mentor .source-ligne small { color: #867d82; font-size: 9px; }
.pz-m0-heros-mentor .source-ligne form { margin: 0; }
.pz-m0-heros-mentor .source-ligne button {
  border: 1px solid #cfc1c9; border-radius: 14px; background: #fff;
  color: var(--magenta); padding: 5px 10px; font-size: 10px;
  white-space: nowrap; cursor: pointer;
}
.pz-m0-heros-mentor .source-ligne.est-ouverte button {
  background: var(--magenta); border-color: var(--magenta); color: #fff;
}
/* « Aucune source n'est lue » — l'avertissement se distingue du texte
   d'introduction, sinon il se lit comme une phrase de plus. Teinte d'ambre,
   celle des replis du fil : ce n'est pas une erreur, c'est un état à corriger
   ailleurs. */
.pz-m0-heros-mentor .aucune-source {
  margin: 0 0 16px; padding: 11px 12px; border-left: 3px solid var(--gold);
  background: #f8f2e8; color: #5f5650; font-size: 11px; line-height: 1.55;
}
.pz-m0-heros-mentor .aucune-source b { display: block; color: var(--ink); }
.pz-m0-heros-mentor .aucune-source a { color: #a3770b; font-weight: 600; }
.pz-m0-heros-mentor .side-panel > a {
  display: inline-block; margin: 17px 0; color: var(--magenta); font-size: 11px;
}
.pz-m0-heros-mentor .principle {
  margin-top: 8px; padding: 14px; border-left: 3px solid #4d9a58;
  background: #e5f2e5; font-size: 10px;
}
.pz-m0-heros-mentor .principle p { margin: 5px 0 0; line-height: 1.5; }
.pz-m0-heros-mentor .close-panel {
  display: none; position: absolute; right: 15px; top: 12px;
  border: 0; background: transparent; font-size: 25px; cursor: pointer;
}
.pz-m0-heros-mentor .panneau-voile { display: none; }
.pz-m0-heros .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 1000px) { .pz-m0-heros .hero-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .pz-m0-heros .detail-hero { padding-right: 280px; }
  .pz-m0-heros .detail-hero .hero-emblem { right: 70px; }
}

/* SOUS 980px, LE PANNEAU DES SOURCES DEVIENT UN TIROIR — le palier est celui
   de la maquette, pas les 900px du reste de la feuille : c'est la largeur à
   laquelle SA colonne de 315px cesse de tenir, et elle ne se déduit pas des
   autres blocs. Même mécanique que le tiroir de l'historique des Guides :
   le panneau sort de l'écran, un bouton l'appelle, un voile le ferme. */
@media (max-width: 980px) {
  .pz-m0-heros-mentor .mentor-strip { grid-template-columns: 70px 1fr auto; }
  .pz-m0-heros-mentor .mentor-strip > p { display: none; }
  .pz-m0-heros-mentor .workspace { grid-template-columns: minmax(0, 1fr); }
  .pz-m0-heros-mentor .side-panel {
    position: fixed; z-index: 60; right: 0; top: 0; bottom: 0;
    width: min(360px, 92vw); border-left: 0; box-shadow: -20px 0 55px #0004;
    transform: translateX(105%); transition: transform .25s ease;
  }
  .pz-m0-heros-mentor .side-panel.open { transform: none; }
  .pz-m0-heros-mentor .close-panel { display: block; }
  .pz-m0-heros-mentor .panneau-voile {
    display: block; position: fixed; z-index: 59; inset: 0; background: #151016aa;
  }
}
@media (max-width: 700px) {
  .pz-m0-heros .heros-main { padding: 12px 16px 75px; }
  .pz-m0-heros .hero-grid { grid-template-columns: 1fr; }
  .pz-m0-heros .hero-actions { display: grid; }
  .pz-m0-heros .hero-actions .primary,
  .pz-m0-heros .hero-actions .secondary { text-align: center; }
  /* Les trois règles de la maquette au même palier (700px). */
  .pz-m0-heros .power-signature span { padding-right: 7px; }
  .pz-m0-heros .power-signature b { font-size: 9px; }
  .pz-m0-heros .power-signature small { font-size: 6px; }
  /* La fiche : le portrait passe sous le texte, centré. */
  .pz-m0-heros .detail-hero {
    min-height: 440px; padding: 30px 24px 230px;
    background: linear-gradient(180deg, #fff 0 56%, transparent 74%),
                linear-gradient(145deg, #1d151b, var(--tone, #a20b86));
  }
  .pz-m0-heros .detail-hero h1 { font-size: 39px; }
  .pz-m0-heros .detail-hero .hero-emblem {
    width: 142px; height: 142px; right: calc(50% - 71px); top: auto; bottom: 35px;
  }
  .pz-m0-heros .detail-layout,
  .pz-m0-heros .polarity-section { grid-template-columns: 1fr; }
  /* Les trois directions s'empilent — c'est aussi ce que fait la maquette à ce
     palier. `margin-top: auto` n'a plus d'effet sur une carte qui n'a plus de
     hauteur à remplir, et c'est très bien : le libellé suit la promesse. */
  .pz-m0-heros .journey-list { grid-template-columns: 1fr; }
  .pz-m0-heros .journeys { padding: 21px 17px; }
  .pz-m0-heros .journeys h2 { font-size: 23px; }
  .pz-m0-heros .detail-cta { align-items: flex-start; flex-direction: column; }
  /* Le Tao se replace à la couture horizontale des deux pôles empilés. */
  .pz-m0-heros .tao { left: 50%; top: 50%; }
  /* Le mentor : le bandeau se resserre, le journal prend la hauteur utile.
     La troisième Puissance sort — la maquette la retire aussi : trois
     pastilles sur 320px repoussent le bouton de la fiche hors du bandeau. */
  .pz-m0-heros-mentor .mentor-strip {
    grid-template-columns: 54px 1fr auto; min-height: 88px;
    padding: 11px; border-radius: 15px 15px 0 0;
  }
  .pz-m0-heros-mentor .mentor-strip > .hero-emblem { width: 54px; height: 54px; }
  .pz-m0-heros-mentor .mentor-strip h1 { font-size: 18px; }
  .pz-m0-heros-mentor .mentor-strip .outline { padding: 7px 9px; font-size: 9px; }
  .pz-m0-heros-mentor .mentor-strip .power-signature span:not(.principal) { display: none; }
  .pz-m0-heros-mentor .workspace { min-height: 0; border-radius: 0 0 15px 15px; }
  /* Pas de `flex-wrap` ici : mesuré, le bouton réduit à un glyphe tient sur la
     même ligne que le titre (342 sur 375) et l'en-tête passe de 301 à 182px.
     En le laissant se replier, il tombait à la ligne, aligné à gauche, et
     l'en-tête reprenait 40px pour rien. */
  .pz-m0-heros-mentor .thread-head {
    align-items: flex-start; gap: 10px; padding: 19px 16px 13px;
  }
  .pz-m0-heros-mentor .thread-head h2 { font-size: 21px; }
  /* ⚠️ LE BOUTON DEVIENT UN GLYPHE. Mesuré au navigateur le 21 août : à 375px
     il partait de 189 et finissait à 393 — dix-huit pixels hors de l'écran,
     invisibles parce que `.workspace` les clippe. Le libellé reste dans le DOM
     (`font-size: 0`, pas `display: none`) : le lecteur d'écran l'annonce
     toujours « Sources et mémoire ». C'est le geste de la maquette au même
     palier ; je ne l'avais pas porté. */
  .pz-m0-heros-mentor .context-button {
    width: 38px; height: 38px; padding: 0; font-size: 0; flex: none;
  }
  .pz-m0-heros-mentor .context-button span { font-size: 16px; }
  .pz-m0-heros-mentor .suggestions { flex-wrap: nowrap; overflow: auto; }
  .pz-m0-heros-mentor .context-ribbon { padding: 8px 14px; }
  .pz-m0-heros-mentor .context-ribbon .prive { display: none; }
  .pz-m0-heros-mentor .thread { min-height: 420px; padding: 16px 12px 28px; }
  .pz-m0-heros-mentor .chapter-marker { grid-template-columns: 60px 1fr; }
  .pz-m0-heros-mentor .chapter-marker small { display: none; }
  .pz-m0-heros-mentor .message,
  .pz-m0-heros-mentor .messages-invite { max-width: 92%; }
  .pz-m0-heros-mentor .message > img { width: 29px; height: 29px; }
  .pz-m0-heros-mentor .message > div { padding: 11px 12px; }
  .pz-m0-heros-mentor .composer { padding: 10px; }
  .pz-m0-heros-mentor .seed-card { padding: 16px; }
  .pz-m0-heros-mentor .seed-card blockquote,
  .pz-m0-heros-mentor .seed-card textarea { font-size: 16px; }
  /* Les deux actions s'empilent : côte à côte, « Planter dans ma Fresque »
     et « Écarter » se serrent sous 320px de carte. */
  .pz-m0-heros-mentor .seed-actions { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  .pz-m0-heros * { animation: none !important; transition: none !important; }
}
