/* ==========================================================================
   Pages d'exemple — socle commun

   Contient uniquement ce que les trois exemples partagent : remise à zéro,
   bandeau Weblyx en haut de page et système d'apparition au défilement.
   Chaque exemple règle son propre mouvement avec les variables --reveal-*.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  interpolate-size: allow-keywords;
}

body {
  margin: 0;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote,
fieldset {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

fieldset {
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

table {
  border-collapse: collapse;
}

p {
  text-wrap: pretty;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Bandeau Weblyx : rappelle que le commerce est fictif et ramène au site
   -------------------------------------------------------------------------- */

.demo-bar {
  position: relative;
  z-index: 60;
  background: #141414;
  color: #F6F5F1;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.875rem;
  line-height: 1.4;
}

.demo-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 9px clamp(16px, 4vw, 40px);
}

.demo-bar p {
  margin: 0;
}

.demo-bar strong {
  padding: 0 4px;
  background: #FFE14A;
  color: #141414;
}

.demo-bar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
}

.demo-bar a {
  color: inherit;
  font-weight: 600;
  text-underline-offset: 3px;
}

.demo-bar a:hover {
  text-decoration-color: #FFE14A;
  text-decoration-thickness: 2px;
}

.demo-bar :focus-visible {
  outline: 2px solid #FFE14A;
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Apparitions au défilement (voir script.js)
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  transition:
    opacity var(--reveal-duration, 0.7s) var(--reveal-ease, ease-out),
    transform var(--reveal-duration, 0.7s) var(--reveal-ease, ease-out);
  transition-delay: calc(var(--i, 0) * var(--reveal-stagger, 90ms));
}

.js [data-reveal]:not(.is-visible) {
  opacity: 0;
  transform: var(--reveal-from, translateY(20px));
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
