/* =============================================
   HEEELP.ME — Brutalist Marketplace · LLN
   =============================================
   Palette :
     Urgence  → #A52A2A (brique rouge)
     Gain     → #2D8A4E (vert profond)
     Fond     → #0E0E0E (noir)
     Texte    → #F0EDE8 (crème)
     Accent   → #F0C040 (jetons / Heeelps)
   ============================================= */

:root {
  --red:     #A52A2A;
  --red-l:   #C0392B;
  --green:   #2D8A4E;
  --green-l: #27AE60;
  --gold:    #F0C040;
  --bg:      #0E0E0E;
  --bg2:     #161616;
  --bg3:     #1E1E1E;
  --text:    #F0EDE8;
  --muted:   rgba(240,237,232,0.55);
  --border:  rgba(240,237,232,0.12);
}

/* ── Reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

/* ── HEADER ─────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text);
  text-transform: lowercase;
}
.logo span { color: var(--red); }

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.token-offer {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(240,192,64,0.1);
  border: 1px solid rgba(240,192,64,0.25);
  padding: 4px 12px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}

.token-hex { font-size: 1em; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 2px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-btn.active {
  background: var(--text);
  color: var(--bg);
}

.lang-sep {
  color: var(--border);
  font-size: 0.7rem;
  pointer-events: none;
}

/* ══════════════════════════════════════════════
   TOP — PANIC SECTION
══════════════════════════════════════════════ */
.panic-section {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 2.5rem 4rem;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(165,42,42,0.18) 0%, transparent 60%),
    var(--bg);
  border-bottom: 3px solid var(--red);
}

.panic-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 2rem;
}

.live-pulse {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(165,42,42,0.6);
  animation: pulse 1.8s ease-in-out infinite;
}
.live-pulse.green {
  background: var(--green-l);
  box-shadow: 0 0 0 0 rgba(39,174,96,0.6);
  animation: pulse-green 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(165,42,42,0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(165,42,42,0); }
  100% { box-shadow: 0 0 0 0 rgba(165,42,42,0); }
}
@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(39,174,96,0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(39,174,96,0); }
  100% { box-shadow: 0 0 0 0 rgba(39,174,96,0); }
}

.panic-title {
  font-size: clamp(4rem, 13vw, 8.5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 1.6rem;
}

.panic-sub {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--muted);
  max-width: 440px;
  margin-bottom: 2.5rem;
  font-weight: 400;
  line-height: 1.6;
}

/* ── SOS Button ─────────────────────────────── */
.btn-sos {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  padding: 1.2rem 2.2rem;
  font-weight: 900;
  border: none;
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(165,42,42,0.45);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  width: fit-content;
  margin-bottom: 2rem;
  cursor: pointer;
}
.btn-sos:hover {
  background: #8B2020;
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(165,42,42,0.55);
}

.sos-label {
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  letter-spacing: -0.02em;
}
.sos-cost {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

/* ── Incentive Cards ────────────────────────── */
.incentive-cards {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  max-width: 520px;
}

.incentive-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  flex: 1;
  min-width: 200px;
  border: 1px solid;
}

.incentive-ask {
  background: rgba(165,42,42,0.08);
  border-color: rgba(165,42,42,0.2);
}

.incentive-help {
  background: rgba(45,138,78,0.08);
  border-color: rgba(45,138,78,0.2);
}

.incentive-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; }

.incentive-card div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.incentive-card strong {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.incentive-ask strong  { color: #E07070; }
.incentive-help strong { color: #6FCF97; }

.incentive-card span {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 500;
  opacity: 0.9;
}

/* ── Heeelp Explanation ─────────────────────── */
.heeelp-explain {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem 1.3rem;
  background: rgba(240,192,64,0.06);
  border: 1px solid rgba(240,192,64,0.18);
  border-radius: 6px;
  max-width: 420px;
}
.hex-big {
  font-size: 1.8rem;
  color: var(--gold);
  line-height: 1.2;
  flex-shrink: 0;
}
.heeelp-explain p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}
.heeelp-explain strong {
  color: var(--text);
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 3px;
}

/* ══════════════════════════════════════════════
   DIVIDER
══════════════════════════════════════════════ */
.section-divider {
  background: var(--green);
  text-align: center;
  padding: 0.7rem 1rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}

/* ══════════════════════════════════════════════
   BOTTOM — MISSION FEED
══════════════════════════════════════════════ */
.feed-section {
  background: var(--bg2);
  padding: 3.5rem 2.5rem 3rem;
  border-bottom: 2px solid var(--border);
}

.feed-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.feed-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--green-l);
  margin-bottom: 0.5em;
  text-transform: uppercase;
}

