/* Feuille autonome de la homepage, indépendante des styles des galeries. */
*,
*::before,
*::after { box-sizing: border-box; }

html { min-height: 100%; background: #fff; }

body.home {
  --pad-home: clamp(18px, 3.47vw, 56px);
  --home-caption-gap: .15rem;
  --home-accent: #111;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4rem;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: var(--pad-home);
  overflow-x: hidden;
  background: #fff;
  color: #111;
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.home > .top {
  position: static;
  z-index: auto;
  display: block;
  margin: 0;
  padding: 0;
}

/* Espace supérieur réservé dans la composition du header. */
.home > .top::before {
  content: "";
  display: block;
  height: 50px;
}

.home-identity {
  width: fit-content;
  transform: translate(100px, 10px);
}

.home .top h1.home-logo {
  position: static;
  width: auto;
  margin: 0;
  transform: translateX(-20px);
  color: #111;
  font-family: "Futura Extra Bold", Futura, "Futura PT", "Century Gothic", Arial, sans-serif;
  font-size: clamp(.549rem, 1.369vw, 1.182rem);
  font-weight: 800;
  letter-spacing: -.085em;
  line-height: .82;
  white-space: nowrap;
  user-select: none;
  touch-action: manipulation;
  cursor: pointer;
}

.home-logo__character {
  display: inline-block;
  overflow: hidden;
  line-height: inherit;
  letter-spacing: 0;
  text-align: center;
  vertical-align: baseline;
}

.home .home-japanese {
  margin: var(--home-caption-gap) 0 0 -53px;
  transform: translateY(3px);
  color: #111;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: clamp(.52rem, .8vw, .67rem);
  font-weight: 900;
  letter-spacing: .9em;
  line-height: 1.6;
  white-space: nowrap;
}

.home-top-meta {
  --welcome-shift: min(350px, max(0px, calc(100vw - var(--pad-home) - var(--pad-home) - var(--pad-home) - 1.4em - 17em)));
  position: absolute;
  z-index: 2;
  top: var(--pad-home);
  right: calc(var(--pad-home) + 1.4em + var(--welcome-shift));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: clamp(.75rem, .95vw, .875rem);
}

.home-welcome {
  width: min(17em, calc(100vw - var(--pad-home) - var(--pad-home)));
  height: 1.2em;
  margin: 0;
  display: block;
  overflow: hidden;
  color: #111;
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(.75rem, .95vw, .875rem);
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.2;
  text-align: right;
  transform: translateX(calc(.4em - 14px));
  text-box: normal;
  white-space: nowrap;
  overflow-wrap: normal;
}

.home-welcome[lang="ja"] { font-family: "Noto Sans JP", sans-serif; }
.home-welcome[lang="zh-Hans"] { font-family: "Noto Sans SC", sans-serif; }
.home-welcome[lang="ar"] { font-family: "Noto Sans Arabic", sans-serif; }
.home-welcome[lang="ko"] { font-family: "Noto Sans KR", sans-serif; }
.home-welcome[lang="hi"] { font-family: "Noto Sans Devanagari", sans-serif; }
.home-welcome[lang="ru"] { font-family: "Noto Sans", Helvetica, Arial, sans-serif; }

.home-blackout-trigger {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1em;
  height: 1em;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  font: inherit;
  background: #111;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: background-color .14s linear;
}

.home-blackout-control {
  position: absolute;
  top: calc((1em - 38px) / 2);
  left: calc(100% + .4em - 6px);
  width: calc(1em + 12px);
  height: 38px;
}

.home-blackout-trigger:focus-visible {
  outline: 1px solid #111;
  outline-offset: 3px;
}

.home-blackout-control:hover .home-blackout-trigger,
.home-dark .home-blackout-trigger {
  background: #00ff00;
}

.home-blackout {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: #000;
  pointer-events: none;
  visibility: hidden;
  clip-path: inset(0 100% 100% 0);
}

.home-blackout.is-visible { visibility: visible; }

.home-blackout.is-glitching {
  animation: home-glitch-in .38s steps(1, end) forwards;
}

.home-blackout.is-glitching-out {
  animation: home-glitch-in .38s steps(1, end) reverse forwards;
}

.home-blackout::before {
  content: "";
  position: absolute;
  top: 0;
  left: -1%;
  width: 102%;
  height: 2px;
  background: rgba(255, 255, 255, .24);
  opacity: 0;
  pointer-events: none;
}

.home-blackout.is-glitching::before {
  animation: home-vhs-tracking .38s steps(1, end) forwards;
}

.home-blackout.is-glitching-out::before {
  animation: home-vhs-tracking .38s steps(1, end) reverse forwards;
}

@keyframes home-vhs-tracking {
  0%, 100% { top: 0; opacity: 0; transform: translateX(0); }
  12% { top: 19%; opacity: .28; transform: translateX(3px); }
  27% { top: 43%; opacity: 0; transform: translateX(-2px); }
  43% { top: 64%; opacity: .22; transform: translateX(-4px); }
  59% { top: 31%; opacity: 0; transform: translateX(2px); }
  75% { top: 82%; opacity: .2; transform: translateX(3px); }
  91% { top: 48%; opacity: 0; transform: translateX(-1px); }
}

@keyframes home-glitch-in {
  0% { clip-path: inset(0 100% 100% 0); opacity: 0; transform: translateX(0); }
  9% { clip-path: inset(8% 0 82% 0); opacity: 1; transform: translateX(0); }
  19% { clip-path: inset(0); opacity: .55; transform: translateX(2px); }
  30% { clip-path: inset(44% 0 48% 0); opacity: 1; transform: translateX(-3px); }
  42% { clip-path: inset(0); opacity: 1; transform: translateX(0); }
  53% { clip-path: inset(78% 0 12% 0); opacity: .75; transform: translateX(2px); }
  66% { clip-path: inset(0); opacity: .65; transform: translateX(-1px); }
  78% { clip-path: inset(18% 0 73% 0); opacity: 1; transform: translateX(0); }
  89% { clip-path: inset(0); opacity: .8; transform: translateX(1px); }
  100% { clip-path: inset(0); opacity: 1; transform: translateX(0); }
}

.home-transitioning > .top,
.home-transitioning > .home-footer {
  z-index: 21;
}

.home-transitioning > .top *,
.home-transitioning > .home-footer * {
  color: #111 !important;
  transition: color .06s linear;
}

.home-transitioning.home-text-green > .top *,
.home-transitioning.home-text-green > .home-footer * {
  color: #00ff00 !important;
}

.home-dark > .top,
.home-dark > .home-footer {
  z-index: 21;
  color: #00ff00 !important;
}

body.home-dark { background: #000; }

.home-dark > .top *,
.home-dark > .home-footer * {
  color: #00ff00 !important;
}

.home-dark .home-blackout-trigger {
  background: #00ff00;
  z-index: 22;
}

.home-dark .home-blackout-trigger:focus-visible { outline-color: #00ff00; }

.home-place {
  position: absolute;
  left: calc(var(--pad-home) + .75rem + 3px);
  bottom: calc(var(--pad-home) + 2rem);
  z-index: 1;
  margin: 0;
  color: #111;
  font-size: clamp(.68rem, .9vw, .8rem);
  font-weight: 400;
  letter-spacing: .18em;
  line-height: 1.65;
  text-box: normal;
  white-space: nowrap;
  translate: 0 4px;
  transform: rotate(-90deg);
  transform-origin: left bottom;
}

body.home > .home-footer > .home-place {
  font: inherit;
  letter-spacing: inherit;
}

.home-place__letter {
  display: inline-block;
  white-space: pre;
  will-change: transform;
  transform: translateX(var(--place-flight-x, 0px));
}

.home-place-morph-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.home-place-morph-destination {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.home-place-morph-reserve {
  visibility: hidden;
}

.home-place--morphing .home-place-morph-text {
  visibility: hidden;
}

.home-place-morph-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
}

.home-place.is-undulating .home-place__letter {
  animation: home-place-undulate 3.1s ease-in-out infinite;
  animation-delay: calc(var(--place-wave-index, 0) * 52ms);
}

@keyframes home-place-undulate {
  0%, 100% { transform: translateX(var(--place-flight-x, 0px)) translateY(0); }
  25% { transform: translateX(var(--place-flight-x, 0px)) translateY(-.65em); }
  50% { transform: translateX(var(--place-flight-x, 0px)) translateY(.48em); }
  75% { transform: translateX(var(--place-flight-x, 0px)) translateY(-.3em); }
}

.home-japanese__letter {
  display: inline-block;
  letter-spacing: 0;
  white-space: pre;
  will-change: transform;
}

.home-japanese.is-undulating .home-japanese__letter {
  animation: home-japanese-undulate 3.6s ease-in-out infinite;
  animation-delay: calc(var(--japanese-wave-index, 0) * 52ms);
}

.home-description__letter {
  display: inline-block;
  white-space: pre;
  will-change: transform;
}

.home-description.is-undulating .home-description__letter {
  animation: home-description-undulate 6s ease-in-out infinite;
  animation-delay: calc(var(--description-wave-index, 0) * 80ms);
}

@keyframes home-description-undulate {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-.9em); }
  50% { transform: translateY(.7em); }
  75% { transform: translateY(-.42em); }
}

@keyframes home-japanese-undulate {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-.6em); }
  50% { transform: translateY(.45em); }
  75% { transform: translateY(-.28em); }
}

