/* ==========================================================================
   Page-level compositions. Only things that exist on one or two pages.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Home hero. The thesis of the redesign: the service counter takes the
   position the news slider occupies on the current site.
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--vert-profond);
  color: var(--blanc);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -30%; right: -12%;
  width: 46rem; height: 46rem;
  color: var(--or);
  background-image: var(--guilloche);
  opacity: 0.10;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(105deg,
    var(--vert-nuit) 0%,
    var(--vert-profond) 52%,
    rgba(11, 61, 46, 0.72) 100%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  gap: var(--sp-7);
  padding-block: var(--sp-8) var(--sp-9);
  align-items: start;
}
@media (min-width: 62rem) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: var(--sp-8);
    padding-block: var(--sp-9) var(--sp-10);
  }
}

.hero__ask { display: grid; gap: var(--sp-5); }

.hero__question {
  font-size: var(--fs-4xl);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--blanc);
  max-width: 15ch;
}
.hero__question em {
  font-style: normal;
  font-weight: 600;
  color: var(--or-clair);
}
.hero__lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: rgba(255, 255, 255, 0.8);
  max-width: 46ch;
}

/* Page-load sequence. Suppressed wholesale by the reduced-motion block. */
.hero__ask > *,
.hero__panel { animation: hero-in var(--dur-story) var(--ease-out) both; }
.hero__ask > *:nth-child(1) { animation-delay: 60ms; }
.hero__ask > *:nth-child(2) { animation-delay: 130ms; }
.hero__ask > *:nth-child(3) { animation-delay: 200ms; }
.hero__ask > *:nth-child(4) { animation-delay: 270ms; }
.hero__panel { animation-delay: 340ms; }

@keyframes hero-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__ask > *, .hero__panel { animation: none; opacity: 1; transform: none; }
}

.hero__foot {
  border-top: 1px solid var(--ligne-sombre);
  padding-block: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4) var(--sp-7);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.66);
}
.hero__foot strong { color: var(--or-clair); font-weight: 600; }


/* --------------------------------------------------------------------------
   Portal map. Shows the fragmentation honestly, then the single front door
   placed over it. This is the argument of the proposal in one figure.
   -------------------------------------------------------------------------- */

.portalmap {
  display: grid;
  gap: var(--sp-4);
}
.portalmap__door {
  background: var(--vert-profond);
  color: var(--blanc);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  display: grid;
  gap: var(--sp-2);
  text-align: center;
  border: 1px solid var(--vert-etat);
}
.portalmap__door strong {
  font-family: var(--ff-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--or-clair);
}
.portalmap__door span { font-size: var(--fs-xs); color: rgba(255, 255, 255, 0.76); }

.portalmap__links {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  position: relative;
  padding-top: var(--sp-5);
}
.portalmap__links::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 1px; height: var(--sp-5);
  background: var(--ligne-forte);
}
.portalmap__node {
  background: var(--surface);
  border: 1px dashed var(--ligne-forte);
  border-radius: var(--r-sm);
  padding: var(--sp-4);
  display: grid;
  gap: var(--sp-1);
  text-align: center;
}
.portalmap__node strong {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  color: var(--vert-profond);
}
.portalmap__node span { font-size: var(--fs-2xs); color: var(--ink-3); }


/* --------------------------------------------------------------------------
   Mission locator strip
   -------------------------------------------------------------------------- */

.locator {
  display: grid;
  gap: var(--sp-5);
}
@media (min-width: 54rem) {
  .locator { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--sp-8); align-items: center; }
}
.locator__form { display: grid; gap: var(--sp-3); }
.locator__result { min-height: 1px; }


/* --------------------------------------------------------------------------
   Page header, used on every page except the home page
   -------------------------------------------------------------------------- */

.pagehead {
  background: var(--vert-profond);
  color: var(--blanc);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.pagehead::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -60%; right: -6%;
  width: 30rem; height: 30rem;
  color: var(--or);
  background-image: var(--guilloche);
  opacity: 0.08;
}
.pagehead__inner {
  display: grid;
  gap: var(--sp-4);
  padding-block: var(--sp-6) var(--sp-8);
  max-width: 60ch;
}
.pagehead__title { font-size: var(--fs-3xl); font-weight: 300; letter-spacing: -0.025em; color: var(--blanc); }
.pagehead__title strong { font-weight: 600; color: var(--or-clair); }
.pagehead__lead { font-size: var(--fs-lg); color: rgba(255, 255, 255, 0.8); }
.pagehead .crumbs { color: rgba(255, 255, 255, 0.6); padding-bottom: 0; }
.pagehead .crumbs a { color: rgba(255, 255, 255, 0.78); }
.pagehead .crumbs a:hover { color: var(--or-clair); }
.pagehead .crumbs [aria-current="page"] { color: var(--blanc); }
.pagehead .crumbs li + li::before { color: rgba(255, 255, 255, 0.35); }

/* Wide variant for the catalogue, which needs the full measure. */
.pagehead__inner--wide { max-width: none; }
.pagehead__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6) var(--sp-8);
  border-top: 1px solid var(--ligne-sombre);
  padding-top: var(--sp-5);
  margin-top: var(--sp-2);
}


