/* Portfolio IA : thème sombre, verre dépoli, accent indigo → cyan. Mobile d'abord. */

@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #07080c;
  --fg: #eef0f6;
  --muted: #9198ab;
  --primary: #6f7bff;
  --accent: #38d6f5;
  --danger: #f2555a;
  --border: rgb(255 255 255 / 0.1);
  --glass: rgb(255 255 255 / 0.045);
  --glass-strong: rgb(16 18 26 / 0.74);
  --grad: linear-gradient(135deg, var(--primary), var(--accent));
  --radius: 14px;
  --dock-h: 10.5rem;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
.hero { overflow-x: clip; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgb(111 123 255 / 0.35); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}
.glass-strong {
  background: var(--glass-strong);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
}
.grad {
  background-image: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ------------------------------------------------------------ fond */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 45% at 50% 30%, rgb(111 123 255 / 0.16), transparent 70%),
    radial-gradient(40% 30% at 50% 62%, rgb(56 214 245 / 0.07), transparent 70%);
}
.ambient-grid {
  position: absolute; inset: 0; opacity: 0.35;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
}
.particle {
  position: absolute; border-radius: 50%; background: rgb(238 240 246 / 0.4);
  animation: drift linear infinite;
}
@keyframes drift {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  15%, 85% { opacity: var(--o, 0.5); }
  100% { transform: translate3d(var(--dx, 10px), -120px, 0); opacity: 0; }
}

/* ------------------------------------------------------------ en-tête */
.topbar {
  position: relative; z-index: 30;
  max-width: 72rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: max(14px, env(safe-area-inset-top)) 16px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 999px; }
.monogram {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font: 600 12px var(--mono); letter-spacing: 0.02em;
}
.brand-name { display: none; font-size: 14px; font-weight: 500; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 10px; border-radius: 999px; font-size: 14px; color: var(--muted); text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--fg); }
.hide-sm { display: none; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none;
  transition: border-color 0.25s, box-shadow 0.25s, color 0.2s;
}
.pill:hover { border-color: rgb(111 123 255 / 0.5); box-shadow: 0 0 20px rgb(111 123 255 / 0.25); }
.pill.small { padding: 6px 12px; font-size: 12px; color: var(--muted); }
.pill.small:hover { color: var(--fg); }
.lang { display: flex; border-radius: 999px; padding: 3px; margin-left: 2px; }
.lang button {
  border: 0; background: none; padding: 4px 9px; border-radius: 999px;
  font: 600 11px var(--mono); color: var(--muted);
}
.lang button.active { background: rgb(255 255 255 / 0.1); color: var(--fg); }

/* ------------------------------------------------------------ hero */
.hero {
  position: relative;
  min-height: calc(100svh - 68px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8px 16px calc(var(--dock-h) + 8px);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.stage {
  position: relative; isolation: isolate;
  aspect-ratio: 5 / 6;
  width: min(100%, 500px, calc((100svh - 28rem) * 0.83));
  min-width: 13rem;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(0.96); } }

/* Orbites (positions écrites par orbit.js) */
.orbit { position: absolute; inset: 0; pointer-events: none; }
.orbit-path { position: absolute; z-index: 0; border-radius: 50%; border: 1px solid rgb(238 240 246 / 0.06); }
.chip { position: absolute; top: 0; left: 0; opacity: 0; will-change: transform; pointer-events: auto; }
.chip > button {
  width: 100%; height: 100%; border-radius: 50%;
  display: grid; place-items: center; padding: 0;
  background: var(--glass); border: 1px solid var(--c38);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 0 16px var(--c40), inset 0 0 10px var(--c1f);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.chip.active > button { border-color: var(--caa); box-shadow: 0 0 28px var(--c88), inset 0 0 14px var(--c33); }
.chip svg { width: 50%; height: 50%; }
.chip .mono { font: 600 0.8em/1 var(--mono); letter-spacing: -0.02em; }
.tip {
  position: absolute; bottom: 100%; left: 50%; margin-bottom: 8px;
  width: max-content; max-width: 12rem; padding: 8px 12px; border-radius: 12px;
  transform: translateX(-50%) scale(0.78); transform-origin: bottom center;
  text-align: center; box-shadow: 0 12px 30px rgb(0 0 0 / 0.5); pointer-events: none;
}
.tip b { display: block; font-size: 14px; font-weight: 500; line-height: 1.2; }
.tip span { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); line-height: 1.3; }

/* Figurine */
.figure {
  position: absolute; z-index: 20; left: 50%; bottom: 7%;
  height: 80%; aspect-ratio: 3 / 4; transform: translateX(-50%);
  --lvl: 0;
}
.halo, .halo-boost, .pedestal, .pedestal-ring, .reflection, .wave, .shimmer { pointer-events: none; }
.halo {
  position: absolute; inset: -6% -30% 18%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(111 123 255 / 0.32), rgb(56 214 245 / 0.12) 55%, transparent 75%);
  opacity: 0.55; transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
body[data-avatar="listening"] .halo { opacity: 0.85; transform: scale(1.06); }
body[data-avatar="thinking"] .halo { opacity: 0.7; transform: scale(0.98); }
body[data-avatar="speaking"] .halo { opacity: 0.8; transform: scale(1.03); }
.halo-boost {
  position: absolute; inset: 10% -10% 30%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(56 214 245 / 0.35), transparent 70%);
  opacity: calc(var(--lvl) * 0.4);
}
.pedestal {
  position: absolute; left: 50%; bottom: -3%; width: 110%; height: 9%; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgb(111 123 255 / 0.35), rgb(56 214 245 / 0.08) 60%, transparent);
}
.pedestal-ring {
  position: absolute; left: 50%; bottom: -1%; width: 78%; height: 5%; transform: translateX(-50%);
  border-radius: 50%; border: 1px solid rgb(56 214 245 / 0.25);
}
.pedestal-ring span { position: absolute; inset: -1px; border-radius: 50%; border: 1px solid rgb(56 214 245 / 0.6); opacity: 0; }
body[data-avatar="listening"] .pedestal-ring span { animation: ring 2.1s ease-out infinite; }
.pedestal-ring span:nth-child(2) { animation-delay: 0.7s !important; }
.pedestal-ring span:nth-child(3) { animation-delay: 1.4s !important; }
@keyframes ring { from { transform: scale(1); opacity: 0.7; } to { transform: scale(1.9); opacity: 0; } }

