/* Musée du vin de poche — mouvement.
   Un seul vocabulaire (voir tokens.css) : entrée douce, ressort pour les récompenses,
   rien qui bouge sans raison. Tout est retiré si l'utilisateur réduit les animations. */

@media (prefers-reduced-motion:no-preference){

  /* Entrées de vue et de question, décalées (classe posée par motion.js) */
  .ds-in{animation:ds-rise var(--t-slow) var(--ease-out) both;animation-delay:calc(var(--i,0)*55ms)}

  /* Réponses : la bonne réponse se pose, la mauvaise frémit */
  .opt.correct,.qcm-o.ok{animation:ds-pop .6s var(--ease-spring) both}
  .opt.wrong,.qcm-o.ko{animation:ds-shake .42s var(--ease-inout) both}
  .feedback{animation:ds-rise var(--t-slow) var(--ease-out) both}

  /* Barres de progression : elles se remplissent */
  .rv-meter i{transform-origin:left center;animation:ds-fill .9s var(--ease-out) both}
  .rv-collection-item:nth-child(2) .rv-meter i{animation-delay:.06s}
  .rv-collection-item:nth-child(3) .rv-meter i{animation-delay:.12s}
  .rv-collection-item:nth-child(4) .rv-meter i{animation-delay:.18s}
  .rv-collection-item:nth-child(5) .rv-meter i{animation-delay:.24s}
  .rv-collection-item:nth-child(6) .rv-meter i{animation-delay:.3s}
  .rv-collection-item:nth-child(n+7) .rv-meter i{animation-delay:.36s}

  /* Carte de révision : la face réponse se retourne (une seule face visible à la fois, compatible Safari) */
  .cj .pc.flip .carte-b{animation:ds-flip-in .56s var(--ease-out) both}

  /* Carnet : les tampons obtenus s'impriment l'un après l'autre */
  .slot.on svg{animation:ds-stamp .6s var(--ease-spring) both}
  .slot:nth-child(2).on svg{animation-delay:.08s}
  .slot:nth-child(3).on svg{animation-delay:.16s}
  .slot:nth-child(4).on svg{animation-delay:.24s}
  .slot:nth-child(5).on svg{animation-delay:.32s}
  .slot:nth-child(6).on svg{animation-delay:.4s}

  /* Pastille de l'onglet actif : elle glisse d'un onglet à l'autre */
  .tab-pill.animate{transition:transform .42s var(--ease-spring),width .42s var(--ease-out),height .42s var(--ease-out)}
}

/* Pastille de l'onglet actif (positionnée par motion.js) */
.tab-pill{position:absolute;left:0;top:0;width:var(--pw,0);height:var(--ph,0);transform:translate(var(--px,0),var(--py,0));border-radius:18px;background:#e9e5da;box-shadow:var(--press);pointer-events:none;z-index:0;opacity:0}
.tabbar.has-pill .tab-pill{opacity:1}

@keyframes ds-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes ds-pop{0%{transform:scale(.97)}45%{transform:scale(1.02)}100%{transform:scale(1)}}
@keyframes ds-shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-7px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(2px)}}
@keyframes ds-fill{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes ds-flip-in{
  0%{transform:perspective(1100px) rotateY(-82deg) scale(.94);opacity:0}
  40%{opacity:1}
  100%{transform:perspective(1100px) rotateY(0) scale(1);opacity:1}
}
@keyframes ds-stamp{from{transform:scale(1.6) rotate(-18deg);opacity:0}to{transform:scale(1) rotate(0);opacity:1}}
