/* game.css — écran de jeu : HUD, Olympe, invocation, améliorations */

/* ── Barre du haut ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  background: rgba(20, 18, 41, 0.85);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}

.hud {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.hud-hydromel {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--gold);
}

.hud-rate { color: var(--success); font-size: 0.85rem; }
.hud-streak { color: var(--text-dim); }
.hud-shields { color: var(--shield); font-weight: 700; }
.hud-ambroisie { color: #c9b3ff; font-weight: 700; }

.topbar-actions { display: flex; gap: 0.5rem; }
.btn-trophies { font-size: 0.9rem; }

/* ── Disposition principale ── */
.game-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 1.2rem;
  padding: 1.2rem;
  flex: 1;
  max-width: 1250px;
  margin: 0 auto;
  width: 100%;
}

/* ── L'Olympe (pyramide) ── */
.olympus-panel {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.olympus {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 1.4rem 0.5rem 1.8rem;
  background:
    radial-gradient(ellipse 65% 80% at 50% 100%, rgba(58, 53, 103, 0.5) 0%, transparent 70%);
  border-radius: var(--radius);
}

.olympus-row {
  display: flex;
  gap: 1.1rem;
  justify-content: center;
}

.god-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: 86px;
}

.god-medallion {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  background: var(--bg-panel);
  border: 2px dashed var(--border);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.god-name {
  font-size: 0.76rem;
  color: var(--text-dim);
  text-align: center;
}

/* dieu déjà rencontré mais absent : silhouette grisée */
.god-slot.silhouette .god-face { filter: grayscale(1) brightness(0.45); }

/* dieu présent sur l'Olympe */
.god-slot.present .god-medallion {
  border: 2px solid var(--gold);
  background: radial-gradient(circle at 50% 35%, #35305e 0%, var(--bg-card) 100%);
  box-shadow: 0 0 18px rgba(232, 194, 87, 0.45);
}

.god-slot.present .god-face { filter: none; }
.god-slot.present .god-name { color: var(--gold); font-weight: 700; }

/* prochain trône à conquérir */
.god-slot.next .god-medallion {
  border: 2px dashed var(--gold-dark);
  animation: next-pulse 1.6s ease-in-out infinite;
}

@keyframes next-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(232, 194, 87, 0); }
  50% { box-shadow: 0 0 16px rgba(232, 194, 87, 0.5); }
}

/* apparition d'un dieu */
.god-slot.pop .god-medallion {
  animation: god-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes god-pop {
  0% { transform: scale(0.3); }
  70% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ── Zone d'invocation ── */
.invoke-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.next-god {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-align: center;
  min-height: 92px;
  justify-content: center;
}

.next-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.next-name { font-size: 1.3rem; font-weight: 800; color: var(--marble); }
.next-title { font-size: 0.85rem; color: var(--text-dim); font-style: italic; }
.next-numbers { font-size: 1rem; color: var(--gold); font-weight: 700; margin-top: 0.2rem; }

.btn-invoke {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--gold-dark);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #241d05;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 1.1rem 3.4rem;
  box-shadow: 0 8px 30px rgba(232, 194, 87, 0.35);
  transition: transform 0.08s ease, filter 0.15s ease;
}

.btn-invoke:hover:not(:disabled) { filter: brightness(1.1); }
.btn-invoke:active:not(:disabled) { transform: scale(0.96); }
.btn-invoke:disabled { cursor: wait; filter: saturate(0.55) brightness(0.8); }

.invoke-label { position: relative; z-index: 2; }

.cooldown-bar {
  position: absolute;
  inset: 0;
  background: rgba(13, 11, 30, 0.55);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 1;
}

.invoke-warning {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ── Panneau des améliorations ── */
.upgrades-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  align-self: start;
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.panel-title {
  color: var(--gold);
  font-size: 1.2rem;
}

.btn-buymult {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-dim);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.25rem 0.7rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-buymult:hover { color: var(--gold); }
.btn-buymult.active {
  border-color: var(--gold-dark);
  color: var(--gold);
  background: rgba(232, 194, 87, 0.12);
}

.upgrades-list { display: grid; gap: 0.7rem; }

.upgrade-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  display: grid;
  gap: 0.35rem;
}

.upgrade-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.upgrade-emoji { font-size: 1.5rem; }
.upgrade-titles { display: flex; flex-direction: column; }
.upgrade-name { font-weight: 700; font-size: 0.95rem; }
.upgrade-level { font-size: 0.75rem; color: var(--text-dim); }
.upgrade-desc { font-size: 0.8rem; color: var(--text-dim); }
.upgrade-effect { font-size: 0.82rem; color: var(--success); font-weight: 600; }

.btn-buy {
  border: 1px solid var(--gold-dark);
  border-radius: 8px;
  background: rgba(232, 194, 87, 0.12);
  color: var(--gold);
  font-weight: 700;
  padding: 0.45rem;
  transition: background 0.15s ease, transform 0.08s ease;
}

.btn-buy:hover:not(:disabled) { background: rgba(232, 194, 87, 0.25); }
.btn-buy:active:not(:disabled) { transform: scale(0.97); }
.btn-buy:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Cycle des âges (prestige) ── */
.prestige-card {
  margin-top: 0.9rem;
  background: linear-gradient(160deg, rgba(122, 92, 255, 0.16) 0%, var(--bg-card) 100%);
  border: 1px solid rgba(154, 120, 255, 0.55);
  border-radius: var(--radius);
  padding: 0.75rem;
  display: grid;
  gap: 0.35rem;
}

.prestige-card .upgrade-effect { color: #c9b3ff; }

.btn-prestige {
  border: 1px solid #8a63e8;
  border-radius: 8px;
  background: rgba(138, 99, 232, 0.16);
  color: #cdb6ff;
  font-weight: 700;
  padding: 0.45rem;
  transition: background 0.15s ease, transform 0.08s ease;
}

.btn-prestige:hover:not(:disabled) { background: rgba(138, 99, 232, 0.32); }
.btn-prestige:active:not(:disabled) { transform: scale(0.97); }
.btn-prestige:disabled { opacity: 0.4; cursor: not-allowed; }

.prestige-icon {
  font-size: 3rem;
  text-align: center;
  animation: columns-glow 2.2s ease-in-out infinite;
}

.prestige-summary { color: var(--text-dim); text-align: center; margin-bottom: 0.6rem; }
.prestige-warning { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.6rem; }

/* ── Victoire ── */
.modal-victory { text-align: center; }

.victory-zeus {
  font-size: 4rem;
  animation: columns-glow 2.2s ease-in-out infinite;
}

.victory-text { color: var(--text-dim); margin-bottom: 1rem; }

.modal-victory .settings-buttons { justify-content: center; margin-top: 1.2rem; }
.modal-victory .stats-list { text-align: left; width: fit-content; margin: 0 auto; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .game-layout { grid-template-columns: 1fr; }
  .upgrades-panel { position: static; max-height: none; }
}

@media (max-width: 520px) {
  .olympus-row { gap: 0.4rem; }
  .god-slot { width: 66px; }
  .god-medallion { width: 50px; height: 50px; font-size: 1.4rem; }
  .god-name { font-size: 0.66rem; }
  .btn-invoke { padding: 0.9rem 2.2rem; font-size: 1.2rem; width: 100%; }
  .hud { gap: 0.5rem; font-size: 0.85rem; }
  .hud-hydromel { font-size: 1rem; }
}
