/* styles.css — Ethereum Community Rewards, static design, modern browser, mobile-first polish */

:root {
  --bg: #0B0C0E;
  --surface: #131519;
  --surface-2: #1A1D22;
  --text: #E8E6E1;
  --text-2: #9CA0A8;
  --accent: #D4AF37;
  --accent-ink: #0B0C0E;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --radius: 8px;
  --font: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --container: 1140px;
  --gutter: 24px;
}

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

html { scroll-behavior: smooth; color-scheme: dark; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: rgba(212, 175, 55, 0.35); color: var(--text); }

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; }

.hidden { display: none !important; }

a { color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.brand-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; }

.brand-edition {
  font-size: 11px;
  color: var(--text-2);
  border-left: 1px solid var(--border);
  padding-left: 10px;
  margin-left: 2px;
  white-space: nowrap;
}

.site-nav { display: flex; gap: 4px; }

.site-nav a {
  color: var(--text-2);
  font-size: 14px;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 150ms ease;
}

@media (hover: hover) {
  .site-nav a:hover { color: var(--text); }
}

/* ---------- Boutons ---------- */

.btn {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 12px 18px;
  min-height: 44px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.btn-accent { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) {
  .btn-accent:hover { background: #C9A227; }
}
.btn-accent:active { background: #B99621; }
.btn-accent:disabled { background: #3A362B; color: #8A8472; cursor: not-allowed; }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
@media (hover: hover) {
  .btn-ghost:hover { border-color: var(--border-strong); }
}
.btn-ghost:active { border-color: var(--border-strong); }

.btn-block { width: 100%; }

/* ---------- Hero ---------- */

.hero { padding: 64px 0 56px; }

.hero-grid { align-items: start; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.badge {
  display: inline-flex;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  margin-top: 16px;
}

.hero-copy h1 {
  font-size: 40px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 14px 0 16px;
}

.hero-sub { color: var(--text-2); max-width: 560px; }

.hero-countdown { margin-top: 24px; font-size: 14px; color: var(--text-2); }
.hero-countdown .num { color: var(--text); font-weight: 600; }

/* ---------- Module de réclamation ---------- */

.claim-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.claim-title { font-size: 18px; font-weight: 600; }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  letter-spacing: 0.04em;
}

.status-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.claim-note { font-size: 13px; color: var(--text-2); margin: 6px 0 16px; }

.wallet-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 12px;
}

.wallet-address { color: var(--text-2); font-family: var(--font-mono); font-size: 12px; }
.wallet-balance { font-weight: 600; white-space: nowrap; }

.eligibility { font-size: 12px; color: var(--accent); margin-bottom: 12px; }

.tier-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

@media (hover: hover) {
  .tier-card:hover { border-color: var(--border-strong); }
}
.tier-card:active { border-color: rgba(212, 175, 55, 0.4); }

.tier-card.selected {
  border-color: rgba(212, 175, 55, 0.6);
  background: rgba(212, 175, 55, 0.05);
}

.tier-card.disabled { opacity: 0.55; cursor: default; }
.tier-card.disabled:hover { border-color: var(--border); }

.tier-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tier-flow { font-size: 15px; font-weight: 600; }

.tier-ratio { font-size: 11px; color: var(--text-2); }

.tier-badge, .tier-level {
  position: absolute;
  top: -8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg);
}

.tier-badge { right: 10px; color: var(--accent); border: 1px solid rgba(212, 175, 55, 0.5); }
.tier-level { left: 10px; color: var(--text); border: 1px solid var(--border); }

.wc-zone { margin-bottom: 16px; }
.wc-msg { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }

.claim-disclaimer { font-size: 11px; color: var(--text-2); margin-top: 14px; }

/* ---------- Déroulé de participation ---------- */

.flow-list { list-style: none; margin-top: 16px; }

.flow-list li {
  font-size: 13px;
  color: var(--text-2);
  padding: 6px 0 6px 26px;
  position: relative;
}

.flow-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.flow-list li.done { color: var(--text); }
.flow-list li.done::before { border-color: var(--accent); background: var(--accent); }

.flow-list li.active { color: var(--text); }
.flow-list li.active::before { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--accent); }

.flow-caption { font-size: 12px; color: var(--text-2); margin-top: 10px; }

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
  vertical-align: -2px;
  margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.success-panel {
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.04);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
}

.success-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.success-amount { font-size: 24px; font-weight: 600; margin: 6px 0; }

