:root {
  --paper: #f4f0e7;
  --paper-2: #ece5d6;
  --bg: #f4f0e7;
  --ink: #20201b;
  --muted: #6b6557;
  --green: #3f6b4a;
  --green-dark: #243f2c;
  --brown: #7a5c3e;
  --clay: #b9764a;
  --blue: #2f5d8a;
  --blue-dark: #244a6e;
  --line: #d8d0bf;
  --line-strong: #b9af99;
  --card: #fbf9f3;
  --radius: 6px;

  /* Registre éditorial — manifeste imprimé */
  --serif: "Fraunces", "Spectral", Georgia, "Times New Roman", serif;
  --text-serif: "Spectral", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Grain discret façon papier, fixé pour ne pas peser au défilement */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* Le contenu passe au-dessus du grain */
.nav,
.hero,
.page-head,
main,
footer.site-footer {
  position: relative;
  z-index: 2;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.012em;
}

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

img,
svg {
  max-width: 100%;
}

.wrap {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

/* ---------- Skip link & accessibility ---------- */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--green-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 240, 231, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--green-dark);
  text-decoration: none;
  font-size: 1.22rem;
}

.brand svg {
  flex: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  align-items: center;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover {
  background: rgba(36, 63, 44, 0.08);
  color: var(--green-dark);
}

.nav-links a[aria-current="page"] {
  background: transparent;
  color: var(--green-dark);
  box-shadow: inset 0 -2px 0 var(--clay);
  border-radius: 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 4px;
  padding: 0.78rem 1.4rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

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

.btn-primary:hover {
  background: #1c3322;
  box-shadow: 0 12px 24px -14px rgba(36, 63, 44, 0.8);
}

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

.btn-ghost:hover {
  background: rgba(32, 32, 27, 0.05);
  border-color: var(--ink);
}

.btn-outline {
  background: transparent;
  border-color: var(--green);
  color: var(--green-dark);
}

.btn-outline:hover {
  background: rgba(63, 107, 74, 0.08);
}

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

/* ---------- Hero — composition éditoriale ---------- */

.hero {
  background:
    radial-gradient(70% 110% at 92% -10%, rgba(63, 107, 74, 0.1), transparent 55%),
    var(--paper);
  color: var(--ink);
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.4rem 3.5rem;
  align-items: end;
}

.eyebrow {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--green-dark);
  margin: 0 0 0.4rem;
  animation: ed-rise 0.7s 0.05s both;
}

.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

.hero h1 {
  grid-column: 1 / -1;
  font-size: clamp(3rem, 9vw, 6.6rem);
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 0.95;
  font-weight: 600;
  animation: ed-rise 0.7s 0.12s both;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--green);
}

.lede {
  font-family: var(--text-serif);
  font-size: 1.2rem;
  line-height: 1.7;
  max-width: 42ch;
  color: rgba(32, 32, 27, 0.82);
  margin: 1.2rem 0 0;
  animation: ed-rise 0.7s 0.2s both;
}

/* Folio / chiffre de revue, en marge droite */
.hero-figure {
  align-self: end;
  text-align: right;
  animation: ed-rise 0.7s 0.28s both;
}

.hero-folio {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 0.9;
  color: var(--clay);
  margin: 0;
}

.hero-folio span {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 0.55rem;
}

.cta-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
  animation: ed-rise 0.7s 0.34s both;
}

@keyframes ed-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Page header (subpages) ---------- */

.page-head {
  background:
    radial-gradient(60% 120% at 96% -20%, rgba(63, 107, 74, 0.08), transparent 55%),
    var(--paper);
  color: var(--ink);
  padding: clamp(2.6rem, 5vw, 3.6rem) 0 clamp(2rem, 4vw, 2.8rem);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.page-head p {
  margin: 0;
  max-width: 60ch;
  font-family: var(--text-serif);
  font-size: 1.12rem;
  color: rgba(32, 32, 27, 0.78);
}

/* ---------- Main layout ---------- */

main {
  padding: clamp(2.4rem, 5vw, 3.6rem) 0;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

section.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.4rem);
}

