/* =========================================================
   CKIO AUTARCIE -- Charte graphique Vert / Terre / Nature
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Nunito:wght@300;400;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --vert:       #3a7d44;
  --vert-clair: #5aad66;
  --vert-pale:  #a8d5b0;
  --vert-fonce: #1e4526;
  --terre:      #8b5e3c;
  --terre-clair:#c4916a;
  --creme:      #f5f0e8;
  --creme-fonce:#e8dfc8;
  --brun:       #3d2b1f;
  --blanc:      #fafaf7;
  --texte:      #2c2c2c;
  --texte-muted:#6b6b5e;
  --or-doux:    #c9a84c;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(58,125,68,0.12);
  --shadow-fort: 0 8px 40px rgba(58,125,68,0.22);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--creme);
  color: var(--texte);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ============ NAV ============ */
nav.main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 5vw, 3rem);
  height: 68px;
  background: rgba(30,69,38,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 2px solid var(--vert-clair);
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

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

.nav-logo-leaf { font-size: 1.6rem; line-height: 1; }

.nav-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--vert-pale);
  letter-spacing: 0.03em;
}

.nav-title span { color: var(--or-doux); }

.nav-links {
  display: flex;
  gap: clamp(0.8rem, 2vw, 1.8rem);
  list-style: none;
}

.nav-links a {
  color: var(--vert-pale);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--or-doux); }

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1100;
}

.nav-burger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--vert-pale);
  border-radius: 2px;
  transition: all 0.3s;
}

.nav-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay sombre */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1050;
}

.nav-overlay.open { display: block; }

/* Volet lateral */
.nav-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(300px, 80vw);
  height: 100dvh;
  background: var(--vert-fonce);
  border-left: 2px solid var(--vert-clair);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  padding: 5rem 2rem 2rem;
  gap: 0.4rem;
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.4);
  overflow-y: auto;
}

.nav-sidebar.open { right: 0; }

.nav-sidebar a {
  color: var(--vert-pale);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.nav-sidebar a:hover {
  background: rgba(168,213,176,0.12);
  border-color: rgba(168,213,176,0.25);
  color: var(--or-doux);
}

.sidebar-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: rgba(168,213,176,0.1);
  border: 1px solid rgba(168,213,176,0.25);
  color: var(--vert-pale);
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(6rem,12vw,10rem) clamp(1rem,5vw,3rem) clamp(4rem,8vw,6rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(58,125,68,0.4) 0%, transparent 70%),
    linear-gradient(180deg, var(--vert-fonce) 0%, #2d5a36 40%, var(--creme) 100%);
  z-index: 0;
}

.hero-leaves {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-leaf {
  position: absolute;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero-badge {
  display: inline-block;
  background: rgba(168,213,176,0.15);
  border: 1px solid var(--vert-clair);
  color: var(--vert-pale);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem,7vw,5rem);
  line-height: 1.12;
  color: var(--blanc);
  margin-bottom: 1rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--vert-pale);
}

.hero-sub {
  font-size: clamp(1rem,2.5vw,1.2rem);
  color: rgba(245,240,232,0.82);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  font-weight: 300;
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 100px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: 2px solid transparent;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
}

.btn-primary {
  background: var(--vert-clair);
  color: #fff;
  border-color: var(--vert-clair);
}

.btn-outline {
  background: rgba(250,250,247,0.15);
  border-color: rgba(168,213,176,0.8);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(168,213,176,0.25);
}

/* ============ SECTIONS ============ */
section { position: relative; z-index: 1; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1rem,5vw,3rem);
}

.section-pad { padding: clamp(4rem,8vw,7rem) 0; }

.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vert);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem,4.5vw,2.8rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-lead {
  font-size: clamp(1rem,2vw,1.1rem);
  color: var(--texte-muted);
  line-height: 1.75;
  max-width: 680px;
}

/* ============ QUI SOMMES-NOUS ============ */
.section-blanc { background: var(--blanc); }

.intro-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem,5vw,4rem);
  align-items: center;
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .intro-layout { grid-template-columns: 1fr; }
}

.intro-visual {
  background: linear-gradient(135deg, var(--vert-fonce), var(--vert), var(--vert-clair));
  border-radius: var(--radius);
  aspect-ratio: 1 / 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(4rem,10vw,8rem);
  box-shadow: var(--shadow-fort);
  position: relative;
  overflow: hidden;
  order: 2;
}

@media (max-width: 768px) {
  .intro-visual { order: 0; }
}

.intro-visual::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 30%;
  background: linear-gradient(transparent, rgba(30,69,38,0.5));
}

.intro-caption {
  position: absolute;
  bottom: 1rem; left: 1rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  font-style: italic;
  z-index: 1;
  font-family: 'Nunito', sans-serif;
}

/* ============ VALEURS ============ */
.valeurs-bg {
  background: var(--vert-fonce);
  color: var(--blanc);
}

.valeurs-bg .section-tag { color: var(--vert-pale); }
.valeurs-bg .section-title { color: var(--blanc); }
.valeurs-bg .section-lead { color: rgba(245,240,232,0.72); }

.valeurs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.valeur-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(168,213,176,0.15);
  border-radius: var(--radius);
  padding: clamp(1.5rem,3vw,2rem);
  transition: transform 0.2s, background 0.2s;
}

.valeur-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.1);
}

.valeur-icon { font-size: 2.2rem; margin-bottom: 1rem; display: block; }

.valeur-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--vert-pale);
  margin-bottom: 0.5rem;
}

.valeur-card p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(245,240,232,0.72);
}

/* ============ JARDIN ============ */
.jardin-bg { background: var(--blanc); }

.jardin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem,5vw,4rem);
  align-items: center;
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .jardin-layout { grid-template-columns: 1fr; }
}

