/* cfaic.org — site informatif. Direction éditoriale « baobab » : grand titrage, papier sable,
   pois vert/orange du feuillage, racines-circuits en séparateurs, section sombre « tronc ». */
:root {
  --g9: #0e3b1c; --g7: #155f2a; --g: #1b7a36; --g3: #8fc49c; --g1: #e5f1e7;
  --o: #ef7a1a; --o7: #b9560a; --o1: #fdeedd;
  --ink: #262322; --ink2: #57514e; --ink3: #8a837f;
  --paper: #f6f1e8; --paper2: #ece4d6; --white: #fffdf9;
  --fd: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --fb: "Figtree", "Segoe UI", system-ui, sans-serif;
  --roots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='26' viewBox='0 0 320 26'%3E%3Cg fill='none' stroke='%23262322' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M0 6h40l10 12h46l8-10h56l12 12h42l9-14h60l8 8h29'/%3E%3C/g%3E%3Cg fill='%23f6f1e8' stroke='%23262322' stroke-width='1.6'%3E%3Ccircle cx='50' cy='18' r='3.4'/%3E%3Ccircle cx='160' cy='8' r='3.4'/%3E%3Ccircle cx='228' cy='20' r='3.4'/%3E%3Ccircle cx='297' cy='14' r='3.4'/%3E%3C/g%3E%3C/svg%3E");
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--fb); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--g7); text-underline-offset: 3px; } a:hover { color: var(--o7); }
h1, h2, h3 { font-family: var(--fd); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 .4em; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 10px; top: 10px; background: #fff; padding: 8px; z-index: 99; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--ink3); }
:focus-visible { outline: 3px solid var(--o); outline-offset: 3px; }

/* ------------------------------------------------ Navigation */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px clamp(16px, 4vw, 48px); background: rgba(246,241,232,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--paper2); }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--fd); font-weight: 800; font-size: 1.15rem; }
.nav-brand b { color: var(--g); }
.nav nav { display: none; }
.nav-burger { width: 44px; height: 44px; display: grid; place-content: center; gap: 6px; cursor: pointer; border-radius: 12px; border: 1px solid var(--paper2); }
.nav-burger span { width: 22px; height: 2px; background: var(--ink); display: block; }
#nav-t:checked ~ nav { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); padding: 10px 16px 18px; border-bottom: 1px solid var(--paper2); }
.nav nav a { padding: 10px 4px; text-decoration: none; color: var(--ink); font-weight: 600; }
.nav-cta { background: var(--ink); color: #fff !important; border-radius: 999px; padding: 10px 18px !important; text-align: center; }
@media (min-width: 980px) {
  .nav-burger { display: none; }
  .nav nav { display: flex; align-items: center; gap: 6px; position: static; }
  .nav nav a { padding: 8px 10px; font-size: .95rem; }
  .nav nav a:not(.nav-cta):hover { color: var(--g); }
}

/* ------------------------------------------------ Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 24px; border-radius: 999px; font: 600 1rem var(--fb); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-orange { background: var(--o); color: #fff; box-shadow: 0 10px 24px -12px var(--o7); } .btn-orange:hover { background: var(--o7); color: #fff; }
.btn-green { background: var(--g); color: #fff; } .btn-green:hover { background: var(--g7); color: #fff; }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; } .btn-line:hover { background: var(--ink); color: #fff; }
.btn.block { width: 100%; }

/* ------------------------------------------------ Hero */
.hero { position: relative; display: grid; grid-template-columns: 1fr; gap: 20px 40px; padding: clamp(28px, 6vw, 72px) clamp(16px, 4vw, 48px) 40px; max-width: 1320px; margin: 0 auto; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.25fr 1fr; align-items: center; } }
.hero-dots { position: absolute; inset: 0; pointer-events: none; z-index: -1; opacity: .9;
  background-image: radial-gradient(circle, rgba(27,122,54,.22) 5px, transparent 6px), radial-gradient(circle, rgba(239,122,26,.28) 4px, transparent 5px), radial-gradient(circle, rgba(27,122,54,.12) 9px, transparent 10px);
  background-size: 140px 120px, 190px 170px, 260px 230px; background-position: 20px 30px, 90px 10px, 150px 60px;
  mask-image: radial-gradient(ellipse at 80% 30%, #000 10%, transparent 60%); -webkit-mask-image: radial-gradient(ellipse at 80% 30%, #000 10%, transparent 60%); }
.kicker { font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--o7); margin: 0 0 14px; }
.hero h1 { font-size: clamp(2.6rem, 8.4vw, 5.6rem); font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--g); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .14em; background: var(--o); border-radius: 4px; z-index: -1; transform: scaleX(0); transform-origin: left; animation: under .9s .5s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes under { to { transform: scaleX(1); } }
.hero-lead { font-size: clamp(1.02rem, 2vw, 1.2rem); color: var(--ink2); max-width: 58ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-logo { margin: 0; justify-self: center; max-width: 460px; width: 78vw; filter: drop-shadow(0 20px 30px rgba(38,35,34,.12)); animation: grow 1.1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes grow { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.counters { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 16px 0 0; background: var(--paper2); border: 1px solid var(--paper2); border-radius: 18px; overflow: hidden; }
@media (min-width: 760px) { .counters { grid-template-columns: repeat(4, 1fr); } }
.counters div { background: var(--white); padding: 16px 18px; }
.counters dt { font-size: .82rem; color: var(--ink3); font-weight: 600; }
.counters dd { margin: 4px 0 0; font-family: var(--fd); font-weight: 800; font-size: clamp(1.9rem, 5vw, 2.8rem); color: var(--g9); font-variant-numeric: tabular-nums; }
.counters div:nth-child(2) dd { color: var(--o7); }
.roots-divider { height: 26px; background: var(--roots) repeat-x 0 0 / 320px 26px; opacity: .55; margin: 10px 0; }

/* ------------------------------------------------ Sections */
.section { max-width: 1320px; margin: 0 auto; padding: clamp(40px, 7vw, 90px) clamp(16px, 4vw, 48px); }
.sec-head { max-width: 780px; margin-bottom: 34px; }
.sec-num { font-family: var(--fd); font-weight: 800; font-size: .95rem; color: var(--o7); letter-spacing: .1em; margin: 0 0 6px; }
.sec-num::before { content: ""; display: inline-block; width: 34px; height: 2px; background: var(--o); vertical-align: middle; margin-right: 10px; }
.section h2 { font-size: clamp(1.9rem, 5vw, 3.1rem); font-weight: 800; }
.sec-head p:not(.sec-num) { color: var(--ink2); font-size: 1.06rem; }

.missions { list-style: none; counter-reset: m; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .missions { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .missions { grid-template-columns: repeat(4, 1fr); } }
.missions li { counter-increment: m; background: var(--white); border-radius: 18px; padding: 22px 20px; position: relative; border: 1px solid var(--paper2); transition: transform .2s, box-shadow .2s; }
.missions li:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 16px 30px -20px rgba(38,35,34,.4); }
.missions li::before { content: counter(m, decimal-leading-zero); font-family: var(--fd); font-weight: 800; font-size: 2.4rem; color: var(--g1); position: absolute; right: 16px; top: 8px; -webkit-text-stroke: 1px var(--g3); }
.missions h3 { font-size: 1.15rem; margin-top: 18px; padding-right: 54px; } .missions p { color: var(--ink2); font-size: .95rem; margin: 0; }
.missions li.hl { background: var(--g); color: #fff; border-color: var(--g); } .missions li.hl p { color: #e6f3e9; } .missions li.hl::before { color: var(--g7); -webkit-text-stroke: 1px var(--g3); }

.section.dark { max-width: none; background: var(--ink); color: #f2ede4; position: relative; overflow: hidden; }
.section.dark > * { max-width: 1224px; margin-left: auto; margin-right: auto; }
.section.dark::before { content: ""; position: absolute; right: -80px; top: -60px; width: 360px; height: 360px; background-image: radial-gradient(circle, rgba(27,122,54,.6) 7px, transparent 8px), radial-gradient(circle, rgba(239,122,26,.6) 5px, transparent 6px); background-size: 46px 46px, 70px 70px; border-radius: 50%; opacity: .5; }
.section.dark h2 { color: #fff; } .section.dark .sec-head p:not(.sec-num) { color: #cfc8bd; }
.org { display: grid; gap: 30px; grid-template-columns: 1fr; position: relative; }
@media (min-width: 900px) { .org { grid-template-columns: 1.1fr 1fr; } }
.org-organs { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .org-organs { grid-template-columns: 1fr 1fr; } }
.org-organs article { border: 1px solid #4a4542; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 6px; background: rgba(255,255,255,.03); }
.org-organs b { font-family: var(--fd); font-size: 1.1rem; color: #fff; } .org-organs span { color: #bdb5a9; font-size: .92rem; }
.org-tree { list-style: none; margin: 0; padding: 0; }
.org-tree li { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; padding: 12px 0; position: relative; }
.org-tree li:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 38px; bottom: -6px; border-left: 2px dashed #6b6560; }
.org-tree .dot { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--ink); box-shadow: 0 0 0 2px #6b6560; }
.dot.g { background: var(--g); } .dot.o { background: var(--o); } .dot.w { background: #fff; }
.org-tree b { font-family: var(--fd); font-size: 1.2rem; color: #fff; } .org-tree small { color: #bdb5a9; }

/* ------------------------------------------------ Carte */
.map-wrap { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .map-wrap { grid-template-columns: minmax(0, 1fr) 320px; } }
.map { height: min(72vh, 620px); min-height: 380px; border-radius: 22px; overflow: hidden; background: var(--paper2); border: 1px solid var(--paper2); }
.map-fallback { padding: 20px; color: var(--ink3); }
.regions { background: var(--white); border-radius: 22px; padding: 20px; border: 1px solid var(--paper2); }
.regions h3 { font-size: 1.1rem; }
.regions ul { list-style: none; padding: 0; margin: 0 0 14px; }
.regions li button { width: 100%; display: flex; justify-content: space-between; background: none; border: 0; border-bottom: 1px dashed var(--paper2); padding: 9px 2px; font: inherit; cursor: pointer; color: var(--ink); }
.regions li button:hover { color: var(--g); } .regions li b { font-variant-numeric: tabular-nums; color: var(--g9); }
.legend { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; margin-bottom: 12px; } .legend span { display: flex; gap: 8px; align-items: center; }
.pin { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.45); display: inline-block; flex: none; }
.pin.active { background: var(--g); } .pin.panne { background: var(--o); } .pin.suspendue { background: #b3261e; } .pin.approx { background: transparent; border: 2px dashed var(--ink2); box-shadow: none; }
.links { font-size: .9rem; } .attrib { font-size: .8rem; color: var(--ink3); margin-top: 10px; }
.rl { background: none; border: 0; box-shadow: none; font-family: var(--fd); font-weight: 800; color: var(--g9); text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; font-size: .82rem; white-space: nowrap; text-align: center; }
.rl small { display: block; font-family: var(--fb); font-weight: 600; color: var(--o7); }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background-color: rgba(27,122,54,.25) !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background-color: rgba(27,122,54,.85) !important; color: #fff; font-weight: 700; }

/* ------------------------------------------------ Adhérer */
.adherer { background: linear-gradient(180deg, transparent, var(--g1) 30%, var(--g1)); max-width: none; }
.adherer > * { max-width: 1224px; margin-left: auto; margin-right: auto; }
.join { display: grid; gap: 30px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .join { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.join-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.join-steps li { counter-increment: s; display: grid; grid-template-columns: 54px 1fr; column-gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(27,122,54,.18); }
.join-steps li::before { content: counter(s); grid-row: span 2; font-family: var(--fd); font-weight: 800; font-size: 2rem; color: var(--g); line-height: 1; }
.join-steps b { font-family: var(--fd); font-size: 1.2rem; } .join-steps span { color: var(--ink2); }
.prices { background: var(--ink); color: #fff; border-radius: 26px; padding: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; position: relative; box-shadow: 0 30px 50px -30px rgba(14,59,28,.6); }
.price { display: flex; flex-direction: column; background: rgba(255,255,255,.06); border-radius: 16px; padding: 14px; }
.price.wide { grid-column: 1 / -1; }
.price span { font-size: .85rem; color: #cfc8bd; } .price b { font-family: var(--fd); font-size: 2.2rem; color: #ffc48f; line-height: 1.1; } .price small { color: #cfc8bd; }
.price.wide b small { font-size: .9rem; font-family: var(--fb); }
.pay, .fine { grid-column: 1 / -1; margin: 0; font-size: .92rem; } .fine { color: #a79f94; font-size: .8rem; }
.prices .btn { grid-column: 1 / -1; }

/* ------------------------------------------------ Vérifier / solutions */
.split { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.split article { background: var(--white); border-radius: 22px; padding: 28px; border: 1px solid var(--paper2); }
.split h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
.verify-box { border-top: 6px solid var(--g) !important; } .kb-box { border-top: 6px solid var(--o) !important; }
#verify-form { display: flex; gap: 10px; flex-wrap: wrap; }
#verify-form input { flex: 1 1 220px; min-height: 50px; border-radius: 999px; border: 2px solid var(--paper2); padding: 0 20px; font: inherit; }
#verify-form input:focus { border-color: var(--g); outline: none; }
.kb-box .btn { margin: 4px 6px 4px 0; }

/* ------------------------------------------------ Pied */
.foot { background: var(--g9); color: #d8e8dc; padding: 50px clamp(16px, 4vw, 48px) 30px; }
.foot-grid { max-width: 1224px; margin: 0 auto; display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot img { background: #fff; border-radius: 14px; padding: 6px; margin-bottom: 12px; }
.foot h3 { color: #fff; font-size: 1rem; } .foot a { color: #fff; } .foot p { margin: 0 0 6px; }
.foot-fine { max-width: 1224px; margin: 26px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.15); font-size: .82rem; color: #a9c2af; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------ Galerie « Vie du collectif » */
.gallery { padding-top: clamp(20px, 4vw, 40px); }
.mosaic { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; grid-auto-flow: dense; }
@media (min-width: 760px) { .mosaic { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; gap: 14px; } }
.ph { margin: 0; border-radius: 16px; overflow: hidden; position: relative; background: var(--paper2); }
.ph picture, .ph img { width: 100%; height: 100%; }
.ph img { object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .4s; filter: saturate(.95); }
.ph:hover img { transform: scale(1.05); filter: saturate(1.1); }
.ph::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(38,35,34,.08); border-radius: inherit; pointer-events: none; }
.ph.big { grid-column: span 2; grid-row: span 2; }
.ph.wide { grid-column: span 2; }
.ph.tall { grid-row: span 2; }
.ph.big::before { content: ""; position: absolute; left: 14px; bottom: 14px; width: 54px; height: 6px; background: var(--o); border-radius: 3px; z-index: 1; }
