/**
 * SEPTIMOT - Styles CSS
 * Version: 1.5 (Refactorisée)
 * 
 * Organisation:
 * 1. Variables CSS (Custom Properties)
 * 2. Classes utilitaires (NOUVEAU - pour réduire les doublons)
 * 3. Reset & Base
 * 4. Layout & Containers
 * 5. Header & Navigation
 * 6. Cards & Sections
 * 7. Forms & Inputs
 * 8. Buttons
 * 9. Mini-jeux (Anagramme, Pendu, Motus)
 * 10. Trophées
 * 11. Leaderboard
 * 12. Modals
 * 13. Notifications & Toasts
 * 14. Animations
 * 15. Media Queries (regroupées à la fin)
 */

/* ============================================
   1. VARIABLES CSS
   ============================================ */
:root {
    /* Couleurs principales */
    --primary: #4C9EE1;
    --primary-dark: #4C9EE1;
    --secondary: #113F64;
    --accent: #475569;
    --success: #31C950;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Couleurs neutres */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* Effets glass */
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.18);
    
    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 50px;
}

/* ============================================
   2. CLASSES UTILITAIRES (Réduisent les doublons)
   ============================================ */

/* Effet Glass - remplace 15+ occurrences de backdrop-filter */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Texte gradient - remplace 20+ occurrences */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gradient de fond principal */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

/* Hover lift effect */
.hover-lift {
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.hover-lift:hover {
    transform: translateY(-2px);
}

/* Card de base */
.card-base {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============================================
   3. RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #4C9EE1 0%, #1e293b 50%, #0f172a 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(30, 58, 138, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(51, 65, 85, 0.4) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   4. LAYOUT & CONTAINERS
   ============================================ */
.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 50px 45px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    max-width: 500px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-container h1 {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    font-size: 3.5em;
    font-family: "Luckiest Guy", cursive;
    font-weight: 350;
    letter-spacing: 2px;
}

.login-container p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.1em;
    line-height: 1.6;
}

/* ============================================
   5. HEADER & NAVIGATION
   ============================================ */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 10px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--glass-border) inset;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-smooth);
}

.header:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--glass-border) inset, 0 20px 60px rgba(0, 0, 0, 0.2);
}

h1 {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-size: 3.8em;
    font-family: "Luckiest Guy", cursive;
    font-weight: 350;
    font-style: normal;
    letter-spacing: 2px;
    text-shadow: 0 2px 2px rgba(99, 102, 241, 0.3);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

.date {
    color: var(--text-secondary);
    font-size: 1.1em;
    margin: 10px 0;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.description {
    display: block;
    color: var(--text-secondary);
    font-size: 1em;
    margin-top: 10px;
    font-weight: 400;
    line-height: 1.6;
}

.timer {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-size: 1em;
    margin-top: 10px;
    margin-bottom: 15px;
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.4);
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.timer:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.5);
}

.timer.refresh {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    animation: blink 1s infinite, pulse 2s ease-in-out infinite;
}

/* Boutons header */
.help-btn,
.leaderboard-btn {
    position: absolute;
    top: 20px;
    width: 48px;
    height: 48px;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.help-btn {
    right: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.help-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.5);
}

.help-btn:active {
    transform: scale(0.95) rotate(90deg);
}

.leaderboard-btn {
    left: 20px;
    background: #ff9800;
    font-size: 1.2em;
}

.leaderboard-btn:hover {
    background: #f57c00;
    transform: scale(1.1);
}

/* ============================================
   6. CARDS & SECTIONS
   ============================================ */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 15px 10px;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-value {
    font-size: 2.4em;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1em;
    margin-top: 8px;
    font-weight: 500;
}

.word-display {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.found-hints {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 24px;
    border-radius: var(--radius-xl);
    margin-top: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.found-hints h3 {
    color: var(--primary);
    margin-bottom: 18px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.found-hints h3:hover {
    opacity: 0.8;
}

.hints-toggle-icon {
    font-size: 0.8em;
    transition: transform var(--transition-normal);
}

.hints-toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.hints-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    transition: all var(--transition-normal);
    overflow: hidden;
}

.hints-grid.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.hint-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.hint-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hint-badge.locked {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #9ca3af;
}

.reveal-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 20px 24px;
    border-radius: var(--radius-xl);
    margin-top: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--warning);
    box-shadow: var(--shadow-sm);
}

.reveal-section h3 {
    color: #92400e;
    margin-bottom: 15px;
    font-weight: 600;
}