.card h2 {
  margin-top: 0;
  font-size: clamp(1.6rem, 3vw, 2rem);
  line-height: 1.1;
  color: var(--green-dark);
}

.card > p {
  max-width: 70ch;
}

.lead-in {
  font-family: var(--text-serif);
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 70ch;
}

/* ---------- Feature / scope grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.grid article {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 1.2rem 1.3rem 1.4rem;
  transition: background 0.2s ease;
}

.grid article:hover {
  background: var(--paper-2);
}

.grid h3 {
  margin: 0 0 0.35rem;
  font-size: 1.18rem;
  color: var(--green-dark);
}

.grid p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--muted);
}

/* ---------- Values list ---------- */

.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem 1.6rem;
  margin-top: 1.4rem;
  padding: 0;
  list-style: none;
}

.values li {
  border-left: 2px solid var(--clay);
  padding: 0.25rem 0 0.25rem 1rem;
}

.values strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--green-dark);
}

.values span {
  font-size: 0.92rem;
  color: var(--muted);
}

/* ---------- Project cards ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.project {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project h3 {
  margin: 0;
  color: var(--green-dark);
  font-size: 1.15rem;
}

.project p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--muted);
  flex: 1;
}

.status {
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

.status.active {
  background: rgba(63, 107, 74, 0.14);
  color: var(--green-dark);
}

.status.draft {
  background: rgba(122, 92, 62, 0.16);
  color: var(--brown);
}

.status.idea {
  background: rgba(47, 93, 138, 0.14);
  color: var(--blue);
}

.status.zone {
  background: rgba(185, 118, 74, 0.16);
  color: var(--clay);
}

.project-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

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

.faq {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

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

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--green-dark);
  padding: 0.9rem 0;
  list-style: none;
}

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

.faq summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  font-weight: 700;
  color: var(--blue);
}

.faq details[open] summary::before {
  content: "–";
}

.faq details p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- Resource list ---------- */

.resource-list {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.resource-list li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  background: var(--bg);
}

.resource-list h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  color: var(--green-dark);
}

.resource-list p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Members ---------- */

.members {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.member {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
}

.member .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 0.7rem;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  background: linear-gradient(150deg, var(--green), var(--blue));
}

.member h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--green-dark);
}

.member .role {
  font-size: 0.82rem;
  color: var(--brown);
  font-weight: 600;
}

