/* ============================================================
   public/css/admin.css
   Styles dédiés au widget et à la modale Administration.
   Suppression activité globale, ajout contrib + widgets
   ============================================================ */

/* ===================== WIDGET ============================= */
.wa-stats-row { display: flex; gap: 6px; margin-bottom: 12px; }
.wa-stat {
    flex: 1; border-radius: 10px; padding: 8px 6px;
    text-align: center; display: flex; flex-direction: column; gap: 2px;
}
.wa-stat-blue   { background: #dbeafe; }
.wa-stat-purple { background: #ede9fe; }
.wa-stat-green  { background: #d1fae5; }
.wa-stat-orange { background: #fef3c7; }
.wa-stat-val { font-size: 20px; font-weight: 800; color: #1f2937; }
.wa-stat-lbl { font-size: 10px; font-weight: 600; color: #6b7280; text-transform: uppercase; }

.wa-activity-title {
    font-size: 11px; font-weight: 700; color: #9ca3af;
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
}
.wa-activity-row {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 0; border-bottom: 1px solid #f3f4f6;
}
.wa-activity-row:last-child { border-bottom: none; }

.wa-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wa-avatar-admin { background: #ede9fe; color: #7c3aed; }
.wa-avatar-user  { background: #dbeafe; color: #2563eb; }

.wa-username {
    flex: 1; font-size: 12px; font-weight: 600; color: #1f2937;
    min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wa-badge { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 8px; flex-shrink: 0; }
.badge-admin { background: #ede9fe; color: #7c3aed; }
.badge-user  { background: #dbeafe; color: #2563eb; }
.wa-date  { font-size: 11px; color: #9ca3af; flex-shrink: 0; }
.wa-error { color: #ef4444; font-size: 13px; text-align: center; }

/* ===================== MODALE — ONGLETS =================== */
.admin-tabs { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 2px solid #f3f4f6; }
.admin-tab {
    flex: 1; padding: 10px; border: none; background: none;
    font-size: 13px; font-weight: 600; color: #9ca3af;
    cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.admin-tab.active { color: #7c3aed; border-bottom-color: #7c3aed; }
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

/* ===================== MODALE — STATS ===================== */
.as-section-title {
    font-size: 11px; font-weight: 700; color: #9ca3af;
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px;
}

/* Cartes chiffres */
.as-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.as-card {
    border-radius: 12px; padding: 12px;
    display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.as-card-blue   { background: #dbeafe; }
.as-card-purple { background: #ede9fe; }
.as-card-green  { background: #d1fae5; }
.as-card-red    { background: #fee2e2; }
.as-card-icon { font-size: 20px; }
.as-card-val  { font-size: 22px; font-weight: 800; color: #1f2937; }
.as-card-lbl  { font-size: 11px; font-weight: 600; color: #6b7280; }

/* Barre profils remplis */
.as-progress-bloc { margin-bottom: 14px; }
.as-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.as-progress-label { font-size: 13px; font-weight: 600; color: #374151; }
.as-progress-pct   { font-size: 12px; color: #6b7280; }
.as-progress-bar   { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.as-progress-fill  { height: 100%; border-radius: 4px; transition: width .4s; }
.as-fill-blue { background: linear-gradient(90deg, #3b82f6, #7c3aed); }

/* Top contributeurs */
.as-contrib-list { display: flex; flex-direction: column; gap: 8px; }
.as-contrib-row {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
}
.as-contrib-medal  { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.as-contrib-info   { flex: 1; min-width: 0; }
.as-contrib-name   {
    font-size: 13px; font-weight: 700; color: #1e1b4b;
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.as-contrib-detail { font-size: 11px; color: #9ca3af; margin-top: 2px; }
.as-contrib-score  { font-size: 13px; font-weight: 800; color: #4f46e5; white-space: nowrap; flex-shrink: 0; }

/* Widgets populaires */
.as-widgets-list { display: flex; flex-direction: column; gap: 8px; }
.as-widget-row   { display: flex; align-items: center; gap: 10px; }
.as-widget-label {
    font-size: 13px; color: #374151;
    width: 160px; flex-shrink: 0;
}
.as-widget-bar-wrap { flex: 1; background: #f3f4f6; border-radius: 99px; height: 8px; overflow: hidden; }
.as-widget-bar-fill { height: 100%; border-radius: 99px; transition: width .4s ease; }
.as-widget-count    { font-size: 12px; font-weight: 700; color: #6b7280; width: 40px; text-align: right; flex-shrink: 0; }

/* Dernière activité */
.as-logins-list { display: flex; flex-direction: column; gap: 8px; }
.as-login-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; background: #f8fafc; border-radius: 10px;
}
.as-login-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    font-size: 14px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.as-av-admin { background: #ede9fe; color: #7c3aed; }
.as-av-user  { background: #dbeafe; color: #2563eb; }
.as-login-info     { flex: 1; min-width: 0; }
.as-login-name     { font-size: 13px; font-weight: 700; color: #1f2937; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.as-login-date     { font-size: 11px; color: #9ca3af; margin-top: 2px; }
.as-login-relative { font-size: 11px; flex-shrink: 0; }
.as-badge       { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 8px; }
.as-badge-admin { background: #ede9fe; color: #7c3aed; }
.as-badge-user  { background: #dbeafe; color: #2563eb; }

/* ===================== MODALE — USERS ===================== */
.user-card { background: #f8fafc; border-radius: 14px; padding: 16px; border: 1.5px solid #e5e7eb; }

.ua-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 12px; border: none; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s;
}
.ua-btn-blue      { background: #4f46e5; color: #fff; }
.ua-btn-blue:hover { background: #4338ca; }
.ua-btn-red       { background: #ef4444; color: #fff; }
.ua-btn-red:hover  { background: #dc2626; }

.au-btn {
    width: 30px; height: 30px; border: none; border-radius: 8px;
    cursor: pointer; font-size: 14px;
    display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.au-btn-role       { background: #ede9fe; color: #7c3aed; }
.au-btn-role:hover { background: #ddd6fe; }
.au-btn-key        { background: #fef3c7; color: #d97706; }
.au-btn-key:hover  { background: #fde68a; }
.au-btn-edit       { background: #dbeafe; color: #2563eb; }
.au-btn-edit:hover { background: #bfdbfe; }
.au-btn-del        { background: #fee2e2; color: #ef4444; }
.au-btn-del:hover  { background: #fecaca; }
