/* Les animations standard d'Atlas : voir js/motion-atlas.js (même fichier dans les moteurs resto, boutique, épicerie).
   Couleurs prises au thème de chaque boutique (--accent, --ink, --bg, --line) : rien n'impose une marque. */
:root { --am-ressort: cubic-bezier(.34, 1.45, .64, 1); --am-doux: cubic-bezier(.22, 1, .36, 1); }

/* 1. Le produit qui vole */
.am-vol { position: fixed; z-index: 90; pointer-events: none; object-fit: cover; border-radius: 16px; box-shadow: 0 12px 26px rgba(0, 0, 0, .28); will-change: transform; }

/* 2. La barre panier : elle monte avec un ressort, puis saute à chaque ajout */
.cartbar { animation: am-monte .6s var(--am-ressort); }
.cartbar__btn { position: relative; }
.cartbar.am-hop .cartbar__btn { animation: am-hop .5s var(--am-ressort); }
@keyframes am-monte { from { transform: translateY(130%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes am-hop { 0% { transform: none; } 35% { transform: translateY(-4px) scale(1.04); } 100% { transform: none; } }

/* 3. Le panier qu'on tire */
/* Fermé, le voile est caché pour de bon : sinon Safari iPhone teinte sa barre d'état avec sa couleur, même à opacité 0 */
.am-voile { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.am-voile.on { pointer-events: auto; visibility: visible; transition: opacity .3s; }
.am-feuille { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-width: 640px; margin: 0 auto; height: 92vh; height: 92dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); border-radius: 24px 24px 0 0; transform: translateY(120%); will-change: transform; visibility: hidden; }
.am-feuille.vue { visibility: visible; box-shadow: 0 -12px 34px rgba(0, 0, 0, .28); }
.am-feuille.ressort { transition: transform .55s var(--am-ressort); }
.am-poignee { flex: none; padding: 10px 0 8px; touch-action: none; cursor: grab; }
.am-poignee i { display: block; width: 42px; height: 5px; margin: 0 auto; border-radius: 3px; background: var(--line); }
.am-contenu { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 16px calc(28px + env(safe-area-inset-bottom)); }
.am-contenu > .screen { padding-top: 2px; }
body.am-feuille-ouverte { overflow: hidden; }

/* 4. Ça bouge au défilement et au doigt */
.am-attend { opacity: 0; transform: translateY(18px); }
.am-attend.am-in { opacity: 1; transform: none; transition: opacity .45s ease, transform .6s var(--am-ressort); }
.am-presse { animation: am-presse .38s var(--am-ressort); }
@keyframes am-presse { 30% { transform: scale(.965); } 100% { transform: none; } }
.nav__item.am-actif svg, .nav__item.am-actif .nav__bubble { animation: am-onglet .5s var(--am-ressort); }
.cat.am-actif, .dash-btn.am-actif { animation: am-onglet .45s var(--am-ressort); }
@keyframes am-onglet { 0% { transform: none; } 40% { transform: translateY(-3px) scale(1.1); } 100% { transform: none; } }
.sheet__media img { transition: transform .25s var(--am-doux); }

/* La brillance fixe : une arête de lumière en haut des surfaces qu'on touche (jamais sur une photo de produit) */
.cartbar__btn, .nav__bubble, .add, .btn:not(.btn--ghost) { background-image: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 52%) !important; }
.univers-luxe .cartbar__btn, .univers-luxe .nav__bubble, .univers-luxe .add, .univers-luxe .btn, .style-maison .cartbar__btn, .style-maison .nav__bubble { background-image: none !important; }

/* L'éclat rare : passe une fois sur une seule surface, puis disparaît */
.am-eclat { position: absolute; inset: 0; z-index: 2; border-radius: inherit; overflow: hidden; pointer-events: none; }
.am-eclat::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); animation: am-eclat .9s ease-in-out forwards; }
@keyframes am-eclat { to { left: 130%; } }

@media (prefers-reduced-motion: reduce) {
  .cartbar, .cartbar.am-hop .cartbar__btn, .am-presse, .am-actif, .nav__item.am-actif svg { animation: none !important; }
  .am-attend { opacity: 1; transform: none; }
  .am-eclat { display: none; }
}
