:root {
  --nuit: #170d2e;
  --horizon: #2e1745;
  --or: #ffcf73;
  --braise: #ff8a3d;
  --creme: #f5e8d2;
  --brume: #b9a8c9;
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }

html, body { height: 100%; margin: 0; }
body {
  background: var(--nuit);
  color: var(--creme);
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  touch-action: manipulation;
}

.titre {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(1.25rem, 5vh, 3.5rem) 1.25rem 0;
  pointer-events: none;
}
.titre h1 {
  margin: 0;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 6.5vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 144;
  text-shadow: 0 0 28px rgba(255, 190, 90, 0.35);
}
.sous-titre {
  margin: 0.6rem 0 0;
  font-weight: 300;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  color: var(--brume);
}

.actions {
  margin-top: clamp(1rem, 3vh, 1.75rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.actions > * { pointer-events: auto; }

button {
  font: inherit;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--nuit);
  background: var(--or);
  border: 0;
  border-radius: 999px;
  padding: 0.7em 1.6em;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(255, 207, 115, 0.5);
  transition: transform 0.15s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}
button:hover { box-shadow: 0 0 24px 2px rgba(255, 207, 115, 0.45); }
button:active { transform: scale(0.97); }
button:focus-visible { outline: 2px solid var(--creme); outline-offset: 4px; }
button[disabled] { opacity: 0; pointer-events: none; }

#compteur {
  margin: 0;
  font-size: 0.95rem;
  color: var(--brume);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.voeu {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: radial-gradient(ellipse at 50% 60%, rgba(23, 13, 46, 0.25), rgba(23, 13, 46, 0.8));
  animation: apparaitre 1.6s ease both;
}
.voeu[hidden] { display: none; }
.voeu-texte {
  margin: 0;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(2.5rem, 9vw, 6rem);
  text-shadow: 0 0 40px rgba(255, 190, 90, 0.4);
}
@keyframes apparaitre { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .voeu { animation: none; }
  button { transition: none; }
}
