/* ══════════════════════════════════════════════════════════════════════════
   synaxis-cristal.css — le CRISTAL SOURCE (27/10/2026), voir synaxis-cristal.js
   La capsule garde l'orfèvrerie du bouton du Dé (classes .pl-dice-btn / .pl-dice-txt) ;
   ici : son icône, la fenêtre de verre cosmique, la surface à frotter, la jauge et les trois cartes.
   Aucune animation infinie : seules des transitions, et rien de neuf dans #pl-board.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── capsule sous l'astrolabe ── */
.pl-cristal-ico { flex: none; display: grid; place-items: center; width: 58px; height: 58px; filter: drop-shadow(0 0 10px rgba(155, 107, 255, .55)); }
.pl-cristal-ico svg { display: block; width: 100%; height: 100%; }
.pl-cristal-core { transition: opacity .3s; opacity: .85; }
@media (hover: hover) { .pl-cristal-btn:hover .pl-cristal-core { opacity: 1; } }

/* ── fenêtre ── */
html.cs-open, html.cs-open body { overflow: hidden; }
.cs-veil {
  position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(80% 70% at 50% 40%, rgba(40, 18, 90, .55), rgba(3, 4, 14, .86));
  opacity: 0; transition: opacity .35s ease;
  overflow-y: auto; overscroll-behavior: contain;
}
.cs-veil[hidden] { display: none; }
.cs-veil.is-on { opacity: 1; }
.cs-dlg {
  --cs-c: 0;
  position: relative; width: min(100%, 760px); margin: auto; padding: 22px 22px 20px; border-radius: 26px;
  color: #f3eee4; font-family: 'Crimson Text', 'Crimson Fallback', Georgia, serif; text-align: center;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(155, 107, 255, .2), transparent 70%),
    linear-gradient(180deg, rgba(26, 20, 70, .92), rgba(8, 9, 30, .95));
  border: 1px solid rgba(232, 195, 106, .55);
  box-shadow: 0 0 0 1px rgba(232, 195, 106, .14) inset, 0 0 0 5px rgba(5, 6, 15, .5), 0 0 0 6px rgba(232, 195, 106, .22), 0 30px 80px rgba(0, 0, 0, .6), 0 0 60px rgba(123, 79, 214, .35);
}
.cs-close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  font: 18px/1 Georgia, serif; color: #e8c36a; background: rgba(11, 16, 48, .8); border: 1px solid rgba(232, 195, 106, .45);
}
@media (hover: hover) { .cs-close:hover { background: rgba(40, 30, 100, .9); color: #fff4d2; } }
.cs-eyebrow { margin: 0; font-family: 'Cinzel', 'Cinzel Fallback', Georgia, serif; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #b9bcd8; }
.cs-title {
  margin: 4px 0 6px; font-family: 'Cinzel', 'Cinzel Fallback', Georgia, serif; font-weight: 400; font-size: clamp(24px, 6vw, 34px); letter-spacing: .14em;
  background: linear-gradient(90deg, #e8c36a, #fff4d2 50%, #e8c36a); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cs-help { margin: 0 auto 10px; max-width: 520px; font-size: 15.5px; line-height: 1.4; color: #b9bcd8; font-style: italic; }

/* ── surface à frotter : seul endroit où le défilement tactile est bloqué ── */
.cs-stage {
  position: relative; width: min(100%, 360px); aspect-ratio: 1 / 1.08; margin: 0 auto; border-radius: 22px;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; cursor: grab;
  background: radial-gradient(60% 55% at 50% 45%, rgba(123, 79, 214, calc(.14 + var(--cs-c) * .26)), transparent 72%);
}
.cs-stage.is-rubbing { cursor: grabbing; }
.cs-stage:focus-visible { outline: 2px solid #7ff3e6; outline-offset: 4px; }
.cs-svg, .cs-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cs-canvas { opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.cs-dlg.is-3d .cs-canvas { opacity: 1; }
.cs-dlg.is-3d .cs-svg { opacity: 0; transition: opacity .6s ease; }
/* cristal SVG (repli) : l'éclat suit la charge */
.cs-s-halo { opacity: calc(.18 + var(--cs-c) * .7); }
.cs-s-grav { opacity: calc(.25 + var(--cs-c) * .75); filter: drop-shadow(0 0 3px #c9a6ff); }
.cs-s-core { opacity: calc(.3 + var(--cs-c) * .7); transform-box: fill-box; transform-origin: center; transform: scale(calc(.75 + var(--cs-c) * .45)); }
.cs-dlg.is-revealed .cs-s-core { opacity: 1; }
.cs-dlg.is-revealed .cs-s-grav { stroke: #fff1c8; }

/* fragments du repli SVG (la 3D a les siens) */
.cs-frags { position: absolute; inset: 0; pointer-events: none; container-type: size; }
.cs-frags i {
  position: absolute; left: 50%; top: 42%; width: 14px; height: 24px; margin: -12px 0 0 -7px; opacity: 0;
  background: var(--fh, #e8c36a); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  filter: drop-shadow(0 0 8px var(--fh, #e8c36a)); transition: transform 1.2s cubic-bezier(.22, .8, .24, 1), opacity .8s ease;
}
.cs-dlg.is-revealed:not(.is-3d) .cs-frags i { opacity: 1; }
.cs-dlg.is-revealed:not(.is-3d) .cs-frags i:nth-child(1) { transform: translate(-36cqw, -4cqw) rotate(-18deg); }
.cs-dlg.is-revealed:not(.is-3d) .cs-frags i:nth-child(2) { transform: translate(0, -24cqw); }
.cs-dlg.is-revealed:not(.is-3d) .cs-frags i:nth-child(3) { transform: translate(36cqw, -4cqw) rotate(18deg); }

/* ── jauge discrète ── */
.cs-gauge { position: relative; width: min(100%, 300px); height: 4px; margin: 12px auto 0; border-radius: 4px; background: rgba(232, 195, 106, .14); overflow: hidden; }
.cs-gauge i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #7b4fd6, #c9a6ff 55%, #e8c36a); transition: transform .12s linear; }
.cs-dlg.is-revealed .cs-gauge i { background: linear-gradient(90deg, #e8c36a, #fff4d2); }
.cs-status { min-height: 1.4em; margin: 8px 0 4px; font-size: 15px; color: #d9cdf5; }
.cs-hold {
  margin: 4px auto 0; min-height: 48px; padding: 10px 22px; border-radius: 999px; cursor: pointer;
  font: 15px/1.2 'Cinzel', 'Cinzel Fallback', Georgia, serif; letter-spacing: .06em; color: #f3eee4;
  background: linear-gradient(180deg, rgba(60, 36, 130, .9), rgba(20, 14, 60, .95)); border: 1px solid rgba(232, 195, 106, .55);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.cs-hold.is-holding { border-color: #e8c36a; box-shadow: 0 0 22px rgba(232, 195, 106, .35); }
.cs-hold:focus-visible, .cs-close:focus-visible, .cs-go:focus-visible, .cs-cta:focus-visible, .cs-ghost:focus-visible { outline: 2px solid #7ff3e6; outline-offset: 3px; }
.cs-rv-title:focus { outline: none; }   /* titre atteint par le script (annonce), pas une commande */
.cs-hold[hidden] { display: none; }

/* ── révélation : trois cartes serties ── */
.cs-reveal { margin-top: 14px; text-align: left; }
.cs-reveal[hidden] { display: none; }
.cs-rv-title { margin: 0; text-align: center; font-family: 'Cinzel', 'Cinzel Fallback', Georgia, serif; font-weight: 400; font-size: 20px; letter-spacing: .1em; color: #fff4d2; }
.cs-rv-sub { margin: 4px auto 12px; max-width: 560px; text-align: center; font-size: 14.5px; font-style: italic; color: #b9bcd8; }
.cs-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cs-card {
  --hue: #e8c36a;
  position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 14px 12px; border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--hue) 16%, rgba(16, 14, 50, .92)), rgba(9, 10, 32, .94));
  border: 1px solid color-mix(in srgb, var(--hue) 60%, rgba(232, 195, 106, .5));
  box-shadow: 0 0 0 1px rgba(232, 195, 106, .12) inset, 0 0 0 3px rgba(5, 6, 15, .5), 0 0 0 4px color-mix(in srgb, var(--hue) 35%, transparent), 0 0 26px color-mix(in srgb, var(--hue) 22%, transparent);
}
.cs-card-h { display: flex; align-items: center; gap: 8px; }
.cs-card-ico { flex: none; width: 28px; height: 28px; color: var(--hue); filter: drop-shadow(0 0 6px var(--hue)); }
.cs-card-ico svg { width: 100%; height: 100%; display: block; }
.cs-voie { margin: 0; font-family: 'Cinzel', 'Cinzel Fallback', Georgia, serif; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #b9bcd8; }
.cs-voie b { color: var(--hue); font-weight: 400; }
.cs-dim { margin: 2px 0 0; font-family: 'Cinzel', 'Cinzel Fallback', Georgia, serif; font-size: 12px; letter-spacing: .1em; color: var(--hue); }
.cs-card-t { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 600; color: #f3eee4; }
.cs-obs { margin: 0; font-size: 14.5px; line-height: 1.35; color: #d9d4ec; }
.cs-obs b { font-weight: 600; color: #fff4d2; }
.cs-act { margin: 0; font-size: 14.5px; line-height: 1.35; color: #b9bcd8; font-style: italic; }
.cs-go {
  margin-top: auto; align-self: flex-start; min-height: 44px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  font: 13.5px/1.2 'Cinzel', 'Cinzel Fallback', Georgia, serif; letter-spacing: .05em; color: #1a1405;
  background: linear-gradient(180deg, #fff1c8, #e8c36a); border: 1px solid #fff4d2;
}
@media (hover: hover) { .cs-go:hover { box-shadow: 0 0 18px color-mix(in srgb, var(--hue) 55%, transparent); } }
.cs-avail { font-size: 12.5px; color: #8287ad; }
.cs-empty { grid-column: 1 / -1; text-align: center; color: #b9bcd8; }
.cs-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.cs-cta, .cs-ghost { min-height: 44px; padding: 8px 18px; border-radius: 999px; cursor: pointer; font: 14.5px/1.2 'Cinzel', 'Cinzel Fallback', Georgia, serif; letter-spacing: .05em; }
.cs-cta { color: #1a1405; background: linear-gradient(180deg, #fff1c8, #e8c36a); border: 1px solid #fff4d2; }
.cs-ghost { color: #f3eee4; background: rgba(11, 16, 48, .7); border: 1px solid rgba(232, 195, 106, .45); }
@media (hover: hover) { .cs-ghost:hover { border-color: #e8c36a; } .cs-cta:hover { box-shadow: 0 0 18px rgba(232, 195, 106, .45); } }

/* ── téléphone ── */
@media (max-width: 640px) {
  .cs-veil { padding: 10px; place-items: start center; }
  .cs-dlg { padding: 18px 14px 16px; border-radius: 22px; }
  .cs-help { font-size: 14.5px; }
  .cs-stage { width: min(100%, 300px); }
  .cs-cards { grid-template-columns: 1fr; }
  .cs-dlg.is-revealed .cs-stage { width: min(62%, 200px); }
  .pl-cristal-ico { width: 50px; height: 50px; }
}

/* ── mouvement réduit : aucune transition de déplacement, la charge reste lisible ── */
html.pl-reduced .cs-veil, html.pl-reduced .cs-canvas, html.pl-reduced .cs-svg, html.pl-reduced .cs-frags i, html.pl-reduced .cs-gauge i { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .cs-veil, .cs-canvas, .cs-svg, .cs-frags i, .cs-gauge i { transition: none !important; }
}
