SOULGATE/client/debug.html
2026-05-04 03:42:47 +02:00

277 lines
8.7 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>SOULGATE — Debug</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background: #0d0d12;
color: #c8c8d8;
font-family: 'Courier New', monospace;
font-size: 13px;
height: 100vh;
display: flex;
flex-direction: column;
}
header {
background: #1a1a2e;
border-bottom: 1px solid #2a2a4a;
padding: 10px 16px;
display: flex;
align-items: center;
gap: 16px;
}
header h1 { font-size: 15px; color: #9988ff; letter-spacing: 2px; }
header .dim { color: #555; }
#status {
font-size: 12px;
padding: 2px 8px;
border-radius: 3px;
background: #333;
color: #888;
}
#status.ok { background: #1a3a1a; color: #4caf50; }
#status.error { background: #3a1a1a; color: #f44336; }
.main {
flex: 1;
display: grid;
grid-template-columns: 300px 1fr;
overflow: hidden;
}
section {
padding: 14px;
overflow-y: auto;
border-right: 1px solid #1e1e30;
}
h2 {
font-size: 11px;
letter-spacing: 2px;
text-transform: uppercase;
color: #555;
margin-bottom: 12px;
}
.field { margin-bottom: 10px; }
.field label { display: block; color: #666; margin-bottom: 3px; font-size: 11px; }
input[type="text"] {
background: #12121c;
border: 1px solid #2a2a4a;
color: #c8c8d8;
padding: 5px 8px;
font-family: inherit;
font-size: 13px;
width: 100%;
outline: none;
}
input[type="text"]:focus { border-color: #5544aa; }
.btn-row { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
button {
background: #1e1e35;
border: 1px solid #3a3a6a;
color: #aaa;
padding: 5px 10px;
font-family: inherit;
font-size: 12px;
cursor: pointer;
transition: background 0.1s;
}
button:hover { background: #2a2a50; color: #ddd; }
button:disabled { opacity: 0.3; cursor: not-allowed; }
button.active { background: #2a2060; border-color: #6655cc; color: #fff; }
button.primary { background: #1a3a1a; border-color: #3a7a3a; color: #4caf50; }
button.primary:hover { background: #225522; }
.sep { border: none; border-top: 1px solid #1e1e30; margin: 12px 0; }
#lobby-players { margin-top: 8px; }
.lobby-player {
padding: 4px 0;
border-bottom: 1px solid #1a1a28;
display: flex;
align-items: center;
gap: 6px;
}
.lobby-player .pname { flex: 1; }
.lobby-player .pclass { color: #7766dd; font-size: 11px; }
.lobby-player .pready { color: #4caf50; font-size: 11px; }
.lobby-player .phost { color: #ffaa44; font-size: 10px; }
/* Game state panel */
#game-section { background: #0a0a10; }
.stat-block {
background: #12121e;
border: 1px solid #1e1e30;
padding: 10px 14px;
margin-bottom: 10px;
}
.stat-label { font-size: 10px; color: #444; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.stat-value { font-size: 18px; color: #9988ff; }
.stat-value.big { font-size: 28px; }
#tick-rate { font-size: 11px; color: #444; margin-left: 8px; }
.hp-bar {
height: 6px;
background: #1e1e30;
margin-top: 6px;
border-radius: 2px;
overflow: hidden;
}
.hp-fill {
height: 100%;
transition: width 0.05s;
border-radius: 2px;
}
.hp-fill.soulgate { background: #9988ff; }
.hp-fill.kael { background: #e06060; }
.hp-fill.seris { background: #6080e0; }
.hp-fill.aldric { background: #60c080; }
.hp-fill.dead { background: #333; }
.player-card {
background: #12121e;
border: 1px solid #1e1e30;
padding: 8px 12px;
margin-bottom: 6px;
}
.player-card.dead { opacity: 0.4; }
.player-card .phead { display: flex; justify-content: space-between; margin-bottom: 4px; }
.player-card .pname { color: #ddd; }
.player-card .pclass { color: #7766dd; font-size: 11px; }
.player-card .php { color: #888; font-size: 11px; }
.wave-badge {
display: inline-block;
padding: 2px 8px;
font-size: 11px;
border-radius: 2px;
}
.wave-badge.preparation { background: #1a3050; color: #6699cc; }
.wave-badge.combat { background: #3a1a1a; color: #cc6666; }
.wave-badge.boss { background: #3a1a3a; color: #cc66cc; }
/* Log */
footer {
height: 150px;
border-top: 1px solid #1e1e30;
padding: 8px 14px;
overflow: hidden;
display: flex;
flex-direction: column;
}
footer h2 { margin-bottom: 6px; flex-shrink: 0; }
#log {
flex: 1;
overflow-y: auto;
font-size: 11px;
line-height: 1.5;
color: #666;
}
#log .err { color: #cc4444; }
#log .ok { color: #44aa44; }
</style>
</head>
<body>
<header>
<h1>SOULGATE <span class="dim">— Debug</span></h1>
<span id="status">Connexion...</span>
</header>
<div class="main">
<section id="lobby-section">
<h2>Connexion</h2>
<div class="field">
<label>Pseudo</label>
<input type="text" id="username-input" placeholder="Ton pseudo" maxlength="20">
</div>
<div class="btn-row">
<button id="username-btn">OK</button>
</div>
<hr class="sep">
<h2>Lobby</h2>
<div class="btn-row">
<button id="create-btn" disabled>Créer une partie</button>
</div>
<div class="field">
<label>Code de lobby</label>
<input type="text" id="code-input" placeholder="ABCDEF" maxlength="6" style="text-transform:uppercase">
</div>
<div class="btn-row">
<button id="join-btn" disabled>Rejoindre</button>
</div>
<hr class="sep">
<h2>Classe</h2>
<div class="btn-row">
<button id="class-kael" disabled>⚔ Kael</button>
<button id="class-seris" disabled>✦ Seris</button>
<button id="class-aldric" disabled>✚ Aldric</button>
</div>
<div class="btn-row">
<button id="ready-btn" disabled>Prêt</button>
<button id="start-btn" class="primary" disabled>▶ Démarrer</button>
</div>
<hr class="sep">
<h2>Joueurs</h2>
<div id="lobby-players"><span style="color:#333">En attente...</span></div>
</section>
<section id="game-section">
<h2>État du jeu <span id="streaming" style="color:#333; font-size:10px; letter-spacing:0">en attente de la partie...</span></h2>
<div style="display:grid; grid-template-columns: 1fr 1fr; gap:10px; margin-bottom:10px;">
<div class="stat-block">
<div class="stat-label">Tick</div>
<div class="stat-value big" id="tick"></div>
<span id="tick-rate"></span>
</div>
<div class="stat-block">
<div class="stat-label">Vague</div>
<div id="wave-info" style="margin-top:4px"><span class="wave-badge preparation"></span></div>
</div>
</div>
<div class="stat-block" style="margin-bottom:10px">
<div class="stat-label">Soulgate</div>
<div style="display:flex; justify-content:space-between; margin-top:4px">
<span id="sg-hp" style="color:#9988ff"></span>
<span id="sg-pct" style="color:#444; font-size:11px"></span>
</div>
<div class="hp-bar"><div class="hp-fill soulgate" id="sg-bar" style="width:100%"></div></div>
</div>
<h2 style="margin-bottom:8px">Joueurs</h2>
<div id="players-list"><span style="color:#333">En attente de la partie...</span></div>
</section>
</div>
<footer>
<h2>Log</h2>
<pre id="log"></pre>
</footer>
<script type="module" src="js/debug.js"></script>
</body>
</html>