/* ═══════════════════════════════════════════
   LIAM — PORTFOLIO · style.css
═══════════════════════════════════════════ */

:root {
  --gold: #e8c97a;
  --cream: #f0e8d0;
  --cream-dim: rgba(240, 232, 208, .62);
  --glass: rgba(8, 12, 28, .62);
  --line: rgba(232, 201, 122, .22);
  --serif: "Playfair Display", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #050b1e; }
body {
  font-family: var(--serif); color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ── Ciel : reprend le dégradé de la fin de la vidéo ── */
#sky {
  position: fixed; inset: 0;
  background: linear-gradient(to bottom, #050b1e 0%, #0b182c 50%, #1b324b 100%);
}
#space {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: none; outline: none;
}

/* ═══ VIDÉO D'INTRO ═══ */
#stage {
  position: fixed; left: 0; top: 0; width: 1920px; height: 1080px;
  transform-origin: 0 0; z-index: 10; pointer-events: none;
}
#stage video { width: 100%; height: 100%; display: block; object-fit: cover; }
#stage.feather-y {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
}
#stage.feather-x {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
}

/* ═══ TEXTES DE L'INTRO ═══
   Le calque mesure tout l'écran, en « pixels de vidéo » (1920×1080).
   --vt = haut de la vidéo dans ce calque. */
#overlay {
  position: fixed; left: 0; top: 0; transform-origin: 0 0;
  z-index: 11; pointer-events: none; overflow: hidden;
  --vt: 0px;
}
#overlay > * { position: absolute; }

#vignette {
  inset: 0;
  background:
    radial-gradient(ellipse 75% 70% at 50% 50%, transparent 40%, rgba(2, 3, 12, .55) 100%),
    linear-gradient(to bottom, rgba(2, 3, 12, .55), rgba(2, 3, 12, .2) 38%, transparent 50%, transparent 70%, rgba(2, 3, 12, .45));
}

.bar {
  left: 0; right: 0; height: 96px; background: #000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 72px;
  font-family: var(--mono); font-size: 15px; letter-spacing: .32em;
  text-transform: uppercase; color: rgba(240, 232, 208, .55);
}
#bar-top { top: 0; }
#bar-bot { bottom: 0; }
.chapter { position: relative; height: 20px; width: 420px; }
.chapter span { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; }
.chapter span b { color: var(--gold); font-weight: 600; margin-right: 18px; }
#progress { position: absolute; left: 72px; right: 72px; bottom: 26px; height: 1px; background: rgba(240, 232, 208, .12); }
#progress i {
  position: absolute; inset: 0; transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, #a78bfa, var(--gold));
}

#title-wrap { left: 0; right: 0; top: calc(var(--vt) + 128px); text-align: center; }
#kicker {
  font-family: var(--mono); font-size: 18px; letter-spacing: .5em;
  text-transform: uppercase; color: var(--gold); opacity: 0;
}
#name {
  margin-top: 22px; font-size: 132px; font-weight: 700; line-height: 1;
  letter-spacing: .02em; white-space: nowrap;
  text-shadow: 0 6px 50px rgba(0, 0, 0, .55);
}
#name .ch { display: inline-block; opacity: 0; }
#name .sp { display: inline-block; width: .32em; }
#rule {
  width: 520px; height: 1px; margin: 24px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
}
#sub {
  margin-top: 18px; font-style: italic; font-size: 36px;
  color: rgba(240, 232, 208, .9); opacity: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 2px 24px rgba(0, 0, 0, .8);
}
#sub em { color: var(--gold); font-weight: 700; }

#term {
  right: 150px; top: calc(var(--vt) + 750px); width: 780px;
  padding: 30px 38px;
  background: rgba(6, 8, 20, .62);
  border: 1px solid rgba(232, 201, 122, .28); border-radius: 16px;
  backdrop-filter: blur(14px);
  font-family: var(--mono); font-size: 30px; line-height: 1.6; opacity: 0;
}
#term .dots { display: flex; gap: 10px; margin-bottom: 18px; }
#term .dots i { width: 13px; height: 13px; border-radius: 50%; background: rgba(240, 232, 208, .25); }
#term .prompt { color: var(--gold); }
#term .typed span { opacity: 0; }
#cursor { display: inline-block; width: 16px; height: 34px; vertical-align: -6px; background: var(--gold); margin-left: 4px; }