.reveal-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Word letters */
.word-letters {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.letter-box {
    width: 40px;
    min-width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: 800;
    color: var(--text-primary);
    flex-shrink: 0;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.letter-box.revealed {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-color: var(--primary);
    animation: reveal 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.5);
}

/* ============================================
   7. FORMS & INPUTS
   ============================================ */
.username-input,
.guess-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.2em;
    border: 2px solid rgba(30, 58, 138, 0.3);
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 15px;
    transition: all var(--transition-smooth);
    background: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.username-input:focus,
.guess-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.15);
    transform: scale(1.02);
}

.guess-input {
    text-transform: uppercase;
    margin-bottom: 24px;
}

.add-friend-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-size: 0.95em;
    font-family: 'Poppins', sans-serif;
    transition: all var(--transition-normal);
}

.add-friend-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ============================================
   8. BUTTONS
   ============================================ */
.btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: var(--radius-lg);
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    width: 100%;
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.4);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.5);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.4);
}

.btn:disabled {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn.warning {
    background: linear-gradient(135deg, var(--warning) 0%, #f59e0b 100%);
    color: white;
}

.btn.warning:hover {
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

.btn.small {
    padding: 12px 24px;
    font-size: 0.95em;
    width: auto;
}

.start-button {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.4em;
    font-weight: 700;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-smooth);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
    position: relative;
    letter-spacing: 0.5px;
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.6);
}

.start-button:active {
    transform: translateY(0);
}

.start-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loader dans le bouton */
.button-loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-left: 12px;
    vertical-align: middle;
}

/* ============================================
   9. CHALLENGES & MINI-JEUX
   ============================================ */
.challenges {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.challenge-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-smooth);
}

.challenge-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.challenge-time {
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2em;
}

.challenge-status {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-sm);
}

.status-locked {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.status-available {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
    animation: pulse 2s infinite, glow 2s ease-in-out infinite;
}

.status-completed {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.mini-game {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-top: 20px;
    border: 2px solid #e2e8f0;
}

.mini-game h4 {
    color: var(--text-primary);
    margin-bottom: 18px;
    font-weight: 700;
    font-size: 1.2em;
}

.game-timer {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1.6em;
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
    animation: timerPulse 2s ease-in-out infinite;
}

/* Anagramme */
.anagram-letters {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.anagram-letter {
    width: 48px;
    min-width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.4);
    transition: all var(--transition-smooth);
}

.anagram-letter:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.5);
}

/* Pendu */
.hangman-display {
    text-align: center;
    margin: 24px 0;
}

.hangman-word {
    font-size: 1.6em;
    letter-spacing: 10px;
    margin: 24px 0;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.hangman-lives {
    font-size: 1.3em;
    color: var(--danger);
    margin-bottom: 18px;
    font-weight: 700;
}

.keyboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    gap: 8px;
    margin-top: 20px;
}

.key-btn {
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    font-size: 1em;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.key-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.4);
}

.key-btn:active {
    transform: translateY(0);
}

.key-btn:disabled {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    color: #9ca3af;
}

.key-btn.wrong {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

/* Motus */
.motus-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 20px auto;
    max-width: fit-content;
}

.motus-row {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.motus-cell {
    width: 44px;
    height: 44px;
    border: 3px solid #e2e8f0;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    font-weight: 800;
    background: white;
    text-transform: uppercase;
    transition: all var(--transition-normal);
}

.motus-cell.correct {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-color: var(--success);
    color: white;
    animation: flipIn 0.3s ease;
}

.motus-cell.misplaced {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    border-color: var(--warning);
    color: white;
    animation: flipIn 0.3s ease;
}

.motus-cell.wrong {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    border-color: #6b7280;
    color: white;
    animation: flipIn 0.3s ease;
}

.motus-cell.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.2);
}

.motus-input-row {
    display: flex;
    gap: 6px;
    margin-top: 15px;
    justify-content: center;
}

/* ============================================
   10. TROPHÉES
   ============================================ */
.trophies-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 35px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.trophies-section h2 {
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    font-size: 2.2em;
    font-weight: 700;
}

.trophies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.trophy-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 24px;
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all var(--transition-smooth);
    border: 2px solid #cbd5e1;
    position: relative;
    overflow: hidden;
}

.trophy-card.unlocked {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.trophy-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.trophy-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px auto;
    display: block;
}

.trophy-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.trophy-card.locked .trophy-icon img {
    filter: grayscale(100%);
    opacity: 0.3;
}

