/* ================================================================
   PHY GamiPress – Dashboard Utilisateur
   ================================================================ */

.phy-dashboard {
    --phy-primary:     #2D6A4F;
    --phy-accent:      #52B788;
    --phy-light:       #D8F3DC;
    --phy-text:        #1B1B1B;
    --phy-muted:       #6B7280;
    --phy-border:      #E5E7EB;
    --phy-radius:      0.75rem;
    --phy-shadow:      0 2px 12px rgba(0, 0, 0, 0.08);

    font-family: inherit;
    color: var(--phy-text);
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ----------------------------------------------------------------
   Stats
   ---------------------------------------------------------------- */

.phy-dashboard__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.phy-dashboard__stat {
    background: #fff;
    border: 1px solid var(--phy-border);
    border-radius: var(--phy-radius);
    padding: 1.25rem 1rem;
    box-shadow: var(--phy-shadow);
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.phy-dashboard__stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.phy-dashboard__stat--grade {
    border-top: 3px solid var(--phy-primary);
}

.phy-dashboard__stat--points {
    border-top: 3px solid var(--phy-accent);
}

.phy-dashboard__stat--places {
    border-top: 3px solid #74C69D;
}

.phy-dashboard__stat-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--phy-muted);
    margin-bottom: 0.4rem;
}

.phy-dashboard__stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--phy-primary);
    line-height: 1.2;
}

/* ----------------------------------------------------------------
   Barre de progression
   ---------------------------------------------------------------- */

.phy-dashboard__progress {
    background: #fff;
    border: 1px solid var(--phy-border);
    border-radius: var(--phy-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--phy-shadow);
}

.phy-dashboard__progress-max {
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--phy-primary);
    margin: 0;
}

.phy-dashboard__progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--phy-muted);
    margin-bottom: 0.5rem;
}

.phy-dashboard__progress-bar {
    height: 12px;
    background: var(--phy-light);
    border-radius: 999px;
    overflow: hidden;
}

.phy-dashboard__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--phy-primary) 0%, var(--phy-accent) 100%);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 4px;
}

.phy-dashboard__progress-detail {
    margin: 0.6rem 0 0;
    font-size: 0.8rem;
    color: var(--phy-muted);
    text-align: right;
}

/* ----------------------------------------------------------------
   Historique
   ---------------------------------------------------------------- */

.phy-dashboard__history {
    background: #fff;
    border: 1px solid var(--phy-border);
    border-radius: var(--phy-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--phy-shadow);
}

.phy-dashboard__history-title {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--phy-primary);
}

.phy-dashboard__history-empty {
    color: var(--phy-muted);
    font-style: italic;
    margin: 0;
}

.phy-dashboard__history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.phy-dashboard__history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: var(--phy-light);
    font-size: 0.875rem;
    gap: 0.75rem;
}

.phy-dashboard__history-place {
    font-weight: 500;
    color: var(--phy-text);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.phy-dashboard__history-date {
    font-size: 0.75rem;
    color: var(--phy-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ----------------------------------------------------------------
   Notice (non connecté)
   ---------------------------------------------------------------- */

.phy-dashboard__notice {
    background: var(--phy-light);
    border-left: 4px solid var(--phy-primary);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--phy-radius) var(--phy-radius) 0;
    color: var(--phy-primary);
    font-weight: 500;
}

/* ----------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------- */

@media (max-width: 480px) {
    .phy-dashboard__stats {
        grid-template-columns: 1fr;
    }

    .phy-dashboard__history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
}
