/* ALUPA, feuille de style unique.
   Palette : un seul bloc, tiré des verts du logo « ALUPA, Autopromotion et Développement Durable ».
   --brand  = vert foncé du bandeau (titres, boutons, liens)
   --accent = vert clair du bandeau (filets, bordures)
   --leaf   = vert moyen (domaines) */
:root {
  --brand: #236b29;
  --accent: #44a345;
  --leaf: #2c842d;

  --bg: #ffffff;
  --panel: #eef3f6;
  --text: #1c2730;
  --muted: #4c5a66;
  --line: #d5dde3;
  --link: #236b29;
  --on-brand: #ffffff;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15202a;
    --panel: #1d2b37;
    --text: #e6ecf0;
    --muted: #a9b7c2;
    --line: #2e3f4d;
    --link: #8fd08f;
    --on-brand: #ffffff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15202a;
  --panel: #1d2b37;
  --text: #e6ecf0;
  --muted: #a9b7c2;
  --line: #2e3f4d;
  --link: #8fd08f;
  --on-brand: #ffffff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h2 { font-size: 1.75rem; color: var(--brand); }
:root[data-theme="dark"] h2 { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) h2 { color: var(--text); } }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); padding: 8px; z-index: 10; }

/* En-tête */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand img { height: 44px; width: auto; flex: none; }
.brand strong { display: block; font-size: 1.25rem; color: var(--brand); letter-spacing: .02em; }
:root[data-theme="dark"] .brand strong { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand strong { color: var(--text); } }
.brand span { display: block; font-size: .85rem; color: var(--text); line-height: 1.3; max-width: 22ch; }
.tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.lang a, .lang span { padding: 4px 10px; font-size: .9rem; font-weight: 600; text-decoration: none; }
.lang span { background: var(--brand); color: var(--on-brand); }
.lang a { color: var(--text); }
.shade { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 4px; padding: 4px 8px; font: inherit; font-size: .85rem; cursor: pointer; }
.nav { border-top: 1px solid var(--line); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px 18px; flex-wrap: wrap; }
.nav a { display: inline-block; padding: 8px 0; color: var(--text); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--link); text-decoration: underline; }

/* Introduction */
.hero { padding: 48px 0 40px; border-bottom: 4px solid var(--accent); }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); max-width: 22ch; color: var(--text); }
.hero .lead { font-size: 1.2rem; max-width: 46ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 28px 0; padding: 0; }
.facts div { border-top: 2px solid var(--brand); padding-top: 8px; }
.facts dt { font-size: .85rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 4px; font-weight: 600; text-decoration: none; }
.btn-main { background: var(--brand); color: var(--on-brand); }
.btn-alt { border: 2px solid var(--brand); color: var(--link); }

/* Sections */
section { padding: 48px 0; border-bottom: 1px solid var(--line); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.panel { background: var(--panel); padding: 20px; border-radius: 4px; }
.quote-line { font-size: 1.1rem; font-weight: 600; }
.values { list-style: none; padding: 0; margin: 0; }
.values li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.values li:last-child { border-bottom: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.timeline b { color: var(--brand); }
:root[data-theme="dark"] .timeline b { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .timeline b { color: var(--accent); } }

.domains { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px 32px; }
.domains article { border-top: 3px solid var(--leaf); padding-top: 12px; }
.domains .ex { color: var(--muted); font-size: .95rem; }

/* Références */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 4px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--panel); font-size: .85rem; }
td.amt { white-space: nowrap; }
.refs-cards { display: none; }
.ref { border-bottom: 1px solid var(--line); padding: 14px 0; }
.ref h3 { margin-bottom: .3em; }
.ref p { margin: 0 0 .3em; font-size: .95rem; }
.ref .meta { color: var(--muted); }
.note { color: var(--muted); font-size: .9rem; }
.other { columns: 2; column-gap: 32px; padding-left: 18px; }
.other li { break-inside: avoid; margin-bottom: 8px; font-size: .95rem; }

.cited { display: grid; gap: 20px; margin-top: 12px; }
.cited figure { margin: 0; padding: 16px 20px; background: var(--panel); border-radius: 4px; }
.cited blockquote { margin: 0 0 8px; font-size: 1rem; }
.cited .tr { color: var(--muted); font-size: .95rem; margin: 0 0 8px; }
.cited figcaption { font-size: .875rem; color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 8px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.gallery figcaption { font-size: .85rem; color: var(--muted); margin-top: 4px; }

.partners { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.partners ul { padding-left: 18px; margin: 0; }
.partners li { margin-bottom: 6px; }

.axes { counter-reset: axe; list-style: none; padding: 0; display: grid; gap: 16px; }
.axes li { padding: 14px 16px; background: var(--panel); border-radius: 4px; }
.axes b { display: block; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
address { font-style: normal; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 6px 0; }

footer { padding: 28px 0 40px; font-size: .9rem; color: var(--muted); }
footer p { margin: 0 0 .4em; }

@media (max-width: 860px) {
  .cols, .partners, .contact-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .other { columns: 1; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 0; }
  .site-header { position: static; }
  .table-scroll { display: none; }
  .refs-cards { display: block; }
  .brand span { display: none; }
  .nav ul { gap: 2px 14px; }
  .nav a { font-size: .9rem; padding: 6px 0; }
  section { padding: 36px 0; }
  .timeline li { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 380px) {
  .shade { padding: 4px 6px; }
  .brand img { height: 36px; }
}
#histoire[hidden] { display: none; }
