/* ==========================================================================
   Components. Each one owns its inner spacing and never its outer margin.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Proposal bar. De Bouana's only presence in the government chrome.
   Deliberately a different material (neutral graphite, no gold, no green)
   so it can never be mistaken for part of the Ministry's own site.
   -------------------------------------------------------------------------- */

.proposal-bar {
  background: #1C1F1C;
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--fs-2xs);
  letter-spacing: 0.02em;
}
.proposal-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-4);
  padding-block: var(--sp-2);
}
.proposal-bar__tag {
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  font-weight: 600;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: #1C1F1C;
  background: var(--blanc);
  padding: 2px var(--sp-2);
  border-radius: var(--r-xs);
}
.proposal-bar__text { flex: 1; min-width: 12rem; }
.proposal-bar a { color: var(--blanc); text-underline-offset: 0.25em; }
.proposal-bar a:hover { color: var(--or-clair); }
.proposal-bar__close {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-lg);
  line-height: 1;
  padding: var(--sp-1) var(--sp-2);
}
.proposal-bar__close:hover { color: var(--blanc); }
.proposal-bar[hidden] { display: none; }


/* --------------------------------------------------------------------------
   State bar. Republic identity, language, search.
   -------------------------------------------------------------------------- */

.statebar {
  background: var(--vert-nuit);
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--fs-2xs);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.statebar__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: 2.5rem;
  padding-block: var(--sp-2);
}
.statebar__republic {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.statebar__republic strong {
  color: var(--blanc);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.statebar__motto {
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  letter-spacing: var(--ls-wide);
  color: var(--or-clair);
  text-transform: uppercase;
}
.statebar__tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
@media (max-width: 40rem) {
  .statebar__motto { display: none; }
}

/* Language toggle: a real segmented control, not a dropdown, because the
   audit asks for both languages to read as first-class. */
.lang {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.lang__btn {
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  color: rgba(255, 255, 255, 0.72);
  padding: var(--sp-1) var(--sp-3);
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.lang__btn:hover { color: var(--blanc); background: rgba(255, 255, 255, 0.1); }
.lang__btn[aria-pressed="true"] {
  background: var(--or);
  color: var(--vert-nuit);
}


/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--vert-profond);
  color: var(--blanc);
  border-bottom: 2px solid var(--or);
}
.masthead__bar {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: 4.5rem;
  padding-block: var(--sp-3);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.brand__emblem {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.brand__text { display: grid; gap: 1px; }
.brand__name {
  font-family: var(--ff-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--blanc);
}
.brand__sub {
  font-size: var(--fs-2xs);
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.72);
  max-width: 22ch;
}
@media (max-width: 30rem) {
  .brand__sub { display: none; }
}

.masthead__nav { margin-left: auto; }
.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  padding: var(--sp-3) var(--sp-3);
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.nav__link:hover { background: rgba(255, 255, 255, 0.1); color: var(--blanc); }
.nav__link[aria-current="page"] {
  color: var(--blanc);
  box-shadow: inset 0 -2px 0 var(--or);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.nav__link[aria-expanded="true"] { background: rgba(255, 255, 255, 0.12); color: var(--blanc); }
.nav__caret {
  width: 0.5rem; height: 0.5rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-out);
}
.nav__link[aria-expanded="true"] .nav__caret { transform: translateY(1px) rotate(-135deg); }

/* Mega menu panel */
.megamenu {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--surface);
  color: var(--ink);
  border-bottom: 2px solid var(--or);
  box-shadow: var(--shadow-lg);
}
.megamenu[hidden] { display: none; }
.megamenu__inner {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  padding-block: var(--sp-6);
}
.megamenu__col { display: grid; gap: var(--sp-3); align-content: start; }
.megamenu__heading {
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  font-weight: 600;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--vert-etat);
}
.megamenu__list { display: grid; gap: var(--sp-1); }
.megamenu__link {
  display: block;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  text-decoration: none;
  padding: var(--sp-2) var(--sp-3);
  margin-inline: calc(var(--sp-3) * -1);
  border-radius: var(--r-sm);
}
.megamenu__link:hover { background: var(--vert-brume); color: var(--vert-profond); }
.megamenu__feature {
  background: var(--vert-brume);
  border: 1px solid var(--ligne);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  display: grid;
  gap: var(--sp-3);
  align-content: start;
}

/* Mobile drawer */
.nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: var(--sp-2);
  color: var(--blanc);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: var(--sp-3);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--r-sm);
}
.nav-toggle__bars {
  display: grid; gap: 3px; width: 1rem;
}
.nav-toggle__bars span {
  height: 2px; background: currentColor; border-radius: 1px;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background: rgba(7, 42, 32, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}
.drawer[data-open="true"] { opacity: 1; pointer-events: auto; }
.drawer__panel {
  position: absolute;
  inset-block: 0;
  right: 0;
  width: min(22rem, 88vw);
  background: var(--vert-profond);
  color: var(--blanc);
  overflow-y: auto;
  padding: var(--sp-5) var(--sp-5) var(--sp-8);
  transform: translateX(100%);
  transition: transform var(--dur-base) var(--ease-out);
  box-shadow: var(--shadow-lg);
}
.drawer[data-open="true"] .drawer__panel { transform: translateX(0); }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--ligne-sombre);
  margin-bottom: var(--sp-4);
}
.drawer__close { color: var(--blanc); font-size: var(--fs-xl); line-height: 1; padding: var(--sp-2); }
.drawer__group { border-bottom: 1px solid var(--ligne-sombre); padding-block: var(--sp-2); }
.drawer__label {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--blanc);
  padding: var(--sp-3) 0;
  text-decoration: none;
}
.drawer__sub { display: grid; gap: var(--sp-1); padding: 0 0 var(--sp-3) var(--sp-4); }
.drawer__sub[hidden] { display: none; }
.drawer__sub a {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  padding: var(--sp-2) 0;
  display: block;
}
.drawer__sub a:hover { color: var(--or-clair); }

