/* ============================================================
   Page « Les misos » (/misos/) — planche éditoriale.
   Portée depuis le bundle Claude Design « Les misos - une planche ».
   Tous les sélecteurs sont SCOPÉS sous .misos-page pour ne pas
   contaminer le header/footer du site (la planche redéfinit
   .wordmark, body, etc.). Les tokens viennent de tokens.css.
   ============================================================ */

.misos-page {
  position: relative;
  background:
    radial-gradient(120% 90% at 12% -5%, oklch(0.94 0.03 88 / 0.6), transparent 55%),
    var(--bg);
}
.misos-page *, .misos-page *::before, .misos-page *::after { box-sizing: border-box; }

/* grain papier — contenu dans la section */
.misos-page::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.04;
  background-image: radial-gradient(oklch(0.35 0.02 50 / 0.5) 1px, transparent 1px);
  background-size: 3px 3px;
}

.misos-page .planche {
  position: relative; z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 72px) clamp(20px, 5vw, 72px) 96px;
}

/* ---------------- masthead ---------------- */
.misos-page .masthead {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: var(--rule-thin);
}
.misos-page .wordmark {
  font-family: var(--font-hand); font-weight: 600; font-size: 30px;
  line-height: 1; color: var(--fg); letter-spacing: -0.005em;
  transform: rotate(-2deg); display: inline-block;
}
.misos-page .wordmark .ji { color: var(--kj-koji-d); }
.misos-page .masthead .kj-fiche { font-size: 11px; }
.misos-page .masthead .mast-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.misos-page .masthead .handle { font-family: var(--font-body); font-size: 14px; font-weight: 600; letter-spacing: 0.01em; color: var(--rule-indigo); }

/* ---------------- title block ---------------- */
.misos-page header.intro { margin: clamp(32px, 5vw, 56px) 0 clamp(28px, 4vw, 44px); }
.misos-page .eyebrow { margin: 0 0 18px; display: inline-flex; align-items: center; gap: 12px; }
.misos-page .eyebrow::after { content: ""; height: 1px; width: 64px; background: oklch(0.42 0.10 255 / 0.4); }

.misos-page h1.title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 5.25rem);
  line-height: 1.02; margin: 0 0 22px;
  font-weight: 360; letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 70, "WONK" 0;
  max-width: 16ch;
}
.misos-page h1.title em { font-style: italic; font-weight: 360; color: var(--fg-soft); }

.misos-page .lede {
  font-family: var(--font-display); font-style: italic; font-weight: 360;
  font-size: clamp(1.2rem, 2.1vw, 1.5rem); line-height: 1.4;
  color: var(--fg-soft); margin: 0; max-width: 54ch;
}
.misos-page .lede mark { background: linear-gradient(180deg, transparent 55%, var(--kj-koji) 55%, var(--kj-koji) 92%, transparent 92%); padding: 0 0.12em; color: inherit; }

/* ---------------- spectre ---------------- */
.misos-page .spectre { margin: clamp(36px, 5vw, 60px) 0 clamp(40px, 5vw, 64px); }
.misos-page .spectre-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 18px;
}
.misos-page .spectre-head h2 {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 440;
  margin: 0; letter-spacing: -0.005em;
  font-variation-settings: "opsz" 36, "SOFT" 40, "WONK" 0;
}
.misos-page .spectre-head p { margin: 4px 0 0; max-width: 42ch; font-size: 0.9375rem; color: var(--fg-soft); }
.misos-page .spectre-head .hover-hint { margin-top: 8px; font-family: var(--font-hand); font-size: 1.1rem; color: var(--rule-indigo); }
/* Le hint « survole » n'a de sens que là où le survol existe (cf. JS desktop-only). */
@media (hover: none), (pointer: coarse) { .misos-page .spectre-head .hover-hint { display: none; } }
.misos-page .hand-note { font-family: var(--font-hand); font-weight: 500; font-size: 1.35rem; color: var(--rule-indigo); transform: rotate(-1.5deg); display: inline-block; white-space: nowrap; }

