:root {
    --admin-bg: #f1f5f9;
    --admin-panel: #ffffff;
    --admin-primary: #1e40af;
    --admin-primary-dark: #1e3a8a;
    --admin-accent: #2563eb;
    --admin-text: #1e293b;
    --admin-text-muted: #64748b;
    --admin-border: #e2e8f0;
    --admin-danger: #b91c1c;
    --admin-warning: #b45309;
    --admin-success: #15803d;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--admin-bg);
    color: var(--admin-text);
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: var(--admin-primary-dark);
    color: #fff;
    padding: 14px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.admin-header .brand {
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-header .brand i {
    color: #93c5fd;
}

.admin-main {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 25px auto;
    padding: 0 15px;
}

.page {
    display: none;
}
.page.active {
    display: block;
}

.panel {
    background: var(--admin-panel);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.login-box {
    max-width: 380px;
    margin: 60px auto;
    text-align: center;
}

.login-box h1 {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--admin-primary-dark);
}

.login-box p {
    font-size: 13px;
    color: var(--admin-text-muted);
    margin-bottom: 20px;
}

.form-group {
    text-align: left;
    margin-bottom: 14px;
}

label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--admin-text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--admin-border);
    border-radius: 6px;
    font-size: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--admin-primary);
    color: #fff;
    width: 100%;
}
.btn-primary:hover {
    background: var(--admin-primary-dark);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
}
.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-danger {
    background: var(--admin-danger);
    color: #fff;
}

.btn-logout {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    font-size: 12px;
    padding: 6px 12px;
}
.btn-logout:hover {
    background: rgba(255,255,255,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--admin-panel);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.stat-card .label {
    font-size: 12px;
    color: var(--admin-text-muted);
    font-weight: 600;
}

.stat-card .value {
    font-size: 24px;
    font-weight: 700;
    color: var(--admin-primary);
    margin-top: 6px;
}

.member-card {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fff;
}

.member-card img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--admin-border);
}

.member-card .infos {
    flex: 1;
    min-width: 200px;
    font-size: 13px;
}

.member-card .infos .nom {
    font-weight: 700;
    color: var(--admin-text);
    margin-bottom: 3px;
}

.member-card .infos .detail {
    color: var(--admin-text-muted);
    font-size: 12px;
    margin-bottom: 2px;
}

.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}
.badge-valide { background: #dcfce7; color: var(--admin-success); }
.badge-en_attente { background: #fef3c7; color: var(--admin-warning); }

.message {
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}
.message-error { color: var(--admin-danger); }
.message-success { color: var(--admin-success); }
.message-warning { color: var(--admin-warning); }

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 15px;
}
.modal-overlay.open { display: flex; }

.modal-content {
    background: #fff;
    border-radius: 10px;
    padding: 22px;
    max-width: 420px;
    width: 100%;
}

.modal-content.wide {
    max-width: 700px;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--admin-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
}
.lightbox .close-btn {
    position: absolute;
    top: 20px; right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .admin-header { padding: 12px 15px; }
    .login-box { margin: 30px auto; }
}
