/*
Theme Name: LACOME ONG
Theme URI: https://lacome.org/
Author: LACOME ONG
Description: Thème institutionnel de LACOME ONG, consacré à l'environnement, à l'agroforesterie, à l'agriculture durable et à la gouvernance.
Version: 1.0.2
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: lacome-ong
*/

:root {
  --forest: #123f2d;
  --forest-deep: #08281c;
  --leaf: #2f6b49;
  --sage: #dce8dd;
  --cream: #f6f1e6;
  --paper: #fffdf8;
  --ochre: #c58b32;
  --ink: #1d2a24;
  --muted: #617067;
  --line: rgba(18, 63, 45, .16);
  --shadow: 0 22px 55px rgba(8, 40, 28, .12);
  --radius: 22px;
  --wrap: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--ochre); }
p { margin: 0 0 1.15em; }
h1, h2, h3, h4 {
  margin: 0 0 .55em;
  color: var(--forest-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.025em;
}
h1 { font-size: clamp(2.7rem, 6vw, 5.7rem); }
h2 { font-size: clamp(2.05rem, 4vw, 3.65rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.8rem); }
ul, ol { padding-left: 1.2rem; }
button, input, textarea, select { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  transform: translateY(-160%);
  color: #fff;
  background: var(--forest);
}
.skip-link:focus { transform: translateY(0); }
.wrap { width: var(--wrap); margin-inline: auto; }
.narrow { width: min(780px, calc(100% - 40px)); margin-inline: auto; }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  color: #fff;
  background: rgba(8, 40, 28, .96);
  backdrop-filter: blur(14px);
}
.header-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 13px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand img { width: 58px; height: 58px; object-fit: contain; }
.brand-name { display: block; font-family: Georgia, serif; font-size: 1.2rem; font-weight: 700; line-height: 1.05; }
.brand-note { display: block; margin-top: 4px; color: #c9d9ce; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.primary-menu { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.primary-menu a { display: block; padding: 9px 11px; color: #eaf1ec; font-size: .87rem; font-weight: 650; text-decoration: none; }
.primary-menu a:hover, .primary-menu .current-menu-item > a, .primary-menu .current_page_item > a { color: #fff; background: rgba(255,255,255,.1); border-radius: 999px; }
.menu-toggle { display: none; padding: 8px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: #fff; background: transparent; }

.hero {
  position: relative;
  min-height: 700px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: var(--forest-deep);
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,32,22,.92) 0%, rgba(6,32,22,.64) 48%, rgba(6,32,22,.16) 100%), linear-gradient(0deg, rgba(6,32,22,.65), transparent 55%); }
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-content { position: relative; z-index: 1; max-width: 820px; padding: 100px 0 90px; }
.hero h1, .hero p { color: #fff; }
.hero p { max-width: 710px; color: #e4eee8; font-size: clamp(1.08rem, 1.6vw, 1.32rem); }
.eyebrow { margin: 0 0 18px; color: var(--ochre); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 20px; border: 1px solid var(--ochre); border-radius: 999px; color: var(--forest-deep); background: var(--ochre); font-size: .9rem; font-weight: 800; text-decoration: none; }
.button:hover { color: #fff; background: transparent; }
.button-light { border-color: rgba(255,255,255,.62); color: #fff; background: transparent; }
.button-light:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.button-dark { color: #fff; background: var(--forest); border-color: var(--forest); }
.button-dark:hover { color: var(--forest); background: transparent; }

.section { padding: clamp(70px, 9vw, 120px) 0; }
.section-soft { background: var(--cream); }
.section-dark { color: #e6eee9; background: var(--forest-deep); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { display: grid; grid-template-columns: minmax(0, .8fr) minmax(300px, 1.2fr); gap: 8vw; align-items: end; margin-bottom: 52px; }
.section-head > p { max-width: 680px; margin: 0; color: var(--muted); font-size: 1.08rem; }
.section-dark .section-head > p { color: #bfcec4; }
.lead { color: var(--muted); font-size: 1.19rem; }

.stats { position: relative; z-index: 5; margin-top: -44px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.stat { padding: 30px 34px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; color: var(--forest); font-family: Georgia, serif; font-size: 2.55rem; line-height: 1; }
.stat span { display: block; margin-top: 9px; color: var(--muted); font-size: .88rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(35px, 7vw, 90px); align-items: center; }
.split-media { position: relative; }
.split-media img { width: 100%; min-height: 470px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.split-media::before { content: ""; position: absolute; z-index: -1; width: 42%; height: 42%; right: -18px; bottom: -18px; border-radius: 18px; background: var(--ochre); }
.check-list { display: grid; gap: 13px; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .56em; width: 12px; height: 12px; border-radius: 50%; background: var(--ochre); box-shadow: 0 0 0 5px rgba(197,139,50,.16); }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { position: relative; overflow: hidden; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.card img { width: calc(100% + 60px); max-width: none; height: 235px; margin: -30px -30px 26px; object-fit: cover; }
.card p { color: var(--muted); }
.card-tag { display: inline-block; margin-bottom: 15px; color: var(--leaf); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.card-link { font-weight: 800; text-decoration: none; }
.card-link::after { content: " →"; }
.feature-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.feature { min-height: 210px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.72); }
.feature-number { display: block; margin-bottom: 38px; color: var(--ochre); font-family: Georgia, serif; font-size: 1.45rem; }
.feature h3 { font-size: 1.18rem; }

.page-hero { padding: clamp(80px, 11vw, 145px) 0 78px; color: #fff; background: var(--forest-deep); }
.page-hero h1 { max-width: 1000px; color: #fff; }
.page-hero .lead { max-width: 760px; color: #d6e3da; }
.page-content > *:first-child { margin-top: 0; }
.page-content .section { margin-inline: calc(50% - 50vw); padding-inline: max(20px, calc((100vw - 1180px) / 2)); }
.content-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.info-panel { padding: 30px; border-left: 4px solid var(--ochre); border-radius: 0 18px 18px 0; background: var(--cream); }
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.principle { padding: 25px; border-top: 3px solid var(--ochre); background: #fff; box-shadow: 0 12px 28px rgba(8,40,28,.07); }
.project { display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: center; padding: 36px 0; border-bottom: 1px solid var(--line); }
.project:nth-child(even) .project-media { order: 2; }
.project-media img { width: 100%; height: 390px; object-fit: cover; border-radius: var(--radius); }
.project-meta { color: var(--leaf); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.gallery-grid { columns: 3; column-gap: 18px; }
.gallery-item { break-inside: avoid; margin: 0 0 18px; overflow: hidden; border-radius: 16px; background: var(--cream); }
.gallery-item img { width: 100%; }
.gallery-item figcaption { padding: 14px 17px; color: var(--muted); font-size: .86rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.contact-card { padding: 30px; border-radius: var(--radius); background: var(--cream); }
.contact-card a { font-weight: 750; }

.posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.post-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.post-card img { width: 100%; height: 310px; object-fit: cover; }
.post-card-body { padding: 30px; }
.post-meta { color: var(--leaf); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.entry-content { padding: 70px 0 100px; }
.entry-content > * { max-width: 780px; margin-left: auto; margin-right: auto; }
.entry-content > .wide { max-width: 1180px; }

.site-footer { color: #d9e4dc; background: #061e15; }
.footer-main { display: grid; grid-template-columns: 1.1fr .8fr 1.1fr; gap: 60px; padding: 68px 0 54px; }
.footer-brand p { max-width: 390px; color: #aebfb4; }
.footer-title { color: #fff; font-family: inherit; font-size: .75rem; letter-spacing: .13em; text-transform: uppercase; }
.footer-menu { margin: 0; padding: 0; list-style: none; columns: 2; }
.footer-menu a, .footer-contact a { color: #d9e4dc; text-decoration: none; }
.footer-contact p { margin-bottom: 12px; color: #aebfb4; font-size: .88rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 30px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.12); color: #91a69a; font-size: .78rem; }

@media (max-width: 1020px) {
  .menu-toggle { display: inline-flex; }
  .site-nav { position: absolute; inset: 86px 0 auto; display: none; padding: 18px 20px 24px; background: var(--forest-deep); border-top: 1px solid rgba(255,255,255,.12); }
  .site-nav.is-open { display: block; }
  .primary-menu { width: var(--wrap); margin: auto; display: grid; grid-template-columns: repeat(2, 1fr); }
  .primary-menu a { padding: 12px; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .principles { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  :root { --wrap: min(100% - 28px, 1180px); }
  body.admin-bar .site-header { top: 46px; }
  .header-inner { min-height: 76px; }
  .brand img { width: 50px; height: 50px; }
  .brand-note { display: none; }
  .site-nav { top: 76px; }
  .primary-menu { grid-template-columns: 1fr; }
  .hero { min-height: 650px; }
  .hero::after { background: linear-gradient(0deg, rgba(6,32,22,.96), rgba(6,32,22,.32)); }
  .hero-content { padding: 80px 0 72px; }
  .stats { margin-top: 0; }
  .stats-grid { grid-template-columns: 1fr; border-radius: 0; }
  .stat { padding: 24px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .section-head, .split, .content-grid, .contact-grid, .project, .posts-grid { grid-template-columns: 1fr; }
  .section-head { gap: 18px; }
  .split-media img { min-height: 330px; }
  .feature-grid, .card-grid, .principles { grid-template-columns: 1fr; }
  .project:nth-child(even) .project-media { order: 0; }
  .project-media img { height: 310px; }
  .gallery-grid { columns: 1; }
  .footer-main { grid-template-columns: 1fr; gap: 34px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { display: block; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
