/* ZOT SI — Zero Ops Design System (hub App Demo) */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --zot-canvas: #050a10;
  --zot-ink-lift: #0f1a24;
  --zot-glass-bg: rgba(10, 25, 47, 0.7);
  --zot-glass-blur: 16px;
  --zot-accent: #00f5a0;
  --zot-accent-dim: #00a86b;
  --zot-accent-foreground: #050a10;
  --zot-text: rgba(255, 255, 255, 0.95);
  --zot-muted: rgba(255, 255, 255, 0.62);
  --zot-border: rgba(255, 255, 255, 0.1);
  --zot-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --zot-radius: 1.5rem;
  --zot-radius-xl: 2rem;
  --phone-bezel: #0a121c;
  --phone-edge: #16222c;
  font-family: Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background-color: var(--zot-canvas);
  color: var(--zot-text);
}

body {
  position: relative;
  background:
    radial-gradient(900px 480px at 78% 0%, rgba(0, 245, 160, 0.1), transparent 55%),
    radial-gradient(700px 400px at 8% 90%, rgba(0, 168, 107, 0.12), transparent 50%),
    var(--zot-canvas);
}

/* Grain Zero Ops */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

body > * {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
.zot-mono {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: 0.85em;
  color: var(--zot-accent);
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
  font-weight: 700;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}

/* —— Header brand —— */
.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img.mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(0, 245, 160, 0.25), 0 8px 28px rgba(0, 245, 160, 0.12);
}

.brand img.wordmark {
  height: 28px;
  width: auto;
  display: block;
}