.trophy-name {
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.trophy-card.locked .trophy-name {
    color: var(--text-muted);
}

.trophy-description {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.trophy-card.locked .trophy-description {
    color: #9F9FA9;
}

.trophy-progress {
    font-size: 0.9em;
    font-weight: 700;
    color: var(--primary);
    margin-top: 10px;
}

.trophy-card.unlocked .trophy-progress {
    color: #059669;
}

.trophy-date {
    font-size: 0.75em;
    color: var(--text-muted);
    margin-top: 6px;
    font-style: italic;
}

.new-trophy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: var(--text-primary);
    padding: 24px 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 40px rgba(245, 158, 11, 0.4);
    z-index: 1000;
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1), shake 0.5s ease 0.5s;
    max-width: 320px;
    border: 2px solid #f59e0b;
}

.new-trophy-notification h3 {
    margin-bottom: 12px;
    font-size: 1.4em;
    font-weight: 700;
}

.new-trophy-notification .trophy-icon {
    width: 56px;
    height: 56px;
    margin: 12px auto;
}

.new-trophy-notification .trophy-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ============================================
   11. LEADERBOARD
   ============================================ */
.leaderboard-container {
    height: 350px;
    min-height: 350px;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 5px 0 0;
    margin: 0 auto;
    width: 100%;
}

.leaderboard-container::-webkit-scrollbar {
    width: 6px;
}

.leaderboard-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.leaderboard-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.leaderboard-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.leaderboard-container {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f5f9;
}

.leaderboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.leaderboard-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    border-bottom: 3px solid transparent;
    font-family: 'Poppins', sans-serif;
}

.leaderboard-tab:hover {
    color: #667eea;
}

.leaderboard-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.leaderboard-list {
    list-style: none;
}

.leaderboard-item {
    display: flex;
    align-items: left;
    gap: 5px;
    padding: 10px 15px;
    background: white;
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    animation: slideInLeaderboard 0.5s ease-out backwards;
}

.leaderboard-item:nth-child(1) { animation-delay: 0.05s; }
.leaderboard-item:nth-child(2) { animation-delay: 0.1s; }
.leaderboard-item:nth-child(3) { animation-delay: 0.15s; }
.leaderboard-item:nth-child(4) { animation-delay: 0.2s; }
.leaderboard-item:nth-child(5) { animation-delay: 0.25s; }

.leaderboard-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

/* Podium - 1ère place (Or) */
.leaderboard-item:nth-child(1) {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 3px solid #ffd700;
}

