:root {
  --green: hsl(90, 40%, 50%); /* #7aaa54 → hue: 90° */
  --yellow: hsl(48, 100%, 50%); /* #f6b70b → hue: 48° */
  --yellow-light: hsl(48, 20%, 95%); /* #f9f6eb */
  --yellow-dark: hsl(44, 96%, 45%); /* #e5a709 */
  --dark-green: hsl(140, 55%, 25%); /* #206c3f → hue: 140° */
  --black: hsl(0, 0%, 1%); /* #070503 → hue: 0° (noir) */
  --white: hsl(0, 0%, 100%); /* #ffffff → hue: 0° (blanc) */
  --blue: #404773;
  --bg-cream: hsl(60, 40%, 98%); /* #fafaf8 */
  --text-main: hsl(0, 0%, 10%); /* #1a1a1a */
  --text-muted: hsl(0, 0%, 40%); /* #666666 */
  --border-light: hsl(0, 0%, 90%); /* #e5e5e5 */
  --text-on-dark: rgba(255, 255, 255, 0.9); /* texte courant sur fond sombre */
  --text-on-dark-muted: rgba(255, 255, 255, 0.85); /* texte secondaire sur fond sombre */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  --font-size-xs: 0.875rem; /* 14px en rem */
  --font-size-sm: 1rem; /* 16px en rem */
  --font-size-base: 1.125rem; /* 18px en rem */
  --font-size-lg: 1.5rem;
  --font-size-xl: 2.5rem;
  --font-size-2xl: 3.5rem;
  --line-height: 1.7;
  --h1: bold var(--font-size-2xl)/1.4 var(--font-sans);
  --h2: bold var(--font-size-xl)/1.4em var(--font-sans);
  --p1: normal var(--font-size-base)/1.4em var(--font-sans); /* Default information */
  --p2: normal var(--font-size-sm)/1.4em var(--font-sans); /* Secondary information */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --transition-default: all 0.2s ease;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --container-width: 900px;
  --nav-height: 130px;
  --logo-height-desktop: 100px;
  --logo-height-mobile: 50px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

@media (max-width: 768px) {
  :root {
    --font-size-2xl: 2rem;
    --space-xl: 4rem;
    --container-width: 100%;
  }
}
@media (max-width: 480px) {
  :root {
    --font-size-base: 16px;
    --font-size-xl: 1.75rem;
    --font-size-2xl: 1.75rem;
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--text-main);
  background-color: var(--bg-cream);
  -webkit-font-smoothing: antialiased;
}

main {
  padding-top: var(--nav-height);
}

a,
button {
  transition: all 0.2s ease;
}

#contact {
  background-color: var(--white);
  text-align: center;
}

h1 {
  font: var(--h1);
}

h2 {
  font: var(--h2);
}

p {
  font: var(--p1);
}

.section {
  padding-block: var(--space-xl);
  padding-inline: var(--space-md);
  min-height: auto;
  display: flex;
  align-items: center;
}
.section .content {
  max-width: var(--container-width);
  margin: 0 auto;
  width: 100%;
}

/* Hero split layout */
.section.hero {
  display: flex;
  justify-content: center;
  padding-inline: 4rem;
}
@media (max-width: 768px) {
  .section.hero {
    padding-inline: var(--space-sm);
  }
}

.hero-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  max-width: var(--container-width);
  width: 100%;
}
.hero-wrapper .hero-content {
  flex: 2;
  max-width: 66%;
}
.hero-wrapper .hero-image {
  flex: 1;
  max-width: 33%;
}
.hero-wrapper .hero-image img {
  width: 100%;
  height: auto;
}
@media (max-width: 768px) {
  .hero-wrapper {
    flex-direction: column;
    text-align: center;
  }
  .hero-wrapper .hero-content {
    max-width: 100%;
  }
  .hero-wrapper .hero-image {
    max-width: 250px;
    order: -1;
  }
}

.hero-content h2 {
  text-align: left;
  margin-bottom: var(--space-md);
}
@media (max-width: 768px) {
  .hero-content h2 {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .section {
    padding-block: var(--space-lg);
    padding-inline: var(--space-sm);
  }
}
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-md);
  z-index: 1000;
  border-bottom: 1px solid var(--border-light);
}
nav .logo {
  transition: transform 0.2s ease;
}
nav .logo img {
  height: var(--logo-height-desktop);
}
nav .logo:hover {
  transform: scale(1.02);
}
nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-md);
}
nav ul li a {
  text-decoration: none;
  color: var(--dark-green);
  font-weight: 600;
  font-size: 1.1rem;
  transition: color var(--transition-fast);
  position: relative;
}
nav ul li a:hover {
  color: var(--yellow);
}
nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--yellow);
  transition: width 0.2s ease;
}
nav ul li a:hover::after {
  width: 100%;
}
@media (max-width: 768px) {
  nav {
    padding: var(--space-sm);
  }
  nav .logo img {
    height: var(--logo-height-mobile);
  }
  nav ul {
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
  }
  nav ul li {
    margin-left: 0;
  }
  nav ul li a {
    font-size: 0.95rem;
  }
}