.brand .eyebrow {
  margin: 0 0 4px;
  color: var(--zot-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.brand p {
  margin: 6px 0 0;
  color: var(--zot-muted);
  font-size: 0.92rem;
  max-width: 36rem;
  line-height: 1.45;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.7rem 1.25rem;
  border-radius: var(--zot-radius);
  background: var(--zot-accent);
  color: var(--zot-accent-foreground);
  font-weight: 600;
  font-size: 0.9rem;
  transition: box-shadow 0.25s var(--zot-ease), transform 0.25s var(--zot-ease);
}

.header-cta:hover {
  box-shadow: 0 0 24px rgba(0, 245, 160, 0.4);
  transform: translateY(-2px);
}

.crumb {
  margin: -12px 0 24px;
  font-size: 0.9rem;
}

.crumb a {
  color: var(--zot-accent);
  font-weight: 600;
}

.crumb a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-label {
  margin: 0 0 14px;
  color: var(--zot-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* Glass cards */
.card {
  display: block;
  padding: 20px;
  border-radius: var(--zot-radius);
  background: var(--zot-glass-bg);
  backdrop-filter: blur(var(--zot-glass-blur));
  -webkit-backdrop-filter: blur(var(--zot-glass-blur));
  border: 1px solid var(--zot-border);
  position: relative;
  transition: transform 0.25s var(--zot-ease), box-shadow 0.25s var(--zot-ease),
    border-color 0.25s var(--zot-ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 55%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 245, 160, 0.1);
  border-color: rgba(0, 245, 160, 0.35);
}

.card .eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--zot-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card h2 {
  margin: 10px 0 6px;
  font-size: 1.2rem;
}

.card p {
  margin: 0;
  color: var(--zot-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.card .meta {
  margin-top: 12px;
  font-size: 0.78rem;
  font-family: ui-monospace, Menlo, monospace;
  color: rgba(255, 255, 255, 0.45);
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.badge.live {
  background: rgba(0, 245, 160, 0.14);
  color: var(--zot-accent);
  border: 1px solid rgba(0, 245, 160, 0.4);
}

.badge.planned {
  background: rgba(255, 255, 255, 0.05);
  color: var(--zot-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--zot-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--zot-muted);
  font-size: 0.8rem;
}

.site-footer strong {
  color: var(--zot-text);
  font-weight: 600;
}

/* —— Device stage —— */
.stage {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--zot-border);
  background: rgba(5, 10, 16, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.stage-bar a.back {
  color: var(--zot-accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.stage-bar .meta h1 {
  margin: 0;
  font-size: 1.05rem;
}

.stage-bar .meta p {
  margin: 2px 0 0;
  color: var(--zot-muted);
  font-size: 0.8rem;
}

.stage-bar .open-raw {
  font-size: 0.8rem;
  color: var(--zot-muted);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 14px;
  border-radius: 999px;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.stage-bar .open-raw:hover {
  color: var(--zot-accent);
  border-color: rgba(0, 245, 160, 0.45);
  box-shadow: 0 0 16px rgba(0, 245, 160, 0.15);
}

.viewport {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 40px;
}

.viewport.stage-split {
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.access-panel {
  width: min(280px, 92vw);
  padding: 18px 18px 16px;
  border-radius: var(--zot-radius);
  background: var(--zot-glass-bg);
  backdrop-filter: blur(var(--zot-glass-blur));
  -webkit-backdrop-filter: blur(var(--zot-glass-blur));
  border: 1px solid var(--zot-border);
  margin-top: 12px;
}

.access-panel .section-label {
  margin-bottom: 8px;
}

.access-role {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--zot-text);
  font-weight: 600;
}

.access-field {
  display: block;
  margin-bottom: 10px;
}

.access-field > span {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--zot-muted);
  margin-bottom: 4px;
}

.access-copy {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--zot-text);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.access-copy code {
  font-size: 0.82rem;
  color: var(--zot-accent);
  word-break: break-all;
}

.access-copy:hover,
.access-copy.copied {
  border-color: rgba(0, 245, 160, 0.45);
  box-shadow: 0 0 16px rgba(0, 245, 160, 0.12);
}

.access-hint {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--zot-muted);
  line-height: 1.4;
}

.access-note {
  margin: 14px 0 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
}

.device {
  position: relative;
  background: linear-gradient(160deg, #16222c, var(--phone-bezel));
  box-shadow:
    0 0 0 1px var(--phone-edge),
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(0, 245, 160, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.device.phone {
  width: min(390px, 92vw);
  aspect-ratio: 390 / 844;
  border-radius: 44px;
  padding: 12px;
}

.device.tablet {
  width: min(820px, 96vw);
  aspect-ratio: 820 / 1180;
  max-height: calc(100vh - 120px);
  border-radius: 28px;
  padding: 14px;
}

.device .notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 28px;
  background: #050a10;
  border-radius: 20px;
  z-index: 3;
}

.device.tablet .notch {
  display: none;
}

.device .screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--zot-ink-lift);
}

.device.tablet .screen {
  border-radius: 18px;
}

.device iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--zot-ink-lift);
}

.placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(400px 240px at 50% 20%, rgba(0, 245, 160, 0.1), transparent 60%),
    var(--zot-ink-lift);
}

.placeholder img {
  border-radius: 14px;
  opacity: 0.95;
}

.placeholder strong {
  font-size: 1.05rem;
}

.placeholder p {
  margin: 0;
  color: var(--zot-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 260px;
}

.hint {
  margin-top: 18px;
  text-align: center;
  color: var(--zot-muted);
  font-size: 0.8rem;
  font-family: ui-monospace, Menlo, monospace;
}

.error {
  padding: 24px;
  color: #fecaca;
}

/* —— Product cards (accueil) —— */
.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.product-card {
  padding: 0;
  overflow: hidden;
}

.product-card .product-cover {
  height: 160px;
  background: var(--zot-ink-lift) center/cover no-repeat;
  border-bottom: 1px solid var(--zot-border);
}

.product-card .product-body {
  padding: 16px 18px 18px;
}

/* —— Page verticale (fiche Codeur) —— */
.product-page {
  display: grid;
  gap: 28px;
  margin-bottom: 40px;
}

@media (min-width: 900px) {
  .product-page {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.product-hero {
  border-radius: var(--zot-radius-xl);
  overflow: hidden;
  border: 1px solid var(--zot-border);
  background: var(--zot-ink-lift);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.product-hero img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.product-intro .eyebrow {
  margin: 0 0 10px;
  color: var(--zot-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.product-intro h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.product-tagline {
  margin: 0 0 14px;
  color: var(--zot-accent);
  font-weight: 600;
  font-size: 1.05rem;
}

.product-pitch {
  margin: 0 0 18px;
  color: var(--zot-muted);
  line-height: 1.55;
  font-size: 1rem;
}

.product-highlights {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.product-highlights li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--zot-text);
  font-size: 0.95rem;
}

.product-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--zot-accent);
  box-shadow: 0 0 12px rgba(0, 245, 160, 0.45);
}
