﻿:root {
  color-scheme: light dark;
  --forest: #12402a;
  --forest-soft: #1a5237;
  --btn: #1b6b3f;
  --btn-hover: #14552f;
  --green: #1b6b3f;
  --green-tint: #e6f1e9;
  --red: #b52c1b;
  --arrow: #e8513a;
  --bg: #fff;
  --sand: #f6f3ea;
  --surface: #fff;
  --ink: #1b2a21;
  --muted: #55655b;
  --line: #dfe3da;
  --on-dark: #fff;
  --on-dark-muted: #d3e2d8;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --width: 1180px;
  --gutter: 22px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --green: #7ccb98;
    --green-tint: #1c3528;
    --red: #f0907f;
    --bg: #101a14;
    --sand: #16231b;
    --surface: #1a2a20;
    --ink: #edf3ee;
    --muted: #aebdb2;
    --line: #2d4034;
  }
}

:root[data-theme="dark"] {
  --green: #7ccb98;
  --green-tint: #1c3528;
  --red: #f0907f;
  --bg: #101a14;
  --sand: #16231b;
  --surface: #1a2a20;
  --ink: #edf3ee;
  --muted: #aebdb2;
  --line: #2d4034;
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 104px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--sans); }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.18; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); margin-bottom: 12px; }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--arrow); outline-offset: 2px; }
.wrap { width: 100%; max-width: var(--width); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: 80px 0; }
.section-sand { background: var(--sand); }
.lead { max-width: 60ch; margin: 0 0 40px; color: var(--muted); font-size: 1.1rem; }
.eyebrow { display: block; margin-bottom: 10px; color: var(--red); font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.text-link { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 6px; background: var(--forest); color: #fff; }
.skip-link:focus { top: 12px; }

/* Boutons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 12px 22px; border: 1px solid var(--btn); border-radius: 6px; background: var(--btn); color: #fff; font-weight: 600; line-height: 1.3; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.alt { background: transparent; border-color: var(--green); color: var(--green); }
.btn.alt:hover { background: var(--green-tint); }
.btn.light { background: #fff; border-color: #fff; color: var(--forest); }
.btn.light:hover { background: #e9f1eb; border-color: #e9f1eb; }
.btn.ghost { background: transparent; border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn.ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

/* Bandeau supérieur */
.topbar { background: var(--forest); color: var(--on-dark-muted); font-size: .9rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 20px; padding-top: 7px; padding-bottom: 7px; }
.topbar-contact { display: flex; gap: 22px; }
.topbar a:hover { color: #fff; text-decoration: underline; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { flex: none; width: 56px; height: 56px; object-fit: contain; border-radius: 50%; background: #fff; }
.brand-text { display: grid; line-height: 1.2; }
.brand-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.brand-full { color: var(--muted); font-size: .84rem; }
.main-nav { display: flex; align-items: center; gap: 26px; font-weight: 600; }
.main-nav a:not(.btn) { padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.main-nav a:not(.btn):hover { color: var(--green); border-bottom-color: currentColor; }
.main-nav a[aria-current="page"] { color: var(--green); border-bottom-color: currentColor; }
.main-nav .btn { padding: 9px 16px; white-space: nowrap; }
.menu-toggle { display: none; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); place-items: center; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--forest); color: var(--on-dark); }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 72px 56px 72px max(var(--gutter), calc((100vw - var(--width)) / 2 + var(--gutter))); }
.hero-tag { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; color: var(--on-dark-muted); font-size: .9rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hero-tag svg { flex: none; width: 44px; height: 14px; color: var(--arrow); }
.hero h1 { max-width: 15ch; font-size: clamp(2.3rem, 4.1vw, 3.6rem); line-height: 1.1; }
.hero p { max-width: 50ch; margin: 22px 0 30px; color: var(--on-dark-muted); font-size: 1.14rem; }
.hero-media { position: relative; min-height: 540px; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 42% center; }

/* Repères */
.facts { border-bottom: 1px solid var(--line); background: var(--surface); }
.facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.fact { padding: 30px 24px; border-left: 1px solid var(--line); }
.fact:first-child { padding-left: 0; border-left: 0; }
.fact dd { margin: 0; font-family: var(--serif); font-size: 2.3rem; font-weight: 600; line-height: 1.1; color: var(--green); }
.fact dt { margin-top: 4px; color: var(--muted); }
.fact > div { display: flex; flex-direction: column-reverse; }

/* Domaines */
.domains-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { padding: 26px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); }
.icon-box { display: grid; width: 46px; height: 46px; margin-bottom: 16px; place-items: center; border-radius: 8px; background: var(--green-tint); color: var(--green); }
.icon-box svg, .contact-line svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Zones */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.split .lead { margin-bottom: 0; }
.zone-list { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.zone-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.zone-name { font-family: var(--serif); font-size: 1.22rem; font-weight: 600; }
.zone-role { color: var(--muted); font-size: .96rem; text-align: right; }
.zone-note { margin: 16px 0 0; color: var(--muted); }

/* Actualités */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 32px; }
.section-head h2 { margin-bottom: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 24px; }
.post:only-child { max-width: 560px; }
.post { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); transition: border-color .15s ease; }
.post:hover { border-color: var(--green); }
.post:hover h3 { color: var(--green); }
.post-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--green-tint); }
.post-body { display: flex; flex: 1; flex-direction: column; padding: 20px 22px 22px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-bottom: 8px; color: var(--muted); font-size: .92rem; }
.post-category { color: var(--red); font-weight: 600; }
.post h3 { margin-bottom: 10px; transition: color .15s ease; }
.post p { margin-bottom: 14px; color: var(--muted); }
.post-more { margin-top: auto; color: var(--green); font-weight: 600; }
.empty { color: var(--muted); }

