:root {
  --ink: #f6f1e7;
  --night: #07101c;
  color-scheme: dark;
}

* { box-sizing: border-box; }

@font-face {
  font-family: "Alex Brush";
  src: url("../assets/fonts/AlexBrush-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html, body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: "Alex Brush", cursive;
}

body {
  min-height: 100%;
  overflow: hidden;
}

body.scroll { overflow: auto; }

button { font: inherit; color: inherit; }

img { max-width: 100%; }

.screen {
  position: fixed;
  inset: 0;
}

.screen[hidden] { display: none; }

h1, h2, .script-line {
  font-weight: 400;
}

.cta {
  margin-top: 0.4rem;
  padding: 0.15rem 1.15rem 0.35rem;
  border: 1px solid rgba(246, 241, 231, 0.78);
  border-radius: 999px;
  background: rgba(7, 12, 24, 0.28);
  letter-spacing: 0;
  font-size: 1.85rem;
  line-height: 1;
  cursor: pointer;
}

.cta.ghost { background: transparent; }

.nav {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
}

.nav .cta { margin-top: 0; }

.cta:focus-visible,
.hit:focus-visible,
.photo:focus-visible,
.sound:focus-visible {
  outline: 2px solid #f6e2b8;
  outline-offset: 3px;
}

.accueil {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 1.35rem max(3.2rem, env(safe-area-inset-bottom));
  background:
    linear-gradient(to top, rgba(4, 8, 18, 0.55) 0%, rgba(4, 8, 18, 0) 34%),
    url("../assets/fonds/accueil.jpg") center 20% / cover no-repeat;
  text-align: center;
}

.accueil-copy { width: min(21rem, 100%); }

.accueil h1 {
  margin: 0;
  font-size: clamp(2.35rem, 9vw, 3rem);
  line-height: 1.05;
  font-weight: 400;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.ciel {
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: url("../assets/fonds/ciel.jpg") center / cover no-repeat;
  text-align: center;
}

.ciel-copy {
  width: min(22rem, 100%);
  padding: 1.3rem 1.15rem 1.15rem;
  background: rgba(6, 12, 28, 0.28);
  border-radius: 20px;
}

.ciel h2 {
  margin: 0;
  font-size: clamp(2.8rem, 11vw, 3.6rem);
  line-height: 1;
  font-weight: 400;
}

.ciel p {
  margin: 0.35rem 0 0.8rem;
  font-size: 1.85rem;
  line-height: 1.15;
}

.stars {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: max(0.8rem, env(safe-area-inset-top)) 0 max(0.9rem, env(safe-area-inset-bottom));
  background: #07101f;
}

.stars-stage {
  position: relative;
  width: min(94vw, calc((100vh - 8.5rem) * 1100 / 1896));
}

.stars-stage > img {
  display: block;
  width: 100%;
  height: auto;
}

.hit {
  position: absolute;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.coeur {
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: max(1rem, env(safe-area-inset-top)) 0 max(1.2rem, env(safe-area-inset-bottom));
  background: #062038;
}

.heart-stage {
  position: relative;
  width: min(96vw, 680px);
}

.heart-stage > img {
  display: block;
  width: 100%;
  height: auto;
}

.photo {
  position: absolute;
  width: 13%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 2px;
  overflow: hidden;
  background: #10243a;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lecture { position: relative; }

.fin-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("../assets/fonds/fin.jpg") center / cover no-repeat;
  pointer-events: none;
}

.fin-bg[hidden] { display: none; }

.letter {
  position: relative;
  z-index: 1;
  width: min(40rem, 100%);
  margin: 0 auto;
  padding: 5.2rem 1.35rem 18vh;
  background: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 12px rgba(0, 0, 0, 0.75);
}

.letter p { margin: 0 0 1rem; }

.script-line {
  font-size: 2.35rem;
  line-height: 1.15;
}

.script-line.big {
  margin-top: 1.2rem;
  font-size: 2.8rem;
  text-align: center;
}

.moon-page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  background: #050814;
}

.moon-page img {
  display: block;
  width: 100%;
  height: 100vh;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.back-float {
  position: fixed;
  top: max(0.7rem, env(safe-area-inset-top));
  left: 0.7rem;
  z-index: 6;
  margin: 0;
  background: rgba(7, 12, 24, 0.55);
}

.note, .lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1.4rem;
}

.note { background: rgba(4, 8, 20, 0.5); }

.note[hidden],
.lightbox[hidden],
.sound[hidden] { display: none; }

.note-card {
  width: min(84vw, 340px);
  padding: 1.7rem 1.25rem 1.15rem;
  background: rgba(12, 18, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  text-align: center;
}

.note-card p {
  margin: 0;
  font-size: 2rem;
  line-height: 1.15;
}

.lightbox { background: rgba(0, 0, 0, 0.9); }

.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
}

.sound {
  position: fixed;
  top: max(0.7rem, env(safe-area-inset-top));
  right: 0.7rem;
  z-index: 25;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid rgba(246, 241, 231, 0.45);
  border-radius: 50%;
  background: rgba(7, 12, 24, 0.4);
  cursor: pointer;
}

.sound.is-off { opacity: 0.45; }

#music {
  position: fixed;
  left: 0;
  top: 0;
  width: 4px;
  height: 4px;
  opacity: 0.02;
  pointer-events: none;
}
