/* Base commune à tous les sites de démo */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.container { width: min(1120px, 92%); margin: 0 auto; }

/* Apparition au défilement */
[data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
[data-reveal="left"] { transform: translateX(-60px); }
[data-reveal="right"] { transform: translateX(60px); }
[data-reveal="zoom"] { transform: scale(.85); }
[data-reveal].in { opacity: 1; transform: none; }

/* En-tête qui change au défilement */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .3s, box-shadow .3s, padding .3s; padding: 22px 0; }
.site-header.scrolled { padding: 12px 0; box-shadow: 0 6px 30px rgba(0,0,0,.12); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-header nav { display: flex; gap: 28px; font-weight: 500; }
.site-header nav a { position: relative; }
.site-header nav a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: currentColor; transition: width .3s; }
.site-header nav a:hover::after { width: 100%; }

/* Bouton retour vers le portfolio */
.back-portfolio { position: fixed; left: 24px; bottom: 24px; z-index: 100; display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(120deg, #22c3ff, #1f6bff 55%, #7b5cff); color: #fff; padding: 16px 28px; border-radius: 999px;
  font: 700 17px/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .01em;
  border: 2px solid rgba(255,255,255,.85); box-shadow: 0 12px 34px -8px rgba(31,107,255,.75), 0 0 0 0 rgba(34,195,255,.6);
  animation: backPulse 2.4s ease-out infinite; transition: transform .2s; }
.back-portfolio:hover { transform: translateY(-3px) scale(1.04); animation-play-state: paused; }
@keyframes backPulse { 0% { box-shadow: 0 12px 34px -8px rgba(31,107,255,.75), 0 0 0 0 rgba(34,195,255,.6); } 70%, 100% { box-shadow: 0 12px 34px -8px rgba(31,107,255,.75), 0 0 0 16px rgba(34,195,255,0); } }
@media (max-width: 600px) { body[data-demo] { padding-bottom: 84px; } .back-portfolio { left: 50%; transform: translateX(-50%); bottom: 16px; padding: 14px 24px; font-size: 16px; white-space: nowrap; } .back-portfolio:hover { transform: translateX(-50%) scale(1.04); } }

.demo-note { font-size: 12px; opacity: .6; margin-top: 8px; }

@media (max-width: 760px) {
  .site-header nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
