/* Echo Nexus : portail des projets.
   Thème « nébuleuse » : bleu nuit, bleu électrique, violet, cyan, touches magenta.
   Le fond animé est un shader WebGL (assets/js/fx.js) ; sans JS ou sans WebGL, le dégradé du body prend le relais.
   Les effets (apparitions au défilement, inclinaison des cartes...) ne s'activent que si fx.js a posé html.fx. */
:root {
  --bg: #05061a;
  --bg-2: #0b0e2b;
  --panel: rgba(12, 14, 40, 0.72);
  --panel-2: rgba(18, 21, 56, 0.82);
  --border: rgba(160, 175, 255, 0.16);
  --border-2: rgba(180, 190, 255, 0.28);
  --text: #f1f2ff;
  --muted: #b2b8dc;
  --blue: #4f7dff;
  --violet: #9b6bff;
  --cyan: #6fd6ff;
  --magenta: #ff5ec8;
  --discord: #5865f2;
  --radius: 22px;
  --wrap: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "SF Pro Display", Roboto, "Helvetica Neue", Arial, sans-serif;
  --px: 0; --py: 0; --sy: 0;
  color-scheme: dark;
}

@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 80% -5%, rgba(155, 107, 255, 0.28), transparent 60%),
    radial-gradient(900px 700px at -10% 15%, rgba(79, 125, 255, 0.26), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(255, 94, 200, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); }
h1, h2, h3 { line-height: 1.08; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 850; letter-spacing: -0.035em; }
p { margin: 0 0 1em; }
::selection { background: rgba(155, 107, 255, 0.55); color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
.skip {
  position: fixed; left: 12px; top: -80px; z-index: 200;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Calques de fond ---------- */
.nexus-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; opacity: 0; transition: opacity 1.6s ease; }
.nexus-bg.is-on { opacity: 1; }
.gl body { background: transparent; }
.grain {
  position: fixed; inset: -50%; z-index: -1; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cursor-glow {
  position: fixed; left: 0; top: 0; z-index: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px;
  border-radius: 50%; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(111, 140, 255, 0.16), rgba(155, 107, 255, 0.07) 40%, transparent 68%);
  transition: opacity .6s;
}
.fx-pointer .cursor-glow { opacity: 1; }
.progress {
  position: fixed; left: 0; top: 0; z-index: 120; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet), var(--magenta));
  transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
  box-shadow: 0 0 12px rgba(155, 107, 255, 0.8);
}

/* ---------- En-tête ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color .4s, border-color .4s;
}
.top.is-scrolled {
  background: rgba(6, 7, 26, 0.7);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.top-inner { display: flex; align-items: center; gap: 24px; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 0 12px rgba(79, 125, 255, 0.7)); transition: transform .6s var(--ease); }
.brand:hover img { transform: rotate(-12deg) scale(1.08); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a, .lang a {
  position: relative; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 7px 14px; border-radius: 999px; transition: color .25s, background-color .25s;
}
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--text); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.lang { display: flex; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255, 255, 255, 0.04); }
.lang a { padding: 4px 11px; font-size: 0.85rem; letter-spacing: 0.05em; }
.lang a:hover { color: var(--text); }
.lang a[aria-current] { color: #fff; background: linear-gradient(135deg, var(--blue), var(--violet)); box-shadow: 0 0 16px rgba(130, 110, 255, 0.6); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 110px 0 90px; overflow: hidden; isolation: isolate;
}
.hero::before { /* assombrit le fond derrière le texte pour garder un bon contraste */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70% 80% at 18% 50%, rgba(5, 6, 26, 0.72), transparent 70%);
}
.hero-word {
  position: absolute; z-index: -1; left: 50%; top: 50%; margin: 0;
  font-size: clamp(7rem, 23vw, 22rem); font-weight: 900; line-height: 0.82; letter-spacing: -0.06em; text-align: center;
  color: transparent; -webkit-text-stroke: 1.5px rgba(160, 175, 255, 0.09);
  transform: translate(-50%, calc(-50% + var(--sy) * 0.35px)) translate(calc(var(--px) * -18px), calc(var(--py) * -12px));
  user-select: none; white-space: nowrap;
}
.hero-grid { display: grid; grid-template-columns: 1.08fr 1fr; align-items: center; gap: 30px; }
.hero-copy > * { animation: rise 1.1s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .12s; }
.hero-copy > :nth-child(3) { animation-delay: .26s; }
.hero-copy > :nth-child(4) { animation-delay: .4s; }
.hero-copy > :nth-child(5) { animation-delay: .52s; }
@keyframes rise { from { opacity: 0; transform: translateY(34px); filter: blur(10px); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 24px; padding: 7px 16px 7px 12px; border-radius: 999px;
  border: 1px solid var(--border-2); background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: var(--cyan); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--cyan); animation: ping 2s ease-out infinite; }
