Image carrée 1024x1024, background-position center 70% pour garder les nénuphars et l'eau visible en bas (zone du têtard cliquable).
137 lines
2.6 KiB
SCSS
Executable File
137 lines
2.6 KiB
SCSS
Executable File
// home.scss — Game view styles
|
|
|
|
.game-cover {
|
|
background-image: url("/webp/bg-cover.webp");
|
|
background-size: cover;
|
|
background-repeat: no-repeat;
|
|
background-position: center 70%; // image carrée → garde nénuphars/eau visible
|
|
width: 100%;
|
|
min-height: 92vh;
|
|
position: relative;
|
|
display: flex;
|
|
align-items: flex-end;
|
|
justify-content: center;
|
|
}
|
|
|
|
// --- Clicker zone ---
|
|
|
|
.click-zone {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: 1rem;
|
|
padding-bottom: 2vh;
|
|
cursor: pointer;
|
|
flex: 1;
|
|
|
|
// Desktop: center
|
|
@media (min-width: 768px) {
|
|
padding-right: 22rem; // offset for sidebar
|
|
}
|
|
}
|
|
|
|
.tadpole-sprite {
|
|
width: 280px;
|
|
height: 280px;
|
|
background: url("/svg/tadpole.svg") no-repeat center / contain;
|
|
transition: transform 0.1s ease;
|
|
|
|
@media (min-width: 768px) {
|
|
width: 320px;
|
|
height: 320px;
|
|
}
|
|
|
|
.click-zone:active & {
|
|
transform: scale(0.95) rotate(2deg);
|
|
}
|
|
}
|
|
|
|
// --- Stats sous le compteur ---
|
|
|
|
.click-zone-stats {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
pointer-events: none;
|
|
user-select: none;
|
|
}
|
|
|
|
// --- Badge achievements sidebar ---
|
|
|
|
.achieve-badge {
|
|
display: block;
|
|
text-align: center;
|
|
padding: 0.4rem;
|
|
border-radius: var(--gp-radius);
|
|
background: var(--gp-accent-green-bg);
|
|
border: 1px solid rgba(16, 185, 129, 0.2);
|
|
font-family: var(--font);
|
|
font-size: var(--gp-text-sm);
|
|
font-weight: 600;
|
|
color: var(--gp-accent-green);
|
|
text-decoration: none;
|
|
transition: all 0.15s ease;
|
|
|
|
&:hover {
|
|
background: rgba(16, 185, 129, 0.2);
|
|
}
|
|
}
|
|
|
|
// --- Click feedback particle ---
|
|
|
|
.click-particle {
|
|
position: fixed;
|
|
pointer-events: none;
|
|
font-family: var(--font);
|
|
font-size: 1.2rem;
|
|
font-weight: 700;
|
|
color: #34d399;
|
|
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
|
|
z-index: 100;
|
|
animation: float-up 0.8s ease-out forwards;
|
|
}
|
|
|
|
@keyframes float-up {
|
|
0% {
|
|
opacity: 1;
|
|
transform: translateY(0) scale(1);
|
|
}
|
|
100% {
|
|
opacity: 0;
|
|
transform: translateY(-60px) scale(1.3);
|
|
}
|
|
}
|
|
|
|
// --- Game sidebar ---
|
|
|
|
.game-sidebar {
|
|
position: fixed;
|
|
right: 0.75rem;
|
|
top: 5.5rem;
|
|
bottom: 0.75rem;
|
|
width: 20rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.75rem;
|
|
overflow-y: auto;
|
|
z-index: 10;
|
|
padding-right: 0.25rem;
|
|
|
|
// Mobile: bottom drawer
|
|
@media (max-width: 767px) {
|
|
position: fixed;
|
|
right: 0;
|
|
left: 0;
|
|
top: auto;
|
|
bottom: 0;
|
|
width: 100%;
|
|
max-height: 45vh;
|
|
padding: 0.75rem;
|
|
background: rgba(0, 0, 0, 0.85);
|
|
backdrop-filter: blur(8px);
|
|
border-top-left-radius: 1rem;
|
|
border-top-right-radius: 1rem;
|
|
}
|
|
}
|