/* OPPLM : feuille de style commune (clair / sombre, web / mobile) */
:root {
  --bg: #f5f1e9; --bg-2: #ece6da; --card: #fffdf8; --ink: #1d1b18; --ink-2: #4a453d; --ink-3: #7c756a;
  --line: #ddd5c6; --line-2: #e9e3d6;
  --tone: #9a4a26; --tone-soft: #f2e0d4;
  --yijing: #86582d; --yijing-soft: #efe2d2;
  --tarot: #a33a2b; --tarot-soft: #f4dcd6;
  --agir: #a87718; --agir-soft: #f2e6c9;
  --animaux: #2f6b4f; --animaux-soft: #d9ebe0;
  --decider: #34466b; --decider-soft: #dde3ef;
  --bois: #3f7d4e; --feu: #c0392b; --terre: #c9962b; --metal: #8a8f99; --eau: #2b5c8a;
  --ok: #3b6b4f; --warn: #a8641b;
  --radius: 12px; --shadow: 0 1px 2px rgba(40,30,15,.05), 0 4px 16px rgba(40,30,15,.04);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tabbar-h: 0px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161412; --bg-2: #201d19; --card: #23201b; --ink: #ede7db; --ink-2: #c9c1b3; --ink-3: #928a7d;
    --line: #3a352d; --line-2: #2d2923;
    --tone: #e08a5c; --tone-soft: #3a2a20;
    --yijing: #d5a26b; --yijing-soft: #33291d; --tarot: #e37b69; --tarot-soft: #3a2320;
    --agir: #e0b453; --agir-soft: #342b17; --animaux: #72b894; --animaux-soft: #1e3128;
    --decider: #8fa6d6; --decider-soft: #232b3b; --ok: #7fb593;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #161412; --bg-2: #201d19; --card: #23201b; --ink: #ede7db; --ink-2: #c9c1b3; --ink-3: #928a7d;
  --line: #3a352d; --line-2: #2d2923; --tone: #e08a5c; --tone-soft: #3a2a20;
  --yijing: #d5a26b; --yijing-soft: #33291d; --tarot: #e37b69; --tarot-soft: #3a2320;
  --agir: #e0b453; --agir-soft: #342b17; --animaux: #72b894; --animaux-soft: #1e3128;
  --decider: #8fa6d6; --decider-soft: #232b3b; --ok: #7fb593; --shadow: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.58 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--tone); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .45em; letter-spacing: -.005em; }
h1 { font-size: 2rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.12rem; }
p { margin: 0 0 .9em; }
img { max-width: 100%; }
.muted { color: var(--ink-3); } .small { font-size: .88rem; } .xs { font-size: .78rem; }
.serif { font-family: var(--serif); }
.quote { font-family: var(--serif); font-style: italic; color: var(--ink-2); font-size: 1.08rem; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.sr { position: absolute; left: -9999px; }

/* tons par outil */
.t-yijing { --tone: var(--yijing); --tone-soft: var(--yijing-soft); }
.t-tarot { --tone: var(--tarot); --tone-soft: var(--tarot-soft); }
.t-agir { --tone: var(--agir); --tone-soft: var(--agir-soft); }
.t-animaux { --tone: var(--animaux); --tone-soft: var(--animaux-soft); }
.t-decider { --tone: var(--decider); --tone-soft: var(--decider-soft); }

/* ---------- en-tête ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1040px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 1.12rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand small { display: block; font-family: var(--sans); font-weight: 400; font-size: .7rem; color: var(--ink-3); letter-spacing: .02em; margin-top: -2px; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { color: var(--ink-2); padding: 7px 12px; border-radius: 8px; font-size: .94rem; }
.nav a:hover { background: var(--bg-2); text-decoration: none; }
.nav a.active { background: var(--ink); color: var(--bg); }
.top-actions { display: flex; gap: 6px; }
.icon-btn { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); width: 36px; height: 36px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { border-color: var(--ink-3); }
.icon-btn svg { width: 18px; height: 18px; }

/* barre d'onglets mobile */
.tabbar { display: none; }
@media (max-width: 760px) {
  :root { --tabbar-h: 64px; }
  .nav { display: none; }
  .topbar .in { padding: 8px 14px; }
  .top-actions { margin-left: auto; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--card); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink-3); font-size: .68rem; padding: 6px 0; border-radius: 10px; min-height: 52px; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--ink); }
  .tabbar a.active svg { stroke: var(--tone); }
  .tabbar a.plus span.pl { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; margin-top: -4px; }
  .tabbar a.plus svg { stroke: var(--bg); }
  .tabbar a:hover { text-decoration: none; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

/* ---------- mise en page ---------- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 22px 20px 64px; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
@media (max-width: 760px) { .wrap { padding: 16px 16px 40px; } h1 { font-size: 1.6rem; } h2 { font-size: 1.28rem; } }
.crumbs { font-size: .85rem; color: var(--ink-3); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sepc { opacity: .5; }
.page-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { margin-bottom: .15em; }
.page-head .sub { color: var(--ink-3); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 860px) { .grid-4 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { height: 12px; } .spacer-l { height: 26px; }
.foot { max-width: 1040px; margin: 0 auto; padding: 18px 20px 40px; color: var(--ink-3); font-size: .82rem; border-top: 1px solid var(--line); }
.foot a { color: var(--ink-3); text-decoration: underline; }

/* ---------- cartes ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card.soft { background: var(--bg-2); box-shadow: none; }
.card.tone { border-left: 4px solid var(--tone); }
.card.tonebg { background: var(--tone-soft); border-color: transparent; box-shadow: none; }
.card h3:first-child, .card h2:first-child { margin-top: 0; }
@media (max-width: 600px) { .card { padding: 16px; } }
.kicker { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; margin-bottom: 4px; }
.kicker.tone { color: var(--tone); }
a.card { display: block; color: var(--ink); }
a.card:hover { text-decoration: none; border-color: var(--ink-3); }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px; border-radius: 10px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font: 600 .95rem var(--sans); cursor: pointer; text-align: center; }
.btn:hover { text-decoration: none; opacity: .92; }
.btn.tone { background: var(--tone); border-color: var(--tone); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink-3); background: var(--card); }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: .86rem; font-weight: 500; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .4; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.btns.end { justify-content: flex-end; }
.link-btn { background: none; border: 0; color: var(--tone); font: inherit; cursor: pointer; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.chip.tone { background: var(--tone-soft); color: var(--tone); font-weight: 600; }
.chip.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.chip.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 5px; }
.c-bois { background: var(--bois); } .c-feu { background: var(--feu); } .c-terre { background: var(--terre); } .c-metal { background: var(--metal); } .c-eau { background: var(--eau); }

/* ---------- formulaires ---------- */
input[type=text], input[type=date], input[type=search], textarea, select { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--tone) 45%, transparent); outline-offset: 1px; border-color: var(--tone); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
textarea.short { min-height: 60px; }
.field { display: block; margin-bottom: 14px; }
.field > .lab { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.field > .lab .code { margin-right: 6px; }
.hint { color: var(--ink-3); font-size: .84rem; margin-top: 5px; }
.code { display: inline-block; min-width: 28px; padding: 1px 7px; border-radius: 6px; background: var(--tone); color: #fff; font-size: .74rem; font-weight: 700; text-align: center; vertical-align: 1px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice.c3 { grid-template-columns: repeat(3, 1fr); }
.choice.c6 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .choice, .choice.c3 { grid-template-columns: 1fr; } .choice.c6 { grid-template-columns: 1fr 1fr; } }
.choice label { display: block; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--card); font-size: .93rem; }
.choice label:hover { border-color: var(--ink-3); }
.choice label.on { border-color: var(--tone); box-shadow: inset 0 0 0 1px var(--tone); background: var(--tone-soft); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { display: block; margin-bottom: 2px; }
.choice small { color: var(--ink-3); display: block; line-height: 1.35; }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.likert.l3 { grid-template-columns: repeat(3, 1fr); }
.likert label { text-align: center; padding: 9px 4px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: .8rem; color: var(--ink-2); background: var(--card); line-height: 1.25; }
.likert label.on { background: var(--tone); color: #fff; border-color: var(--tone); }
.likert input { position: absolute; opacity: 0; pointer-events: none; }
@media (max-width: 480px) { .likert { grid-template-columns: repeat(5, 1fr); gap: 4px; } .likert label { font-size: .68rem; padding: 8px 2px; } }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; margin-bottom: 8px; font-size: .94rem; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--tone); flex: none; }
.check.on { border-color: var(--tone); background: var(--tone-soft); }
.q-item { padding: 14px 0; border-top: 1px solid var(--line-2); }
.q-item:first-child { border-top: 0; padding-top: 0; }
.q-item p { margin: 0; }
.saved { font-size: .78rem; color: var(--ok); opacity: 0; transition: opacity .3s; }
.saved.show { opacity: 1; }