@keyframes ping { to { transform: scale(3.2); opacity: 0; } }

.hero-title { font-size: clamp(2.6rem, 6vw, 5.2rem); font-weight: 900; letter-spacing: -0.045em; line-height: 0.98; margin-bottom: 26px; text-wrap: balance; }
.glow {
  background: linear-gradient(100deg, var(--cyan) 0%, var(--blue) 25%, var(--violet) 50%, var(--magenta) 70%, var(--cyan) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 8s linear infinite;
  filter: drop-shadow(0 0 28px rgba(120, 110, 255, 0.45));
}
@keyframes shimmer { to { background-position: -220% 0; } }
.lead { font-size: clamp(1.06rem, 1.5vw, 1.24rem); color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 34px 0 26px; }
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 15px 28px; border-radius: 999px;
  color: #fff; font-weight: 750; text-decoration: none; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, var(--blue), var(--violet) 60%, var(--magenta));
  background-size: 160% 100%;
  box-shadow: 0 12px 36px -10px rgba(120, 100, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translate(var(--bx, 0), var(--by, 0));
  transition: transform .35s var(--ease), box-shadow .3s, background-position .5s;
}
.btn::before { /* reflet qui balaie le bouton au survol */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateX(120%); }
.btn:hover { background-position: 100% 0; box-shadow: 0 18px 44px -12px rgba(150, 110, 255, 1), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; transition: transform .3s var(--ease); }
.btn:hover svg:last-child { transform: translateX(3px); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-2); box-shadow: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(88, 101, 242, 0.28); border-color: rgba(140, 150, 255, 0.6); box-shadow: 0 12px 34px -14px var(--discord); }
.btn-ghost:hover svg:last-child { transform: none; }
.stat { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em; }
.stat-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; }

