feat(web client): responsive design

This commit is contained in:
Henri Bourcereau 2026-06-06 22:16:14 +02:00
parent 9db942354c
commit 576f9706c2
8 changed files with 3911 additions and 364 deletions

View file

@ -1291,7 +1291,7 @@ a:hover { text-decoration: underline; }
pointer-events: auto;
display: flex;
flex-direction: column;
align-items: flex-end;
align-items: center;
gap: 3px;
animation: scoring-panel-enter 0.3s ease-out;
}
@ -1889,8 +1889,7 @@ a:hover { text-decoration: underline; }
}
.free-mode-error {
display: flex;
align-items: center;
text-align: center;
gap: 0.75rem;
background: rgba(180, 60, 30, 0.12);
border: 1px solid rgba(180, 60, 30, 0.4);
@ -1900,7 +1899,6 @@ a:hover { text-decoration: underline; }
box-sizing: border-box;
}
.free-mode-error-msg {
flex: 1;
font-family: var(--font-ui);
font-size: 0.85rem;
color: #8b2000;
@ -2303,3 +2301,219 @@ a:hover { text-decoration: underline; }
background: rgba(200,164,72,0.1);
font-weight: 600;
}
/* Prevent horizontal scrollbar from the full-bleed strip */
.game-overlay { overflow-x: hidden !important; }
/* Board bar: hide die slots, keep the rail as a thin divider */
.bar-die-slot { display: none !important; }
.board-bar { width: 5px; overflow: hidden; }
/* ── Full-width in-flow player strip ─────────────────────────────────── */
.players-strip {
width: 100vw;
margin-top: -1.5rem; /* undo game-overlay top padding */
display: flex;
align-items: center;
background: var(--ui-parchment);
border-bottom: 2px solid var(--ui-gold-dark);
box-shadow: 0 2px 8px rgba(0,0,0,0.18);
padding: 0.35rem 1.5rem;
gap: 0.5rem;
}
.strip-player { display: flex; align-items: center; flex: 1; min-width: 0; }
.strip-player-left { justify-content: flex-end; }
.strip-player-right { justify-content: flex-start; }
.strip-active-zone {
display: flex;
align-items: center;
gap: 0.7rem;
border-radius: 8px;
padding: 0.28rem 0.5rem;
transition: background 0.15s;
}
.strip-active-zone.active { background: rgba(58,42,10,0.08); }
/* Checker-style circles */
.strip-avatar {
width: 38px; height: 38px;
border-radius: 50%;
flex-shrink: 0;
}
.strip-avatar-me {
background-image:
radial-gradient(ellipse 50% 35% at 36% 30%, rgba(255,255,255,0.65) 0%, transparent 100%),
radial-gradient(circle, transparent 68%, rgba(160,130,70,0.22) 68.5%, rgba(160,130,70,0.22) 71.5%, transparent 72%),
radial-gradient(circle, transparent 43%, rgba(160,130,70,0.17) 43.5%, rgba(160,130,70,0.17) 46.5%, transparent 47%),
radial-gradient(circle at 38% 32%, #ffffff 0%, var(--checker-white) 52%, #c0b288 100%);
border: 1.8px solid var(--checker-ring);
box-shadow: 0 2px 6px rgba(0,0,0,0.35), inset 0 -1px 3px rgba(0,0,0,0.15);
}
.strip-avatar-opp {
background-image:
radial-gradient(ellipse 40% 28% at 36% 30%, rgba(110,65,30,0.38) 0%, transparent 100%),
radial-gradient(circle, transparent 68%, rgba(200,164,72,0.18) 68.5%, rgba(200,164,72,0.18) 71.5%, transparent 72%),
radial-gradient(circle, transparent 43%, rgba(200,164,72,0.13) 43.5%, rgba(200,164,72,0.13) 46.5%, transparent 47%),
radial-gradient(circle at 38% 32%, #4a2e1a 0%, #1c1008 45%, var(--checker-black) 100%);
border: 1.8px solid var(--checker-ring);
box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 -1px 3px rgba(0,0,0,0.4);
}
/* Strip peg overrides */
.players-strip .peg-track { gap: 3px; }
.players-strip .peg-hole { width: 12px; height: 12px; }
.players-strip .peg-hole.filled {
background: #5aab38; border-color: #3a7828;
box-shadow: 0 0 5px rgba(90,171,56,0.55);
}
.players-strip .peg-hole.peg-opp.filled {
background: #c05030; border-color: #8a3018;
box-shadow: 0 0 5px rgba(192,80,48,0.55);
}
/* Strip score-row-name: remove fixed width from v01 */
.players-strip .score-row-name { width: auto; }
/* No ghost bar below pts-counter in the strip */
.players-strip .pts-counter-wrap { padding-bottom: 0; }
/* Center "Trictrac" title */
.players-strip-center {
flex-shrink: 0;
padding: 0 1rem;
border-left: 1px solid rgba(138,106,40,0.2);
border-right: 1px solid rgba(138,106,40,0.2);
}
.strip-title {
font-family: var(--font-display);
font-size: 1.4rem;
font-weight: 600;
font-style: italic;
color: var(--ui-ink);
letter-spacing: 0.03em;
white-space: nowrap;
}
/* ── Body: board + controls ──────────────────────────────────────────── */
.main-body {
display: flex;
align-items: flex-start;
gap: 0.5rem;
}
/* ── Controls column (sidebar on wide, row on narrow) ────────────────── */
.controls {
display: flex;
flex-direction: column;
gap: 0.5rem;
align-self: stretch;
}
@media (min-width: 920px) {
.controls {
width: 200px;
}
}
.ctrl-dice {
background: var(--board-rail);
border-radius: 5px;
border-top: 2px solid var(--ui-gold-dark);
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
padding: 0.6rem 0.75rem 0.75rem;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
flex-shrink: 0;
}
.ctrl-dice-row {
display: flex;
gap: 0.55rem;
align-items: center;
justify-content: center;
}
/* Free-mode toggle: light text on dark board-rail background */
.ctrl-dice .free-mode-toggle {
color: var(--ui-parchment);
font-size: 0.7rem;
flex-wrap: wrap;
justify-content: center;
text-align: center;
gap: 0.3rem;
}
.ctrl-dice .free-mode-help {
border-color: rgba(242,232,208,0.35);
color: rgba(242,232,208,0.5);
}
.ctrl-status {
background: var(--ui-parchment);
border-radius: 5px;
border-top: 2px solid var(--ui-gold-dark);
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
padding: 0.65rem 0.75rem 0.75rem;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
gap: 0.4rem;
flex: 1;
min-width: 0;
}
.ctrl-status .game-status {
color: var(--ui-ink);
text-shadow: none;
font-size: 1rem;
padding: 0;
width: auto;
text-align: center;
line-height: 1.3;
}
.ctrl-status .board-actions {
flex-wrap: wrap;
justify-content: center;
min-height: 0;
}
.ctrl-status .game-sub-prompt {
color: #887766;
padding: 0;
width: auto;
text-align: center;
font-size: 0.67rem;
line-height: 1.4;
margin: 0;
}
.scoring-row .scoring-panels-container {
position: static;
top: auto; left: auto; right: auto; bottom: auto;
z-index: auto;
padding: 0;
pointer-events: auto;
display: flex;
flex-direction: column;
align-items: stretch;
gap: 4px;
}
.scoring-row .scoring-panel {
box-sizing: border-box;
margin: 0;
}
/* ── Responsive: ≤919px → controls becomes a bottom bar ─────────────── */
@media (max-width: 919px) {
.main-body {
flex-direction: column;
align-items: stretch;
}
.controls {
flex-direction: row;
width: 100%;
}
.ctrl-status { flex: 1; }
/* Hide pegs on small screens to save space in the strip */
.players-strip .peg-track { display: none; }
}