/* Présentation inspirée des fondamentaux DSFR.
   Arial est la typographie de substitution officielle de Marianne.
   Aucun script DSFR : les comportements existants restent ceux du prototype. */
:root {
  --paper: #fff;
  --white: #fff;
  --ink: #161616;
  --muted: #666;
  --line: #ddd;
  --accent: #000091;
  --blue-france: #000091;
  --blue-hover: #1212ff;
  --blue-active: #2323ff;
  --surface: #f6f6f6;
  --surface-blue: #f5f5fe;
  --sans: Arial, Helvetica, sans-serif;
  --serif: Arial, Helvetica, sans-serif;
  --gutter: max(32px, calc((100vw - 1216px) / 2));
}
body { font: 16px/1.5 var(--sans); background: #fff; }
button, input, select { border-radius: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
summary:focus-visible { outline: 2px solid #0a76f6; outline-offset: 2px; }
header {
  height: auto;
  padding: 24px var(--gutter) 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 32px;
  background: #fff;
  border-bottom: 0;
  box-shadow: 0 2px 6px #00000014;
}
.brand { font: 700 20px/1.4 var(--sans); letter-spacing: 0; }
header .brand { flex: 1; }
.brand b { font-weight: 700; }
.brand-icon {
  width: 44px; height: 48px;
  font: 38px/44px var(--sans);
  color: var(--blue-france); background: var(--surface-blue);
  border-bottom: 3px solid var(--blue-france);
  padding: 0;
}
nav { order: 3; width: 100%; justify-content: flex-start; gap: 32px; margin-top: 24px; border-top: 1px solid var(--line); font-size: 14px; }
nav a { position: relative; padding: 16px 0; color: #161616; }
nav a:hover { color: var(--blue-france); text-decoration: none; }
nav a.active { color: var(--blue-france); font-weight: 700; }
nav a.active:after { position: absolute; content: ''; left: 0; right: 0; bottom: 0; height: 3px; background: var(--blue-france); }
.admin-link { color: var(--blue-france); font-size: 14px; border: 0; border-radius: 0; padding: 10px 0; }
.admin-link:hover { text-decoration: underline; }
.container { max-width: 1280px; padding: 48px 32px; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; letter-spacing: 0; }
h1 { font-size: 40px; line-height: 1.2; }
h2 { font-size: 32px; line-height: 1.25; }
h3 { font-size: 24px; line-height: 1.35; }
.eyebrow { font-size: 12px; line-height: 20px; letter-spacing: .5px; color: var(--blue-france); }
.eyebrow:before { background: var(--blue-france); border-radius: 0; width: 4px; height: 16px; }
.hero { gap: 48px; padding-top: 8px; padding-bottom: 40px; grid-template-columns: 1.2fr 1fr; }
.hero h1 { font-size: 48px; line-height: 1.17; letter-spacing: 0; margin: 24px 0; }
.hero h1 em { font-style: normal; font-weight: 700; }
.hero .subtitle { font-size: 20px; line-height: 32px; max-width: 540px; }
.hero p.description { font-size: 14px; line-height: 24px; max-width: 540px; margin-top: 20px; }
.archive-art { height: 320px; background: var(--surface-blue); border-radius: 0; border-bottom: 4px solid var(--blue-france); }
.archive-art:before { color: var(--blue-france); font-size: 10px; letter-spacing: 1px; }
.archive-art img { border-color: #ddd; box-shadow: 0 4px 12px #00000014; }
.archive-caption { color: #666; background: #fff; font-size: 10px; letter-spacing: .3px; }
.search-zone { background: var(--surface); color: var(--ink); padding: 32px; border-radius: 0; border-top: 4px solid var(--blue-france); }
.search-zone label { font: 700 24px/32px var(--sans); }
.search-form { gap: 0; padding: 0; border-radius: 0; background: #eee; }
.search-form input { padding: 16px; font-size: 16px; background: #eee; border-bottom: 2px solid #3a3a3a; min-height: 52px; }
.search-form .search-icon { display: none; }
.primary { background: var(--blue-france); color: #fff; padding: 14px 20px; font-weight: 700; font-size: 16px; line-height: 24px; border-radius: 0; }
.primary:hover { background: var(--blue-hover); }
.primary:active { background: var(--blue-active); }
.search-form .primary { align-self: stretch; min-height: 52px; }
.search-hint { opacity: 1; font-size: 12px; line-height: 20px; color: #666; margin-top: 12px; }
.entry-links { font-size: 14px; gap: 24px; }
.entry-links a { color: var(--blue-france); border-color: var(--blue-france); }
.entry-links a:hover { background: #e3e3fd; }
.stats { padding: 32px 0; margin-bottom: 48px; }
.stat strong { font: 700 32px/40px var(--sans); color: var(--blue-france); }
.stat span { font-size: 12px; line-height: 20px; }
.section-top { margin-bottom: 24px; align-items: end; }
.section-top a { color: var(--blue-france); font-size: 14px; border-color: var(--blue-france); }
.section-top p { font-size: 14px; line-height: 24px; }
.section { margin-top: 48px; }
.cards { gap: 24px; }
.card { background: #fff; border: 1px solid #ddd; padding: 24px; transition: background-color .15s; }
.card:hover { transform: none; background: #f6f6f6; border-color: #ddd; }
.card .meta { font-size: 12px; line-height: 20px; margin-bottom: 16px; align-items: start; }
.card h3 { font: 700 22px/30px var(--sans); color: var(--blue-france); margin-bottom: 16px; }
.card .excerpt { font-size: 14px; line-height: 24px; color: #3a3a3a; }
.card .byline { font-size: 12px; line-height: 20px; padding-top: 16px; }
.card .arrow { color: var(--blue-france); font-size: 20px; }
.tag { color: var(--blue-france); font-size: 12px; line-height: 20px; padding: 2px 8px; background: #e3e3fd; border: 0; border-radius: 16px; }
.tag:hover { background: #c1c1fb; }
.tag.proposed:after { color: var(--blue-france); }
.tag.rejected { color: #ce0500; background: #ffe9e9; }
.theme-grid { gap: 24px; }
.theme-card { background: #fff; padding: 24px; border: 1px solid #ddd; border-bottom: 3px solid var(--blue-france); border-radius: 0; align-items: start; }
.theme-card:hover { background: #f6f6f6; }
.theme-card h3 { font: 700 20px/28px var(--sans); color: var(--blue-france); }
.theme-card p { font-size: 12px; line-height: 20px; }
.theme-card .count { font: 700 28px/32px var(--sans); color: var(--blue-france); }
.note { border-left: 4px solid var(--blue-france); background: var(--surface-blue); color: #3a3a3a; font-size: 14px; line-height: 24px; padding: 16px 24px; }
.breadcrumb { font-size: 12px; line-height: 20px; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.page-head h1 { font-size: 40px; line-height: 48px; margin: 16px 0 24px; }
.page-head .lead { font-size: 18px; line-height: 28px; max-width: 850px; }
.facets h3 { font: 700 20px/28px var(--sans); }
.field label { font-size: 14px; line-height: 24px; font-weight: 400; margin-bottom: 8px; }
.field select, .field input, .admin-filters select, .admin-filters input, dialog input, dialog select { color: #161616; background: #eee; border: 0; border-bottom: 2px solid #3a3a3a; border-radius: 0; font-size: 14px; line-height: 24px; padding: 10px 12px; }
.secondary { background: transparent; color: var(--blue-france); border: 1px solid var(--blue-france); border-radius: 0; padding: 9px 16px; font-size: 14px; line-height: 24px; font-weight: 700; }
.secondary:hover { background: #f5f5fe; }
.results .search-form { border: 0; }
.result-count { font-size: 16px; }
mark { color: #161616; background: #ffefbd; }
.empty { background: #f6f6f6; border: 1px solid #ddd; }
.metadata { font-size: 14px; line-height: 24px; }
.metadata dt { font-size: 12px; letter-spacing: .3px; }
.metadata dd a { color: var(--blue-france); }
.sidebar-block h3 { font: 700 20px/28px var(--sans); }
.tabs { gap: 0; border-bottom: 2px solid #ddd; }
.tabs button { color: #666; background: #eee; border: 0; padding: 12px 16px; font-size: 14px; line-height: 24px; font-weight: 700; }
.tabs button:hover { background: #e5e5e5; }
.tabs button.selected { color: var(--blue-france); background: #fff; box-shadow: inset 0 3px var(--blue-france), inset 1px 0 #ddd, inset -1px 0 #ddd; border-bottom: 0; }
.transcription { border: 1px solid #ddd; padding: 32px; }
.page-text { font: 18px/1.75 var(--sans); }
.page-label { font-size: 12px; line-height: 20px; }
.page-label a { color: var(--blue-france); }
.confidence { color: #b34000; font-size: 12px; }
.timeline-axis { font-size: 12px; }
.timeline-label { font: 700 18px/24px var(--sans); color: var(--blue-france); }
.timeline-label small { font: 12px/20px var(--sans); }
.timeline-track { background: repeating-linear-gradient(90deg, transparent, transparent 9.8%, #dddddd66 10%); }
.mandate { background: var(--blue-france); border-radius: 0; }
.mandate:hover { background: var(--blue-hover); }
.minister-card { background: #fff; border: 1px solid #ddd; border-bottom: 3px solid var(--blue-france); padding: 24px; }
.minister-card:hover { background: #f6f6f6; }
.initials { font: 700 40px/48px var(--sans); color: var(--blue-france); border-color: #ddd; }
.minister-card h3 { font: 700 24px/32px var(--sans); color: var(--blue-france); }
.minister-card p { font-size: 14px; line-height: 24px; }
.bar-row { font-size: 14px; line-height: 24px; color: var(--blue-france); }
.bar-track { background: #e3e3fd; }
.bar-fill, .chart-column .column { background: var(--blue-france); }
.chart-column .number { font: 700 24px/32px var(--sans); }
.chart-column .year { font-size: 12px; }
.admin-stat { background: #f6f6f6; border-top: 3px solid var(--blue-france); padding: 24px; }
.admin-stat strong { font: 700 32px/40px var(--sans); color: var(--blue-france); }
.admin-stat p { font-size: 14px; line-height: 24px; }
table { font-size: 14px; line-height: 24px; }
th { color: #161616; background: #eee; font-size: 12px; line-height: 20px; text-transform: none; font-weight: 700; letter-spacing: 0; border-bottom: 2px solid #161616; }
td { background: #fff; }
tbody tr:nth-child(even) td { background: #f6f6f6; }
td a { color: var(--blue-france); }
.actions button { font-size: 12px; padding: 4px 8px; line-height: 20px; }
.status { font-size: 12px; line-height: 20px; font-weight: 700; color: #b34000; background: #fff4e5; text-transform: uppercase; }
.status.validated { color: #18753c; background: #dffee6; }
.status.rejected { color: #ce0500; background: #ffe9e9; }
.proof { background: #f6f6f6; font-size: 14px; line-height: 24px; overflow-wrap: anywhere; }
details { padding: 12px 0; border-bottom: 1px solid #ddd; }
summary { color: var(--blue-france); cursor: pointer; }
.about { max-width: 960px; }
.about h2 { font-size: 28px; line-height: 36px; }
.about p, .about li { font-size: 16px; line-height: 28px; color: #3a3a3a; }
.about li a { color: var(--blue-france); text-decoration: underline; }
footer { border-top: 2px solid var(--blue-france); padding: 32px var(--gutter); background: #fff; flex-wrap: wrap; }
footer .brand { font: 700 18px/28px var(--sans); max-width: 330px; }
footer p, footer a:last-child { font-size: 12px; line-height: 20px; }
footer a:last-child { color: var(--blue-france); text-decoration: underline; text-underline-offset: 3px; }
.skip { background: var(--blue-france); color: #fff; }
#toast { color: #fff; background: var(--blue-france); border-radius: 0; font-size: 14px; }
dialog { border: 0; color: #161616; background: #fff; box-shadow: 0 8px 24px #00000040; }
dialog::backdrop { background: #16161699; }
.close { color: var(--blue-france); }
dialog h2 { font-size: 28px; line-height: 36px; }
.wide-link { color: var(--blue-france); font-size: 14px; line-height: 24px; }
.small { font-size: 12px; line-height: 20px; }
@media (min-width: 1500px) { header, footer { padding-left: var(--gutter); padding-right: var(--gutter); } }
@media (max-width: 1000px) {
  :root { --gutter: 32px; }
  header { padding-bottom: 0; }
  nav { justify-content: flex-start; gap: 24px; }
  .hero { gap: 32px; }
  .hero h1 { font-size: 40px; line-height: 48px; }
  .archive-art { height: 300px; }
}
@media (max-width: 650px) {
  :root { --gutter: 16px; }
  header { padding: 20px 16px 0; gap: 12px; }
  header .brand { flex-basis: 100%; font-size: 18px; line-height: 24px; }
  .brand-icon { width: 36px; height: 42px; font-size: 32px; line-height: 38px; }
  .admin-link { padding: 4px 0; font-size: 12px; }
  nav { margin-top: 4px; gap: 24px; overflow-x: auto; white-space: nowrap; font-size: 14px; }
  nav a { padding: 12px 0; }
  .container { padding: 32px 16px; }
  .hero { grid-template-columns: 1fr; padding-top: 0; padding-bottom: 32px; gap: 24px; }
  .hero h1 { font-size: 32px; line-height: 40px; margin: 16px 0; }
  .hero .subtitle { font-size: 18px; line-height: 28px; }
  .hero p.description { font-size: 14px; line-height: 24px; }
  .archive-art { height: 220px; }
  .search-zone { padding: 24px 16px; }
  .search-zone label { font-size: 20px; line-height: 28px; }
  .search-form input { padding: 12px 8px; font-size: 14px; min-height: 48px; }
  .search-form .primary { padding: 10px 12px; font-size: 14px; min-height: 48px; }
  .entry-links { font-size: 14px; gap: 12px 20px; }
  .stat strong { font-size: 28px; line-height: 36px; }
  .section-top { flex-wrap: wrap; align-items: start; gap: 12px; }
  .section-top h2, h2 { font-size: 28px; line-height: 36px; }
  .section-top a { font-size: 14px; }
  .page-head h1 { font-size: 32px; line-height: 40px; }
  .page-head .lead { font-size: 16px; line-height: 24px; }
  .card, .theme-card, .minister-card { padding: 20px; }
  .facets { background: #f6f6f6; padding: 20px; }
  .tabs { overflow-x: auto; }
  .tabs button { white-space: nowrap; padding: 12px; }
  .transcription { padding: 20px; }
  .page-text { font-size: 16px; line-height: 28px; }
  .page-label { gap: 8px; flex-wrap: wrap; }
  .timeline-row { grid-template-columns: 136px 1fr; }
  .timeline-label { font-size: 14px; line-height: 20px; }
  .bar-row { font-size: 12px; line-height: 20px; }
  .admin-stat { padding: 16px; }
  .admin-stat strong { font-size: 28px; line-height: 36px; }
  .admin-stat p { font-size: 12px; line-height: 20px; }
  .admin-filters input, .admin-filters select { width: 100%; }
  .note { padding: 16px; }
  .small { font-size: 12px; }
  footer { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }

/* Trombinoscope : portraits institutionnels et notices sourcées. */
.minister-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.minister-card { display: flex; flex-direction: column; min-width: 0; }
.minister-portrait { margin: 0 0 20px; }
.minister-photo { display: block; width: 100%; height: 290px; object-fit: contain; background: #f6f6f6; }
.minister-portrait figcaption { color: #666; font-size: 11px; line-height: 20px; margin-top: 8px; }
.minister-card h3 { font-size: 22px; line-height: 30px; }
.minister-card .minister-years { color: #000091; font-weight: 700; margin: 12px 0 8px; }
.minister-card .minister-bio { color: #3a3a3a; font-size: 14px; line-height: 24px; }
.minister-card .minister-document-count { margin-top: auto; padding-top: 16px; border-top: 1px solid #ddd; color: #000091; font-weight: 700; }
.minister-profile { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; max-width: 960px; margin: 32px 0; align-items: center; }
.minister-profile h2 { font-size: 28px; line-height: 36px; }
.minister-profile .minister-bio { color: #3a3a3a; font-size: 18px; line-height: 28px; margin-top: 20px; }
.minister-profile .minister-portrait { margin: 0; }
.biography-source, .note a { color: #000091; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1000px) { .minister-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) {
  .minister-grid, .minister-profile { grid-template-columns: 1fr; }
  .minister-profile { gap: 24px; }
  .minister-profile .portrait-detail { max-width: 220px; }
  .minister-profile .minister-bio { font-size: 16px; line-height: 26px; }
}

/* Le corpus historique couvre plusieurs décennies : défilement du graphique. */
.chart-scroll { max-width: 100%; overflow-x: auto; padding-bottom: 4px; }
.chart-scroll .chart { margin-bottom: 40px; }
.chart-scroll .chart-column { min-width: 24px; }
