/* L'étang sous la fenêtre du salon : les dessins flottent sur l'eau (scène 3D temps réel, bassin.js).
   Repris de l'ancien site (bassin du sanctuaire), habillé avec les jetons du nouveau (css/jeu.css). */

.bassin-page {
  --blanc: #f6f2ea;
  --gris: rgba(246, 242, 234, .66);
  --filet: rgba(230, 220, 203, .32);
  --f-jp: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --barre-h: 4.25rem;
  --marge: clamp(1rem, 5vw, 6rem);
}
html:has(.bassin-page), .bassin-page { height: 100%; overflow: hidden; background: #060a14; }
html:has(.bassin-page.jour), .bassin-page.jour { background: #0d1510; }

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

.vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 55%, transparent 45%, rgba(3, 5, 12, .6) 100%); }
.jour .vignette { background: radial-gradient(ellipse at 50% 55%, transparent 45%, rgba(4, 8, 6, .55) 100%); }
.voile {
  position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .8s ease;
  background: radial-gradient(ellipse at 50% 45%, rgba(6, 10, 8, 0) 28%, rgba(6, 10, 8, .55) 80%);
}
.voile.actif { opacity: 1; }
.ja, .kanji, .titre-ja { font-family: var(--f-jp); }

.intro {
  position: fixed; left: var(--marge); top: max(2.5rem, calc(env(safe-area-inset-top) + 1.5rem));
  max-width: 32rem; pointer-events: none; transition: opacity .8s ease, transform .8s ease;
}
.intro .kanji { margin: 0 0 .4rem; color: var(--gris); letter-spacing: .3em; font-size: 1rem; }
.intro h1 { margin: 0; font-family: var(--ecriture); font-weight: 400; font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1; }
.intro p { margin: 1rem 0 0; font-size: 1.2rem; line-height: 1.55; color: var(--gris); }

.aide {
  position: fixed; right: var(--marge); top: max(2.9rem, calc(env(safe-area-inset-top) + 1.9rem));
  text-align: right; font-style: italic; font-size: 1.1rem; line-height: 1.65; color: var(--gris);
  pointer-events: none; transition: opacity .8s ease;
}
.bassin-page.leve .intro, .bassin-page.leve .aide { opacity: 0; transform: translateY(-8px); }

.cartel {
  position: fixed; left: 50%; bottom: calc(var(--barre-h) + 4.5rem); transform: translate(-50%, 12px); z-index: 2;
  text-align: center; opacity: 0; pointer-events: none; max-width: 80vw;
  transition: opacity .7s ease .25s, transform .7s ease .25s;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .6);
}
.cartel .titre { font-family: var(--ecriture); font-size: 2.1rem; line-height: 1.2; }
.cartel .titre-ja { font-size: .95rem; letter-spacing: .3em; color: var(--gris); margin-top: 2px; }
.bassin-page.leve .cartel { opacity: 1; transform: translate(-50%, 0); }

.relacher {
  position: fixed; right: var(--marge); bottom: calc(var(--barre-h) + 1.5rem); z-index: 2;
  min-height: 44px; padding: .7rem 1.4rem;
  font: inherit; font-family: var(--ecriture); font-size: 1.15rem; color: var(--blanc);
  background: rgba(10, 16, 12, .42); border: 1px solid var(--filet); border-radius: 999px;
  cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .6s ease, background .3s, border-color .3s;
}
.relacher:hover, .relacher:focus-visible { background: rgba(230, 220, 203, .1); border-color: var(--papier); }
.bassin-page.leve .relacher { opacity: 1; pointer-events: auto; }

.bassin-page.survol { cursor: pointer; }
.sans-js { position: fixed; inset: auto 1.5rem calc(var(--barre-h) + 1rem); font-size: 1.1rem; }

.chargement {
  position: fixed; inset: 0; z-index: 70; display: grid; place-content: center; gap: .6rem; text-align: center;
  background: radial-gradient(ellipse 120% 60% at 50% 0%, #18223d 0%, transparent 60%), #060a14;
  transition: opacity 1.2s ease;
}
.chargement span { font-family: var(--f-jp); font-size: 3.4rem; color: var(--gris); }
.chargement em { font-size: 1.1rem; color: var(--gris); }
.chargement.fini { opacity: 0; pointer-events: none; }
.jour .chargement { background: radial-gradient(ellipse 120% 60% at 50% 0%, #1d3326 0%, transparent 60%), #0d1510; }

.bassin-page .barre { z-index: 5; }

@media (max-width: 760px) {
  .aide { display: none; }
  .intro { right: var(--marge); }
  .intro p { font-size: 1.05rem; }
  .relacher { left: var(--marge); right: var(--marge); bottom: calc(var(--barre-h) + 1rem); }
  .cartel { bottom: calc(var(--barre-h) + 5.5rem); }
  .cartel .titre { font-size: 1.6rem; }
}
/* Téléphone : l'interface d'un jeu mobile (Sarah, 2026-11-29). Le retour est en haut à gauche (css/jeu.css) : le titre
   passe dessous, en plus petit, sa phrase ne couvre plus les dessins, et « Let it float away » s'écrit en bas, sans cadre. */
@media (max-width: 760px), (orientation: landscape) and (max-height: 500px) {
  .bassin-page { --barre-h: 0rem; }
  .intro { left: 1.1rem; right: 1.1rem; top: calc(max(.3rem, env(safe-area-inset-top)) + 3.5rem); }
  .intro .kanji { margin-bottom: .2rem; font-size: .85rem; }
  .intro h1 { font-size: 2.3rem; }
  .intro p { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cartel { bottom: 4.9rem; width: max-content; max-width: 88vw; }     /* le titre du dessin ne se coupe plus en deux */
  .relacher, .relacher:hover {
    left: 50%; right: auto; translate: -50% 0; bottom: max(1rem, calc(env(safe-area-inset-bottom) + .6rem));
    padding: .6rem 1rem; font-size: 1.3rem; white-space: nowrap;
    background: none; border: 0; border-radius: 0; filter: drop-shadow(0 1px 4px rgba(4, 6, 12, .95));
  }
  .relacher:is(:active, :focus-visible) { color: #ffe2b0; outline: none; filter: drop-shadow(0 0 7px rgba(242, 184, 102, .85)) drop-shadow(0 1px 4px rgba(4, 6, 12, .95)); }
}
@media (prefers-reduced-motion: reduce) {
  .intro, .aide, .cartel, .relacher, .voile { transition: none; }
}
