:root {
  --bleu: #004682;
  --or: #D4AF37;
  --noir: #141414;
  --vert: #006400;
  --rouge: #B41E1E;
  --gris: #f5f5f5;
  --gris-border: #ddd;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--noir); background: var(--gris); }
#app { max-width: 500px; margin: 0 auto; min-height: 100vh; background: white; }

/* Header */
.header { background: var(--bleu); color: white; padding: 10px; text-align: center; position: sticky; top: 0; z-index: 100; }
.header img.logo { max-height: 40px; max-width: 160px; vertical-align: middle; }
.header h1 { font-size: 20px; display: inline; vertical-align: middle; }
.header .subtitle { font-size: 12px; opacity: 0.8; }

/* Nav bottom */
.nav-bottom { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 500px; background: white; border-top: 1px solid var(--gris-border); display: flex; justify-content: space-around; padding: 8px 0; z-index: 100; }
.nav-bottom a { text-decoration: none; color: var(--noir); font-size: 11px; text-align: center; flex: 1; }
.nav-bottom a.active { color: var(--bleu); font-weight: bold; }
.nav-bottom .icon { font-size: 20px; display: block; margin-bottom: 2px; }

/* Buttons */
.btn { display: block; width: 100%; padding: 14px; border: none; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; text-align: center; }
.btn-primary { background: var(--bleu); color: white; }
.btn-gold { background: var(--or); color: var(--noir); }
.btn-outline { background: transparent; border: 2px solid var(--bleu); color: var(--bleu); }
.btn-danger { background: var(--rouge); color: white; }
.btn-success { background: var(--vert); color: white; }

/* Forms */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px; border: 1px solid var(--gris-border); border-radius: 8px; font-size: 15px;
}
.form-container { padding: 20px; }

/* Global form elements */
label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 5px; margin-top: 10px; }
input, select, textarea {
  width: 100%; padding: 10px; border: 1px solid var(--gris-border); border-radius: 8px; font-size: 14px; box-sizing: border-box; font-family: inherit;
}
textarea { resize: vertical; min-height: 60px; }

/* Cards */
.card { background: white; border-radius: 12px; padding: 15px; margin: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.card-partner { display: flex; gap: 12px; align-items: center; }
.card-partner .badge { background: var(--or); color: var(--noir); padding: 3px 8px; border-radius: 12px; font-size: 12px; font-weight: bold; }

/* QR Code */
.qr-container { text-align: center; padding: 20px; }
.qr-container img { max-width: 250px; border-radius: 12px; border: 3px solid var(--bleu); }
.qr-container .member-name { font-size: 20px; font-weight: bold; margin-top: 10px; }
.qr-container .member-status { color: var(--vert); font-size: 14px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 15px; }
.stat-card { background: var(--bleu); color: white; padding: 15px; border-radius: 12px; text-align: center; }
.stat-card .number { font-size: 28px; font-weight: bold; }
.stat-card .label { font-size: 12px; opacity: 0.9; }

/* Cashback */
.cashback-balance { background: var(--vert); color: white; padding: 20px; border-radius: 12px; margin: 10px; text-align: center; }
.cashback-balance .amount { font-size: 32px; font-weight: bold; }

/* List */
.list-item { padding: 12px 15px; border-bottom: 1px solid var(--gris-border); display: flex; justify-content: space-between; align-items: center; }
.list-item:last-child { border-bottom: none; }

/* SOS */
.sos-btn { background: var(--rouge); color: white; font-size: 20px; font-weight: bold; padding: 20px; border-radius: 50%; width: 100px; height: 100px; border: none; cursor: pointer; margin: 20px auto; display: flex; align-items: center; justify-content: center; }

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid var(--gris-border); }
.tab { flex: 1; padding: 12px; text-align: center; cursor: pointer; font-size: 14px; }
.tab.active { border-bottom: 3px solid var(--bleu); color: var(--bleu); font-weight: bold; }

/* Badge */
.badge-status { padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: bold; }
.badge-valide { background: #d4edda; color: #155724; }
.badge-attente { background: #fff3cd; color: #856404; }
.badge-suspendu { background: #f8d7da; color: #721c24; }

/* Utils */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.pb-60 { padding-bottom: 60px; }
.error { color: var(--rouge); font-size: 14px; margin-top: 5px; }
.success { color: var(--vert); font-size: 14px; margin-top: 5px; }
.hidden { display: none; }