/* --------------------------------------------------------------------------
   Service detail
   -------------------------------------------------------------------------- */

.svcfacts {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-top: 3px solid var(--or);
  border-radius: var(--r-md);
  padding: var(--sp-5);
}
.svcfacts__item { display: grid; gap: var(--sp-1); }
.svcfacts__label {
  font-size: var(--fs-3xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ink-3);
}
.svcfacts__value { font-size: var(--fs-md); font-weight: 600; color: var(--vert-profond); }

.checklist { display: grid; gap: var(--sp-3); }
.checklist__item {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.checklist__item::before {
  content: "";
  width: 1.05rem; height: 1.05rem;
  margin-top: 3px;
  border: 1.5px solid var(--vert-etat);
  border-radius: var(--r-xs);
  background-image: linear-gradient(45deg, transparent 42%, var(--vert-etat) 42%, var(--vert-etat) 58%, transparent 58%),
                    linear-gradient(-45deg, transparent 42%, var(--vert-etat) 42%, var(--vert-etat) 58%, transparent 58%);
  background-size: 62% 62%;
  background-position: center;
  background-repeat: no-repeat;
}


/* --------------------------------------------------------------------------
   Verification result
   -------------------------------------------------------------------------- */

.verdict {
  display: grid;
  gap: var(--sp-4);
  padding: var(--sp-6);
  border-radius: var(--r-md);
  border: 1px solid var(--ligne);
  background: var(--surface);
  color: var(--ink);
  animation: record-in var(--dur-slow) var(--ease-out) both;
}
.verdict[data-verdict="valid"] { border-color: #B8D8CB; background: var(--vert-voile); }
.verdict[data-verdict="unknown"] { border-color: #EFC5CB; background: var(--rouge-voile); }
.verdict__mark {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--ff-display);
  font-size: var(--fs-xl);
  font-weight: 600;
}
.verdict[data-verdict="valid"] .verdict__mark { color: #0A5C42; }
.verdict[data-verdict="unknown"] .verdict__mark { color: var(--rouge-etat); }
.verdict__seal { width: 2.75rem; height: 2.75rem; flex-shrink: 0; }


/* --------------------------------------------------------------------------
   Ministry people
   -------------------------------------------------------------------------- */

.person {
  display: grid;
  gap: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--r-md);
  padding: var(--sp-5);
}
.person__portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--vert-brume);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.person__portrait svg,
.person__portrait img { width: 100%; height: 100%; object-fit: cover; }
/* The photographed card sits beside generated placeholders, so it gets a rule
   to tie it back to the emblem rather than floating as the only real image. */
.person__portrait--photo { border-bottom: 2px solid var(--or); }
.person__role {
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--vert-etat);
}
.person__name { font-family: var(--ff-display); font-size: var(--fs-md); font-weight: 600; color: var(--vert-profond); }

.orgtree { display: grid; gap: var(--sp-3); }
.orgtree__level {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}
.orgtree__unit {
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-top: 2px solid var(--vert-etat);
  border-radius: var(--r-sm);
  padding: var(--sp-4);
  font-size: var(--fs-xs);
}
.orgtree__unit strong { display: block; font-size: var(--fs-sm); color: var(--vert-profond); margin-bottom: var(--sp-1); }
.orgtree__unit--top { border-top-color: var(--or); background: var(--vert-brume); }


/* --------------------------------------------------------------------------
   Rationale page: audit finding beside design decision
   -------------------------------------------------------------------------- */

.rationale { display: grid; gap: var(--sp-6); }
.rationale__item {
  display: grid;
  gap: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--r-md);
  padding: var(--sp-5);
}
@media (min-width: 54rem) {
  .rationale__item { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--sp-6); }
}
.rationale__finding { display: grid; gap: var(--sp-2); align-content: start; }
.rationale__decision {
  display: grid;
  gap: var(--sp-2);
  align-content: start;
  border-left: 3px solid var(--vert-etat);
  padding-left: var(--sp-5);
}
@media (max-width: 53.99rem) {
  .rationale__decision { border-left: 0; border-top: 3px solid var(--vert-etat); padding-left: 0; padding-top: var(--sp-4); }
}
.rationale__src {
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ink-3);
}
.rationale__quote {
  font-family: var(--ff-display);
  font-size: var(--fs-md);
  font-style: italic;
  line-height: var(--lh-normal);
  color: var(--ink);
}
.rationale__title { font-size: var(--fs-md); font-weight: 600; color: var(--vert-profond); }


/* --------------------------------------------------------------------------
   Empty state, shared by every filtered list
   -------------------------------------------------------------------------- */

.empty {
  display: grid;
  gap: var(--sp-3);
  justify-items: start;
  padding: var(--sp-7) var(--sp-5);
  background: var(--surface);
  border: 1px dashed var(--ligne-forte);
  border-radius: var(--r-md);
  text-align: left;
}
.empty__title { font-family: var(--ff-display); font-size: var(--fs-lg); font-weight: 600; color: var(--vert-profond); }
.empty__body { font-size: var(--fs-sm); color: var(--ink-2); max-width: 48ch; }
