:root {
  --ink: #1b241d;
  --ink-soft: #435046;
  --cream: #f7f0e3;
  --paper: #fffaf1;
  --olive: #33523b;
  --olive-deep: #1d2a22;
  --sun: #e2a33c;
  --coral: #bf5b3c;
  --line: rgba(27, 36, 29, 0.14);
  --shadow: 0 24px 60px rgba(27, 36, 29, 0.12);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* L'en-tête est collant : on réserve sa hauteur lors des sauts d'ancre. */
section[id],
main[id] {
  scroll-margin-top: 92px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.15rem);
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
}

h3 {
  font-size: 1.24rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

em {
  font-style: italic;
  color: var(--olive);
}

.wrap {
  width: min(1120px, 100% - 3rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kicker {
  margin: 0 0 0.9rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral);
}

/* En-tête ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 240, 227, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--olive);
  color: var(--sun);
}

.brand-mark svg {
  width: 26px;
  height: 26px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-family: var(--serif);
  font-size: 1.06rem;
  font-weight: 600;
}

.brand-text small {
  color: var(--ink-soft);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.92rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--sun);
}

.site-nav .nav-farm {
  color: var(--olive);
  font-weight: 600;
}

/* Héros -------------------------------------------------------------- */

.hero {
  padding: clamp(3rem, 7vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4.5rem);
  background:
    radial-gradient(70rem 34rem at 88% -10%, rgba(226, 163, 60, 0.24), transparent 62%),
    linear-gradient(180deg, var(--cream), #f3e9d7);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.hero-copy h1 {
  margin-bottom: 1.2rem;
}

.lede {
  max-width: 34rem;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.8rem 0 1.1rem;
}

.hero-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--olive);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--olive-deep);
}

.btn-quiet {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-quiet:hover {
  border-color: var(--olive);
  color: var(--olive);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* Carte cagnotte ----------------------------------------------------- */

.pot-card {
  position: relative;
  padding: 1.9rem;
  border-radius: var(--radius);
  background: var(--olive-deep);
  color: var(--cream);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.pot-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -45% auto;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 163, 60, 0.32), transparent 68%);
}

.pot-kicker {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 240, 227, 0.68);
}

.pot-amount {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.05;
}

.pot-amount small {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(247, 240, 227, 0.72);
}

.pot-bar {
  display: block;
  width: 100%;
  height: 10px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: rgba(247, 240, 227, 0.16);
  overflow: hidden;
}

.pot-bar::-webkit-progress-bar {
  border-radius: 999px;
  background: rgba(247, 240, 227, 0.16);
}

.pot-bar::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sun), #f0c477);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.pot-bar::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sun), #f0c477);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.pot-meta {
  margin: 0.7rem 0 1.3rem;
  font-size: 0.82rem;
  color: rgba(247, 240, 227, 0.7);
}

.pot-list {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.pot-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(247, 240, 227, 0.16);
  font-size: 0.88rem;
}

.pot-list .pot-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pot-list .pot-sum {
  font-weight: 700;
  color: var(--sun);
  white-space: nowrap;
}

.pot-placeholder {
  color: rgba(247, 240, 227, 0.6);
  border-bottom: 0 !important;
}

.pot-link {
  position: relative;
  z-index: 1;
  display: inline-block;
  color: var(--sun);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.pot-link:hover {
  text-decoration: underline;
}

/* Histoire ----------------------------------------------------------- */

.story {
  padding: clamp(3rem, 6vw, 5.5rem) 0;
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.story-copy p {
  max-width: 40rem;
  color: var(--ink-soft);
}

.story-copy strong {
  color: var(--ink);
}

.story-figures {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 0;
}

.story-figures div {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--cream);
}

.story-figures dt {
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.story-figures dd {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-size: 2.05rem;
  line-height: 1;
  color: var(--olive);
}

.story-figures dd.is-text {
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* À quoi ça sert ----------------------------------------------------- */

.uses {
  padding: clamp(3rem, 6vw, 5.5rem) 0;
}

.section-head {
  max-width: 44rem;
  margin-bottom: 2.4rem;
}

.section-lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.section-head-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: none;
}

.use-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.use-card {
  padding: 1.7rem;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
}

.use-icon {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--coral);
  letter-spacing: 0.12em;
}

.use-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.use-card .use-amount {
  margin: 1rem 0 0;
  font-weight: 700;
  color: var(--olive);
}

/* Participer --------------------------------------------------------- */

.participate {
  padding: clamp(3rem, 6vw, 5.5rem) 0;
  background: var(--olive-deep);
  color: var(--cream);
}

.participate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.participate .kicker {
  color: var(--sun);
}

.participate h2 {
  color: var(--cream);
}

.participate-copy p {
  color: rgba(247, 240, 227, 0.78);
  max-width: 34rem;
}

.participate-copy .small {
  font-size: 0.82rem;
  color: rgba(247, 240, 227, 0.6);
}

.participate-notes {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: rgba(247, 240, 227, 0.72);
}

.participate-notes li {
  padding-left: 1.4rem;
  position: relative;
}

.participate-notes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sun);
}