.home .home-nav {
  position: static;
  top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  gap: clamp(.7rem, 1vw, 1rem);
  margin: calc(clamp(3.4rem, 8vh, 6rem) + 28px) 0 0 calc(113px + var(--home-zero-x, 2.25rem));
}

.home .home-nav a {
  display: flex;
  align-items: center;
  width: fit-content;
  min-height: 1.2em;
  color: #111;
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  font-weight: 400;
  letter-spacing: .015em;
  line-height: 1.2;
  text-decoration: none;
  transition: color .18s ease, font-weight .2s ease;
  animation: home-appear .5s cubic-bezier(.2, .75, .25, 1) both;
}

.home .home-nav a:nth-child(1) { animation-delay: .22s; }
.home .home-nav a:nth-child(2) { animation-delay: .29s; }
.home .home-nav a:nth-child(3) { animation-delay: .36s; }
.home .home-nav a:nth-child(4) { animation-delay: .43s; }
.home .home-nav a:nth-child(5) { animation-delay: .5s; }

.home .home-nav a:hover,
.home .home-nav a:focus-visible {
  color: var(--home-accent);
  font-weight: 600;
}

.home .home-nav a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 5px;
}

.home .home-nav .nav-word {
  display: grid;
  align-items: center;
}

.home .home-nav .nav-word > span {
  grid-area: 1 / 1;
  white-space: nowrap;
  transition: opacity .16s ease, visibility .16s ease;
}