.word {
  transform-origin: left center;
  left: 150px; top: calc(var(--vt) + 230px);
  font-size: 230px; font-weight: 700; font-style: italic; line-height: 1;
  opacity: 0; text-shadow: 0 10px 60px rgba(0, 0, 0, .5);
}
.word small {
  display: block; margin: 18px 0 0 10px;
  font-family: var(--mono); font-style: normal; font-weight: 400;
  font-size: 22px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 18px rgba(0, 0, 0, .8);
}

#count-wrap { left: 150px; top: calc(var(--vt) + 200px); opacity: 0; }
#count {
  font-size: 300px; font-weight: 700; line-height: .9;
  background: linear-gradient(180deg, #fff6dc, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: lining-nums tabular-nums;
}
#count-label { margin-top: 10px; font-size: 54px; font-style: italic; text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }
#count-label em { color: var(--gold); }

.final {
  top: calc(var(--vt) + 470px);
  font-size: 64px; font-style: italic; line-height: 1;
  opacity: 0; white-space: nowrap; text-shadow: 0 4px 40px rgba(0, 0, 0, .7);
}
#final-l { right: calc(50% + 490px); text-align: right; }
#final-r { left: calc(50% + 490px); color: var(--gold); font-weight: 700; }
#final-hint {
  left: 0; right: 0; top: calc(var(--vt) + 590px); text-align: center;
  font-family: var(--mono); font-size: 18px; letter-spacing: .5em;
  text-transform: uppercase; color: rgba(240, 232, 208, .7); opacity: 0;
}
#fade { inset: 0; background: #000; }

/* Écran vertical : on resserre et on empile */
#overlay.portrait .bar { height: 150px; padding: 0 56px; font-size: 26px; letter-spacing: .24em; }
.bar-right { visibility: hidden; } /* les boutons Son / Passer sont à cet endroit */
#overlay.portrait #progress { left: 56px; right: 56px; bottom: 34px; }
#overlay.portrait #title-wrap { top: calc(var(--vt) - 140px); }
#overlay.portrait #name { font-size: 112px; }
#overlay.portrait #sub { font-size: 38px; padding: 0 60px; white-space: normal; }
#overlay.portrait #term { right: auto; left: 50%; margin-left: -390px; top: calc(var(--vt) + 1080px + 40px); }
#overlay.portrait .word { left: 70px; top: calc(var(--vt) + 1080px + 40px); font-size: 200px; }
#overlay.portrait .word small { font-size: 28px; }
#overlay.portrait #count-wrap { left: 70px; top: calc(var(--vt) + 1080px + 20px); }
#overlay.portrait #count { font-size: 260px; }
#overlay.portrait .final { left: 0; right: 0; text-align: center; font-size: 72px; }
#overlay.portrait #final-l { top: calc(var(--vt) - 30px); }
#overlay.portrait #final-r { top: calc(var(--vt) + 1080px - 50px); }
#overlay.portrait #final-hint { top: calc(var(--vt) + 1080px + 60px); font-size: 24px; }

/* ── Boutons de l'intro ── */
#intro-controls {
  position: fixed; z-index: 20; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; gap: 8px; transition: opacity .5s;
}
#intro-controls button, #intro-controls a, #play-btn {
  padding: .55rem 1.1rem; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .75); font-family: var(--mono); font-size: .78rem; letter-spacing: .06em;
  backdrop-filter: blur(10px); transition: background .2s, color .2s;
}
#intro-controls a { text-decoration: none; }
#intro-controls button:hover, #intro-controls a:hover { background: rgba(255, 255, 255, .18); color: #fff; }
#play-btn {
  position: fixed; z-index: 21; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 1rem; padding: .9rem 1.6rem;
}
body:not(.is-intro) #intro-controls { opacity: 0; pointer-events: none; }

/* ═══ INTERFACE DE L'ESPACE ═══ */
.ui { position: fixed; z-index: 5; opacity: 0; pointer-events: none; transition: opacity .9s var(--ease); }
body.is-space .ui { opacity: 1; pointer-events: auto; }
body.has-panel #planet-hud { opacity: 0; pointer-events: none; }

#topbar {
  left: 0; right: 0; top: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
}
#brand { font-family: var(--mono); font-size: .74rem; letter-spacing: .32em; text-transform: uppercase; color: var(--cream-dim); }
#top-actions { display: flex; gap: 8px; }
#overview-btn[aria-pressed="true"] { background: var(--cream); color: #10121c; }
#overview-btn, #list-btn, #simple-btn {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .08em;
  padding: .5rem 1rem; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px);
  transition: background .2s;
}
#simple-btn { color: inherit; text-decoration: none; }
#overview-btn:hover, #list-btn:hover, #simple-btn:hover { background: rgba(20, 26, 50, .8); }
#overview-btn[aria-pressed="true"]:hover { background: var(--cream); }

