/* Bannière animée : coffret Dupond + 4 pâtisseries en trompe-l'œil */
.coffret-anim { position: relative; overflow: hidden; height: clamp(540px, 78vh, 760px);
  background: #FFF5DB url("brand/motif-spirale.svg") 0 0 / 108px 184px repeat; }
/* Charte VIM : crème #FFF5DB + motif spirale brun #673918. Halo crème au centre pour que les pièces ressortent,
   ombre de sol sous le coffret. */
.coffret-anim__fond { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(46% 58% at 50% 50%, rgba(255,245,219,.92) 0%, rgba(255,245,219,.6) 55%, rgba(255,245,219,0) 100%),
    radial-gradient(30% 7% at 50% var(--sol, 82%), rgba(103,57,24,.22), transparent 75%); }
.coffret-anim__scene { position: absolute; inset: 0; }

/* Coffret : immobile. La copie « avant » ne montre que la paroi avant (sous le rebord) :
   elle sert de masque quand les pièces entrent dans la boîte ou en sortent. */
.coffret-anim__boite, .coffret-anim__avant { position: absolute; left: 50%; top: 50%; width: var(--bw, 420px); height: auto; transform: translate(-50%, -46%); pointer-events: none; user-select: none; }
.coffret-anim__boite { z-index: 2; filter: drop-shadow(0 22px 26px rgba(120,60,10,.30)); }
.coffret-anim__avant { z-index: 4; clip-path: inset(43% 0 0 0); }

/* Pièces */
.coffret-anim__piece { position: absolute; left: 0; top: 0; width: var(--pw, 120px); z-index: 1; will-change: transform; opacity: 0; }
.coffret-anim__piece img { display: block; width: 100%; height: auto;
  filter: drop-shadow(0 0 var(--halo-r, 0px) rgba(var(--halo), var(--halo-a, 0))); }
.coffret-anim__nom { position: absolute; left: 50%; top: 100%; margin-top: 10px; transform: translateX(-50%); white-space: nowrap;
  font-size: 12px; font-weight: 700; letter-spacing: 4px; text-transform: uppercase; color: #4A2410; opacity: 0; transition: opacity .6s ease; }
.coffret-anim[data-mode="sortie"] .coffret-anim__piece.est-pose .coffret-anim__nom,
.coffret-anim[data-mode="cycle"] .coffret-anim__piece.est-pose .coffret-anim__nom { opacity: .9; }
.coffret-anim.est-pret .coffret-anim__piece { opacity: 1; }
@media (max-width: 767px) { .coffret-anim__nom { font-size: 10px; letter-spacing: 3px; margin-top: 6px; } }