/* Anneau 3D des visuels autour du logo */
.hero-art { position: relative; perspective: 1200px; display: grid; place-items: center; height: min(560px, 70vh); animation: fade-in 1.6s .3s var(--ease) both; }
@keyframes fade-in { from { opacity: 0; transform: scale(.92); } }
.scene {
  --r: 250px;
  position: relative; width: 100%; height: 100%; transform-style: preserve-3d;
  transform: rotateX(calc(var(--py) * -9deg)) rotateY(calc(var(--px) * 14deg)) translateY(calc(var(--sy) * -0.12px));
}
/* Chaque visuel tourne autour du logo (angle --a animé, décalé par un délai négatif) en restant face à l'écran. */
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.ring { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(-16deg); }
.ring-item {
  --w: 200px;
  position: absolute; left: 50%; top: 50%; width: var(--w); aspect-ratio: 16 / 9; margin: calc(var(--w) * -0.28125) 0 0 calc(var(--w) / -2);
  border-radius: 14px; overflow: hidden;
  --a: calc(var(--i, 0) * 360deg / var(--ring-n, 5) + 20deg);
  animation: orbit3d 40s linear infinite; animation-delay: calc(var(--i, 0) * -40s / var(--ring-n, 5));
  transform: rotateY(var(--a)) translateZ(var(--r)) rotateY(calc(-1 * var(--a))) rotateX(16deg);
  border: 1px solid color-mix(in srgb, var(--accent, var(--blue)) 70%, white 10%);
  box-shadow: 0 0 40px -6px var(--accent, var(--blue)), 0 20px 50px -20px #000;
  background: #000;
}
.ring-item img { width: 100%; height: 100%; object-fit: cover; }
.ring-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), transparent 40%); }
.core { position: absolute; left: 50%; top: 50%; width: 210px; height: 210px; margin: -105px 0 0 -105px; display: grid; place-items: center; transform-style: preserve-3d; }
.core img { position: relative; width: 100%; height: auto; filter: drop-shadow(0 0 34px rgba(79, 125, 255, 0.85)) drop-shadow(0 0 80px rgba(155, 107, 255, 0.5)); animation: float 7s ease-in-out infinite; }
.echo { position: absolute; inset: 8%; border-radius: 50%; border: 2px solid rgba(111, 214, 255, 0.55); box-shadow: 0 0 22px rgba(111, 214, 255, 0.35), inset 0 0 22px rgba(155, 107, 255, 0.3); animation: echo 4.5s cubic-bezier(.1, .6, .3, 1) infinite; opacity: 0; }
.echo:nth-child(2) { animation-delay: 1.5s; }
.echo:nth-child(3) { animation-delay: 3s; }
@keyframes echo { 0% { transform: scale(.55); opacity: 0; } 12% { opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes orbit3d { from { --a: 0deg; } to { --a: -360deg; } }
@keyframes float { 50% { transform: translateY(-14px); } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase;
  animation: fade-in 1s 1.2s both; opacity: calc(1 - var(--sy) / 200);
}
.mouse { width: 22px; height: 34px; border-radius: 12px; border: 2px solid rgba(178, 184, 220, 0.6); position: relative; }
.mouse::after { content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: var(--cyan); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-3px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(9px); } }

/* ---------- Bandeau défilant ---------- */
.marquee {
  position: relative; z-index: 2; margin: 0 -2vw; padding: 16px 0; overflow: hidden; transform: rotate(-2deg);
  background: linear-gradient(90deg, var(--blue), var(--violet) 45%, var(--magenta));
  box-shadow: 0 20px 60px -20px rgba(155, 107, 255, 0.8);
}
.marquee-track { display: flex; width: max-content; gap: 28px; align-items: center; animation: marquee 38s linear infinite; }
.marquee span { font-size: clamp(1.3rem, 2.6vw, 2.1rem); font-weight: 900; letter-spacing: -0.02em; text-transform: uppercase; color: #fff; white-space: nowrap; }
.marquee i { font-style: normal; color: rgba(255, 255, 255, 0.6); font-size: 1.2rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 150px) 0; scroll-margin-top: 20px; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.kicker { display: flex; align-items: center; gap: 12px; color: var(--cyan); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 18px; }
.kicker::before { content: ""; width: 34px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--cyan), var(--violet)); }
.section-lead { color: var(--muted); font-size: 1.12rem; max-width: 40em; margin: 0; }

