/* =========================================================
   SAMEN — feuille de style principale
   Palette dérivée du logo : olive profond + orange chaud
   sur fond blanc. Thème clair unique.
   ========================================================= */

/* ----- Reset léger ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* ----- Tokens : thème clair unique, fond blanc ----- */
:root {
  --paper:      #FFFFFF;
  --paper-2:    #F5F5F0;
  --surface:    #FFFFFF;
  --ink:        #232619;
  --ink-soft:   #585A48;
  --line:       #E6E4D9;
  --green:      #4C5E22;
  --green-deep: #3A4A18;
  --orange:     #EE7F00;
  --orange-soft:#F6A64A;
  --focus:      #4C5E22;

  /* couleurs de marque (logo) — invariantes */
  --heart-green:  #4C5E22;
  --heart-orange: #EE7F00;

  /* bande "Projet de l'année" — univers visuel engagé, valeurs fixes */
  --deep:       #2E3A16;
  --deep-2:     #27310F;
  --on-deep:    #F4F2E6;
  --on-deep-soft: rgba(244, 242, 230, 0.74);

  --shadow-sm: 0 1px 2px rgba(35, 38, 25, 0.06), 0 6px 20px -12px rgba(35, 38, 25, 0.18);
  --shadow-md: 0 24px 60px -28px rgba(35, 38, 25, 0.30);

  --radius:   18px;
  --radius-sm:12px;
  --wrap: 1140px;
  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0:  1.0625rem;
  --step-1:  clamp(1.18rem, 1.1rem + 0.4vw, 1.35rem);
  --step-2:  clamp(1.5rem, 1.35rem + 0.7vw, 1.9rem);
  --step-3:  clamp(2rem, 1.7rem + 1.5vw, 2.9rem);
  --step-4:  clamp(2.6rem, 2rem + 3vw, 4.4rem);
}

/* ----- Base ----- */
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3, .display {
  font-family: "Familjen Grotesk", "Trebuchet MS", "Segoe UI", sans-serif;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--ink);
}
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.005em; }
p  { max-width: 62ch; }
strong { font-weight: 600; }

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: currentColor;
  display: inline-block;
}

/* ----- Layout ----- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section__head { max-width: 44ch; margin-bottom: clamp(2rem, 5vw, 3.5rem); display: grid; gap: 1rem; }
.section__head p { color: var(--ink-soft); font-size: var(--step-1); }
.section--tint { background: var(--paper-2); }
.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--green); color: #fff; padding: 0.6rem 1rem;
  border-radius: 8px; z-index: 200; transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* ----- Boutons ----- */