.member p {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Events ---------- */

.events {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.event {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  background: var(--bg);
}

.event .date {
  flex: none;
  width: 64px;
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 1rem;
}

.event .date .day {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
}

.event .date .month {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.event h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--green-dark);
}

.event p {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Form ---------- */

.form {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
  max-width: 540px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green-dark);
}

.field input,
.field textarea,
.field select {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 93, 138, 0.15);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.hidden-field {
  position: absolute;
  left: -9999px;
}

/* ---------- Callout / CTA band ---------- */

.callout {
  position: relative;
  background:
    radial-gradient(80% 140% at 100% 0%, rgba(63, 107, 74, 0.45), transparent 60%),
    var(--green-dark);
  color: var(--paper);
  border: none;
  text-align: center;
  overflow: hidden;
}

.callout h2 {
  color: var(--paper);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.callout p {
  margin: 0 auto 1.6rem;
  font-family: var(--text-serif);
  font-size: 1.14rem;
  opacity: 0.92;
  max-width: 52ch;
}

.callout .btn-ghost {
  border-color: rgba(244, 240, 231, 0.5);
  color: var(--paper);
}

.callout .btn-ghost:hover {
  background: rgba(244, 240, 231, 0.12);
  border-color: var(--paper);
}

.callout .btn-primary {
  background: var(--paper);
  color: var(--green-dark);
}

.callout .btn-primary:hover {
  background: #fff;
  box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.5);
}

/* ---------- Tags ---------- */

.tags {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tags li {
  background: rgba(47, 93, 138, 0.08);
  color: var(--blue);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.fine {
  font-size: 0.92rem;
  color: var(--muted);
}

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

footer.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
}

footer.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.4rem;
  padding: 2.6rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

footer.site-footer a {
  color: var(--green-dark);
  text-decoration: none;
}

footer.site-footer a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Confirmation page ---------- */

.confirm {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.confirm .check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(63, 107, 74, 0.14);
  color: var(--green-dark);
  display: grid;
  place-items: center;
  margin: 0 auto 1.2rem;
  font-size: 2rem;
}

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

/* ---------- Brand logo chip ---------- */

.brand-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Language switcher ---------- */

.lang-switch {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
}

.lang-switch select {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--green-dark);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 1.6rem 0.35rem 0.7rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%232c4d35' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}

.lang-switch select:hover {
  background-color: rgba(63, 107, 74, 0.1);
}

.lang-switch select:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.foot-brand strong {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--green-dark);
}

/* CTA link inside the nav */
.nav-links .nav-cta {
  background: var(--green-dark);
  color: var(--paper);
  border-radius: 4px;
  box-shadow: none;
}

.nav-links .nav-cta:hover {
  background: #1c3322;
  color: var(--paper);
}

.nav-links .nav-cta[aria-current="page"] {
  background: #1c3322;
  color: var(--paper);
}

/* ---------- Three pillars (Savoir / Agir / Partager) ---------- */

.pillars {
  counter-reset: pillar;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0;
  margin-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.pillar {
  counter-increment: pillar;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 1.6rem 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pillar:last-child {
  border-right: none;
}

.pillar .icon {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--clay);
}

.pillar .icon::before {
  content: counter(pillar, decimal-leading-zero);
}

.pillar h3 {
  margin: 0.4rem 0 0;
  color: var(--green-dark);
  font-size: 1.32rem;
}

.pillar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  flex: 1;
}

.pillar a {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  align-self: flex-start;
  padding-bottom: 1px;
}

.pillar a:hover {
  border-color: var(--clay);
  color: var(--clay);
}

@media (max-width: 620px) {
  .pillar {
    border-right: none;
  }
}

/* ---------- Long-form prose (manifeste, articles) ---------- */

.prose {
  max-width: 68ch;
}

.prose p,
.prose li {
  font-family: var(--text-serif);
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink);
}

.prose h3 {
  color: var(--green-dark);
  font-size: 1.5rem;
  margin: 2rem 0 0.4rem;
}

.prose blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.6rem;
  border-left: 3px solid var(--clay);
  background: var(--paper-2);
  border-radius: 0 6px 6px 0;
  font-family: var(--text-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--green-dark);
}

.prose blockquote p {
  margin: 0;
  color: var(--green-dark);
}

/* ---------- Partners ---------- */

.partners {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}

.partners li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  background: var(--bg);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--green-dark);
}

/* ---------- Interactive map ---------- */

#map {
  height: 420px;
  width: 100%;
  margin-top: 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  z-index: 0;
}

.map-fallback {
  margin-top: 1.2rem;
  padding: 1.2rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.92rem;
}

.leaflet-popup-content {
  font-family: inherit;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-pin,
.legend-zone {
  display: inline-block;
  width: 14px;
  height: 14px;
}

.legend-pin {
  width: 11px;
  height: 16px;
  background: #2f6db5;
  border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%;
  clip-path: polygon(50% 100%, 0 38%, 50% 0, 100% 38%);
}

.legend-zone {
  border-radius: 50%;
  background: rgba(185, 118, 74, 0.55);
  border: 2px solid var(--clay);
}

.leaflet-popup-content strong {
  color: var(--green-dark);
}

/* ---------- News / blog ---------- */

.news-list {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.3rem 1.4rem;
  background: var(--bg);
}

.post .post-meta {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brown);
  font-weight: 600;
}

