/* ─── RCVibe Admin — Dark Theme ─────────────────────────────────────────── */

:root {
    --bg:        #0f1117;
    --surface:   #181c27;
    --surface2:  #1e2333;
    --border:    #252a3a;
    --accent:    #8B6F47;
    --accent-h:  #a0845c;
    --accent-s:  rgba(139,111,71,.15);
    --text:      #e2e8f0;
    --text-2:    #94a3b8;
    --text-3:    #64748b;
    --green:     #22c55e;
    --red:       #ef4444;
    --yellow:    #f59e0b;
    --blue:      #3b82f6;
    --sidebar-w: 240px;
    --radius:    10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.layout { display: flex; height: 100vh; overflow: hidden; }

.main {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ─── SIDEBAR ────────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border);
}

.logo-icon { font-size: 20px; }
.logo-text  { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; color: var(--text); }
.logo-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    background: var(--accent-s);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 1px 6px;
    margin-left: auto;
}

.sidebar-nav { flex: 1; padding: 12px 12px; display: flex; flex-direction: column; gap: 2px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-2);
    text-decoration: none;
    font-weight: 500;
    transition: background .15s, color .15s;
    position: relative;
}
.nav-item svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--accent-s); color: var(--accent); }
.nav-item.active svg { stroke: var(--accent); }

.badge-count {
    margin-left: auto;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.admin-avatar {
    width: 32px; height: 32px;
    background: var(--accent-s);
    border: 1px solid var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px; color: var(--accent); flex-shrink: 0;
}
.admin-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-role { font-size: 11px; color: var(--text-3); }

.logout-btn {
    color: var(--text-3);
    display: flex; align-items: center;
    text-decoration: none;
    padding: 6px;
    border-radius: 6px;
    transition: color .15s, background .15s;
    flex-shrink: 0;
}
.logout-btn:hover { color: var(--red); background: rgba(239,68,68,.1); }
.logout-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ─── PAGE HEADER ────────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.page-title { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 700; }
.page-subtitle { font-size: 13px; color: var(--text-2); margin-top: 2px; }

/* ─── FLASH ──────────────────────────────────────────────────────────────── */
.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 13px;
    border: 1px solid;
}
.flash button { background: none; border: none; cursor: pointer; font-size: 14px; color: inherit; opacity: .7; }
.flash-success { background: rgba(34,197,94,.1);  color: var(--green);  border-color: rgba(34,197,94,.3); }
.flash-error   { background: rgba(239,68,68,.1);  color: var(--red);    border-color: rgba(239,68,68,.3); }
.flash-warning { background: rgba(245,158,11,.1); color: var(--yellow); border-color: rgba(245,158,11,.3); }

/* ─── STATS GRID ─────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700; margin: 4px 0 2px; }
.stat-sub   { font-size: 12px; color: var(--text-3); }
.stat-card.accent { border-color: var(--accent); background: var(--accent-s); }
.stat-card.accent .stat-value { color: var(--accent); }
.stat-card.red { border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.07); }
.stat-card.red .stat-value { color: var(--red); }

/* ─── CARD ───────────────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.card-title { font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 600; }
.card-body  { padding: 20px; }

/* ─── TABLE ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
    text-align: left;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-3);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }

/* ─── BADGES ─────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid;
}
.badge-active     { color: var(--green);  background: rgba(34,197,94,.1);  border-color: rgba(34,197,94,.3); }
.badge-suspended  { color: var(--yellow); background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); }
.badge-banned     { color: var(--red);    background: rgba(239,68,68,.1);  border-color: rgba(239,68,68,.3); }
.badge-pending    { color: var(--yellow); background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); }
.badge-approved   { color: var(--green);  background: rgba(34,197,94,.1);  border-color: rgba(34,197,94,.3); }
.badge-rejected   { color: var(--red);    background: rgba(239,68,68,.1);  border-color: rgba(239,68,68,.3); }
.badge-hidden     { color: var(--text-3); background: rgba(100,116,139,.1); border-color: rgba(100,116,139,.3); }
.badge-admin      { color: var(--accent); background: var(--accent-s); border-color: var(--accent); }
.badge-member     { color: var(--blue);   background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.3); }
.badge-club, .badge-organizer, .badge-brand { color: var(--text-2); background: var(--surface2); border-color: var(--border); }

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: opacity .15s, filter .15s;
    white-space: nowrap;
}
.btn:hover { filter: brightness(1.1); }
.btn-primary   { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-secondary { background: var(--surface2); color: var(--text); border-color: var(--border); }
.btn-danger    { background: rgba(239,68,68,.15); color: var(--red); border-color: rgba(239,68,68,.4); }
.btn-success   { background: rgba(34,197,94,.15); color: var(--green); border-color: rgba(34,197,94,.4); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ─── FORMS ──────────────────────────────────────────────────────────────── */
.form-grid { display: grid; gap: 16px; }
.form-row  { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 12px; font-weight: 500; color: var(--text-2); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    padding: 9px 12px;
    width: 100%;
    transition: border-color .15s;
    outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
select option { background: var(--surface2); }

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.filter-bar input,
.filter-bar select { width: auto; min-width: 140px; }

/* ─── AVATAR ─────────────────────────────────────────────────────────────── */
.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--surface2);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px; color: var(--text-3);
    flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }

.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell-info .name  { font-weight: 500; font-size: 13px; }
.user-cell-info .email { font-size: 11px; color: var(--text-3); }

/* ─── TRUNCATE ───────────────────────────────────────────────────────────── */
.truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── PAGINATION ─────────────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding-top: 16px; }
.page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text-2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.page-btn:hover { background: var(--surface); color: var(--text); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-ellipsis { color: var(--text-3); padding: 0 4px; }

/* ─── LOGIN PAGE ─────────────────────────────────────────────────────────── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
}
.login-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}
.login-logo span { color: var(--accent); }
.login-sub  { text-align: center; font-size: 13px; color: var(--text-3); margin-bottom: 32px; }
.login-card .form-group { margin-bottom: 16px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 8px; padding: 11px; }

/* ─── SECTION TITLE ──────────────────────────────────────────────────────── */
.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: .08em;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

/* ─── DETAIL GRID ────────────────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-item label { color: var(--text-3); font-size: 11px; }
.detail-item .val  { font-size: 14px; font-weight: 500; margin-top: 2px; }

/* ─── PROGRESS BAR (upload) ──────────────────────────────────────────────── */
.upload-progress { display: none; }
.upload-progress.active { display: block; }
.progress-bar-wrap {
    background: var(--border);
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
    margin-top: 8px;
}
.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    width: 0%;
    transition: width .2s;
}
.progress-label { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ─── UTILS ──────────────────────────────────────────────────────────────── */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--text-3); }
.text-danger { color: var(--red); }
.text-success { color: var(--green); }
.text-accent  { color: var(--accent); }
.font-mono { font-family: 'Courier New', monospace; font-size: 12px; }
/* ─── Ajout Lot 2 — à ajouter à la fin de admin.css ─────────────────────── */

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 14px 12px 4px;
}