.leaderboard-item:nth-child(1) .leaderboard-rank,
.leaderboard-item:nth-child(1) .leaderboard-name,
.leaderboard-item:nth-child(1) .leaderboard-score {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Podium - 2ème place (Argent) */
.leaderboard-item:nth-child(2) {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    border: 3px solid #c0c0c0;
}

.leaderboard-item:nth-child(2) .leaderboard-rank,
.leaderboard-item:nth-child(2) .leaderboard-name,
.leaderboard-item:nth-child(2) .leaderboard-score {
    color: #fff;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
}

/* Podium - 3ème place (Bronze) */
.leaderboard-item:nth-child(3) {
    background: linear-gradient(135deg, #cd7f32 0%, #e8a87c 100%);
    border: 3px solid #cd7f32;
}

.leaderboard-item:nth-child(3) .leaderboard-rank,
.leaderboard-item:nth-child(3) .leaderboard-name,
.leaderboard-item:nth-child(3) .leaderboard-score {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.leaderboard-item.current-user {
    border: 3px solid #764ba2;
    box-shadow: 0 4px 10px rgba(118, 75, 162, 0.3);
}

.leaderboard-rank {
    font-size: 1.2em;
    font-weight: 600;
    color: #667eea;
    min-width: 25px;
    text-align: left;
    flex-shrink: 0;
}

.leaderboard-rank.top3 {
    font-size: 1.2em;
    padding-right: 2px;
}

.leaderboard-player-info {
    flex: 1;
    min-width: 0;
}

.leaderboard-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 1em;
    word-wrap: break-word;
    margin-bottom: 0px;
}

.leaderboard-score {
    font-size: 1.2em;
    font-weight: 700;
    color: #667eea;
    text-align: right;
    margin-right: 5px;
    min-width: 90px;
    flex-shrink: 0;
}

.loading-spinner {
    text-align: center;
    padding: 40px 20px;
    color: #667eea;
    font-size: 1.2em;
    font-weight: 600;
}

.loading-spinner::after {
    content: '...';
    animation: loadingDots 1.5s steps(4, end) infinite;
}

/* Section d'ajout d'amis */
.add-friend-section {
    background: #f8f9fa;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    overflow: hidden;
}

.add-friend-trigger {
    padding: 12px 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

.add-friend-trigger:hover {
    background: #e9ecef;
}

.add-friend-icon {
    font-size: 1.2em;
    color: #667eea;
    transition: transform var(--transition-normal);
}

.add-friend-trigger:hover .add-friend-icon {
    transform: scale(1.1);
}

.add-friend-text {
    font-size: 1em;
    font-weight: 500;
    color: #495057;
}

.add-friend-form {
    padding: 16px 20px;
    display: flex;
    gap: 8px;
    align-items: center;
    background: #fff;
    border-top: 2px solid #e9ecef;
}

.add-friend-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.add-friend-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.add-friend-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.add-friend-cancel {
    padding: 10px 14px;
    background: #e9ecef;
    color: #495057;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-friend-cancel:hover {
    background: #dee2e6;
}

.remove-friend-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.6em;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.remove-friend-btn:hover {
    background: #ff5252;
    transform: scale(1.05);
}

.empty-friends {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-friends-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.empty-friends-text {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.empty-friends-hint {
    font-size: 0.9em;
    color: #bbb;
}

/* Bandeau compact du vainqueur hebdomadaire */
.weekly-winner-banner {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
}

.weekly-winner-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

/* Container pour les bandeaux doubles */
.weekly-banners-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.weekly-banner-half {
    flex: 1;
    padding: 12px 15px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 0.95em;
    color: #333;
}

.weekly-banner-half.general {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.weekly-banner-half.friends {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.weekly-banner-half:hover {
    transform: translateY(-2px);
}

.weekly-banner-half.general:hover {
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.weekly-banner-half.friends:hover {
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

@media (max-width: 500px) {
.weekly-banners-container {
        gap: 6px;
    }
            
    .weekly-banner-half {
        padding: 10px 8px;
        font-size: 0.85em;
    }
}

/* Podium */
.podium-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    min-height: 280px;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all var(--transition-normal);
}

.podium-place:hover {
    transform: translateY(-5px);
}

.podium-rank {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.podium-player {
    background: white;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    min-width: 140px;
}

.podium-player-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #667eea;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.podium-player-score {
    font-size: 1.2em;
    color: var(--success);
    font-weight: bold;
}

.podium-stand {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5em;
    margin-top: 10px;
    width: 100%;
}

.podium-place.first .podium-stand {
    height: 120px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
}

.podium-place.second .podium-stand {
    height: 90px;
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #333;
}

.podium-place.third .podium-stand {
    height: 70px;
    background: linear-gradient(135deg, #cd7f32 0%, #d4a574 100%);
    color: #333;
}

.podium-place.first { order: 2; }
.podium-place.second { order: 1; }
.podium-place.third { order: 3; }

.podium-place.current-user-podium .podium-player {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid var(--primary);
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.3);
}

/* Styles pour la fonctionnalité de partage */
        .share-container {
            margin-top: 20px;
            text-align: center;
        }

        .share-button {
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 12px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .share-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
        }

        .share-button:active {
            transform: translateY(0);
        }





/* Partage leaderboard */
.leaderboard-share-fixed {
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    background: white;
    margin-top: 15px;
}

.leaderboard-share-title {
    font-size: 0.95em;
    font-weight: 600;
    color: #4a5568;
    text-align: center;
    margin-bottom: 12px;
}

.leaderboard-share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.leaderboard-share-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 6px;
}

.leaderboard-share-btn.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d5bbb 100%);
    color: white;
}

.leaderboard-share-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.leaderboard-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ============================================
   12. MODALS
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--radius-2xl);
    width: 700px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 20px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 10px;
    transition: all var(--transition-smooth);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
    background: white;
    color: var(--primary);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.modal-content h2 {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 1.8em;
    text-align: center;
    font-weight: 700;
}

.modal-content h3 {
    color: var(--primary);
    font-size: 1.15em;
    font-weight: 700;
    margin-top: 25px;
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 15px;
}

.modal-content ul {
    margin: 15px 0;
    padding-left: 20px;
    line-height: 1.8;
}

.modal-content ul li {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.modal-content ul ul {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* Share Modal */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

/* Boutons sociaux dans le modal d'aide */
.social-follow-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.social-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95em;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.social-follow-btn.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d5bbb 100%);
    color: white;
}

.social-follow-btn.facebook:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

.social-follow-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.social-follow-btn.whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.share-modal.active {
    display: flex;
}

.share-modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 36px;
    border-radius: var(--radius-2xl);
    max-width: 540px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.share-modal-header h3 {
    margin: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 26px;
    font-weight: 700;
}

.close-modal {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.close-modal:hover {
    background: white;
    color: var(--primary);
    transform: rotate(90deg);
}

.share-text-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    font-family: monospace;
    font-size: 0.95em;
    line-height: 1.8;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #e2e8f0;
    color: var(--text-primary);
}

.copy-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.4);
    margin-bottom: 20px;
}

.copy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(30, 58, 138, 0.5);
}

.copy-button.copied {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.social-buttons {
    display: flex;
    gap: 12px;
}

.social-button {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-normal);
    color: white;
}

.social-button.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d5bbb 100%);
}

