/*
 * GymCare Dakar — Compatibilité PowerGym
 * Intégration visuelle du plugin PowerGym dans le thème GymCare Dakar
 */

:root {
    --pg-accent:   #DEFB02;
    --pg-dark:     #111111;
    --pg-card-bg:  #161a22;
    --pg-muted:    #6b7280;
    --pg-green:    #22c55e;
    --pg-red:      #ef4444;
    --pg-purple:   #7c3aed;
}

/* ═══════════════════════════════════════════════════════════
   ESPACE MEMBRE — Wrapper général
═══════════════════════════════════════════════════════════ */
.pg-member-area {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 16px 60px;
    font-family: 'Bai Jamjuree', sans-serif;
}

/* ═══════════════════════════════════════════════════════════
   QR CODE — Carte membre
═══════════════════════════════════════════════════════════ */
.pg-qr-card {
    background: linear-gradient(135deg, #111 0%, #1a1a2e 100%);
    border: 2px solid var(--pg-accent);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.pg-qr-card::before {
    content: '⚡';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 80px;
    opacity: .05;
}
.pg-qr-card img {
    border: 4px solid var(--pg-accent) !important;
    border-radius: 14px !important;
    padding: 10px !important;
    background: #fff !important;
    max-width: 200px;
}
.pg-qr-card .pg-member-name {
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 16px 0 4px;
}
.pg-qr-card .pg-member-plan {
    color: var(--pg-accent);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.pg-qr-card .pg-download-btn {
    display: inline-block;
    background: var(--pg-accent);
    color: #111 !important;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 22px;
    border-radius: 8px;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity .15s;
}
.pg-qr-card .pg-download-btn:hover { opacity: .85; }

/* ═══════════════════════════════════════════════════════════
   STATS MEMBRE — Grille de KPIs
═══════════════════════════════════════════════════════════ */
.pg-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
@media (max-width: 600px) {
    .pg-stats-grid { grid-template-columns: 1fr 1fr; }
}

.pg-stat-card {
    background: #f9fafb;
    border-radius: 14px;
    padding: 18px 16px;
    text-align: center;
    border: 1px solid #f0f0f0;
    transition: box-shadow .2s, transform .2s;
}
.pg-stat-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    transform: translateY(-2px);
}
.pg-stat-value {
    font-size: 26px;
    font-weight: 900;
    color: #111;
    line-height: 1;
    margin-bottom: 4px;
}
.pg-stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--pg-muted);
}
.pg-stat-card.accent .pg-stat-value { color: var(--pg-accent); }
.pg-stat-card.green  .pg-stat-value { color: var(--pg-green); }
.pg-stat-card.purple .pg-stat-value { color: var(--pg-purple); }

/* ═══════════════════════════════════════════════════════════
   PORTEFEUILLE — Carte solde
═══════════════════════════════════════════════════════════ */
.pg-wallet-card {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border-radius: 16px;
    padding: 24px 20px;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.pg-wallet-card::after {
    content: '💳';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    opacity: .15;
}
.pg-wallet-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: .8;
    margin-bottom: 6px;
}
.pg-wallet-amount {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 4px;
}
.pg-wallet-sub {
    font-size: 12px;
    opacity: .7;
}

/* ═══════════════════════════════════════════════════════════
   ABONNEMENT — Badge statut
═══════════════════════════════════════════════════════════ */
.pg-sub-card {
    background: #f9fafb;
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
    border: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.pg-sub-info .pg-sub-plan {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin-bottom: 2px;
}
.pg-sub-info .pg-sub-dates {
    font-size: 12px;
    color: var(--pg-muted);
}
.pg-badge-active {
    background: #dcfce7;
    color: #16a34a;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #bbf7d0;
    white-space: nowrap;
}
.pg-badge-expired {
    background: #fee2e2;
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #fecaca;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   TRANSACTIONS — Liste
═══════════════════════════════════════════════════════════ */
.pg-tx-list { display: flex; flex-direction: column; gap: 8px; }
.pg-tx-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fafb;
    border-radius: 10px;
    padding: 12px 16px;
    border: 1px solid #f0f0f0;
}
.pg-tx-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.pg-tx-icon.topup   { background: #dcfce7; }
.pg-tx-icon.payment { background: #fee2e2; }
.pg-tx-desc {
    flex: 1;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}
.pg-tx-date {
    font-size: 11px;
    color: var(--pg-muted);
}
.pg-tx-amount {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}
.pg-tx-amount.credit { color: var(--pg-green); }
.pg-tx-amount.debit  { color: var(--pg-red); }

/* ═══════════════════════════════════════════════════════════
   FIDÉLITÉ — Barre de progression
═══════════════════════════════════════════════════════════ */
.pg-loyalty-bar-wrap {
    background: #f3f4f6;
    border-radius: 10px;
    overflow: hidden;
    height: 10px;
    margin: 10px 0 6px;
}
.pg-loyalty-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pg-accent) 0%, #c8e000 100%);
    border-radius: 10px;
    transition: width .8s ease;
}

/* ═══════════════════════════════════════════════════════════
   SECTION TITRE dans l'espace membre
═══════════════════════════════════════════════════════════ */
.pg-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #111;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #DEFB02;
    display: inline-block;
}

/* ═══════════════════════════════════════════════════════════
   ONGLETS de navigation dans l'espace membre
═══════════════════════════════════════════════════════════ */
.pg-tabs-nav {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.pg-tab-link {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--pg-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.pg-tab-link:hover { color: #111; }
.pg-tab-link.active {
    color: #111;
    border-bottom-color: var(--pg-accent);
}

/* ═══════════════════════════════════════════════════════════
   SHORTCODE [pg_qrcode] — override styles dans le thème
═══════════════════════════════════════════════════════════ */
.pg-member-area [style*="text-align:center"] img[alt="Mon QR Code"],
.entry-content img[alt="Mon QR Code"] {
    border: 4px solid var(--pg-accent) !important;
    border-radius: 14px !important;
    padding: 10px !important;
    background: #fff !important;
}