/* Appel aux partenaires */
.cta { padding: 64px 0; background: var(--forest); color: var(--on-dark); }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.cta h2 { margin-bottom: 8px; }
.cta p { max-width: 58ch; margin: 0; color: var(--on-dark-muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.contact-card h3 { margin-bottom: 2px; }
.contact-role { margin-bottom: 14px; color: var(--muted); }
.contact-lines { display: grid; gap: 4px; }
.contact-lines a { overflow-wrap: anywhere; color: var(--green); }
.contact-lines a:hover { text-decoration: underline; }

/* Pied de page */
.site-footer { background: var(--forest); color: var(--on-dark-muted); font-size: .97rem; }
.footer-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; padding-top: 56px; padding-bottom: 44px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: #fff; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; }
.footer-brand img { width: 52px; height: 52px; border-radius: 50%; background: #fff; }
.footer-main p { max-width: 38ch; margin: 0; }
.footer-title { margin: 0 0 12px; color: #fff; font-family: var(--sans); font-size: 1rem; font-weight: 600; }
.footer-links { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-links a { overflow-wrap: anywhere; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.social-link { display: inline-flex; align-items: center; gap: 10px; }
.social-link svg { flex: none; width: 18px; height: 18px; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .16); font-size: .88rem; }
.footer-legal .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 16px; padding-bottom: 16px; }
.footer-legal a:hover { color: #fff; text-decoration: underline; }

/* En-tête de page et article */
.page-head { padding: 52px 0; background: var(--sand); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.page-head .lead { margin: 10px 0 0; }
.article { max-width: 800px; }
.breadcrumb { margin-bottom: 18px; color: var(--muted); font-size: .94rem; }
.breadcrumb a { color: var(--green); }
.breadcrumb a:hover { text-decoration: underline; }
.article h1 { margin-bottom: 14px; font-size: clamp(1.95rem, 4.2vw, 2.9rem); }
.article .post-meta { margin-bottom: 26px; font-size: 1rem; }
.article-body { max-width: 68ch; font-size: 1.1rem; line-height: 1.75; }
.article-back { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.image-carousel { margin: 0 0 30px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--green-tint); }
.slide { display: none; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.slide.is-active { display: block; }
.carousel-controls { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--surface); border-top: 1px solid var(--line); }
.carousel-btn { display: grid; width: 40px; height: 40px; padding: 0 0 3px; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); font-size: 1.5rem; line-height: 1; }
.carousel-btn:hover { border-color: var(--green); color: var(--green); }
.carousel-status { color: var(--muted); font-weight: 600; }

/* Formulaires et administration */
form { display: grid; gap: 16px; max-width: 640px; }
.btns form { max-width: none; }
label { display: grid; gap: 6px; font-weight: 600; }
input, textarea { padding: 11px 13px; border: 1px solid #8a968e; border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 400; }
button { border: 0; cursor: pointer; font: inherit; }
button.btn { cursor: pointer; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.msg { max-width: 640px; padding: 10px 14px; border: 1px solid rgba(143, 29, 20, .2); border-radius: 6px; background: #fde8e6; color: #8f1d14; }
.msg:empty, .msg.validation-summary-valid { display: none; }
.scroll { margin-top: 24px; overflow-x: auto; }
table { width: 100%; min-width: 560px; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: .9rem; }
td a { color: var(--green); text-decoration: underline; }
.row { display: flex; align-items: center; gap: 14px; }
.row form { margin: 0; }
button.link { padding: 0; background: none; color: var(--red); text-decoration: underline; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb { max-width: 220px; border-radius: 6px; }

/* Adaptation aux écrans */
@media (max-width: 1080px) {
  .brand-full { display: none; }
  .main-nav { gap: 18px; }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  section { padding: 60px 0; }
  .topbar-tag { display: none; }
  .topbar-inner { justify-content: center; }
  .brand-full { display: inline; }
  .js .menu-toggle { display: grid; }
  .js .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .js .main-nav.is-open { display: flex; }
  .js .main-nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .js .main-nav .btn { margin-top: 14px; padding: 12px 16px; text-align: center; }
  .header-inner { position: static; }
  html:not(.js) .header-inner { flex-wrap: wrap; }
  html:not(.js) .main-nav { flex-wrap: wrap; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-media { order: -1; min-height: 0; aspect-ratio: 16 / 9; }
  .hero-copy { padding: 44px var(--gutter) 52px; }
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { padding: 22px 20px; }
  .fact:nth-child(odd) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .domains-grid, .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-card:first-child { grid-column: 1 / -1; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .topbar-contact { gap: 14px; font-size: .84rem; }
  .brand img { width: 46px; height: 46px; }
  .brand-name { font-size: 1.1rem; }
  .brand-full { font-size: .74rem; }
  .domains-grid, .contact-grid, .footer-main { grid-template-columns: minmax(0, 1fr); }
  .footer-main { gap: 30px; }
  .fact dd { font-size: 1.9rem; }
  .cta .btns, .hero .btns { width: 100%; }
  .cta .btn, .hero .btn { flex: 1 1 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
