/* MeKelKon : feuille de style unique.
   Principe : un dossier d'archives administratif. Papier bleuté, encre marine,
   et un seul élément fort, le tampon, dont l'encre code le type de fait. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"),
       url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face { font-family: "Literata"; src: url("../fonts/literata-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../fonts/literata-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../fonts/literata-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #eef1f4;      /* papier pelure bleuté */
  --sheet: #ffffff;      /* feuille posée sur le dossier */
  --ink: #14213d;        /* encre marine */
  --ink-soft: #4b5568;   /* texte secondaire */
  --rule: #c7d0da;       /* filets */
  --l103: #b3122b;       /* encre rouge : condamnation */
  --l102: #9c5a00;       /* encre ocre : mise en cause */
  --l101: #5a3fc0;       /* encre violette des tampons administratifs : bourde */
  --ok: #1f6b45;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: clamp(1.85rem, 1.25rem + 2.4vw, 2.9rem);

  --gutter: 16px;
  --maxw: 1200px;
}
@media (min-width: 700px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.5;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--l101); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- En-tête ---------- */
.masthead { background: var(--ink); color: #fff; }
.masthead__inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; padding-block: 14px; }
.wordmark {
  font-family: var(--sans);
  font-weight: 860;
  font-stretch: 125%;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: #fff;
}
.mainnav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.mainnav a { color: #d9e0ea; text-decoration: none; font-size: 0.95rem; padding-block: 4px; }
@media (max-width: 599px) { .mainnav ul { gap: 2px 16px; } .mainnav a { font-size: 0.875rem; } .wordmark { font-size: 1.35rem; } }
.mainnav a:hover, .mainnav a[aria-current="page"] { color: #fff; text-decoration: underline; text-underline-offset: 6px; }

/* ---------- Titres de section ---------- */
.section-title {
  font-size: var(--step-1);
  font-weight: 700;
  font-stretch: 112%;
  margin-bottom: 14px;
}

/* ---------- Introduction ---------- */
.intro { padding-top: 40px; padding-bottom: 8px; }
.intro__title {
  font-size: var(--step-4);
  font-weight: 800;
  font-stretch: 110%;
  letter-spacing: -0.015em;
  max-width: 26ch;
  text-wrap: balance;
}
.intro__lede {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.55;
  max-width: 60ch;
  color: var(--ink-soft);
}

/* ---------- Filtres ---------- */
.finder { margin-top: 28px; }
.filters {
  display: grid;
  gap: 14px 18px;
  grid-template-columns: 1fr;
  align-items: end;
  background: var(--sheet);
  border: 1px solid var(--rule);
  padding: 18px;
}
@media (min-width: 900px) {
  .filters { grid-template-columns: minmax(220px, 1.3fr) auto minmax(170px, 0.8fr) minmax(190px, 0.7fr); }
}
.filters--solo { grid-template-columns: 1fr auto; margin-block: 24px; }
.filters label, .filters legend, .form__field, .form legend { font-size: var(--step--1); font-weight: 600; color: var(--ink-soft); }
.filters__search label, .filters__select label { display: block; margin-bottom: 6px; }
input[type="search"], input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #9aa7b6;
  border-radius: 2px;
  padding: 10px 12px;
}
input[type="search"] { font-size: 1.0625rem; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--l101); outline-offset: 0; border-color: var(--ink); }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.filters__levels, .form__levels { display: flex; flex-wrap: wrap; gap: 8px; }
.filters__levels legend, .form__levels legend { margin-bottom: 6px; width: 100%; float: left; }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block;
  padding: 8px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  font-size: 0.9375rem;
  font-weight: 600;
  background: #fff;
}
.chip--103 span { border-color: var(--l103); color: var(--l103); }
.chip--102 span { border-color: var(--l102); color: var(--l102); }
.chip--101 span { border-color: var(--l101); color: var(--l101); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip--103 input:checked + span { background: var(--l103); border-color: var(--l103); }
.chip--102 input:checked + span { background: var(--l102); border-color: var(--l102); }
.chip--101 input:checked + span { background: var(--l101); border-color: var(--l101); }
.chip input:focus-visible + span { outline: 3px solid var(--l101); outline-offset: 2px; }
.js .filters__submit { display: none; }

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 2px;
  padding: 11px 20px;
  cursor: pointer;
}
.btn:hover { background: #22345c; }

/* ---------- Derniers ajouts ---------- */
.latest { margin-top: 36px; }
.latest__list { border-top: 1px solid var(--rule); }
.latest__item {
  display: grid;
  grid-template-columns: 12px 8.5em 1fr;
  gap: 12px;
  align-items: baseline;
  padding-block: 10px;
  border-bottom: 1px solid var(--rule);
}
.latest__item time { font-size: var(--step--1); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.latest__item a { text-decoration: none; font-family: var(--serif); }
.latest__item a strong { font-family: var(--sans); font-weight: 700; margin-right: 6px; }
.latest__item a:hover { text-decoration: underline; }
@media (max-width: 599px) {
  .latest__item { grid-template-columns: 12px 1fr; }
  .latest__item a { grid-column: 2; }
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; align-self: center; }
.dot--103 { background: var(--l103); }
.dot--102 { background: var(--l102); }
.dot--101 { background: var(--l101); }

/* ---------- Grille des personnalités ---------- */
.people { margin-top: 40px; margin-bottom: 56px; }
.people__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.people__count { font-size: var(--step--1); color: var(--ink-soft); }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 28px 20px;
}
@media (min-width: 700px) { .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
.grid--compact { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 2px; }
.card__link { text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.card__photo { position: relative; display: block; aspect-ratio: 1; background: #dfe5eb; overflow: hidden; }
.card__photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85); }
.card__name { font-weight: 700; font-size: 1.0625rem; line-height: 1.2; }
.card__link:hover .card__name { text-decoration: underline; }
.card__party { font-size: var(--step--1); color: var(--ink-soft); }
.card__tally { font-family: var(--serif); font-size: var(--step--1); color: var(--ink-soft); }
.empty { margin-top: 24px; font-size: var(--step-1); }

/* ---------- Le tampon ---------- */
.stamp {
  position: absolute;
  left: 7%;
  bottom: 9%;
  transform: rotate(-7deg);
  font-family: var(--sans);
  font-weight: 850;
  font-stretch: 75%;
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 8px 5px;
  border: 2.5px solid currentColor;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 1px 0 rgba(20, 33, 61, 0.15);
  pointer-events: none;
}
.stamp--103 { color: var(--l103); }
.stamp--102 { color: var(--l102); }
.stamp--101 { color: var(--l101); }
.stamp--lg { font-size: 1.125rem; padding: 9px 12px 8px; border-width: 3px; }

/* ---------- Fil d'Ariane ---------- */
.crumbs { padding-top: 20px; font-size: var(--step--1); color: var(--ink-soft); display: flex; gap: 8px; }

/* ---------- Fiche ---------- */
.profile { display: grid; gap: 32px; padding-top: 16px; padding-bottom: 48px; }
@media (min-width: 900px) {
  .profile {
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-areas: "id record" "career record";
    grid-template-rows: auto 1fr;
    column-gap: 56px;
    row-gap: 0;
    align-items: start;
  }
  .profile__id { grid-area: id; }
  .profile__record { grid-area: record; }
  .profile .career { grid-area: career; }
}

.profile__photo { position: relative; width: min(100%, 300px); aspect-ratio: 1; background: #dfe5eb; }
.profile__photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 899px) { .profile .profile__photo { width: min(100%, 220px); } }
.profile__photo .stamp { left: 8%; bottom: 10%; }
.profile__name {
  margin-top: 18px;
  font-size: var(--step-3);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.profile__name span { display: block; font-weight: 500; font-size: 0.62em; font-stretch: 100%; letter-spacing: 0; }
.profile__facts { margin: 16px 0 0; display: grid; gap: 10px; }
.profile__facts dt { font-size: var(--step--1); color: var(--ink-soft); }
.profile__facts dd { margin: 0; font-weight: 600; }

.tally { margin-top: 20px; border-top: 1px solid var(--rule); }
.tally li { border-bottom: 1px solid var(--rule); }
.tally a { display: flex; align-items: baseline; gap: 10px; padding-block: 9px; text-decoration: none; }
.tally a:hover { text-decoration: underline; }
.tally__n { font-weight: 800; font-stretch: 112%; font-size: var(--step-2); min-width: 1.6em; font-variant-numeric: tabular-nums; }
.tally__n--103 { color: var(--l103); }
.tally__n--102 { color: var(--l102); }
.tally__n--101 { color: var(--l101); }

.aside-title { font-size: var(--step-0); font-weight: 700; font-stretch: 112%; margin-bottom: 10px; }
.career { margin-top: 28px; }
@media (max-width: 899px) { .career { margin-top: 0; } }
.career__list { border-left: 2px solid var(--rule); margin-left: 4px; }
.career__item { position: relative; padding: 0 0 14px 16px; }
.career__item::before { content: ""; position: absolute; left: -6px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--rule); }
.career__item.is-current::before { background: var(--ink); border-color: var(--ink); }
.career__job { display: block; font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.career__dates { display: block; font-size: var(--step--1); color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.profile__record { display: grid; gap: 44px; min-width: 0; }
.record-empty { font-family: var(--serif); font-size: var(--step-1); max-width: 62ch; }
.record__title {
  font-size: var(--step-2);
  font-weight: 800;
  font-stretch: 112%;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--ink);
}
.record--103 .record__title { border-color: var(--l103); }
.record--102 .record__title { border-color: var(--l102); }
.record--101 .record__title { border-color: var(--l101); }
.record__count { font-size: var(--step-0); font-weight: 600; color: var(--ink-soft); }
.record__note { margin-top: 10px; font-size: var(--step--1); color: var(--ink-soft); }

.fact { padding-block: 22px; border-bottom: 1px solid var(--rule); max-width: 70ch; scroll-margin-top: 16px; }
.fact:target { background: var(--sheet); box-shadow: -16px 0 0 var(--sheet), 16px 0 0 var(--sheet); }
.fact__date { font-size: var(--step--1); font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.fact__title { margin-top: 4px; font-family: var(--serif); font-weight: 600; font-size: var(--step-1); line-height: 1.35; }
.fact__body { margin-top: 10px; font-family: var(--serif); line-height: 1.7; }
.fact__body p + p { margin-top: 0.8em; }
.fact__sources { margin-top: 12px; font-size: var(--step--1); color: var(--ink-soft); }
.fact__sources a { color: var(--ink); }

.quotes { display: grid; gap: 0; }
.quote { margin: 0; padding-block: 20px; border-bottom: 1px solid var(--rule); max-width: 70ch; }
.quote blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: var(--step-1); line-height: 1.55; }
.quote blockquote p::before { content: "« "; }
.quote blockquote p::after { content: " »"; }
.quote figcaption { margin-top: 8px; font-size: var(--step--1); color: var(--ink-soft); }

/* ---------- Formulaires ---------- */
.report { background: var(--sheet); border: 1px solid var(--rule); padding: 22px; }
.report .record__title { border-color: var(--ink); font-size: var(--step-1); }
.report__intro { margin-block: 12px 18px; font-family: var(--serif); max-width: 62ch; }
.form { display: grid; gap: 16px; max-width: 720px; }
.form__field { display: grid; gap: 6px; }
.form__row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 12px 14px; border-left: 4px solid; background: #fff; margin-block: 12px; max-width: 70ch; }
.notice--ok { border-color: var(--ok); }
.notice--err { border-color: var(--l103); }

/* ---------- Autres personnalités ---------- */
.related { padding-bottom: 56px; }
.related__more { margin-top: 18px; }

/* ---------- Pages de texte ---------- */
.page { padding-top: 40px; padding-bottom: 64px; }
.page__title { font-size: var(--step-3); font-weight: 800; font-stretch: 112%; margin-bottom: 20px; }
.prose { font-family: var(--serif); line-height: 1.7; max-width: 68ch; }
.prose h2 { font-family: var(--sans); font-size: var(--step-1); font-weight: 700; font-stretch: 112%; margin: 32px 0 8px; }
.prose p + p { margin-top: 0.9em; }
.qa { max-width: 72ch; border-top: 1px solid var(--rule); }
.qa__item { border-bottom: 1px solid var(--rule); }
.qa__item summary { cursor: pointer; padding: 16px 0; font-weight: 700; font-size: var(--step-1); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.qa__item summary::-webkit-details-marker { display: none; }
.qa__item summary::after { content: "+"; font-weight: 400; font-size: 1.5rem; line-height: 1; }
.qa__item[open] summary::after { content: "−"; }
.qa__body { padding-bottom: 18px; }
.thanks { display: grid; gap: 4px 16px; grid-template-columns: max-content 1fr; }
.thanks dt { font-family: var(--sans); font-weight: 700; }
.thanks dd { margin: 0; }
@media (max-width: 599px) { .thanks { grid-template-columns: 1fr; } .thanks dd { margin-bottom: 10px; } }

/* ---------- Pied de page ---------- */
.footer { background: var(--ink); color: #d9e0ea; margin-top: 24px; }
.footer__inner { padding-block: 32px; display: grid; gap: 16px; }
.footer a { color: #fff; }
.footer__notice { font-family: var(--serif); max-width: 70ch; line-height: 1.6; }
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.9375rem; }
.footer__name { font-size: var(--step--1); color: #a9b5c6; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