.social-button.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.social-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ============================================
   13. NOTIFICATIONS & TOASTS
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, var(--text-primary) 0%, #334155 100%);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    transition: all var(--transition-smooth);
    z-index: 10000;
    font-weight: 500;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

.points-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 60px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-align: center;
    min-width: 280px;
    border: 3px solid var(--primary);
}

.points-notification.failure {
    border-color: var(--danger);
}

.points-notification-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.points-notification-title {
    font-weight: 700;
    font-size: 1.3em;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.points-notification-word {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--primary);
    margin: 10px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.points-notification-points {
    font-size: 1.4em;
    font-weight: 700;
    margin-top: 10px;
}

.points-notification-points.positive {
    color: var(--success);
}

.points-notification-points.negative {
    color: var(--danger);
}

.points-notification-points.neutral {
    color: #666;
}

/* Message de succès */
.success-message {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    padding: 36px;
    border-radius: var(--radius-2xl);
    text-align: center;
    margin-top: 25px;
    margin-bottom: 25px;
    animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl), 0 0 40px rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.success-message h2 {
    font-size: 2.2em;
    margin-bottom: 16px;
    font-weight: 800;
    color: white;
    -webkit-text-fill-color: white;
    background: none;
}

.success-message p {
    font-size: 1.3em;
    margin: 12px 0;
    font-weight: 500;
}

/* Cookie Consent */
#cookieConsent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px 30px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#cookieConsent.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.cookie-text {
    flex: 1;
    color: #334155;
    font-size: 0.95em;
    line-height: 1.6;
}

.cookie-text strong {
    color: var(--primary);
    font-weight: 600;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95em;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all var(--transition-smooth);
    white-space: nowrap;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.cookie-btn-decline {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-secondary);
    border: 2px solid #e2e8f0;
}

