personalisation du personnage

This commit is contained in:
2025-12-02 19:32:30 +01:00
parent 58ed4774ba
commit 5091fc3d6e
3 changed files with 516 additions and 6 deletions

211
style.css
View File

@ -1123,6 +1123,71 @@ h1 {
transform: translateY(0) scale(0.98);
}
.game-over-username-section {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
margin: 20px 0;
}
.game-over-username-section label {
font-size: 0.7em;
color: #ffd700;
font-weight: bold;
}
#gameOverUsername {
padding: 10px 15px;
font-size: 0.8em;
font-family: 'Press Start 2P', cursive;
border: 2px solid #ffd700;
border-radius: 10px;
background: rgba(0, 0, 0, 0.7);
color: #fff;
outline: none;
max-width: 250px;
width: 100%;
text-align: center;
transition: all 0.3s;
}
#gameOverUsername:focus {
border-color: #ffed4e;
box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
background: rgba(0, 0, 0, 0.9);
}
.save-score-btn {
padding: 10px 20px;
font-size: 0.7em;
font-family: 'Press Start 2P', cursive;
background: linear-gradient(180deg, #00ff00 0%, #00cc00 100%);
color: #000;
border: 2px solid #00ff00;
border-radius: 10px;
cursor: pointer;
transition: all 0.3s;
box-shadow: 0 4px 10px rgba(0, 255, 0, 0.3);
}
.save-score-btn:hover {
background: linear-gradient(180deg, #00ff88 0%, #00ff00 100%);
transform: translateY(-2px);
box-shadow: 0 6px 15px rgba(0, 255, 0, 0.5);
}
.save-score-btn:active {
transform: translateY(0) scale(0.98);
}
.save-score-btn:disabled {
background: rgba(100, 100, 100, 0.5);
border-color: #666;
cursor: not-allowed;
opacity: 0.5;
}
/* === CONTROLES TACTILES MOBILE === */
.mobile-controls {
display: none;
@ -1268,3 +1333,149 @@ footer {
font-size: 0.9em;
}
}
/* === MODAL PERSONNALISATION === */
.customize-modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.9);
z-index: 1000;
justify-content: center;
align-items: center;
animation: fadeIn 0.3s ease-out;
}
.customize-modal.active {
display: flex;
}
.customize-content {
display: flex;
flex-direction: column;
gap: 30px;
max-width: 800px;
width: 90%;
max-height: 90vh;
overflow-y: auto;
}
.customize-section {
background: rgba(0, 0, 0, 0.6);
padding: 20px;
border-radius: 15px;
border: 2px solid #ffd700;
}
.customize-section h3 {
color: #ffd700;
font-size: 1em;
margin-bottom: 15px;
text-align: center;
}
.color-options {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 15px;
margin-top: 15px;
}
.color-option {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
padding: 15px;
background: rgba(255, 255, 255, 0.05);
border: 2px solid rgba(255, 215, 0, 0.3);
border-radius: 10px;
cursor: pointer;
transition: all 0.3s;
}
.color-option:hover {
background: rgba(255, 215, 0, 0.1);
border-color: #ffd700;
transform: scale(1.05);
}
.color-option.active {
background: rgba(255, 215, 0, 0.2);
border-color: #ffd700;
box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}
.color-preview {
width: 60px;
height: 60px;
border-radius: 50%;
border: 3px solid #fff;
box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}
.rainbow-preview {
background: linear-gradient(45deg, #ff0000, #ff8800, #ffff00, #00ff00, #0088ff, #0000ff, #8800ff);
animation: rainbowRotate 3s linear infinite;
}
@keyframes rainbowRotate {
0% { filter: hue-rotate(0deg); }
100% { filter: hue-rotate(360deg); }
}
.color-option span {
font-size: 0.7em;
color: #fff;
text-align: center;
}
.customize-preview {
background: rgba(0, 0, 0, 0.6);
padding: 20px;
border-radius: 15px;
border: 2px solid #ffd700;
display: flex;
flex-direction: column;
align-items: center;
}
.customize-preview h3 {
color: #ffd700;
font-size: 1em;
margin-bottom: 15px;
}
#playerPreviewCanvas {
border: 3px solid #ffd700;
border-radius: 10px;
background: #000;
box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}
.save-customize-btn {
padding: 15px 30px;
font-size: 0.9em;
font-family: 'Press Start 2P', cursive;
background: linear-gradient(180deg, #00ff00 0%, #00cc00 100%);
color: #000;
border: 2px solid #00ff00;
border-radius: 10px;
cursor: pointer;
transition: all 0.3s;
box-shadow: 0 4px 10px rgba(0, 255, 0, 0.3);
align-self: center;
}
.save-customize-btn:hover {
background: linear-gradient(180deg, #00ff88 0%, #00ff00 100%);
transform: translateY(-2px);
box-shadow: 0 6px 15px rgba(0, 255, 0, 0.5);
}
.save-customize-btn:active {
transform: translateY(0) scale(0.98);
}