@media (max-width: 67.49rem) {
  .masthead__nav { display: none; }
  .nav-toggle { display: flex; }
}
@media (min-width: 67.5rem) {
  .drawer { display: none; }
}


/* --------------------------------------------------------------------------
   Alert banner. Red is used here and nowhere else.
   -------------------------------------------------------------------------- */

.alert {
  background: var(--rouge-etat);
  color: var(--blanc);
}
.alert__inner {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  padding-block: var(--sp-3);
  font-size: var(--fs-sm);
}
.alert__label {
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  font-weight: 600;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 1px var(--sp-2);
  border-radius: var(--r-xs);
  white-space: nowrap;
}
.alert a { color: var(--blanc); font-weight: 600; }


/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  padding: var(--sp-3) var(--sp-5);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--vert-etat); color: var(--blanc); }
.btn--primary:hover { background: var(--vert-profond); color: var(--blanc); }

.btn--gold { background: var(--or); color: var(--vert-nuit); }
.btn--gold:hover { background: var(--or-clair); color: var(--vert-nuit); }

.btn--outline {
  border-color: var(--ligne-forte);
  color: var(--vert-profond);
  background: var(--surface);
}
.btn--outline:hover { border-color: var(--vert-etat); color: var(--vert-etat); }

.btn--ghost-dark {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--blanc);
}
.btn--ghost-dark:hover { background: rgba(255, 255, 255, 0.12); color: var(--blanc); }

.btn--sm { font-size: var(--fs-xs); padding: var(--sp-2) var(--sp-4); }
.btn--block { width: 100%; }

/* A link that reads as forward motion without being a button. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--vert-etat);
  text-decoration: none;
}
.link-arrow::after {
  content: "";
  width: 0.45rem; height: 0.45rem;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-out);
}
.link-arrow:hover::after { transform: rotate(45deg) translate(2px, -2px); }
.link-arrow--dark { color: var(--or-clair); }


/* --------------------------------------------------------------------------
   Chips. The digital-completeness chip is the honest part of the design:
   every service states how much of it can actually be finished online.
   -------------------------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--ff-body);
  font-size: var(--fs-3xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 3px var(--sp-3);
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.chip--online   { background: var(--vert-voile); color: #0A5C42; border-color: #B8D8CB; }
.chip--physical { background: var(--ambre-voile); color: var(--ambre); border-color: #E6D2A0; }
.chip--info     { background: var(--vert-brume); color: var(--ink-2); border-color: var(--ligne); }
.chip--alert    { background: var(--rouge-voile); color: var(--rouge-etat); border-color: #EFC5CB; }

/* Portal tag: which system the service actually runs on today. */
.tag-portal {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ink-3);
}
.tag-portal::before {
  content: "";
  width: 1px; height: 0.75rem;
  background: var(--or);
}