.cookie-btn-decline:hover {
    background: white;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* Global Loader */
#globalLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e293b 50%, #0f172a 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#globalLoader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-logo {
    font-size: 4.5em;
    font-family: 'Luckiest Guy', cursive;
    margin-bottom: 30px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    animation: pulse-logo 2s ease-in-out infinite;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top: 6px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loader-text {
    font-size: 1.2em;
    font-weight: 500;
    opacity: 0.9;
}

/* ============================================
   14. ANIMATIONS
   ============================================ */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes titleGlow {
    from { filter: drop-shadow(0 0 10px rgba(30, 58, 138, 0.4)); }
    to { filter: drop-shadow(0 0 20px rgba(51, 65, 85, 0.6)); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulse-logo {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.5); }
}

@keyframes reveal {
    0% { transform: rotateY(90deg) scale(0.8); opacity: 0; }
    50% { transform: rotateY(45deg) scale(1.1); }
    100% { transform: rotateY(0deg) scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeaderboard {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

@keyframes popIn {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    70% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes shine {
    0%, 100% { box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3); transform: translateY(0); }
    50% { box-shadow: 0 12px 32px rgba(245, 158, 11, 0.5); transform: translateY(-4px); }
}

@keyframes flipIn {
    0% { transform: rotateX(90deg); }
    100% { transform: rotateX(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

@keyframes pointingFinger {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-5px); }
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ============================================
   15. MEDIA QUERIES (REGROUPÉES)
   ============================================ */

/* Tablettes et petits écrans */
@media (max-width: 900px) {
    .letter-box {
        width: 40px;
        min-width: 40px;
        height: 40px;
        font-size: 1.3em;
    }
    
    .anagram-letter {
        width: 32px;
        min-width: 32px;
        height: 32px;
        font-size: 1.2em;
    }
    
    .hangman-word {
        font-size: 1.2em;
        letter-spacing: 5px;
    }
    
    .motus-cell {
        width: 38px;
        height: 38px;
        font-size: 1.1em;
    }
}

/* Mobile */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        max-width: 100%;
    }

    .header {
        padding: 20px 15px;
        margin-bottom: 10px;
    }

    h1 {
        font-size: 2.5em;
        margin-bottom: 8px;
    }

    .date {
        font-size: 0.95em;
        margin: 8px 0;
    }

    .timer {
        font-size: 0.9em;
        padding: 6px 30px;
    }

    .help-btn,
    .leaderboard-btn {
        top: 15px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 1.3em !important;
    }

    .help-btn {
        right: 15px !important;
    }

    .leaderboard-btn {
        left: 15px !important;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 10px;
    }

    .stat-card {
        padding: 5px 5px;
    }

    .stat-value {
        font-size: 1.3em;
    }

    .stat-label {
        font-size: 0.75em;
    }

    .word-display,
    .challenge-card,
    .trophies-section {
        padding: 20px 15px;
        margin-bottom: 10px;
    }

    .word-display h2 {
        font-size: 1.5em;
        margin-bottom: 10px;
    }

    .found-hints {
        padding: 15px;
        margin-bottom: 10px;
    }

    .found-hints h3 {
        font-size: 1em;
        margin-bottom: 10px;
    }

    .hints-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .hint-badge {
        padding: 8px 10px;
        font-size: 1em;
    }

    .reveal-section {
        padding: 12px 15px;
        margin-bottom: 10px;
    }

    .reveal-section h3 {
        font-size: 1em;
        margin-bottom: 12px;
    }

    .reveal-info {
        flex-direction: column;
        gap: 10px;
    }

    .reveal-info span {
        text-align: center;
        width: 100%;
    }

    .guess-input {
        padding: 12px;
        font-size: 1.1em;
        margin-bottom: 10px;
    }

    .btn {
        padding: 12px 30px;
        font-size: 1em;
    }

    .btn.small {
        padding: 10px 20px;
        font-size: 0.9em;
        width: 100%;
    }

    .challenge-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .challenge-time {
        font-size: 1em;
    }

    .challenge-status {
        font-size: 0.85em;
        padding: 4px 12px;
    }

    .mini-game {
        padding: 15px;
    }

    .mini-game h4 {
        font-size: 1em;
        margin-bottom: 10px;
    }

    .game-timer {
        font-size: 1.3em;
        padding: 8px 15px;
        margin-bottom: 12px;
    }

    .hangman-lives {
        font-size: 1.1em;
    }

    .keyboard {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
        margin-top: 12px;
    }

    .key-btn {
        padding: 10px 5px;
        font-size: 0.9em;
    }

    .trophies-section h2 {
        font-size: 1.6em;
        margin-bottom: 20px;
    }

    .trophies-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .trophy-card {
        padding: 15px;
    }

    .trophy-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 8px;
    }

    .trophy-name {
        font-size: 1em;
    }

    .trophy-description {
        font-size: 0.8em;
    }

    .modal-content {
        padding: 30px 20px;
        margin: 15px;
        max-width: 95%;
    }

    .leaderboard-container {
        height: 280px;
        min-height: 280px;
        max-height: 280px;
    }

    .modal-content h2 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }

    .modal-content h3 {
        font-size: 1.2em;
        margin-top: 20px;
        margin-bottom: 12px;
    }

    .modal-content p,
    .modal-content li {
        font-size: 0.95em;
        line-height: 1.5;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.8em;
    }

    .leaderboard-item {
        margin-bottom: 8px;
    }

    .leaderboard-rank {
        font-size: 1em;
        min-width: 35px;
    }

    .leaderboard-name {
        font-size: 0.8em;
        margin-left: 2px;
    }

    .leaderboard-score {
        font-size: 1em;
    }

    .success-message {
        padding: 20px 15px;
    }

    .success-message h2 {
        font-size: 1.5em;
        margin-bottom: 12px;
    }

    .success-message p {
        font-size: 1em;
        margin: 8px 0;
    }

    .new-trophy-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        padding: 15px 20px;
    }

    .new-trophy-notification h3 {
        font-size: 1.1em;
        margin-bottom: 8px;
    }

    .new-trophy-notification .trophy-icon {
        width: 44px;
        height: 44px;
        margin: 8px auto;
    }

    .login-container {
        padding: 30px 20px;
        max-width: 95%;
    }

    .login-container h1 {
        font-size: 2.5em;
        margin-bottom: 12px;
        font-family: "Luckiest Guy", cursive;
        font-weight: 250;
        font-style: normal;
    }

    .login-container p {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .username-input {
        padding: 12px 20px;
        font-size: 1.1em;
        margin-bottom: 15px;
    }

    .start-button {
        padding: 12px 30px;
        font-size: 1.2em;
    }

    /* Améliorations tactiles pour tous les mobiles */
    .btn,
    .key-btn,
    .help-btn,
    .leaderboard-btn,
    .modal-close,
    .start-button {
        -webkit-tap-highlight-color: transparent;
    }

    #cookieConsent {
        padding: 20px;
    }

    .cookie-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .cookie-buttons {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        padding: 14px 24px;
    }

    .cookie-text {
        font-size: 0.9em;
    }
}

@media (max-width: 700px) {
    .letter-box {
        width: 32px;
        min-width: 32px;
        height: 32px;
        font-size: 1.2em;
    }
    
    .word-letters {
        gap: 5px;
    }
    
    .anagram-letter {
        width: 28px;
        min-width: 28px;
        height: 28px;
        font-size: 1.1em;
    }
    
    .anagram-letters {
        gap: 6px;
    }
    
    .hangman-word {
        font-size: 1em;
        letter-spacing: 4px;
    }
    
    .motus-cell {
        width: 34px;
        height: 34px;
        font-size: 1em;
    }
}

/* Responsive ajout amis */
@media (max-width: 600px) {
    .add-friend-trigger {
        padding: 14px 16px;
    }

    .add-friend-text {
        font-size: 0.95em;
    }

    .add-friend-form {
        padding: 14px 16px;
        flex-direction: column;
        gap: 10px;
    }

    .add-friend-input {
        width: 100%;
        font-size: 0.9em;
        padding: 9px 12px;
    }

    .add-friend-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 0.9em;
    }

    .add-friend-cancel {
        width: 100%;
        padding: 10px 12px;
        font-size: 1em;
    }
    
    .podium-container {
        gap: 10px;
    }

    .podium-player {
        min-width: 100px;
        padding: 10px;
    }

    .podium-player-name {
        font-size: 0.9em;
    }

    .podium-rank {
        font-size: 2em;
    }

    .podium-place.first .podium-stand {
        height: 100px;
    }

    .podium-place.second .podium-stand {
        height: 75px;
    }

    .podium-place.third .podium-stand {
        height: 60px;
    }
}