.post h3 {
  margin: 0.3rem 0 0.5rem;
  color: var(--green-dark);
  font-size: 1.2rem;
}

.post p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

article.full-post {
  max-width: 72ch;
}

article.full-post .post-meta {
  display: block;
  margin-bottom: 0.4rem;
}

/* ---------- Roadmap timeline ---------- */

.timeline {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0 0 0 1.4rem;
  border-left: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.timeline li {
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -1.95rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg);
}

.timeline .step {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--blue);
}

.timeline h3 {
  margin: 0.15rem 0 0.2rem;
  font-size: 1.05rem;
  color: var(--green-dark);
}

.timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Step list (how to contribute) ---------- */

.steps {
  counter-reset: step;
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.steps li {
  position: relative;
  padding: 1rem 1.2rem 1rem 3.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--green-dark);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.steps h3 {
  margin: 0 0 0.2rem;
  font-size: 1.02rem;
  color: var(--green-dark);
}

.steps p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ---------- License footer note ---------- */

.foot-license {
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  opacity: 0.85;
}

footer.site-footer .foot-brand {
  max-width: 36ch;
}

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

@media (max-width: 760px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-figure {
    text-align: left;
    order: 2;
    margin: 1.6rem 0 0;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
  }

  .nav .wrap {
    flex-wrap: wrap;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ---------- Right-to-left support (e.g. Arabic) ---------- */

[dir="rtl"] .skip-link {
  left: auto;
  right: -999px;
  border-radius: 0 0 0 8px;
}

[dir="rtl"] .skip-link:focus {
  right: 0;
}

[dir="rtl"] .lang-switch {
  margin-left: 0;
  margin-right: 0.35rem;
}

[dir="rtl"] .lang-switch select {
  padding: 0.35rem 0.7rem 0.35rem 1.6rem;
  background-position: left 0.6rem center;
}

/* ============================================================
   Enrichissements & modération (galerie, formulaire, file)
   ============================================================ */

.muted { color: var(--muted); }
.hint { font-size: 0.85rem; color: var(--muted); margin-top: 0.35rem; }

/* Filtres (puces) */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.6rem 0 1.2rem;
}
.chip {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.32rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--paper-2);
  color: var(--brown);
  border: 1px solid var(--line);
}
.badge-approved { background: #e3efe5; color: var(--green-dark); border-color: #bcd6c1; }
.badge-rejected { background: #f2e2da; color: var(--clay); border-color: #e0c4b3; }

/* Bouton compact */
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.9rem; }

/* Galerie publique */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.enrich-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.enrich-card h3 { margin: 0; color: var(--green-dark); }
.enrich-card p { margin: 0; }
.enrich-media {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.enrich-meta { font-size: 0.82rem; color: var(--muted); margin-top: auto; }

/* Alertes */
.alert {
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  margin-bottom: 1rem;
}
.alert-info    { background: #e8eef4; border-color: #c2d2e2; color: var(--blue-dark); }
.alert-success { background: #e3efe5; border-color: #bcd6c1; color: var(--green-dark); }
.alert-warning { background: #faf0d8; border-color: #e8d39a; color: #7a5a14; }
.alert-error   { background: #f6e1da; border-color: #e2b8a6; color: #8a3b22; }

/* Tableau de bord de modération */
.dash-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}
.dash-actions { display: flex; align-items: center; gap: 0.75rem; }
.mod-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 1rem;
  margin-bottom: 0.85rem;
}
.mod-item h3 { margin: 0.4rem 0; color: var(--green-dark); }
.mod-item p { margin: 0.3rem 0; }
.mod-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.mod-actions { display: flex; gap: 0.5rem; }
.mod-meta { font-size: 0.82rem; color: var(--muted); }
.mod-link { font-size: 0.9rem; }

/* ===========================================================================
   Améliorations communes (site-enhance.js) :
   assistant flottant, recherche, modèles & conseils de contribution.
   =========================================================================== */

/* Lecteur d'écran uniquement */
.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;
}

/* Bouton « lien » (texte cliquable, sans habillage de bouton) */
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--blue-dark);
  text-decoration: underline;
  cursor: pointer;
}
.link-btn:hover {
  color: var(--green-dark);
}

/* --- Assistant flottant --------------------------------------------------- */
.assistant-toggle {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--green-dark);
  background: var(--green);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(36, 63, 44, 0.28);
  transition: transform 0.15s ease, background 0.15s ease;
}
.assistant-toggle:hover {
  transform: translateY(-2px);
  background: var(--green-dark);
}
.assistant-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 5.5rem;
  z-index: 50;
  width: min(360px, calc(100vw - 2.5rem));
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(32, 32, 27, 0.25);
  overflow: hidden;
}
.assistant-panel[hidden] {
  display: none;
}
.assistant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  background: var(--green-dark);
  color: #fff;
}
.assistant-head strong {
  display: block;
  font-family: var(--serif);
}
.assistant-sub {
  display: block;
  font-size: 0.78rem;
  opacity: 0.85;
}
.assistant-close {
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.assistant-log {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--paper);
}
.assistant-msg {
  display: flex;
}
.assistant-msg-user {
  justify-content: flex-end;
}
.assistant-bubble {
  display: inline-block;
  max-width: 85%;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.assistant-msg-assistant .assistant-bubble {
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom-left-radius: 3px;
}
.assistant-msg-user .assistant-bubble {
  background: var(--blue);
  color: #fff;
  border-bottom-right-radius: 3px;
}
.assistant-msg.is-pending .assistant-bubble {
  color: var(--muted);
  font-style: italic;
}
.assistant-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem;
  border-top: 1px solid var(--line);
  background: var(--card);
}
.assistant-form input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: inherit;
}
.assistant-foot {
  margin: 0;
  padding: 0 0.7rem 0.6rem;
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--card);
}

