:root {
  --vert-fonce: #17361a;
  --vert: #2f6b2a;
  --vert-clair: #7cb342;
  --creme: #f7f9f2;
  --carte: #ffffff;
  --texte: #1c2419;
  --texte-doux: #55604f;
  --bordure: #e0e6d8;
  --ombre: 0 1px 2px rgb(23 54 26 / 0.06), 0 8px 24px rgb(23 54 26 / 0.06);
  --rayon: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --creme: #11150f;
    --carte: #1a2016;
    --texte: #e8eee3;
    --texte-doux: #a3b09b;
    --bordure: #2c3626;
    --vert-clair: #9ccc65;
    --ombre: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--creme);
  color: var(--texte);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
  background: rgb(124 179 66 / 0.16);
  padding: 0.15em 0.4em;
  border-radius: 5px;
}

/* ---------- Héros ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--vert-fonce), var(--vert));
  color: #f2f7ee;
  padding: clamp(3rem, 9vw, 6.5rem) 1.5rem clamp(3rem, 7vw, 5rem);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vert-clair);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 4.5rem);
  font-weight: 800;
}

.lede {
  margin: 1rem 0 0;
  max-width: 46ch;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: #d9e6d2;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.stat {
  flex: 1 1 140px;
  padding: 1rem 1.25rem;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: var(--rayon);
  background: rgb(255 255 255 / 0.07);
  backdrop-filter: blur(4px);
}

.stat__value {
  display: block;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat__unit {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: #c3d6ba;
}

.hero__art {
  position: absolute;
  right: -3rem;
  top: -2rem;
  width: min(46vw, 420px);
  opacity: 0.28;
  pointer-events: none;
}

/* ---------- Sections ---------- */

main {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) 1.5rem 1rem;
}

.section {
  margin-bottom: clamp(2.5rem, 7vw, 4.5rem);
}

.section h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--bordure);
}

/* ---------- Tableau ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  background: var(--carte);
  box-shadow: var(--ombre);
}

table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

caption {
  caption-side: bottom;
  padding: 0.9rem 1.1rem;
  font-size: 0.8rem;
  color: var(--texte-doux);
  text-align: left;
}

thead th {
  background: rgb(124 179 66 / 0.12);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texte-doux);
}

th,
td {
  padding: 0.75rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--bordure);
}

tbody th {
  font-weight: 600;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: rgb(124 179 66 / 0.07);
}

td:nth-child(2) {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

td:last-child {
  color: var(--texte-doux);
  font-size: 0.88rem;
}

/* ---------- Cartes ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}

.card {
  padding: 1.4rem;
  border: 1px solid var(--bordure);
  border-left: 3px solid var(--vert-clair);
  border-radius: var(--rayon);
  background: var(--carte);
  box-shadow: var(--ombre);
}

.card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  color: var(--vert);
}

@media (prefers-color-scheme: dark) {
  .card h3 {
    color: var(--vert-clair);
  }
}

.card p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--texte-doux);
}

/* ---------- Étapes ---------- */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: etape;
}

.steps li {
  counter-increment: etape;
  position: relative;
  padding: 0 0 1.5rem 3.25rem;
  border-left: 2px solid var(--bordure);
  margin-left: 1rem;
}

.steps li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.steps li::before {
  content: counter(etape);
  position: absolute;
  left: -1.05rem;
  top: -0.2rem;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--vert);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

/* ---------- Réserves ---------- */

.section--flat {
  padding: 1.75rem;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  background: var(--carte);
}

.section--flat h2 {
  border-bottom: none;
  margin-bottom: 0.75rem;
}

.notes {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--texte-doux);
}

.notes li {
  margin-bottom: 0.7rem;
}

.notes li::marker {
  color: var(--vert-clair);
}

.disclaimer {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--bordure);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--texte-doux);
}

/* ---------- Pied de page ---------- */

.footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3.5rem;
  font-size: 0.88rem;
  color: var(--texte-doux);
  border-top: 1px solid var(--bordure);
}

.footer p {
  margin: 0 0 0.75rem;
}

.footer__demo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.footer button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: var(--carte);
  color: var(--texte);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.footer button:hover {
  border-color: var(--vert-clair);
  background: rgb(124 179 66 / 0.12);
}

.footer button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--vert-clair);
  outline-offset: 2px;
}

.footer output {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
  word-break: break-all;
}

/* ---------- 404 ---------- */

.erreur {
  max-width: 520px;
  margin: 0 auto;
  padding: clamp(4rem, 15vh, 8rem) 1.5rem;
  text-align: center;
}

.erreur h1 {
  font-size: 4rem;
  margin: 0.5rem 0;
}

.erreur a {
  color: var(--vert);
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .erreur a {
    color: var(--vert-clair);
  }
}
