/* ==========================================================================
   Univdata · Freelance Data & BI
   Design system : sombre, grille à points, cartes "bento", accent jaune
   ========================================================================== */

:root {
  --bg: #0c0d12;
  --bg-2: #0a0b10;
  --card: #13151d;
  --card-2: #1c1f2b;
  --line: #232735;
  --line-2: #2a2f3d;
  --line-3: #3f4457;
  --tx: #fff;
  --tx-2: #e4e4e7;
  --tx-3: #d4d4d8;
  --mute: #a1a1aa;
  --mute-2: #71717a;
  --mute-3: #52525b;
  --yellow: #ffcc00;
  --indigo: #818cf8;
  --violet: #a78bfa;
  --amber: #fbbf24;
  --green: #34d399;
  --rose: #fb7185;
  --sky: #38bdf8;
  --blue: #2f4bff;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.2, .9, .3, 1.15);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  background: var(--bg); color: var(--tx); font-family: var(--sans); min-height: 100vh; overflow-x: hidden;
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1.5px, transparent 1.5px); background-size: 26px 26px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
svg { display: block; flex-shrink: 0; }
::selection { background: var(--yellow); color: #0c0d12; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

.mono { font-family: var(--mono); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 50; display: flex; justify-content: center; padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 0; pointer-events: none; }
.nav-inner {
  pointer-events: auto; display: flex; align-items: center; gap: 2px; padding: 6px;
  background: rgba(19, 21, 29, .72); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--line-2); border-radius: 999px; box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .7);
}
.nav-logo {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin-right: 6px;
  background: radial-gradient(circle at 30% 25%, #5a74ff, var(--blue) 60%, #1a2bc4);
  font-weight: 800; font-size: 13px; letter-spacing: -.04em; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 0 18px -4px rgba(47, 75, 255, .8);
  transition: transform .5s var(--spring);
}
.nav-logo:hover { transform: rotate(-12deg) scale(1.06); }
.nav-link {
  font-family: var(--mono); font-size: 13px; color: var(--tx-3); padding: 8px 14px; border-radius: 999px;
  display: flex; align-items: center; gap: 8px; transition: color .2s, background .3s;
}
.nav-link:hover { color: #fff; }
.nav-link.active { background: var(--card-2); color: #fff; }
.kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  font-family: var(--mono); font-size: 11px; color: var(--yellow);
  border: 1px solid var(--line-3); border-radius: 5px; background: var(--bg);
}
.nav-status { font-family: var(--mono); font-size: 13px; color: var(--green); display: flex; align-items: center; gap: 8px; padding: 0 14px 0 10px; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 2.2s infinite; flex-shrink: 0; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; position: relative; overflow: hidden; }
.card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .055), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.card:hover::after { opacity: 1; }
.label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.hint { font-family: var(--mono); font-size: 11.5px; color: var(--mute-2); display: flex; align-items: center; gap: 6px; }

/* ---------- Hero ---------- */
main { padding: 26px 0 40px; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.intro { background: #fafafa; color: #0c0d12; padding: 40px 40px 36px; display: flex; flex-direction: column; border: 0; }
.intro::after { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 204, 0, .12), transparent 45%); }
.loc { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #52525b; display: flex; align-items: center; gap: 8px; }
.intro { container-type: inline-size; }
.hero-title {
  /* UNIVDATA sur une seule ligne : la taille suit la largeur de la carte */
  font-size: clamp(40px, 7vw, 116px); font-size: min(16.2cqi, 128px);
  font-weight: 800; line-height: .9; letter-spacing: -.055em; white-space: nowrap;
  margin: 34px 0 28px; text-transform: uppercase;
}
.hero-title .grad { background: linear-gradient(90deg, #0c0d12 0%, #9a9dab 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-title .pt { color: var(--yellow); -webkit-text-fill-color: var(--yellow); }
.lede { font-size: 17px; line-height: 1.68; color: #3f3f46; max-width: 560px; }
.lede strong { color: #0c0d12; font-weight: 700; }
.intro hr { border: 0; border-top: 1px solid #e4e4e7; margin: 30px 0 24px; }
.badge-row { display: flex; align-items: center; gap: 16px; }
.brand-sq {
  width: 54px; height: 54px; border-radius: 12px; background: #0c0d12; color: var(--yellow);
  display: grid; place-items: center; font-weight: 800; font-size: 19px; letter-spacing: -.05em; position: relative; overflow: hidden;
}
.brand-sq::before { content: ''; position: absolute; inset: auto -10px -16px auto; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 204, 0, .18); }
.badge-txt { border-left: 1px solid #e4e4e7; padding-left: 16px; font-family: var(--mono); font-size: 12.5px; color: #71717a; line-height: 1.6; }
.badge-txt b { color: #0c0d12; font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 700; font-size: 13px;
  letter-spacing: .06em; text-transform: uppercase; padding: 14px 22px; border-radius: 999px;
  transition: transform .35s var(--spring), background .2s, color .2s, box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn-dark { background: #0c0d12; color: #fff; }
.btn-dark:hover { box-shadow: 0 10px 24px -10px rgba(12, 13, 18, .7); }
.btn-dark svg { transition: transform .35s var(--spring); }
.btn-dark:hover svg { transform: translate(2px, 2px); }
.btn-ghost { color: #0c0d12; border: 1px solid #d4d4d8; }
.btn-ghost:hover { border-color: #0c0d12; }

/* Showcase 3D */
.show { display: flex; flex-direction: column; min-height: 640px; background: radial-gradient(90% 60% at 50% 38%, rgba(255, 204, 0, .05), transparent 70%), var(--card); }
.show-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; gap: 12px; padding: 22px 24px; z-index: 2; pointer-events: none; }
.show-canvas { flex: 1; min-height: 340px; position: relative; cursor: grab; touch-action: pan-y; }
.show-canvas:active { cursor: grabbing; }
.show-canvas canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.show-info { padding: 0 24px 24px; position: relative; z-index: 2; }
.show-idx { font-family: var(--mono); font-size: 12.5px; color: var(--yellow); font-weight: 700; }
.show-idx span { color: var(--mute-2); font-weight: 400; }
.show-title { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 8px; }
.show-desc { color: var(--mute); font-size: 15px; line-height: 1.6; min-height: 48px; max-width: 520px; }
.show-fade { transition: opacity .35s, transform .45s var(--ease-out), filter .35s; }
.show-fade.out { opacity: 0; transform: translateY(8px); filter: blur(4px); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  font-family: var(--mono); font-size: 11.5px; color: var(--tx-3); background: var(--card-2);
  border: 1px solid var(--line-2); padding: 4px 10px; border-radius: 7px;
}
.show-ctrl { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.round-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center;
  color: var(--tx-3); background: var(--bg); transition: border-color .2s, color .2s, transform .3s var(--spring);
}
.round-btn:hover { border-color: var(--yellow); color: var(--yellow); transform: scale(1.08); }
.dots { display: flex; align-items: center; gap: 6px; }
.dots button { width: 7px; height: 7px; border-radius: 99px; background: var(--line-3); position: relative; overflow: hidden; transition: width .5s var(--ease-out), background .3s; }
.dots button.on { width: 34px; background: var(--line-2); }
.dots button.on::after { content: ''; position: absolute; inset: 0; width: calc(var(--p, 0) * 100%); background: var(--yellow); border-radius: inherit; }
.dots button:hover:not(.on) { background: var(--mute-2); }

/* ---------- Bento ligne 2 ---------- */
.bento { display: grid; grid-template-columns: 1.55fr 1fr 1fr; gap: 20px; margin-top: 20px; }
.stack-col { display: flex; flex-direction: column; gap: 20px; }

.pipe { min-height: 470px; display: flex; flex-direction: column; }
.pipe .show-top { position: relative; padding: 22px 24px 0; }
.pipe-canvas { flex: 1; position: relative; min-height: 340px; }
.pipe-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 18px; }
.legend span {
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg);
}
.legend span i { width: 8px; height: 8px; border-radius: 50%; }
.legend span em { font-style: normal; font-weight: 400; color: var(--mute-2); }

.company { padding: 22px; }
.pill-y { display: inline-block; margin-top: 10px; font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: #0c0d12; background: var(--yellow); border-radius: 999px; padding: 3px 10px; }
.co-head { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.co-head .brand-sq { width: 44px; height: 44px; font-size: 16px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-2); }
.co-name { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.co-sub { font-family: var(--mono); font-size: 12px; color: var(--mute); }
.years { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-top: 18px; }
.years i { height: 9px; border-radius: 3px; background: var(--tx-2); transform-origin: left; }
.years i.now { background: var(--yellow); box-shadow: 0 0 12px -2px var(--yellow); }
.reveal.in .years i { animation: grow .8s var(--ease-out) both; }
.years i:nth-child(2) { animation-delay: .08s !important; } .years i:nth-child(3) { animation-delay: .16s !important; }
.years i:nth-child(4) { animation-delay: .24s !important; } .years i:nth-child(5) { animation-delay: .32s !important; }
.years i:nth-child(6) { animation-delay: .4s !important; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.years-lbl { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-top: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--mute-2); }
.years-lbl b { color: var(--yellow); font-weight: 700; }
.co-notes { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--mute); line-height: 1.45; }
.co-notes li { display: flex; gap: 8px; }
.co-notes li::before { content: ''; width: 12px; height: 8px; margin-top: 4px; border-radius: 2px; background: var(--tx-2); flex-shrink: 0; }
.co-notes li.y::before { background: var(--yellow); }

.dispo { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.dispo-top { display: flex; justify-content: space-between; align-items: center; }
.dispo-title { display: flex; align-items: center; gap: 10px; margin: auto 0 4px; padding-top: 18px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.dispo-sub { font-family: var(--mono); font-size: 12px; color: var(--mute-2); margin-bottom: 16px; }
.btn-white { background: #fff; color: #0c0d12; justify-content: center; padding: 12px 18px; font-size: 12.5px; }
.btn-white:hover { box-shadow: 0 10px 24px -10px rgba(255, 255, 255, .45); }

.go {
  background: var(--yellow); border: 0; color: #0c0d12; padding: 22px; flex: 1; min-height: 220px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.go::after { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .35), transparent 45%); }
.go-arrow { align-self: flex-end; margin: 10px 10px 0 0; transition: transform .5s var(--spring); }
.go:hover .go-arrow { transform: translate(6px, -6px) rotate(-4deg); }
.go-title { font-size: 26px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.go-sub { font-family: var(--mono); font-size: 12px; margin-top: 6px; color: #3f3a1e; }

.social { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; transition: border-color .25s, transform .35s var(--spring); }
.social:hover { border-color: var(--line-3); transform: translateY(-2px); }
.social .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--card-2); display: grid; place-items: center; }
.social b { font-family: var(--mono); font-size: 13px; flex: 1; }
.social .arr { color: var(--mute-2); transition: transform .3s var(--spring), color .2s; }
.social:hover .arr { transform: translate(3px, -3px); color: #fff; }

/* ---------- Références ---------- */
.refs-sec { margin-top: 20px; }
.refs { display: flex; align-items: center; gap: 24px; padding: 18px 0 18px 24px; }
.refs-lbl { white-space: nowrap; flex-shrink: 0; }
.marquee { flex: 1; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 28px; width: max-content; animation: marquee 38s linear infinite; }
.refs:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-size: 22px; font-weight: 800; letter-spacing: -.03em; color: var(--tx-2); white-space: nowrap; }
.marquee-track i { width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); flex-shrink: 0; }
@keyframes marquee { to { transform: translateX(calc(-50% - 14px)); } }
.clients { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 20px; }
.client { padding: 20px; display: flex; flex-direction: column; gap: 6px; min-height: 190px; transition: border-color .3s, transform .4s var(--spring); }
.client::before { content: ''; position: absolute; left: 20px; top: 0; width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: var(--c); }
.client:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent); transform: translateY(-3px); }
.cl-when { font-family: var(--mono); font-size: 11px; color: var(--c); font-weight: 700; margin-top: 4px; }
.cl-name { font-size: 24px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin-top: auto; }
.cl-name em { font-style: normal; color: var(--mute-2); display: block; font-size: 15px; letter-spacing: -.01em; margin-top: 2px; }
.cl-role { font-family: var(--mono); font-size: 11.5px; color: var(--tx-3); }
.cl-what { font-size: 13px; color: var(--mute-2); line-height: 1.45; }

/* ---------- Parcours ---------- */
.timeline { display: flex; flex-direction: column; gap: 14px; position: relative; }
.tl-item { display: grid; grid-template-columns: 170px 1fr minmax(0, 300px); gap: 24px; align-items: start; padding: 24px; transition: border-color .3s; }
.tl-item:hover { border-color: var(--line-3); }
.tl-when { font-family: var(--mono); display: flex; flex-direction: column; gap: 4px; }
.tl-when b { color: var(--yellow); font-size: 13px; }
.tl-when span { color: var(--mute-2); font-size: 11.5px; }
.tl-main h3 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.tl-main h3 em { font-style: normal; color: var(--mute); font-weight: 600; }
.tl-main p { font-size: 14.5px; color: var(--mute); line-height: 1.65; margin-top: 8px; }
.tl-item .tags { margin-top: 0; justify-content: flex-end; }
.extra-tl { display: none; }
.timeline.full .extra-tl { display: grid; }
.tl-more {
  margin-top: 14px; width: 100%; padding: 16px; border: 1px dashed var(--line-3); border-radius: 18px;
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--tx-2); transition: border-color .2s, color .2s, background .2s;
}
.tl-more span { color: var(--mute-2); font-weight: 400; }
.tl-more:hover { border-color: var(--yellow); color: var(--yellow); background: rgba(255, 204, 0, .04); }
.tl-more.done { display: none; }
.edu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.edu-card { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.edu-card b { font-size: 17px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.edu-card > span:last-child { font-family: var(--mono); font-size: 11.5px; color: var(--mute-2); }

/* ---------- Sections ---------- */
.sec { margin-top: 130px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 28px; margin-bottom: 28px; flex-wrap: wrap; }
.sec-title {
  font-size: clamp(38px, 5.4vw, 64px); font-weight: 800; letter-spacing: -.045em; line-height: .92; text-transform: uppercase;
  background: linear-gradient(90deg, #fff 30%, #6b6f80); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sec-sub { font-family: var(--mono); font-size: 13px; color: var(--mute-2); max-width: 440px; line-height: 1.6; }

/* ---------- Terminal ---------- */
.term { background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; font-family: var(--mono); font-size: 13.5px; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9); }
.term-bar { display: flex; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); position: relative; background: #0e1016; }
.lights { display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; } .lights i:nth-child(3) { background: #28c840; }
.term-title { position: absolute; left: 50%; transform: translateX(-50%); color: var(--mute-2); font-size: 12px; white-space: nowrap; }
.term-body { padding: 18px 22px 10px; height: 360px; overflow-y: auto; scroll-behavior: smooth; }
.term-body::-webkit-scrollbar { width: 8px; } .term-body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
.tl { white-space: pre-wrap; line-height: 1.75; color: var(--tx-3); word-break: break-word; }
.tl + .tl.gap { margin-top: 10px; }
.t-m { color: var(--mute-2); } .t-y { color: var(--yellow); } .t-g { color: var(--green); } .t-i { color: var(--indigo); }
.t-r { color: var(--rose); } .t-s { color: var(--sky); } .t-w { color: #fff; font-weight: 700; }
.t-u { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.t-k { display: inline-block; padding: 0 6px; border: 1px solid var(--line-3); border-radius: 5px; font-size: 11.5px; color: var(--tx-3); line-height: 1.6; }
.term-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 14px 22px; border-top: 1px dashed var(--line); }
.term-chips .t-m { font-size: 12.5px; }
.chip-cmd { font-size: 13px; color: var(--tx-3); transition: color .2s; }
.chip-cmd::before { content: './'; color: var(--mute-3); }
.chip-cmd:hover { color: var(--yellow); }
.chip-cmd.sudo { color: var(--yellow); } .chip-cmd.sudo::before { content: ''; }
.term-input { display: flex; align-items: center; gap: 10px; margin: 0 12px 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); transition: border-color .2s, box-shadow .2s; }
.term-input:focus-within { border-color: var(--line-3); box-shadow: 0 0 0 4px rgba(255, 204, 0, .06); }
.term-input input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font: inherit; caret-color: var(--yellow); }
.term-input input::placeholder { color: var(--mute-3); }
.prompt { color: var(--green); white-space: nowrap; }
.prompt em { color: var(--indigo); font-style: normal; }

/* ---------- Offres ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.fbtn {
  font-family: var(--mono); font-size: 13px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2);
  color: var(--tx-3); background: var(--card); display: flex; gap: 8px; align-items: center; transition: background .25s, color .25s, border-color .25s;
}
.fbtn:hover { border-color: var(--line-3); }
.fbtn .n { color: var(--mute-2); font-size: 11px; }
.fbtn.on { background: #fff; color: #0c0d12; border-color: #fff; }
.view-toggle { display: flex; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); }
.view-toggle button { font-family: var(--mono); font-size: 13px; padding: 6px 14px; border-radius: 999px; color: var(--mute); display: flex; align-items: center; gap: 8px; transition: background .25s, color .25s; }
.view-toggle button.on { background: #fff; color: #0c0d12; }

.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 20px; }
.proj { display: flex; flex-direction: column; --acc: var(--yellow); transition: border-color .3s, transform .5s var(--ease-out), opacity .4s; }
.proj:hover { border-color: var(--line-3); }
.proj.hide { display: none; }
.proj.extra { display: none; }
.projects.all-shown .proj.extra:not(.hide) { display: flex; }
.proj-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--mute); background: #11131a; }
.proj-bar .lights i { width: 10px; height: 10px; }
.proj-file { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-status { font-size: 11px; color: var(--mute-2); display: flex; align-items: center; gap: 6px; transition: color .3s; }
.proj-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--mute-3); }
.proj.live .proj-status { color: var(--green); }
.proj.live .proj-status i { background: var(--green); animation: pulse 2s infinite; }
.proj-prev {
  position: relative; height: 270px; cursor: pointer; border-bottom: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(110% 80% at 50% 125%, color-mix(in srgb, var(--acc) 26%, transparent), transparent 62%), #0e1017;
}
.proj-prev canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: filter .5s, transform .6s var(--ease-out); }
.proj:not(.live) .proj-prev canvas { filter: saturate(.55) brightness(.8); }
.proj:not(.live) .proj-prev:hover canvas { transform: scale(1.015); }
.run {
  position: absolute; left: 16px; bottom: 16px; z-index: 2; display: flex; gap: 10px; align-items: center;
  background: #fff; color: #0c0d12; padding: 5px 16px 5px 5px; border-radius: 999px; font-family: var(--mono); font-weight: 700; font-size: 13px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .8); transition: opacity .3s, transform .4s var(--spring);
}
.run .play { width: 28px; height: 28px; border-radius: 50%; background: #0c0d12; display: grid; place-items: center; }
.proj-prev:hover .run { transform: scale(1.05); }
.proj.live .run { opacity: 0; transform: translateY(10px); pointer-events: none; }
.pause-hint { position: absolute; right: 14px; bottom: 14px; z-index: 2; font-family: var(--mono); font-size: 11px; color: var(--mute); background: rgba(12, 13, 18, .8); border: 1px solid var(--line-2); padding: 4px 10px; border-radius: 999px; opacity: 0; transition: opacity .3s; }
.proj.live .proj-prev:hover .pause-hint { opacity: 1; }
.proj-body { padding: 24px; font-family: var(--mono); display: flex; flex-direction: column; gap: 14px; flex: 1; }
.proj-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.proj-title { font-size: 19px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.proj-cat { font-size: 11px; font-weight: 700; color: var(--acc); letter-spacing: .07em; text-transform: uppercase; }
.proj-desc { font-size: 13.5px; line-height: 1.75; color: var(--tx-3); }
.proj-list li { padding-left: 20px; position: relative; font-size: 12.5px; color: var(--mute); line-height: 1.6; margin: 5px 0; }
.proj-list li::before { content: '→'; position: absolute; left: 0; color: var(--acc); }
.stack { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stack .lbl { color: var(--mute-3); font-size: 11.5px; margin-right: 4px; }
.stack .tag { border-radius: 6px; }
.proj-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--mute-2); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.proj-foot a { color: var(--acc); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.proj-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

.projects.list { grid-template-columns: 1fr; }
.projects.list .proj { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); grid-template-rows: auto 1fr; }
.projects.list .proj.hide, .projects.list:not(.all-shown) .proj.extra { display: none; }
.projects.list .proj-bar { grid-column: 1 / -1; }
.projects.list .proj-prev { height: auto; min-height: 300px; border-bottom: 0; border-right: 1px solid var(--line); }

.more {
  margin-top: 20px; width: 100%; text-align: left; background: var(--yellow); color: #0c0d12; border: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; cursor: pointer;
}
.more::after { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .35), transparent 45%); }
.more-title { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.035em; text-transform: uppercase; }
.more-sub { font-family: var(--mono); font-size: 12px; color: #3f3a1e; margin-top: 4px; }
.more-btn { width: 54px; height: 54px; border-radius: 50%; background: #0c0d12; color: var(--yellow); display: grid; place-items: center; flex-shrink: 0; transition: transform .5s var(--spring); }
.more:hover .more-btn { transform: rotate(45deg) scale(1.06); }
.more.done { display: none; }

/* ---------- Formations ---------- */
.train { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 20px; }
.train-main {
  padding: 32px; display: flex; flex-direction: column;
  background: radial-gradient(80% 70% at 100% 0%, rgba(52, 211, 153, .10), transparent 60%), var(--card);
}
.train-q { font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; margin: 18px 0 16px; max-width: 620px; }
.train-p { color: var(--mute); font-size: 15.5px; line-height: 1.7; max-width: 640px; }
.train-p b { color: var(--tx-2); font-weight: 700; }
.train-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: auto; padding-top: 28px; }
.tf { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.tf b { font-size: 14px; font-weight: 700; }
.tf small { font-family: var(--mono); font-size: 10.5px; color: var(--mute-2); line-height: 1.45; }
.tf-n { font-family: var(--mono); font-size: 11px; color: var(--mute-3); font-weight: 700; }
.tf.now { border-color: rgba(52, 211, 153, .45); background: rgba(52, 211, 153, .06); }
.tf.now .tf-n { color: var(--green); }
.tf:not(:last-child)::after { content: '→'; position: absolute; right: -8px; top: 50%; transform: translate(50%, -50%); color: var(--mute-3); font-family: var(--mono); font-size: 12px; z-index: 1; }
.train-aud { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.aud-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--card-2); display: grid; place-items: center; color: var(--green); margin-bottom: 8px; }
.train-aud h3 { font-size: 22px; font-weight: 800; letter-spacing: -.025em; }
.train-aud p { font-size: 14.5px; color: var(--mute); line-height: 1.6; }
.aud-list { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 18px; font-family: var(--mono); font-size: 12px; color: var(--tx-3); }
.aud-list li { display: flex; gap: 8px; align-items: center; }
.aud-list li::before { content: '✓'; color: var(--green); font-weight: 700; }
.train-aud .btn { margin-top: auto; }
.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.mod { padding: 22px; display: flex; flex-direction: column; gap: 8px; transition: border-color .3s, transform .4s var(--spring); }
.mod:hover { border-color: rgba(52, 211, 153, .4); transform: translateY(-3px); }
.mod-lvl { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--green); letter-spacing: .06em; text-transform: uppercase; }
.mod h4 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.mod p { font-size: 14px; color: var(--mute); line-height: 1.6; }
.mod .tags { margin-top: auto; padding-top: 6px; }

.train-top { grid-template-columns: 2fr 1fr; margin-bottom: 20px; }
.ref-card { padding: 24px; display: flex; flex-direction: column; gap: 16px; background: radial-gradient(90% 60% at 0% 0%, rgba(255, 204, 0, .08), transparent 60%), var(--card); }
.ref-school { display: flex; gap: 14px; align-items: center; }
.ref-badge { width: 52px; height: 52px; flex-shrink: 0; border-radius: 12px; background: var(--yellow); color: #0c0d12; display: grid; place-items: center; font-weight: 800; letter-spacing: -.03em; }
.ref-school b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; }
.ref-school small { display: block; font-family: var(--mono); font-size: 11px; color: var(--mute-2); margin-top: 4px; line-height: 1.45; }
.ref-facts { display: flex; flex-direction: column; gap: 10px; }
.ref-facts li { display: flex; gap: 12px; align-items: baseline; border-top: 1px solid var(--line); padding-top: 10px; }
.ref-facts b { font-size: 18px; font-weight: 800; min-width: 92px; letter-spacing: -.02em; }
.ref-facts span { font-family: var(--mono); font-size: 11.5px; color: var(--mute); }
.ref-grade { display: flex; gap: 3px; margin-top: auto; }
.ref-grade i { font-style: normal; font-family: var(--mono); font-size: 9.5px; font-weight: 700; color: #0c0d12; background: var(--yellow); padding: 7px 6px; border-radius: 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref-grade i:nth-child(2) { background: #e6b800; } .ref-grade i:nth-child(3) { background: #cc9f00; } .ref-grade i:nth-child(4) { background: #fff; }
.ref-note { font-family: var(--mono); font-size: 11px; color: var(--mute-2); }

.levels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 32px; padding: 32px; margin-bottom: 20px; align-items: end; }
.levels-txt h3 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin: 14px 0 12px; }
.levels-txt p { color: var(--mute); font-size: 15px; line-height: 1.65; }
.stairs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-items: end; height: 300px; }
.stair { height: var(--h); background: var(--card-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; transform-origin: bottom; transition: transform .9s var(--ease-out); }
.reveal:not(.in) .stair { transform: scaleY(.3); }
.stair:nth-child(2) { transition-delay: .08s; } .stair:nth-child(3) { transition-delay: .16s; } .stair:nth-child(4) { transition-delay: .24s; }
.stair b { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.stair em { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--mute-2); }
.stair span { font-size: 12.5px; color: var(--tx-3); line-height: 1.45; margin-top: auto; }
.stair.now { background: var(--yellow); border-color: var(--yellow); color: #0c0d12; }
.stair.now em { color: #4a3f10; } .stair.now span { color: #1c1a0c; }

.seance { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.seance h3 { font-size: 22px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.seance-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seance-flow span { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; font-family: var(--mono); font-size: 10px; color: var(--mute-2); line-height: 1.4; }
.seance-flow b { display: block; font-size: 11.5px; color: var(--yellow); margin-bottom: 2px; }
.rituals { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--mute); line-height: 1.5; }
.rituals li { padding-left: 18px; position: relative; }
.rituals li::before { content: '→'; position: absolute; left: 0; color: var(--green); font-family: var(--mono); }
.rituals b { color: var(--tx-2); }

.sub-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 20px; flex-wrap: wrap; margin: 44px 0 16px; }
.sub-head h3 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.sub-head h3 span { color: var(--mute-2); font-weight: 600; }
.sub-head p { font-family: var(--mono); font-size: 12px; color: var(--mute-2); }
.maxims { margin-top: 20px; }
.maxims .marquee-track { animation-duration: 60s; }
.maxims .marquee-track span { font-size: 18px; color: var(--tx-3); }
.maxims .marquee-track i { background: var(--green); }
.formats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.formats .label { margin-right: 6px; }

/* ---------- Méthode ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { padding: 24px; display: flex; flex-direction: column; gap: 12px; min-height: 230px; }
.step-n { font-family: var(--mono); font-size: 12px; color: var(--yellow); font-weight: 700; display: flex; justify-content: space-between; }
.step-n span { color: var(--mute-3); font-weight: 400; }
.step h3 { font-size: 22px; font-weight: 800; letter-spacing: -.025em; margin-top: auto; }
.step p { font-size: 14.5px; color: var(--mute); line-height: 1.6; }
.step-bar { height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.step-bar i { display: block; height: 100%; width: 0; background: var(--yellow); transition: width 1.2s var(--ease-out); }
.reveal.in .step-bar i { width: var(--w); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
.cta-big { background: var(--yellow); color: #0c0d12; border: 0; padding: 48px; }
.cta-big::after { background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .3), transparent 45%); }
.cta-title { font-size: clamp(40px, 5.6vw, 68px); font-weight: 800; letter-spacing: -.05em; line-height: .92; text-transform: uppercase; }
.cta-big p { font-size: 17px; line-height: 1.65; margin-top: 22px; max-width: 560px; color: #26240f; }
.cta-big hr { border: 0; border-top: 1px solid rgba(0, 0, 0, .14); margin: 28px 0; }
.btn-black { background: #0c0d12; color: #fff; text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.btn-black:hover { box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .7); }
.elsewhere { padding: 24px; display: flex; flex-direction: column; }
.el-link { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.el-link:last-child { border-bottom: 0; }
.el-link .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--card-2); display: grid; place-items: center; }
.el-link small { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--mute-2); }
.el-link b { font-size: 15.5px; font-weight: 700; word-break: break-all; }
.el-link .arr { margin-left: auto; color: var(--mute-2); transition: transform .3s var(--spring), color .2s; }
.el-link:hover .arr { transform: translate(3px, -3px); color: var(--yellow); }
.facts { margin-top: auto; padding-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.fact b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.fact span { font-family: var(--mono); font-size: 11px; color: var(--mute-2); }

footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 70px 0 34px; font-family: var(--mono); font-size: 12px; color: var(--mute-3); }
footer .kbd { margin: 0 4px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(30px); filter: blur(8px); transition: opacity .9s var(--ease-out), transform 1s var(--ease-out), filter .9s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Web app installable ---------- */
html { -webkit-tap-highlight-color: transparent; }
body { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
footer { padding-bottom: calc(34px + env(safe-area-inset-bottom, 0px)); }
.install {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  transform: translate(-50%, 140%); opacity: 0; transition: transform .6s var(--spring), opacity .4s;
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; width: max-content; max-width: calc(100vw - 32px);
  background: rgba(19, 21, 29, .86); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 20px 50px -14px rgba(0, 0, 0, .85);
}
.install.show { transform: translate(-50%, 0); opacity: 1; }
.install img { width: 42px; height: 42px; border-radius: 11px; }
.install-txt b { display: block; font-size: 14px; font-weight: 800; letter-spacing: -.01em; }
.install-txt span { font-family: var(--mono); font-size: 11px; color: var(--mute); }
.install-go { background: var(--yellow); color: #0c0d12; font-family: var(--mono); font-weight: 700; font-size: 12.5px; padding: 10px 14px; border-radius: 12px; white-space: nowrap; }
.install-x { width: 30px; height: 30px; border-radius: 50%; color: var(--mute-2); display: grid; place-items: center; }
.install-x:hover { color: #fff; background: var(--card-2); }
.ios-steps { display: none; font-family: var(--mono); font-size: 11.5px; color: var(--tx-3); line-height: 1.6; }
.install.ios .ios-steps { display: block; }
.install.ios .install-go, .install.ios .install-txt span { display: none; }
.foot-install { color: var(--mute-2); font-family: var(--mono); font-size: 12px; display: none; align-items: center; gap: 6px; }
.foot-install:hover { color: var(--yellow); }
.can-install .foot-install { display: inline-flex; }
/* En mode app installée : pas de bouton d'installation, statut système lisible */
@media (display-mode: standalone) {
  .install, .foot-install { display: none !important; }
  body { overscroll-behavior-y: none; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); z-index: 80; opacity: 0; pointer-events: none;
  font-family: var(--mono); font-size: 13px; background: #fff; color: #0c0d12; padding: 12px 18px; border-radius: 999px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .8); transition: opacity .3s, transform .4s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; }
  .show { min-height: 600px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .pipe { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; }
  .train { grid-template-columns: 1fr 1fr; }
  .train-main, .seance { grid-column: 1 / -1; }
  .levels { grid-template-columns: 1fr; }
  .modules { grid-template-columns: 1fr 1fr; }
  .clients { grid-template-columns: repeat(3, 1fr); }
  .tl-item { grid-template-columns: 150px 1fr; }
  .tl-item .tags { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 960px) {
  .nav-link.hide-xs { display: none; }
}
@media (max-width: 860px) {
  .projects.list .proj { display: flex; }
  .projects.list .proj-prev { border-right: 0; border-bottom: 1px solid var(--line); min-height: 0; height: 270px; }
}
@media (max-width: 720px) {
  .nav-status .txt, .nav-link .kbd { display: none; }
  .nav-status { padding: 0 10px 0 6px; }
  .nav-link { padding: 8px 10px; font-size: 12px; }
  .nav-logo { margin-right: 2px; }
  .intro { padding: 28px 22px 26px; }
  .hero-title { margin: 24px 0 20px; }
  .lede { font-size: 16px; }
  .show { min-height: 560px; }
  .show-top { padding: 18px; flex-direction: column; gap: 6px; }
  .show-info { padding: 0 18px 20px; }
  .bento { grid-template-columns: 1fr; }
  .sec { margin-top: 96px; }
  .term-body { height: 380px; padding: 16px; font-size: 12.5px; }
  .term-title { display: none; }
  .term-chips { padding: 12px 16px; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  .cta-big { padding: 30px 22px; }
  .proj-body { padding: 20px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .nav-link.hide-sm { display: none; }
  .refs { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 0; }
  .refs-lbl { padding-left: 20px; }
  .marquee { width: 100%; }
  .marquee-track span { font-size: 18px; }
  .clients { grid-template-columns: 1fr 1fr; gap: 12px; }
  .client { min-height: 170px; padding: 16px; }
  .client:last-child { grid-column: 1 / -1; min-height: 0; }
  .cl-name { font-size: 20px; }
  .client::before { left: 16px; }
  .tl-item { grid-template-columns: 1fr; gap: 12px; padding: 20px; }
  .tl-item .tags { grid-column: auto; }
  .edu { grid-template-columns: 1fr; gap: 12px; }
  .train, .modules { grid-template-columns: 1fr; }
  .levels { padding: 22px; gap: 20px; }
  .stairs { grid-template-columns: 1fr 1fr; height: auto; }
  .stair { height: auto; min-height: 150px; }
  .seance-flow { grid-template-columns: 1fr 1fr; }
  .ref-grade i { font-size: 8.5px; }
  .train-main { padding: 24px 22px; }
  .train-flow { grid-template-columns: 1fr 1fr; }
  .tf:nth-child(2)::after { display: none; }
}
.nav-link { white-space: nowrap; }
@media (max-width: 480px) {
  .nav-link[data-nav="top"] { display: none; } /* le logo ramène déjà en haut */
}
@media (max-width: 400px) {
  .nav-link { padding: 8px 8px; }
}

@media (hover: none) {
  .hide-touch { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .live-dot, .proj.live .proj-status i { animation: none; }
}
