:root{
  --bg: #0b1220;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --brand: #111827; /* neutre, proche de votre style "sobre" */
  --brand-2: #1f2937;
  --focus: 0 0 0 3px rgba(17, 24, 39, 0.18);
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f6f7fb 100%);
}

.container{ max-width: 1120px; margin: 0 auto; padding: 0 18px; }
.muted{ color: var(--muted); }
.small{ font-size: 12px; }
.code{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95em; }

/* Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}
.header-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  text-decoration:none;
  color: inherit;
}
.brand-mark{
  width: 36px;
  height: 36px;
  display:grid;
  place-items:center;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}
.brand-text{ display:flex; flex-direction:column; line-height: 1.1; }
.brand-title{ font-weight: 700; }
.brand-sub{ font-size: 12px; color: var(--muted); }

.nav{ display:flex; gap: 14px; flex-wrap: wrap; }
.nav-link{
  font-size: 14px;
  text-decoration:none;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
}
.nav-link:hover{ background: rgba(226, 232, 240, 0.65); color: var(--text); }

/* Hero */
.hero{
  padding: 44px 0 22px;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
}

h1{ margin: 0 0 10px; font-size: 40px; letter-spacing: -0.02em; }
.lead{ margin: 0 0 16px; font-size: 16px; color: var(--muted); max-width: 62ch; }

.feature-row{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 980px){
  .feature-row{ grid-template-columns: 1fr; }
}
.feature{
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}
.feature-title{ font-weight: 650; margin-bottom: 4px; }

/* Cards */
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card-header{ display:flex; justify-content:space-between; align-items:flex-start; gap: 12px; }
.card-title{ font-weight: 700; font-size: 16px; }

.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.75);
  color: #334155;
  font-size: 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
}

/* Upload */
.upload-card{ align-self: start; }
.upload-form{ display:flex; flex-direction:column; gap: 12px; margin-top: 14px; }

.file{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.9);
  border-radius: var(--radius-sm);
  background: rgba(248, 250, 252, 0.85);
  cursor: pointer;
}
.file:focus-within{ outline: none; box-shadow: var(--focus); border-color: rgba(17, 24, 39, 0.5); }
.file input{ width: 1px; height: 1px; opacity: 0; position:absolute; }
.file-label{ display:flex; flex-direction:column; }
.file-title{ font-weight: 650; }
.file-sub{ font-size: 12px; color: var(--muted); }

/* Buttons */
.btn{
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.25);
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
}
.btn:hover{ border-color: rgba(15, 23, 42, 0.45); }
.btn:focus{ outline:none; box-shadow: var(--focus); }
.btn-primary{ background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover{ background: var(--brand-2); border-color: var(--brand-2); }
.btn-ghost{ background:#fff; }

/* Alerts */
.alert{ border-radius: 14px; padding: 12px 12px; border: 1px solid; }
.alert-error{ background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.alert-info{ background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }

/* Steps */
.steps{ display:flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.step{ display:flex; align-items:center; gap: 8px; color: var(--muted); font-size: 13px; }
.step-n{
  width: 22px; height: 22px;
  display:grid; place-items:center;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
  color: var(--text);
  font-weight: 700;
}

/* Sections */
.section{ padding: 18px 0 38px; }
.grid-2{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 980px){
  .grid-2{ grid-template-columns: 1fr; }
}

/* View page */
.page-head{
  display:flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.kicker{ text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--muted); }
.h2{ margin: 6px 0 8px; font-size: 26px; }
.actions{ display:flex; gap: 10px; flex-wrap: wrap; }

.viewer-grid{ display:grid; grid-template-columns: 1.6fr 0.9fr; gap: 12px; }
@media (max-width: 980px){
  .viewer-grid{ grid-template-columns: 1fr; }
}
.viewer{ padding: 0; overflow:hidden; }
.viewer iframe{ width:100%; height: 75vh; border: 0; }

/* QR paiement (EPC/SEPA) */
.qr-pay{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 160px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 12px 30px rgba(15,23,42,0.12);
  z-index: 60;
}
.qr-title{ font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; }
.qr-pay img{ width: 100%; height: auto; display: block; border-radius: 10px; }
.qr-sub{ margin-top: 8px; text-align:center; }
@media (max-width: 640px){
  .qr-pay{ width: 140px; right: 12px; bottom: 12px; }
}

.stack{ display:flex; flex-direction:column; gap: 12px; }
.kv{ margin-top: 10px; display:flex; flex-direction:column; gap: 8px; }
.kv-row{ display:flex; gap: 10px; justify-content:space-between; align-items: baseline; }
.kv-k{ color: var(--muted); font-size: 13px; }
.kv-v{ text-align:right; font-size: 13px; max-width: 58%; overflow-wrap:anywhere; }

/* Footer */
.site-footer{ border-top: 1px solid rgba(226, 232, 240, 0.9); background: rgba(255,255,255,0.75); }
.footer-row{ display:flex; justify-content:space-between; gap: 16px; flex-wrap:wrap; padding: 18px 0; }
.footer-title{ font-weight: 700; margin-bottom: 6px; }