/* ---------- étapes ---------- */
.stepper { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.stepper a, .stepper span { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: .84rem; }
.stepper a:hover { text-decoration: none; border-color: var(--ink-3); }
.stepper .on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stepper .done { border-color: var(--tone); color: var(--tone); }
@media (max-width: 600px) { .stepper { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; } .stepper a, .stepper span { white-space: nowrap; } }
.progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin: 6px 0 14px; }
.progress i { display: block; height: 100%; background: var(--tone); border-radius: 2px; transition: width .25s; }

/* ---------- accueil ---------- */
.hero { padding: 26px 0 10px; }
.hero h1 { font-size: 2.5rem; margin-bottom: .25em; }
.hero .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 680px; }
@media (max-width: 600px) { .hero h1 { font-size: 1.9rem; } .hero .lead { font-size: 1.02rem; } }
.demarche { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; counter-reset: ph; }
.demarche > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; position: relative; }
.demarche h4 { font-family: var(--sans); font-size: .95rem; margin: 6px 0 4px; }
.demarche p { font-size: .84rem; color: var(--ink-2); margin: 0; line-height: 1.4; }
.demarche .n { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; }
@media (max-width: 860px) { .demarche { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .demarche { grid-template-columns: 1fr; } }
.toolcard { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); height: 100%; }
.toolcard:hover { text-decoration: none; border-color: var(--tone); }
.toolcard .ic { width: 44px; height: 44px; border-radius: 11px; background: var(--tone-soft); color: var(--tone); display: flex; align-items: center; justify-content: center; flex: none; }
.toolcard .ic svg { width: 26px; height: 26px; }
.toolcard h3 { margin: 0 0 3px; font-size: 1.05rem; }
.toolcard p { margin: 0; font-size: .87rem; color: var(--ink-2); line-height: 1.4; }
.toolcard .when { margin-top: 6px; font-size: .78rem; color: var(--ink-3); }
.sit-item { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); margin-bottom: 10px; }
.sit-item:hover { text-decoration: none; border-color: var(--ink-3); }
.sit-item .t { font-weight: 600; font-family: var(--serif); font-size: 1.05rem; }
.sit-item .m { font-size: .82rem; color: var(--ink-3); }
.sit-item .ics { display: flex; gap: 4px; margin-left: auto; flex: none; }
.mini-ic { width: 26px; height: 26px; border-radius: 7px; background: var(--tone-soft); color: var(--tone); display: inline-flex; align-items: center; justify-content: center; }
.mini-ic svg { width: 16px; height: 16px; }
.empty { text-align: center; padding: 34px 20px; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- page situation ---------- */
.sit-head { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.sit-head h1 { font-size: 1.7rem; margin: 2px 0 6px; }
.sit-head .desc { color: var(--ink-2); white-space: pre-wrap; }
.phase { display: grid; grid-template-columns: 36px 1fr; gap: 14px; margin-bottom: 22px; }
.phase .pn { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; font-weight: 700; margin-top: 2px; }
.phase .pn.done { background: var(--ok); }
.phase .pb > h2 { margin: 4px 0 2px; font-size: 1.3rem; }
.phase .pb > .ph-sub { color: var(--ink-3); font-size: .9rem; margin-bottom: 10px; }
@media (max-width: 600px) { .phase { grid-template-columns: 1fr; gap: 4px; } .phase .pn { width: 28px; height: 28px; font-size: .85rem; } }
.approaches { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.appr { display: flex; flex-direction: column; gap: 4px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); color: var(--ink); }
.appr:hover { border-color: var(--tone); text-decoration: none; }
.appr .h { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.appr .d { font-size: .82rem; color: var(--ink-2); line-height: 1.35; }
.appr .sugg { font-size: .72rem; color: var(--tone); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.appr.suggested { border-color: var(--tone); box-shadow: inset 0 0 0 1px var(--tone); }
.lect { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--tone); border-radius: 11px; background: var(--card); color: var(--ink); margin-bottom: 8px; }
.lect:hover { text-decoration: none; border-color: var(--ink-3); border-left-color: var(--tone); }
.lect .lk { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--tone); font-weight: 700; }
.lect .lt { font-weight: 600; }
.lect .ls { font-size: .84rem; color: var(--ink-2); }
.lect .vis { display: flex; gap: 4px; align-items: center; }
.lect .vis img { width: 30px; border-radius: 3px; }
@media (max-width: 520px) { .lect { grid-template-columns: auto 1fr; } .lect .go { display: none; } }
.retenu { margin-top: 4px; font-size: .86rem; color: var(--ink-2); }
.retenu::before { content: "→ "; color: var(--tone); }

/* ---------- panneaux / modales / toasts ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(20,16,10,.45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.sheet { background: var(--card); border-radius: 16px; padding: 20px; width: 100%; max-width: 520px; max-height: 86vh; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
@media (max-width: 600px) { .sheet-bg { align-items: flex-end; padding: 0; } .sheet { border-radius: 16px 16px 0 0; max-height: 88vh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); } }
.sheet h3 { margin-top: 0; }
.sheet .opt { display: block; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); margin-bottom: 8px; cursor: pointer; font: inherit; }
.sheet .opt:hover { border-color: var(--ink-3); }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--tabbar-h)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: .9rem; z-index: 80; box-shadow: 0 6px 24px rgba(0,0,0,.2); }

/* ---------- lectures : textes et tableaux ---------- */
details.livre { border-top: 1px solid var(--line-2); padding: 10px 0 0; margin-top: 10px; }
details.livre:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
details.livre > summary { cursor: pointer; font-weight: 600; font-family: var(--serif); font-size: 1.02rem; color: var(--ink); list-style: none; padding-left: 20px; position: relative; }
details.livre > summary::-webkit-details-marker { display: none; }
details.livre > summary::before { content: "›"; position: absolute; left: 3px; top: -2px; color: var(--tone); font-size: 1.25rem; transition: transform .15s; }
details.livre[open] > summary::before { transform: rotate(90deg); }
.livre-body { padding-top: 8px; font-size: .97rem; }
table.syn { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.syn th { text-align: left; font-weight: 600; color: var(--ink-2); padding: 7px 12px 7px 0; vertical-align: top; width: 34%; border-top: 1px solid var(--line-2); }
table.syn td { padding: 7px 0; vertical-align: top; border-top: 1px solid var(--line-2); }
table.syn tr:first-child th, table.syn tr:first-child td { border-top: 0; }
.table-scroll { overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; font-size: .86rem; min-width: 620px; }
table.grid th, table.grid td { border-top: 1px solid var(--line-2); padding: 7px 8px; text-align: left; vertical-align: top; }
.qq { margin: 0 0 6px; padding-left: 16px; position: relative; font-size: .95rem; }
.qq::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); }
.ex-list p { margin: 0 0 4px; padding-left: 16px; position: relative; }
.ex-list p::before { content: "✓"; position: absolute; left: 0; color: var(--tone); font-size: .8rem; }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--tone-soft); color: var(--ink); font-size: .92rem; margin: 10px 0; }
.two-col { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }
.search { position: relative; margin-bottom: 14px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filters button, .filters a { font: inherit; font-size: .86rem; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; }
.filters .on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filters a:hover { text-decoration: none; }

/* ---------- Yi Jing ---------- */
.hex { display: inline-block; vertical-align: middle; }
.hex .l { fill: var(--ink); } .hex .m { fill: var(--yijing); } .hex .g { fill: var(--line); }
.hex-big { width: 116px; } .hex-mid { width: 70px; } .hex-small { width: 40px; } .hex-xs { width: 26px; }
.hex-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.hex-head .cn { font-family: "Songti SC", "Noto Serif CJK SC", "SimSun", serif; font-size: 1.5rem; color: var(--ink-2); margin-left: 6px; }
.evolve { display: flex; align-items: center; gap: 12px; margin-left: auto; color: var(--ink); }
.evolve:hover { text-decoration: none; }
@media (max-width: 600px) { .evolve { margin-left: 0; } }
.trig { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; color: var(--ink-2); font-size: .9rem; }
.pos-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pos-list li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: .94rem; }
.pos-list li.me { border-color: var(--tone); background: var(--tone-soft); }
.pos-list .num { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--ink-3); text-align: center; line-height: 1.2; }
.pos-list li.moving .num { color: var(--yijing); }
.pos-list .role { display: block; font-size: .78rem; color: var(--ink-3); margin-bottom: 2px; }
.build { display: grid; grid-template-columns: 1fr 150px; gap: 18px; align-items: start; }
.build .preview { position: sticky; top: 84px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
@media (max-width: 700px) { .build { grid-template-columns: 1fr; } .build .preview { position: sticky; top: 60px; z-index: 5; display: flex; align-items: center; gap: 12px; text-align: left; padding: 8px 12px; order: -1; } .build .preview .hex { width: 34px !important; } }
.coins { display: grid; gap: 6px; }
.coin-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); font-size: .9rem; }
.coin-row.empty { opacity: .45; }
.coin-row .cv { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; text-align: center; }
.coin { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--yijing); font-size: .64rem; line-height: 18px; text-align: center; color: var(--yijing); font-weight: 700; margin-left: 3px; }
.coin.f { background: var(--yijing); color: #fff; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.lib-item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.lib-item:hover { text-decoration: none; border-color: var(--tone); }
.lib-item .n { color: var(--ink-3); font-size: .74rem; } .lib-item .t { font-weight: 600; font-size: .9rem; line-height: 1.25; } .lib-item .s { color: var(--ink-3); font-size: .78rem; }
.kw-matrix { display: grid; grid-template-columns: 40px repeat(8, 1fr); gap: 3px; font-size: .7rem; }
.kw-matrix a, .kw-matrix div { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 6px; }
.kw-matrix a { background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: .78rem; }
.kw-matrix a:hover { border-color: var(--tone); text-decoration: none; }
.kw-matrix .hd { color: var(--ink-3); font-size: 1.05rem; }

/* ---------- Tarot ---------- */
.carte { display: block; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.18); background: #e9e2d2; }
.carte img { display: block; width: 100%; height: auto; }
.carte.xs { width: 30px; border-radius: 3px; box-shadow: none; } .carte.small { width: 96px; } .carte.mid { width: 170px; } .carte.big { width: 250px; max-width: 100%; }
.spread { display: grid; gap: 16px; margin: 10px 0; }
.spread.n1 { grid-template-columns: minmax(0, 220px); justify-content: center; } .spread.n2 { grid-template-columns: repeat(2, minmax(0, 200px)); justify-content: center; } .spread.n3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) { .spread { gap: 8px; } .spread.n3 { grid-template-columns: repeat(3, 1fr); } }
.slot { text-align: center; }
.slot .sk { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 6px; min-height: 2.2em; }
.slot .carte { width: 100%; }
.slot .sn { font-weight: 600; margin-top: 6px; font-size: .9rem; line-height: 1.25; }
.back { width: 100%; aspect-ratio: 615/1171; border-radius: 8px; background: repeating-linear-gradient(45deg, #8b3a3a 0 6px, #a34d4d 6px 12px); box-shadow: 0 2px 10px rgba(0,0,0,.18); border: 5px solid #f3ead8; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #f3ead8; font-weight: 700; font-size: .8rem; }
.back:hover { filter: brightness(1.08); }
.flip { animation: flip .45s ease; }
@keyframes flip { 0% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }
.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.deck-grid a { color: var(--ink); text-align: center; font-size: .8rem; }
.deck-grid a:hover { text-decoration: none; }
.deck-grid .dn { display: block; margin-top: 6px; font-weight: 600; line-height: 1.2; }
.deck-grid .dt { display: block; color: var(--ink-3); font-size: .74rem; }
.selectable { cursor: pointer; border: 3px solid transparent; transition: transform .12s; }
.selectable:hover { transform: translateY(-2px); }
.selectable.on { border-color: var(--tarot); } .selectable.on2 { border-color: var(--eau); }
.reading-card { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: start; }
@media (max-width: 560px) { .reading-card { grid-template-columns: 1fr; } .reading-card > .carte, .reading-card > a > .carte { width: 150px; margin: 0 auto; } }
.zoom-bg { position: fixed; inset: 0; background: rgba(10,8,5,.95); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.zoom-sc { display: flex; max-width: 100%; max-height: 100%; }
.zoom-sc img { max-height: calc(100vh - 90px); max-width: 94vw; border-radius: 10px; margin: auto; display: block; cursor: zoom-in; background: #fff; }
.zoom-bg.full .zoom-sc { position: fixed; inset: 0; max-width: none; max-height: none; overflow: auto; -webkit-overflow-scrolling: touch; }
.zoom-bg.full .zoom-sc img { max-width: none; max-height: none; border-radius: 0; cursor: zoom-out; }
.zoom-x { position: fixed; top: 8px; right: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.zoom-hint { position: fixed; left: 0; right: 0; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); margin: 0; text-align: center; color: rgba(255,255,255,.75); font-size: .8rem; pointer-events: none; }

/* ---------- Cinq Agir ---------- */
.penta { width: 100%; max-width: 540px; margin: 0 auto; display: block; }
.penta .node { cursor: pointer; }
.penta .node circle { stroke: var(--card); stroke-width: 3; }
.penta .node text { fill: #fff; font-weight: 700; font-size: 15px; text-anchor: middle; dominant-baseline: middle; pointer-events: none; font-family: var(--sans); }
.penta .node text.lbl { fill: var(--ink-3); font-size: 11.5px; font-weight: 500; }
.penta .arrow { fill: none; stroke-width: 2.2; stroke-linecap: round; }
.penta .arrow.nourrit { stroke: var(--ink-2); } .penta .arrow.finalise { stroke: var(--ink-3); stroke-dasharray: 5 4; } .penta .arrow.controle { stroke: var(--agir); }
.penta .arrow.dim { opacity: .15; } .penta .arrow.hot { stroke-width: 3.6; }
.penta .node.dim { opacity: .35; } .penta .node.hot circle { stroke: var(--ink); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: .82rem; color: var(--ink-2); margin-top: 4px; }
.legend span::before { content: ""; display: inline-block; width: 22px; height: 0; border-top: 2.5px solid var(--ink-2); margin-right: 6px; vertical-align: middle; }
.legend .fin::before { border-top-style: dashed; border-color: var(--ink-3); } .legend .ctl::before { border-color: var(--agir); }
.tint-bois { border-left: 5px solid var(--bois) !important; } .tint-feu { border-left: 5px solid var(--feu) !important; } .tint-terre { border-left: 5px solid var(--terre) !important; } .tint-metal { border-left: 5px solid var(--metal) !important; } .tint-eau { border-left: 5px solid var(--eau) !important; }
.radar { width: 100%; max-width: 320px; display: block; margin: 0 auto; }
.radar .grid { fill: none; stroke: var(--line); } .radar .axis { stroke: var(--line); }
.radar .shape { fill: color-mix(in srgb, var(--agir) 20%, transparent); stroke: var(--agir); stroke-width: 2; }
.radar text { font-size: 11px; fill: var(--ink-2); text-anchor: middle; font-family: var(--sans); }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 70px 1fr 34px; gap: 10px; align-items: center; font-size: .88rem; }
.bar .track { height: 10px; background: var(--bg-2); border-radius: 5px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 5px; }
.rel-list { display: grid; gap: 8px; }
.rel { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.rel:hover { border-color: var(--tone); text-decoration: none; }
.rel .rk { font-size: .72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.rel .rt { font-weight: 600; font-size: .93rem; }
figure.appert { margin: 12px 0 0; background: #fff; border-radius: 10px; padding: 10px; text-align: center; }
figure.appert img { max-height: 170px; height: auto; }
figure.appert.big img { max-height: 320px; }
figure.appert figcaption { font-size: .76rem; color: #6b645a; margin-top: 6px; }
.frise { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.frise a { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; color: #5c554b; font-size: .8rem; }
.frise a:hover { text-decoration: none; border-color: var(--agir); }
.frise img { width: 100%; height: 96px; object-fit: contain; display: block; margin-bottom: 4px; }
@media (max-width: 560px) { .frise { gap: 4px; } .frise a { padding: 3px; font-size: .66rem; } .frise img { height: 52px; } }
.passerelle { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Animaux ---------- */
.dessin { background: #fff; border-radius: 10px; padding: 8px; text-align: center; }
.dessin img { max-height: 260px; height: auto; }
.dessin.small img { max-height: 150px; }
.animal { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }
@media (max-width: 640px) { .animal { grid-template-columns: 1fr; } }
.photo { margin: 0; }
.photo img { width: 100%; border-radius: 10px; display: block; background: var(--bg-2); aspect-ratio: 4/3; object-fit: cover; }
.photo figcaption, figure.clip figcaption { font-size: .7rem; color: var(--ink-3); margin-top: 4px; line-height: 1.3; }
.photo figcaption a, figure.clip figcaption a { color: var(--ink-3); text-decoration: underline; }
figure.clip { margin: 12px 0 0; }
figure.clip video { width: 100%; max-height: 420px; border-radius: 10px; background: #000; display: block; }
.invention { font-family: var(--serif); font-size: 1.1rem; line-height: 1.5; }
.bestiaire { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.bestiaire a { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--ink); display: flex; flex-direction: column; }
.bestiaire a:hover { border-color: var(--tone); text-decoration: none; }
.bestiaire img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--bg-2); }
.bestiaire .bn { padding: 8px 10px 2px; font-weight: 600; font-size: .9rem; }
.bestiaire .bt { padding: 0 10px 10px; font-size: .76rem; color: var(--ink-3); line-height: 1.35; }
@media (max-width: 480px) { .bestiaire { grid-template-columns: 1fr 1fr; gap: 8px; } }
.vbadge { display: inline-block; font-size: .6rem; background: var(--animaux); color: #fff; border-radius: 4px; padding: 1px 5px; vertical-align: middle; }
.terr-list { display: grid; gap: 6px; }
.terr { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font-size: .92rem; color: var(--ink); }
.terr:hover { text-decoration: none; border-color: var(--ink-3); }
.terr input { width: 17px; height: 17px; accent-color: var(--tone); flex: none; }
.terr.on { border-color: var(--tone); background: var(--tone-soft); }
.terr .star { margin-left: auto; border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: var(--ink-3); line-height: 1; padding: 0 2px; min-width: 32px; min-height: 32px; }
.terr.kept { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.terr.kept .star { color: #c9962b; }
.links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.quiz .rep { display: none; margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--tone); background: var(--bg-2); border-radius: 0 8px 8px 0; }
.quiz.open .rep { display: block; }

/* ---------- Décider ---------- */
.idea { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); margin-bottom: 8px; }
.idea.sel { border-color: var(--decider); box-shadow: inset 0 0 0 1px var(--decider); background: var(--decider-soft); }
.idea input[type=radio] { width: 18px; height: 18px; accent-color: var(--decider); margin-top: 3px; }
.idea .src { font-size: .74rem; color: var(--ink-3); }
.idea .x { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 1.1rem; }
.action-row { display: grid; grid-template-columns: 26px 1fr 150px 150px 30px; gap: 8px; align-items: center; margin-bottom: 8px; }
.action-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ok); }
@media (max-width: 640px) { .action-row { grid-template-columns: 26px 1fr 30px; } .action-row .qui, .action-row .quand { grid-column: 2 / 3; } }
.bilan { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.bilan > div { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--tone); border-radius: 10px; padding: 12px 14px; }

/* ---------- impression ---------- */
@media print {
  .topbar, .tabbar, .foot, .noprint, .btns, .btn, .stepper { display: none !important; }
  body { background: #fff; color: #000; padding: 0; font-size: 11pt; }
  .wrap { max-width: none; padding: 0; }
  .card, .sit-head, .lect { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  details.livre > .livre-body { display: block; }
  a { color: #000; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
details.more-appr { margin-top: 10px; border-top: 0; }
details.more-appr > summary { font-family: var(--sans); font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.grid-2 > .card + .card, .grid-3 > .card + .card, .grid-4 > .card + .card, .approaches > .card + .card { margin-top: 0; }
.spread.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.slot { display: flex; flex-direction: column; }
.slot .sk { min-height: 2.8em; display: flex; align-items: flex-end; justify-content: center; line-height: 1.3; }
.lect .vis { min-width: 40px; justify-content: center; }
.spread { max-width: 600px; margin-left: auto; margin-right: auto; }
.deco { float: right; width: 96px; background: #fff; border-radius: 10px; padding: 4px; margin: 0 0 8px 12px; }
.deco img { display: block; width: 100%; }
@media (max-width: 600px) { .deco { width: 72px; } }
.penta.compact { max-width: 340px; }
@media (max-width: 600px) { .grid-2[style*="grid-template-columns"] { grid-template-columns: 1fr !important; } .reading-card[style*="grid-template-columns"] { grid-template-columns: 1fr !important; } }
figure.clip figcaption .cnote { display: block; color: var(--ink-2); font-size: .82rem; margin-bottom: 2px; }

/* =====================================================================
   Toolbox : cartes 3D, tapis, tirages animés
   ===================================================================== */
.fc { perspective: 1400px; position: relative; }
.fc .fc-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .95s cubic-bezier(.2,.75,.25,1); }
.fc.flipped .fc-in { transform: rotateY(180deg); }
.fc .fc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px; overflow: hidden; }
.fc .fc-back { transform: rotateY(180deg); }
@keyframes deal { from { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, -140px)) rotate(var(--dr, -16deg)) scale(.65); } to { opacity: 1; transform: none; } }
.deal { animation: deal .75s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
.rise { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 120ms); }
.tapis { border-radius: 18px; padding: 18px; position: relative; overflow: hidden; box-shadow: inset 0 0 60px rgba(0,0,0,.35), 0 2px 10px rgba(0,0,0,.08); }
.tapis::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px); background-size: 5px 5px; }
.tapis > * { position: relative; z-index: 1; }
.tapis.vert { background: radial-gradient(ellipse at 50% 35%, #3b6f55 0%, #2b5642 55%, #1f4033 100%); }
.tapis.rouge { background: radial-gradient(ellipse at 50% 35%, #8a3129 0%, #66211b 60%, #4a1712 100%); }
.tapis.bois { background: radial-gradient(ellipse at 50% 35%, #6d4e30 0%, #533a22 60%, #3d2a17 100%); }
.tapis .tp-hint { color: #f3ead8; text-align: center; font-size: .92rem; margin: 0 0 12px; }
.tapis .tp-hint b { color: #fff; }
.tapis .btn.ghost { color: #f3ead8; border-color: rgba(243,234,216,.4); }
.tapis .btn.ghost:hover { background: rgba(255,255,255,.08); border-color: #f3ead8; }
@media (max-width: 600px) { .tapis { padding: 12px; border-radius: 14px; margin-left: -4px; margin-right: -4px; } }
@media (prefers-reduced-motion: reduce) { .fc .fc-in { transition-duration: .01s; } .deal, .rise, .coin3d.toss .ci { animation: none !important; } }

/* ---------- cartes territoires / animaux ---------- */
.table-terr { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .table-terr { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .table-terr { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.tslot { position: relative; }
.tlift { transition: transform .28s cubic-bezier(.2,.8,.2,1), filter .28s; cursor: pointer; }
.tslot:hover .tlift { transform: translateY(-5px) rotate(-.6deg); }
.tslot.sel .tlift { transform: translateY(-9px) scale(1.035); }
.tslot.gone { transition: opacity .45s, transform .45s; opacity: 0; transform: translateY(30px) scale(.85); }
.tcard { aspect-ratio: 3 / 4; width: 100%; }
.tf { background: #fbf6ea; color: #2a2620; display: flex; flex-direction: column; padding: 10% 9% 8%; box-shadow: 0 6px 16px rgba(0,0,0,.28), inset 0 0 0 5px #fbf6ea, inset 0 0 0 6px #2f6b4f, inset 0 0 0 8px #fbf6ea, inset 0 0 0 9px rgba(47,107,79,.45); background-image: radial-gradient(ellipse at 50% 0%, rgba(47,107,79,.08), transparent 60%); }
.tf-top { display: flex; align-items: center; justify-content: center; gap: 6px; color: #2f6b4f; font: 700 .64rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.tf-top svg { width: 16px; height: 16px; }
.tf-txt { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; font-family: var(--serif); font-size: .98rem; line-height: 1.28; padding: 6px 0; }
.tf-bot { text-align: center; color: rgba(47,107,79,.7); font-size: .8rem; letter-spacing: .3em; }
@media (max-width: 560px) { .tf-txt { font-size: .86rem; } }
.tslot.sel .tf { box-shadow: 0 10px 26px rgba(0,0,0,.4), 0 0 0 3px #f3d27a, inset 0 0 0 5px #fbf6ea, inset 0 0 0 6px #2f6b4f, inset 0 0 0 8px #fbf6ea, inset 0 0 0 9px rgba(47,107,79,.45); }
.tbadge { position: absolute; top: -8px; right: -8px; z-index: 3; width: 28px; height: 28px; border-radius: 50%; background: #f3d27a; color: #3a2a06; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.35); font-size: .9rem; }
.ta { background: #fff; color: #2a2620; display: flex; flex-direction: column; box-shadow: 0 6px 16px rgba(0,0,0,.28), inset 0 0 0 1px #e6dfd0; }
.ta img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; background: #fff; border-bottom: 1px solid #efe8da; }
.ta-txt { padding: 10px 12px 12px; overflow: auto; flex: 1; }
.ta-n { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; margin-bottom: 4px; color: #1d3f2f; }
.ta-d { font-size: .84rem; line-height: 1.4; color: #3f3a32; }
.reveal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 300px)); justify-content: center; gap: 22px; }
@media (max-width: 760px) { .reveal-grid { grid-template-columns: minmax(0, 320px); } }
.reveal-grid .kick { color: #f3ead8; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; text-align: center; margin-bottom: 8px; min-height: 2.6em; display: flex; align-items: flex-end; justify-content: center; }
.illus { margin: 0; background: #fff; border-radius: 12px; padding: 4px; box-shadow: inset 0 0 0 1px var(--line); }
.illus img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; }
.animal { grid-template-columns: 340px 1fr; }
@media (max-width: 700px) { .animal { grid-template-columns: 1fr; } }
.bestiaire img { object-fit: contain; background: #fff; }
.mini-terr { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mini-terr .tf { position: relative; aspect-ratio: 3/4; border-radius: 12px; }

/* ---------- Tarot : éventail et fentes ---------- */
.fan { position: relative; margin: 0 auto; }
.fpos { position: absolute; pointer-events: none; }
.fpos .fcard { pointer-events: auto; }
.fpos.deal { --dy: 0px; }
.fcard { width: 100%; transform: translateY(var(--y, 0px)) rotate(var(--r, 0deg)); transform-origin: 50% 120%; transition: transform .22s ease, opacity .35s ease; cursor: pointer; }
.fcard:hover { transform: translateY(calc(var(--y, 0px) - 16px)) rotate(var(--r, 0deg)); }
.fcard.picked { opacity: 0; transform: translateY(calc(var(--y, 0px) - 90px)) rotate(var(--r, 0deg)) scale(1.15); pointer-events: none; }
.dos { display: block; width: 100%; aspect-ratio: 615 / 1171; border-radius: 6px; background: #6f1d18 url(../img/tarot/dos.svg) center / cover no-repeat; box-shadow: 0 2px 7px rgba(0,0,0,.45); }
.slots { display: flex; gap: 16px; justify-content: center; flex-wrap: nowrap; margin: 4px 0 16px; }
.slotc { width: min(27vw, 180px); text-align: center; }
.slotc .sk { color: #f3ead8; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; min-height: 2.6em; display: flex; align-items: flex-end; justify-content: center; line-height: 1.25; margin-bottom: 6px; }
.slotc .empty-slot { aspect-ratio: 615 / 1171; border: 2px dashed rgba(243,234,216,.35); border-radius: 8px; }
.slotc .fc { aspect-ratio: 615 / 1171; width: 100%; cursor: pointer; }
.slotc .fc-face { border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.slotc .fc-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slotc .sn { color: #fff; font-weight: 600; margin-top: 8px; font-size: .9rem; min-height: 1.3em; }
.stack { position: relative; width: 110px; aspect-ratio: 615 / 1171; margin: 10px auto 18px; }
.stack .dos { position: absolute; inset: 0; }
@keyframes riffleL { 0%,100% { transform: translateX(0) rotate(0); } 30% { transform: translateX(-70px) rotate(-10deg); } 60% { transform: translateX(0) rotate(0); } }
@keyframes riffleR { 0%,100% { transform: translateX(0) rotate(0); } 30% { transform: translateX(70px) rotate(10deg); } 60% { transform: translateX(0) rotate(0); } }
.stack.shuffling .dos:nth-child(odd) { animation: riffleL .55s ease-in-out 3; }
.stack.shuffling .dos:nth-child(even) { animation: riffleR .55s ease-in-out 3; }
.stack .dos:nth-child(2) { transform: translate(2px, -2px); } .stack .dos:nth-child(3) { transform: translate(4px, -4px); } .stack .dos:nth-child(4) { transform: translate(6px, -6px); }

/* ---------- Yi Jing : pièces 3D, hexagramme construit, carte ---------- */
.coins3d { display: flex; gap: 22px; justify-content: center; padding: 64px 0 8px; }
.coin3d { width: 76px; height: 76px; perspective: 600px; }
@media (max-width: 480px) { .coin3d { width: 64px; height: 64px; } .coins3d { gap: 16px; } }
.coin3d .ci { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(var(--end, 0deg)); }
.coin3d.toss .ci { animation: toss 1.15s cubic-bezier(.25,.6,.3,1) both; animation-delay: var(--delay, 0ms); }
@keyframes toss { 0% { transform: translateY(0) rotateX(0) rotateY(0); } 40% { transform: translateY(-58px) rotateX(35deg) rotateY(calc(var(--end) * .5)); } 80% { transform: translateY(4px) rotateX(-6deg) rotateY(calc(var(--end) * .96)); } 100% { transform: translateY(0) rotateX(0) rotateY(var(--end)); } }
.coin3d .cf { position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: radial-gradient(circle at 34% 28%, #f6dea0 0%, #d3a650 40%, #9b7128 78%, #6f4f1a 100%); box-shadow: inset 0 0 0 3px rgba(80,52,14,.55), inset 0 0 0 8px rgba(255,236,180,.22), inset 0 0 0 9px rgba(80,52,14,.35), 0 4px 10px rgba(0,0,0,.4); }
.coin3d .cf::before { content: ""; position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; transform: translate(-50%, -50%); background: #4a3320; box-shadow: inset 0 0 0 2px rgba(255,230,170,.35); }
.coin3d .cf.pile { transform: rotateY(180deg); background: radial-gradient(circle at 34% 28%, #ecd08e 0%, #c1954a 45%, #8a6424 85%, #5e4316 100%); }
.coin3d .cf span { position: absolute; font-family: "Songti SC", "Noto Serif CJK SC", "SimSun", serif; font-size: 15px; color: #5a3b0c; font-weight: 700; text-shadow: 0 1px 0 rgba(255,240,200,.5); }
.coin3d .cf span:nth-child(1) { top: 12%; left: 50%; transform: translateX(-50%); } .coin3d .cf span:nth-child(2) { bottom: 12%; left: 50%; transform: translateX(-50%); }
.coin3d .cf span:nth-child(3) { left: 13%; top: 50%; transform: translateY(-50%); } .coin3d .cf span:nth-child(4) { right: 13%; top: 50%; transform: translateY(-50%); }
.coin3d .cf .v { position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); font: 700 .78rem var(--sans); color: #f3ead8; text-shadow: none; }
.coin-total { text-align: center; color: #f3ead8; min-height: 1.6em; font-size: .95rem; margin-top: 18px; }
.hexb { display: grid; gap: 9px; width: 150px; margin: 8px auto 4px; }
.hexb .hl { height: 14px; display: flex; gap: 14%; }
.hexb .hl i { flex: 1; background: #f3ead8; border-radius: 2px; transform-origin: 50% 50%; }
.hexb .hl.m i { background: #f3c86b; box-shadow: 0 0 10px rgba(243,200,107,.6); }
.hexb .hl.vide i { background: transparent; border: 1px dashed rgba(243,234,216,.3); }
.hexb .hl.new i { animation: grow .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes grow { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
.hexcards { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.hexcard { width: min(210px, 42vw); aspect-ratio: 3 / 4.2; cursor: pointer; }
.hexcard .fc-face { background: #f7f0e1; color: #2a2016; box-shadow: 0 8px 22px rgba(0,0,0,.35), inset 0 0 0 5px #f7f0e1, inset 0 0 0 6px #86582d, inset 0 0 0 8px #f7f0e1, inset 0 0 0 9px rgba(134,88,45,.45); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 14px; }
.hexcard .hk { font: 700 .62rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #86582d; margin-bottom: 8px; }
.hexcard .car { font-family: "Songti SC", "Noto Serif CJK SC", "SimSun", serif; font-size: 3.4rem; line-height: 1; margin: 6px 0; color: #2a2016; }
.hexcard .num { font-family: var(--serif); font-size: .9rem; color: #86582d; }
.hexcard .tit { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; line-height: 1.2; margin-top: 6px; }
.hexcard .nm { font-size: .78rem; color: #6d6252; margin-top: 3px; }
.hexcard .hex .l, .hexcard .hex .m { fill: #2a2016; } .hexcard .hex .m { fill: #b5762c; }
.sheet.reveal { max-width: 560px; text-align: center; background: #3d2a17; color: #f3ead8; }
.sheet.reveal h3 { color: #fff; }
.sheet.reveal .btn.ghost { color: #f3ead8; border-color: rgba(243,234,216,.4); }
[hidden] { display: none !important; }
.slots.petit .slotc { width: min(20vw, 104px); }
.ta-t { margin-top: 8px; padding-top: 6px; border-top: 1px dashed #d9cdb2; font-size: .74rem; color: #2f6b4f; font-style: italic; }

/* ---------- animaux : carte à retourner, grande carte ---------- */
.fc.tocome { cursor: pointer; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.fc.tocome:hover { transform: translateY(-5px); }
.fc.tocome::after { content: ''; position: absolute; inset: -5px; border-radius: 16px; border: 2px solid #f3d27a; opacity: 0; pointer-events: none; animation: tocome 2.4s ease-in-out infinite; }
@keyframes tocome { 0%, 100% { opacity: 0; transform: scale(.985); } 50% { opacity: .85; transform: scale(1); } }
.tf-bot.tf-call { letter-spacing: .08em; text-transform: uppercase; font: 700 .62rem/1.2 var(--sans); color: #2f6b4f; }
.fc.flipped .tf-call { visibility: hidden; }
.reveal-grid .fc.flipped { cursor: zoom-in; }
.reveal-grid .fc.flipped:hover .ta { box-shadow: 0 10px 26px rgba(0,0,0,.4), inset 0 0 0 1px #e6dfd0; }
html.noscroll, html.noscroll body { overflow: hidden; }
.bc-ov { position: fixed; inset: 0; z-index: 85; }
.bc-ov::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, rgba(30,74,53,.9), rgba(7,17,12,.95) 75%); opacity: 0; transition: opacity .45s ease; }
.bc-ov.on::before { opacity: 1; }
.bc { position: fixed; perspective: 2000px; container-type: inline-size; z-index: 2; will-change: left, top, width, height, transform; }
.bc .fc-in { transition: none; }
.bc .fc-face { border-radius: 16px; }
.bc .tf { padding: 6% 7% 5%; }
.bc .tf-txt { font-size: clamp(.95rem, 4.6cqw, 2.2rem); line-height: 1.25; }
.bc .tf-top { font-size: clamp(.62rem, 1.5cqw, .9rem); }
.bc .tf-top svg { width: clamp(16px, 2.6cqw, 26px); height: clamp(16px, 2.6cqw, 26px); }
.bc-a { display: flex; flex-direction: column; box-shadow: 0 30px 90px rgba(0,0,0,.6), inset 0 0 0 1px #e6dfd0; }
.bc-img { position: relative; flex: 1 1 auto; min-height: 0; padding: 16px; cursor: zoom-in; background: #fff; }
.bc-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bc-zoom { position: absolute; right: 10px; top: 10px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #e3dccb; background: rgba(255,255,255,.92); color: #2f6b4f; display: flex; align-items: center; justify-content: center; cursor: zoom-in; padding: 0; }
.bc-zoom svg { width: 20px; height: 20px; }
.bc-txt { flex: none; padding: 12px 20px 16px; border-top: 1px solid #efe8da; background: #fff; }
.bc-txt .ta-n { font-size: clamp(1.2rem, 3cqw, 1.9rem); margin-bottom: 4px; }
.bc-txt .ta-d { font-size: clamp(.92rem, 1.75cqw, 1.14rem); line-height: 1.45; }
.bc-txt .ta-t { font-size: clamp(.78rem, 1.35cqw, .95rem); margin-top: 10px; padding-top: 8px; }
.bc-top { position: fixed; left: 56px; right: 56px; top: 14px; text-align: center; color: #f3ead8; font: 700 .72rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; z-index: 2; opacity: 0; transition: opacity .3s; }
.bc-x { position: fixed; top: 8px; right: 10px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #f3ead8; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.bc-x:hover { background: rgba(255,255,255,.22); }
.bc-act { position: fixed; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 0 12px; z-index: 2; opacity: 0; transition: opacity .35s; pointer-events: none; }
.bc-ov.ready .bc-top, .bc-ov.ready .bc-act { opacity: 1; }
.bc-ov.ready .bc-act { pointer-events: auto; }
.bc-act .btn.ghost { color: #f3ead8; border-color: rgba(243,234,216,.45); background: transparent; }
.bc-act .btn.ghost:hover { background: rgba(255,255,255,.08); }
.bc-glow { position: fixed; z-index: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(243,210,122,.5), rgba(243,210,122,.16) 60%, transparent); opacity: 0; pointer-events: none; }
@media (max-width: 600px) { .bc-img { padding: 10px; } .bc-txt { padding: 10px 14px 12px; } .bc-zoom { width: 34px; height: 34px; right: 6px; top: 6px; } }
@media (prefers-reduced-motion: reduce) { .fc.tocome::after { animation: none; opacity: .6; } }
/* illustrations plus grandes dans les fiches */
.animal { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 700px) { .animal { grid-template-columns: 1fr; } }
.illus.big img { aspect-ratio: auto; max-height: 72vh; }