.jardin-visual {
  background: linear-gradient(135deg, var(--vert-fonce), var(--vert), var(--vert-clair));
  border-radius: var(--radius);
  aspect-ratio: 1 / 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(4rem,10vw,8rem);
  box-shadow: var(--shadow-fort);
  position: relative;
  overflow: hidden;
}

.jardin-visual::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 30%;
  background: linear-gradient(transparent, rgba(30,69,38,0.5));
}

.jardin-list {
  list-style: none;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.jardin-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.6;
}

.jardin-list li::before { content: '🌱'; flex-shrink: 0; margin-top: 0.1rem; }

.stats-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stat-item { text-align: center; }

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: var(--vert);
  font-weight: 700;
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--texte-muted);
}

/* ============ CREDIT TEMPS ============ */
.credit-bg { background: var(--creme-fonce); }

.credit-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.credit-card {
  background: var(--blanc);
  border-radius: var(--radius);
  padding: clamp(1.5rem,3vw,2rem);
  border-left: 4px solid var(--vert);
  box-shadow: var(--shadow);
}

.credit-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--vert-fonce);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.credit-card p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--texte-muted);
}

.credit-highlight {
  background: linear-gradient(135deg, var(--vert-fonce), var(--vert));
  border-left: none;
}

.credit-highlight h3 { color: var(--vert-pale); }
.credit-highlight p { color: rgba(245,240,232,0.82); }

/* ============ MODULE ECOSYSTEME ============ */
.eco-bg {
  background: linear-gradient(180deg, var(--vert-fonce) 0%, var(--brun) 100%);
}

.ckio-module-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

#solde-ckio-container {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(168,213,176,0.25) !important;
  border-radius: var(--radius) !important;
  max-width: 420px;
  width: 100%;
}

/* ============ PROJETS ============ */
.projets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1.2rem;
  margin-top: 3rem;
}

.projet-card {
  background: rgba(58,125,68,0.07);
  border: 1px solid rgba(58,125,68,0.18);
  border-radius: var(--radius);
  padding: clamp(1.2rem,2.5vw,1.8rem);
  transition: transform 0.2s, background 0.2s;
}

.projet-card:hover {
  transform: translateY(-4px);
  background: rgba(58,125,68,0.13);
}

.projet-card .valeur-icon { font-size: 2rem; margin-bottom: 0.8rem; }

.projet-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--vert-fonce);
  margin-bottom: 0.4rem;
}

.projet-card p { font-size: 0.88rem; color: var(--texte-muted); line-height: 1.6; }

/* ============ CONTACT ============ */
.contact-bg { background: var(--creme); }

.contact-box {
  background: var(--blanc);
  border-radius: var(--radius);
  box-shadow: var(--shadow-fort);
  padding: clamp(2rem,5vw,3.5rem);
  max-width: 680px;
  margin: 3rem auto 0;
  text-align: center;
}

.contact-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }

.contact-box h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--vert-fonce);
  margin-bottom: 0.75rem;
}

.contact-box p {
  color: var(--texte-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--vert-fonce);
  color: var(--vert-pale);
  padding: 0.9rem 2rem;
  border-radius: 100px;
  text-decoration: none;
  font-family: 'DM Mono', monospace;
  font-size: clamp(0.78rem,2vw,0.9rem);
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
  word-break: break-all;
}

.contact-mail:hover {
  background: var(--vert);
  transform: translateY(-2px);
}

/* ============ FOOTER ============ */
footer {
  background: var(--brun);
  color: rgba(245,240,232,0.6);
  text-align: center;
  padding: 2rem clamp(1rem,5vw,3rem);
  font-size: 0.82rem;
  line-height: 1.8;
}

footer a { color: var(--vert-pale); text-decoration: none; }
footer a:hover { color: var(--or-doux); }

/* ============ SCROLL TOP ============ */
#scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px; height: 44px;
  background: var(--vert);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  z-index: 500;
  transition: background 0.2s, transform 0.2s;
}

#scroll-top:hover { background: var(--vert-clair); transform: translateY(-2px); }
#scroll-top.visible { display: flex; }

/* ============ FADE-IN ============ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible { opacity: 1; transform: none; }

/* ============ VAGUE ============ */
.wave-divider { width: 100%; overflow: hidden; line-height: 0; display: block; }
.wave-divider svg { width: 100%; height: auto; display: block; }

/* ============ COORDINATEURS ============ */
.coord-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.2rem;
  margin-top: 3rem;
}

.coord-card {
  background: var(--blanc);
  border-radius: var(--radius);
  padding: clamp(1.2rem,2.5vw,1.8rem);
  border-top: 4px solid var(--vert-clair);
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.coord-card:hover { transform: translateY(-3px); }

.coord-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--vert-clair);
  opacity: 0.5;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.coord-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--vert-fonce);
  margin-bottom: 0.4rem;
}

.coord-card p { font-size: 0.85rem; color: var(--texte-muted); line-height: 1.6; }

/* ============ MEMBRES ============ */
.membres-bg { background: var(--vert-fonce); }

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

.membre-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(168,213,176,0.2);
  border-radius: var(--radius);
  padding: clamp(1.2rem,2.5vw,1.8rem);
  text-align: center;
}

.membre-emoji { font-size: 2.5rem; display: block; margin-bottom: 0.8rem; }

.membre-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--vert-pale);
  margin-bottom: 0.4rem;
}

.membre-card p { font-size: 0.82rem; color: rgba(245,240,232,0.65); line-height: 1.5; }

.cotisation-badge {
  display: inline-block;
  background: rgba(201,168,76,0.15);
  border: 1px solid var(--or-doux);
  color: var(--or-doux);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  margin-top: 0.75rem;
}