.btn {
  --bg: var(--green); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.6em;
  padding: 0.95em 1.6em;
  background: var(--bg); color: var(--fg);
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--step-0);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn--primary { --bg: var(--orange); --fg: #23190B; }
.btn--primary:hover { --bg: var(--orange-soft); }
.btn--ghost {
  --bg: transparent; --fg: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { --bg: var(--surface); border-color: var(--green); }
.btn--on-deep { --bg: var(--on-deep); --fg: var(--deep); }
.btn--on-deep:hover { --bg: #fff; }
.btn--xl { padding: 1.15em 2.2em; font-size: var(--step-1); border-radius: 999px; }
.btn--block { width: 100%; }

/* ----- En-tête ----- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.header.is-stuck { border-bottom-color: var(--line); }
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.85rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand__mark { width: 34px; height: 34px; flex: none; object-fit: contain; }
.brand__mark svg { width: 100%; height: 100%; display: block; }
.hero__logo svg { width: 100%; height: auto; display: block; }
.brand__word {
  font-family: "Familjen Grotesk", "Trebuchet MS", sans-serif;
  font-weight: 700; font-size: 1.4rem; letter-spacing: -0.02em;
  color: var(--green);
}
.brand__word i { color: var(--orange); font-style: normal; }
.nav { display: flex; align-items: center; gap: 0.4rem; }
.nav__link {
  padding: 0.5rem 0.8rem; border-radius: 999px;
  text-decoration: none; color: var(--ink-soft);
  font-weight: 500; font-size: 0.98rem;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav__link:hover { color: var(--ink); background: var(--paper-2); }
.header .btn { padding: 0.7em 1.25em; }
.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
  align-items: center; justify-content: center;
}
.nav__toggle svg { width: 22px; height: 22px; }

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: grid; place-items: center;
  text-align: center;
  overflow: hidden;
  padding-block: clamp(3rem, 10vh, 7rem);
}
.hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.4;
}
.hero__inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: 1.5rem; }
.hero__logo { width: clamp(150px, 30vw, 240px); height: auto; transform-origin: center; }
.hero__title {
  font-size: var(--step-4);
  letter-spacing: -0.02em;
}
.hero__title span { color: var(--green); }
.hero__lede {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; margin-top: 0.5rem; }
.hero__cue {
  position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  z-index: 1;
  display: grid; justify-items: center; gap: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none;
}
.hero__cue svg { width: 20px; height: 20px; animation: bob 2.4s ease-in-out infinite; }

/* animation d'entrée */
.hero__logo, .hero__title, .hero__lede, .hero__actions, .hero__cue {
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero__logo  { animation: logoIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero__title { animation-delay: 0.18s; }
.hero__lede  { animation-delay: 0.30s; }
.hero__actions { animation-delay: 0.42s; }
.hero__cue   { animation-delay: 0.9s; }

@keyframes logoIn {
  0%   { opacity: 0; transform: scale(0.4); filter: blur(8px); }
  65%  { opacity: 1; filter: blur(0); }
  82%  { transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

/* ----- Révélation au scroll ----- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* ----- Impact ----- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.7rem;
  min-height: 340px;
  display: grid; gap: 0.5rem; align-content: start;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--green) 40%, var(--line)); }
.stat__num {
  font-family: "Familjen Grotesk", "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 1.8rem + 2.6vw, 3.4rem);
  line-height: 1;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat__num .unit { font-size: 0.42em; color: var(--ink-soft); font-weight: 600; letter-spacing: 0; }
.stat__label { font-weight: 600; font-size: 1.05rem; }
.stat__text { color: var(--ink-soft); font-size: 0.96rem; }

/* ----- Missions ----- */
.missions { display: grid; gap: 1.4rem; }
.mission {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
}
.mission:nth-child(even) { grid-template-columns: 1fr 1.05fr; }
.mission:nth-child(even) .mission__art { order: -1; }
.mission__body { display: grid; gap: 1rem; align-content: center; }
.mission__body h3 { color: var(--orange); font-size: var(--step-2); }
.mission__num {
  font-family: "Familjen Grotesk", sans-serif; font-weight: 700;
  color: var(--orange); font-size: 0.95rem; letter-spacing: 0.1em;
}
.mission__list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mission__list li {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.mission__msg { font-weight: 600; color: var(--ink); font-size: var(--step-1); max-width: 30ch; }
.mission__art {
  position: relative;
  border-radius: var(--radius-sm);
  aspect-ratio: 4 / 5;
  align-self: center;
  overflow: hidden;
  background: linear-gradient(150deg, color-mix(in srgb, var(--green) 18%, var(--paper)), var(--paper-2));
  display: grid; place-items: center;
}
.mission:nth-child(2) .mission__art { background: linear-gradient(150deg, color-mix(in srgb, var(--orange) 20%, var(--paper)), var(--paper-2)); }
.mission:nth-child(3) .mission__art { background: linear-gradient(150deg, color-mix(in srgb, var(--green) 14%, var(--paper)), color-mix(in srgb, var(--orange) 10%, var(--paper))); }
.mission__art img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.mission:hover .mission__art img { transform: scale(1.04); }
.mission__art svg { width: 52%; height: auto; opacity: 0.9; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.mission:hover .mission__art svg { transform: scale(1.06) rotate(-1.5deg); }

/* ----- Projet de l'année ----- */
.project {
  position: relative;
  background: linear-gradient(160deg, var(--deep), var(--deep-2));
  color: var(--on-deep);
  overflow: hidden;
  isolation: isolate;
}
.project__ripple {
  position: absolute; inset: -10% -5% auto auto;
  width: min(70vw, 780px); height: auto;
  z-index: -1; opacity: 0.5;
  color: rgba(244, 242, 230, 0.5);
}
.project .wrap { position: relative; z-index: 1; }
.project__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.project__content { display: grid; gap: 0; }
.project__figure {
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 5; background: rgba(244, 242, 230, 0.08);
}
.project__figure img { width: 100%; height: 100%; object-fit: cover; }
.project h2 {
  color: var(--on-deep);
  font-size: var(--step-4);
  margin-block: 0.6rem 0.4rem;
}
.project .eyebrow { color: var(--orange-soft); }
.project__sub { font-size: var(--step-2); color: var(--on-deep); font-family: "Familjen Grotesk", sans-serif; font-weight: 500; }
.project__text { color: var(--on-deep-soft); font-size: var(--step-1); margin-top: 1.2rem; max-width: 56ch; }
.project__meter { margin-top: 2.4rem; max-width: 640px; }
.meter__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.7rem; }
.meter__now { font-family: "Familjen Grotesk", sans-serif; font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); font-variant-numeric: tabular-nums; }
.meter__goal { color: var(--on-deep-soft); font-weight: 500; font-variant-numeric: tabular-nums; }
.progress {
  height: 20px; border-radius: 999px;
  background: rgba(244, 242, 230, 0.16);
  overflow: hidden;
}
.progress__fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--orange-soft));
  transition: width 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.meter__note { margin-top: 0.7rem; font-size: 0.9rem; color: var(--on-deep-soft); }
.project__cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.project__cta .btn--primary { --fg: #23190B; }

/* ----- Faire un don ----- */
.give-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; margin-top: 1rem; }
.give-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem;
  display: grid; gap: 0.9rem; align-content: start;
}
.give-card h3 { color: var(--green); }
.give-card p { color: var(--ink-soft); font-size: 0.98rem; }
.give-card .btn { margin-top: 0.4rem; }

/* ----- Bénévoles ----- */
.volunteer {
  background: linear-gradient(155deg, var(--deep), var(--deep-2));
  color: var(--on-deep);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: stretch;
}
.volunteer__body { padding: clamp(2rem, 6vw, 4rem); display: grid; gap: 1.2rem; justify-items: start; align-content: center; }
.volunteer__figure { position: relative; min-height: 340px; }
.volunteer__figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.volunteer h2 { color: var(--on-deep); }
.volunteer p { color: var(--on-deep-soft); font-size: var(--step-1); }
.volunteer .btn--on-deep { --bg: var(--on-deep); --fg: var(--deep); }
.volunteer .btn--on-deep:hover { --bg: #fff; }

/* ----- L'Origine ----- */
.origin { display: grid; gap: clamp(1.8rem, 4vw, 2.8rem); }
.origin__figure {
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--paper-2); border: 1px solid var(--line);
}
.origin__figure img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.origin__prose { max-width: 68ch; margin-inline: auto; display: grid; gap: 1.15rem; }
.origin__prose p { color: var(--ink-soft); max-width: none; }
.origin__prose .lead { color: var(--ink); font-size: var(--step-1); font-weight: 500; }
.origin__prose .kicker {
  font-family: "Familjen Grotesk", sans-serif; font-weight: 600;
  color: var(--ink); font-size: var(--step-1);
}
.origin__hearts { display: inline-flex; gap: 0.3rem; vertical-align: -0.15em; margin-left: 0.15rem; }
.origin__hearts svg { width: 1.05em; height: 1.05em; }

/* ----- Footer ----- */
.footer {
  background: var(--deep); color: var(--on-deep);
  padding-block: clamp(3rem, 7vw, 5rem) 2rem;
}
.footer a { color: var(--on-deep-soft); text-decoration: none; }
.footer a:hover { color: var(--on-deep); }
.footer__top { display: grid; grid-template-columns: 1.4fr 2fr; gap: 2.5rem; }
.footer__brand .brand__word { color: var(--on-deep); }
.footer__brand p { color: var(--on-deep-soft); margin-top: 0.8rem; max-width: 34ch; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.footer__cols h4 { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-deep-soft); margin-bottom: 0.8rem; }
.footer__cols ul { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.socials { display: flex; gap: 0.6rem; margin-top: 1.2rem; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(244, 242, 230, 0.24);
  display: grid; place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.socials a:hover { background: rgba(244, 242, 230, 0.12); border-color: rgba(244, 242, 230, 0.5); }
.socials svg { width: 18px; height: 18px; }
.footer__bar {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(244, 242, 230, 0.16);
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; justify-content: space-between;
  font-size: 0.88rem; color: var(--on-deep-soft);
}
.footer__bar nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ----- Barre de don fixe (mobile) ----- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: none;
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.dock .btn { width: 100%; }

/* ----- Sections légales ----- */
.legal { background: var(--paper-2); }
.legal details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1rem 1.25rem; background: var(--surface); margin-bottom: 0.8rem;
}
.legal summary { font-weight: 600; cursor: pointer; }
.legal details p { color: var(--ink-soft); font-size: 0.95rem; margin-top: 0.8rem; }

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .footer__top { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .project__grid { grid-template-columns: 1fr; }
  .project__figure { aspect-ratio: 4 / 5; order: -1; }
  .project h2 { font-size: var(--step-3); }
  .project__meter { margin-top: 1.6rem; }
  .project__text { margin-top: 1rem; }
  .nav { position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px);
         background: var(--surface); border-left: 1px solid var(--line);
         flex-direction: column; align-items: stretch; gap: 0.2rem;
         padding: 5rem 1.25rem 2rem; transform: translateX(100%);
         transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: var(--shadow-md); }
  .nav.is-open { transform: none; }
  .nav__link { padding: 0.85rem 0.8rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav .btn { margin-top: 0.8rem; }
  .nav__toggle { display: inline-flex; }
  .header__inner { position: relative; z-index: 101; }
  .mission, .mission:nth-child(even) { grid-template-columns: 1fr; }
  .mission:nth-child(even) .mission__art { order: 0; }
  .volunteer { grid-template-columns: 1fr; }
  .volunteer__figure { order: -1; min-height: 220px; }
  .dock { display: block; }
  .footer { padding-bottom: 6rem; }
}
@media (max-width: 560px) {
  .section { padding-block: clamp(2.75rem, 11vw, 4rem); }
  .wrap { width: min(100% - 2rem, var(--wrap)); }
  .stat-grid { grid-template-columns: 1fr; }
  .stat { min-height: 0; }
  .footer__cols { grid-template-columns: 1fr; gap: 1.6rem; }
  .hero { padding-block: 2.5rem; min-height: min(90vh, 720px); }
  .hero__inner { gap: 1.1rem; }
  .hero__logo { width: clamp(128px, 34vw, 160px); }
  .hero__title { font-size: clamp(2.15rem, 9vw, 2.8rem); }
  .hero__lede { font-size: 1.02rem; }
  .hero__actions { flex-direction: column; width: 100%; gap: 0.7rem; }
  .hero__actions .btn { width: 100%; }
  .hero__cue { bottom: 1rem; }
  .btn--xl { padding: 1em 1.6em; }
  .mission { padding: 1.4rem; gap: 1.4rem; }
  .mission__body h3 { font-size: var(--step-1); }
  .volunteer__body { padding: 2rem 1.5rem; }
}

/* ----- Préférence : mouvement réduit ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__canvas { display: none; }
}

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
