/* OPENGIS.ch courses
   Brand tokens taken from the opengis.ch theme: accent #82cb2a, secondary #2d3359.
   #82cb2a is too light for white text (2:1), so green surfaces carry navy text
   (6.1:1) and text links use the darker --green-ink (5.8:1 on white). */
:root {
  --green: #82cb2a;
  --green-strong: #74bb22;
  --green-ink: #3b7310;
  --green-tint: #eef8e2;
  --green-line: #cfe9b0;
  --navy: #2d3359;
  --navy-soft: #4a5078;
  --ink: #32373c;
  --muted: #5e646b;
  --line: #e2e6ea;
  --bg: #ffffff;
  --bg-soft: #f6f8f4;
  --warn: #b7791f;
  --warn-bg: #fff7e6;
  --warn-line: #f0c36d;
  --error: #b42d2d;
  --error-bg: #fdeeee;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(45, 51, 89, .06), 0 10px 30px rgba(45, 51, 89, .07);
  --shadow-hover: 0 2px 4px rgba(45, 51, 89, .08), 0 16px 40px rgba(45, 51, 89, .11);
  --font: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Roboto Slab", Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --space: clamp(1.25rem, 3vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg-soft);
  line-height: 1.65; font-size: 1.0625rem; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
main:focus { outline: none; }
a { color: var(--green-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, legend { font-family: var(--font-head); color: var(--navy); font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); line-height: 1.15; margin: 0 0 .75rem; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; line-height: 1.3; }
p { margin: 0 0 1rem; }
code { font-size: .95em; background: var(--green-tint); padding: .1em .4em; border-radius: 4px; color: var(--navy); }
.wrap { max-width: 74rem; margin: 0 auto; padding: 0 1.25rem; }
.page { padding-top: var(--space); padding-bottom: calc(var(--space) * 2.5); }
.lead { font-size: 1.15rem; max-width: 46rem; }
.hint { color: var(--muted); font-size: .95rem; margin: .35rem 0 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header { background: #fff; border-top: 5px solid var(--green); box-shadow: 0 1px 0 var(--line); position: relative; z-index: 2; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--navy); text-decoration: none;
  display: inline-flex; align-items: center; gap: .55rem; }
.brand:hover { color: var(--navy); }
.brand-mark { width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--green); display: inline-block;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .45); }
.brand-sub { font-family: var(--font); font-weight: 500; font-size: .95rem; color: var(--navy);
  background: var(--green-tint); border: 1px solid var(--green-line); border-radius: 999px; padding: .1rem .7rem; }
.main-nav { flex: 1; }
.main-nav ul, .lang-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.main-nav ul { gap: .25rem 1.75rem; }
.main-nav a { color: var(--navy); text-decoration: none; font-weight: 500; padding: .35rem 0; display: inline-block;
  border-bottom: 3px solid transparent; }
.main-nav a:hover { border-bottom-color: var(--green-line); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--green); }
.lang-nav ul { gap: .3rem; }
.lang-nav a { font-size: .85rem; font-weight: 600; color: var(--navy); text-decoration: none; padding: .3rem .55rem;
  border-radius: 6px; display: inline-block; }
.lang-nav a:hover { background: var(--green-tint); }
.lang-nav a[aria-current="true"] { background: var(--green); color: var(--navy); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: var(--navy);
  background-color: var(--green);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='360' viewBox='0 0 640 360' fill='none' stroke='%23ffffff' stroke-opacity='.22' stroke-width='1.5'%3E%3Cellipse cx='520' cy='180' rx='60' ry='38'/%3E%3Cellipse cx='515' cy='182' rx='110' ry='72'/%3E%3Cellipse cx='505' cy='186' rx='165' ry='110'/%3E%3Cellipse cx='495' cy='190' rx='225' ry='152'/%3E%3Cellipse cx='485' cy='196' rx='290' ry='198'/%3E%3Cellipse cx='475' cy='202' rx='360' ry='248'/%3E%3C/svg%3E"),
    linear-gradient(120deg, #8fd23a 0%, var(--green) 45%, var(--green-strong) 100%);
  background-repeat: no-repeat; background-position: right -120px center, 0 0; background-size: auto 140%, cover;
  padding: clamp(2.25rem, 6vw, 4rem) 0 clamp(2.25rem, 5vw, 3.25rem); }
.hero h1 { color: var(--navy); }
.hero .lead { color: var(--navy); margin-bottom: 0; }
.hero-catalogue { padding-bottom: clamp(5rem, 9vw, 6.5rem); }
.hero-compact { padding: clamp(1.75rem, 4vw, 2.75rem) 0; }
.hero-thin { padding: 0; height: 7rem; }
.hero-date { font-size: 1.2rem; font-weight: 500; margin: 0 0 1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; font-weight: 700; margin: 0 0 .75rem; color: var(--navy); opacity: .85; }
.breadcrumb { margin: 0 0 1rem; font-size: .95rem; }
.hero .breadcrumb a { color: var(--navy); font-weight: 500; }

/* ---------- buttons & links ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--green); color: var(--navy); border: 2px solid var(--green); border-radius: var(--radius-sm);
  padding: .65rem 1.3rem; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.25;
  transition: background-color .15s, border-color .15s, box-shadow .15s; }
.button:hover { background: var(--green-strong); border-color: var(--green-strong); color: var(--navy);
  box-shadow: 0 4px 14px rgba(116, 187, 34, .35); }
.button-secondary { background: #fff; color: var(--navy); border-color: var(--navy); }
.button-secondary:hover { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: none; }
.button-large { padding: .85rem 1.75rem; font-size: 1.075rem; }
.button-block { display: flex; width: 100%; }
.button[disabled] { opacity: .6; cursor: progress; }
.link { font-weight: 600; }
.link-quiet { font-weight: 500; color: var(--muted); }

/* ---------- panels ---------- */
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.5rem, 3.5vw, 2.25rem); }
.narrow { max-width: 44rem; }
.section-title { font-size: 1.5rem; margin: 0 0 1.5rem; }
.actions-row { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; margin: 1.5rem 0 0; }

