/* Reliquaires (reliquaires.js) : l'autel du Reliquaire ouvert, la Faveur, le contenu, et la scène d'ouverture
   (châsse qui tremble et s'ouvre, bande qui défile sous un repère, carte qui se retourne). Préfixe rq-.
   Tout ce qui bouge passe par transform et opacity. */

/* ——— Couleurs de chaque Reliquaire ——— */
[data-reliq="premier-serment"] { --m1: #FFFDF6; --m2: #EAE0CA; --m3: #B4A586; --t1: #FFF2BE; --t2: #DDA93E; --t3: #8A5E16; --gemme: #C8283E; --lueur: #FFE7A8; --fond: #2A2216; --ban1: #F2EBDD; --ban2: #B9AE98; }
[data-reliq="cendres"] { --m1: #554A44; --m2: #2C2422; --m3: #120C0A; --t1: #9A7A5A; --t2: #5E4232; --t3: #2A1A10; --gemme: #FF6A1A; --lueur: #FF8A30; --fond: #2A1006; --ban1: #3A2620; --ban2: #1A0E0A; }
[data-reliq="aile"] { --m1: #34181A; --m2: #160A0C; --m3: #050203; --t1: #E2563A; --t2: #921E14; --t3: #3A0806; --gemme: #FF3A1E; --lueur: #FF4A2A; --fond: #2A0606; --ban1: #7A1410; --ban2: #2A0404; }
[data-reliq="parjure"] { --m1: #6A4690; --m2: #321C46; --m3: #120818; --t1: #E2CCF6; --t2: #9E7EBE; --t3: #4A2A68; --gemme: #C07BFF; --lueur: #C07BFF; --fond: #1E0A2A; --ban1: #3A1E52; --ban2: #140820; }

/* ——— La châsse : image fixe (rendue d'avance), remplacée par la 3D (reliquaire3d.js) dès qu'elle est prête ——— */
.rq-scene3d { position: relative; display: block; width: 100%; aspect-ratio: 1; isolation: isolate; }
.rq-figure { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; -webkit-user-select: none; transition: opacity .5s ease-out; }
.rq-scene3d > .rq-figure { position: absolute; inset: 0; height: 100%; object-fit: contain; }
.rq-scene3d.rq3d-actif > .rq-figure { opacity: 0; }
.rq3d { position: absolute; inset: 0; animation: bq-fondu .5s ease-out both; }
.rq3d canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; -webkit-tap-highlight-color: transparent; }
.rq3d canvas:active { cursor: grabbing; }
.rq-chasse--voile { filter: grayscale(.55) brightness(.5) contrast(1.1); }
/* Secours sans 3D : l'image tremble, puis la lumière jaillit */
.rq-scene3d.tremble .rq-figure { animation: rq-tremble .5s linear 2; }
@keyframes rq-tremble {
  0%, 100% { transform: translate(0, 0) rotate(0deg); } 10% { transform: translate(-3px, 1px) rotate(-2deg); } 20% { transform: translate(3px, -1px) rotate(2deg); }
  30% { transform: translate(-4px, 0) rotate(-3deg); } 40% { transform: translate(4px, 1px) rotate(3deg); } 50% { transform: translate(-3px, -2px) rotate(-2deg); }
  60% { transform: translate(3px, 1px) rotate(2deg); } 70% { transform: translate(-2px, 0) rotate(-1deg); } 80% { transform: translate(2px, -1px) rotate(1deg); } 90% { transform: translate(-1px, 0); }
}
.rq-scene3d::after { content: ""; position: absolute; left: 10%; right: 10%; top: -10%; bottom: 35%; z-index: 1; pointer-events: none; opacity: 0; transform: scaleY(.3); transform-origin: 50% 100%;
  background: radial-gradient(ellipse 30% 60% at 50% 100%, #FFFFFF, transparent 70%), radial-gradient(ellipse 50% 80% at 50% 100%, var(--lumiere, var(--lueur)), transparent 75%); mix-blend-mode: screen; }
.rq-scene3d.ouverte:not(.rq3d-actif)::after { opacity: 1; transform: scaleY(1); transition: opacity .4s ease-out, transform .6s cubic-bezier(.2, .8, .3, 1); }
.rq-scene3d.ouverte:not(.rq3d-actif) .rq-figure { filter: brightness(1.25) drop-shadow(0 0 24px var(--lumiere, var(--lueur))); }

/* ——— L'autel : le Reliquaire ouvert, dans sa niche de pierre ——— */
.rq-autel {
  position: relative; display: grid; gap: 4px 24px; overflow: hidden; isolation: isolate; padding: 8px 14px 18px; margin: 0 -4px;
  border: 1px solid color-mix(in srgb, var(--t2) 55%, #000);
  /* Le mur : des assises de pierre (joints), la lueur des cierges en bas, celle du Reliquaire au centre */
  background:
    radial-gradient(ellipse 60% 34% at 50% 36%, color-mix(in srgb, var(--lueur) 20%, transparent), transparent 72%),
    radial-gradient(ellipse 90% 30% at 50% 62%, rgba(255, 150, 70, .10), transparent 70%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .55) 0 2px, transparent 2px 46px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .4) 0 2px, transparent 2px 92px),
    radial-gradient(ellipse 120% 80% at 50% 40%, #2A2124, #120C0E 70%, #070405);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .7), inset 0 0 0 4px color-mix(in srgb, var(--t3) 40%, transparent), inset 0 0 90px rgba(0, 0, 0, .85), 0 0 40px color-mix(in srgb, var(--lueur) 12%, transparent);
}
.rq-autel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hachures); opacity: .22; }
.rq-autel-scene { position: relative; width: min(100%, 420px); aspect-ratio: 1; justify-self: center; margin-top: -2px; }
.rq-autel-scene > .rq-scene3d { position: absolute; inset: 0; z-index: 2; aspect-ratio: auto; }
/* Le pied de l'autel se perd dans l'ombre */
.rq-scene3d > .rq-figure, .rq3d canvas { -webkit-mask: linear-gradient(180deg, #000 72%, transparent 98%); mask: linear-gradient(180deg, #000 72%, transparent 98%); }
/* La niche voûtée derrière le coffre */
.rq-voute {
  position: absolute; left: 17%; right: 17%; top: 3%; bottom: 30%; z-index: 0; border-radius: 50% 50% 4px 4px / 34% 34% 4px 4px;
  background: radial-gradient(ellipse 60% 50% at 50% 70%, color-mix(in srgb, var(--lueur) 22%, transparent), transparent 75%), linear-gradient(180deg, #0A0607, #171012);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t2) 45%, transparent), inset 0 0 0 5px rgba(0, 0, 0, .5), inset 0 0 0 6px color-mix(in srgb, var(--t3) 50%, transparent), inset 0 18px 40px rgba(0, 0, 0, .9);
}
/* Les bannières, de part et d'autre */
.rq-banniere {
  position: absolute; top: 0; z-index: 1; width: 15%; height: 58%; display: grid; justify-items: center; align-content: start; padding-top: 22%;
  background: linear-gradient(90deg, rgba(0, 0, 0, .35), transparent 30%, transparent 70%, rgba(0, 0, 0, .45)), linear-gradient(180deg, var(--ban1), var(--ban2));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--t2) 70%, transparent), inset 0 0 0 4px rgba(0, 0, 0, .35);
  transform-origin: 50% 0; animation: rq-flotte-ban 7s ease-in-out infinite;
}
.rq-banniere--g { left: 1.5%; } .rq-banniere--d { right: 1.5%; animation-delay: -3.5s; }
.rq-banniere svg { width: 70%; height: auto; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .8)); }
.rq-banniere::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(180deg, var(--t1), var(--t3)); }
@keyframes rq-flotte-ban { 0%, 100% { transform: rotate(-1deg) skewX(.6deg); } 50% { transform: rotate(1deg) skewX(-.6deg); } }
/* Cendres : une bannière roussie, au bord rongé qui braise */
[data-reliq="cendres"] .rq-banniere { clip-path: polygon(0 0, 100% 0, 100% 78%, 88% 84%, 80% 76%, 66% 90%, 52% 80%, 40% 94%, 28% 82%, 16% 88%, 0 76%); }
[data-reliq="cendres"] .rq-banniere::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(0deg, rgba(255, 110, 30, .55), transparent); animation: rq-braise 1.8s ease-in-out infinite alternate; }
@keyframes rq-braise { from { opacity: .45; } to { opacity: 1; } }
/* Parjure : des chaînes pendent à la place des bannières */
.rq-chaine {
  position: absolute; top: 0; z-index: 1; width: 14px; height: 64%;
  background: radial-gradient(ellipse 5px 8px at 50% 50%, transparent 52%, #9C94A8 58%, #4A4256 74%, transparent 80%) 0 0 / 14px 17px repeat-y,
    radial-gradient(ellipse 2px 8px at 50% 0, #6E667A 60%, transparent 70%) 0 8px / 14px 17px repeat-y;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .8)); transform-origin: 50% 0; animation: rq-flotte-ban 6s ease-in-out infinite;
}
.rq-chaine--g { left: 9%; } .rq-chaine--d { right: 9%; height: 52%; animation-delay: -2s; }
.rq-chaine::after { content: ""; position: absolute; left: 50%; bottom: -14px; width: 26px; height: 22px; margin-left: -13px; border-radius: 3px 3px 6px 6px; background: linear-gradient(180deg, #8C8496, #3A3244); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.rq-toucher { position: absolute; left: 0; right: 0; bottom: 1%; z-index: 3; margin: 0; text-align: center; font: italic 500 .85rem/1 var(--titre); color: var(--encre-att); opacity: 0; transition: opacity .6s .8s; pointer-events: none; }
.rq-scene3d.rq3d-actif ~ .rq-toucher { opacity: .75; }

.rq-autel-texte { display: grid; gap: 10px; text-align: center; justify-items: center; }
.rq-sur { margin: 0; font: 500 .74rem/1 var(--titre); letter-spacing: .22em; text-transform: uppercase; color: color-mix(in srgb, var(--lueur) 70%, var(--encre-att)); }
.rq-autel h2 {
  font: 600 clamp(1.6rem, 6.4vw, 2.3rem)/1.05 var(--titre); color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(100deg, var(--lueur), var(--t1) 45%, #FFFFFF 50%, var(--t1) 55%, var(--lueur)); background-size: 250% 100%;
  animation: reflet-cine 5s ease-in-out 1s infinite alternate; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .8));
}
/* Le récit, gravé sur une plaque enluminée */
.rq-plaque {
  position: relative; max-width: 46ch; padding: 14px 18px 13px; text-align: left;
  border: 1px solid color-mix(in srgb, var(--t2) 70%, #000);
  background: radial-gradient(ellipse 90% 70% at 50% 0%, color-mix(in srgb, var(--lueur) 9%, transparent), transparent 70%), linear-gradient(180deg, #1C1316, #0D0809);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .45), inset 0 0 0 5px color-mix(in srgb, var(--t2) 35%, transparent), 0 8px 24px rgba(0, 0, 0, .6);
}
.rq-plaque::before, .rq-plaque::after { content: ""; position: absolute; top: -5px; width: 9px; height: 9px; rotate: 45deg; background: linear-gradient(135deg, var(--t1), var(--t3)); box-shadow: 0 0 6px color-mix(in srgb, var(--lueur) 60%, transparent); }
.rq-plaque::before { left: -5px; } .rq-plaque::after { right: -5px; }
.rq-lore { margin: 0; max-width: 46ch; font: italic 500 1.05rem/1.45 var(--titre); color: var(--encre); text-wrap: pretty; }
.rq-plaque .rq-lore::first-letter {
  float: left; margin: 2px 8px 0 0; padding: 0 6px; font: 400 2.6em/1 var(--etiquette); font-style: normal; color: var(--t1);
  background: linear-gradient(180deg, color-mix(in srgb, var(--ban1) 80%, #000), color-mix(in srgb, var(--ban2) 90%, #000)); border: 1px solid color-mix(in srgb, var(--t2) 70%, transparent);
  text-shadow: 0 0 10px color-mix(in srgb, var(--lueur) 70%, transparent);
}
.rq-compte { margin: 2px 0 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--filet); background: rgba(5, 3, 4, .6); font: 500 .95rem/1 var(--titre); color: var(--encre-att); }
.rq-compte b { color: var(--encre); font-weight: 600; }
.rq-sablier { width: 10px; height: 14px; background: linear-gradient(180deg, var(--t1) 0 30%, transparent 30% 70%, var(--t2) 70%); clip-path: polygon(0 0, 100% 0, 55% 50%, 100% 100%, 0 100%, 45% 50%); }
@media (min-width: 720px) {
  .rq-autel { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); align-items: center; padding: 18px 28px; margin: 0; }
  .rq-autel-scene { width: 100%; }
  .rq-autel-texte { text-align: left; justify-items: start; }
}

/* Payer en Or ou en Serments, puis ×1 / ×10 */
.rq-monnaie { display: inline-grid; grid-template-columns: 1fr 1fr; margin-top: 8px; border: 1px solid var(--filet); background: rgba(5, 3, 4, .6); }
.rq-monnaie button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 0; background: none; color: var(--encre-att); font: 600 1rem/1 var(--titre); }
.rq-monnaie button[aria-checked="true"] { background: var(--surface-2); color: var(--serment); box-shadow: inset 0 -2px 0 var(--serment); }
.rq-monnaie .pf-piece, .rq-monnaie .pf-serment { width: 18px; height: 18px; }
.rq-ouvrirs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 420px; }
.rq-ouvrir-case { display: grid; gap: 4px; }
.rq-ouvrir {
  position: relative; overflow: hidden; display: grid; justify-items: center; gap: 4px; min-height: 64px; padding: 8px 10px;
  border: 1px solid #F6E7BE; border-radius: 2px; color: #1A0F0A; background: linear-gradient(180deg, #F8ECC8, #D9BC7C);
  box-shadow: 0 0 26px color-mix(in srgb, var(--lueur) 35%, transparent), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .15s ease-out;
}
.rq-ouvrir--dix { background: linear-gradient(180deg, #FFF3C4, #E9B850); }
.rq-ouvrir::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .7) 50%, transparent 65%) 0 0 / 250% 100% no-repeat; animation: pf-lustre 3.6s ease-in-out 1s infinite; }
.rq-ouvrir:not(:disabled):active { transform: scale(.97); }
.rq-ouvrir:disabled { background: rgba(11, 8, 9, .6); color: var(--encre-att); border-color: var(--filet); box-shadow: none; cursor: not-allowed; }
.rq-ouvrir:disabled::after { display: none; }
.rq-ouvrir-nom { font: 400 1.02rem/1 var(--etiquette); letter-spacing: .1em; text-transform: uppercase; }
.rq-ouvrir-prix { display: inline-flex; align-items: center; gap: 5px; font: 600 1.15rem/1 var(--titre); }
.rq-ouvrir-prix .pf-piece, .rq-ouvrir-prix .pf-serment { width: 18px; height: 18px; }
.rq-manque { margin: 0; text-align: center; font-size: .78rem; color: var(--encre-att); }
.rq-invite { display: grid; gap: 10px; justify-items: center; max-width: 420px; margin-top: 6px; padding: 12px; border: 1px dashed color-mix(in srgb, var(--t2) 60%, transparent); }
.rq-invite p { margin: 0; font-size: .92rem; line-height: 1.45; color: var(--encre); }
@media (min-width: 720px) { .rq-invite { justify-items: start; } }

/* ——— La Faveur ——— */
.rq-faveurs { display: grid; gap: 10px; margin: 16px 0 0; padding: 14px; border: 1px solid var(--filet); background: rgba(16, 10, 12, .8); }
.rq-faveurs h3 { font: 600 1.25rem/1 var(--titre); color: var(--serment); }
.rq-faveur { display: grid; gap: 6px; }
.rq-faveur p { margin: 0; font-size: .95rem; color: var(--encre); }
.rq-faveur b { font: 600 1.15rem/1 var(--titre); color: var(--rar); }
.rq-faveur-barre { position: relative; display: block; height: 8px; border-radius: 4px; background: rgba(5, 3, 4, .9); box-shadow: inset 0 0 0 1px var(--filet); overflow: hidden; }
.rq-faveur-barre > span { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--v, 0)); background: linear-gradient(90deg, color-mix(in srgb, var(--rar) 50%, #000), var(--rar)); box-shadow: 0 0 10px var(--rar); }
.rq-note { margin: 0; font-size: .8rem; color: var(--encre-att); }
@media (min-width: 720px) { .rq-faveurs { grid-template-columns: auto 1fr 1fr; align-items: center; gap: 10px 22px; } .rq-faveurs .rq-note { grid-column: 1 / -1; } }

.rq-regles { margin: 14px 0 0; display: grid; gap: 6px; font-size: .88rem; line-height: 1.45; color: var(--encre-att); }
.rq-regles p { margin: 0; } .rq-regles b { color: var(--encre); font-weight: 600; }

/* ——— Le contenu ——— */
.rq-titre-contenu { margin: 26px 0 10px; font: 600 1.45rem/1.1 var(--titre); color: var(--encre); }
.rq-groupe { margin-bottom: 18px; }
.rq-groupe h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 8px; font: 400 1rem/1.1 var(--etiquette); color: var(--rar); }
.rq-groupe-chance { font: italic 500 .92rem/1 var(--titre); color: var(--encre-att); }
.rq-contenu { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 720px) { .rq-contenu { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; } }
@media (min-width: 980px) { .rq-contenu { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.rq-objet {
  position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; padding: 0 4px 8px; min-width: 0; text-align: center;
  border: 1px solid color-mix(in srgb, var(--rar) 30%, var(--filet)); background: linear-gradient(180deg, color-mix(in srgb, var(--rar) 10%, #150E10), #0E090B);
}
.rq-objet::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rar); box-shadow: 0 0 10px var(--rar); }
.rq-objet.rar-legendaire { box-shadow: 0 0 18px rgba(242, 196, 107, .18); }
.rq-objet-scene { display: grid; place-items: center; width: 100%; height: 108px; overflow: hidden; background: radial-gradient(ellipse 70% 60% at 50% 0%, color-mix(in srgb, var(--rar) 26%, transparent), transparent 75%); }
.rq-objet-nom { font: 600 .95rem/1.1 var(--titre); color: var(--encre); overflow-wrap: anywhere; }
.rq-objet-type { font-size: .72rem; color: var(--encre-att); }
.rq-exclu { position: absolute; top: 4px; left: 4px; padding: 2px 5px; font: 400 .62rem/1 var(--etiquette); letter-spacing: .06em; color: #1A0F0A; background: var(--t1, #F0D9A0); }
.rq-possede { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; color: var(--serment); }
.rq-possede .bq-coche { width: 9px; height: 5px; }

/* Le suivant, voilé */
.rq-suivant { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; margin: 20px 0 6px; padding: 12px; border: 1px solid var(--filet); background: rgba(10, 6, 8, .8); }
.rq-suivant h3 { margin: 4px 0; font: 600 1.2rem/1.1 var(--titre); color: var(--encre-att); }
.rq-suivant .rq-lore { font-size: .9rem; color: var(--encre-att); }
.rq-charge { text-align: center; padding: 40px 0; }

/* ——— Vignettes (vignettes.js) ——— */
.vg { display: inline-grid; place-items: center; line-height: 0; }
.vg-des { display: inline-flex; align-items: flex-end; gap: calc(var(--t) * .18); }
.vg-des .de6 { --taille: var(--t); }
.vg-des .de6:nth-child(2) { translate: 0 calc(var(--t) * -.3); rotate: 8deg; }
.vg-ban { position: relative; display: block; width: calc(var(--h) * .64); height: var(--h); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.vg-ban::before { content: ""; position: absolute; left: -8%; right: -8%; top: -3px; height: 4px; z-index: 2; border-radius: 2px; background: linear-gradient(180deg, #F0D9A0, #8A5E16); }

/* ——— La scène d'ouverture ——— */
.rq-scene {
  position: fixed; inset: 0; z-index: 86; display: grid; grid-template-rows: auto auto 1fr auto auto; justify-items: center; align-content: start; gap: 6px;
  padding: max(14px, env(safe-area-inset-top)) 0 max(16px, env(safe-area-inset-bottom)); overflow-y: auto; overflow-x: hidden;
  background: #070405; animation: bq-fondu .3s ease-out both;
}
.rq-scene.sortie { animation: bq-fondu .25s ease-in reverse both; }
.rq-scene-fond { position: fixed; inset: 0; z-index: -1; background: radial-gradient(ellipse 70% 50% at 50% 30%, color-mix(in srgb, var(--lueur) 26%, transparent), transparent 70%), radial-gradient(ellipse 100% 60% at 50% 100%, var(--fond), transparent 75%); }
.rq-scene-fond::after { content: ""; position: absolute; inset: 0; background: var(--hachures); opacity: .3; }
.rq-scene-titre { margin: 4px 16px 0; text-align: center; font: 500 .78rem/1.2 var(--titre); letter-spacing: .22em; text-transform: uppercase; color: color-mix(in srgb, var(--lueur) 70%, var(--encre-att)); }
.rq-scene-chasse { width: min(86vw, 360px, 46vh); transition: width .6s cubic-bezier(.2, .8, .3, 1), opacity .4s; }
.rq-scene.roule .rq-scene-chasse, .rq-scene.revele .rq-scene-chasse { width: min(40vw, 160px); }
.rq-scene.revele .rq-scene-chasse { opacity: .75; }
.rq-scene-jeu { width: 100%; display: grid; justify-items: center; align-content: start; }
.rq-annonce { margin: 4px 16px 0; min-height: 1.3em; text-align: center; font: italic 600 1.1rem/1.3 var(--titre); color: var(--encre); }
.rq-annonce b { color: var(--serment); font-style: normal; }
.rq-annonce .pf-piece { width: 16px; height: 16px; }
.rq-scene-actions { display: grid; gap: 8px; width: min(calc(100% - 32px), 380px); }
.rq-scene-actions .bouton { min-height: 50px; }

/* La bande */
.rq-bande {
  --w: 112px;
  position: relative; width: 100%; max-width: 980px; height: 178px; overflow: hidden; margin-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--t2) 60%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--t2) 60%, transparent);
  background: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(20, 12, 14, .9) 50%, rgba(0, 0, 0, .6));
  -webkit-mask: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  cursor: pointer;
}
@media (min-width: 720px) { .rq-bande { --w: 132px; height: 200px; } }
.rq-piste { position: absolute; left: 0; top: 12px; bottom: 12px; display: flex; gap: 8px; will-change: transform; }
/* Pendant le défilement, les skins ne bougent pas (iPhone : on économise) */
.rq-piste * { animation-play-state: paused !important; }
.rq-repere { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; z-index: 3; background: linear-gradient(180deg, #FFF3C4, #F2C46B 50%, #FFF3C4); box-shadow: 0 0 10px #F2C46B, 0 0 22px rgba(242, 196, 107, .6); }
.rq-repere::before, .rq-repere::after { content: ""; position: absolute; left: 50%; width: 0; height: 0; margin-left: -8px; border-left: 8px solid transparent; border-right: 8px solid transparent; }
.rq-repere::before { top: 0; border-top: 11px solid #F2C46B; } .rq-repere::after { bottom: 0; border-bottom: 11px solid #F2C46B; }

.rq-carte {
  position: relative; flex: none; width: var(--w, 112px); display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: 4px; padding: 4px 4px 9px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rar) 45%, transparent);
  background: radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--rar) 32%, transparent), transparent 75%), linear-gradient(180deg, #1E1416, #0C0809);
}
.rq-carte::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--rar); box-shadow: 0 0 12px var(--rar); }
.rq-carte-scene { display: grid; place-items: center; width: 100%; min-height: 0; overflow: hidden; }
.rq-carte-nom { width: 100%; font: 600 .82rem/1.1 var(--titre); color: var(--encre); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-bande.arretee .rq-carte:not(.gagne) { opacity: .35; transition: opacity .5s; }
.rq-carte.gagne { animation: rq-gagne .8s cubic-bezier(.2, 1.6, .4, 1) both; box-shadow: 0 0 0 2px var(--rar), 0 0 30px var(--rar); z-index: 2; }
@keyframes rq-gagne { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1.06); } }