.button {
  background-color: var(--yellow);
  color: var(--black);
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-block;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}
.button:hover {
  background-color: var(--yellow-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(246, 183, 11, 0.3);
}
@media (max-width: 480px) {
  .button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

.section h2 {
  font-size: var(--font-size-2xl);
  color: var(--dark-green);
  text-align: center;
  font-weight: 700;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}
@media (max-width: 768px) {
  .section h2 {
    font-size: var(--font-size-xl);
  }
}
.section h3 {
  font-size: var(--font-size-lg);
  color: var(--dark-green);
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}
.section p {
  margin-bottom: var(--space-sm);
  color: var(--text-main);
}
.section ul {
  margin-left: var(--space-md);
  margin-bottom: var(--space-sm);
}
.section li {
  margin-bottom: var(--space-xs);
}

/* Variantes couleur de sections */
.section--cream {
  background-color: var(--bg-cream);
}

.section--blue {
  background-color: var(--blue);
  color: var(--white);
}
.section--blue h2,
.section--blue h3 {
  color: var(--white);
}
.section--blue p,
.section--blue li {
  color: var(--text-on-dark);
}
.section--blue strong,
.section--blue span,
.section--blue small,
.section--blue label {
  color: inherit;
}
.section--blue a {
  color: var(--yellow);
}
.section--blue a:hover {
  color: var(--yellow-dark);
}

.section--subtle-green {
  background-color: rgba(122, 170, 84, 0.08);
}

.yellow-bg {
  background-color: var(--yellow-light);
  color: var(--text-main);
}

.section-image-text__wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.section-image-text--right .section-image-text__content {
  order: 1;
}

.section-image-text__image {
  flex: 1;
  max-width: 40%;
}
.section-image-text__image img {
  width: 100%;
  height: auto;
}

.section-image-text__content {
  flex: 2;
  max-width: 60%;
}
.section-image-text__content h3 {
  font-size: var(--font-size-lg);
  color: var(--dark-green);
  margin-bottom: var(--space-sm);
}

@media (max-width: 768px) {
  .section-image-text__wrapper {
    flex-direction: column;
  }
  .section-image-text__image {
    max-width: 100%;
    order: 1 !important;
  }
  .section-image-text__content {
    max-width: 100%;
    order: 2 !important;
  }
}
.section-number-text__wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  max-width: var(--container-width);
  margin: 0 auto;
}

.section-number-text__number {
  font-size: clamp(5rem, 12vw, 9rem);
  font-weight: 700;
  line-height: 1;
  color: currentColor;
  opacity: 0.12;
  flex-shrink: 0;
  width: 160px;
  text-align: center;
  user-select: none;
}

.section-number-text__content {
  flex: 1;
}

/* Alternance gauche / droite */
.section-number-text--left .section-number-text__number {
  order: 1;
}
.section-number-text--left .section-number-text__content {
  order: 2;
}

.section-number-text--right .section-number-text__number {
  order: 2;
}
.section-number-text--right .section-number-text__content {
  order: 1;
}

@media (max-width: 768px) {
  .section-number-text__wrapper {
    flex-direction: column;
    text-align: center;
  }
  .section-number-text__number {
    order: 1 !important;
    width: auto;
  }
  .section-number-text__content {
    order: 2 !important;
  }
}
.page-header {
  display: flex;
  justify-content: center;
}

.page-header__wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  max-width: var(--container-width);
  width: 100%;
}
.page-header__wrapper .page-header__content {
  flex: 2;
  max-width: 66%;
}
.page-header__wrapper .page-header__image {
  flex: 1;
  max-width: 33%;
}
.page-header__wrapper .page-header__image img {
  width: 100%;
  height: auto;
}
@media (max-width: 768px) {
  .page-header__wrapper {
    flex-direction: column;
    text-align: center;
  }
  .page-header__wrapper .page-header__content {
    max-width: 100%;
  }
  .page-header__wrapper .page-header__image {
    max-width: 250px;
    order: -1;
  }
}

.page-header__content h1 {
  font-size: var(--font-size-2xl);
  color: var(--dark-green);
  margin-bottom: var(--space-sm);
}

.page-header__subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  font-weight: 500;
}

.page-header__text {
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--text-main);
}

.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.activity-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: all var(--transition-normal);
  text-decoration: none;
}
.activity-card:hover {
  border-color: var(--green);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}
.activity-card:hover .activity-card__link::after {
  transform: translateX(4px);
}
.activity-card__image {
  height: 180px;
  background: var(--bg-cream);
  display: flex;
  align-items: center;
  justify-content: center;
}
.activity-card__image img {
  width: 80px;
  height: 80px;
  opacity: 0.6;
}
.activity-card__content {
  padding: var(--space-md);
}
.activity-card__content h3 {
  color: var(--dark-green);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}
