/* Le portfolio en 3D : ce qui s'affiche par-dessus la scene. */
@font-face { font-family: 'Unbounded'; src: url('fonts/unbounded.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('fonts/geist.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #f6f3fa;
  --mut: #b6b0c2;
  --faint: #8a8497;
  --bg: #0b0a10;
  --line: rgba(246, 243, 250, 0.12);
  --mag: #ff2a6d;
  --cyan: #2de2e6;
  --display: 'Unbounded', system-ui, sans-serif;
  --text: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--text); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; opacity: 0; transition: opacity 0.6s; }
.ready #scene { opacity: 1; }

/* --- en haut --- */
.top { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 20px; padding: 16px clamp(16px, 3vw, 32px); pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 15px/1 var(--display); letter-spacing: -0.01em; }
.brand img { display: block; border-radius: 8px; }
.top nav { display: flex; gap: 4px; margin-left: 8px; }
.top nav a { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px; font-size: 14px; white-space: nowrap; color: var(--mut); transition: color 0.12s, background-color 0.12s; }
.top nav a:hover { color: var(--ink); background: rgba(246, 243, 250, 0.08); }
.top nav a.quiet { color: var(--faint); }
[data-project='mpmedia'] .top nav a[data-enter='mpmedia'], [data-project='veltrix'] .top nav a[data-enter='veltrix'], [data-project='vtx'] .top nav a[data-enter='vtx'] { color: var(--ink); background: rgba(246, 243, 250, 0.1); }
.cta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; background: var(--mag); color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; transition: background-color 0.12s; }
.cta:hover { background: #ff4a83; }

/* --- les etiquettes des objets --- */
.labels { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.label { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; border-radius: 10px; background: rgba(11, 10, 16, 0.72); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; white-space: nowrap; will-change: transform; transition: background-color 0.15s, box-shadow 0.15s; }
.label b { font: 600 14px/1.2 var(--display); }
.label span { font-size: 12px; color: var(--mut); }
.label::after { content: ''; position: absolute; left: calc(50% + var(--dx, 0px)); bottom: -14px; width: 1px; height: 14px; background: var(--tone); }
.label:hover, .label.on, .label:focus-visible { background: rgba(11, 10, 16, 0.9); box-shadow: inset 0 0 0 1.5px var(--tone); }

/* --- l'indication du bas --- */
.hint { position: fixed; z-index: 10; left: 0; right: 0; bottom: max(22px, env(safe-area-inset-bottom)); display: flex; justify-content: center; pointer-events: none; }
.hint .step { display: none; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 20px; background: rgba(11, 10, 16, 0.7); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 14px; color: var(--mut); pointer-events: auto; }
.hint[data-step='intro'] .intro, .hint[data-step='desk'] .desk { display: inline-flex; }
.hint .intro svg { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(3px); } }

/* --- le passage d'un monde a l'autre --- */
#wipe { position: fixed; inset: 0; z-index: 30; background: var(--tone, var(--mag)); clip-path: circle(0% at 50% 50%); pointer-events: none; }
#wipe.in { clip-path: circle(150% at 50% 50%); transition: clip-path 0.55s cubic-bezier(0.7, 0, 0.3, 1); pointer-events: auto; }
#wipe.in.out { opacity: 0; transition: opacity 0.55s; pointer-events: none; }

/* --- la fiche d'un projet --- */
.panel { position: fixed; z-index: 15; top: 0; right: 0; bottom: 0; width: min(540px, 46vw); overflow-y: auto; overscroll-behavior: contain; padding: 84px clamp(20px, 3vw, 40px) 40px; background: linear-gradient(90deg, rgba(11, 10, 16, 0) 0, rgba(11, 10, 16, 0.86) 56px); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.panel[hidden] { display: none; }
.panel article { display: flex; flex-direction: column; gap: 20px; animation: rise 0.5s 0.15s both; }
.panel article[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.back { align-self: flex-start; height: 34px; padding: 0 12px; margin-left: -12px; border-radius: 8px; font-size: 14px; color: var(--mut); }
.back:hover { color: var(--ink); background: rgba(246, 243, 250, 0.08); }
.eyebrow { margin: 0; font-size: 14px; color: var(--tone); }
.panel h1 { margin: -12px 0 0; font: 600 clamp(36px, 5vw, 56px)/1.02 var(--display); letter-spacing: -0.035em; }
.lead { margin: 0; font-size: 16.5px; line-height: 1.55; color: var(--mut); }
.numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; border-radius: 14px; overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.numbers div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 14px 16px; background: rgba(11, 10, 16, 0.9); }
.numbers dd { margin: 0; font: 600 22px/1.1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.numbers dt { font-size: 12.5px; color: var(--faint); }
.panel figure { margin: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.panel figure img { display: block; width: 100%; height: auto; }
.points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.points li { position: relative; padding-left: 18px; font-size: 14.5px; color: var(--mut); }
.points li::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 2px; background: var(--tone); }
.points b { font-weight: 500; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.tags span { height: 24px; padding: 0 8px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; line-height: 24px; color: var(--mut); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 16px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; white-space: nowrap; transition: opacity 0.12s, background-color 0.12s; }
.btn:hover { opacity: 0.88; }
.btn.soft { background: rgba(246, 243, 250, 0.08); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.btn.soft:hover { opacity: 1; background: rgba(246, 243, 250, 0.14); }

/* Dans un projet, les indications du bureau n'ont plus lieu d'etre. */
[data-mode='world'] .labels, [data-mode='entering'] .labels, [data-mode='leaving'] .labels { display: none; }

/* --- sans 3D --- */
.fallback { display: none; position: fixed; inset: 0; z-index: 40; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; background: var(--bg); }
.fallback h1 { margin: 0; font: 600 28px/1.1 var(--display); letter-spacing: -0.03em; }
.fallback p { margin: 0; max-width: 44ch; color: var(--mut); }
.no-webgl .fallback { display: flex; }
.no-webgl #scene, .no-webgl .labels, .no-webgl .hint { display: none; }

/* --- telephone : la fiche monte du bas, l'objet reste au-dessus --- */
@media (max-width: 860px) {
  .top { gap: 8px; padding: 12px 14px; }
  .brand span, .top .wide, .top nav a.wide, .label .wide { display: none; }
  .top nav { margin-left: 0; }
  .top nav a { padding: 0 10px; }
  .cta { height: 36px; padding: 0 12px; }
  .cta span { font-size: 13px; }
  .panel { top: auto; left: 0; width: auto; height: 66dvh; padding: 22px 18px 32px; border-radius: 20px 20px 0 0; background: rgba(11, 10, 16, 0.9); box-shadow: 0 -1px 0 var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .panel h1 { margin-top: -10px; }
  .numbers dd { font-size: 18px; }
  .numbers div { padding: 12px; }
  .actions .btn { flex: 1 1 auto; }
  .label span { display: none; }
  .hint .step { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