/* ---------- filters ---------- */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.25rem 1.5rem; align-items: end;
  background: #fff; padding: 1.5rem 1.75rem; border-radius: var(--radius); box-shadow: var(--shadow);
  margin: calc(-1 * clamp(3.5rem, 7vw, 4.75rem)) 0 2.5rem; position: relative; }
.filters .field { margin: 0; }
.filter-actions { display: flex; gap: 1.25rem; align-items: center; }
.result-count { color: var(--muted); font-weight: 500; margin: 0 0 1.25rem; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.4rem; }
label { font-weight: 600; color: var(--navy); }
.optional { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; padding: .7rem .85rem; border: 1.5px solid #c5ccd3; border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); width: 100%; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: #9aa5b0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-ink); box-shadow: 0 0 0 4px rgba(130, 203, 42, .35); }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field-check { flex-direction: row; align-items: flex-start; gap: .75rem; }
.field-check input { width: 1.3rem; height: 1.3rem; margin-top: .2rem; flex: none; accent-color: var(--green-ink); }
.field-check label { font-weight: 400; color: var(--ink); }
.field-error { color: var(--error); font-weight: 600; margin: 0; font-size: .95rem; }
fieldset { border: 0; padding: 0; margin: 0 0 .5rem; min-width: 0; }
legend { font-size: 1.35rem; margin-bottom: 1.25rem; padding: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0 1.5rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.register-form > .hint:first-of-type { margin: 0 0 1.5rem; }
.terms { background: var(--green-tint); border-left: 5px solid var(--green); border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem; margin: 1rem 0 1.75rem; }
.terms h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
.terms #terms-text { color: var(--navy); }
.terms .field { margin-bottom: 0; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: 1.75rem; }
.card { position: relative; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.75rem 1.75rem 1.5rem; display: flex; flex-direction: column; border-top: 6px solid var(--green);
  transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-waitlist { border-top-color: var(--warn-line); }
.card-tentative { border-top-color: var(--navy-soft); }
.card-closed, .card-past { border-top-color: #c9ced4; }
.card-title { margin: .75rem 0 .35rem; font-size: 1.35rem; }
.card-title a { color: var(--navy); text-decoration: none; }
.card-title a:hover { color: var(--green-ink); }
.card-date { font-weight: 600; font-size: 1.05rem; color: var(--green-ink); margin: 0 0 1rem; }
.card-badges { margin: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.card-actions { margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: .9rem 1.4rem; align-items: center; }
.card .facts { margin-bottom: 1.25rem; }

.badge { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .01em; padding: .25rem .7rem;
  border-radius: 999px; line-height: 1.3; }
.badge-open { color: var(--navy); background: var(--green); }
.badge-waitlist { color: #6b4500; background: var(--warn-bg); box-shadow: inset 0 0 0 1px var(--warn-line); }
.badge-tentative { color: var(--navy); background: #fff; box-shadow: inset 0 0 0 1.5px var(--navy-soft); }
.badge-closed, .badge-past { color: var(--muted); background: #eef0f2; }
.badge-pending { color: var(--navy-soft); background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.hero .badge-open { background: var(--navy); color: #fff; }
.hero .badge-pending { background: rgba(255, 255, 255, .75); box-shadow: none; }

.facts { margin: 0; display: grid; gap: .55rem; }
.facts div { display: grid; grid-template-columns: 9.5rem 1fr; gap: .75rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); font-weight: 500; }
.sessions { margin: 1.5rem 0 .5rem; padding: 0; list-style: none; display: grid; gap: .5rem; counter-reset: s; }
.sessions li { counter-increment: s; display: flex; gap: .75rem; align-items: baseline; background: var(--green-tint);
  border-radius: var(--radius-sm); padding: .6rem .9rem; color: var(--navy); }
.sessions li::before { content: counter(s); font-weight: 700; color: var(--green-ink); min-width: 1.2rem; }

/* ---------- notices & empty states ---------- */
.notice { border-left: 5px solid var(--green); background: var(--green-tint); padding: 1rem 1.25rem;
  border-radius: var(--radius-sm); margin: 1.5rem 0; color: var(--navy); }
.notice p { margin: .2rem 0; }
.notice ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.notice-warn { border-color: var(--warn-line); background: var(--warn-bg); }
.notice-error { border-color: var(--error); background: var(--error-bg); }
.notice-error a { color: var(--error); }
.empty { padding: 3.5rem 1.5rem; text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.empty p:first-child { font-size: 1.15rem; color: var(--navy); }

/* ---------- edition page ---------- */
.split { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
.edition .notice { margin-bottom: 0; }
.more { margin: 1.5rem 0 0; }
.booking { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem; border-top: 6px solid var(--green); }
.booking-price { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: var(--navy); margin: 0; line-height: 1.2; }
.booking-meta { color: var(--muted); margin: .25rem 0 1rem; }
.others { margin-top: 3.5rem; }

/* ---------- registration ---------- */
.register-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
.selected { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem;
  border-top: 6px solid var(--green); }
.selected h2, .selected-label { margin: 0 0 .75rem; font-family: var(--font); font-size: .8rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--green-ink); font-weight: 700; }
.selected-title { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; color: var(--navy); margin: 0 0 .75rem; }
.selected .card-badges { margin-bottom: 1.25rem; }
.selected .facts div { grid-template-columns: 8rem 1fr; }
.selected .facts { margin-bottom: 1.5rem; }
.selected p:last-child { margin-bottom: 0; }
.register-main > .notice:first-child { margin-top: 0; }

/* ---------- status ---------- */
.status { max-width: 46rem; margin: -4.5rem auto 0; position: relative; text-align: left; }
.status-icon { display: flex; align-items: center; justify-content: center; width: 4rem; height: 4rem; border-radius: 50%;
  font-size: 2rem; font-weight: 700; margin-bottom: 1.25rem; background: var(--green); color: var(--navy); }
.status-done .status-icon::before { content: "✓"; }
.status-processing .status-icon { background: var(--green-tint); }
.status-processing .status-icon::before { content: "…"; }
.status-failed .status-icon { background: var(--error-bg); color: var(--error); }
.status-failed .status-icon::before { content: "!"; }
.status-edition { background: var(--green-tint); border-radius: var(--radius-sm); padding: 1.1rem 1.25rem; margin: 1.5rem 0; }
.status-edition p { margin: 0; color: var(--navy); }
.status-edition .selected-title { margin: 0 0 .25rem; font-size: 1.15rem; }
.status .hint { margin: 0 0 1.25rem; }
.status > p:last-child { margin: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #d9dcea; padding: 2.75rem 0; margin-top: auto; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.25rem 3rem; align-items: center; justify-content: space-between; }
.footer-brand { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: #fff; margin: 0;
  display: inline-flex; align-items: center; gap: .55rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }
.footer-links a { color: var(--green); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

/* ---------- responsive ---------- */
@media (min-width: 56rem) {
  .register-layout { grid-template-columns: minmax(0, 1.75fr) minmax(18rem, 1fr); gap: 2.5rem; }
  .register-layout .selected { order: 2; position: sticky; top: 1.5rem; }
  .split { grid-template-columns: minmax(0, 1.75fr) minmax(17rem, 1fr); gap: 2.5rem; }
  .booking { position: sticky; top: 1.5rem; }
}
@media (max-width: 40rem) {
  .brand { flex: 1; }
  .main-nav { order: 3; flex-basis: 100%; }
  .header-inner { gap: .75rem 1rem; }
  .filters { padding: 1.25rem; }
  .card { padding: 1.5rem 1.35rem 1.25rem; }
  .terms { padding: 1.1rem 1.15rem; }
}
@media (max-width: 30rem) {
  .facts div, .selected .facts div { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .card:hover { transform: none; }
}
