/* Le Léviathan — les deux mini-jeux : les leviers des Entrailles (js/levers.js) et le regard de
   l'Empereur (js/gaze.js). Le cadre commun (.game, .game-hud…) est dans css/components/game.css. */

.levers.shake, .gaze.shake { animation: lev-shake .5s ease; }
@keyframes lev-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* ---------- Les leviers ---------- */
.levers { position: relative; padding: clamp(18px, 3vw, 30px) clamp(14px, 2.4vw, 24px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: radial-gradient(ellipse 80% 70% at 50% 100%, rgba(111, 208, 196, .14), transparent 70%), linear-gradient(180deg, #0a1214, #070b0d); }
.levers[data-phase="ivy"], .levers[data-phase="done"] { background: radial-gradient(ellipse 80% 70% at 50% 100%, rgba(143, 224, 138, .2), transparent 70%), linear-gradient(180deg, #0b140c, #070b07); }
.lever-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(8px, 2vw, 18px); max-width: 620px; margin: 0 auto; }
.lever { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0 10px; border: 1px solid rgba(111, 208, 196, .25); background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .25)); color: var(--pearl); cursor: pointer; transition: border-color .2s, background .2s; }
.lever:hover:not(:disabled), .lever:focus-visible { border-color: var(--hidden); }
.lever:disabled { cursor: default; }
.lever-arm { position: relative; width: 10px; height: 70px; border-radius: 5px; background: linear-gradient(180deg, #3b4a4c, #1d2628); }
.lever-arm::before { content: ''; position: absolute; left: 50%; top: -8px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #f6e1a0, #b88b2c 70%); box-shadow: 0 0 10px rgba(241, 199, 90, .4); transition: top .18s ease; }
.lever.is-down .lever-arm::before { top: 52px; background: radial-gradient(circle at 40% 35%, #dcfaf5, #3aa898 70%); box-shadow: 0 0 14px rgba(111, 208, 196, .7); }
.lever-n { font-size: .78rem; font-weight: 800; letter-spacing: .1em; color: var(--muted); }
.lever.is-down .lever-n { color: var(--hidden-hi); }
#levers-time.is-urgent { color: #ff9a8a; }

/* ---------- Le regard de l'Empereur ---------- */
.gaze { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #0d0810; }
.gaze-head { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 230px; padding: 20px; background: radial-gradient(ellipse 70% 70% at 50% 45%, rgba(180, 108, 240, .22), transparent 70%); border-right: 1px solid var(--line); }
.gz-forehead { display: grid; place-items: center; width: clamp(110px, 16vw, 150px); aspect-ratio: 1; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 50% 40%, #6a3a2a, #2a140e 70%); box-shadow: inset 0 -12px 24px rgba(0, 0, 0, .5), 0 0 30px rgba(180, 108, 240, .2); color: rgba(255, 241, 200, .15); transition: box-shadow .3s; }
.gz-forehead.is-on { color: #fff1c8; box-shadow: inset 0 -12px 24px rgba(0, 0, 0, .5), 0 0 40px rgba(255, 224, 138, .45); }
.gz-forehead .gz-icon { width: 54%; height: 54%; filter: drop-shadow(0 0 8px rgba(255, 224, 138, .8)); animation: gz-in .25s ease; }
@keyframes gz-in { from { transform: scale(.6); opacity: 0; } }
.gz-caller { min-height: 1.4em; margin: 0; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--wine-hi); text-align: center; }
.gaze-psions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: center; padding: 20px; }
.gz-psion { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid rgba(241, 199, 90, .25); background: rgba(255, 255, 255, .03); color: var(--pearl); text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.gz-psion:hover:not(:disabled), .gz-psion:focus-visible { border-color: var(--royal); background: rgba(241, 199, 90, .08); transform: translateY(-2px); }
.gz-psion:disabled { cursor: default; opacity: .75; }
.gz-shield { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(180, 108, 240, .6); background: radial-gradient(circle, rgba(180, 108, 240, .25), transparent 70%); color: var(--royal-hi); }
.gz-shield .gz-icon { width: 26px; height: 26px; }
.gz-name { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.gaze[data-phase="choose"] .gz-psion:not(:disabled) { border-color: rgba(241, 199, 90, .55); }
.gaze[data-phase="won"] .gaze-head { background: radial-gradient(ellipse 70% 70% at 50% 45%, rgba(255, 224, 138, .25), transparent 70%); }
#gaze-time.is-urgent { color: #ff9a8a; }

@media (max-width: 680px) {
  .gaze { grid-template-columns: minmax(0, 1fr); }
  .gaze-head { border-right: 0; border-bottom: 1px solid var(--line); min-height: 200px; }
  .gaze-psions { grid-template-columns: minmax(0, 1fr); }
  .lever-row { gap: 6px; }
  .lever-arm { height: 56px; }
  .lever.is-down .lever-arm::before { top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .levers.shake, .gaze.shake, .gz-forehead .gz-icon { animation: none; }
}