.body { position: absolute; inset: 0; animation: float 5.5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-7px); } }
.figure-still, #avatar-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: 50% 100%;
  filter: drop-shadow(0 24px 40px rgb(0 0 0 / 0.55));
  user-select: none; -webkit-user-drag: none;
}
#avatar-canvas { opacity: 0; transition: opacity 0.4s; }
body.avatar-ready #avatar-canvas { opacity: 1; }
body.avatar-ready .figure-still { opacity: 0; }
.shimmer {
  position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity 0.3s;
  -webkit-mask: url("assets/video/poster.png") center bottom / contain no-repeat;
  mask: url("assets/video/poster.png") center bottom / contain no-repeat;
}
.shimmer span {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgb(56 214 245 / 0.28) 50%, transparent 65%);
  animation: sweep 1.8s ease-in-out infinite;
}
body[data-avatar="thinking"] .shimmer { opacity: 1; }
@keyframes sweep { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
.reflection {
  position: absolute; top: 100%; left: 0; width: 100%; height: 22%; overflow: hidden; opacity: 0.1;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.reflection img {
  position: absolute; left: 0; top: 0; width: 100%; height: 455%;
  object-fit: contain; object-position: 50% 100%; transform: scaleY(-1); filter: blur(1px);
}
.wave {
  position: absolute; left: 50%; bottom: -9%; width: 70%; height: 32px;
  transform: translate(-50%, 6px); opacity: 0; transition: opacity 0.35s, transform 0.35s;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
body[data-avatar="listening"] .wave, body[data-avatar="speaking"] .wave { opacity: 1; transform: translate(-50%, 0); }
.wave i { display: block; width: 2px; height: 100%; border-radius: 2px; background: var(--grad); opacity: 0.8; transform: scaleY(0.12); }

/* Statut, nom, accroche, suggestions */
.status {
  display: inline-flex; align-items: center; gap: 8px; margin: 26px 0 0;
  padding: 4px 12px; border-radius: 999px;
  font: 12px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
}
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
body:not([data-avatar="idle"]) .status .dot { background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.title { margin: 12px 0 0; font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; text-align: center; text-wrap: balance; }
.title .sep { color: var(--muted); }
.tagline { max-width: 30rem; margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.6; text-wrap: pretty; }
.chips {
  list-style: none; margin: 16px -16px 0; padding: 2px 16px; max-width: calc(100% + 32px);
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chips li { flex: none; }
.chips li { animation: chip-in 0.45s ease-out both; }
.chips button {
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; font-size: 14px; color: rgb(238 240 246 / 0.85);
  transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.chips button:hover { border-color: rgb(111 123 255 / 0.5); color: var(--fg); box-shadow: 0 0 22px rgb(111 123 255 / 0.25); }
.chips button:disabled { opacity: 0.5; cursor: default; }
.chips svg { color: var(--muted); transition: transform 0.3s, color 0.3s; }
.chips button:hover svg { transform: translate(2px, -2px); color: var(--accent); }
@keyframes chip-in { from { opacity: 0; transform: translateY(8px); } }

.title .sep { display: none; }
.title .grad { display: block; }
/* Écrans peu hauts : on garde l'avatar, on allège le texte */
@media (max-height: 880px) {
  .status { margin-top: 12px; }
  .tagline { display: none; }
  .chips { margin-top: 12px; }
}
@media (max-height: 640px) { .status { display: none; } }

/* ------------------------------------------------------------ sections */
.below { padding-bottom: calc(var(--dock-h) + 24px); }
.section { max-width: 72rem; margin: 0 auto; padding: 64px 16px 8px; scroll-margin-top: 16px; }
.eyebrow { margin: 0; font: 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.section h2 { margin: 6px 0 24px; font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.section-lead { margin: -12px 0 20px; color: var(--muted); max-width: 36rem; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.in { opacity: 1; transform: none; }

/* Outils : bandes horizontales qui défilent en continu (sens inverse une ligne sur deux), pleine largeur. */
.band {
  width: 100vw; margin-left: calc(50% - 50vw); display: grid; gap: 14px; padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.band-row { overflow: hidden; padding: 6px 0; cursor: pointer; }
.band-track {
  list-style: none; margin: 0; padding: 0; display: flex; width: max-content;
  animation: band-scroll var(--dur, 45s) linear infinite;
}
.band-row.rev .band-track { animation-direction: reverse; }
.band-row:hover .band-track, .band-row.paused .band-track { animation-play-state: paused; }
@keyframes band-scroll { to { transform: translateX(-50%); } }
.band .tool-card { width: 270px; margin-right: 14px; flex: none; }
.tool-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 18px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.tool-card:hover { border-color: var(--c88); box-shadow: 0 0 26px var(--c33); transform: translateY(-3px); }
.tool-ico {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--c1f); border: 1px solid var(--c38); font-size: 14px;
}
.tool-ico svg { width: 20px; height: 20px; }
.tool-ico .mono { font: 600 13px/1 var(--mono); }
.tool-card div > b { display: block; font-weight: 500; }
.tool-card div > span { display: block; font-size: 13px; color: var(--muted); line-height: 1.45; }
.tool-card div > small { display: block; margin-bottom: 3px; font: 10.5px var(--mono); color: var(--caa); text-transform: uppercase; letter-spacing: 0.06em; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; max-width: 46rem; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(to bottom, var(--primary), rgb(56 214 245 / 0.2)); }
.timeline > li { position: relative; padding: 0 0 28px; }
.timeline > li::before {
  content: ""; position: absolute; left: -22px; top: 5px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--primary); box-shadow: 0 0 12px rgb(111 123 255 / 0.5);
}
.timeline > li.edu::before { border-color: var(--accent); box-shadow: 0 0 12px rgb(56 214 245 / 0.5); }
.tl-period { font: 12px var(--mono); color: var(--muted); letter-spacing: 0.03em; }
.tl-role { margin: 2px 0 0; font-weight: 500; font-size: 16px; }
.tl-org { color: var(--accent); font-size: 14px; }
.tl-desc { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* Chiffres clés */
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { position: relative; overflow: hidden; padding: 20px 18px; border-radius: 20px; }
.stat::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 2px; background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: transform 1.2s ease-out 0.2s;
}
.stat.in::after { transform: scaleX(1); }
.stat-num {
  margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* Contact : carte d'appel à l'action */
.cta {
  position: relative; overflow: hidden; isolation: isolate; padding: 36px 22px; border-radius: 28px; text-align: center;
  background: linear-gradient(160deg, rgb(111 123 255 / 0.12), rgb(56 214 245 / 0.05) 60%, rgb(255 255 255 / 0.02));
  border: 1px solid rgb(111 123 255 / 0.28);
}
.cta-glow {
  position: absolute; z-index: -1; width: 520px; height: 520px; left: 50%; top: -60%; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(circle, rgb(111 123 255 / 0.35), transparent 65%); filter: blur(20px);
  animation: cta-glow 9s ease-in-out infinite alternate;
}
@keyframes cta-glow { to { translate: -35% 12%; opacity: 0.7; } }
.cta h2 { margin: 14px 0 12px; font-size: 30px; }
.cta .section-lead { margin: 0 auto 24px; }
.avail {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 999px;
  font: 12px var(--mono); color: #8ff0b0; background: rgb(46 204 113 / 0.1); border: 1px solid rgb(46 204 113 / 0.3);
}
.avail .dot { width: 7px; height: 7px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 0 rgb(46 204 113 / 0.6); animation: avail 2s infinite; }
@keyframes avail { 70% { box-shadow: 0 0 0 8px rgb(46 204 113 / 0); } 100% { box-shadow: 0 0 0 0 rgb(46 204 113 / 0); } }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cta-actions .pill { padding: 11px 18px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; color: var(--fg); }
.cta-actions .pill svg { color: var(--accent); }
.cta-actions .pill.ok svg, .cta-actions .pill.ok { color: #8ff0b0; }
.btn-primary { background: var(--grad); color: #07080c !important; border: 0; box-shadow: 0 8px 30px rgb(111 123 255 / 0.35); }
.btn-primary svg { color: #07080c !important; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 36px rgb(56 214 245 / 0.4); }

/* Pied de page */
.site-foot { max-width: 72rem; margin: 64px auto 0; padding: 0 16px; font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; gap: 28px; padding: 32px 0 24px; border-top: 1px solid var(--border); position: relative; }
.foot-grid::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 40%; height: 1px; background: var(--grad);
  animation: foot-line 6s ease-in-out infinite alternate;
}
@keyframes foot-line { to { left: 60%; } }
.foot-brand .brand { display: inline-flex; color: var(--fg); }
.foot-name { font-weight: 600; }
.foot-role { margin: 10px 0 0; color: var(--accent); font-size: 14px; }
.foot-note { margin: 8px 0 0; max-width: 24rem; line-height: 1.55; font-size: 13px; }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.foot-h { margin: 0 0 4px; font: 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg); }
.foot-col a, .foot-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; transition: color 0.2s, transform 0.2s; }
.foot-col a:hover { color: var(--fg); transform: translateX(3px); }
.foot-link svg { color: var(--accent); flex: none; }
.foot-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 0 8px; border-top: 1px solid var(--border); font-size: 13px;
}
.to-top {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  font: inherit; color: var(--muted); background: var(--glass); border: 1px solid var(--border); transition: color 0.2s, border-color 0.2s;
}
.to-top:hover { color: var(--fg); border-color: rgb(111 123 255 / 0.5); }
.to-top svg { transition: transform 0.2s; }
.to-top:hover svg { transform: translateY(-2px); }

/* Barre de progression de lecture */
.progress {
  position: fixed; z-index: 60; top: 0; left: 0; right: 0; height: 2px; background: var(--grad);
  transform: scaleX(0); transform-origin: left; pointer-events: none;
}

/* ------------------------------------------------------------ conversation */
.panel {
  position: fixed; z-index: 40; left: 12px; right: 12px;
  bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
  max-height: 44svh;
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 24px; background: rgb(14 16 23 / 0.9);
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.9);
  animation: panel-in-up 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes panel-in-up { from { opacity: 0; transform: translateY(40px); } }
@keyframes panel-in-side { from { opacity: 0; transform: translateX(40px); } }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.panel-id { display: flex; align-items: center; gap: 10px; }
.panel-name { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.2; }
.panel-sub { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.2; }
.thumb {
  flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border);
  background: #11131b url("assets/face.png") no-repeat 50% 50% / cover;
}
.icon-btn {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 0; background: none; color: var(--muted); transition: color 0.2s, background 0.2s;
}
.icon-btn:hover { color: var(--fg); background: rgb(255 255 255 / 0.08); }
.icon-btn.glass { border: 1px solid var(--border); background: var(--glass); }
#sound .off, #sound[aria-pressed="false"] .on { display: none; }
#sound[aria-pressed="false"] .off { display: block; }

.chat { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.chat-empty { margin: auto; max-width: 17rem; text-align: center; color: var(--muted); font-size: 14px; }
.row { display: flex; align-items: flex-end; gap: 8px; animation: chip-in 0.3s ease-out both; }
.row.user { justify-content: flex-end; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.row.user .bubble { background: var(--grad); color: #07080c; font-weight: 500; border-bottom-right-radius: 6px; }
.row.bot .bubble { background: var(--glass); border: 1px solid var(--border); color: rgb(238 240 246 / 0.92); border-bottom-left-radius: 6px; }
.row.bot.error .bubble { border-color: rgb(242 85 90 / 0.35); background: rgb(242 85 90 / 0.1); color: #ffb3b5; }
.bubble p { margin: 0 0 8px; } .bubble p:last-child { margin-bottom: 0; }
.bubble ul { margin: 4px 0 8px; padding-left: 18px; } .bubble ul:last-child { margin-bottom: 0; }
.bubble li { margin: 2px 0; }
.bubble a { color: var(--accent); }
.row.user .bubble a { color: inherit; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dots 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dots { 50% { opacity: 1; transform: translateY(-2px); } 0%, 100% { opacity: 0.3; } }
.caret { display: inline-block; width: 2px; height: 14px; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: pulse 1s infinite; }
.listen-btn {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 4px 10px 4px 8px;
  border-radius: 999px; border: 1px solid rgb(56 214 245 / 0.35); background: rgb(56 214 245 / 0.08);
  color: var(--accent); font-size: 12px;
}
.listen-btn:hover { background: rgb(56 214 245 / 0.16); }
.latency { margin-top: 6px; font: 11px var(--mono); color: var(--muted); }

/* ------------------------------------------------------------ barre de saisie */
.dock {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; pointer-events: none;
  padding: 28px 12px max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgb(7 8 12 / 0.94) 60%, transparent);
  transition: padding 0.5s;
}
.dock-inner { pointer-events: auto; width: 100%; max-width: 42rem; display: flex; flex-direction: column; gap: 8px; }
.dock-tools { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.count { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--grad); color: #07080c; font: 600 10px/16px var(--mono); text-align: center; }
.composer {
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 26px;
  box-shadow: 0 20px 60px -20px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(111 123 255 / 0.08);
}
.composer textarea {
  flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent;
  padding: 12px 0; max-height: 120px; font-size: 16px; line-height: 1.4;
}
.composer textarea::placeholder { color: var(--muted); }
.send {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--fg); color: var(--bg); transition: opacity 0.2s, background 0.2s;
}
.send:hover { opacity: 0.9; }
.send:disabled { background: rgb(255 255 255 / 0.1); color: var(--muted); cursor: default; }
.send.stop { background: rgb(255 255 255 / 0.12); color: var(--fg); }
.mic-wrap { position: relative; flex: none; }
.mic {
  position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgb(111 123 255 / 0.4); background: rgb(111 123 255 / 0.15);
  box-shadow: 0 0 20px rgb(111 123 255 / 0.25); transition: background 0.3s, box-shadow 0.3s;
}
.mic:hover { background: rgb(111 123 255 / 0.25); box-shadow: 0 0 28px rgb(111 123 255 / 0.45); }
.mic:disabled { opacity: 0.5; cursor: default; }
.mic .mic-stop { display: none; }
.mic.on { background: var(--grad); border-color: transparent; color: #07080c; box-shadow: 0 0 30px rgb(56 214 245 / 0.55); }
.mic.on .mic-icon { display: none; } .mic.on .mic-stop { display: block; }
.mic-pulse { position: absolute; inset: 0; border-radius: 50%; background: var(--grad); opacity: 0; pointer-events: none; }
.mic-wrap.on .mic-pulse { animation: mic-pulse 1.6s ease-out infinite; }
.mic-wrap.on .mic-pulse + .mic-pulse { animation-delay: 0.8s; }
@keyframes mic-pulse { from { transform: scale(1); opacity: 0.55; } to { transform: scale(1.9); opacity: 0; } }
.foot { margin: 0; padding: 0 8px; text-align: center; font-size: 12px; line-height: 1.5; color: rgb(145 152 171 / 0.85); }

/* Mobile, conversation ouverte : avatar compact en haut, panneau en dessous */
@media (max-width: 1023px) {
  body.panel-open { overflow: hidden; }
  body.panel-open .hero { justify-content: flex-start; min-height: 0; padding-bottom: 0; }
  /* Le panneau a une hauteur fixe : l'avatar prend tout l'espace restant au-dessus. */
  body.panel-open .panel { height: 38svh; }
  body.panel-open .stage { width: min(100%, 500px, calc((62svh - var(--dock-h) - 128px) * 0.83)); min-width: 8rem; }
  body.panel-open .tagline, body.panel-open .chips, body.panel-open .title { display: none; }
  body.panel-open .status { margin-top: 10px; }
  body.panel-open .below { display: none; }
}

/* ------------------------------------------------------------ tablette / ordinateur */
@media (min-width: 640px) {
  .topbar { padding-left: 24px; padding-right: 24px; }
  .brand-name { display: inline; }
  .hide-sm { display: inline; }
  .nav { gap: 6px; }
  .title { font-size: 30px; }
  .title .sep { display: inline; }
  .title .grad { display: inline; }
  .chips { flex-wrap: wrap; justify-content: center; overflow: visible; max-width: 40rem; margin-left: 0; margin-right: 0; -webkit-mask-image: none; mask-image: none; }
  .tagline { font-size: 15px; }
  .section { padding-left: 24px; padding-right: 24px; }
  .section h2 { font-size: 34px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stat-num { font-size: 40px; }
  .cta { padding: 56px 40px; }
  .cta h2 { font-size: 40px; }
  .foot-grid { grid-template-columns: 2fr 1fr 1.4fr; }
  .site-foot { padding-left: 24px; padding-right: 24px; }
}
@media (min-width: 1024px) {
  .panel, body.panel-open .panel {
    left: auto; right: 20px; top: 80px; bottom: 20px; width: 400px; height: auto; max-height: none;
    animation-name: panel-in-side;
  }
  body.panel-open .hero { transform: translateX(-210px); }
  body.panel-open .dock { right: 430px; } /* le dégradé de la barre ne recouvre plus le panneau */
  .timeline { padding-left: 26px; }
}

/* Animations en pause (bouton du dock, ou préférence système par défaut : voir motion.js). */
html.motion-off *, html.motion-off *::before, html.motion-off *::after {
  animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important; scroll-behavior: auto !important;
}
html.motion-off .reveal { opacity: 1; transform: none; }
html.motion-off #particles { display: none; }
/* Sans animation : la bande devient une grille statique, sans les doublons. */
html.motion-off .band { width: auto; margin-left: 0; -webkit-mask-image: none; mask-image: none; }
html.motion-off .band-track { flex-wrap: wrap; width: auto; gap: 12px; animation: none; }
html.motion-off .band .tool-card { margin-right: 0; }
html.motion-off .band .tool-card[aria-hidden="true"] { display: none; }
.dock-right { display: flex; align-items: center; gap: 6px; }
#motion .off { display: none; }
html.motion-off #motion .on { display: none; }
html.motion-off #motion .off { display: inline; }

/* ------------------------------------------------------------ parcours façon CV */
.chip img { width: 56%; height: 56%; object-fit: contain; }
.tool-ico img { width: 22px; height: 22px; object-fit: contain; }
.cv { display: grid; gap: 40px; }
.cv-h {
  margin: 0 0 18px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg); display: flex; align-items: center; gap: 10px;
}
.cv-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.cv-side { display: grid; gap: 32px; align-content: start; }
.timeline > .job { padding-bottom: 34px; }
.tl-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.tl-head .tl-period { display: flex; flex-direction: column; align-items: flex-start; }
.tl-dur { font-size: 11px; color: rgb(145 152 171 / 0.75); }
.tl-sector { color: var(--muted); }
.tl-bullets { margin: 10px 0 0; padding: 0 0 0 16px; color: rgb(238 240 246 / 0.82); font-size: 14px; line-height: 1.6; }
.tl-bullets li { margin: 5px 0; }
.tl-bullets li::marker { color: var(--accent); }
.tl-bullets strong { color: var(--fg); font-weight: 600; }
.stack { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.stack-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px;
  font-size: 12px; color: rgb(238 240 246 / 0.88);
  background: var(--c1f, rgb(255 255 255 / 0.05)); border: 1px solid var(--c38, var(--border));
}
.stack-chip:not([style]) { padding-left: 10px; }
.stack-ico { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: rgb(7 8 12 / 0.55); }
.stack-ico img, .stack-ico svg { width: 12px; height: 12px; }
.stack-ico .mono { font: 600 7px/1 var(--mono); }
.cert-list, .lang-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cert-list li { padding: 10px 14px; border-radius: 14px; font-size: 14px; }
.lang-list li { padding: 10px 14px; border-radius: 14px; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.lang-list span { color: var(--muted); }
@media (min-width: 640px) {
  .tl-head .tl-period { align-items: flex-end; text-align: right; }
}
@media (min-width: 1024px) {
  .cv { grid-template-columns: 1.15fr 0.85fr; column-gap: 56px; }
  .cv-wide { grid-column: 1 / -1; max-width: 56rem; }
}
.timeline.edu > li::before { border-color: var(--accent); box-shadow: 0 0 12px rgb(56 214 245 / 0.5); }

/* ------------------------------------------------------------ projets personnels */
.projects { display: grid; gap: 16px; }
.project {
  position: relative; overflow: hidden; padding: 22px 20px; border-radius: 22px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.project::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); opacity: 0.8;
}
.project:hover { border-color: rgb(111 123 255 / 0.45); box-shadow: 0 0 40px rgb(111 123 255 / 0.15); }
.proj-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.proj-kind { margin: 0; font: 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.proj-name { margin: 4px 0 0; font-size: 18px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; max-width: 34rem; }
.proj-link { flex: none; font-size: 13px; color: var(--fg); }
.proj-pitch { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 46rem; }
.proj-metrics { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.proj-metrics li {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px;
  background: rgb(111 123 255 / 0.07); border: 1px solid rgb(111 123 255 / 0.18);
}
.proj-metrics b {
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.proj-metrics span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.proj-note { margin: 6px 0 0; font: 11px var(--mono); color: rgb(145 152 171 / 0.75); }
@media (min-width: 640px) {
  .project { padding: 26px 28px; }
  .proj-name { font-size: 20px; }
  .proj-metrics { grid-template-columns: repeat(4, 1fr); }
}

/* ------------------------------------------------------------ chat : étapes visibles */
.steps { list-style: none; margin: 0; padding: 2px 0; display: grid; gap: 7px; min-width: 15rem; }
.steps li {
  display: flex; align-items: center; gap: 9px; font-size: 13px; color: rgb(145 152 171 / 0.55);
  transition: color 0.3s;
}
.step-n {
  flex: none; min-width: 2.1rem; padding: 2px 6px; border-radius: 999px; text-align: center;
  font: 10.5px var(--mono); border: 1px solid var(--border); transition: all 0.3s;
}
.steps li.active { color: var(--fg); }
.steps li.active .step-n {
  color: #07080c; background: var(--grad); border-color: transparent; box-shadow: 0 0 14px rgb(56 214 245 / 0.45);
  animation: pulse 1.2s ease-in-out infinite;
}
.steps li.active .step-t::after { content: "…"; }
.steps li.done { color: var(--muted); }
.steps li.done .step-n { color: var(--accent); border-color: rgb(56 214 245 / 0.4); }
.row.bot.stopped .bubble { color: var(--muted); font-style: italic; }

/* ------------------------------------------------------------ chat : sources et relances */
.sources { margin-top: 10px; padding-top: 8px; border-top: 1px dashed rgb(255 255 255 / 0.1); font-size: 12px; color: var(--muted); }
.sources p { margin: 0; }
.src-count { font: 11px var(--mono); letter-spacing: 0.02em; color: rgb(145 152 171 / 0.85); }
.src-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 5px !important; }
.src-label { color: var(--muted); }
.bubble a.src-link {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; text-decoration: none;
  color: var(--accent); background: rgb(56 214 245 / 0.07); border: 1px solid rgb(56 214 245 / 0.22);
  transition: background 0.2s, border-color 0.2s;
}
.bubble a.src-link:hover { background: rgb(56 214 245 / 0.15); border-color: rgb(56 214 245 / 0.5); }
.bubble a.src-link.ext::after { content: "↗"; font-size: 10px; opacity: 0.8; }

.followups { margin: -2px 0 0 36px; animation: chip-in 0.35s ease-out both; }
.fu-h { margin: 0 0 6px; font: 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.fu-list { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.fu-btn {
  max-width: 100%; padding: 7px 12px; border-radius: 14px; text-align: left; cursor: pointer;
  font: inherit; font-size: 13px; line-height: 1.35; color: var(--fg);
  background: var(--glass); border: 1px solid var(--border); transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.fu-btn::before { content: "→ "; color: var(--accent); }
.fu-btn:hover { border-color: rgb(111 123 255 / 0.5); background: rgb(111 123 255 / 0.1); transform: translateX(2px); }
.fu-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

/* Surbrillance d'une section atteinte depuis une source du chat */
.flash { animation: flash 1.8s ease-out; border-radius: 18px; }
@keyframes flash {
  0%, 40% { box-shadow: 0 0 0 2px var(--accent), 0 0 36px rgb(56 214 245 / 0.45); background-color: rgb(56 214 245 / 0.06); }
  100% { box-shadow: 0 0 0 2px transparent, 0 0 0 transparent; }
}

/* ------------------------------------------------------------ en-tête : appel à l'action */
.cta-top {
  border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; color: #07080c;
  background: var(--grad); box-shadow: 0 6px 22px rgb(111 123 255 / 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cta-top:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgb(56 214 245 / 0.45); border: 0; }
@media (max-width: 389px) { .cta-top svg { display: none; } }

/* ------------------------------------------------------------ panneau : nouvelle discussion, démarrage */
.panel-actions { display: flex; align-items: center; gap: 6px; }
.new-chat {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 12px; color: var(--muted); background: transparent; border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.new-chat:hover { color: var(--fg); border-color: rgb(111 123 255 / 0.5); background: rgb(111 123 255 / 0.08); }
.followups.starter { margin: 0; }
.new-chat { white-space: nowrap; flex: none; }
.panel-id { min-width: 0; }
.panel-id > div { min-width: 0; }
.panel-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .new-chat span { display: none; } .new-chat { padding: 6px; } }
/* 6 suggestions : 2 lignes sur ordinateur au lieu de 3 */
@media (min-width: 640px) { .chips { max-width: 50rem; } }

/* Panneau ouvert sur ordinateur : le titre et les suggestions tiennent dans l'espace restant à gauche du panneau. */
@media (min-width: 1024px) {
  body.panel-open .title { max-width: calc(100vw - 480px); font-size: clamp(20px, 2.1vw, 28px); }
  body.panel-open .title .sep { display: none; }
  body.panel-open .title .grad { display: block; }
  body.panel-open .chips { max-width: calc(100vw - 480px); }
}

/* Accessibilité : focus visible au clavier sur le champ de saisie et la bande d'outils */
.composer:focus-within { box-shadow: 0 0 0 2px rgb(111 123 255 / 0.55), 0 20px 60px -20px rgb(0 0 0 / 0.8); }
.fu-btn:focus-visible, .src-link:focus-visible, .new-chat:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ================================================================ HERO EN SCÈNES (refonte) */
@property --scene-hue { syntax: "<number>"; inherits: true; initial-value: 232; }
html { --scene-hue: 232; transition: --scene-hue 1.2s ease; }

/* En-tête : nom + rôle, Contact, CV en accent, FR/EN ; menu sur mobile */
.brand-text { display: none; flex-direction: column; line-height: 1.15; }
.brand-text .brand-name { display: block; font-size: 14px; font-weight: 600; color: var(--fg); }
.brand-role { font: 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
button.nav-link { background: none; border: 0; cursor: pointer; font: inherit; font-size: 14px; }
.cv-cta {
  color: #07080c; background: var(--grad); border: 0; font-weight: 600; font-size: 13px;
  box-shadow: 0 6px 22px rgb(111 123 255 / 0.32);
}
.cv-cta:hover { box-shadow: 0 8px 28px rgb(56 214 245 / 0.45); border: 0; }
.cv-long { display: none; }
.show-sm { display: block; }
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 11rem; padding: 6px; border-radius: 16px;
  display: flex; flex-direction: column; z-index: 70; box-shadow: 0 20px 50px -10px rgb(0 0 0 / 0.7);
}
.menu > * {
  padding: 10px 12px; border-radius: 10px; text-align: left; text-decoration: none; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--fg); background: none; border: 0;
}
.menu > *:hover { background: rgb(255 255 255 / 0.06); }
@media (min-width: 640px) {
  .brand-text { display: flex; }
  .cv-long { display: inline; }
  .cv-short { display: none; }
  .show-sm { display: none; }
}

/* Accueil : la barre du bas n'apparaît qu'avec la conversation ouverte (la question se pose au centre). */
body:not(.panel-open) .dock { display: none; }
.hero { padding-bottom: 32px; justify-content: flex-start; }
body:not(.panel-open) .hero { min-height: 0; }
.stage { width: min(100%, 460px, max(15rem, calc((100svh - 31rem) * 0.83))); }

/* Halo et lueur d'ambiance teintés selon la scène */
.halo { background: radial-gradient(closest-side, hsl(var(--scene-hue) 95% 68% / 0.34), hsl(calc(var(--scene-hue) - 35) 90% 60% / 0.12) 55%, transparent 75%); }
.ambient-glow {
  background:
    radial-gradient(60% 45% at 50% 30%, hsl(var(--scene-hue) 95% 68% / 0.15), transparent 70%),
    radial-gradient(40% 30% at 50% 62%, hsl(calc(var(--scene-hue) - 35) 90% 60% / 0.07), transparent 70%);
}

.scene { width: 100%; max-width: 46rem; display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 14px; }
.scene-nav { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.scene-tabs {
  display: flex; gap: 2px; padding: 3px; border-radius: 999px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  background: var(--glass); border: 1px solid var(--border);
}
.scene-tabs::-webkit-scrollbar { display: none; }
.scene-tab {
  flex: none; padding: 6px 12px; border-radius: 999px; border: 0; cursor: pointer; background: none;
  font: 500 13px var(--font); color: var(--muted); transition: color 0.25s, background 0.25s;
}
.scene-tab:hover { color: var(--fg); }
.scene-tab[aria-selected="true"] { color: var(--fg); background: rgb(255 255 255 / 0.09); box-shadow: inset 0 0 0 1px hsl(var(--scene-hue) 90% 70% / 0.35); }
.scene-progress { display: flex; align-items: center; gap: 10px; }
.scene-bars { display: flex; gap: 5px; }
.scene-bar { width: 34px; height: 2px; border-radius: 2px; background: rgb(255 255 255 / 0.12); overflow: hidden; }
.scene-bar i { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }
.scene-pause { width: 26px; height: 26px; }
.scene-pause .off, .scene-pause.is-paused .on { display: none; }
.scene-pause.is-paused .off { display: inline; }

.scene-panel { margin-top: 16px; outline-offset: 6px; border-radius: 12px; }
.scene-panel.swap > * { animation: scene-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }
.scene-panel.swap > :nth-child(2) { animation-delay: 0.05s; }
.scene-panel.swap > :nth-child(3) { animation-delay: 0.1s; }
@keyframes scene-in { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }
.scene-eyebrow { margin: 0; font: 11.5px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: hsl(var(--scene-hue) 90% 72%); }
.scene-title {
  margin: 8px 0 0; font-size: clamp(34px, 8.5vw, 60px); line-height: 1.02; font-weight: 750; letter-spacing: -0.04em;
  text-wrap: balance;
}
.scene-title em {
  font-style: italic; font-weight: 300; letter-spacing: -0.03em; padding-right: 0.06em;
  background: linear-gradient(120deg, hsl(var(--scene-hue) 95% 75%), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.scene-sub { margin: 12px auto 0; max-width: 34rem; color: var(--muted); font-size: 15px; line-height: 1.6; text-wrap: pretty; }

.hero-composer { width: 100%; max-width: 40rem; margin-top: 20px; }
.hero-composer .composer { width: 100%; box-sizing: border-box; }
.resume-btn {
  margin-top: 10px; padding: 6px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px;
  color: var(--accent); background: rgb(56 214 245 / 0.07); border: 1px solid rgb(56 214 245 / 0.25);
}
.scene-chips { margin-top: 14px; }
.scene-chips li.fixed { position: sticky; left: 0; z-index: 1; }
.chips .chip-fixed { color: var(--fg); border-color: hsl(var(--scene-hue) 90% 70% / 0.45); background: rgb(16 18 26 / 0.92); }
.chips .chip-fixed svg { color: hsl(var(--scene-hue) 90% 72%); }
.scene-note { margin: 14px 0 0; font-size: 12px; color: rgb(145 152 171 / 0.8); max-width: 30rem; }
@media (min-width: 640px) {
  .scene-nav { flex-direction: row; justify-content: center; gap: 16px; }
  .scene-chips { max-width: 46rem; }
  .scene-sub { font-size: 16px; }
}
@media (min-width: 1024px) {
  body.panel-open .scene { max-width: calc(100vw - 500px); }
  body.panel-open .scene-title { font-size: clamp(30px, 3.6vw, 48px); }
}
@media (min-width: 1024px) {
  body:not(.panel-open) .scene-chips { width: min(62rem, calc(100vw - 48px)); max-width: none; justify-content: center; }
}

/* ================================================================ MODE CONVERSATION (refonte) */
body.conv-mode .hero { display: none; }
.conv { position: relative; z-index: 5; padding: 0 12px 16px; }
.conv-chat {
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  height: calc(100svh - 76px); min-height: 26rem;
}
.conv-chat .chat { flex: 1; min-height: 0; }
.conv-bottom { padding: 10px 12px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.conv-bottom .dock-inner { display: flex; flex-direction: column; gap: 6px; max-width: none; }
.conv-bottom .composer { box-shadow: none; }
.panel-actions .icon-btn.glass { width: 30px; height: 30px; }

/* Avatar du chat : visage de face de la figurine (sources/avatar_figurine.png recadré), animé selon l'état. */
.conv-avatar {
  position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
  background: #11131b url("assets/face.png") no-repeat 50% 50% / cover;
  border: 1px solid var(--border); box-shadow: 0 0 0 2px hsl(var(--scene-hue) 90% 70% / 0.28);
  transition: box-shadow 0.3s;
}
body[data-avatar="speaking"] .conv-avatar { box-shadow: 0 0 0 2px var(--accent), 0 0 18px rgb(56 214 245 / 0.55); animation: face-talk 0.42s ease-in-out infinite alternate; }
body[data-avatar="listening"] .conv-avatar { box-shadow: 0 0 0 2px var(--accent); }
@keyframes face-talk { from { background-size: 100%; background-position: 50% 50%; } to { background-size: 106%; background-position: 50% 44%; } }
body[data-avatar="thinking"] .conv-avatar { box-shadow: 0 0 0 2px hsl(var(--scene-hue) 90% 70% / 0.6); animation: pulse 1.4s ease-in-out infinite; }

.conv-results { padding: 20px 2px 40px; scroll-margin-top: 12px; }
body:not(.has-results) .conv-results { display: none; }
.results-grid { display: grid; gap: 14px; }
.details-link {
  display: inline-block; margin-top: 10px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 12px var(--mono); letter-spacing: 0.04em; color: var(--accent);
}
@media (min-width: 1024px) {
  .conv {
    display: grid; grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); gap: 20px;
    max-width: 110rem; margin: 0 auto; padding: 0 20px 20px; height: calc(100svh - 76px); min-height: 32rem;
  }
  .conv-chat { height: auto; min-height: 0; }
  body .conv-results { display: block; overflow-y: auto; min-height: 0; padding: 0 6px 8px 0; scrollbar-width: thin; }
  .results-grid { grid-template-columns: 1fr 1fr; }
  .results-grid > :first-child { grid-column: 1 / -1; }
  .details-link { display: none; }
  .results-grid:empty::before {
    content: attr(data-empty); grid-column: 1 / -1; display: block; padding: 40px 24px; text-align: center;
    border: 1px dashed var(--border); border-radius: 22px; color: var(--muted); font-size: 14px;
  }
}

/* ================================================================ CARTES (rendu commun) */
.card { position: relative; padding: 18px 18px 20px; border-radius: 22px; min-width: 0; }
.card.card-in { animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
.card-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 14px; }
.card-label { margin: 0; font: 600 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: hsl(var(--scene-hue) 90% 72%); }
.card-sub { margin: 0; font: 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.stat-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-tiles li { padding: 14px; border-radius: 16px; background: rgb(255 255 255 / 0.03); border: 1px solid var(--border); }
.tile-num {
  margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tile-label { margin: 6px 0 0; font: 10.5px/1.45 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 640px) { .stat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tile-num { font-size: 36px; } }

.contact-band { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.contact-photo {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  background: #11131b url("assets/face.png") no-repeat 50% 50% / cover; border: 1px solid var(--border);
}
.contact-id { flex: 1; min-width: 10rem; }
.contact-name { margin: 0; font-weight: 600; font-size: 16px; }
.contact-role { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.contact-actions .pill { font-size: 13px; padding: 8px 12px; color: var(--fg); }
.contact-actions .pill svg { color: var(--accent); }
/* En-tête du chat : titre prioritaire, boutons compacts, NOUVELLE DISCUSSION en petites majuscules */
.conv .panel-head { padding: 10px 12px; gap: 8px; }
.conv .panel-id { flex: 1 1 auto; min-width: 0; }
.conv .panel-sub { font-size: 11.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.conv .panel-actions { gap: 4px; flex: none; }
.conv .new-chat { font: 600 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 9px; }
@media (max-width: 1279px) and (min-width: 1024px) { .conv .new-chat span { display: none; } .conv .new-chat { padding: 7px; } }
@media (max-width: 639px) {
  .conv .new-chat span, .conv #motion { display: none; }
  .conv .new-chat { padding: 7px; }
  .conv .panel-name { font-size: 13.5px; }
}

/* Carte « experience » */
.job-card + .job-card { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.job-top { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; }
.job-logo {
  grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font: 700 14px var(--mono); color: #07080c; background: linear-gradient(135deg, hsl(var(--scene-hue) 90% 72%), var(--accent));
}
.job-role { margin: 0; font-weight: 650; font-size: 16px; line-height: 1.3; }
.job-org { margin: 2px 0 0; color: var(--accent); font-size: 14px; }
.job-former { color: var(--muted); font-size: 12px; }
.job-meta { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.job-dates { grid-column: 2; margin: 0; font: 11.5px var(--mono); color: var(--muted); letter-spacing: 0.03em; }
.job-dates span { margin-left: 8px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); }
.job-wins { margin: 12px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; color: rgb(238 240 246 / 0.86); }
.job-wins li::marker { color: var(--accent); }
.card .stack { margin-top: 10px; }
@media (min-width: 640px) {
  .job-top { grid-template-columns: auto 1fr auto; }
  .job-logo { grid-row: span 3; }
  .job-dates { grid-column: 3; grid-row: 1; text-align: right; }
  .job-dates span { display: block; margin: 4px 0 0; text-align: center; }
}
.fold summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px;
  font: 12px var(--mono); letter-spacing: 0.04em; color: var(--accent);
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgb(56 214 245 / 0.4); }
.fold[open] summary::before { content: "−"; }
.fold[open] summary { margin-bottom: 14px; }

/* Cartes « projets » */
.proj-grid { display: grid; gap: 10px; }
@media (min-width: 640px) { .proj-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .proj-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.proj-mini { padding: 14px; border-radius: 16px; background: rgb(255 255 255 / 0.03); border: 1px solid var(--border); min-width: 0; }
.proj-tag { margin: 0; font: 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: hsl(var(--scene-hue) 90% 72%); }
.proj-title { margin: 4px 0 0; font-size: 15px; font-weight: 650; }
.proj-nums { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.proj-nums b { display: block; font-size: 20px; letter-spacing: -0.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.proj-nums span { font: 10px var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.proj-text { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.proj-links { margin: 10px 0 0; }
.proj-links .pill { font-size: 12.5px; color: var(--fg); }
.badge-live { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgb(46 204 113 / 0.12); color: #8ff0b0; border: 1px solid rgb(46 204 113 / 0.3); }

/* Carte « highlight » */
.highlight { display: flex; align-items: center; gap: 14px; }
.hl-num { margin: 0; font-size: 44px; font-weight: 750; letter-spacing: -0.04em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hl-text { margin: 0; color: rgb(238 240 246 / 0.85); font-size: 14px; line-height: 1.5; }

.card-more { display: inline-block; margin-top: 14px; font: 11.5px var(--mono); letter-spacing: 0.04em; color: var(--muted); text-decoration: none; }
.card-more:hover { color: var(--accent); }

/* Chantiers (projets compacts) : pleine largeur, colonnes selon la place disponible */
.results-grid > .card-projets { grid-column: 1 / -1; }
.proj-grid.compact { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important; }

/* Carte « schema » : nœuds avec logos, flèches animées ; vertical sur mobile */
.schema { margin: 0; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.node {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 14px; text-align: center;
  background: rgb(255 255 255 / 0.035); border: 1px solid var(--border);
}
.node b { font-size: 13.5px; font-weight: 650; }
.node small { font: 10.5px var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.node.accent { border-color: hsl(var(--scene-hue) 90% 70% / 0.5); background: hsl(var(--scene-hue) 90% 60% / 0.1); }
.node.accent b { color: var(--accent); }
.node-icons { display: inline-flex; gap: 4px; }
.node-ico {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: var(--c1f, rgb(255 255 255 / 0.06)); border: 1px solid var(--c38, var(--border));
}
.node-ico img, .node-ico svg { width: 17px; height: 17px; object-fit: contain; }
.node-ico .mono { font: 600 10px/1 var(--mono); }
.node-txt { width: auto; padding: 0 7px; font: 10.5px var(--mono); color: var(--fg); }
.arrow { display: grid; place-items: center; height: 22px; }
.arrow svg { width: 30px; height: 10px; transform: rotate(90deg); }
.schema svg path { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.schema svg .dash { stroke-dasharray: 4 4; animation: dash-flow 1.1s linear infinite; opacity: 0.85; }
@keyframes dash-flow { to { stroke-dashoffset: -16; } }
.branches { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--border); display: grid; gap: 8px; }
.branches li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.br-from { font: 10.5px var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.br-arrow { width: 26px; height: 10px; flex: none; }
.branches b { font-weight: 600; }
@media (min-width: 700px) {
  .flow { flex-direction: row; align-items: stretch; }
  .flow .node { flex: 1 1 0; min-width: 0; justify-content: center; }
  .arrow { height: auto; width: 26px; flex: none; }
  .arrow svg { transform: none; width: 26px; }
}

/* Comparaison avant → après */
.compare { display: grid; grid-template-columns: 1fr; gap: 6px; }
.cmp-h { margin: 0; font: 600 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.cmp-h.after { color: var(--accent); }
.compare > span:empty { display: none; }
.cmp-before, .cmp-after { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; }
.cmp-before { color: var(--muted); background: rgb(255 255 255 / 0.025); border: 1px solid var(--border); text-decoration: line-through rgb(242 85 90 / 0.35); }
.cmp-after { background: hsl(var(--scene-hue) 90% 60% / 0.08); border: 1px solid hsl(var(--scene-hue) 90% 70% / 0.3); }
.cmp-tools { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.cmp-arrow { display: grid; place-items: center; height: 18px; }
.cmp-arrow svg { width: 26px; height: 10px; transform: rotate(90deg); }
.compare .cmp-h:nth-of-type(1) { display: none; }
@media (min-width: 640px) {
  .compare { grid-template-columns: 1fr auto 1.25fr; align-items: center; column-gap: 10px; row-gap: 8px; }
  .compare .cmp-h:nth-of-type(1) { display: block; }
  .compare > span:empty { display: block; }
  .cmp-arrow { height: auto; }
  .cmp-arrow svg { transform: none; }
}

/* Carte « outils » : groupes par catégorie, info-bulle d'usage */
.tool-group + .tool-group { margin-top: 12px; }
.tool-cat { margin: 0 0 6px; font: 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tool-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tool-pill {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px;
  font-size: 12.5px; background: var(--c1f); border: 1px solid var(--c38); cursor: default; outline-offset: 2px;
}
.tool-pill.plain { padding: 5px 10px; background: rgb(255 255 255 / 0.04); border-color: var(--border); }
.tool-pill .stack-ico { width: 18px; height: 18px; display: grid; place-items: center; }
.tool-pill .stack-ico img, .tool-pill .stack-ico svg { width: 15px; height: 15px; object-fit: contain; }
.tool-pill .stack-ico .mono { font: 600 9px/1 var(--mono); }
.tool-tip {
  position: absolute; z-index: 10; left: 50%; bottom: calc(100% + 8px); width: max-content; max-width: 15rem;
  padding: 7px 10px; border-radius: 10px; font-size: 12px; line-height: 1.4; color: var(--fg);
  background: rgb(16 18 26 / 0.97); border: 1px solid var(--c88, var(--border)); box-shadow: 0 10px 30px -8px rgb(0 0 0 / 0.7);
  opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: opacity 0.2s, transform 0.2s;
}
.tool-pill:hover .tool-tip, .tool-pill:focus-visible .tool-tip { opacity: 1; transform: translate(-50%, 0); }
html.motion-off .schema svg .dash { animation: none; }
/* Pendant la parole, la vignette de la dernière réponse s'illumine aussi. */
body[data-avatar="speaking"] .row.bot:last-of-type .thumb { border-color: var(--accent); box-shadow: 0 0 10px rgb(56 214 245 / 0.5); }
.compare .cmp-h { display: none; }
@media (min-width: 640px) { .compare .cmp-h { display: block; } }
.results-grid > .card-schema, .results-grid > .card-outils { grid-column: 1 / -1; }

/* Carte « roadmap » : frise verticale (horizontale sur ordinateur si demandé) */
.roadmap { list-style: none; margin: 0; padding: 0 0 0 20px; position: relative; }
.roadmap::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(to bottom, hsl(var(--scene-hue) 90% 70%), rgb(56 214 245 / 0.25)); }
.rm-step { position: relative; padding: 0 0 16px; }
.rm-step:last-child { padding-bottom: 0; }
.rm-dot { position: absolute; left: -20px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid hsl(var(--scene-hue) 90% 70%); }
.rm-date { margin: 0; font: 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.rm-eyebrow { margin: 2px 0 0; font: 600 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.rm-title { margin: 2px 0 0; font-weight: 650; font-size: 15px; line-height: 1.35; }
.rm-place { margin: 1px 0 0; color: var(--accent); font-size: 13px; }
.rm-text { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.rm-tags { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.rm-tags li { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; color: rgb(238 240 246 / 0.85); background: rgb(255 255 255 / 0.04); border: 1px solid var(--border); }
.rm-step.minor { padding-bottom: 10px; }
.rm-step.minor .rm-dot { width: 7px; height: 7px; left: -18px; top: 5px; border-width: 1.5px; border-color: var(--muted); }
.rm-step.minor .rm-title { font-weight: 500; font-size: 13px; color: var(--muted); }
.rm-step.target .rm-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 14px var(--accent); }
.rm-step.target .rm-title { color: var(--accent); }
@media (min-width: 900px) {
  .roadmap.horizontal { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; padding: 18px 0 0; }
  .roadmap.horizontal::before { left: 6px; right: 6px; top: 5px; bottom: auto; width: auto; height: 1px; background: linear-gradient(90deg, hsl(var(--scene-hue) 90% 70%), rgb(56 214 245 / 0.4)); }
  .roadmap.horizontal .rm-dot { left: 0; top: -18px; }
  .roadmap.horizontal .rm-step { padding: 0; }
}

/* Carte « certifications » */
.cert-group + .cert-group { margin-top: 14px; }
.cert-list2 { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* 2 colonnes seulement si la carte est assez large (panneau de résultats), 1 dans la colonne de la section */
.card { container-type: inline-size; }
@container (min-width: 620px) { .cert-list2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cert-badge { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgb(255 255 255 / 0.03); border: 1px solid var(--border); min-width: 0; }
.cert-logo {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font: 700 11px var(--mono);
  color: var(--ic); background: color-mix(in srgb, var(--ic) 14%, transparent); border: 1px solid color-mix(in srgb, var(--ic) 40%, transparent);
}
.cert-body { flex: 1; min-width: 0; }
.cert-name { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.35; }
.cert-meta { margin: 2px 0 0; font: 11px var(--mono); color: var(--muted); }
.cert-verify { flex: none; font: 11px var(--mono); color: var(--accent); text-decoration: none; padding: 4px 8px; border-radius: 999px; border: 1px solid rgb(56 214 245 / 0.3); }
.cert-verify:hover { background: rgb(56 214 245 / 0.1); }
.cert-more-btn { display: none; margin-top: 12px; padding: 7px 12px; border-radius: 999px; cursor: pointer; font: 12px var(--mono); color: var(--accent); background: none; border: 1px solid rgb(56 214 245 / 0.3); }
@media (max-width: 639px) {
  .cert-more-btn { display: inline-block; }
  .cert-more:not(.open) { display: none; }
}
.cert-more { margin-top: 14px; }
.cert-src { color: var(--muted); font-size: 12px; }

/* Carte « langues » */
.lang-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lb-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.lb-top span { font: 12px var(--mono); color: var(--muted); }
.lb-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 6px; }
.lb-bar i { height: 6px; border-radius: 3px; background: rgb(255 255 255 / 0.08); }
.lb-bar i.on { background: var(--grad); }

/* Carte « liens » */
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.link-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--fg); background: rgb(255 255 255 / 0.03); border: 1px solid var(--border); transition: border-color 0.2s, background 0.2s; }
.link-item:hover { border-color: rgb(56 214 245 / 0.45); background: rgb(56 214 245 / 0.06); }
.link-item svg { color: var(--accent); flex: none; }
.results-grid > .card-roadmap, .results-grid > .card-certifications { grid-column: 1 / -1; }
/* Chiffres : toujours pleine largeur, nombres sur une ligne */
.results-grid > .card-chiffres { grid-column: 1 / -1; }
.tile-num { white-space: nowrap; font-size: clamp(24px, 2.6vw, 36px); }
.stat-tiles { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* ================================================================ SECTIONS SOUS LE HERO (refonte) */
.sub-block { margin-top: 40px; scroll-margin-top: 16px; }
.sec-cards { display: grid; gap: 16px; }
.sec-cards > div { scroll-margin-top: 16px; min-width: 0; }
@media (min-width: 1024px) {
  .sec-cards { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .sec-cards .sec-wide { grid-row: span 2; }
}
#about-path { max-width: 60rem; }
.about-ask { margin-top: 18px; flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.below .card { scroll-margin-top: 16px; }
/* Taille des nombres adaptée à la largeur de la tuile (ex. « AUC 0,82 » ne déborde plus) */
.stat-tiles li { container-type: inline-size; min-width: 0; }
.tile-num { font-size: min(36px, 17cqi); }

/* ================================================================ HERO COMPACT (grille commune 560 px)
 * Tout le hero tient dans le premier écran (1366×768, 1024×600, mobile) : avatar réduit, onglets collés
 * dessous, titre sur une ligne, barre de question et 4 boutons alignés sur la même colonne. */
:root { --hero-col: 600px; }

/* En-tête : logotype texte entre crochets + nom / rôle */
.logotype { font: 300 26px/1 var(--mono); letter-spacing: -0.03em; color: var(--fg); white-space: nowrap; }
.brand { gap: 14px; border-radius: 6px; }
.brand-text .brand-name { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.brand-role { font-size: 10px; letter-spacing: 0.18em; margin-top: 2px; }

/* Cadre du hero : centré verticalement dans l'écran restant sous l'en-tête */
body:not(.panel-open) #hero, #hero {
  min-height: calc(100svh - 66px); justify-content: center; padding: 0 16px 20px; isolation: isolate;
}
#hero > :not(.constellation) { position: relative; z-index: 1; }
.constellation { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* Avatar réduit (vidéo ≈ 25 % de la hauteur d'écran), orbite resserrée (réglée dans app.js) */
#hero .stage { width: min(100%, 290px, 30svh); min-width: 0; }

/* Onglets : une pilule segmentée collée sous l'avatar, progression sous l'onglet actif, pause à droite */
#hero .scene { max-width: none; margin-top: -6px; }
#hero .scene-nav { flex-direction: row; justify-content: center; align-items: center; gap: 6px; width: auto; }
#hero .scene-tabs { padding: 3px; gap: 0; background: rgb(16 18 26 / 0.55); border-color: var(--border); }
#hero .scene-tab { position: relative; padding: 6px 13px 7px; font-size: 12.5px; }
#hero .scene-tab[aria-selected="true"] {
  color: var(--fg); box-shadow: none;
  background: color-mix(in oklab, var(--fg) 15%, #10121a);
}
.scene-tab-progress {
  position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1.5px; border-radius: 1px;
  background: var(--grad); transform-origin: left; transform: scaleX(0); pointer-events: none;
}
#hero .scene-pause { width: 26px; height: 26px; color: var(--muted); }
#hero .scene-pause:hover { color: var(--fg); }

/* Titre : une ligne, léger, un fragment en gras (taille réduite par scenes.js seulement si ça déborde) */
#hero .scene-panel { width: 100%; margin-top: 14px; }
#hero .scene-title {
  margin: 0; white-space: nowrap; text-wrap: nowrap;
  font-size: clamp(30px, 4.3vw, 56px); line-height: 1.05; font-weight: 300; letter-spacing: -0.035em;
}
#hero .scene-title strong {
  font-weight: 700; letter-spacing: -0.04em;
  background: linear-gradient(120deg, hsl(var(--scene-hue) 95% 78%), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Barre de question : rectangle à petits coins, envoi carré en accent, micro discret à sa gauche */
#hero .hero-composer { width: 100%; max-width: var(--hero-col); margin-top: 18px; }
#hero .composer {
  gap: 4px; padding: 5px 5px 5px 14px; border-radius: 6px;
  background: rgb(16 18 26 / 0.55); border: 1px solid rgb(255 255 255 / 0.14); box-shadow: none;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
#hero .composer:focus-within { border-color: hsl(var(--scene-hue) 90% 70% / 0.55); }
#hero .composer textarea { padding: 10px 0; font-size: 15px; }
#hero .composer .send { order: 2; width: 40px; height: 40px; border-radius: 4px; background: var(--grad); color: #07080c; }
#hero .composer .send:disabled { background: var(--grad); color: #07080c; opacity: 0.45; }
#hero .composer .mic-wrap { order: 1; }
#hero .composer .mic { width: 36px; height: 36px; border-radius: 4px; border: 0; background: none; box-shadow: none; color: var(--muted); }
#hero .composer .mic:hover { color: var(--fg); background: rgb(255 255 255 / 0.06); }
#hero .composer .mic.on { color: #07080c; background: var(--grad); }
#hero .composer .mic svg.mic-icon { width: 18px; height: 18px; }
#hero .composer .mic-pulse { border-radius: 4px; }

/* Questions : grille de 4 colonnes égales, alignée sur la barre (2 × 2 sur mobile) */
#hero .scene-chips {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
  width: 100%; max-width: var(--hero-col); margin: 8px 0 0; padding: 0; overflow: visible;
  -webkit-mask-image: none; mask-image: none;
}
#hero .scene-chips li { display: flex; position: static; }
#hero .q-btn {
  position: relative; width: 100%; min-height: 54px; padding: 6px 8px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  white-space: normal; border-radius: 5px; font-size: 12.5px; line-height: 1.3; color: rgb(238 240 246 / 0.88);
  background: rgb(16 18 26 / 0.55); border: 1px solid rgb(255 255 255 / 0.12);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
#hero .q-btn > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
#hero .q-btn::after { /* petite encoche décorative dans le coin */
  content: ""; position: absolute; right: 3px; bottom: 3px; width: 7px; height: 7px;
  background: hsl(var(--scene-hue) 90% 72% / 0.55); clip-path: polygon(100% 0, 100% 100%, 0 100%);
  transition: background 0.25s;
}
#hero .q-btn:hover { color: var(--fg); border-color: hsl(var(--scene-hue) 90% 70% / 0.5); background: rgb(16 18 26 / 0.75); box-shadow: none; }
#hero .q-btn:hover::after { background: var(--accent); }
#hero .q-btn.chip-fixed { color: var(--fg); border-color: hsl(var(--scene-hue) 90% 70% / 0.35); }

/* Bas du hero : reprise en lien texte, mention IA */
#hero .resume-btn {
  margin-top: 10px; padding: 2px 4px; border: 0; border-radius: 3px; background: none;
  font-size: 12.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
}
#hero .resume-btn:hover { color: var(--accent); }
#hero .scene-note { margin-top: 10px; font-size: 11.5px; }

@media (max-width: 639px) {
  #hero .scene-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #hero .scene-tab { padding: 6px 10px 7px; }
  .logotype { font-size: 22px; }
}
/* Écrans peu hauts (1024×600…) : on resserre les espacements */
@media (max-height: 680px) {
  #hero .stage { width: min(100%, 290px, 28svh); }
  #hero .scene-panel { margin-top: 10px; }
  #hero .hero-composer { margin-top: 12px; }
  #hero .q-btn { min-height: 48px; padding: 6px 8px; }
  #hero .scene-note { margin-top: 6px; }
}

/* ================================================================ PIED DE PAGE COMPACT (contact) */
.below { display: none; }
body:not(.panel-open) #hero, #hero { min-height: calc(100svh - 66px - 58px); }
.site-foot { max-width: 72rem; margin: 0 auto; padding: 0 16px max(10px, env(safe-area-inset-bottom)); position: relative; z-index: 2; }
.foot-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
  padding: 14px 0 6px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted);
}
.foot-id { margin: 0; display: flex; align-items: center; gap: 12px; }
.foot-logo { font: 300 15px/1 var(--mono); color: var(--fg); letter-spacing: -0.02em; }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.foot-links .foot-link { font-size: 13px; }
.foot-links a.foot-link:hover { color: var(--fg); }
body.conv-mode .site-foot { display: none; }
@media (max-width: 639px) {
  .foot-row { justify-content: center; text-align: center; }
  .foot-links { justify-content: center; gap: 6px 14px; }
}

/* Cadre de l'avatar au format de la vidéo dès le chargement (anciennement un style en ligne, interdit par la CSP). */
body.avatar-video #figure { aspect-ratio: 854 / 714; height: auto; width: 100%; }

/* Turnstile : invisible tant que tout va bien ; si Cloudflare demande une interaction, la case apparaît ici. */
.turnstile-box { position: fixed; z-index: 90; left: 50%; bottom: 96px; transform: translateX(-50%); }
.turnstile-box:empty { display: none; }

/* Confidentialité : lien discret dans le pied de page, fenêtre modale lisible sur mobile */
.privacy-link {
  border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 13px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.privacy-link:hover { color: var(--fg); }
.privacy {
  width: min(40rem, calc(100vw - 32px)); max-height: min(80svh, 44rem); padding: 0; border-radius: 16px;
  border: 1px solid var(--border); color: var(--fg); overflow: hidden;
}
.privacy[open] { display: flex; flex-direction: column; }
.privacy::backdrop { background: rgb(4 5 8 / 0.7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.privacy-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.privacy-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.privacy-body { padding: 4px 18px 18px; overflow-y: auto; font-size: 14px; line-height: 1.6; color: rgb(238 240 246 / 0.86); }
.privacy-body h3 { margin: 16px 0 4px; font: 600 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.privacy-body p { margin: 0; }
.privacy-body a { color: var(--accent); }