#planet-hud { left: max(28px, env(safe-area-inset-left)); top: 76px; transition: opacity .6s var(--ease); }
#planet-name { font-size: clamp(2rem, 4.4vw, 3.6rem); font-style: italic; font-weight: 700; line-height: 1; text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
#planet-theme {
  margin-top: .6rem; font-family: var(--mono); font-size: .76rem; letter-spacing: .3em;
  text-transform: uppercase; color: var(--gold);
}


#planet-nav {
  left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; gap: 6px; padding: 6px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 999px; backdrop-filter: blur(14px);
}
.pl-btn {
  display: flex; align-items: center; gap: .55rem;
  padding: .55rem 1rem .55rem .7rem; border-radius: 999px;
  font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; white-space: nowrap;
  color: var(--cream-dim); transition: background .25s, color .25s;
}
.pl-btn:hover { color: var(--cream); background: rgba(255, 255, 255, .06); }
.pl-btn[aria-current="true"] { color: #10121c; background: var(--cream); }
.pl-long { display: none; } /* 10 planètes : on garde les noms courts */
.pl-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: inset -3px -2px 4px rgba(0, 0, 0, .45); }

/* ── Marqueurs des projets ── */
#markers { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.marker {
  position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; margin: -22px 0 0 -22px; /* zone de clic large */
  display: grid; place-items: center;
  pointer-events: auto; opacity: 0; transition: opacity .35s;
  will-change: transform;
}
.marker .label { position: absolute; left: 34px; top: 50%; transform: translateY(-50%); }
.marker.flip .label { left: auto; right: 34px; }
.marker.visible { opacity: 1; }
.marker.hidden-side { pointer-events: none; }
.marker .dot {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: radial-gradient(circle, #fff 0 22%, var(--gold) 40%, rgba(232, 201, 122, 0) 72%);
  box-shadow: 0 0 14px 3px rgba(232, 201, 122, .55);
  transition: transform .3s var(--ease);
}
.marker .label {
  font-family: var(--mono); font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: .28rem .55rem; border-radius: 6px;
  background: rgba(6, 9, 22, .55); border: 1px solid rgba(232, 201, 122, .18);
  backdrop-filter: blur(6px); white-space: nowrap;
  transition: background .2s, color .2s;
}
.marker:hover .dot, .marker:focus-visible .dot, .marker.active .dot { transform: scale(1.45); }
.marker:hover .label, .marker.active .label { background: rgba(232, 201, 122, .92); color: #14110a; }
body.has-panel .marker.visible:not(.active) { opacity: .35; }
body.has-panel #planet-nav { opacity: 0; pointer-events: none; }

/* ═══ PANNEAU PROJET ═══ */
#panel {
  position: fixed; z-index: 8;
  right: max(20px, env(safe-area-inset-right)); top: 76px; bottom: 24px; width: min(430px, 40vw);
  display: flex; flex-direction: column;
  background: rgba(8, 11, 26, .72); border: 1px solid var(--line); border-radius: 22px;
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  transform: translateX(calc(100% + 40px)); transition: transform .7s var(--ease);
}
body.has-panel #panel { transform: none; }
#panel-grip { display: none; }
#p-close {
  position: absolute; right: 12px; top: 10px; width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.5rem; line-height: 1; color: var(--cream-dim);
}
#p-close:hover { color: var(--cream); background: rgba(255, 255, 255, .07); }
#p-scroll { overflow-y: auto; padding: 30px 30px 18px; flex: 1; overscroll-behavior: contain; }
#p-phase { font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
#p-name { margin-top: .5rem; font-size: 2.4rem; font-weight: 700; font-style: italic; line-height: 1.05; }
#p-crater { margin-top: .35rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; color: var(--cream-dim); }
#p-crater:empty { display: none; }
#p-pitch { margin-top: 1rem; font-size: 1.12rem; line-height: 1.5; }
#p-highlights { margin-top: 1.1rem; list-style: none; display: grid; gap: .55rem; }
#p-highlights li {
  position: relative; padding-left: 1.3rem;
  font-family: system-ui, sans-serif; font-size: .9rem; line-height: 1.45; color: rgba(240, 232, 208, .85);
}
#p-highlights li::before { content: "✦"; position: absolute; left: 0; top: .05rem; color: var(--gold); font-size: .7rem; }
.p-label { margin-top: 1.4rem; font-family: var(--mono); font-size: .66rem; letter-spacing: .26em; text-transform: uppercase; color: var(--cream-dim); }
#p-tools { margin-top: .55rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-family: var(--mono); font-size: .72rem; padding: .25rem .6rem; border-radius: 6px;
  background: rgba(167, 139, 250, .1); border: 1px solid rgba(167, 139, 250, .25); color: #d9ccff;
}
#p-links { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
#p-links:empty { display: none; }
.link-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1rem; border-radius: 999px; text-decoration: none;
  font-family: var(--mono); font-size: .76rem; color: #14110a; background: var(--gold);
  transition: filter .2s;
}
.link-btn:hover { filter: brightness(1.1); }
.link-btn::after { content: "↗"; }
/* « Plus de détails » dans le panneau projet */
.more-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 1.2rem; padding: .5rem .95rem;
  border-radius: 999px; border: 1px solid var(--line); font-family: var(--mono); font-size: .74rem; letter-spacing: .04em;
  transition: border-color .2s, background-color .2s;
}
.more-btn:hover { border-color: rgba(232, 201, 122, .55); background: rgba(232, 201, 122, .08); }
.more-btn[hidden], .p-details[hidden] { display: none; }
.p-details { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(232, 201, 122, .14); animation: d-open .35s var(--ease); }
@keyframes d-open { from { opacity: 0; transform: translateY(-6px); } }
.d-intro { font-family: system-ui, sans-serif; font-size: .92rem; line-height: 1.55; color: var(--cream); }
.d-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .9rem; }
.d-facts div { padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(232, 201, 122, .16); background: rgba(255, 255, 255, .03); }
.d-facts dt { font-family: var(--mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.d-facts dd { font-family: system-ui, sans-serif; font-size: .82rem; }
.d-sec { margin-top: 1.1rem; }
.d-sec h5 { font-family: var(--mono); font-size: .64rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.d-sec ul { list-style: none; display: grid; gap: .45rem; margin-top: .55rem; }
.d-sec li { position: relative; padding-left: 1.2rem; font-family: system-ui, sans-serif; font-size: .85rem; line-height: 1.45; color: rgba(240, 232, 208, .82); }
.d-sec li::before { content: "✦"; position: absolute; left: 0; top: .05rem; color: var(--gold); font-size: .65rem; }
@media (prefers-reduced-motion: reduce) { .p-details { animation: none; } }
#p-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px 16px; border-top: 1px solid rgba(232, 201, 122, .12);
}
#p-nav button {
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.15rem;
  border: 1px solid var(--line); transition: background .2s;
}
#p-nav button:hover { background: rgba(255, 255, 255, .07); }
#p-count { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; color: var(--cream-dim); }

/* ═══ VUE LISTE ═══ */
#list-view {
  position: fixed; inset: 0; z-index: 30; overflow-y: auto;
  background: rgba(4, 7, 18, .94); backdrop-filter: blur(10px);
  padding: 84px max(20px, env(safe-area-inset-right)) 60px max(20px, env(safe-area-inset-left));
}
#list-view[hidden] { display: none; }
body.list-open #topbar { z-index: 31; }
body.list-open #overview-btn { visibility: hidden; }
#list-inner { max-width: 1100px; margin: 0 auto; }
.l-planet { margin-bottom: 3rem; }
.l-planet h2 { font-size: 2rem; font-style: italic; }
.l-planet .l-theme { margin-top: .35rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.l-grid { margin-top: 1.2rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.l-card {
  display: flex; flex-direction: column; gap: .5rem; text-align: left;
  padding: 20px; border-radius: 16px;
  background: rgba(255, 255, 255, .035); border: 1px solid rgba(232, 201, 122, .14);
  transition: border-color .2s, background .2s;
}
.l-card:hover { border-color: rgba(232, 201, 122, .45); background: rgba(255, 255, 255, .06); }
.l-card .l-status { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.l-card h3 { font-size: 1.45rem; font-style: italic; }
.l-card p { font-family: system-ui, sans-serif; font-size: .88rem; line-height: 1.45; color: rgba(240, 232, 208, .78); }

/* ═══ TÉLÉPHONE ═══ */
@media (max-width: 760px) {
  #planet-hud { top: 64px; left: 20px; }
  #planet-nav { max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
  .pl-btn { padding: .55rem .95rem .55rem .65rem; font-size: .76rem; }
  .marker .label { font-size: .64rem; padding: .22rem .45rem; }

  #panel {
    left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 64vh;
    border-radius: 22px 22px 0 0; border-bottom: 0;
    transform: translateY(105%);
    padding-bottom: env(safe-area-inset-bottom);
  }
  #panel-grip { display: block; width: 44px; height: 5px; border-radius: 3px; background: rgba(240, 232, 208, .25); margin: 10px auto 0; flex: none; }
  #p-scroll { padding: 14px 22px 12px; }
  #p-name { font-size: 2rem; }
  #p-pitch { font-size: 1.02rem; }
  #p-nav { padding: 8px 16px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Étiquettes des planètes dans la vue d'ensemble */
.ov-label .label { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.ov-label .label small { font-size: .62rem; font-weight: 400; letter-spacing: .06em; text-transform: none; color: var(--gold); }
.ov-label:hover .label small { color: #14110a; }
@media (max-width: 760px) {
  #overview-btn, #list-btn, #simple-btn { padding: .45rem .75rem; font-size: .7rem; }
}
@media (max-width: 440px) {
  #brand { display: none; }
  #topbar { justify-content: flex-end; }
}

/* La Terre et la Lune côte à côte dans la vue d'ensemble */
.marker.above .label { left: 50%; right: auto; top: auto; bottom: 32px; transform: translateX(-50%); }
.marker.below .label { left: 50%; right: auto; top: 32px; transform: translateX(-50%); }
.ov-empty .dot { transform: scale(.7); opacity: .7; }
.ov-empty .label { opacity: .75; }

/* Barres de défilement discrètes */
* { scrollbar-width: thin; scrollbar-color: rgba(232, 201, 122, .35) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(232, 201, 122, .28); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(232, 201, 122, .5); background-clip: padding-box; }
#planet-nav { scrollbar-width: none; }
#planet-nav::-webkit-scrollbar { display: none; }
#planet-nav { max-width: calc(100% - 32px); overflow-x: auto; }

/* Crédit des textures (obligatoire avec la licence CC BY 4.0) */
#credits {
  left: max(20px, env(safe-area-inset-left)); bottom: 84px; max-width: 220px; line-height: 1.5;
  font-family: var(--mono); font-size: .56rem; letter-spacing: .02em; color: rgba(240, 232, 208, .26);
  transition: color .3s, opacity .6s var(--ease);
}
#credits:hover { color: rgba(240, 232, 208, .6); }
#credits a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
#credits a:hover { color: var(--gold); }
body.has-panel #credits { opacity: 0; pointer-events: none; }

/* Curseur : on attrape la planète */
body.is-space #space { cursor: grab; }
body.is-space #space.grabbing { cursor: grabbing; }

/* Aide des commandes (ordinateur seulement) */
#controls-hint {
  right: max(24px, env(safe-area-inset-right)); top: 70px;
  display: flex; flex-direction: column; align-items: flex-end; gap: .25rem;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .04em; color: rgba(240, 232, 208, .45);
}
#controls-hint b { color: rgba(232, 201, 122, .75); font-weight: 600; margin-right: .4rem; }
body.has-panel #controls-hint, body.hint-used #controls-hint { opacity: 0; pointer-events: none; }
@media (pointer: coarse), (max-width: 900px) { #controls-hint { display: none; } }

/* ═══ BARRE DES PLANÈTES ═══ */
#planet-nav {
  display: flex; align-items: center; gap: 4px;
  width: min(820px, calc(100% - 32px)); max-width: none; overflow: visible; padding: 5px;
}
#planet-strip {
  flex: 1; min-width: 0; display: flex; gap: 4px;
  overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none;
  /* fondu sur les bords : on devine qu'il y a d'autres planètes */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
          mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  padding: 0 18px;
}
#planet-strip::-webkit-scrollbar { display: none; }
.nav-arrow {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  font-size: 1.3rem; line-height: 1; color: var(--cream);
  display: grid; place-items: center; transition: background .2s, opacity .2s;
}
.nav-arrow:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.nav-arrow:disabled { opacity: .25; cursor: default; }
.pl-btn { flex: none; position: relative; }
.pl-btn.empty { color: rgba(240, 232, 208, .4); }
.pl-btn.empty .pl-dot { opacity: .6; }
.pl-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: inline-grid; place-items: center;
  font-size: .64rem; font-weight: 600; color: #14110a; background: var(--gold);
}
.pl-btn[aria-current="true"] .pl-count { background: #14110a; color: var(--gold); }
@media (max-width: 760px) {
  #planet-nav { width: calc(100% - 24px); }
  .nav-arrow { width: 32px; height: 32px; }
}

/* ═══ TÉLÉPHONE : retouches d'ergonomie ═══ */
@media (max-width: 760px) {
  /* vue d'ensemble : seulement le nom des planètes, les planètes vides sans étiquette (elles restent dans la barre) */
  .ov-label .label small { display: none; }
  .ov-label .label { font-size: .58rem; padding: .18rem .4rem; }
  .ov-empty .label { display: none; }
  /* crédits : une ligne discrète au-dessus de la barre des planètes */
  #credits { max-width: calc(100% - 40px); font-size: .5rem; bottom: 80px; }
  /* bouton fermer du panneau : plus facile à toucher */
  #p-close { width: 44px; height: 44px; right: 8px; top: 6px; font-size: 1.7rem; }
  /* étiquettes des projets : zone de toucher plus grande */
  .marker .label { padding: .3rem .55rem; }
}

/* ═══ VUE LISTE : apparition, fiches détaillées ═══ */
#list-view.appear { animation: list-in .35s var(--ease, ease-out) both; }
#list-view.appear .l-planet { animation: list-rise .45s var(--ease, ease-out) both; }
#list-view.appear .l-planet:nth-child(2) { animation-delay: .05s; }
#list-view.appear .l-planet:nth-child(3) { animation-delay: .1s; }
#list-view.appear .l-planet:nth-child(n+4) { animation-delay: .15s; }
@keyframes list-in { from { opacity: 0; } }
@keyframes list-rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  #list-view.appear, #list-view.appear .l-planet { animation: none; }
}
.l-card.featured { border-color: rgba(232, 201, 122, .3); }
.l-card .l-place { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; color: rgba(240, 232, 208, .5); margin-top: -.25rem; }
.l-card ul { margin: .1rem 0 0; padding-left: 1.1rem; font-family: system-ui, sans-serif; font-size: .84rem; line-height: 1.45; color: rgba(240, 232, 208, .72); display: grid; gap: .25rem; }
.l-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .2rem; }
.l-tags span { font-family: var(--mono); font-size: .64rem; padding: .2rem .55rem; border-radius: 999px; border: 1px solid var(--line); color: rgba(240, 232, 208, .7); }
.l-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: .4rem; }
.l-link, .l-goto {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; padding: .4rem .85rem; border-radius: 999px;
  color: var(--cream); text-decoration: none; background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  transition: background .2s, border-color .2s;
}
.l-link:hover, .l-goto:hover { background: rgba(255, 255, 255, .12); border-color: rgba(232, 201, 122, .45); }
.l-goto { color: var(--gold); }

