/* ============================================================
   GAMESETMOI / game-widget.css
   Widget flottant XP — bas-droit, au-dessus de Moa.
   Fichier : public_html/game/styles/game-widget.css
   ============================================================ */

.game-widget {
    position: fixed;
    bottom: 80px;           /* au-dessus de Moa */
    right: 16px;
    width: 180px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    padding: 10px 12px;
    z-index: 9000;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.game-widget.hidden {
    display: none;
}

/* Barre de progression */
.gw-bar-bg {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.gw-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1565c0, #42a5f5);
    border-radius: 4px;
    transition: width 0.6s ease-out;
}

/* Infos texte */
.gw-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
}

.gw-level {
    font-weight: 600;
    color: #1a237e;
}

.gw-xp {
    color: #5c6bc0;
    font-weight: 500;
}

/* Toast "+XP" */
.gw-toast {
    position: absolute;
    top: -32px;
    right: 0;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 700;
    white-space: nowrap;
    animation: gw-pop 0.3s ease-out;
    transition: opacity 0.3s ease;
}

.gw-toast.hidden {
    opacity: 0;
    pointer-events: none;
}

.gw-toast-ok {
    background: #c8e6c9;
    color: #2e7d32;
}

.gw-toast-try {
    background: #fff3e0;
    color: #e65100;
}

@keyframes gw-pop {
    0%   { transform: translateY(10px) scale(0.8); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Responsive : plus petit sur mobile */
@media (max-width: 480px) {
    .game-widget {
        width: 150px;
        bottom: 70px;
        right: 10px;
        padding: 8px 10px;
    }
    .gw-info { font-size: 0.72em; }
    .gw-toast { font-size: 0.78em; }
}