/* ---------- Apparition au défilement (seulement si fx.js tourne) ---------- */
.fx [data-reveal] { opacity: 0; transform: translateY(48px) scale(.97); filter: blur(8px); transition: opacity 1s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s), filter 1s var(--ease) var(--d, 0s); }
.fx [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* ---------- Cartes des projets ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.card { perspective: 1400px; }
.card--featured { grid-column: 1 / -1; }
.card-link {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column; height: 100%;
  color: inherit; text-decoration: none; border-radius: var(--radius);
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px -40px #000;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .6s var(--ease), box-shadow .5s, border-color .5s;
}
.card-link.is-tilting { transition: transform .12s linear, box-shadow .5s, border-color .5s; }
.card-link::before { /* bordure lumineuse qui tourne au survol */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--angle), transparent 0 55%, var(--accent, var(--blue)) 75%, #fff 80%, var(--accent, var(--blue)) 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .5s; animation: turn 4s linear infinite;
}
@keyframes turn { to { --angle: 360deg; } }
.card-link:hover, .card-link:focus-visible {
  border-color: color-mix(in srgb, var(--accent, var(--blue)) 50%, transparent);
  box-shadow: 0 40px 90px -40px var(--accent, var(--blue)), 0 0 0 1px color-mix(in srgb, var(--accent, var(--blue)) 25%, transparent);
}
.card-link:hover::before, .card-link:focus-visible::before { opacity: 1; }
.card-link:focus-visible { outline-offset: 6px; border-radius: var(--radius); }
.card-glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s; mix-blend-mode: soft-light;
  background: radial-gradient(520px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.5), transparent 45%);
}
.card-link:hover .card-glare { opacity: 1; }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; background: #000; transform: translateZ(30px); }
.card-media img {
  width: 100%; height: 100%; object-fit: cover; transform: scale(1.04);
  transition: transform 1s var(--ease), filter .6s;
}
.card-link:hover .card-media img { transform: scale(1.12) translate(var(--ix, 0px), var(--iy, 0px)); filter: saturate(1.15) brightness(1.05); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(10, 12, 36, 0.92)); }
.card-kind {
  position: absolute; left: 18px; bottom: 16px; z-index: 1;
  padding: 5px 13px; border-radius: 999px; font-size: 0.78rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase;
  color: #fff; background: color-mix(in srgb, var(--accent, var(--blue)) 70%, #000);
  box-shadow: 0 0 22px -4px var(--accent, var(--blue));
}
.card-num {
  position: absolute; right: 18px; top: 10px; z-index: 1; font-size: 3.4rem; font-weight: 900; line-height: 1; letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.55); text-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}