.misos-page .band {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  height: clamp(150px, 19vw, 220px);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid oklch(0.42 0.10 255 / 0.18);
}
.misos-page .band .swatch {
  background: var(--tone) center / cover no-repeat; position: relative; cursor: default;
  transition: filter var(--dur-med) var(--ease-out);
}
.misos-page .band .swatch::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 38px oklch(0.20 0.03 50 / 0.28);
}
.misos-page .band .swatch:not(:last-child) { box-shadow: inset -1px 0 0 oklch(0.96 0.02 85 / 0.30); }

.misos-page .band-labels {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  margin-top: 12px;
}
.misos-page .band-labels .lab { text-align: center; padding: 0 6px; }
.misos-page .band-labels .lab .nm {
  font-family: var(--font-display); font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  font-weight: 500; line-height: 1.1; display: block;
  font-variation-settings: "opsz" 24, "SOFT" 30, "WONK" 0;
}
.misos-page .band-labels .lab .kanji { font-size: 0.8em; color: var(--fg-faint); font-weight: 400; }
.misos-page .band-labels .lab .tm {
  display: block; margin-top: 5px;
  font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--rule-indigo); font-weight: 600;
}
.misos-page .macro-credit { margin-top: 14px; text-align: right; }
.misos-page .macro-credit .kj-fiche { font-size: 10px; color: var(--fg-faint); opacity: 0.85; }

.misos-page .axis {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 22px; gap: 16px;
}
.misos-page .axis .end { font-size: 0.8125rem; color: var(--fg-soft); max-width: 24ch; }
.misos-page .axis .end.r { text-align: right; }
.misos-page .axis .end strong { color: var(--fg); font-weight: 600; display: block; font-family: var(--font-body); }
.misos-page .axis .line {
  flex: 1; height: 1px; position: relative;
  background: linear-gradient(90deg, oklch(0.42 0.10 255 / 0.15), oklch(0.42 0.10 255 / 0.5));
}
.misos-page .axis .line::after {
  content: ""; position: absolute; right: -1px; top: 50%; transform: translateY(-50%);
  border-left: 6px solid oklch(0.42 0.10 255 / 0.5);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}

/* ---------------- familles / fiches ---------------- */
.misos-page .famille { margin-top: clamp(40px, 5vw, 64px); }
.misos-page .famille-head {
  display: flex; align-items: baseline; gap: 16px; margin-bottom: 22px;
}
.misos-page .famille-head .fam-k {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 1.6rem; color: var(--fg); white-space: nowrap;
  font-variation-settings: "opsz" 36, "SOFT" 50, "WONK" 0;
}
.misos-page .famille-head .fam-sub { font-size: 0.875rem; color: var(--fg-soft); }
.misos-page .famille-head .rule { flex: 1; height: 1px; background: var(--border-strong); align-self: center; }

.misos-page .fiche {
  /* neutralise le style « caption » global .fiche de site.css (sinon
     text-transform:uppercase / couleur / graisse déteignent par héritage) */
  text-transform: none; letter-spacing: normal; font-weight: 400;
  font-size: 1rem; color: var(--fg); font-family: var(--font-body);
  background: var(--bg-elevated);
  border: var(--rule-thin);
  border-radius: var(--r-md);
  padding: 20px 22px 18px;
  box-shadow: var(--shadow-sm); position: relative;
  display: flex; flex-direction: column;
  transition: box-shadow var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}
.misos-page .fiche-band {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid oklch(0.42 0.10 255 / 0.22);
}
.misos-page .pastille {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--tone) center / cover no-repeat; position: relative;
  box-shadow: inset 0 -2px 5px oklch(0.2 0.03 50 / 0.35), 0 0 0 1px oklch(0.42 0.10 255 / 0.18);
}
.misos-page .pastille::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: inset 0 2px 4px oklch(1 0 0 / 0.18);
}
.misos-page .fiche-band .kj-fiche { font-size: 10.5px; line-height: 1.35; white-space: nowrap; }