@media (max-width: 500px) {
    .letter-box {
        width: 26px;
        min-width: 26px;
        height: 26px;
        font-size: 1.1em;
    }
    
    .word-letters {
        gap: 4px;
    }
    
    .anagram-letter {
        width: 25px;
        min-width: 25px;
        height: 25px;
        font-size: 1em;
    }
    
    .anagram-letters {
        gap: 4px;
    }
    
    .hangman-word {
        font-size: 1em;
        letter-spacing: 3px;
    }
    
    .motus-cell {
        width: 30px;
        height: 30px;
        font-size: 0.9em;
    }
    
    .weekly-banners-container {
        gap: 6px;
    }
    
    .weekly-banner-half {
        padding: 10px 8px;
        font-size: 0.85em;
    }
}

/* Petits mobiles */
@media (max-width: 400px) {
    h1 {
        font-size: 2em;
    }

    .header {
        padding: 15px 10px;
    }

    .help-btn,
    .leaderboard-btn {
        width: 35px;
        height: 35px;
        font-size: 1.1em;
        top: 12px;
    }

    .help-btn {
        right: 12px;
    }

    .leaderboard-btn {
        left: 12px;
    }

    .stats {
        gap: 8px;
    }

    .stat-card {
        padding: 12px 8px;
    }

    .stat-value {
        font-size: 1.4em;
    }

    .stat-label {
        font-size: 0.8em;
    }

    .letter-box {
        width: 24px;
        min-width: 24px;
        height: 24px;
        font-size: 1em;
    }
    
    .word-letters {
        gap: 3px;
    }
    
    .anagram-letter {
        width: 22px;
        min-width: 22px;
        height: 22px;
        font-size: 0.8em;
    }
    
    .anagram-letters {
        gap: 3px;
    }
    
    .hangman-word {
        font-size: 0.8em;
        letter-spacing: 2px;
    }
    
    .motus-cell {
        width: 26px;
        height: 26px;
        font-size: 0.8em;
    }

    .hints-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
    }

    .hint-badge {
        padding: 6px 8px;
        font-size: 0.6em;
    }

    .trophies-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .keyboard {
        grid-template-columns: repeat(6, 1fr);
        gap: 3px;
    }

    .key-btn {
        padding: 8px 3px;
        font-size: 0.85em;
    }

    .modal-content {
        padding: 25px 15px;
        margin: 10px;
        max-height: 90vh;
    }

    .login-container h1 {
        font-size: 2em;
    }

    .new-trophy-notification {
        padding: 12px 15px;
    }

    .add-friend-trigger {
        padding: 12px 14px;
    }

    .add-friend-icon {
        font-size: 1.1em;
    }

    .add-friend-text {
        font-size: 0.9em;
    }

    .add-friend-form {
        padding: 12px 14px;
        flex-direction: column;
        gap: 8px;
    }

    .add-friend-input {
        width: 100%;
        font-size: 0.85em;
        padding: 8px 10px;
    }

    .add-friend-btn {
        width: 100%;
        font-size: 0.85em;
        padding: 9px 14px;
    }

    .add-friend-cancel {
        width: 100%;
        padding: 9px 10px;
        font-size: 0.95em;
    }

    #cookieConsent {
        padding: 16px;
    }

    .cookie-text {
        font-size: 0.85em;
    }

    .cookie-btn {
        padding: 12px 20px;
        font-size: 0.9em;
    }
}

