:root {
  color-scheme: dark;
  --bg: #06080c;
  --bg-2: #0b0f16;
  --card: #0e131c;
  --card-hi: #131a26;
  --line: #1f2735;
  --line-hi: #2d3a50;
  --text: #eef2f8;
  --muted: #9aa6b8;
  --dim: #6d7a8e;
  --accent: #7aa2ff;
  --accent-2: #b9ccff;
  --ok: #5fd3a0;
  --warn: #ffcf70;
  --radius: 14px;
  --font: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.65 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, ol { margin: 0; }
a { color: inherit; text-underline-offset: .25em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--bg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 20; padding: .7rem 1rem; background: var(--text); color: var(--bg); border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.wrap { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 10; background: rgb(6 8 12 / .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgb(255 255 255 / .06); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 650; letter-spacing: -.01em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(145deg, #1b2a4d, #0d1424); border: 1px solid var(--line-hi); color: var(--accent); font-size: .85rem; font-weight: 750; }
nav { margin-left: auto; display: flex; align-items: center; gap: 1.6rem; }
nav a { color: var(--muted); font-size: .92rem; text-decoration: none; padding-block: .5rem; }
nav a:hover { color: var(--text); }
nav .nav-cta { color: var(--text); padding: .45rem .95rem; border: 1px solid var(--line-hi); border-radius: 999px; }
nav .nav-cta:hover { border-color: var(--accent); }

/* Héro */
.hero { position: relative; padding: 6.5rem 0 4rem; isolation: isolate; }
.beam { position: absolute; z-index: -1; inset: -120px 0 auto; height: 760px; pointer-events: none;
  background:
    radial-gradient(ellipse 22% 60% at 50% 0%, rgb(170 195 255 / .30), transparent 70%),
    radial-gradient(ellipse 55% 45% at 50% 18%, rgb(70 110 255 / .20), transparent 75%),
    radial-gradient(ellipse 80% 40% at 50% 60%, rgb(40 60 140 / .10), transparent 80%); }
.beam::after { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 360px; transform: translateX(-50%); background: linear-gradient(rgb(200 215 255 / .9), transparent); filter: blur(1px); }
.hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: .6rem; padding: .3rem .9rem .3rem .3rem; border: 1px solid var(--line-hi); border-radius: 999px; background: rgb(14 19 28 / .8); color: var(--muted); font-size: .88rem; }
.chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; filter: grayscale(1); }
h1 { margin-top: 1.6rem; font-size: clamp(3rem, 9vw, 6rem); line-height: 1; font-weight: 700; letter-spacing: -.045em;
  background: linear-gradient(180deg, #ffffff 30%, #a9b7cf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 1.5rem; font-size: clamp(1.15rem, 2.3vw, 1.45rem); line-height: 1.45; color: var(--text); max-width: 48ch; text-wrap: balance; }
.sublead { margin-top: .8rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; margin-top: 2.2rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px; padding: .75rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none; transition: box-shadow .25s, transform .25s, border-color .25s; }
.btn-glow { background: #fff; color: #06080c; box-shadow: 0 0 0 1px rgb(255 255 255 / .6), 0 0 28px rgb(122 162 255 / .55), 0 0 70px rgb(122 162 255 / .25); }
.btn-glow:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px #fff, 0 0 36px rgb(122 162 255 / .75), 0 0 90px rgb(122 162 255 / .35); }
.btn-ghost { border: 1px solid var(--line-hi); color: var(--text); background: rgb(14 19 28 / .6); }
.btn-ghost:hover { border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn-glow:hover { transform: none; } }

/* Terminal de démonstration */
.terminal { margin: 4rem auto 0; max-width: 860px; border: 1px solid var(--line-hi); border-radius: var(--radius); background: linear-gradient(180deg, #0d121b, #090c12); box-shadow: 0 30px 80px rgb(0 0 0 / .55), 0 0 0 1px rgb(255 255 255 / .02), 0 -10px 60px rgb(90 130 255 / .10); overflow: hidden; text-align: left; }
.term-bar { display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .02); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a3342; }
.term-title { font: .8rem var(--mono); color: var(--dim); }
.term-replay { margin-left: auto; font: 600 .78rem var(--font); color: var(--muted); background: none; border: 1px solid var(--line-hi); border-radius: 999px; padding: .25rem .75rem; cursor: pointer; min-height: 32px; }
.term-replay:hover { color: var(--text); border-color: var(--accent); }
.term-body { padding: 1.3rem 1.4rem 1.5rem; font: .9rem/1.75 var(--mono); color: #d7deea; min-height: 17.5rem; }
.t-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.t-prompt { color: #fff; margin-bottom: .5rem; }
.t-sign { color: var(--accent); margin-right: .4rem; }
.t-dot { color: var(--accent); margin-right: .45rem; font-size: .75em; }
.t-sub { color: var(--dim); padding-left: 1.3rem; }
.t-muted { color: var(--dim); }
.t-ok { color: var(--ok); }
.t-result { margin-top: .6rem; color: #fff; }
.t-ask { margin-top: .3rem; color: var(--warn); }
.t-key { color: #fff; }
.t-cursor { display: inline-block; width: .55em; height: 1.05em; margin-left: .35rem; vertical-align: -.15em; background: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .t-cursor { animation: none; } }
.terminal.is-playing .t-line { display: none; }
.terminal.is-playing .t-line.is-shown { display: block; }

/* Périmètre */
.scope { display: grid; grid-template-columns: repeat(4, 1fr); margin: 3.5rem auto 0; max-width: 860px; border: 1px solid var(--line); border-radius: var(--radius); background: rgb(14 19 28 / .6); }
.scope > div { padding: 1.2rem 1.4rem; text-align: center; }
.scope > div + div { border-left: 1px solid var(--line); }
.scope dt { font-size: 1.45rem; font-weight: 700; letter-spacing: -.03em; }
.scope dd { margin: .2rem 0 0; color: var(--muted); font-size: .85rem; }

/* Sections */
.section { padding-block: 6rem; }
.section-head { max-width: 720px; margin-bottom: 2.8rem; }
.eyebrow { color: var(--accent); font-size: .85rem; font-weight: 600; margin-bottom: .8rem; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.15; letter-spacing: -.035em; font-weight: 700; }
.section-sub { margin-top: 1rem; color: var(--muted); font-size: 1.05rem; }
.card { position: relative; padding: 1.8rem; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--card-hi), var(--card)); transition: border-color .25s, box-shadow .25s; }
.card:hover { border-color: var(--line-hi); box-shadow: 0 0 40px rgb(90 130 255 / .08); }
.card h3 { font-size: 1.22rem; line-height: 1.3; letter-spacing: -.02em; font-weight: 650; margin-bottom: .75rem; }
.card p { color: var(--muted); font-size: .95rem; }
.tag { display: inline-block; color: var(--accent-2) !important; font-size: .78rem !important; font-weight: 600; padding: .2rem .65rem; border: 1px solid rgb(122 162 255 / .3); border-radius: 999px; background: rgb(122 162 255 / .07); margin-bottom: 1rem; }
.stack { margin-top: 1.2rem; font: .8rem var(--mono) !important; color: var(--dim) !important; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }

.card-featured { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2.5rem; align-items: center; padding: 2.5rem; margin-bottom: 1.2rem; background: radial-gradient(ellipse 70% 90% at 100% 0%, rgb(70 110 255 / .16), transparent 70%), linear-gradient(180deg, var(--card-hi), var(--card)); }
.card-featured h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; letter-spacing: -.03em; }
.card-featured .featured-copy > p:not(.tag):not(.stack) { font-size: 1.02rem; }
.app-mock { border: 1px solid var(--line-hi); border-radius: 12px; background: #0a0e15; padding: 1rem; box-shadow: 0 20px 50px rgb(0 0 0 / .45); }
.app-top { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; font-weight: 600; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.app-badge { font-size: .72rem; color: var(--dim); border: 1px solid var(--line-hi); border-radius: 999px; padding: .1rem .55rem; font-weight: 500; }
.app-search { display: flex; justify-content: space-between; align-items: center; margin: .9rem 0; padding: .6rem .8rem; border: 1px solid var(--line-hi); border-radius: 8px; color: var(--dim); font-size: .85rem; }
.app-search svg { width: 16px; fill: none; stroke: var(--accent); stroke-width: 2; }
.app-row { display: flex; align-items: center; gap: .75rem; padding: .65rem .7rem; border-radius: 8px; font-size: .85rem; }
.app-row + .app-row { margin-top: .25rem; }
.app-row.is-active { background: rgb(122 162 255 / .1); box-shadow: inset 2px 0 var(--accent); }
.app-row strong { display: block; font-weight: 600; }
.app-row div span { color: var(--dim); font-size: .78rem; }
.play { color: var(--accent); font-size: .7rem; }
.wave { display: block; width: 100%; margin-top: 1rem; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; fill: none; opacity: .85; }

/* Clients freelance */
.clients { padding-top: 0; }
.client-list { list-style: none; padding: 0; margin: 0; }
.client-name { font-size: 1.5rem !important; font-weight: 700; letter-spacing: -.03em; color: var(--text) !important; line-height: 1.2; }
.client-name a { text-decoration: none; }
.client-name a::after { content: " ↗"; font-size: .6em; color: var(--dim); vertical-align: .35em; }
.client-name a:hover { color: var(--accent-2); }
.client-where { margin: .35rem 0 1rem; font-size: .82rem !important; color: var(--accent-2) !important; }

/* Méthode */
.principles { list-style: none; padding: 0; }
.principles li { display: flex; flex-direction: column; gap: .5rem; }
.principles .num { font: 600 .8rem var(--mono); color: var(--accent); }
.principles strong { font-size: 1.1rem; font-weight: 650; }
.principles li > span:last-child { color: var(--muted); font-size: .95rem; }

/* Parcours */
.profile { display: grid; grid-template-columns: 300px 1fr; gap: 4rem; align-items: start; }
.profile-photo { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-hi); aspect-ratio: 4 / 5; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; transform: scale(1.35); transform-origin: 47% 15%; }
.profile h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.role-where { margin-top: .6rem; color: var(--accent-2); font-size: .95rem; }
.role-text { margin-top: 1rem; color: var(--muted); }
.skills { margin-top: 2rem; border-top: 1px solid var(--line); }
.skills > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.skills dt { font-weight: 600; font-size: .92rem; }
.skills dd { margin: 0; color: var(--muted); font-size: .92rem; }

/* Contact */
.contact { position: relative; isolation: isolate; overflow: hidden; padding-top: 6rem; border-top: 1px solid var(--line); }
.beam-low { inset: 0 0 auto; height: 520px; }
.contact-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.4rem; padding-bottom: 6rem; }
.contact h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
.footer-line { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-block: 1.6rem; border-top: 1px solid var(--line); color: var(--dim); font-size: .85rem; }
.footer-line a { text-decoration: none; }
.footer-line a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) { .card { transition: none; } }

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .card-featured { grid-template-columns: 1fr; padding: 1.8rem; }
  .profile { grid-template-columns: 1fr; gap: 2rem; }
  .profile-photo { max-width: 260px; }
}
@media (max-width: 640px) {
  nav a:not(.nav-cta) { display: none; }
  .hero { padding-top: 4rem; }
  .lead br { display: none; }
  .terminal { margin-top: 3rem; }
  .term-body { font-size: .78rem; padding: 1rem; min-height: 21rem; }
  .scope { grid-template-columns: 1fr 1fr; }
  .scope > div:nth-child(3) { border-left: 0; }
  .scope > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section { padding-block: 4rem; }
  .skills > div { grid-template-columns: 1fr; gap: .2rem; }
  .btn { width: 100%; }
  .hero-actions { width: 100%; }
}