.home .home-nav .nav-word__en { opacity: 1; }

.home .home-nav .nav-word__ja {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 1em;
  font-weight: 300;
  letter-spacing: .015em;
  opacity: 0;
  visibility: hidden;
}

.home .home-nav a:hover .nav-word__en,
.home .home-nav a:focus-visible .nav-word__en { opacity: 0; visibility: hidden; }

.home .home-nav a:hover .nav-word__ja,
.home .home-nav a:focus-visible .nav-word__ja { opacity: 1; visibility: visible; }

.home > .home-footer {
  position: static;
  z-index: auto;
  width: 100%;
  margin: auto 0 0;
  padding: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  color: #111;
  font-size: clamp(.68rem, .9vw, .8rem);
  font-weight: 400;
  letter-spacing: .015em;
  line-height: 1.65;
  animation: home-appear .55s cubic-bezier(.2, .75, .25, 1) .65s both;
}

.home.gallery-home-page > .home-footer,
.home.composer-page > .home-footer {
  animation: none;
}

.home.composer-page > .home-footer {
  position: relative;
}

html.vt-enter body.gallery-home-page > .home-footer {
  opacity: 1;
}

html.vt-reveal body.gallery-home-page > .home-footer {
  animation: none;
}

body.home-transitioning > .home-footer,
body.home-dark:not(.gallery-home-page) > .home-footer {
  position: static;
  z-index: 21;
}

body.home.composer-page.home-dark > .home-footer {
  position: relative;
}

body.home-transitioning > .top,
body.home-dark > .top { z-index: 21; }

.home-footer p { margin: 0; }

.home-footer__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--home-caption-gap);
  text-align: right;
}