/* --------------------------------------------------------------------------
   Service card. The signature component.
   -------------------------------------------------------------------------- */

.svc {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-5) 0;
  overflow: hidden;
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.svc:hover {
  border-color: var(--vert-etat);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.svc:focus-within {
  border-color: var(--vert-etat);
  box-shadow: var(--shadow-md);
}

/* Guilloche corner: the engraved texture of a security document. */
.svc::before {
  content: "";
  position: absolute;
  top: -3.5rem; right: -3.5rem;
  width: 9rem; height: 9rem;
  color: var(--vert-etat);
  background-image: var(--guilloche);
  opacity: 0.09;
  pointer-events: none;
}

.svc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.svc__code {
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  font-weight: 600;
  letter-spacing: var(--ls-wider);
  color: var(--vert-profond);
  background: var(--vert-voile);
  padding: 2px var(--sp-2);
  border-radius: var(--r-xs);
}
.svc__title {
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: var(--ls-normal);
}
.svc__title a {
  color: var(--vert-profond);
  text-decoration: none;
}
.svc__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.svc__title a:hover { color: var(--vert-etat); }
.svc__summary {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  color: var(--ink-2);
  flex: 1;
}

.svc__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin: 0;
  padding-top: var(--sp-1);
}
.svc__meta > div { display: grid; gap: 1px; }
.svc__meta dt {
  font-size: var(--fs-3xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ink-3);
}
.svc__meta dd {
  margin: 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink);
}

/* Machine-readable strip. Borrowed from the bottom of a travel document,
   and carrying the same reference the case record shows. */
.svc__strip {
  margin-inline: calc(var(--sp-5) * -1);
  margin-top: auto;
  padding: var(--sp-2) var(--sp-5);
  background: var(--vert-brume);
  border-top: 1px solid var(--ligne);
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  letter-spacing: 0.14em;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Compact variant for the homepage strip. */
.svc--compact { padding-block-start: var(--sp-4); }
.svc--compact .svc__title { font-size: var(--fs-md); }
.svc--compact .svc__summary { font-size: var(--fs-xs); }


/* --------------------------------------------------------------------------
   Task buttons. The four things most people come to the site to do.
   -------------------------------------------------------------------------- */

.tasks {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}
.task {
  position: relative;
  display: grid;
  gap: var(--sp-2);
  align-content: start;
  padding: var(--sp-4) var(--sp-4) var(--sp-5);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-md);
  color: var(--blanc);
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.task:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: var(--or);
  color: var(--blanc);
  transform: translateY(-2px);
}
.task__icon { width: 1.5rem; height: 1.5rem; color: var(--or-clair); }
.task__label {
  font-family: var(--ff-display);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.25;
}
.task__note {
  font-size: var(--fs-2xs);
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.4;
}


/* --------------------------------------------------------------------------
   Lookup panel and case record. The one orchestrated moment on the site.
   -------------------------------------------------------------------------- */

.lookup {
  background: var(--surface);
  border-radius: var(--r-md);
  border-top: 3px solid var(--or);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.lookup__head {
  padding: var(--sp-5) var(--sp-5) var(--sp-3);
  display: grid;
  gap: var(--sp-2);
}
.lookup__title {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--vert-profond);
}
.lookup__note { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.45; }
.lookup__form { padding: 0 var(--sp-5) var(--sp-5); display: grid; gap: var(--sp-3); }
.lookup__row { display: flex; gap: var(--sp-2); }
.lookup__row .field { flex: 1; }
.lookup__samples {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  font-size: var(--fs-2xs); color: var(--ink-3);
  align-items: center;
}
.lookup__sample {
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  color: var(--vert-etat);
  background: var(--vert-brume);
  border: 1px dashed var(--ligne-forte);
  border-radius: var(--r-xs);
  padding: 2px var(--sp-2);
}
.lookup__sample:hover { background: var(--vert-voile); border-style: solid; }

