/* « Ce que ça a donné » — one project per slide: the public site layered over
   the system behind it. Tokens come from css/tokens.css (--nx-*, fonts, radii). */

.nxsys {
  --nxsys-line: rgba(255, 255, 255, 0.1);
  --nxsys-muted: rgba(249, 250, 246, 0.68);
  position: relative;
  padding: clamp(64px, 9vw, var(--section-padding-lg)) 0 clamp(56px, 7vw, var(--section-padding-md));
  background:
    radial-gradient(60% 50% at 85% 30%, rgba(122, 38, 251, 0.22), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(6, 182, 212, 0.12), transparent 70%),
    var(--nx-gradient-dark);
  color: var(--nx-surface);
  overflow: hidden;
}
.nxsys__inner { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-padding); }

.nxsys__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 4vw, 48px); }
.nxsys__kicker { margin: 0 0 10px; color: var(--nx-purple); font: 700 var(--fs-small)/1.2 var(--body-font); text-transform: uppercase; letter-spacing: 0.04em; }
.nxsys__title { margin: 0; font: 400 var(--fs-h2)/var(--lh-h2) var(--heading-font); letter-spacing: var(--ls-heading); }
.nxsys__note { margin: 12px 0 0; max-width: 52ch; color: var(--nxsys-muted); font: 400 var(--fs-body)/var(--lh-body) var(--body-font); }

.nxsys__nav { display: flex; gap: 10px; flex-shrink: 0; }
.nxsys__arrow {
  width: 48px; height: 48px; display: grid; place-items: center;
  border: 1px solid var(--nxsys-line); border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04); color: var(--nx-surface); cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.nxsys__arrow:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.24); }
.nxsys__arrow:focus-visible { outline: 2px solid var(--nx-lime); outline-offset: 3px; }
.nxsys__arrow:disabled { opacity: 0.3; cursor: default; }

.nxsys__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 94%; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  overscroll-behavior-x: contain; scrollbar-width: none;
  margin: 0; padding: 0; list-style: none;
}
.nxsys__track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .nxsys__track { scroll-behavior: auto; } }

.nxsys__slide {
  scroll-snap-align: start;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center; gap: clamp(28px, 4vw, 64px);
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--nxsys-line); border-radius: calc(var(--radius-card) * 1.5);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  min-width: 0;
}

.nxsys__client { display: flex; align-items: center; gap: 12px; margin: 0 0 clamp(18px, 2.4vw, 28px); }
.nxsys__client img { width: 44px; height: 44px; padding: 4px; border-radius: 12px; object-fit: contain; background: rgba(255, 255, 255, 0.06); }
.nxsys__client--clair img { background: var(--nx-surface); }
.nxsys__client-name { display: block; font: 400 var(--fs-h5)/1.1 var(--heading-font); letter-spacing: 0.01em; text-transform: uppercase; }
.nxsys__client-type { display: block; margin-top: 3px; color: var(--nxsys-muted); font: 500 13px/1.2 var(--body-font); }

.nxsys__figure { margin: 0; font: 400 clamp(64px, 9vw, 132px)/0.9 var(--heading-font); letter-spacing: -0.01em; color: var(--nx-lime); text-shadow: 0 0 32px rgba(200, 253, 131, 0.25); }
.nxsys__figure--word { font-size: clamp(48px, 6.4vw, 92px); }
.nxsys__figure-label { margin: 8px 0 0; font: 400 var(--fs-h4)/var(--lh-h4) var(--heading-font); text-transform: uppercase; }
.nxsys__second { margin: 18px 0 0; display: flex; align-items: baseline; gap: 10px; color: var(--nxsys-muted); font: 500 15px/1.3 var(--body-font); }
.nxsys__second b { color: var(--nx-surface); font: 400 28px/1 var(--heading-font); }
.nxsys__desc { margin: 18px 0 0; max-width: 44ch; color: var(--nxsys-muted); font: 400 var(--fs-body)/var(--lh-body) var(--body-font); }
.nxsys__link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  color: var(--nx-lime); font: 600 14px/1 var(--body-font); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
}
.nxsys__link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Visual: browser window (public site) behind, system window in front. */
.nxsys__visual { position: relative; aspect-ratio: 16 / 11; min-width: 0; }
.nxsys__win {
  position: absolute; margin: 0; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 12px;
  background: var(--nx-night);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.nxsys__win::before {
  content: ""; display: block; height: 22px;
  background:
    radial-gradient(circle at 12px 11px, #ff5f57 4px, transparent 4.5px),
    radial-gradient(circle at 26px 11px, #febc2e 4px, transparent 4.5px),
    radial-gradient(circle at 40px 11px, #28c840 4px, transparent 4.5px),
    rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nxsys__win img { display: block; width: 100%; height: auto; }
.nxsys__win figcaption {
  position: absolute; top: 30px; left: 10px;
  padding: 5px 9px; border-radius: var(--radius-pill);
  background: rgba(5, 7, 13, 0.82); color: var(--nx-surface);
  font: 600 11px/1 var(--body-font); letter-spacing: 0.06em; text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.nxsys__win--site { top: 0; left: 0; width: 74%; transform: rotate(-1.5deg); opacity: 0.92; }
.nxsys__win--system { right: 0; bottom: 0; width: 78%; }
.nxsys__win--system figcaption { background: var(--nx-violet); }
.nxsys__visual--solo .nxsys__win--site { width: 100%; transform: none; opacity: 1; position: relative; }
.nxsys__visual--solo { aspect-ratio: auto; }

/* Tab row: every project visible at once. */
.nxsys__tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.nxsys__tab {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 12px 14px; text-align: left; cursor: pointer;
  border: 1px solid var(--nxsys-line); border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.03); color: var(--nx-surface);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.nxsys__tab:hover { background: rgba(255, 255, 255, 0.07); }
.nxsys__tab[aria-current="true"] { border-color: var(--nx-lime); background: rgba(200, 253, 131, 0.08); }
.nxsys__tab:focus-visible { outline: 2px solid var(--nx-lime); outline-offset: 3px; }
.nxsys__tab-logo { flex: 0 0 auto; width: 40px; height: 40px; padding: 4px; border-radius: 10px; object-fit: contain; background: rgba(255, 255, 255, 0.06); }
.nxsys__tab-logo--clair { background: var(--nx-surface); }
.nxsys__tab-txt { display: grid; gap: 3px; min-width: 0; }
.nxsys__tab-name { font: 400 16px/1.1 var(--heading-font); text-transform: uppercase; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nxsys__tab-fig { color: var(--nxsys-muted); font: 500 13px/1.2 var(--body-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nxsys__tab[aria-current="true"] .nxsys__tab-fig { color: var(--nx-lime); }

@media (max-width: 900px) {
  .nxsys__head { align-items: flex-start; }
  .nxsys__nav { display: none; }
  .nxsys__track { grid-auto-columns: 88%; gap: 14px; scroll-padding-inline: var(--container-padding); }
  .nxsys__tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .nxsys__tab { gap: 8px; padding: 8px 10px; }
  .nxsys__tab-logo { width: 32px; height: 32px; padding: 3px; border-radius: 8px; }
  .nxsys__tab-name { font-size: 14px; }
  .nxsys__tab-fig { font-size: 12px; }
  .nxsys__slide { grid-template-columns: 1fr; gap: 22px; padding: 18px; }
  .nxsys__visual { order: -1; }
  .nxsys__win--site figcaption { display: none; }
  .nxsys__figure { font-size: clamp(56px, 18vw, 84px); }
  .nxsys__figure--word { font-size: clamp(40px, 12vw, 60px); }
}