.activity-card__content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
}
.activity-card__link {
  color: var(--green);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.activity-card__link::after {
  content: "→";
  transition: transform 0.2s ease;
}

.partners-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}
.partners-logos a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
  transition: transform 0.2s ease;
}
.partners-logos a:hover {
  transform: scale(1.05);
}
.partners-logos img {
  height: 60px;
  width: auto;
  opacity: 0.8;
  filter: grayscale(100%);
  transition: all 0.2s ease;
}
.partners-logos img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.fleche {
  margin-right: 1rem;
  display: inline-flex;
  align-items: center;
  flex: 0 0 2rem;
}

.how-it-works {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1rem;
  width: 100%;
}
.how-it-works > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}
@media (max-width: 768px) {
  .how-it-works > div {
    flex-direction: column;
    align-items: center;
  }
  .how-it-works .how-it-works-item {
    min-width: unset;
    width: 100%;
  }
  .how-it-works .fleche {
    transform: rotate(90deg);
    width: 2rem;
    height: 2rem;
    margin: 0.5rem auto;
    flex: none;
  }
}

.how-it-works-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 0 0;
  min-width: 200px;
  text-align: center;
}

.how-it-works-img {
  max-width: 5rem;
  margin: 1rem;
}

#how-it-works-you {
  margin-top: 5rem;
}

.bullet-list-wrapper {
  margin-bottom: var(--space-lg);
}

.bullet-list {
  list-style: none;
  padding-left: 0;
}
.bullet-list li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-sm);
}
.bullet-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--green);
  font-size: 1.2rem;
  line-height: 1.5;
}

.event-list {
  list-style: none;
  padding: 0;
  margin-top: var(--space-md);
}

.event-list li {
  margin-bottom: var(--space-sm);
  padding: var(--space-md);
  background-color: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.event-list li:hover {
  border-color: var(--green);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.event-list a {
  text-decoration: none;
  color: var(--text-main);
  display: block;
}

.event-list a h3 {
  font-size: 1.1rem;
  color: var(--dark-green);
  margin: 0 0 var(--space-xs) 0;
  transition: color 0.2s ease;
}

.event-list a:hover h3 {
  color: var(--green);
}

.event-list time {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.event-meta {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}
.event-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.35em 0.9em;
  background-color: var(--yellow-light);
  border: 1px solid hsl(48, 40%, 88%);
  border-radius: 2em;
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--dark-green);
}
.event-meta__item::before {
  font-style: normal;
}
.event-meta__item--date::before {
  content: "📅";
}
.event-meta__item--lieu::before {
  content: "📍";
}

.amep-join {
  background: var(--bg-cream);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-lg);
  border-left: 4px solid var(--yellow);
}
.amep-join h3 {
  color: var(--dark-green);
  margin-bottom: var(--space-sm);
}

.amep-documents {
  margin-top: var(--space-md);
}
.amep-documents a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--dark-green);
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  background: var(--white);
  border-radius: var(--radius-sm);
  margin-right: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
  border: 1px solid var(--border-light);
}
.amep-documents a:hover {
  border-color: var(--green);
  color: var(--green);
}

.content img {
  max-width: 100%;
  height: calc(var(--logo-height-desktop) * 0.75);
  margin: 1rem 0;
}
@media (max-width: 768px) {
  .content img {
    height: calc(var(--logo-height-mobile) * 0.75);
  }
}

.content a {
  color: var(--dark-green);
}

.doc-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--dark-green);
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  background: var(--white);
  border-radius: var(--radius-sm);
  margin-right: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
  border: 1px solid var(--border-light);
}
.doc-link:hover {
  border-color: var(--green);
  color: var(--green);
}
.doc-link__icon {
  font-size: 1em;
}

footer {
  background-color: var(--dark-green);
  color: var(--white);
  padding: var(--space-lg) var(--space-md);
}

.footer-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  max-width: var(--container-width);
  margin: 0 auto;
}
@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.footer-brand img {
  height: var(--logo-height-desktop);
  margin-bottom: var(--space-sm);
  background-color: var(--white);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
}
@media (max-width: 768px) {
  .footer-brand img {
    height: var(--logo-height-mobile);
  }
}

.footer-links a:focus-visible,
.footer-bottom a:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

.footer-links h4 {
  color: var(--yellow);
  margin-bottom: var(--space-sm);
  font-size: 1rem;
  font-weight: 600;
}
.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links ul li {
  margin-bottom: var(--space-xs);
}
.footer-links a {
  color: var(--yellow) !important;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.footer-links a:hover {
  color: #ffda4b;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: var(--text-on-dark-muted);
}
.footer-bottom a {
  color: var(--yellow) !important;
}

.eco-note {
  font-size: 0.8rem;
  color: var(--text-on-dark-muted);
  margin-top: var(--space-xs);
}