Déplacement de fichiers et cohérence des header d'exercices

This commit is contained in:
2026-06-17 12:50:22 +02:00
parent 4e18746b3d
commit 5f35ffa7f1
52 changed files with 537 additions and 7642 deletions

View File

@@ -0,0 +1,394 @@
/* ============================================
ANIMATIONS AVANCÉES - Memory Pictogrammes
============================================ */
/* ============================================
FADE ANIMATIONS
============================================ */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeInDown {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* ============================================
CARD ANIMATIONS
============================================ */
/* Match Success - Explosion colorée */
@keyframes matchSuccess {
0% {
transform: scale(1);
filter: drop-shadow(0 0 0px rgba(76, 175, 80, 0.6));
}
50% {
transform: scale(1.15) rotate(5deg);
filter: drop-shadow(0 0 12px rgba(76, 175, 80, 0.8));
}
100% {
transform: scale(1);
filter: drop-shadow(0 0 0px rgba(76, 175, 80, 0));
}
}
/* Card Shake - Erreur */
@keyframes cardShake {
0%, 100% {
transform: translateX(0) rotateZ(0deg);
}
10%, 30%, 50%, 70%, 90% {
transform: translateX(-8px) rotateZ(-1deg);
}
20%, 40%, 60%, 80% {
transform: translateX(8px) rotateZ(1deg);
}
}
/* Pop In - Apparition */
@keyframes popIn {
0% {
transform: scale(0.5);
opacity: 0;
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
opacity: 1;
}
}
/* Bounce - Rebond */
@keyframes bounce {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-12px);
}
}
/* ============================================
PROGRESS BAR ANIMATIONS
============================================ */
/* Pulse Progress Bar */
@keyframes progressPulse {
0%, 100% {
box-shadow: 0 0 8px rgba(29, 158, 117, 0.4);
}
50% {
box-shadow: 0 0 24px rgba(29, 158, 117, 0.8);
}
}
.progress-bar.pulse {
animation: progressPulse 0.6s ease-out;
}
/* ============================================
MODAL ANIMATIONS
============================================ */
/* Slide Up */
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(40px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Fade In Modal Background */
@keyframes fadeInBlur {
from {
opacity: 0;
backdrop-filter: blur(0px);
}
to {
opacity: 1;
backdrop-filter: blur(5px);
}
}
/* ============================================
FLOAT ANIMATION (Confettis)
============================================ */
@keyframes float {
0%, 100% {
transform: translateY(0px);
}
50% {
transform: translateY(-12px);
}
}
/* ============================================
SCORE UPDATE ANIMATION
============================================ */
@keyframes scoreFlip {
0% {
transform: rotateX(90deg);
opacity: 0;
}
100% {
transform: rotateX(0deg);
opacity: 1;
}
}
/* ============================================
ACHIEVEMENT UNLOCK ANIMATION
============================================ */
@keyframes achievementUnlock {
0% {
transform: scale(0) rotateZ(-180deg);
opacity: 0;
}
50% {
transform: scale(1.15);
}
100% {
transform: scale(1) rotateZ(0deg);
opacity: 1;
}
}
/* ============================================
STAT BOX ANIMATIONS
============================================ */
@keyframes statUpdate {
0% {
transform: scale(0.8);
background: rgba(29, 158, 117, 0.2);
}
100% {
transform: scale(1);
background: transparent;
}
}
/* ============================================
TIMER ANIMATIONS
============================================ */
@keyframes timerTick {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}
/* Timer warning (< 30 seconds) */
@keyframes timerWarning {
0%, 100% {
color: #FF9800;
}
50% {
color: #D85A30;
}
}
/* ============================================
LEADERBOARD ANIMATIONS
============================================ */
/* Rank item slide in */
@keyframes rankSlideIn {
from {
opacity: 0;
transform: translateX(-20px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.rank-item {
animation: rankSlideIn 0.3s ease-out forwards;
}
.rank-item:nth-child(1) { animation-delay: 0.1s; }
.rank-item:nth-child(2) { animation-delay: 0.2s; }
.rank-item:nth-child(3) { animation-delay: 0.3s; }
.rank-item:nth-child(4) { animation-delay: 0.4s; }
.rank-item:nth-child(5) { animation-delay: 0.5s; }
/* ============================================
GLOW ANIMATIONS
============================================ */
/* Card glow hover */
@keyframes glowCard {
0% {
box-shadow: 0 0 0px rgba(29, 158, 117, 0);
}
100% {
box-shadow: 0 0 16px rgba(29, 158, 117, 0.3);
}
}
/* Victory confetti animation */
@keyframes confetti {
0% {
transform: translateY(-200px) rotateZ(0deg) scale(1);
opacity: 1;
}
100% {
transform: translateY(600px) rotateZ(720deg) scale(0);
opacity: 0;
}
}
/* ============================================
PULSING ANIMATIONS
============================================ */
/* Pulse button */
@keyframes buttonPulse {
0%, 100% {
box-shadow: 0 0 0px rgba(29, 158, 117, 0.7);
}
50% {
box-shadow: 0 0 16px rgba(29, 158, 117, 0.4);
}
}
/* Loading spinner */
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
/* ============================================
FLIP ANIMATION (3D)
============================================ */
@keyframes flip {
0% {
transform: rotateY(0deg);
}
100% {
transform: rotateY(180deg);
}
}
/* ============================================
UTILITY ANIMATION CLASSES
============================================ */
.animate-fade-in {
animation: fadeIn 0.3s ease-out;
}
.animate-slide-up {
animation: slideUp 0.4s ease-out;
}
.animate-pop {
animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.animate-bounce {
animation: bounce 0.6s ease-in-out;
}
.animate-shake {
animation: cardShake 0.4s ease-in-out;
}
.animate-float {
animation: float 1s ease-in-out infinite;
}
/* ============================================
STAGGERED ANIMATIONS (pour listes)
============================================ */
.stagger-children > * {
animation: fadeInUp 0.6s ease-out forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }
/* ============================================
TRANSITIONS (mouvements fluides)
============================================ */
button, a, .stat-box, .rank-item {
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* ============================================
DARK MODE ANIMATIONS (optionnel)
============================================ */
@media (prefers-color-scheme: dark) {
@keyframes fadeInDark {
from {
opacity: 0;
filter: brightness(0.8);
}
to {
opacity: 1;
filter: brightness(1);
}
}
main {
animation: fadeInDark 0.6s ease-out;
}
}
/* ============================================
MOTION PREFERENCE RESPECT
============================================ */
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}

View File

@@ -0,0 +1,437 @@
/* ============================================
HUD (Heads-Up Display) & SCORING
============================================ */
/* ============================================
GAME HUD - Stat Boxes
============================================ */
.game-hud {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 16px;
margin-bottom: 32px;
animation: fadeInUp 0.6s ease-out 0.4s both;
}
.stat-box {
background: linear-gradient(135deg, var(--teal-light), var(--white));
border: 2px solid var(--teal-mid);
border-radius: 12px;
padding: 20px;
text-align: center;
transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
position: relative;
overflow: hidden;
}
.stat-box::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
transition: left 0.5s ease;
}
.stat-box:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-lg);
border-color: var(--teal-dark);
}
.stat-box:hover::before {
left: 100%;
}
.stat-box .label {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
color: var(--text-muted);
letter-spacing: 0.08em;
margin-bottom: 8px;
}
.stat-box .value {
font-size: 32px;
font-weight: 800;
background: linear-gradient(135deg, var(--teal-mid), var(--teal-dark));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
font-family: 'Syne', sans-serif;
animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stat-box .value.updated {
animation: scoreFlip 0.4s ease-out;
}
/* ============================================
PROGRESS BAR (Paires trouvées)
============================================ */
.progress-container {
background: var(--teal-light);
border-radius: 12px;
overflow: hidden;
height: 12px;
margin-bottom: 24px;
position: relative;
box-shadow: var(--shadow-sm);
}
.progress-bar {
height: 100%;
background: linear-gradient(90deg, var(--teal-mid), var(--teal-dark));
width: 0%;
transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.progress-container.pulse .progress-bar {
animation: progressPulse 0.6s ease-out;
}
/* ============================================
GAME CONTROLS
============================================ */
.game-controls {
display: flex;
gap: 16px;
justify-content: center;
margin-top: 32px;
animation: fadeInUp 0.6s ease-out 0.5s both;
}
.btn {
position: relative;
overflow: hidden;
}
.btn::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
border-radius: 50%;
background: rgba(255, 255, 255, 0.3);
transform: translate(-50%, -50%);
transition: width 0.5s, height 0.5s;
}
.btn:active::before {
width: 300px;
height: 300px;
}
/* ============================================
VICTORY MODAL
============================================ */
.victory-modal {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 2000;
backdrop-filter: blur(5px);
animation: fadeInBlur 0.3s ease;
padding: 20px;
}
.victory-modal.hidden {
display: none;
}
.modal-content {
background: linear-gradient(135deg, var(--white), var(--teal-light));
border-radius: 24px;
padding: 48px;
max-width: 500px;
width: 100%;
text-align: center;
animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
border: 2px solid var(--teal-mid);
box-shadow: 0 32px 64px rgba(15, 110, 86, 0.3);
position: relative;
overflow: hidden;
}
.modal-content::before {
content: '🎉 🏆 ⭐ 🎮 🌟';
position: absolute;
top: 20px;
left: 0;
right: 0;
display: block;
font-size: 32px;
letter-spacing: 12px;
animation: float 1.5s ease-in-out infinite;
}
.modal-content h2 {
font-family: 'Syne', sans-serif;
font-size: 42px;
font-weight: 800;
color: var(--teal);
margin: 32px 0 12px;
position: relative;
z-index: 1;
}
.modal-content .score-display {
font-size: 64px;
font-weight: 800;
background: linear-gradient(135deg, var(--teal-mid), var(--teal-dark));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin: 24px 0;
font-family: 'Syne', sans-serif;
animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}
.stats-summary {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
margin: 24px 0;
}
.stats-summary .stat {
background: var(--teal-light);
padding: 12px;
border-radius: 8px;
border: 1px solid var(--teal-mid);
animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stats-summary .stat:nth-child(1) { animation-delay: 0.4s; }
.stats-summary .stat:nth-child(2) { animation-delay: 0.5s; }
.stats-summary .stat:nth-child(3) { animation-delay: 0.6s; }
.stats-summary .stat:nth-child(4) { animation-delay: 0.7s; }
.stats-summary .stat-value {
font-weight: 700;
color: var(--teal-dark);
font-size: 16px;
font-family: 'Syne', sans-serif;
}
.stats-summary .stat-label {
font-size: 11px;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-top: 4px;
}
/* ============================================
ACHIEVEMENTS
============================================ */
.achievements-list {
margin: 24px 0;
display: flex;
flex-direction: column;
gap: 12px;
}
.achievement {
background: linear-gradient(135deg, var(--accent), rgba(255, 215, 0, 0.2));
border: 1px solid var(--accent);
border-radius: 8px;
padding: 12px 16px;
text-align: left;
animation: achievementUnlock 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
display: flex;
gap: 12px;
align-items: center;
}
.achievement-icon {
font-size: 24px;
flex-shrink: 0;
}
.achievement-text {
flex: 1;
}
.achievement-name {
font-weight: 700;
color: var(--text);
font-size: 13px;
}
.achievement-desc {
font-size: 11px;
color: var(--text-muted);
margin-top: 2px;
}
/* ============================================
MODAL ACTIONS
============================================ */
.modal-actions {
display: flex;
gap: 12px;
margin-top: 32px;
flex-wrap: wrap;
justify-content: center;
}
.modal-actions .btn {
flex: 1;
min-width: 140px;
}
/* ============================================
PAUSE MODAL
============================================ */
.pause-modal {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
z-index: 1999;
backdrop-filter: blur(5px);
}
.pause-content {
background: var(--white);
border-radius: 16px;
padding: 40px;
text-align: center;
border: 2px solid var(--teal-mid);
animation: slideUp 0.4s ease-out;
}
.pause-content h2 {
font-family: 'Syne', sans-serif;
font-size: 32px;
color: var(--teal);
margin-bottom: 24px;
}
.pause-content .pause-timer {
font-size: 48px;
font-family: 'Syne', sans-serif;
font-weight: 800;
color: var(--teal-dark);
margin-bottom: 24px;
animation: timerTick 0.5s ease-out;
}
.pause-actions {
display: flex;
gap: 12px;
justify-content: center;
flex-wrap: wrap;
}
/* ============================================
RESPONSIVE DESIGN
============================================ */
@media (max-width: 768px) {
.game-hud {
grid-template-columns: repeat(2, 1fr);
gap: 12px;
}
.stat-box {
padding: 16px;
}
.stat-box .value {
font-size: 24px;
}
.modal-content {
padding: 32px;
border-radius: 16px;
}
.modal-content h2 {
font-size: 32px;
}
.modal-content .score-display {
font-size: 48px;
}
.stats-summary {
grid-template-columns: 1fr;
}
.modal-actions {
flex-direction: column;
}
.modal-actions .btn {
width: 100%;
}
.game-controls {
flex-direction: column;
}
.game-controls .btn {
width: 100%;
}
}
@media (max-width: 480px) {
.game-hud {
grid-template-columns: repeat(2, 1fr);
gap: 10px;
}
.stat-box {
padding: 12px;
}
.stat-box .label {
font-size: 10px;
}
.stat-box .value {
font-size: 20px;
}
.modal-content {
padding: 24px;
}
.modal-content::before {
font-size: 24px;
letter-spacing: 8px;
}
.modal-content h2 {
font-size: 24px;
margin: 24px 0 8px;
}
.modal-content .score-display {
font-size: 40px;
margin: 16px 0;
}
.stats-summary {
gap: 8px;
}
.stats-summary .stat {
padding: 10px;
}
.stats-summary .stat-value {
font-size: 14px;
}
}

View File

@@ -0,0 +1,442 @@
/* ============================================
LEADERBOARD & PLAYER STATS
============================================ */
.leaderboard-section {
margin-top: 80px;
animation: fadeInUp 0.6s ease-out 0.6s both;
}
.leaderboard-section h2 {
font-family: 'Syne', sans-serif;
font-size: clamp(24px, 5vw, 32px);
font-weight: 800;
color: var(--teal);
margin-bottom: 24px;
text-align: center;
}
/* ============================================
TABS (Filtre par difficulté)
============================================ */
.tabs {
display: flex;
gap: 8px;
justify-content: center;
margin-bottom: 32px;
flex-wrap: wrap;
}
.tab-btn {
padding: 10px 20px;
background: var(--white);
border: 2px solid var(--teal-light);
border-radius: 8px;
font-family: 'Syne', sans-serif;
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
cursor: pointer;
transition: all 0.3s ease;
color: var(--text-muted);
}
.tab-btn:hover {
border-color: var(--teal-mid);
color: var(--teal-mid);
}
.tab-btn.active {
background: linear-gradient(135deg, var(--teal-mid), var(--teal-dark));
border-color: var(--teal-dark);
color: var(--white);
box-shadow: var(--shadow-md);
}
/* ============================================
LEADERBOARD LIST
============================================ */
.leaderboard {
background: linear-gradient(135deg, var(--teal-light), var(--white));
border-radius: 16px;
padding: 24px;
border: 2px solid var(--teal-mid);
margin-bottom: 48px;
box-shadow: var(--shadow-sm);
}
.leaderboard-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.rank-item {
display: grid;
grid-template-columns: 50px 1fr auto auto;
align-items: center;
gap: 16px;
background: var(--white);
padding: 16px;
border-radius: 8px;
transition: all 0.3s ease;
border-left: 4px solid var(--teal-light);
position: relative;
overflow: hidden;
}
.rank-item::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(29, 158, 117, 0.1), transparent);
transition: left 0.5s ease;
}
.rank-item:hover {
transform: translateX(8px);
box-shadow: 0 4px 12px rgba(15, 110, 86, 0.15);
border-left-color: var(--teal-mid);
}
.rank-item:hover::before {
left: 100%;
}
/* Rang numéro ou médaille */
.rank-number {
font-weight: 800;
font-size: 18px;
color: var(--teal-mid);
text-align: center;
font-family: 'Syne', sans-serif;
}
.rank-number.medal-1 {
font-size: 24px;
}
.rank-number.medal-1::before {
content: '🥇';
display: block;
}
.rank-number.medal-2::before {
content: '🥈';
display: block;
font-size: 20px;
}
.rank-number.medal-3::before {
content: '🥉';
display: block;
font-size: 20px;
}
/* Infos joueur */
.rank-info {
flex: 1;
}
.player-name {
font-weight: 600;
color: var(--text);
margin-bottom: 4px;
font-size: 14px;
}
.player-stats {
font-size: 12px;
color: var(--text-muted);
display: flex;
gap: 12px;
flex-wrap: wrap;
}
.player-stats span {
display: inline-flex;
align-items: center;
gap: 4px;
}
/* Score et difficulté */
.rank-score {
font-weight: 700;
color: var(--teal-dark);
font-size: 18px;
font-family: 'Syne', sans-serif;
min-width: 60px;
text-align: right;
}
.rank-difficulty {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
padding: 4px 8px;
border-radius: 4px;
background: var(--teal-light);
color: var(--teal-dark);
min-width: 60px;
text-align: center;
}
.rank-difficulty.easy {
background: #C8E6C9;
color: #2E7D32;
}
.rank-difficulty.normal {
background: var(--teal-light);
color: var(--teal-dark);
}
.rank-difficulty.hard {
background: #FFCCBC;
color: #D84315;
}
/* Message si pas de scores */
.empty-state {
text-align: center;
padding: 40px 20px;
color: var(--text-muted);
}
.empty-state-icon {
font-size: 48px;
margin-bottom: 16px;
}
.empty-state-text {
font-size: 14px;
margin-bottom: 8px;
}
.empty-state-hint {
font-size: 12px;
opacity: 0.7;
}
/* ============================================
PLAYER STATS SECTION
============================================ */
.player-stats {
background: linear-gradient(135deg, rgba(15, 110, 86, 0.05), transparent);
border-radius: 16px;
padding: 32px;
border: 2px solid var(--teal-light);
}
.player-stats h3 {
font-family: 'Syne', sans-serif;
font-size: 24px;
font-weight: 700;
color: var(--teal);
margin-bottom: 24px;
text-align: center;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 16px;
}
.stat-card {
background: var(--white);
border: 2px solid var(--teal-light);
border-radius: 12px;
padding: 20px;
text-align: center;
transition: all 0.3s ease;
display: flex;
flex-direction: column;
align-items: center;
}
.stat-card:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-md);
border-color: var(--teal-mid);
}
.stat-icon {
font-size: 32px;
margin-bottom: 12px;
}
.stat-label {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-muted);
margin-bottom: 8px;
}
.stat-value {
font-size: 28px;
font-weight: 800;
background: linear-gradient(135deg, var(--teal-mid), var(--teal-dark));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
font-family: 'Syne', sans-serif;
}
.stat-card.high-value .stat-value {
font-size: 32px;
animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* ============================================
NO DATA STATE
============================================ */
.no-stats {
text-align: center;
padding: 40px;
color: var(--text-muted);
}
.no-stats-icon {
font-size: 48px;
margin-bottom: 16px;
}
.no-stats-title {
font-size: 16px;
font-weight: 600;
margin-bottom: 8px;
}
.no-stats-desc {
font-size: 13px;
opacity: 0.8;
}
/* ============================================
RESPONSIVE DESIGN
============================================ */
@media (max-width: 768px) {
.leaderboard-section h2 {
font-size: 24px;
}
.tabs {
gap: 6px;
}
.tab-btn {
padding: 8px 16px;
font-size: 11px;
}
.rank-item {
grid-template-columns: 40px 1fr auto;
gap: 12px;
}
.rank-difficulty {
display: none;
}
.rank-number {
font-size: 16px;
}
.rank-score {
font-size: 16px;
}
.player-stats {
padding: 24px;
}
.player-stats h3 {
font-size: 20px;
}
.stats-grid {
grid-template-columns: repeat(2, 1fr);
gap: 12px;
}
.stat-card {
padding: 16px;
}
.stat-icon {
font-size: 28px;
margin-bottom: 8px;
}
.stat-value {
font-size: 24px;
}
}
@media (max-width: 480px) {
.leaderboard {
padding: 16px;
border-radius: 12px;
}
.tabs {
gap: 4px;
}
.tab-btn {
padding: 6px 12px;
font-size: 10px;
}
.rank-item {
grid-template-columns: 40px 1fr;
gap: 10px;
padding: 12px;
}
.rank-score {
grid-column: 1 / -1;
text-align: left;
margin-top: 8px;
}
.rank-number {
font-size: 14px;
}
.player-name {
font-size: 13px;
}
.player-stats {
padding: 16px;
}
.player-stats h3 {
font-size: 18px;
}
.stats-grid {
grid-template-columns: 1fr;
}
.stat-card {
padding: 12px;
}
.stat-icon {
font-size: 24px;
}
.stat-value {
font-size: 20px;
}
}

View File

@@ -0,0 +1,520 @@
/* ============================================
MEMORY PICTOGRAMMES - CSS PRINCIPAL
NextGN Formation - Gamified Design
============================================ */
:root {
/* NextGN Base Colors */
--teal: #0F6E56;
--teal-mid: #1D9E75;
--teal-light: #E1F5EE;
--teal-dark: #085041;
--amber: #BA7517;
--amber-light: #FAEEDA;
--amber-dark: #633806;
--coral: #993C1D;
--coral-mid: #D85A30;
--coral-light: #FAECE7;
--purple: #534AB7;
--purple-light: #EEEDFE;
--purple-dark: #3C3489;
--blue: #185FA5;
--blue-light: #E6F1FB;
--bg: #F7F6F2;
--white: #FFFFFF;
--text: #1a1a18;
--text-muted: #6b6a65;
--border: rgba(0,0,0,0.1);
/* Gamification Colors */
--success: #4CAF50;
--warning: #FF9800;
--info: #2196F3;
--accent: #FFD700;
/* Shadows */
--shadow-sm: 0 4px 8px rgba(15, 110, 86, 0.1);
--shadow-md: 0 8px 16px rgba(15, 110, 86, 0.15);
--shadow-lg: 0 16px 32px rgba(15, 110, 86, 0.25);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
}
body {
font-family: 'DM Sans', sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.6;
overflow-x: hidden;
}
/* ============================================
HEADER & NAVIGATION
============================================ */
.nav-header {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 70px;
background: rgba(255, 255, 255, 0.95);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 40px;
z-index: 1000;
backdrop-filter: blur(10px);
}
.header-logo {
font-family: 'Syne', sans-serif;
font-size: 20px;
font-weight: 700;
letter-spacing: -0.5px;
background: linear-gradient(135deg, var(--teal-mid), var(--coral-mid));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-decoration: none;
}
.header-nav {
display: flex;
gap: 0;
}
.header-nav a {
font-family: 'Syne', sans-serif;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--text-muted);
text-decoration: none;
margin-left: 40px;
transition: color 0.3s ease;
position: relative;
}
.header-nav a:hover {
color: var(--teal-mid);
}
.header-nav a::after {
content: '';
position: absolute;
bottom: -4px;
left: 0;
width: 0;
height: 2px;
background: var(--teal-mid);
transition: width 0.3s ease;
}
.header-nav a:hover::after {
width: 100%;
}
/* ============================================
PROGRESS BAR
============================================ */
.progress {
position: fixed;
top: 70px;
left: 0;
right: 0;
height: 4px;
background: var(--teal-light);
z-index: 999;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--teal-mid), var(--teal-dark));
width: 0%;
transition: width 0.2s ease;
}
/* ============================================
MAIN LAYOUT
============================================ */
main {
margin-top: 70px;
padding: 40px;
min-height: calc(100vh - 70px);
}
.game-container {
max-width: 1200px;
margin: 0 auto;
}
/* ============================================
INTRO SECTION
============================================ */
.intro-section {
margin-bottom: 60px;
animation: fadeInDown 0.6s ease-out;
}
.intro-section h1 {
font-family: 'Syne', sans-serif;
font-size: clamp(28px, 5vw, 48px);
font-weight: 800;
color: var(--teal);
margin-bottom: 8px;
text-align: center;
}
.intro-section .subtitle {
font-size: 18px;
color: var(--text-muted);
text-align: center;
margin-bottom: 24px;
font-weight: 300;
}
.intro-box {
background: linear-gradient(135deg, var(--teal-light), var(--white));
border-left: 4px solid var(--teal-mid);
border-radius: 8px;
padding: 20px;
margin-bottom: 32px;
font-size: 0.95em;
color: var(--text-muted);
line-height: 1.6;
max-width: 600px;
margin-left: auto;
margin-right: auto;
text-align: center;
}
/* ============================================
DIFFICULTY SELECTOR
============================================ */
.difficulty-selector {
margin-bottom: 48px;
text-align: center;
animation: fadeInUp 0.6s ease-out 0.2s both;
}
.difficulty-selector label {
display: block;
font-size: 14px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-muted);
margin-bottom: 16px;
}
.btn-group {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
gap: 12px;
max-width: 500px;
margin: 0 auto;
}
.btn-difficulty {
background: var(--white);
border: 2px solid var(--teal-light);
border-radius: 8px;
padding: 16px 12px;
font-family: 'Syne', sans-serif;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
}
.btn-difficulty:hover {
border-color: var(--teal-mid);
transform: translateY(-4px);
box-shadow: var(--shadow-md);
}
.btn-difficulty.active {
background: linear-gradient(135deg, var(--teal-light), var(--white));
border-color: var(--teal-mid);
color: var(--teal);
}
.btn-label {
font-size: 14px;
font-weight: 700;
color: var(--teal);
}
.btn-desc {
font-size: 12px;
font-family: 'DM Sans', sans-serif;
color: var(--text-muted);
font-weight: 400;
}
/* ============================================
GAME SECTION
============================================ */
.game-section {
margin-bottom: 80px;
animation: fadeInUp 0.6s ease-out 0.3s both;
}
/* ============================================
GAME GRID & CARDS
============================================ */
.game-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(clamp(70px, 15vw, 140px), 1fr));
gap: clamp(12px, 2vw, 20px);
max-width: 900px;
margin: 0 auto 40px;
padding: 20px;
background: linear-gradient(135deg, rgba(225, 245, 238, 0.4), transparent);
border-radius: 16px;
border: 1px solid var(--teal-light);
}
/* MEMORY CARD STYLES */
.memory-card {
position: relative;
width: 100%;
aspect-ratio: 1 / 1;
cursor: pointer;
perspective: 1000px;
transform-style: preserve-3d;
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
border-radius: 12px;
overflow: hidden;
}
/* Card Front (Couverture) */
.card-face {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
display: flex;
align-items: center;
justify-content: center;
border-radius: 12px;
font-weight: bold;
font-family: 'Syne', sans-serif;
font-size: clamp(32px, 8vw, 56px);
}
.card-face.front {
background: linear-gradient(135deg, var(--teal-light), var(--teal-light));
border: 2px solid var(--teal-mid);
color: var(--teal-dark);
box-shadow: var(--shadow-sm);
}
.card-face.back {
transform: rotateY(180deg);
background: linear-gradient(135deg, var(--white), var(--teal-light));
border: 2px solid var(--teal-mid);
flex-direction: column;
gap: 8px;
padding: 8px;
box-shadow: var(--shadow-sm);
}
.card-face.back img {
max-width: 70%;
max-height: 60%;
object-fit: contain;
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}
.card-face.back span {
font-size: clamp(10px, 2vw, 13px);
text-align: center;
font-weight: 500;
line-height: 1.2;
color: var(--text);
font-family: 'DM Sans', sans-serif;
}
/* Card States */
.memory-card:hover:not(.matched):not(.disabled) {
transform: translateY(-8px) scale(1.05);
box-shadow: var(--shadow-lg);
}
.memory-card.flipped .card-face.front {
transform: rotateY(180deg);
}
.memory-card.flipped .card-face.back {
transform: rotateY(0deg);
}
.memory-card.matched {
animation: matchSuccess 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
cursor: default;
}
.memory-card.matched .card-face.front {
background: linear-gradient(135deg, var(--success), var(--success));
border-color: var(--success);
color: var(--white);
}
.memory-card.matched .card-face.back {
background: linear-gradient(135deg, var(--white), rgba(76, 175, 80, 0.2));
border-color: var(--success);
}
.memory-card.error {
animation: cardShake 0.4s ease-in-out;
}
.memory-card.disabled {
pointer-events: none;
}
/* ============================================
FOOTER
============================================ */
footer {
background: var(--text);
color: var(--white);
padding: 40px;
text-align: center;
font-size: 13px;
margin-top: 80px;
}
/* ============================================
BUTTONS
============================================ */
.btn {
font-family: 'Syne', sans-serif;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
padding: 12px 24px;
border: none;
border-radius: 6px;
cursor: pointer;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
gap: 8px;
}
.btn-primary {
background: linear-gradient(135deg, var(--teal-mid), var(--teal-dark));
color: var(--white);
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}
.btn-secondary {
background: var(--white);
border: 2px solid var(--teal-mid);
color: var(--teal-mid);
}
.btn-secondary:hover {
background: var(--teal-light);
border-color: var(--teal-dark);
}
/* ============================================
RESPONSIVE DESIGN
============================================ */
@media (max-width: 768px) {
.nav-header {
padding: 0 20px;
}
.header-nav a {
margin-left: 20px;
font-size: 11px;
}
main {
padding: 20px;
margin-top: 70px;
}
.intro-section h1 {
font-size: 28px;
}
.game-grid {
gap: 12px;
padding: 16px;
}
.game-controls {
flex-direction: column;
gap: 8px;
}
.game-controls .btn {
width: 100%;
justify-content: center;
}
footer {
padding: 24px;
font-size: 12px;
}
}
@media (max-width: 480px) {
.nav-header {
height: 60px;
padding: 0 16px;
}
.header-logo {
font-size: 16px;
}
.header-nav a {
margin-left: 12px;
font-size: 10px;
}
main {
padding: 16px;
margin-top: 60px;
}
.intro-section h1 {
font-size: 24px;
}
.difficulty-selector label {
font-size: 12px;
}
.btn-group {
grid-template-columns: 1fr;
}
.game-hud {
grid-template-columns: repeat(2, 1fr);
gap: 12px;
}
}