/* Mode paysage mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 15px;
    }

    .stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .word-display,
    .challenge-card,
    .trophies-section {
        padding: 20px;
    }

    .modal-content {
        max-height: 90vh;
    }
}

/* ============================================
   SYSTÈME DE PSEUDO DIFFÉRÉ (NOUVEAU)
   ============================================ */

/* Pop-up de création de pseudo */
.pseudo-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.pseudo-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pseudo-popup {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: 36px 32px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease-out;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pseudo-popup-overlay.active .pseudo-popup {
    transform: scale(1) translateY(0);
}

.pseudo-popup-emoji {
    font-size: 3.5rem;
    margin-bottom: 16px;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.pseudo-popup h3 {
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.pseudo-popup p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.pseudo-popup-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pseudo-popup-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(76, 158, 225, 0.15);
}

.pseudo-popup-input::placeholder {
    color: #aaa;
}

.pseudo-popup-btn-primary {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-bottom: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pseudo-popup-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 201, 80, 0.4);
}

.pseudo-popup-btn-secondary {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 10px 16px;
    transition: color 0.2s;
}

.pseudo-popup-btn-secondary:hover {
    color: var(--text-primary);
}

/* Encart de pseudo dans le message de succès */
.success-pseudo-cta {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.4);
}

.success-pseudo-cta-text {
    font-size: 0.9rem;
    color: white;
    text-align: left;
    line-height: 1.4;
}

.success-pseudo-cta-text strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.success-pseudo-cta-btn {
    background: white;
    color: var(--success);
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
}

.success-pseudo-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Footer du classement pour joueurs anonymes */
.leaderboard-footer-anonymous {
    padding: 18px 20px;
    background: linear-gradient(135deg, #fff8e1, #fffde7);
    border-top: 2px dashed #ffd700;
    margin-top: 15px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.leaderboard-footer-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-align: center;
}

.leaderboard-footer-form {
    display: flex;
    gap: 10px;
}

.leaderboard-pseudo-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.leaderboard-pseudo-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76, 158, 225, 0.15);
}

.leaderboard-pseudo-input::placeholder {
    color: #aaa;
}

.leaderboard-pseudo-btn {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.leaderboard-pseudo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(49, 201, 80, 0.4);
}

/* Responsive pour le système de pseudo */
@media (max-width: 600px) {
    .pseudo-popup {
        padding: 28px 24px;
        margin: 15px;
    }

    .pseudo-popup-emoji {
        font-size: 2.8rem;
    }

    .pseudo-popup h3 {
        font-size: 1.4rem;
    }

    .pseudo-popup p {
        font-size: 0.95rem;
    }

    .success-pseudo-cta {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .success-pseudo-cta-text {
        text-align: center;
    }

    .success-pseudo-cta-btn {
        width: 100%;
    }

    .leaderboard-footer-form {
        flex-direction: column;
        gap: 10px;
    }

    .leaderboard-pseudo-input {
        width: 100%;
    }

    .leaderboard-pseudo-btn {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .pseudo-popup {
        padding: 24px 20px;
    }

    .pseudo-popup-emoji {
        font-size: 2.5rem;
    }

    .pseudo-popup h3 {
        font-size: 1.2rem;
    }

    .pseudo-popup-input {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .pseudo-popup-btn-primary {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
}
