/* The landing page: the tavern scene, its overlays, the gossip window and the action bar. */

body.taverne { overflow: hidden; height: 100vh; height: 100dvh; }
#scene { position: fixed; inset: 0; overflow: hidden; background: #05070d; }
#monde { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
#statique { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: max(100vw, 177.78vh); height: max(100vh, 56.25vw); }
#statique img { width: 100%; height: 100%; image-rendering: pixelated; }
.vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, transparent 55%, rgba(0, 0, 0, 0.55) 100%); }

#cibles, #plaques { position: absolute; inset: 0; pointer-events: none; }
#statique #cibles, #statique #plaques { position: absolute; inset: 0; }
.cible { position: absolute; pointer-events: auto; background: transparent; border: 0; padding: 0; margin: 0;
  cursor: url("../monde/icones/bulle.png") 4 4, pointer; border-radius: 6px; }
.cible:focus-visible { outline: 2px solid var(--nom-pnj); outline-offset: 2px; }
.cible[data-cible="porte"] { cursor: pointer; }
.cible[data-cible="chaise"] { cursor: pointer; }

/* outside: the title card */
#accueil { position: fixed; left: 50%; bottom: 6vh; transform: translateX(-50%); z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; width: min(560px, calc(100vw - 32px)); }
#accueil .lettrage { height: 72px; width: auto; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8)); }
#accueil p { margin: 0; font-size: 19px; color: var(--texte); text-shadow: 0 2px 6px #000, 0 0 2px #000; }
#accueil .lien { background: none; border: 0; color: var(--texte-2); text-decoration: underline; text-decoration-color: var(--flamme);
  text-underline-offset: 3px; font: 600 15px/20px var(--font-texte); cursor: pointer; padding: 6px; text-shadow: 0 1px 3px #000; }
#accueil .btn { min-width: 220px; min-height: 48px; font-size: 18px; box-shadow: 0 0 24px rgba(210, 120, 70, 0.35); }
.porte-pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 18px rgba(210, 120, 70, 0.25); } 50% { box-shadow: 0 0 32px rgba(210, 120, 70, 0.6); } }

/* gossip window */
#bulle { position: fixed; z-index: 20; left: max(24px, 4vw); top: 50%; transform: translateY(-50%);
  width: min(400px, calc(100vw - 32px)); padding: 18px 20px 14px; }
#bulle[hidden] { display: none; }
#bulle.droite { left: auto; right: max(24px, 4vw); }
.bulle-tete { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--parchemin-ombre); }
.bulle-tete .portrait { width: 64px; height: 64px; }
.bulle-tete h2 { font: 600 30px/32px var(--font-affichage); color: var(--encre-titre); }
.bulle-tete p { margin: 0; color: var(--encre-2); font-size: 15px; }
.fermer { margin-left: auto; align-self: flex-start; width: 32px; height: 32px; border: 1px solid var(--encre-2); border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.25); color: var(--encre); font: 700 20px/1 var(--font-texte); cursor: pointer; }
.fermer:hover { background: rgba(255, 255, 255, 0.5); }
#bulle-texte { margin: 0 0 12px; font-size: 18px; line-height: 27px; }
#bulle-choix { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
#bulle-choix a, #bulle-choix button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--encre); font: 700 17px/22px var(--font-texte); text-align: left; text-decoration: none; cursor: pointer; }
#bulle-choix a:hover, #bulle-choix button:hover, #bulle-choix a:focus-visible, #bulle-choix button:focus-visible { background: rgba(94, 20, 22, 0.12); color: var(--encre-titre); outline: none; box-shadow: inset 0 0 0 1px var(--encre-titre); }
#bulle-choix img { width: 20px; height: 20px; image-rendering: pixelated; flex: none; }

/* action bar */
#barre { position: fixed; z-index: 10; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 6px; padding: 8px;
  background: linear-gradient(180deg, #1c1714, #0d0a09); border: 2px solid var(--fer); outline: 1px solid var(--or-sombre); outline-offset: -5px;
  border-radius: var(--radius-sm); box-shadow: var(--ombre-flottante); }
#barre[hidden] { display: none; }
.emplacement { position: relative; width: 64px; height: 64px; padding: 0; border: 2px solid #000; border-radius: var(--radius-sm); cursor: pointer;
  background: radial-gradient(circle at 50% 70%, #5a2a14, #160c08); box-shadow: inset 0 0 0 1px var(--fer-clair); overflow: hidden; }
.emplacement img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; image-rendering: pixelated; }
.emplacement .touche { position: absolute; top: 2px; left: 4px; font: 700 13px/1 var(--font-texte); color: #fff; text-shadow: 0 1px 0 #000, 0 0 3px #000; }
.emplacement .nom { position: absolute; left: 0; right: 0; bottom: 0; font: 700 11px/14px var(--font-texte); color: var(--nom-pnj);
  background: rgba(0, 0, 0, 0.7); text-align: center; padding: 1px 0; }
.emplacement:hover, .emplacement:focus-visible, .emplacement[aria-expanded="true"] { border-color: var(--nom-pnj); box-shadow: 0 0 10px rgba(255, 209, 0, 0.5), inset 0 0 0 1px var(--nom-pnj); outline: none; }
.emplacement.chaise img { object-position: center 30%; }

.session-coin { position: fixed; z-index: 10; top: 14px; right: 16px; display: flex; gap: 8px; align-items: center;
  font: 700 15px/20px var(--font-texte); color: var(--texte); text-shadow: 0 1px 3px #000; }
.session-coin a { padding: 6px 12px; border-radius: var(--radius-md); background: rgba(13, 16, 18, 0.8); border: 1px solid var(--line); text-decoration: none; }
.session-coin a:hover { background: var(--surface-2); }

@media (max-width: 700px) {
  #bulle { left: 16px; right: 16px; width: auto; top: auto; bottom: 104px; transform: none; max-height: calc(100dvh - 140px); overflow: auto; }
  #accueil { bottom: 4vh; }
  #accueil .lettrage { height: 56px; }
  .emplacement { width: 58px; height: 58px; }
}
@media (prefers-reduced-motion: reduce) { .porte-pulse { animation: none; } }