.lookup__result { border-top: 1px solid var(--ligne); }
.lookup__result[hidden] { display: none; }

/* Case record: styled as the official slip the service would actually issue.
   It sets its own ink because it is a light surface that appears inside the
   dark hero, where the inherited colour would be white on near-white. */
.record {
  background: var(--vert-brume);
  color: var(--ink);
  padding: var(--sp-5);
  display: grid;
  gap: var(--sp-4);
  animation: record-in var(--dur-slow) var(--ease-out) both;
}
@keyframes record-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.record__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); flex-wrap: wrap;
}
.record__id {
  font-family: var(--ff-mono);
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--vert-profond);
}
.record__grid {
  display: grid;
  gap: var(--sp-3) var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  margin: 0;
}
.record__grid > div { display: grid; gap: 2px; }
.record__grid dt {
  font-size: var(--fs-3xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ink-3);
}
.record__grid dd { margin: 0; font-size: var(--fs-sm); font-weight: 600; }
.record__strip {
  font-family: var(--ff-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.16em;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--r-xs);
  padding: var(--sp-2) var(--sp-3);
  overflow-x: auto;
  white-space: nowrap;
}
.record__empty {
  padding: var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  background: var(--ambre-voile);
  border-left: 3px solid var(--ambre);
}


/* --------------------------------------------------------------------------
   Timeline. Case progress, and the service journey on detail pages.
   -------------------------------------------------------------------------- */

.timeline { display: grid; gap: 0; }
.timeline__step {
  position: relative;
  display: grid;
  gap: var(--sp-1);
  padding: 0 0 var(--sp-5) var(--sp-6);
  border-left: 2px solid var(--ligne);
}
.timeline__step:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline__step::before {
  content: "";
  position: absolute;
  left: -0.4375rem; top: 0.3rem;
  width: 0.75rem; height: 0.75rem;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--ligne-forte);
}
.timeline__step[data-state="done"] { border-left-color: var(--vert-etat); }
.timeline__step[data-state="done"]::before {
  background: var(--vert-etat);
  border-color: var(--vert-etat);
}
.timeline__step[data-state="current"]::before {
  background: var(--or);
  border-color: var(--or);
  box-shadow: 0 0 0 4px var(--or-voile);
}
.timeline__step[data-state="physical"]::before {
  background: var(--ambre);
  border-color: var(--ambre);
}
.timeline__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
}
.timeline__meta { font-size: var(--fs-2xs); color: var(--ink-3); }
.timeline__body { font-size: var(--fs-sm); color: var(--ink-2); line-height: var(--lh-normal); }

/* Numbered journey. The numbers are used only where order genuinely matters. */
.journey { display: grid; gap: var(--sp-5); counter-reset: step; }
.journey__step {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: start;
}
.journey__step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--ff-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--or);
  padding-top: 2px;
  border-top: 2px solid var(--or);
}
.journey__title { font-size: var(--fs-md); font-weight: 600; margin-bottom: var(--sp-1); }
.journey__body { font-size: var(--fs-sm); color: var(--ink-2); }


/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field { display: grid; gap: var(--sp-2); }
.field__label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.field__hint { font-size: var(--fs-2xs); color: var(--ink-3); }