.pledge-form {
  padding: 1.9rem;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.pledge-form h3 {
  margin-bottom: 1.2rem;
}

.field {
  margin-bottom: 1.1rem;
}

.field label,
.field legend {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.optional {
  font-weight: 400;
  color: var(--ink-soft);
}

input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
}

input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 1px;
}

textarea {
  resize: vertical;
}

.amounts {
  margin: 0 0 1.1rem;
  padding: 0;
  border: 0;
}

.amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.chip {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.chip:hover,
.chip.is-active {
  border-color: var(--olive);
  background: var(--olive);
  color: var(--paper);
}

.amount-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.amount-input span {
  font-weight: 700;
  color: var(--olive);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  min-height: 1.3rem;
  margin: 0.8rem 0 0;
  font-size: 0.84rem;
}

.form-status.is-error {
  color: var(--coral);
}

.form-status.is-success {
  color: var(--olive);
}

/* Soutiens ----------------------------------------------------------- */

.supporters {
  padding: clamp(3rem, 6vw, 5.5rem) 0;
}

.supporters-total {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.supporter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.supporter {
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.supporter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.supporter-name {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.supporter-sum {
  font-weight: 700;
  color: var(--olive);
  white-space: nowrap;
}

.supporter-message {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.supporter-date {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.74rem;
  color: var(--ink-soft);
  opacity: 0.75;
}

.supporter-empty {
  grid-column: 1 / -1;
  padding: 1.5rem;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--ink-soft);
  text-align: center;
}

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

.faq {
  padding: clamp(3rem, 6vw, 5.5rem) 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.faq-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.faq-list {
  display: grid;
  gap: 0.6rem;
}

details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
  padding: 0 1.1rem;
}

summary {
  padding: 1rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 1.6rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--coral);
}

details[open] summary::after {
  content: "−";
}

details p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

/* Pied de page ------------------------------------------------------- */

.site-footer {
  padding: 2.4rem 0;
  background: var(--olive-deep);
  color: rgba(247, 240, 227, 0.8);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  margin: 0 0 0.3rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--cream);
}

.footer-small {
  margin: 0;
  font-size: 0.78rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.85rem;
}

.footer-links a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-links a:hover {
  border-bottom-color: var(--sun);
}

/* Fenêtre géolocalisation -------------------------------------------- */

.geo-dialog {
  width: min(30rem, calc(100% - 2rem));
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.35);
}

.geo-dialog::backdrop {
  background: rgba(20, 27, 22, 0.62);
  backdrop-filter: blur(3px);
}

.geo-card {
  position: relative;
  padding: 2rem;
}

.geo-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: rgba(51, 82, 59, 0.1);
  color: var(--olive);
}

.geo-icon svg {
  width: 30px;
  height: 30px;
}

.geo-card .kicker {
  margin-bottom: 0.4rem;
}

.geo-card h2 {
  font-size: 1.75rem;
  margin-bottom: 0.6rem;
}

.geo-card p {
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.geo-points {
  margin: 1rem 0 1.3rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.geo-points li {
  padding-left: 1.4rem;
  position: relative;
}

.geo-points li::before {
  content: "•";
  position: absolute;
  left: 0.3rem;
  color: var(--coral);
}

.geo-status {
  min-height: 1.2rem;
  margin: 0.7rem 0 0;
  font-size: 0.84rem;
}

.geo-status.is-error {
  color: var(--coral);
}

.geo-status.is-success {
  color: var(--olive);
}

.geo-fineprint {
  margin: 0.9rem 0 0;
  font-size: 0.74rem !important;
  color: var(--ink-soft);
  opacity: 0.8;
}

/* Toast -------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  z-index: 40;
  transform: translateX(-50%);
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.88rem;
  box-shadow: var(--shadow);
}

/* Erreur 404 --------------------------------------------------------- */

.notfound {
  padding-block: 6rem;
  text-align: center;
}

.notfound .lede {
  margin-inline: auto;
}

.notfound-action {
  margin-top: 2rem;
}

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

@media (max-width: 900px) {
  .hero-grid,
  .story-grid,
  .participate-grid,
  .faq-wrap {
    grid-template-columns: 1fr;
  }

  .use-grid {
    grid-template-columns: 1fr;
  }

  .story-figures {
    grid-template-columns: repeat(4, 1fr);
  }

  .story-figures dd {
    font-size: 1.6rem;
  }

  .site-nav {
    gap: 1rem;
  }

  .site-nav a:not(.nav-farm) {
    display: none;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(100% - 2rem, 1120px);
  }

  section[id],
  main[id] {
    scroll-margin-top: 84px;
  }

  .header-inner {
    min-height: 68px;
  }

  .brand-text small {
    display: none;
  }

  .story-figures {
    grid-template-columns: repeat(2, 1fr);
  }

  .supporter-list {
    grid-template-columns: 1fr;
  }

  .section-head-row {
    align-items: start;
    flex-direction: column;
    gap: 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .pot-bar-fill {
    transition: none;
  }
}