.success-tx { font-size: 13px; color: var(--text-2); }
.success-tx a { font-family: var(--font-mono); font-size: 12px; }

.tx-link { color: var(--accent); text-decoration: none; }
@media (hover: hover) {
  .tx-link:hover { text-decoration: underline; }
}

.success-note { font-size: 12px; color: var(--text-2); margin-top: 8px; }

/* ---------- Bande de stats ---------- */

.stats-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 32px 0;
}

.stat { text-align: center; }

.stat-value { display: block; font-size: 22px; font-weight: 600; }

.stat-label { font-size: 12px; color: var(--text-2); }

.progress-block { margin-top: 24px; }

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 8px;
}

.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 86%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 500ms linear;
}

/* ---------- Sections ---------- */

.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { margin-bottom: 24px; }

.section-head h2 { font-size: 24px; font-weight: 600; margin-bottom: 8px; }

.section-sub { color: var(--text-2); font-size: 14px; }

.section-meta { color: var(--text-2); font-size: 12px; margin-top: 6px; }

/* ---------- Étapes ---------- */

.steps-grid { gap: 24px 0; }

.step-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  position: relative;
}

.step-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  width: 32px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.step-num { font-size: 12px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }

.step-card h3 { font-size: 16px; font-weight: 600; margin: 10px 0 8px; }

.step-card p { font-size: 14px; color: var(--text-2); }

/* ---------- Ledger ---------- */

.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }

.ledger-table { width: 100%; border-collapse: collapse; background: var(--surface); min-width: 460px; }

.ledger-table th {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.ledger-table td {
  font-size: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.ledger-table td:first-child { font-family: var(--font-mono); font-size: 13px; }

.ledger-table tr:last-child td { border-bottom: none; }

.ta-r { text-align: right; }

.row-new { animation: rowIn 150ms ease; }

@keyframes rowIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- FAQ ---------- */

.faq-item { border-bottom: 1px solid var(--border); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  padding: 18px 0;
  position: relative;
  padding-right: 32px;
  -webkit-tap-highlight-color: transparent;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 13px;
  font-size: 18px;
  color: var(--text-2);
  transition: transform 150ms ease;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p { font-size: 14px; color: var(--text-2); padding-bottom: 18px; max-width: 720px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-col { display: flex; flex-direction: column; gap: 8px; }

.footer-col h4 { font-size: 13px; font-weight: 600; margin-bottom: 6px; }

.footer-col a { color: var(--text-2); font-size: 13px; text-decoration: none; transition: color 150ms ease; }
@media (hover: hover) {
  .footer-col a:hover { color: var(--text); }
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-2);
}

.footer-bottom .num { font-family: var(--font-mono); font-size: 11px; }

/* ---------- CTA mobile ---------- */

.mobile-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}

/* ---------- Modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 380px;
}

.modal-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }

.modal-card p { font-size: 14px; color: var(--text-2); }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  .container { padding: 0 16px; }

  .grid-12 { grid-template-columns: 1fr; }
  .span-3, .span-4, .span-5, .span-7 { grid-column: auto; }

  .site-nav { display: none; }
  .brand-edition { display: none; }

  .hero { padding: 40px 0 32px; }
  .hero-copy h1 { font-size: 30px; }
  .hero-sub { font-size: 14px; }

  .claim-column { order: -1; margin-bottom: 32px; }

  .claim-panel { padding: 20px 16px; }

  .stats-grid { gap: 0; }
  .stat { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }

  .steps-grid { gap: 16px 0; }

  .section { padding: 48px 0; }

  .footer-grid { gap: 24px 0; grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .footer-bottom { flex-direction: column; }

  .progress-head { flex-direction: column; gap: 4px; }

  .modal { align-items: flex-end; padding: 0; }
  .modal-card { max-width: none; border-radius: 12px 12px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); border-left: none; border-right: none; border-bottom: none; }
  .modal-actions .btn { flex: 1; }

  .mobile-cta { display: block; }
}

@media (min-width: 769px) {
  .mobile-cta { display: none !important; }
}


/* ---------- Montant personnalisé ---------- */

.custom-tier {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--bg);
  margin-bottom: 16px;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.custom-tier.selected {
  border-color: rgba(212, 175, 55, 0.6);
  background: rgba(212, 175, 55, 0.05);
}

.custom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.custom-row input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.custom-row input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: transparent;
}

.custom-row input::placeholder { color: var(--text-2); }

.custom-row input::-webkit-outer-spin-button,
.custom-row input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