.input, .select, .textarea {
  width: 100%;
  font-size: var(--fs-sm);
  background: var(--surface);
  border: 1px solid var(--ligne-forte);
  border-radius: var(--r-sm);
  padding: var(--sp-3) var(--sp-4);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.input:hover, .select:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--vert-etat);
  box-shadow: 0 0 0 3px var(--vert-voile);
  outline-offset: 3px;
}
.input--mono { font-family: var(--ff-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.input::placeholder { color: #9AA69E; }

.select {
  appearance: none;
  padding-right: var(--sp-7);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position:
    calc(100% - 1.15rem) calc(50% + 2px),
    calc(100% - 0.8rem) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* Search field with a leading icon. */
.searchfield { position: relative; }
.searchfield .input { padding-left: 2.75rem; }
.searchfield__icon {
  position: absolute;
  left: var(--sp-4);
  top: 50%;
  transform: translateY(-50%);
  width: 1.05rem; height: 1.05rem;
  color: var(--ink-3);
  pointer-events: none;
}

/* Filter bar above catalogues and directories. */
.filters {
  display: grid;
  gap: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--r-md);
  padding: var(--sp-5);
}
.filters__row {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}
.filters__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  font-size: var(--fs-xs);
  color: var(--ink-3);
  border-top: 1px solid var(--ligne);
  padding-top: var(--sp-3);
}
.filters__count strong { color: var(--ink); font-weight: 700; }


/* --------------------------------------------------------------------------
   Mission card and directory
   -------------------------------------------------------------------------- */

.mission {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-left: 3px solid var(--vert-etat);
  border-radius: var(--r-sm);
  padding: var(--sp-5);
  transition: box-shadow var(--dur-base) var(--ease-out),
              border-left-color var(--dur-base) var(--ease-out);
}
.mission:hover { box-shadow: var(--shadow-md); border-left-color: var(--or); }
.mission__head { display: grid; gap: var(--sp-1); }
.mission__city {
  font-family: var(--ff-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--vert-profond);
}
.mission__type {
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ink-3);
}
.mission__contacts { display: grid; gap: var(--sp-2); font-size: var(--fs-xs); }
.mission__contacts a { color: var(--vert-etat); }
.mission__row { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: var(--sp-2); align-items: start; }
.mission__row svg { width: 0.95rem; height: 0.95rem; color: var(--ink-3); margin-top: 3px; }
.mission__services { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.mission__service {
  font-size: var(--fs-3xs);
  color: var(--ink-2);
  background: var(--vert-brume);
  border: 1px solid var(--ligne);
  border-radius: var(--r-xs);
  padding: 2px var(--sp-2);
}
.mission__foot {
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--ligne);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.mission__urgent {
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: var(--rouge-etat);
}


/* --------------------------------------------------------------------------
   News
   -------------------------------------------------------------------------- */

.news {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.news:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.news__media {
  aspect-ratio: 16 / 9;
  background: var(--vert-profond);
  position: relative;
  overflow: hidden;
}
.news__media svg,
.news__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.news:hover .news__media img { transform: scale(1.03); }
.news__body { padding: var(--sp-4) var(--sp-5) var(--sp-5); display: grid; gap: var(--sp-2); flex: 1; }
.news__cat {
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  font-weight: 500;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--vert-etat);
}
.news__title {
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-normal);
}
.news__title a { color: var(--vert-profond); text-decoration: none; }
.news__title a:hover { color: var(--vert-etat); text-decoration: underline; }
.news__date { font-size: var(--fs-2xs); color: var(--ink-3); margin-top: auto; padding-top: var(--sp-2); }
.news__excerpt { font-size: var(--fs-sm); color: var(--ink-2); line-height: var(--lh-normal); }

/* Dense list variant, used for secondary feeds. */
.newslist { display: grid; }
.newslist__item {
  display: grid;
  gap: var(--sp-1);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--ligne);
}
.newslist__item:first-child { padding-top: 0; }
.newslist__item:last-child { border-bottom: 0; }
.newslist__title { font-size: var(--fs-sm); font-weight: 600; }
.newslist__title a { color: var(--vert-profond); text-decoration: none; }
.newslist__title a:hover { text-decoration: underline; }


/* --------------------------------------------------------------------------
   Panels, callouts, stats, tables
   -------------------------------------------------------------------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--r-md);
  padding: var(--sp-5);
}
.panel--tint { background: var(--vert-brume); }
.panel--gold { background: var(--or-voile); border-color: #E4D3A2; }
/* For use inside .section--dark, where the surface must stay translucent. */
.panel--dark {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}
.panel--dark .panel__title { color: var(--blanc); }
.panel__title {
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: var(--sp-3);
  font-family: var(--ff-display);
}

.callout {
  border-left: 3px solid var(--or);
  background: var(--or-voile);
  padding: var(--sp-4) var(--sp-5);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.callout--finding {
  border-left-color: var(--vert-etat);
  background: var(--vert-voile);
}
.callout--gap {
  border-left-color: var(--ambre);
  background: var(--ambre-voile);
}
.callout__label {
  display: block;
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  font-weight: 600;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--sp-2);
}

