/* =====================================================================
   AmsoWeb — base commune aux sites de démonstration (exemples/)
   Chaque démo définit ensuite sa propre identité dans son fichier.
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
html.lock { overflow: hidden; }
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; line-height: 1.6; }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: 12px; z-index: 1000; padding: 10px 16px; border-radius: 999px; background: #111; color: #fff; font-weight: 700; text-decoration: none; transform: translateY(-160%); transition: transform .3s; }
.skip:focus { transform: none; }

/* Apparitions */
.js [data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity 1s cubic-bezier(.22, 1, .36, 1), transform 1.1s cubic-bezier(.22, 1, .36, 1); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.is-split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .05em .14em; margin: 0 -.05em -.14em; }
.is-split .w > span { display: inline-block; transform: translateY(110%); transition: transform 1.15s cubic-bezier(.22, 1, .36, 1); transition-delay: calc(var(--i, 0) * 34ms + var(--d, 0s)); }
.is-split.is-in .w > span { transform: none; }

/* Transition de page */
.curtain { position: fixed; inset: 0; z-index: 950; pointer-events: none; }
.curtain::before, .curtain::after { content: ""; position: absolute; inset: 0; transform: scaleY(0); transform-origin: bottom; transition: transform .6s cubic-bezier(.76, 0, .24, 1); }
.curtain::before { background: var(--curtain-a, #ff9417); }
.curtain::after { background: var(--curtain-b, #060a16); transition-delay: .08s; }
/* portail depuis l'accueil */
.portal { position: fixed; inset: 0; z-index: 960; display: grid; place-items: center; clip-path: circle(0 at var(--px, 50%) var(--py, 50%)); transition: clip-path .78s cubic-bezier(.76, 0, .24, 1); pointer-events: none; }
.portal.is-open { clip-path: circle(150vmax at var(--px, 50%) var(--py, 50%)); }
/* démo affichée dans le téléphone de l'accueil */
.is-embed .cursor, .is-embed .curtain, .is-embed .demo-bar, .is-embed .toast { display: none !important; }
html.is-embed { scrollbar-width: none; }
html.is-embed::-webkit-scrollbar { display: none; }
/* badge de l'hébergeur (coin bas droit) : il ne doit recouvrir aucun bouton, et reste hors du téléphone de l'accueil */
.is-embed #nl-badge-frame { display: none !important; }
@media (max-width: 760px) {
  html:has(#nl-badge-frame) .demo-bar { bottom: 66px; }
  html:has(#nl-badge-frame) .fab { bottom: 128px; }
  html:has(#nl-badge-frame) .toast { bottom: 128px; }
  html:has(#nl-badge-frame) footer.f { padding-bottom: 150px; }
}
/* progression de lecture */
.progress { position: fixed; left: 0; top: 0; z-index: 700; width: 100%; height: 2px; background: var(--progress, #ff9417); transform-origin: left; transform: scaleX(0); pointer-events: none; }
.is-leaving .curtain::before, .is-leaving .curtain::after { transform: scaleY(1); }
.is-entering .curtain::before, .is-entering .curtain::after { transform: scaleY(1); transition: none; }
.curtain-out .curtain::before, .curtain-out .curtain::after { transform-origin: top; }

/* Curseur */
.cursor { position: fixed; inset: 0; z-index: 990; pointer-events: none; opacity: 0; transition: opacity .3s; --c: #fff; }
.cursor.on { opacity: 1; }
.cursor-dot, .cursor-ring { position: absolute; left: 0; top: 0; border-radius: 50%; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--c); }
.cursor-ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1.5px solid color-mix(in srgb, var(--c) 50%, transparent); display: grid; place-items: center; transition: width .45s cubic-bezier(.22, 1, .36, 1), height .45s cubic-bezier(.22, 1, .36, 1), margin .45s cubic-bezier(.22, 1, .36, 1), background-color .3s, border-color .3s, opacity .3s, scale .2s; }
.cursor-ring::before { content: ""; position: absolute; inset: -1.5px; border-radius: 50%; background: var(--c); transform: scale(0); transition: transform .45s cubic-bezier(.22, 1, .36, 1); }
.cursor-label { position: relative; font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--cl, #111); opacity: 0; white-space: nowrap; transition: opacity .3s; }
.cursor.hover .cursor-ring { width: 60px; height: 60px; margin: -30px 0 0 -30px; background: color-mix(in srgb, var(--c) 12%, transparent); }
.cursor.label .cursor-ring { width: 92px; height: 92px; margin: -46px 0 0 -46px; border-color: transparent; }
.cursor.label .cursor-ring::before { transform: scale(1); }
.cursor.label .cursor-label { opacity: 1; }
.cursor.label .cursor-dot, .cursor.hide .cursor-dot, .cursor.hide .cursor-ring { opacity: 0; }
.cursor.down .cursor-ring { scale: .85; }
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor input:not([type=radio]):not([type=checkbox]):not([type=range]), .has-cursor textarea { cursor: text !important; }

/* Bandeau « concept fictif » */
.demo-bar {
  position: fixed; left: 50%; bottom: 14px; z-index: 800; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 8px; max-width: calc(100% - 24px);
  border-radius: 999px; background: rgba(8, 10, 20, .78); color: #eef2fb; border: 1px solid rgba(255, 255, 255, .12);
  font: 600 12.5px/1.2 "Plus Jakarta Sans", system-ui, sans-serif; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
}
.demo-bar a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; text-decoration: none; white-space: nowrap; transition: background-color .3s; }
.demo-bar a:hover { background: rgba(255, 255, 255, .1); }
.demo-bar img { width: 18px; }
.demo-bar .note { padding: 0 10px; opacity: .72; white-space: nowrap; }
.demo-bar .note-s { display: none; }
.demo-bar .cta { background: #ff9417; color: #160c00; font-weight: 800; }
.demo-bar .cta:hover { background: #ffb04d; }
@media (max-width: 760px) {
  /* le caractère fictif reste affiché sur téléphone */
  .demo-bar .note { padding: 0 4px; }
  .demo-bar .note-l { display: none; }
  .demo-bar .note-s { display: inline; }
  .demo-bar { font-size: 12px; }
  .demo-bar a { padding: 8px 10px; }
}

/* Barre de navigation des démos sur petit écran */
.nav .logo, .nav .btn { white-space: nowrap; }
@media (max-width: 520px) {
  .nav .btn { min-height: 40px !important; padding: 0 14px !important; font-size: 13px; }
  .nav .logo { font-size: 15px; }
}

/* Petite notification (démos de formulaires) */
.toast {
  position: fixed; left: 50%; bottom: 76px; z-index: 850; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 460px); padding: 14px 18px; border-radius: 16px; background: #0b0f1d; color: #eef2fb;
  font: 600 14px/1.45 "Plus Jakarta Sans", system-ui, sans-serif; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .6);
  transition: opacity .4s, transform .5s cubic-bezier(.22, 1, .36, 1);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .is-split .w > span { transform: none; }
}
