/* The historical multi-card picker also uses the same authentic back markup. */
.ei-tirages .tg-hidden-card>.tg-card-flip{position:absolute;inset:0;display:block;border-radius:inherit;pointer-events:none}
.ei-tirages .tg-hidden-card .tg-card-back{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}
/* Fan of twenty authentic card backs — trial and paid single-card readings only.
   Without JS positioning, the cards remain a horizontally scrollable set. */
.ei-tirages .tg-card-rail.tg-dock-fan{
  position:relative;isolation:isolate;display:flex;align-items:center;gap:0;
  width:100%;max-width:940px;min-height:260px;margin:12px auto 18px!important;
  padding:16px 0 24px!important;overflow-x:auto;overflow-y:hidden;
  scroll-snap-type:x proximity;touch-action:pan-y;
  border-radius:16px;background:radial-gradient(ellipse at 50% 88%,rgba(198,215,203,.25),transparent 70%);
  -webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;
}
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) .tg-hidden-card{
  position:relative;flex:0 0 92px;width:92px;margin:0 0 0 -22px;
  transform:rotate(-4deg);scroll-snap-align:center;
}
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) .tg-hidden-card:first-child{margin-left:14px}
.ei-tirages .tg-card-rail.tg-dock-fan.tg-fan-positioned{
  display:block;height:var(--fan-height,340px);min-height:0;
  padding:0!important;overflow:visible;scroll-snap-type:none;cursor:default;
}
.ei-tirages .tg-dock-fan .tg-hidden-card{
  box-sizing:border-box;min-width:0;max-width:none;aspect-ratio:89/127;
  padding:0!important;gap:0;border:1px solid #b3a47e!important;
  border-radius:10px;background:#f7f4e9!important;
  box-shadow:0 8px 20px rgba(25,62,62,.22);
  transform-style:preserve-3d;touch-action:pan-y;
  transition:transform .26s cubic-bezier(.2,.75,.3,1),box-shadow .26s ease;
  will-change:transform;
}
.ei-tirages .tg-dock-fan.tg-fan-positioned .tg-hidden-card{
  position:absolute;left:50%;top:55px;
  width:var(--fan-width,128px);height:auto;min-height:0;margin:0;
  transform:translateX(calc(-50% + var(--fan-x,0px)))
    translateY(calc(var(--fan-y,0px) - var(--dock-lift,0px)))
    rotate(var(--fan-angle,0deg)) scale(var(--dock-scale,1));
  transform-origin:50% 86%;
  z-index:var(--fan-z,1);scroll-snap-align:none;
}
.ei-tirages .tg-dock-fan .tg-hidden-card::before,
.ei-tirages .tg-dock-fan .tg-hidden-card::after{display:none}
.ei-tirages .tg-dock-fan .tg-hidden-card[aria-pressed=true]{
  border-color:#b59a66!important;box-shadow:0 18px 36px rgba(22,67,66,.32),0 0 0 2px rgba(191,164,100,.4);
}
.ei-tirages .tg-dock-fan .tg-hidden-card.tg-picking{z-index:400!important}
.ei-tirages .tg-dock-fan .tg-card-flip{
  display:block;position:absolute;inset:0;overflow:visible;border-radius:inherit;
  transform-style:preserve-3d;transition:transform .58s cubic-bezier(.25,.7,.2,1);
}
.ei-tirages .tg-dock-fan .tg-card-flip>img{
  display:block;position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;border-radius:9px;backface-visibility:hidden;-webkit-backface-visibility:hidden;
  pointer-events:none;user-select:none;
}
.ei-tirages .tg-dock-fan .tg-card-flip>.tg-card-front{transform:rotateY(180deg)}
.ei-tirages .tg-dock-fan .tg-hidden-card.tg-turned .tg-card-flip{transform:rotateY(180deg)}
.ei-tirages .tg-dock-fan .tg-card-image-wait{font-size:10px;color:#446768;display:grid;place-items:center;height:100%;padding:10px;text-align:center}
.ei-tirages .tg-dock-fan .tg-card-check,.ei-tirages .tg-dock-fan .tg-card-index{display:none!important}
.ei-tirages .tg-dock-fan .tg-hidden-card:focus-visible{outline:3px solid #ae9157;outline-offset:4px}
.ei-tirages #tg-picker.tg-picker--single .tg-selection-bar{display:none!important}
.ei-tirages #tg-picker.tg-picker--single .tg-group-actions{display:none}
.ei-tirages .tg-demo #tg-demo-reveal,.ei-tirages #tg-demo-picker .tg-demo-reveal{display:none!important}
.ei-tirages .tg-result-card:only-child{border:0;border-top:1px solid #e1e5db;border-radius:0;background:transparent;padding:25px 0}
.ei-tirages .tg-result-card:only-child .tg-result-layout{grid-template-columns:minmax(0,1fr)!important;max-width:790px;margin:auto;gap:26px}
.ei-tirages .tg-result-card:only-child .tg-result-copy{max-width:740px;margin:0 auto;width:100%}
.ei-tirages .tg-result-card:only-child .tg-result-media{background:radial-gradient(ellipse at 50% 30%,#ecf1e9,transparent 72%),#f9f8f3}
.ei-tirages .tg-result-card:only-child .tg-result-media img{max-width:min(100%,310px);max-height:470px}
@media (min-width:800px){
 .ei-tirages .tg-dock-fan.tg-fan-positioned .tg-hidden-card{top:65px}
}
@media (max-width:599px){
 .ei-tirages .tg-dock-fan.tg-fan-positioned .tg-hidden-card{top:42px}
 .ei-tirages .tg-result-card:only-child .tg-result-media{padding:16px}
 .ei-tirages .tg-result-card:only-child .tg-result-media img{max-width:250px}
 .ei-tirages .tg-dock-fan .tg-hidden-card{border-radius:8px}
 .ei-tirages .tg-dock-fan .tg-card-flip>img{border-radius:7px}
}
@media (prefers-reduced-motion:reduce){
 .ei-tirages .tg-dock-fan .tg-hidden-card,.ei-tirages .tg-dock-fan .tg-card-flip{transition:none!important}
 .ei-tirages .tg-dock-fan .tg-hidden-card{will-change:auto;--dock-scale:1!important;--dock-lift:0px!important}
}

.ei-tirages .tg-story{border:0;border-top:1px solid #d9ded2;border-bottom:1px solid #d9ded2;padding:0;margin:20px 0 18px;color:#294f4e}
.ei-tirages .tg-story>summary{padding:16px 2px;min-height:44px;cursor:pointer;font:500 22px/1.4 var(--ei-serif,Georgia,serif);color:#20585c}
.ei-tirages .tg-story-body{padding:0 2px 8px}
.ei-tirages .tg-story-body .tg-result-section p{font-size:14px;line-height:1.9;white-space:pre-line}
.ei-tirages .tg-story-body .tg-result-section:first-child p{font-family:var(--ei-serif,Georgia,serif);font-size:20px;line-height:1.6}
.ei-oracle-stories{margin:34px 0 0;padding:26px 0 6px;border-top:1px solid #dce1d5;color:#20585c;scroll-margin-top:190px}
.ei-oracle-stories h2{font:400 36px/1.15 var(--ei-serif,Georgia,serif);margin:7px 0 15px}
.ei-oracle-stories>p{font-size:13px;line-height:1.8;color:#61766a;max-width:720px}
.ei-oracle-story{border-bottom:1px solid #dce1d5;padding:0;margin-top:8px;scroll-margin-top:190px}
.ei-oracle-story>summary{padding:17px 0;min-height:44px;cursor:pointer;font:500 24px/1.4 var(--ei-serif,Georgia,serif);color:#20585c}
.ei-oracle-story-layout{display:grid;grid-template-columns:135px minmax(0,1fr);gap:26px;padding:10px 0 24px;align-items:start}
.ei-oracle-story-layout>img{display:block;width:100%;height:auto;border-radius:6px;box-shadow:0 7px 16px #244b4426}
.ei-oracle-story-copy{max-width:720px;min-width:0}
.ei-oracle-story-copy blockquote{margin:0 0 18px;padding:12px 16px;border-left:2px solid #b39a66;background:#edf2e9;font:500 22px/1.5 var(--ei-serif,Georgia,serif);color:#20585c}
.ei-oracle-story-copy h3{font:500 26px/1.25 var(--ei-serif,Georgia,serif);margin:22px 0 8px}
.ei-oracle-story-copy p{font-size:14px;line-height:1.85;white-space:pre-line;margin:0 0 14px;color:#526a61}
.ei-oracle-story-copy .ei-story-source{font-size:11px;color:#8a744f}
.ei-oracle-story-copy .ei-story-legend{font-family:var(--ei-serif,Georgia,serif);font-size:21px;line-height:1.6;color:#34574e}
.ei-oracle-story-copy a{display:inline-flex;align-items:center;min-height:44px;font-size:12px;color:#20585c;text-underline-offset:4px}
@media(max-width:599px){.ei-tirages #tg-demo-rail.tg-demo-fan{height:270px}.ei-tirages #tg-demo-rail.tg-demo-fan .tg-hidden-card{top:57px}.ei-tirages #tg-demo-rail.tg-demo-fan .tg-card-back-word{font-size:16px}.ei-tirages #tg-demo-rail.tg-demo-fan .tg-card-star{font-size:36px}.ei-oracle-story-layout{grid-template-columns:82px minmax(0,1fr);gap:15px}.ei-oracle-story-copy blockquote{font-size:20px}.ei-oracle-story-copy .ei-story-legend{font-size:20px}.ei-oracle-story-copy h3{font-size:23px}.ei-oracle-stories,.ei-oracle-story{scroll-margin-top:25px}}
@media(max-width:380px){.ei-oracle-story-layout{grid-template-columns:1fr}.ei-oracle-story-layout>img{width:130px;margin:0 auto 10px}}
@media(prefers-reduced-motion:reduce){.ei-tirages #tg-demo-rail.tg-demo-fan .tg-hidden-card{transition:none}}

.ei-tirages .tg-skip:not(:focus){clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap;padding:0}




/* Secours résilient : les douze dos dessinent un véritable éventail même
   si le script d'animation attend encore son chargement. */
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned){
  position:relative;display:block;height:clamp(280px,35vw,360px);
  min-height:280px;overflow:visible;scroll-snap-type:none;touch-action:pan-y;
}
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card{
  position:absolute;top:42px;left:var(--fallback-left,50%);
  width:clamp(94px,30vw,148px);height:auto;aspect-ratio:89/127;
  margin:0;flex:none;z-index:var(--fallback-z,1);
  transform:translateX(-50%) translateY(var(--fallback-y,0px)) rotate(var(--fallback-angle,0deg));
}


.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card:nth-child(1){--fallback-left:15.00%;--fallback-y:39.0px;--fallback-angle:-30.0deg;--fallback-z:5}
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card:nth-child(2){--fallback-left:21.36%;--fallback-y:26.1px;--fallback-angle:-24.5deg;--fallback-z:6}
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card:nth-child(3){--fallback-left:27.73%;--fallback-y:15.8px;--fallback-angle:-19.1deg;--fallback-z:7}
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card:nth-child(4){--fallback-left:34.09%;--fallback-y:8.1px;--fallback-angle:-13.6deg;--fallback-z:8}
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card:nth-child(5){--fallback-left:40.45%;--fallback-y:2.9px;--fallback-angle:-8.2deg;--fallback-z:9}
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card:nth-child(6){--fallback-left:46.82%;--fallback-y:0.3px;--fallback-angle:-2.7deg;--fallback-z:10}
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card:nth-child(7){--fallback-left:53.18%;--fallback-y:0.3px;--fallback-angle:2.7deg;--fallback-z:11}
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card:nth-child(8){--fallback-left:59.55%;--fallback-y:2.9px;--fallback-angle:8.2deg;--fallback-z:12}
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card:nth-child(9){--fallback-left:65.91%;--fallback-y:8.1px;--fallback-angle:13.6deg;--fallback-z:13}
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card:nth-child(10){--fallback-left:72.27%;--fallback-y:15.8px;--fallback-angle:19.1deg;--fallback-z:14}
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card:nth-child(11){--fallback-left:78.64%;--fallback-y:26.1px;--fallback-angle:24.5deg;--fallback-z:15}
.ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card:nth-child(12){--fallback-left:85.00%;--fallback-y:39.0px;--fallback-angle:30.0deg;--fallback-z:16}

/* L'ancienne règle de survol ne doit jamais effacer la translation du fan. */
@media (hover:hover) and (pointer:fine) {
  .ei-tirages .tg-card-rail.tg-dock-fan.tg-fan-positioned > .tg-hidden-card:hover:not([aria-pressed=true]):not(:disabled){
    transform:translateX(calc(-50% + var(--fan-x,0px)))
      translateY(calc(var(--fan-y,0px) - var(--dock-lift,0px)))
      rotate(var(--fan-angle,0deg)) scale(var(--dock-scale,1));
  }
  .ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card:hover:not(:disabled){
    z-index:220;transform:translateX(-50%) translateY(calc(var(--fallback-y,0px) - 24px))
      rotate(var(--fallback-angle,0deg)) scale(1.12);
  }
}
@media (prefers-reduced-motion:reduce) {
  .ei-tirages .tg-card-rail.tg-dock-fan.tg-fan-positioned > .tg-hidden-card:hover:not(:disabled) {
    transform:translateX(calc(-50% + var(--fan-x,0px))) translateY(var(--fan-y,0px))
      rotate(var(--fan-angle,0deg))!important;
  }
  .ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card:hover:not(:disabled) {
    transform:translateX(-50%) translateY(var(--fallback-y,0px)) rotate(var(--fallback-angle,0deg))!important;
  }
}


/* Grand écran : large arc lisible, centré. Aucune modification du fan mobile. */
@media (min-width:900px) and (hover:hover) {
  .ei-tirages .tg-card-rail.tg-dock-fan {
    max-width:1080px;
    margin:18px auto 28px!important;
    background:radial-gradient(ellipse at 50% 83%,rgba(214,222,204,.34),transparent 68%);
  }
  .ei-tirages .tg-dock-fan.tg-fan-positioned > .tg-hidden-card {
    top:66px;
    transform-origin:50% 105%;
  }
  .ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) {
    height:430px;
  }
  .ei-tirages .tg-card-rail.tg-dock-fan:not(.tg-fan-positioned) > .tg-hidden-card {
    width:170px;
    top:66px;
  }
  .ei-tirages .tg-dock-fan .tg-hidden-card:focus-visible {
    z-index:240!important;
  }
}


/*
 * Bureau : répartition physique des 12 cartes par grille.
 * Évite l'empilement central si les translations CSS/JS sont recalculées en retard.
 * Aucun changement pour les écrans < 900 px (mobile inchangé).
 */
@media (min-width:900px) {
  .ei-tirages .tg-card-rail.tg-dock-fan,
  .ei-tirages .tg-card-rail.tg-dock-fan.tg-fan-positioned {
    display:grid!important;
    grid-template-columns:repeat(12,minmax(0,1fr))!important;
    grid-template-rows:1fr!important;
    justify-items:center!important;
    align-items:start!important;
    gap:0!important;
    padding:0 75px!important;
    box-sizing:border-box!important;
    width:100%;
    height:var(--fan-height,440px);
    min-height:390px;
    overflow:visible!important;
    scroll-snap-type:none!important;
    touch-action:pan-y;
  }
  .ei-tirages .tg-card-rail.tg-dock-fan > .tg-hidden-card,
  .ei-tirages .tg-card-rail.tg-dock-fan.tg-fan-positioned > .tg-hidden-card {
    position:relative!important;
    left:auto!important;
    top:62px!important;
    min-width:0!important;
    max-width:none!important;
    width:var(--fan-width,170px)!important;
    aspect-ratio:89/127;
    height:auto!important;
    margin:0!important;
    flex:none!important;
    justify-self:center!important;
    transform-origin:50% 95%!important;
    transform:translateY(calc(var(--fan-y,var(--fallback-y,0px)) - var(--dock-lift,0px)))
      rotate(var(--fan-angle,var(--fallback-angle,0deg)))
      scale(var(--dock-scale,1))!important;
    z-index:var(--fan-z,var(--fallback-z,1));
  }
}

/* Rectos authentiques des 12 exemples de chaque oracle, extraits des PDF fournis.
   Chaque vignette sélectionne sa case dans une planche 4 × 3 optimisée. */
.ei-tirages .tg-card-flip > .tg-card-front.tg-atlas-face {
  position:absolute; inset:0; display:block; width:100%; height:100%;
  border-radius:inherit; background-repeat:no-repeat;
  backface-visibility:hidden; -webkit-backface-visibility:hidden;
  transform:rotateY(180deg); pointer-events:none;
}
.ei-tirages .tg-result-media .tg-result-atlas {
  display:block; flex:none;
  width:min(100%,310px);
  height:auto; aspect-ratio:89/127;
  border-radius:8px;
  background-repeat:no-repeat;
  box-shadow:0 14px 28px rgba(27,63,63,.22);
}
.ei-tirages .tg-booklet-page {
  margin:18px 0 0; font:500 11px/1.65 var(--ei-sans,Arial,sans-serif); color:#857653;
}
.ei-oracle-story-layout > .ei-oracle-story-atlas {
  display:block; width:100%; aspect-ratio:89/127;
  background-repeat:no-repeat;
  border-radius:6px;
  box-shadow:0 7px 16px #244b4426;
}

/* Android / Safari mobile : position horizontale réelle des cartes.
   Le décalage X est dans left (calculé par positionFan), la transformation
   ne sert qu'à centrer la carte et à préserver la courbe et le dock.
   Évite la pile à 50 % lorsque Chrome Android invalide le calc composé. */
@media (max-width:899px) {
  .ei-tirages .tg-card-rail.tg-dock-fan.tg-fan-positioned > .tg-hidden-card {
    transform:translateX(-50%)
      translateY(calc(var(--fan-y,0px) - var(--dock-lift,0px)))
      rotate(var(--fan-angle,0deg)) scale(var(--dock-scale,1));
  }
}