.stat { display: grid; gap: var(--sp-1); }
.stat__value {
  font-family: var(--ff-display);
  font-size: var(--fs-2xl);
  font-weight: 300;
  line-height: 1;
  color: var(--vert-profond);
  font-variant-numeric: tabular-nums;
}
.stat__label { font-size: var(--fs-xs); color: var(--ink-2); }
.stat--dark .stat__value { color: var(--or-clair); }
/* Any stat inside a dark section, whether or not it carries the modifier. */
.stat--dark .stat__label,
.section--dark .stat__label { color: rgba(255, 255, 255, 0.76); }

.table-wrap { overflow-x: auto; border: 1px solid var(--ligne); border-radius: var(--r-md); background: var(--surface); }
.table { font-size: var(--fs-sm); min-width: 34rem; }
.table th, .table td {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--ligne);
  vertical-align: top;
}
.table th {
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--vert-brume);
  white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--vert-brume); }

/* Accordion, used for FAQs so the FAQPage structured data has a visible home. */
.accordion { border-top: 1px solid var(--ligne); }
.accordion__item { border-bottom: 1px solid var(--ligne); }
.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  width: 100%;
  text-align: left;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--vert-profond);
  padding: var(--sp-4) 0;
}
.accordion__trigger:hover { color: var(--vert-etat); }
.accordion__sign {
  position: relative;
  width: 0.85rem; height: 0.85rem;
  flex-shrink: 0;
}
.accordion__sign::before,
.accordion__sign::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.accordion__sign::before { inset: 45% 0; height: 1.5px; }
.accordion__sign::after  { inset: 0 45%; width: 1.5px; }
.accordion__trigger[aria-expanded="true"] .accordion__sign::after { transform: rotate(90deg); opacity: 0; }
.accordion__panel { padding: 0 0 var(--sp-5); font-size: var(--fs-sm); color: var(--ink-2); max-width: var(--measure); }
.accordion__panel[hidden] { display: none; }


/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-2xs);
  color: var(--ink-3);
  padding-block: var(--sp-4);
}
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--vert-etat); text-decoration: underline; }
.crumbs li + li::before { content: "·"; margin-right: var(--sp-2); color: var(--ligne-forte); }
.crumbs li { display: flex; align-items: center; }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }


/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.sitefoot {
  background: var(--vert-nuit);
  color: rgba(255, 255, 255, 0.74);
  font-size: var(--fs-sm);
  border-top: 3px solid var(--or);
}
.sitefoot__main {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  padding-block: var(--sp-8);
}
.sitefoot__brand { display: grid; gap: var(--sp-3); align-content: start; }
.sitefoot__emblem { width: 3.5rem; height: auto; }
.sitefoot__title {
  color: var(--blanc);
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: var(--fs-md);
}
.sitefoot__heading {
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  font-weight: 600;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--or-clair);
  margin-bottom: var(--sp-3);
}
.sitefoot__list { display: grid; gap: var(--sp-2); }
.sitefoot a { color: rgba(255, 255, 255, 0.78); text-decoration: none; font-size: var(--fs-xs); }
.sitefoot a:hover { color: var(--blanc); text-decoration: underline; }
.sitefoot address { font-style: normal; font-size: var(--fs-xs); line-height: var(--lh-relaxed); }

.sitefoot__gov {
  border-top: 1px solid var(--ligne-sombre);
  padding-block: var(--sp-5);
}
.sitefoot__govlist {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
}
.sitefoot__govlist a {
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  letter-spacing: var(--ls-wide);
  color: rgba(255, 255, 255, 0.6);
}

.sitefoot__legal {
  border-top: 1px solid var(--ligne-sombre);
  padding-block: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  align-items: center;
  font-size: var(--fs-2xs);
  color: rgba(255, 255, 255, 0.55);
}
.sitefoot__legal nav { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-left: auto; }

.social { display: flex; gap: var(--sp-2); }
.social a {
  display: grid;
  place-items: center;
  width: 2.25rem; height: 2.25rem;
  border: 1px solid var(--ligne-sombre);
  border-radius: var(--r-sm);
  color: rgba(255, 255, 255, 0.8);
}
.social a:hover { background: rgba(255, 255, 255, 0.1); color: var(--blanc); border-color: var(--or); }
.social svg { width: 1.05rem; height: 1.05rem; }


/* --------------------------------------------------------------------------
   Scroll reveal. Applied by reveal.js, inert when motion is reduced.
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}