/* ═══ « Version simple » : maintenir le clic ═══ */
#simple-btn { position: relative; overflow: hidden; isolation: isolate; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
#simple-btn .hold-fill {
  position: absolute; inset: 0; z-index: -1; background: rgba(232, 201, 122, .35);
  transform: scaleX(0); transform-origin: left; transition: transform .2s ease-out;
}
#simple-btn.holding .hold-fill { transform: scaleX(1); transition: transform var(--hold, 700ms) linear; }

/* ═══ Choix de la langue ═══ */
.lang-select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; color: var(--cream);
  padding: .45rem 1.7rem .45rem .85rem; border-radius: 999px;
  background: var(--glass) url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%276%27%3E%3Cpath d=%27M1 1l4 4 4-4%27 fill=%27none%27 stroke=%27%23e8c97a%27 stroke-width=%271.5%27/%3E%3C/svg%3E") no-repeat right .7rem center;
  border: 1px solid var(--line); backdrop-filter: blur(12px);
}
.lang-select:hover { background-color: rgba(20, 26, 50, .8); }
.lang-select option { background: #10121c; color: #f0e8d0; }

/* Chinois : polices du système (Playfair et JetBrains Mono n'ont pas les caractères chinois), pas d'italique */
:lang(zh) body { font-family: "Playfair Display", "Noto Serif SC", "Songti SC", "SimSun", serif; }
:lang(zh) * { font-style: normal !important; }
