Files
2026-11-20 19:59:44 +01:00

183 lines
3.6 KiB
CSS

:root {
--bg: #161616;
--cell: #2a2a2a;
--line: #3a3a3a;
--text: #d8d8d8;
--muted: #8a8a8a;
--accent: #e0603a;
color-scheme: dark;
}
* { box-sizing: border-box; }
body {
margin: 0;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg);
color: var(--text);
font-family: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}
.screen {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
padding: 1rem;
}
.hidden { display: none !important; }
h1 {
margin: 0 0 1.5rem;
font-size: 3rem;
font-weight: 700;
}
button {
min-width: 12rem;
padding: 0.7rem 2rem;
font: inherit;
font-size: 1.1rem;
color: var(--text);
background: var(--cell);
border: 2px solid var(--muted);
box-shadow: 4px 4px 0 #000;
cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--accent); }
button:active:not(:disabled) {
transform: translate(2px, 2px);
box-shadow: 2px 2px 0 #000;
}
button:disabled {
color: #555;
border-color: var(--line);
box-shadow: none;
cursor: not-allowed;
}
button:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 3px;
}
#btn-menu { align-self: flex-start; min-width: 0; padding: 0.4rem 1.2rem; font-size: 1rem; }
canvas {
display: block;
image-rendering: pixelated;
}
/* Écran de jeu : plein écran, la zone de la carte prend tout l'espace restant. */
#game {
width: 100%;
height: 100vh;
height: 100dvh;
align-items: stretch;
gap: 0.6rem;
padding: 0.75rem;
}
.stage {
flex: 1;
min-height: 0;
display: flex;
gap: 0.75rem;
}
.viewport {
position: relative;
flex: 1;
min-width: 0;
overflow: hidden;
background: #0e0e0e;
border: 2px solid var(--line);
}
.viewport canvas {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
touch-action: none; /* glisser = déplacer la vue ou poser des tuyaux, jamais faire défiler la page */
}
/* Boutons de menu sur le côté ; chacun ouvre un menu déroulant à sa droite, par-dessus la carte. */
.sidebar {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.side-item { position: relative; }
.icon-btn { min-width: 0; padding: 0.6rem; line-height: 0; }
.icon-btn svg { width: 28px; height: 28px; fill: currentColor; }
.icon-btn.active { border-color: var(--accent); color: var(--accent); }
.dropdown {
position: absolute;
top: 0;
left: calc(100% + 0.5rem);
z-index: 10;
display: flex;
flex-direction: column;
gap: 0.5rem;
min-width: 16rem;
max-height: calc(100dvh - 7rem);
margin: 0;
padding: 0.6rem;
overflow-y: auto;
list-style: none;
background: var(--bg);
border: 2px solid var(--muted);
box-shadow: 4px 4px 0 #000;
}
.tool {
width: 100%;
min-width: 0;
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.35rem 0.7rem;
font-size: 0.9rem;
text-align: left;
box-shadow: 2px 2px 0 #000;
}
.tool canvas { flex: none; width: 40px; height: 40px; }
.tool .cost { margin-left: auto; padding-left: 0.5rem; white-space: nowrap; }
.tool.selected { border-color: var(--accent); }
.topbar {
align-self: stretch;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
.topbar #btn-menu { align-self: center; }
.hud { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
#hud-power { color: var(--accent); font-weight: 700; }
.info { margin: 0; min-height: 1.4em; color: var(--muted); font-size: 0.9rem; }
#hud-money { font-weight: 700; }
.neg { color: #e05050; }
.tool .cost { color: var(--muted); font-size: 0.75rem; }
.tool.poor .cost { color: #e05050; }
.info { text-align: center; }