/* La carte qui se retourne */
.rq-revelation { perspective: 900px; width: min(calc(100% - 32px), 340px); margin-top: 8px; }
.rq-tourne { position: relative; display: grid; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, 1.3, .4, 1); }
.rq-tourne.retournee { transform: rotateY(180deg); }
.rq-face { grid-area: 1 / 1; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.rq-face--dos {
  display: grid; place-items: center; min-height: 100%;
  border: 1px solid color-mix(in srgb, var(--t2) 70%, transparent); background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .03) 0 6px, transparent 6px 12px), linear-gradient(180deg, var(--m2, #2A2024), var(--m3, #0C0809));
}
.rq-sceau-dos { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, var(--t1), var(--t2) 50%, var(--t3)); box-shadow: 0 0 0 3px rgba(0, 0, 0, .4), 0 0 24px color-mix(in srgb, var(--lueur) 60%, transparent); }
.rq-face--avant {
  transform: rotateY(180deg); display: grid; justify-items: center; gap: 6px; padding: 14px 14px 16px; text-align: center;
  border: 1px solid color-mix(in srgb, var(--rar) 70%, transparent);
  background: radial-gradient(ellipse 80% 55% at 50% 0%, color-mix(in srgb, var(--rar) 34%, transparent), transparent 72%), linear-gradient(180deg, #221618, #0E090B);
  box-shadow: 0 0 40px color-mix(in srgb, var(--rar) 30%, transparent), 0 30px 60px rgba(0, 0, 0, .7);
}
.rq-revele-scene { display: grid; place-items: center; min-height: 170px; padding-top: 14px; }
@media (min-width: 720px) { .rq-revele-scene { min-height: 214px; } }
.rq-revele-rarete { margin: 0; display: inline-flex; align-items: center; gap: 6px; font: 400 .86rem/1.2 var(--etiquette); color: var(--rar); }
.rq-face--avant h2 { font: 600 1.8rem/1.1 var(--titre); color: var(--encre); }
.rar-legendaire .rq-face--avant h2 { color: transparent; -webkit-background-clip: text; background-clip: text; background-image: linear-gradient(100deg, #E9C066, #FFF3C4 50%, #E9C066); }
.rq-revele-verdict { margin: 0; }
.rq-nouveau { display: inline-block; padding: 4px 12px; font: italic 600 1.3rem/1 var(--titre); color: #1A0F0A; background: linear-gradient(180deg, #FFF3C4, #E9B850); box-shadow: 0 0 20px rgba(242, 196, 107, .6); animation: rq-tampon .5s cubic-bezier(.2, 1.8, .4, 1) .55s both; }
.rq-doublon { display: inline-flex; align-items: center; gap: 5px; font: 600 1.1rem/1 var(--titre); color: #F6D894; }
.rq-doublon .pf-piece { width: 18px; height: 18px; }
@keyframes rq-tampon { from { opacity: 0; transform: scale(2.2) rotate(-8deg); } to { opacity: 1; transform: rotate(-3deg); } }

/* ×10 : la grille */
.rq-dix { list-style: none; margin: 8px 0 0; padding: 0 12px; width: 100%; max-width: 760px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .rq-dix { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.rq-dix-case { perspective: 600px; animation: rq-donne .35s cubic-bezier(.2, .8, .3, 1) calc(var(--n) * 40ms) both; }
.rq-dix-case:last-child:nth-child(3n+1) { grid-column: 2; }
@media (min-width: 560px) { .rq-dix-case:last-child:nth-child(3n+1) { grid-column: auto; } }
@keyframes rq-donne { from { opacity: 0; transform: translateY(20px) scale(.9); } }
.rq-dix .rq-tourne { transition-duration: .55s; }
.rq-dix .rq-face--dos { min-height: 132px; }
.rq-dix .rq-face--avant { padding: 0; border: 0; background: none; box-shadow: none; gap: 2px; }
.rq-dix .rq-carte { --w: 100%; height: 118px; }
.rq-dix-case.vue.rar-legendaire .rq-carte, .rq-dix-case.vue.rar-epique .rq-carte { box-shadow: 0 0 0 1px var(--rar), 0 0 22px var(--rar); }
.rq-dix-verdict { display: inline-flex; align-items: center; gap: 3px; font: 600 .8rem/1 var(--titre); color: #F6D894; }
.rq-dix-verdict .pf-piece { width: 13px; height: 13px; }
.rq-passer { min-height: 44px; }

/* Confirmation */
.rq-confirm { --rar: var(--lueur); }
.rq-confirm-scene { width: 170px; margin-top: -6px; }
/* Dans la scène d'ouverture, la colonne de lumière s'efface vers le haut */
.rq-scene-chasse .rq3d canvas, .rq-scene-chasse .rq-figure { -webkit-mask: linear-gradient(180deg, transparent, #000 14%, #000 74%, transparent 98%); mask: linear-gradient(180deg, transparent, #000 14%, #000 74%, transparent 98%); }

@media (prefers-reduced-motion: reduce) {
  .rq-banniere, .rq-chaine, [data-reliq="cendres"] .rq-banniere::after, .rq3d, .rq-scene3d.tremble .rq-figure, .rq-autel h2, .rq-ouvrir::after, .rq-nouveau, .rq-carte.gagne, .rq-dix-case, .rq-scene, .rq-scene.sortie { animation: none; }
  .rq-tourne, .rq-scene-chasse, .rq-figure, .rq-scene3d::after { transition: none !important; }
}
/* Payer en Serments : la lumière divine, bleue et blanche */
.rq-ouvrir--serments { border-color: #DDF4FF; color: #061A3A; background: linear-gradient(180deg, #E6F7FF, #8FD0FF 55%, #5CB8FF); box-shadow: 0 0 26px rgba(92, 184, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .7); }
.rq-ouvrir--serments.rq-ouvrir--dix { background: linear-gradient(180deg, #FFFFFF, #BFE9FF 45%, #5CB8FF); box-shadow: 0 0 30px rgba(30, 91, 255, .5), inset 0 1px 0 rgba(255, 255, 255, .8); }
.rq-monnaie button[data-v="serments"][aria-checked="true"] { color: #BFE9FF; box-shadow: inset 0 -2px 0 #5CB8FF; }
/* Les Reliquaires se paient en Or seulement : une note à la place du choix de monnaie */
.rq-monnaie-note { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: .9rem; color: var(--encre-att); }
.rq-monnaie-note .pf-piece { flex: none; width: 18px; height: 18px; }
/* Vers la Châsse de cristal (le Reliquaire premium, en Serments) */
.rq-vers-chasse { display: grid; gap: 10px; align-items: center; margin: 14px 0 0; padding: 12px 14px; border: 1px solid rgba(191, 224, 255, .35); background: radial-gradient(ellipse 80% 120% at 0% 50%, rgba(191, 224, 255, .12), transparent 70%), rgba(10, 14, 22, .85); }
.rq-vers-chasse h3 { margin: 4px 0 2px; font: 600 1.25rem/1.1 var(--titre); color: #DDF4FF; }
.rq-vers-chasse p:not(.rq-sur) { margin: 0; font-size: .9rem; line-height: 1.4; color: var(--encre-att); }
@media (min-width: 720px) { .rq-vers-chasse { grid-template-columns: minmax(0, 1fr) auto; } }

/* Rareté mythique (la Châsse) : le nom en spectre, une lueur rose et violette */
.rq-objet.rar-mythique { box-shadow: 0 0 18px rgba(255, 90, 106, .2), 0 0 28px rgba(155, 107, 255, .14); }
.rar-mythique .rq-face--avant h2 { color: transparent; -webkit-background-clip: text; background-clip: text; background-image: linear-gradient(100deg, #FF8A9A, #FFE9A0 30%, #9CF5C4 55%, #9ADFFF 75%, #C9A8FF); }
.rq-faveur.rar-mythique .rq-faveur-barre > span { background: linear-gradient(90deg, #FF4D6D, #FFB547, #FFF35C, #5CF0A0, #4FD8FF, #9B6BFF); box-shadow: 0 0 10px rgba(255, 90, 106, .8); }
.rq-groupe.rar-mythique h3 .bq-gemme, .rq-faveur.rar-mythique .bq-gemme { background: conic-gradient(#FF4D6D, #FFB547, #FFF35C, #5CF0A0, #4FD8FF, #9B6BFF, #FF4D6D); }
