/* board.css — le plateau de jeu narratif */

#screen-game {
  padding: var(--s-5) var(--s-7);
}

.board {
  width: min(1240px, 100%);
  height: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

/* ── Bandeau haut : lieu + HUD ── */
.board-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-6);
}

.lieu {
  font-size: clamp(30px, 3.4vw, 46px);
}

.hud {
  text-align: right;
  flex-shrink: 0;
}

.hud-mods {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mod-chip {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: var(--s-1) var(--s-3);
  background: rgba(0, 0, 0, 0.35);
}

.mod-chip.is-saved {
  color: var(--green);
  border-color: rgba(125, 160, 60, 0.55);
}

.mod-chip.is-dead {
  color: #777;
  border-color: rgba(120, 120, 120, 0.3);
  text-decoration: line-through;
}

.hud-endings {
  font-size: 12px;
  color: var(--gold);
  margin-top: var(--s-2);
  letter-spacing: 0.06em;
}

/* ── Zone principale : portrait + narration ── */
.board-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: var(--s-7);
  align-items: center;
}

/* Portrait du personnage */
.portrait {
  position: relative;
  height: min(62vh, 560px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-card), 0 0 60px rgba(120, 60, 160, 0.12);
  animation: float-portrait 7s ease-in-out infinite;
  background: #000;
}

@keyframes float-portrait {
  0%,
  100% {
    transform: translateY(0) rotateZ(-0.4deg);
  }
  50% {
    transform: translateY(-12px) rotateZ(0.4deg);
  }
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  transition: filter 600ms ease, transform 600ms ease;
}

/* scrim bas : garantit la lisibilité si du texte passe devant (CONTRAST-1) */
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 3, 12, 0.75));
  pointer-events: none;
}

.portrait img.is-dead {
  filter: grayscale(1) brightness(0.5) contrast(1.15);
}

.portrait img.is-mourning {
  filter: grayscale(0.7) brightness(0.7);
}

.portrait img.is-doomed {
  filter: contrast(1.4) brightness(0.55) hue-rotate(-30deg) saturate(1.6);
}

/* ── Narration 3D ── */
.narration-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  min-width: 0;
}

.narration {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: var(--s-6);
  box-shadow: var(--shadow-card);
  transform: rotateX(4deg) translateZ(18px);
  animation: float-card 8s ease-in-out infinite;
  cursor: pointer;
  min-height: 180px;
}

@keyframes float-card {
  0%,
  100% {
    transform: rotateX(4deg) translateZ(18px) translateY(0);
  }
  50% {
    transform: rotateX(4deg) translateZ(18px) translateY(-8px);
  }
}

#narration-text {
  white-space: pre-line;
  font-size: 19px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* ── Choix ── */
.choices {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  min-height: 60px;
}

.choice {
  opacity: 0;
  font-family: var(--font-body);
  font-size: 16px;
  text-align: left;
  color: var(--text);
  background: rgba(10, 6, 20, 0.75);
  border: 1px solid var(--surface-border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: var(--s-4) var(--s-5);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.choices.is-visible .choice {
  animation: choice-in 420ms ease-out both;
  animation-delay: var(--delay, 0ms);
}

@keyframes choice-in {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.choice:hover {
  background: rgba(60, 16, 26, 0.8);
  border-color: rgba(208, 39, 47, 0.6);
  transform: translateX(6px);
}

.choice:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ── Relance d'inactivité (« grouille-toi ») ── */
#nag {
  min-height: 24px;
  font-style: italic;
  font-size: 15px;
  color: var(--gold);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 300ms ease, transform 300ms ease;
}

#nag.is-visible {
  opacity: 1;
  transform: translateY(0);
}
