/* GoodBeauty — photos des fiches en « stories » plein écran sur téléphone (FICHE-03, 02.11.2026). Script : assets/stories.js */
.st-lancer, .st-lancer-txt { display: none; }
@media (max-width: 719px) {
  .st-lancer { position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; border: 0;
    display: grid; place-items: center; background: rgb(255 255 255 / .9); color: var(--prune, #6b2d5c); box-shadow: 0 8px 30px rgb(0 0 0 / .28); cursor: pointer; }
  .st-lancer .ic { width: 26px; height: 26px; margin-left: 4px; }
  .st-lancer::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .8); animation: st-onde 2.2s ease-out infinite; }
  .st-lancer-txt { position: absolute; left: 50%; top: calc(50% + 44px); z-index: 3; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px;
    background: rgb(20 14 18 / .62); color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .02em; pointer-events: none; white-space: nowrap; }
}
@keyframes st-onde { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }

.stories { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #0d0a0c; color: #fff; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.stories::backdrop { background: #0d0a0c; }
.stories[open] { animation: st-entree .32s cubic-bezier(.2, .7, .2, 1); }
@keyframes st-entree { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.st-scene { position: absolute; inset: 0; transition: transform .25s ease; }
.st-diapo { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .38s ease; overflow: hidden; }
.st-diapo.actif { opacity: 1; }
.st-diapo img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; will-change: transform; }
.st-diapo.actif.kb-a img { animation: st-kb-a 6.5s linear forwards; }
.st-diapo.actif.kb-b img { animation: st-kb-b 6.5s linear forwards; }
@keyframes st-kb-a { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.16) translate(-2.5%, -1.5%); } }
@keyframes st-kb-b { from { transform: scale(1.16) translate(2%, 1.5%); } to { transform: scale(1.04) translate(0, 0); } }
/* photo en paysage sur un écran de téléphone : on la parcourt d'un bord à l'autre (on voit toute la photo en 5 s) */
.st-diapo.paysage.actif.kb-a img { animation: st-pan-a 5.6s ease-in-out forwards; }
.st-diapo.paysage.actif.kb-b img { animation: st-pan-b 5.6s ease-in-out forwards; }
@keyframes st-pan-a { from { object-position: 0% 50%; transform: scale(1.02); } to { object-position: 100% 50%; transform: scale(1.07); } }
@keyframes st-pan-b { from { object-position: 100% 50%; transform: scale(1.07); } to { object-position: 0% 50%; transform: scale(1.02); } }
.st-diapo::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgb(0 0 0 / .45), transparent 22%, transparent 70%, rgb(0 0 0 / .55)); }
.st-diapo figcaption { position: absolute; left: 18px; right: 18px; bottom: calc(26px + env(safe-area-inset-bottom)); z-index: 2; font-size: .95rem; line-height: 1.4; text-shadow: 0 1px 8px rgb(0 0 0 / .6); }
.st-ia { position: absolute; left: 16px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 2; padding: 3px 10px; border-radius: 999px; background: rgb(30 20 40 / .72); font-size: .78rem; font-weight: 600; }

.st-barres { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; z-index: 4; display: flex; gap: 4px; }
.st-barres i { flex: 1; height: 3px; border-radius: 3px; background: rgb(255 255 255 / .32); overflow: hidden; }
.st-barres b { display: block; height: 100%; width: 0; background: #fff; }
.st-barres i.vu b { width: 100%; }
.st-barres i.en-cours b { animation: st-plein var(--st-duree, 5s) linear forwards; }
.stories.pause .st-barres i.en-cours b, .stories.pause .st-diapo.actif img { animation-play-state: paused; }
@keyframes st-plein { from { width: 0; } to { width: 100%; } }
.st-tete { position: absolute; top: calc(22px + env(safe-area-inset-top)); left: 14px; right: 8px; z-index: 4; display: flex; align-items: center; gap: 10px; }
.st-nom { flex: 1; min-width: 0; font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 6px rgb(0 0 0 / .5); }
.st-fermer { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.st-fermer .ic { width: 24px; height: 24px; }
.st-zone { position: absolute; top: 70px; bottom: 0; z-index: 3; border: 0; padding: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.st-prec { left: 0; width: 33%; }
.st-suiv { right: 0; width: 67%; }
.st-zone:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }

/* dernière image : appeler, itinéraire */
.st-fin { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 90px 22px calc(40px + env(safe-area-inset-bottom)); opacity: 0; visibility: hidden; transition: opacity .38s ease, visibility 0s .38s; }
.st-fin.actif { opacity: 1; visibility: visible; transition: opacity .38s ease; }
.st-fin-fond { position: absolute; inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); object-fit: cover; filter: blur(22px) brightness(.45) saturate(1.2); }
.st-fin-txt { position: relative; text-align: center; max-width: 420px; }
.st-fin-nom { font: 600 clamp(1.8rem, 8vw, 2.4rem)/1.1 var(--titre, serif); margin: 0 0 10px; }
.st-fin-sous { margin: 0 0 24px; color: rgb(255 255 255 / .86); font-size: 1rem; line-height: 1.45; }
.st-actions { display: grid; gap: 10px; }
.st-actions a, .st-actions button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; }
.st-actions .st-plein { background: #fff; color: #1d1519; border: 0; }
.st-actions .st-trait { background: transparent; color: #fff; border: 1.5px solid rgb(255 255 255 / .7); }
.st-actions .ic { width: 20px; height: 20px; }
.st-revoir { margin-top: 16px; background: none; border: 0; color: rgb(255 255 255 / .8); font: inherit; text-decoration: underline; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .st-lancer::after { display: none; }
  .st-barres i.en-cours b { width: 100%; opacity: .6; }
}