.home-contact {
  color: #111;
  font-family: "Futura Extra Bold", Futura, "Futura PT", "Century Gothic", Arial, sans-serif;
  font-size: clamp(.549rem, 1.369vw, 1.182rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.2;
  text-decoration: none;
  transition: color .18s ease;
}

.home .home-footer__right .home-contact { color: #111; }
.home .home-footer__right .home-contact:hover,
.home .home-footer__right .home-contact:focus-visible { color: var(--home-accent); }
.home-contact:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.music-control {
  position: fixed;
  z-index: 30;
  top: var(--pad-home);
  right: var(--pad-home);
  display: flex;
  align-items: flex-start;
}

.site-music { display: none; }

.music-toggle {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  font-family: inherit;
  font-size: clamp(.75rem, .95vw, .875rem);
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.2;
  text-align: right;
  cursor: pointer;
}

.music-toggle:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

body.home-dark .music-toggle { color: #00ff00; }

.music-artist {
  position: fixed;
  z-index: 29;
  top: 0;
  left: 0;
  margin: 0;
  color: #111;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: clamp(1.04rem, 1.6vw, 1.34rem);
  font-weight: 900;
  letter-spacing: .9em;
  line-height: 1.6;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: upright;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.music-artist.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  text-decoration: none;
}

body.pxl90-viewer-open .music-control,
body.pxl90-viewer-open .music-toggle,
body.pxl90-viewer-open .music-artist {
  display: none !important;
}

.music-artist__character {
  display: inline-block;
  will-change: transform;
}

.music-artist.is-visible .music-artist__character {
  animation: music-artist-appear .36s cubic-bezier(.2, .75, .25, 1) both;
  animation-delay: calc(var(--artist-index) * 82ms);
}

.music-artist.is-visible.is-revealed .music-artist__character {
  opacity: 1;
  transform: none;
  animation: none;
}

.music-artist.is-visible.is-undulating .music-artist__character {
  animation: music-artist-undulate 7.2s ease-in-out infinite;
  animation-delay: calc(var(--artist-index) * 52ms);
}

@keyframes music-artist-appear {
  from { opacity: 0; transform: translateY(-.32em); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes music-artist-undulate {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-.6em); }
  50% { transform: translateX(.45em); }
  75% { transform: translateX(-.28em); }
}

body.home-dark .music-artist { color: #00ff00; }

.music-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pxl90-route-frame {
  position: fixed;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  pointer-events: none;
  background: transparent;
  transition: opacity .12s ease;
}

.pxl90-route-frame.is-active {
  opacity: 1;
  pointer-events: auto;
}

body.pxl90-router-active {
  overflow: hidden;
}

body.pxl90-router-active.pxl90-viewer-open > .pxl90-route-frame {
  z-index: 31;
}

body.pxl90-router-active > :not(.music-control):not(.site-music):not(.music-artist):not(.pxl90-route-frame) {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .pxl90-route-frame { transition: none; }
  .music-artist.is-visible .music-artist__character { animation: none; opacity: 1; transform: none; }
  .music-artist.is-visible.is-undulating .music-artist__character { animation: none; opacity: 1; transform: none; }
}

/* Typographies du mode noir, conservées sur la homepage et les pages secondaires. */
body.home-dark * {
  font-family: "Geo", sans-serif;
}

body.home-dark .home-logo,
body.gallery-home-page.home-dark > .top .home-identity h1.home-logo {
  font-family: "Futura Extra Bold", Futura, "Futura PT", "Century Gothic", Arial, sans-serif;
}

body.home.home-dark .home-logo .home-logo__character {
  font-family: "Futura Extra Bold", Futura, "Futura PT", "Century Gothic", Arial, sans-serif;
}

body.home-dark .home-contact {
  font-family: "Bytesized", sans-serif;
}

body.home-dark .music-artist {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

body.home-dark .home-japanese,
body.home-dark .home-nav .nav-word__ja {
  font-family: "Geo", sans-serif;
}

body.home-dark .home-japanese {
  transform: translateY(6px);
}
@keyframes home-appear {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  body.home {
    --pad-home: max(16px, env(safe-area-inset-top), env(safe-area-inset-right), env(safe-area-inset-bottom), env(safe-area-inset-left));
    gap: 3rem;
  }

  .home .top h1.home-logo { font-size: clamp(.529rem, 2.738vw, .871rem); }
  .home .home-japanese { margin-top: var(--home-caption-gap); font-size: .52rem; }
  .home-top-meta { font-size: .7rem; }
  .home .home-top-meta {
    right: calc(var(--pad-home) + 1.4em + var(--welcome-shift));
  }
  .home .home-welcome { font-size: .7rem; }
  .home .home-nav {
    margin-top: calc(3.2rem + 28px);
    margin-left: calc(113px + var(--home-zero-x, 2.25rem));
    gap: 1rem;
  }
  .home .home-nav a { font-size: 1rem; }
  .home > .home-footer { gap: 1.25rem; font-size: .67rem; }
}

@media (max-width: 360px) {
  .home > .home-footer { flex-direction: column; align-items: flex-start; }
  .home-footer__right { align-self: flex-end; align-items: flex-end; text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  .home *, .home *::before, .home *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 768px) {
  body.home {
    --pad-home: max(18px, env(safe-area-inset-left), env(safe-area-inset-right));
    min-height: 100svh;
    min-height: 100dvh;
    gap: clamp(2rem, 6svh, 3rem);
    padding: max(18px, env(safe-area-inset-top)) var(--pad-home) max(18px, env(safe-area-inset-bottom));
    overflow-x: clip;
  }

  .home > .top {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-start;
  }

  .home > .top::before {
    display: none;
  }

  .home-top-meta,
  .home .home-top-meta {
    position: relative;
    top: auto !important;
    right: auto !important;
    align-self: flex-start;
    align-items: flex-start;
    margin: 0 0 clamp(2rem, 6svh, 3rem);
    font-size: .75rem;
  }

  .home .home-welcome {
    width: fit-content;
    transform: none;
    text-align: left;
  }

  .home-identity {
    transform: none;
  }

  .home .top h1.home-logo {
    width: auto;
    font-size: clamp(3.2rem, 18vw, 6rem);
    transform: none;
  }

  .home .home-japanese {
    margin: var(--home-caption-gap) 0 0;
    transform: none;
  }

  .home .home-nav {
    width: 100%;
    gap: .55rem;
    margin: 2rem 0 0;
  }

  .home .home-nav a {
    min-height: 44px;
    align-items: center;
  }

  .home-blackout-control {
    position: relative;
    top: auto;
    left: auto;
    width: 38px;
    height: 38px;
    margin-top: .5rem;
  }

  .home-place {
    display: none !important;
  }

  .music-control {
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    left: auto;
    align-items: center;
  }

  .music-toggle {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 0;
    line-height: 1;
    text-align: center;
    touch-action: manipulation;
  }

  .music-artist {
    display: none !important;
  }

  .home > .home-footer {
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .75rem 1rem;
    margin-top: auto;
  }

  .home-footer__right {
    gap: .35rem;
  }

  .home-contact {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    touch-action: manipulation;
  }

  body.home *:not(.home-logo):not(.home-logo *),
  body.home *:not(.home-logo):not(.home-logo *)::before,
  body.home *:not(.home-logo):not(.home-logo *)::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 768px) {
  .artist-position-reference,
  .artist-position-reference * {
    visibility: hidden !important;
  }

  .home .artist-position-reference .home-nav .nav-word__en,
  .home .artist-position-reference .home-nav .nav-word__ja {
    visibility: hidden !important;
  }

  body.home {
    --mobile-top-edge: max(18px, env(safe-area-inset-top));
    --mobile-icon-size: 24px;
    --mobile-control-size: 48px;
    --mobile-home-bg: #fff;
  }

  body.home * {
    -webkit-tap-highlight-color: transparent;
  }

  body.home.home-dark {
    --mobile-home-bg: #000;
  }

  .home:not(.gallery-home-page):not(.composer-page) .home-top-meta {
    position: fixed !important;
    z-index: 32;
    top: var(--mobile-top-edge) !important;
    right: auto !important;
    left: var(--pad-home);
    display: block;
    width: max-content;
    margin: 0;
  }

  .home .home-welcome {
    display: none !important;
  }

  body.home:not(.gallery-home-page):not(.composer-page) > .top::before {
    display: block;
    flex: 0 0 auto;
    height: calc(44px + clamp(2.624rem, 14.76vw, 4.92rem) + var(--home-caption-gap) + 1.414rem);
  }

  .home-identity {
    position: relative;
    padding-top: 39px;
  }

  body.home:not(.gallery-home-page):not(.composer-page) .home-identity {
    position: fixed;
    z-index: 32;
    top: var(--mobile-top-edge);
    left: var(--pad-home);
    pointer-events: none;
  }

  body.home:not(.gallery-home-page):not(.composer-page) .home-logo {
    pointer-events: auto;
  }

  .home-identity::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 0;
    width: 24px;
    height: 24px;
    background: currentColor;
  }

  body.home:not(.gallery-home-page):not(.composer-page) .home-identity::before {
    display: none;
  }

  .home .top h1.home-logo {
    margin-top: 5px;
    transform: translateX(-2px);
  }

  .home-blackout-control {
    width: 24px;
    height: 24px;
    margin: 0;
  }

  .home-blackout-trigger {
    width: 24px;
    height: 24px;
  }

  .home .home-japanese {
    font-size: .884rem;
  }

  .home .home-nav {
    gap: .55rem;
    margin: 1.5rem 0 0 !important;
    margin-left: 0 !important;
    pointer-events: auto;
  }

  .home .home-nav a {
    min-height: 44px;
    font-size: 1.2rem;
    pointer-events: auto;
    touch-action: manipulation;
  }

  .home .home-nav .nav-word > span {
    pointer-events: none;
  }

  .home .home-nav .nav-word__en {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .home .home-nav .nav-word__ja {
    opacity: 0 !important;
    visibility: hidden !important;
  }

  .home .home-nav .home-composer-link {
    display: flex;
  }

  .home .home-nav .home-composer-link .nav-word__ja {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .home .home-nav .home-composer-link:active {
    color: var(--home-accent);
  }

  .music-control {
    top: calc(var(--mobile-top-edge) - 12px);
    right: max(18px, env(safe-area-inset-right));
    align-items: flex-start;
  }

  .music-toggle {
    position: relative;
    display: grid;
    width: var(--mobile-control-size);
    height: var(--mobile-control-size);
    padding: 0;
    border: 0;
    background: transparent;
    color: #111;
    place-items: center;
    font-size: 0;
    text-align: center;
    touch-action: manipulation;
  }

  body.home-dark .music-toggle {
    color: #00ff00;
  }

  .music-toggle::before {
    content: "";
    position: relative;
    display: block;
    width: var(--mobile-icon-size);
    height: var(--mobile-icon-size);
    border: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3.5v17L20 12z' fill='white'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3.5v17L20 12z' fill='white'/%3E%3C/svg%3E") center / contain no-repeat;
    transform: none;
  }

  .music-toggle::after {
    display: none;
  }

  .music-toggle[aria-pressed="true"]::before {
    width: var(--mobile-icon-size);
    height: var(--mobile-icon-size);
    border: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='5' width='14' height='14' fill='white'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='5' width='14' height='14' fill='white'/%3E%3C/svg%3E") center / contain no-repeat;
    transform: none;
  }

  .home .home-footer .home-contact {
    position: relative;
    top: 10px;
    margin-top: 0;
    font-size: max(2.5rem, 2.738vw);
  }

  .home .home-footer .home-copyright {
    position: relative;
    top: 0;
  }
}

@media (min-width: 769px) {
  .home .home-nav .home-composer-link {
    display: none;
  }
}
@media (max-width: 768px) {
  body.home {
    --logo-optical-offset: .072em;  /* à ajuster entre .05em et .09em */
    --jp-optical-offset: .07em;     /* idem pour le sous-titre */
  }

  body.home .top h1.home-logo {
    transform: none;
    margin-left: calc(var(--logo-optical-offset) * -1);
  }

  body.home .home-japanese {
    margin-left: calc(var(--jp-optical-offset) * -1);
  }
}/* =====================================================================
   BOUTON LECTURE (mobile) : même taille que le pixel, aligné sur lui.
   À coller tout à la fin de home.css. Ne déplace que le bouton lecture.
   ===================================================================== */
@media (max-width: 768px) {
  body.home {
    --pixel-size: 24px;                 /* côté du pixel noir / vert */
    --play-hit: 48px;                   /* zone tactile du bouton */
    --play-stop: var(--pixel-size);     /* carré « stop » = taille du pixel */
    --play-triangle: 42px;              /* triangle « play » : même échelle que le carré (24 / 14 = 1,714) */
    --pixel-center-y: calc(var(--mobile-top-edge) + 12px);  /* le pixel est au même endroit sur toutes les pages : centre = 12 px sous le haut */
  }

  /* Centre du bouton = centre du pixel ; bord droit du carré = marge droite
     (symétrique du pixel, dont le bord gauche touche la marge gauche). */
  html body.home .music-control {
    top: calc(var(--pixel-center-y) - var(--play-hit) / 2) !important;
    right: calc(var(--pad-home) - (var(--play-hit) - var(--play-stop)) / 2) !important;
    left: auto !important;
  }

  html body.home .music-toggle {
    width: var(--play-hit);
    height: var(--play-hit);
  }

  /* Musique éteinte : triangle agrandi à la même échelle que le carré, centré sur le pixel.
     Le picto est centré dans le bouton de façon absolue (indépendant du texte caché du bouton). */
  html body.home .music-toggle::before {
    position: absolute;
    inset: 0;
    margin: auto;
    width: var(--play-triangle);
    height: var(--play-triangle);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-0.25 -0.25 24.5 24.5'%3E%3Cpath d='M4.5 3.5v17L19.5 12z' fill='white'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-0.25 -0.25 24.5 24.5'%3E%3Cpath d='M4.5 3.5v17L19.5 12z' fill='white'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  }

  /* Musique en cours : carré plein de la taille exacte du pixel. */
  html body.home .music-toggle[aria-pressed="true"]::before {
    width: var(--play-stop);
    height: var(--play-stop);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect width='24' height='24' fill='white'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect width='24' height='24' fill='white'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  }
}
/* « WELCOME » + pixel : même position à l'écran sur la homepage et les pages galerie (hors compositeur) */
@media (min-width: 769px) {
  body.home:not(.composer-page) .home-top-meta {
    position: fixed;
    top: calc(55% - .6em) !important;
    right: calc(50% - 21px) !important;
  }
  body.home:not(.composer-page) .home-blackout-control {
    pointer-events: auto;
  }
  body.home .home-blackout-control {
    top: calc((1em - 38px) / 2) !important;
    left: calc(100% + .4em - 6px) !important;
    transform: none !important;
  }
  body.home .home-blackout-trigger {
    top: 50% !important;
    left: 50% !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
  }
}

/* Mobile : les galeries gardent leur propre bouton, pas de bloc welcome */
@media (max-width: 768px) {
  .gallery-home-page .home-top-meta { display: none !important; }
}
/* « WELCOME » + pixel : décalage de 100px vers la gauche et 15px vers le bas, sur toutes les pages (desktop) */
@media (min-width: 769px) {
  body.home .home-top-meta {
    translate: -100px 15px;
  }
}
/* Mobile : fond de la page dès le premier affichage (teinte des bandes de Safari). */
@media (max-width: 768px) {
  html.pxl90-dark,
  html.pxl90-dark body.home { background-color: #000 !important; }
  html.pxl90-light,
  html.pxl90-light body.home { background-color: #fff !important; }
}

/* >>> PXL90 transitions v2 : bloc géré par outils-details/appliquer-transitions2.py (--annuler pour le retirer) */
/* Passage blanc / noir : fondu de l'écran noir (le texte est géré par home-blackout.js) */
.home-blackout::before { display: none; }
.home-blackout.is-glitching { animation: home-glitch-in .36s ease forwards; }
.home-blackout.is-glitching-out { animation: home-fade-out .36s ease .15s both; }
@keyframes home-glitch-in {
  0% { clip-path: inset(0); opacity: 0; }
  100% { clip-path: inset(0); opacity: 1; }
}
@keyframes home-fade-out {
  0% { clip-path: inset(0); opacity: 1; }
  100% { clip-path: inset(0); opacity: 0; }
}
/* <<< PXL90 transitions v2 */
