:root {
  --bg: #0B1220;
  --surface: #141C2C;
  --surface-raised: #1A2436;
  --border: #263349;
  --accent: #5DAEF5;
  --accent-text: #04283F;
  --text-primary: #F2F5F9;
  --text-secondary: #8A97AC;
  --text-muted: #5B6577;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --font: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
}

.view {
  display: none;
  flex: 1;
  flex-direction: column;
  animation: fadeIn 0.25s ease;
}

.view.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Boutons ---------- */
.btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 15px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface-raised);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

/* ---------- Landing ---------- */
.landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.landing-logo {
  width: 160px;
  height: auto;
}

.landing h1 {
  font-size: 22px;
  font-weight: bold;
  margin: 0;
}

.landing p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
  max-width: 280px;
  line-height: 1.5;
}

.landing-footer {
  width: 100%;
}

.event-tag {
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 12px;
}

/* ---------- Formulaire ---------- */
.form-header {
  margin-bottom: 20px;
}

.form-header h2 {
  font-size: 18px;
  margin: 0 0 6px;
}

.form-header p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.field input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-error {
  color: #E24B4A;
  font-size: 12px;
  min-height: 16px;
  margin-bottom: 8px;
}

.form-spacer {
  flex: 1;
}

/* ---------- Hub ---------- */
.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.hub-header h2 {
  font-size: 16px;
  margin: 0;
}

.hub-event {
  color: var(--text-muted);
  font-size: 11px;
  margin: 0 0 18px;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}

.category-card i {
  font-size: 20px;
  color: var(--accent);
}

.category-card .cat-title {
  font-size: 13px;
  font-weight: bold;
  margin: 0;
}

.category-card .cat-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Vue catégorie ---------- */
.category-back {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
}

.category-view-title {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 18px;
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px;
  cursor: pointer;
}

.doc-row .doc-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #1D3A5F;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-row .doc-icon i {
  font-size: 16px;
  color: var(--accent);
}

.doc-row .doc-title {
  font-size: 13px;
  font-weight: bold;
  margin: 0;
  flex: 1;
}

.doc-row .doc-chevron {
  color: var(--text-muted);
}

.empty-state {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 40px 0;
}

/* ---------- Modale PDF ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  width: 100%;
  max-width: 420px;
  background: #0F1728;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header p {
  margin: 0;
  font-size: 13px;
  font-weight: bold;
}

.modal-close {
  cursor: pointer;
  color: var(--text-secondary);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-family: var(--font);
  display: flex;
  align-items: center;
  gap: 4px;
}

.modal-frame-wrap {
  height: 60vh;
  max-height: 460px;
  background: var(--surface);
}

.modal-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-actions {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
}

.modal-actions .btn {
  flex: 1;
}

.modal-actions .btn-icon {
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Loader ---------- */
.loader {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 40px 0;
}
