:root {
  --bg-warm: #F7F2EA;
  --surface: #FFFFFF;
  --surface-alt: #FBF7F0;
  --border: #E8DFCF;
  --text: #2B2420;
  --text-muted: #6B6153;
  --text-faint: #948A7B;

  --primary: #C2410C;
  --primary-hover: #A3350A;
  --primary-tint: #FCE9DD;

  --accent-financier: #1F7A4D;
  --accent-financier-tint: #DCFCE7;
  --accent-benevolat: #2563EB;
  --accent-benevolat-tint: #DBEAFE;
  --accent-materiel: #B7791F;
  --accent-materiel-tint: #FDECC8;
  --accent-hebergement: #7C3AED;
  --accent-hebergement-tint: #EDE4FD;
  --accent-animaux: #DB2777;
  --accent-animaux-tint: #FBDCEA;
  --accent-pro: #0F766E;
  --accent-pro-tint: #CCFBF1;
  --accent-sante: #DC2626;
  --accent-sante-tint: #FEE2E2;
  --accent-autres: #64748B;
  --accent-autres-tint: #E7EAEE;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(43,36,32,0.04);
  --shadow-card-hover: 0 8px 24px rgba(43,36,32,0.08);
  --shadow-modal: 0 24px 60px rgba(43,36,32,0.25);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-warm);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 700; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 234, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.25s ease;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--bg-warm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon svg { width: 24px; height: 24px; }

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .15s ease, transform .1s ease;
}

.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--primary);
  color: #FFF;
}

.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { transform: scale(0.98); }

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

.btn-secondary:hover { border-color: var(--text-faint); }

.btn-full { width: 100%; justify-content: center; margin-top: 4px; }

.section-nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.section-nav::-webkit-scrollbar { display: none; }

.section-nav a {
  flex-shrink: 0;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  transition: color .15s ease, border-color .15s ease;
}

.section-nav a:hover {
  color: var(--text);
  border-color: var(--text-faint);
}

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

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 8px;
}

.hero-intro {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  max-width: 720px;
  margin: 0;
  letter-spacing: -0.01em;
}

.hero-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 24px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.link-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}

.link-inline svg { width: 15px; height: 15px; flex-shrink: 0; }

.link-inline span { text-decoration: underline; }

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

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px;
  scroll-margin-top: 128px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.section-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-icon svg { width: 20px; height: 20px; }

.section h2 {
  font-size: 21px;
  margin-bottom: 4px;
}

.section-note {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  max-width: 620px;
}

/* accent color pairs */
.accent-financier { background: var(--accent-financier-tint); color: var(--accent-financier); }
.accent-benevolat { background: var(--accent-benevolat-tint); color: var(--accent-benevolat); }
.accent-materiel { background: var(--accent-materiel-tint); color: var(--accent-materiel); }
.accent-hebergement { background: var(--accent-hebergement-tint); color: var(--accent-hebergement); }
.accent-animaux { background: var(--accent-animaux-tint); color: var(--accent-animaux); }
.accent-pro { background: var(--accent-pro-tint); color: var(--accent-pro); }
.accent-sante { background: var(--accent-sante-tint); color: var(--accent-sante); }
.accent-autres { background: var(--accent-autres-tint); color: var(--accent-autres); }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease, border-color .2s ease;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--text-faint);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg { width: 18px; height: 18px; }

.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.badge-verified {
  background: var(--accent-financier-tint);
  color: var(--accent-financier);
}

.badge-official {
  background: var(--accent-autres-tint);
  color: var(--text-muted);
}

.card h3 {
  font-size: 16.5px;
  letter-spacing: -0.01em;
}

.card-tag {
  font-size: 13px;
  color: var(--text-faint);
  margin: -4px 0 0;
}

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  align-self: flex-start;
  margin-top: 4px;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-hover);
  background: transparent;
  border: 1.5px solid var(--primary);
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 999px;
  transition: background-color .15s ease, border-color .15s ease;
}

.card-cta svg { width: 15px; height: 15px; }
.card-cta:hover { background: var(--primary-tint); border-color: var(--primary-hover); }

.report-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-faint);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.report-link svg { width: 13px; height: 13px; }
.report-link:hover { color: var(--text-muted); }

/* ---------- Callout ---------- */

.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}

.callout svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }

.callout p { margin: 0; }

.callout-warning {
  background: var(--accent-materiel-tint);
  color: #7C4A0A;
}

.callout-mid { margin-top: 20px; }

/* ---------- Share ---------- */

.share-section {
  margin-top: -48px;
}

.share-card {
  background: var(--primary-tint);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
}

.share-card h2 { margin-bottom: 4px; }

.share-card .section-note { margin: 0 auto; }

.share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

/* ---------- Empty state ---------- */

.empty-state {
  margin-top: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
}

.empty-state p { margin: 0; font-size: 14px; }

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px 40px;
}

.site-footer p {
  max-width: 1120px;
  margin: 0 auto;
  font-size: 12.5px;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.6;
}

.site-footer a {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: underline;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(43, 36, 32, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-backdrop[hidden] { display: none; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-head h2 { font-size: 18px; }

.modal-close {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-close svg { width: 16px; height: 16px; }
.modal-close:hover { color: var(--text); }

#proposal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#proposal-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.optional {
  font-weight: 400;
  color: var(--text-faint);
}

#proposal-form input,
#proposal-form textarea {
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface-alt);
  color: var(--text);
  resize: vertical;
}

#proposal-form input:focus,
#proposal-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.field-hint {
  font-weight: 400;
  font-size: 12.5px;
  color: var(--text-faint);
}

.form-status {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  min-height: 18px;
}

.form-status.success { color: var(--accent-financier); }
.form-status.error { color: var(--primary); }

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

@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; }
  .brand-subtitle { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .section { scroll-margin-top: 168px; }
  .site-header.header-hidden { transform: translateY(-100%); }
}