.card-body { display: flex; flex-direction: column; flex: 1; padding: 26px 28px 30px; transform: translateZ(20px); }
.card-body h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); font-weight: 850; letter-spacing: -0.03em; margin-bottom: 0.3em; }
.card-tagline { font-weight: 650; font-size: 1.05rem; color: color-mix(in srgb, var(--accent, var(--blue)) 40%, #fff); }
.card-desc { color: var(--muted); font-size: 0.98rem; }
.tags { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 7px; }
.tags li { font-size: 0.78rem; font-weight: 650; color: var(--text); padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border-2); background: rgba(255, 255, 255, 0.04); }
.card-req { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; color: var(--muted); margin-top: auto; }
.card-req svg { flex: none; width: 18px; height: 18px; margin-top: 2px; fill: color-mix(in srgb, var(--accent, var(--blue)) 60%, #fff); }
.card-cta {
  position: relative; display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; margin-top: 10px;
  padding: 12px 22px; border-radius: 999px; font-weight: 750; color: #fff; overflow: hidden;
  background: color-mix(in srgb, var(--accent, var(--blue)) 62%, #000);
  box-shadow: 0 10px 30px -12px var(--accent, var(--blue));
  transition: gap .3s var(--ease), background-color .3s, box-shadow .3s;
}
.card-cta svg { width: 18px; height: 18px; fill: currentColor; }
.card-link:hover .card-cta, .card-link:focus-visible .card-cta { gap: 14px; background: color-mix(in srgb, var(--accent, var(--blue)) 80%, #000); box-shadow: 0 14px 36px -10px var(--accent, var(--blue)); }

/* Jeu temporairement indisponible : carte grisée, sans lien ni effet au survol */
.card-link--off { cursor: default; }
.card-link--off .card-media img, .card-link--off:hover .card-media img { filter: grayscale(1) brightness(.55); transform: scale(1.04); }
.card-link--off:hover { border-color: var(--border); box-shadow: 0 30px 60px -40px #000; }
.card-link--off:hover::before, .card-link--off:hover .card-glare { opacity: 0; }
.card-link--off .card-cta, .card-link--off:hover .card-cta { gap: 9px; background: rgba(255, 255, 255, 0.08); color: var(--muted); box-shadow: none; }
.card-off {
  position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%) rotate(-4deg);
  padding: 8px 18px; border-radius: 10px; white-space: nowrap;
  font-size: 0.95rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: #1a1206; background: #ffcf5a; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.7);
}

/* Carte mise en avant : visuel à gauche, texte à droite */
@media (min-width: 861px) {
  .card--featured .card-link { flex-direction: row; }
  .card--featured .card-media { flex: 0 0 60%; aspect-ratio: auto; min-height: 380px; border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px); }
  .card--featured .card-media::after { background: linear-gradient(90deg, transparent 55%, rgba(10, 12, 36, 0.9)), linear-gradient(180deg, transparent 60%, rgba(10, 12, 36, 0.6)); }
  .card--featured .card-body { justify-content: center; padding: 40px 40px 40px 34px; }
  .card--featured .card-body h3 { font-size: clamp(2.2rem, 3.6vw, 3rem); }
}

/* ---------- Étapes ---------- */
.steps { position: relative; isolation: isolate; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.steps::before { /* fil qui relie les étapes, tracé quand elles apparaissent */
  content: ""; position: absolute; left: 8%; right: 8%; top: 60px; height: 2px; z-index: -1;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet), var(--magenta));
  box-shadow: 0 0 16px rgba(155, 107, 255, 0.8);
  transform-origin: 0 50%; transform: scaleX(1); transition: transform 1.6s var(--ease) .3s;
}
.fx .steps::before { transform: scaleX(0); }
.fx .steps:has(.is-in)::before { transform: scaleX(1); }
.steps li {
  position: relative; padding: 32px 30px; border-radius: var(--radius);
  background: linear-gradient(165deg, var(--panel-2), var(--panel)); border: 1px solid var(--border);
}
.steps li:hover { border-color: var(--border-2); box-shadow: 0 30px 60px -36px rgba(120, 110, 255, 0.9); }
.steps h3 { font-size: 1.3rem; font-weight: 800; }
.steps p { color: var(--muted); margin: 0; }
.step-n {
  display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 20px; border-radius: 16px;
  font-weight: 900; font-size: 1.2rem; color: #fff; background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 0 0 6px rgba(14, 16, 46, 0.95), 0 0 30px rgba(120, 110, 255, 0.7);
}

/* ---------- À propos ---------- */
.about { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 50px; }
.about-text > p:not(.kicker):not(.lead) { color: var(--muted); }
.about-text .lead { color: var(--text); }
.about-art { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-width: 420px; justify-self: center; width: 100%; }
.about-art img { position: relative; width: 62%; height: auto; filter: drop-shadow(0 0 40px rgba(79, 125, 255, 0.6)); animation: float 7s ease-in-out infinite; }
.orbit {
  position: absolute; inset: 4%; border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 125, 255, 0.3), transparent 62%);
  border: 1px dashed rgba(160, 175, 255, 0.3);
  animation: spin 50s linear infinite;
}
.orbit-2 { inset: 16%; background: none; border-style: solid; border-color: rgba(155, 107, 255, 0.25); animation-duration: 28s; animation-direction: reverse; }
.orbit::after {
  content: ""; position: absolute; top: 8%; left: 50%; width: 12px; height: 12px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 18px 5px rgba(111, 214, 255, 0.75);
}
.orbit-2::after { top: auto; bottom: 2%; left: 30%; width: 9px; height: 9px; background: var(--magenta); box-shadow: 0 0 16px 4px rgba(255, 94, 200, 0.7); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Discord ---------- */
.discord { padding-top: 0; }
.discord-panel {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding: clamp(48px, 7vw, 84px) clamp(24px, 6vw, 80px); border-radius: 32px;
  background: linear-gradient(135deg, #3a43c0, #4c58e0 40%, #6a43cc 80%, #8f3fb4);
  box-shadow: 0 50px 120px -50px rgba(88, 101, 242, 0.9);
}
.discord-panel::before { /* halo qui balaie le panneau */
  content: ""; position: absolute; inset: -50%; z-index: -1;
  background: conic-gradient(from var(--angle), transparent 0 70%, rgba(255, 255, 255, 0.22) 80%, transparent 90%);
  animation: turn 9s linear infinite;
}
.discord-panel::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 80% at 50% 0%, rgba(255, 255, 255, 0.14), transparent 70%);
}
.discord-panel h2 { color: #fff; margin-bottom: 0.35em; }
.discord-panel p { color: #fff; font-size: 1.12rem; max-width: 34em; margin: 0 auto 30px; }
.btn-discord { background: #fff; color: #2b2f8f; box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.6); }
.btn-discord:hover { background: #fff; box-shadow: 0 22px 50px -14px rgba(0, 0, 0, 0.7); }
.btn-discord::before { background: linear-gradient(105deg, transparent 30%, rgba(88, 101, 242, 0.25) 50%, transparent 70%); }

/* ---------- Pied de page ---------- */
.foot { position: relative; border-top: 1px solid var(--border); padding: 40px 0 44px; background: rgba(3, 4, 16, 0.65); }
.foot::before { content: ""; position: absolute; left: 10%; right: 10%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--violet), var(--cyan), transparent); }
.fan-note { font-size: 0.85rem; color: var(--muted); max-width: 60em; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; font-size: 0.9rem; color: var(--muted); }
.foot-row p { margin: 0; }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 24px 16px; }
.notfound img { width: 96px; margin-bottom: 20px; filter: drop-shadow(0 0 30px rgba(79, 125, 255, 0.7)); animation: float 7s ease-in-out infinite; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; }
.notfound p { color: var(--muted); margin: 0 0 .4em; }
.notfound .hero-actions { justify-content: center; margin-top: 24px; }

/* ---------- Tablette et mobile ---------- */
@media (max-width: 1020px) {
  .scene { --r: 200px; }
  .ring-item { --w: 170px; }
  .core { width: 170px; height: 170px; margin: -85px 0 0 -85px; }
}
@media (max-width: 860px) {
  .hero { padding: 96px 0 70px; }
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-art { order: -1; height: 300px; margin: -10px 0 6px; }
  .scene { --r: 150px; }
  .ring-item { --w: 132px; }
  .core { width: 130px; height: 130px; margin: -65px 0 0 -65px; }
  .hero::before { background: radial-gradient(90% 60% at 50% 65%, rgba(5, 6, 26, 0.7), transparent 75%); }
  .scroll-hint { display: none; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { left: 58px; right: auto; top: 40px; bottom: 40px; width: 2px; height: auto; transform-origin: 50% 0; }
  .fx .steps::before { transform: scaleY(0); }
  .fx .steps:has(.is-in)::before { transform: scaleY(1); }
  .about { grid-template-columns: 1fr; gap: 10px; }
  .about-art { order: -1; max-width: 240px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .top-inner { gap: 10px; height: 62px; }
  .nav { display: none; }
  .lang { margin-left: auto; }
  .hero-art { height: 250px; }
  .scene { --r: 122px; }
  .ring-item { --w: 108px; border-radius: 10px; }
  .core { width: 112px; height: 112px; margin: -56px 0 0 -56px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .card-body { padding: 22px 20px 24px; }
  .card-num { font-size: 2.6rem; }
  .steps li { padding: 26px 22px; }
  .steps::before { left: 49px; }
  .eyebrow { font-size: 0.72rem; letter-spacing: 0.06em; }
  .discord-panel { border-radius: 24px; }
}

/* ---------- Mouvement réduit : tout reste lisible et immobile ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .echo { opacity: .5; transform: scale(1.4); }
  .cursor-glow { display: none; }
  .fx [data-reveal] { opacity: 1; transform: none; filter: none; }
  .fx .steps::before { transform: none; }
}

/* ---------- Généré par build.mjs ---------- */
:root { --ring-n: 5; }
.card--echoforms, .ring-item:nth-child(1) { --accent: #7c8cff; --i: 0; }
.card--sonic-online, .ring-item:nth-child(2) { --accent: #3b8bff; --i: 1; }
.card--daggerfall-online, .ring-item:nth-child(3) { --accent: #e0703f; --i: 2; }
.card--needle-drop, .ring-item:nth-child(4) { --accent: #e8a33d; --i: 3; }
.card--retroasis, .ring-item:nth-child(5) { --accent: #ff7a3a; --i: 4; }
