:root {
  --tj-bg: #14101f;
  --tj-fg: #f7f1e6;
  --tj-muted: #cbb89a;
  --tj-accent: #e0c07a;
  --tj-card-w: 108px;
  --tj-card-h: 168px;
  --tj-radius: 10px;
}
body.tarot-jeu-page { background: var(--tj-bg); color: var(--tj-fg); margin: 0; }
body.tarot-jeu-page .preprod,
body.tarot-jeu-page .breadcrumb,
body.tarot-jeu-page .mobile-bottom-nav,
body.tarot-jeu-page .topbar .small { display: none !important; }
body.tarot-jeu-page .topbar { background: transparent; border: 0; padding: .2rem 0; }
body.tarot-jeu-page .logo .wordmark { color: var(--tj-fg); font-size: .9rem; }
body.tarot-jeu-page main { padding: 0; min-height: 100dvh; }
.tj-shell { max-width: 1040px; margin: 0 auto; padding: 0 10px 24px; }
.tj-title { margin: 0 0 4px; font-size: 1.15rem; font-weight: 600; text-align: center; font-family: Georgia, serif; }
.tj-toolbar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.tj-toolbar button, .tj-actions button {
  appearance: none; border: 1px solid rgba(224,192,122,.5); background: rgba(255,255,255,.05);
  color: var(--tj-fg); border-radius: 999px; padding: .55rem .9rem; font-size: 1rem;
  min-height: 48px; flex: 1 1 28%; cursor: pointer;
}
.tj-toolbar button[aria-pressed="true"], .tj-toolbar button.is-on {
  background: var(--tj-accent); color: #1a1424; border-color: var(--tj-accent); font-weight: 700;
}
.tj-question details {
  margin: 0 0 6px; border-radius: 12px; padding: .25rem .65rem;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
}
.tj-question summary { cursor: pointer; color: var(--tj-muted); font-size: .82rem; list-style: none; }
.tj-question summary::-webkit-details-marker { display: none; }
.tj-question textarea {
  width: 100%; margin-top: .35rem; min-height: 52px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12); background: #120e1c; color: var(--tj-fg);
  padding: .45rem; font: inherit; resize: vertical;
}
.tj-counter {
  text-align: center; font-weight: 700; letter-spacing: .04em;
  color: var(--tj-accent); font-size: 1rem; margin: 0 0 4px; min-height: 1.2em;
}
.tj-hint { text-align: center; color: var(--tj-muted); font-size: .78rem; margin: 0 0 4px; min-height: 1em; }
.tj-stage {
  position: relative; height: 300px; margin: 8px 0 10px;
  border-radius: 0; background: transparent; border: 0; box-shadow: none;
  overflow: visible; touch-action: manipulation;
}
.tj-fan { position: absolute; inset: 0; pointer-events: none; }
.tj-card {
  position: absolute;
  left: 50%; bottom: 8px;
  width: var(--tj-card-w); height: var(--tj-card-h);
  margin-left: calc(var(--tj-card-w) / -2);
  padding: 0; border: 0; background: transparent;
  cursor: pointer; pointer-events: auto;
  transform: translateX(var(--tx, 0px)) rotate(var(--r, 0deg));
  transform-origin: 50% 100%;
  transition: transform .28s ease, filter .2s;
  -webkit-tap-highlight-color: transparent;
  perspective: 900px;
}
.tj-card:focus-visible { outline: 2px solid var(--tj-accent); outline-offset: 3px; }
.tj-card .inner {
  display: block;
  width: 100%; height: 100%;
  position: relative;
  border-radius: var(--tj-radius);
  box-shadow: 0 12px 24px rgba(0,0,0,.5);
  transition: transform .5s ease;
  transform-style: preserve-3d;
}
.tj-card.is-flipped .inner { transform: rotateY(180deg); }
.tj-card .face {
  display: block;
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: var(--tj-radius);
  overflow: hidden; background: #2a1f3d;
  border: 2px solid #e0c07a;
  box-sizing: border-box;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.tj-card .face.back {
  background: #2a1f3d url("/assets/img/tarot/jeu/dos.webp") center/cover no-repeat;
}
.tj-card .face.front { transform: rotateY(180deg); background: #f7f1e6; }
.tj-card.is-reversed .face.front { transform: rotateY(180deg) rotate(180deg); }
.tj-card .face img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none;
}
.tj-card.is-lift {
  z-index: 80 !important;
  filter: drop-shadow(0 0 16px rgba(224,192,122,.7));
  transform: rotate(0deg) translateY(-40px) scale(1.1);
}
.tj-card.is-gone { visibility: hidden; pointer-events: none; }
.tj-card.is-dim { opacity: .28; pointer-events: none; }
.tj-card.flying { z-index: 90 !important; transition: transform .45s cubic-bezier(.2,.75,.2,1); pointer-events: none; }
.tj-slots { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 4px 0 8px; }
.tj-slot { width: calc(var(--tj-card-w) * .78); text-align: center; }
.tj-slot .slot-card {
  width: calc(var(--tj-card-w) * .78); height: calc(var(--tj-card-h) * .78);
  margin: 0 auto 4px; border-radius: 8px;
  background: transparent;
  border: 1px dashed rgba(224,192,122,.28);
  box-shadow: none;
}
.tj-slot .slot-card.is-rev { transform: rotate(180deg); }
.tj-slot .slot-card.is-filled {
  border-style: solid; border-color: #e0c07a;
  box-shadow: 0 0 0 2px #e0c07a, 0 8px 16px rgba(0,0,0,.45);
}
.tj-slot .slot-lab { font-size: .68rem; color: var(--tj-muted); line-height: 1.2; }
.tj-result {
  display: none; margin-top: 8px; padding: 14px; border-radius: 16px;
  background: #f7f1e6; color: #1a1424; border: 1px solid #e5d7b8;
}
.tj-result.is-on { display: block; }
.tj-triptyque {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 0 0 12px;
}
.tj-triptyque figure {
  margin: 0; width: 88px; text-align: center;
}
.tj-triptyque img {
  width: 88px; height: 138px; object-fit: cover; border-radius: 8px;
  border: 2px solid #c9b48a; background: #fff; display: block;
}
.tj-triptyque img.is-rev { transform: rotate(180deg); }
.tj-triptyque figcaption {
  font-size: .65rem; color: #5a4e6e; margin-top: 4px; line-height: 1.25;
}
.tj-enbref {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 12px;
  background: #1a1424; color: #f7f1e6;
}
.tj-enbref h2 {
  margin: 0 0 6px; font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; color: #e0c07a; font-family: system-ui, sans-serif; font-weight: 700;
}
.tj-enbref p { margin: 0; line-height: 1.5; font-size: .95rem; color: #f7f1e6; }
.tj-verdict-pill {
  display: inline-block; margin-top: 8px; padding: .2rem .55rem; border-radius: 999px;
  background: #e0c07a; color: #1a1424; font-size: .78rem; font-weight: 700;
}
.tj-card-block { margin: 0 0 8px; border-radius: 12px; border: 1px solid #e5d7b8; background: #fff; }
.tj-card-block summary {
  cursor: pointer; padding: 10px 12px; font-weight: 650; list-style: none;
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
}
.tj-card-block summary::-webkit-details-marker { display: none; }
.tj-card-block .tj-body {
  padding: 0 12px 12px; line-height: 1.55; font-size: .92rem; color: #2a2438; white-space: pre-wrap;
}
.tj-card-block .tj-pos { color: #7a6a50; font-size: .75rem; font-weight: 600; }
.tj-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tj-actions button { background: #1a1424; color: #f7f1e6; border-color: #1a1424; font-weight: 600; flex: 1; }
.tj-disclaimer {
  margin: 10px 0 0; font-size: .72rem; color: #6a5e78; line-height: 1.4;
}
.tj-rules { margin-top: 14px; color: var(--tj-muted); font-size: .78rem; }
.tj-rules summary { cursor: pointer; }
.tj-card.is-shuffling { animation: tj-riffle 1.6s ease-in-out; }
@keyframes tj-riffle {
  0% { transform: rotate(var(--r,0deg)); }
  25% { transform: rotate(calc(var(--r,0deg) - 10deg)) translateY(-14px); }
  50% { transform: rotate(calc(var(--r,0deg) + 12deg)) translateY(-4px); }
  75% { transform: rotate(calc(var(--r,0deg) - 6deg)) translateY(-18px); }
  100% { transform: rotate(var(--r,0deg)); }
}
@media (max-width: 390px) {
  :root { --tj-card-w: 68px; --tj-card-h: 106px; }
  .tj-stage { height: 250px; }
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.tj-actions button[data-partager]{
  background:#fff; color:#1a1424; border:1px solid #c9b48a; font-weight:600;
}
@media (prefers-reduced-motion: reduce){
  .tj-card, .tj-card .inner, .tj-card.is-shuffling, .tj-card.flying{
    animation:none!important; transition:none!important;
  }
}

/* cls stage */
.tj-stage{min-height:250px;background:transparent!important;border:0!important;box-shadow:none!important}
.tj-fan{min-height:200px}

/* a11y targets */
.tj-card{min-width:60px;min-height:94px}
.tj-toolbar button,.tj-modes button,[data-partager],[data-melanger],[data-nouveau]{
  min-width:48px;min-height:48px;padding:.55rem 1rem
}

/* lcp slots */
.tj-slots{display:flex;gap:.6rem;justify-content:center;min-height:150px}
.tj-slot{display:flex;flex-direction:column;align-items:center;gap:.25rem}
.slot-card{width:66px;height:102px;border-radius:8px;background:transparent;border:1px dashed rgba(224,192,122,.28);box-sizing:border-box}
.slot-card.is-empty{opacity:.4;background:transparent}
.tj-slot-label{font-size:1rem;color:#c9b8a0}

/* plateau décor (dégradé nuit tant que webp absent) */
.tj-stage::before{content:"";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(180deg,#4a3568,#1B1430 65%,#120c1c);opacity:.9;z-index:0;pointer-events:none}
.tj-fan,.tj-card{position:relative;z-index:1}
.tj-stage{background:transparent!important}