.misos-page .fiche h3 {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 460;
  margin: 0 0 2px; line-height: 1.05; letter-spacing: -0.01em;
  font-variation-settings: "opsz" 40, "SOFT" 40, "WONK" 0;
  display: flex; align-items: baseline; gap: 8px;
}
.misos-page .fiche h3 .kanji { font-size: 0.7em; color: var(--fg-faint); font-weight: 400; }
.misos-page .fiche .reading {
  font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.02em;
  color: var(--fg-faint); text-transform: lowercase; display: block; margin-bottom: 12px;
}
.misos-page .fiche .sensorial {
  font-family: var(--font-body); font-size: 0.96rem; line-height: 1.55;
  color: var(--fg); margin: 0 0 14px;
}
.misos-page .fiche .usage {
  font-family: var(--font-body); font-size: 0.84rem; line-height: 1.5;
  color: var(--fg-soft); margin: 0 0 14px;
}
.misos-page .fiche .usage .k {
  font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
  color: var(--rule-indigo); margin-right: 7px;
}
.misos-page .fiche .region {
  margin-top: auto; padding-top: 12px;
  font-family: var(--font-hand); font-size: 1.05rem; color: var(--fg-soft);
  transform: rotate(-1deg); display: inline-block;
}
.misos-page .fiche .fav-note {
  position: absolute; right: 16px; bottom: 15px;
  font-family: var(--font-hand); font-weight: 700; font-size: 1.2rem;
  color: var(--rule-indigo); transform: rotate(-4deg);
}

/* hover linking */
.misos-page .fiche:hover {
  box-shadow: var(--shadow-md); transform: translateY(-2px);
  border-color: oklch(0.42 0.10 255 / 0.5);
}
.misos-page.dimmed .fiche:not(.hot) { opacity: 0.4; }
.misos-page.dimmed .band .swatch:not(.hot) { filter: saturate(0.5) brightness(0.97); }
.misos-page .fiche.hot { box-shadow: var(--shadow-md); border-color: oklch(0.42 0.10 255 / 0.6); }

/* ---------------- closing ---------------- */
.misos-page .closing {
  margin-top: clamp(48px, 6vw, 80px); padding-top: 28px;
  border-top: var(--rule-thin);
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 28px; flex-wrap: wrap;
}
.misos-page .closing .wisdom {
  font-family: var(--font-display); font-style: italic; font-weight: 360;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.3; margin: 0; max-width: 30ch;
  font-variation-settings: "opsz" 40, "SOFT" 50, "WONK" 0;
}
.misos-page .closing .sign { text-align: right; }
.misos-page .closing .sign .kj-fiche { display: block; margin-bottom: 6px; }
.misos-page .closing .sign .sig { font-family: var(--font-hand); font-size: 1.7rem; color: var(--fg); transform: rotate(-2deg); display: inline-block; }

@media (max-width: 640px) {
  .misos-page .band { height: 96px; }
  .misos-page .band-labels .lab .nm { font-size: 0.8rem; }
  .misos-page .band-labels .lab .kanji { display: none; }
  .misos-page .hand-note { display: none; }
}