.feed-title {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.feed-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  margin-top: 4px;
}

/* ── Mission Cards ──────────────────────────── */
#mission-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.mission-card {
  background: var(--bg3);
  padding: 1.4rem 1.5rem 1.2rem;
  border-top: 3px solid var(--card-color, var(--green));
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}
.mission-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}

.mission-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.badge-urgence {
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
}

.badge-reward {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(240,192,64,0.1);
  border: 1px solid rgba(240,192,64,0.25);
  padding: 3px 9px;
  border-radius: 3px;
}

.mission-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.55rem;
}

.mission-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
  flex: 1;
}

.mission-meta {
  font-size: 0.73rem;
  color: rgba(240,237,232,0.38);
  margin-bottom: 1rem;
}

.btn-mission {
  display: inline-block;
  align-self: flex-start;
  padding: 0.5rem 1.2rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.04em;
  border-radius: 4px;
  border: 1.5px solid;
  transition: background 0.15s, color 0.15s;
  margin-top: auto;
}
.btn-mission:hover {
  background: var(--card-color, var(--green));
  color: #fff !important;
  border-color: var(--card-color, var(--green));
}

/* Skeleton loader */
.skeleton-card {
  background: var(--bg3);
  height: 180px;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.7; }
}

.empty-state {
  padding: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  grid-column: 1 / -1;
  background: var(--bg3);
}

/* ── MAP ────────────────────────────────────── */
#map {
  height: 380px;
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}
.leaflet-tile { filter: brightness(0.75) saturate(0.6); }
.leaflet-popup-content-wrapper {
  background: #1e1e1e;
  color: #f0ede8;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
}
.leaflet-popup-tip { background: #1e1e1e; }
.leaflet-popup-content { color: #f0ede8; font-size: 0.88rem; }

/* ══════════════════════════════════════════════
   TOKEN PURCHASE BANNER
══════════════════════════════════════════════ */
.token-banner {
  background: var(--bg);
  border-top: 1px solid rgba(240,192,64,0.15);
  border-bottom: 1px solid rgba(240,192,64,0.15);
  padding: 1.2rem 1.5rem;
}

.token-banner-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.token-hex-lg {
  font-size: 1.3rem;
  color: var(--gold);
  letter-spacing: -4px;
  flex-shrink: 0;
}

.token-text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--muted);
  min-width: 200px;
}
.token-text strong {
  color: var(--gold);
  font-weight: 800;
}

.btn-buy {
  display: inline-block;
  background: var(--gold);
  color: #0E0E0E;
  font-weight: 900;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.6rem 1.4rem;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.btn-buy:hover { opacity: 0.85; }

/* ── FOOTER ─────────────────────────────────── */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-top: 2px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}
.footer-logo {
  font-weight: 900;
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

/* ══════════════════════════════════════════════
   RESPONSIVE — Mobile first
══════════════════════════════════════════════ */
@media (max-width: 640px) {
  .site-header { padding: 0.8rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
  .token-offer { display: none; }
  .panic-section { padding: 3rem 1.2rem 2.5rem; min-height: auto; }
  .panic-title { font-size: clamp(3.2rem, 17vw, 5rem); }
  .incentive-cards { max-width: 100%; }
  .heeelp-explain { max-width: 100%; }
  .feed-section { padding: 2rem 1.2rem 1.5rem; }
  #mission-feed { grid-template-columns: 1fr; gap: 8px; }
  #map { height: 260px; }
  .token-banner { padding: 1rem 1.2rem; }
  .site-footer { flex-direction: column; gap: 0.3rem; text-align: center; padding: 1rem; }
  .feed-header { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 1200px) {
  .panic-section { padding: 5rem 4rem; }
  .feed-section  { padding: 4rem; }
  #mission-feed  { grid-template-columns: repeat(3, 1fr); }
}