/* --- Recherche ------------------------------------------------------------ */
.search-box {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.search-box input[type="search"] {
  flex: 1;
  min-width: 12rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: inherit;
}
.search-results {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.search-hit {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.search-hit:last-child {
  border-bottom: 0;
}
.search-hit h3 {
  margin: 0 0 0.2rem;
}
.search-hit-section {
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.search-results mark {
  background: rgba(185, 118, 74, 0.22);
  color: inherit;
  padding: 0 0.1em;
  border-radius: 2px;
}

/* --- Modèles & conseils de contribution ----------------------------------- */
.tpl-hint {
  margin-top: 0.4rem;
}
.quality-hints {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--clay);
  background: var(--paper-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.86rem;
  color: var(--muted);
}
.quality-hints:empty {
  display: none;
}
.quality-hints li {
  margin: 0.15rem 0;
}
.quality-hints li.quality-ok {
  color: var(--green-dark);
}

/* RTL : assistant à gauche, repère de modèle aligné */
[dir="rtl"] .assistant-toggle,
[dir="rtl"] .assistant-panel {
  right: auto;
  left: 1.25rem;
}
[dir="rtl"] .quality-hints {
  border-left: 0;
  border-right: 3px solid var(--clay);
  border-radius: var(--radius) 0 0 var(--radius);
}

@media (max-width: 520px) {
  .assistant-panel {
    right: 0.6rem;
    left: 0.6rem;
    bottom: 5rem;
    width: auto;
  }
}

/* ---------- Boutons de partage ---------- */
.share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  margin: 2.4rem 0 0.5rem;
  padding: 1rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.share-label {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--green-dark);
  margin-right: 0.3rem;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.share-btn:hover,
.share-btn:focus-visible {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--paper);
  outline: none;
}

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

.share-copy.is-copied {
  background: var(--green);
  border-color: var(--green);
  color: var(--paper);
}

/* Bulle de confirmation « Lien copié ! » */
.share-copy-feedback:not(:empty) {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  pointer-events: none;
}

[dir="rtl"] .share-label {
  margin-right: 0;
  margin-left: 0.3rem;
}
