:root {
  --bg: #0d0d0d;
  --surface: #1a1a1a;
  --surface2: #242424;
  --border: #2e2e2e;
  --gold: #f0a500;
  --gold-dim: #c88800;
  --text: #f0f0f0;
  --text-muted: #888;
  --danger: #e05252;
  --success: #4caf7d;
  --radius: 12px;
  --radius-sm: 8px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-dim); }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.page-wrap { padding: 40px 0; }

/* Nav */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--text); }
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a {
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); }
.nav-links a.active { color: var(--gold); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn:hover { opacity: .88; }
.btn-primary { background: var(--gold); color: #000; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-full { width: 100%; justify-content: center; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card-title { font-size: 1.1rem; font-weight: 600; }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.form-control {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color .2s;
}
.form-control:focus { border-color: var(--gold); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.alert-error { background: rgba(224,82,82,.15); border: 1px solid rgba(224,82,82,.3); color: #f08080; }
.alert-success { background: rgba(76,175,125,.15); border: 1px solid rgba(76,175,125,.3); color: #7dd4a8; }
.alert-info { background: rgba(240,165,0,.1); border: 1px solid rgba(240,165,0,.2); color: var(--gold); }

/* Badge */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-gold { background: rgba(240,165,0,.15); color: var(--gold); }
.badge-green { background: rgba(76,175,125,.15); color: var(--success); }
.badge-red { background: rgba(224,82,82,.15); color: var(--danger); }
.badge-gray { background: var(--surface2); color: var(--text-muted); }

/* Progress bar */
.progress-wrap { background: var(--surface2); border-radius: 99px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--gold); border-radius: 99px; transition: width .3s; }
.progress-bar.danger { background: var(--danger); }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-value { font-size: 2rem; font-weight: 700; color: var(--gold); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; padding: 10px 14px; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border); }
td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* Photo grid */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.photo-item { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface2); cursor: pointer; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photo-item:hover img { transform: scale(1.05); }
.photo-item .photo-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  opacity: 0; transition: opacity .2s;
}
.photo-item:hover .photo-overlay { opacity: 1; }
.photo-checkbox { position: absolute; top: 8px; left: 8px; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--gold);
  background: rgba(240,165,0,.05);
}
.upload-zone .icon { font-size: 3rem; margin-bottom: 12px; }
.upload-zone h3 { font-size: 1.1rem; margin-bottom: 8px; }
.upload-zone p { color: var(--text-muted); font-size: 0.9rem; }
#fileInput { display: none; }

/* Upload list */
.upload-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.upload-item {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.upload-item .name { flex: 1; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-item .size { font-size: 0.8rem; color: var(--text-muted); }
.upload-item .status { font-size: 0.8rem; min-width: 80px; text-align: right; }
.upload-item .bar-wrap { flex: 1; height: 4px; background: var(--border); border-radius: 99px; overflow: hidden; }
.upload-item .bar { height: 100%; background: var(--gold); border-radius: 99px; transition: width .2s; }

/* QR code */
.qr-wrap { background: #fff; border-radius: var(--radius); padding: 20px; display: inline-block; }

/* Token box */
.token-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: monospace;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.token-box span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 520px;
  width: 100%;
}
.modal-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; }

/* Lightbox */
#lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.95);
  display: flex; align-items: center; justify-content: center;
  z-index: 300;
}
#lightbox.hidden { display: none; }
#lightbox img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius-sm); }
#lightbox-close { position: fixed; top: 20px; right: 20px; font-size: 2rem; cursor: pointer; color: var(--text-muted); }

/* Hero */
.hero {
  padding: 100px 20px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(240,165,0,.12) 0%, transparent 60%);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; margin-bottom: 20px; }
.hero h1 span { color: var(--gold); }
.hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 560px; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 48px; }
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  position: relative;
  transition: border-color .2s;
}
.pricing-card:hover, .pricing-card.featured { border-color: var(--gold); }
.pricing-card.featured::before {
  content: 'Populaire';
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 20px;
}
.pricing-duration { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.pricing-price { font-size: 2.5rem; font-weight: 800; color: var(--gold); margin: 12px 0; }
.pricing-price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.pricing-features { list-style: none; font-size: 0.88rem; color: var(--text-muted); margin: 16px 0 24px; display: flex; flex-direction: column; gap: 6px; }
.pricing-features li::before { content: '✓ '; color: var(--gold); }

/* Responsive */
@media (max-width: 640px) {
  .card { padding: 18px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
  nav .nav-links a span { display: none; }
}

/* Helpers */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 24px; }
.text-muted { color: var(--text-muted); font-size: 0.88rem; }
.text-center { text-align: center; }
.font-mono { font-family: monospace; }
.hidden { display: none !important; }
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