@media print {
  .misos-page { background: #fff; }
  .misos-page::before { display: none; }
  .misos-page .planche { max-width: none; padding: 0; }
  .misos-page .fiche, .misos-page .band { box-shadow: none; break-inside: avoid; }
  .misos-page .famille, .misos-page .spectre { break-inside: avoid; }
}

/* ---------- header photo ---------- */
.misos-page header.intro { display: grid; grid-template-columns: minmax(0,1fr) clamp(270px, 31%, 380px); gap: clamp(20px,4vw,52px); align-items: end; }
.misos-page .intro .head-text { min-width: 0; }
.misos-page .intro .head-photo { position: relative; align-self: end; }
.misos-page .intro .head-photo img { display: block; width: 100%; height: auto; filter: drop-shadow(0 16px 26px oklch(0.2 0.03 50 / 0.16)); }

/* ---------- aide « tu hésites ? » (bulle d'Alex) ---------- */
.misos-page .choose-aid { display: flex; align-items: flex-start; gap: 16px; margin-top: 24px; }
.misos-page .choose-aid .aid-avatar { width: 76px; height: 76px; border-radius: 50%; flex-shrink: 0;
  background-image: url(../misos/alex-misos.png); background-repeat: no-repeat;
  background-size: 290%; background-position: 50% 12%; background-color: var(--bg-elevated);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px oklch(0.42 0.10 255 / 0.4), var(--shadow-sm); }
.misos-page .choose-aid .aid-bubble { position: relative; flex: 1;
  background: var(--bg-elevated); border: var(--rule-thin); border-radius: var(--r-md);
  padding: 14px 22px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; }
.misos-page .choose-aid .aid-bubble::before { content:""; position: absolute; left: -8px; top: 22px;
  width: 15px; height: 15px; background: var(--bg-elevated);
  border-left: var(--rule-thin); border-bottom: var(--rule-thin); transform: rotate(45deg); }
.misos-page .choose-aid .ca-q { width: 100%; font-family: var(--font-hand); font-size: 1.35rem; color: var(--rule-indigo); }
.misos-page .choose-aid .ca-rule { font-family: var(--font-body); font-size: 0.92rem; color: var(--fg-soft); }
.misos-page .choose-aid .ca-rule strong { color: var(--fg); font-weight: 700; }
.misos-page .choose-aid .ca-dm { width: 100%; margin-top: 4px; padding-top: 11px; border-top: 1px solid oklch(0.42 0.10 255 / 0.18); font-family: var(--font-body); font-size: 0.92rem; color: var(--fg-soft); line-height: 1.45; }
.misos-page .choose-aid .ca-dm strong { color: var(--rule-indigo); font-weight: 700; }

/* ---------- fiches larges (clair → sombre) ---------- */
.misos-page .fiche-list { display: flex; flex-direction: column; gap: 16px; }
.misos-page .fiche.wide { display: grid; grid-template-columns: clamp(168px, 27%, 300px) 1fr; padding: 0; overflow: hidden; align-items: stretch; }
.misos-page .fiche.wide .fiche-photo { background: var(--tone) center/cover no-repeat; position: relative; min-height: 220px; }
.misos-page .fiche.wide .fiche-photo::after { content:""; position:absolute; inset:0; box-shadow: inset 0 0 44px oklch(0.2 0.03 50 / 0.26), inset -1px 0 0 oklch(0.42 0.10 255 / 0.25); }
.misos-page .fiche.wide .fiche-body { padding: 22px 28px 18px; display: flex; flex-direction: column; }
.misos-page .grain-tag { font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rule-indigo); font-weight: 700; white-space: nowrap; }
.misos-page .fiche.wide .fiche-band .kj-fiche { margin-left: auto; }
.misos-page .fiche.wide .fiche-photo .fav-note { position: absolute; left: 16px; bottom: 14px; right: auto; top: auto; z-index: 3; font-size: 1.2rem; color: oklch(0.99 0.012 92); text-shadow: 0 2px 9px oklch(0.2 0.03 50 / 0.7), 0 0 2px oklch(0.2 0.03 50 / 0.55); white-space: nowrap; }
.misos-page .fiche.wide.assemblage { background: var(--bg-elevated); border-color: oklch(0.42 0.10 255 / 0.4); }
.misos-page .fiche.wide .blend-photo { display: flex; flex-direction: column; background: none; }
.misos-page .fiche.wide .blend-photo .half { flex: 1; background: center/cover no-repeat; }

@media (max-width: 720px) {
  .misos-page header.intro { grid-template-columns: 1fr; }
  .misos-page .intro .head-photo { max-width: 300px; margin-top: 6px; }
  .misos-page .fiche.wide { grid-template-columns: 1fr; }
  .misos-page .fiche.wide .fiche-photo { min-height: 120px; }
}

/* spectre — aperçu flottant au survol d'une teinte */
.misos-page .spectre-pop {
  position: fixed; z-index: 50; width: max-content; max-width: 280px;
  background: var(--bg-elevated); border: var(--rule-thin);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  padding: 13px 16px 14px;
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.misos-page .spectre-pop.on { opacity: 1; transform: translateY(0); }
.misos-page .spectre-pop .ph { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; padding-bottom: 9px; border-bottom: 1px solid oklch(0.42 0.10 255 / 0.22); }
.misos-page .spectre-pop .pn {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 460; line-height: 1;
  letter-spacing: -0.01em; font-variation-settings: "opsz" 36, "SOFT" 40, "WONK" 0;
}
.misos-page .spectre-pop .pn .kanji { font-size: 0.7em; color: var(--fg-faint); font-weight: 400; }
.misos-page .spectre-pop .pm {
  font-family: var(--font-body); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--rule-indigo); font-weight: 600; margin-bottom: 7px;
}
.misos-page .spectre-pop .ps { font-family: var(--font-body); font-size: 0.875rem; line-height: 1.5; color: var(--fg); margin: 0; }
