/* France Histoire shared visual language. The interactive timeline's rendered
   palette is authoritative; these rules do not alter its map geometry. */
:root {
  --fh-navy-deep: #071827;
  --fh-navy: #071e2b;
  --fh-navy-raised: #112e3d;
  --fh-paper: #f6f3eb;
  --fh-panel: #fffdf7;
  --fh-text: #182e3b;
  --fh-muted: #596872;
  --fh-gold: #d4b374;
  --fh-gold-ink: #89672f;
  --fh-rule: #d9ddd8;
  --fh-cream: #f6f0e2;
  --fh-quiet-on-navy: #bbcad0;
  --fh-font-display: 'Fraunces', Georgia, serif;
  --fh-font-editorial: 'Cormorant Garamond', Georgia, serif;
  --fh-font-body: 'Inter', system-ui, sans-serif;
  --fh-font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --fh-space-1: 4px;
  --fh-space-2: 8px;
  --fh-space-3: 12px;
  --fh-space-4: 16px;
  --fh-space-6: 24px;
  --fh-space-8: 32px;
  --fh-space-12: 48px;
  --fh-space-16: 64px;
  --fh-radius-sm: 4px;
  --fh-radius-md: 6px;
  --fh-radius-lg: 8px;
  --fh-radius-canvas: 12px;
  --fh-shadow-panel: 0 4px 16px #071e2b0d;
  --fh-shadow-popover: 0 18px 45px #071e2b25;
  --fh-shadow-canvas: 0 16px 45px #16313a0b, 0 2px 5px #16313a07;
  --fh-ease: cubic-bezier(.2, .7, .2, 1);
  --fh-fast: 180ms;
  --fh-medium: 350ms;
  --fh-page-max: 1680px;
  --fh-page-gutter: clamp(18px, 3vw, 48px);
  --fh-header-height: 78px;
  --fh-detail-width: 390px;
}

/* Compatibility aliases for the existing timeline renderer. The public
   design tokens above remain the single source of truth. */
body.fh-timeline {
  --atlas-paper: var(--fh-paper);
  --atlas-paper-2: var(--fh-panel);
  --atlas-ink: var(--fh-text);
  --atlas-gold: var(--fh-gold-ink);
  --atlas-rule: var(--fh-rule);
  --parchment: var(--fh-paper);
  --line: var(--fh-rule);
}

/* Shared, namespaced components. Existing page-specific selectors never
   target these classes, so the header and footer can be identical on all pages. */
.fh-skip {
  position: fixed;
  top: 12px;
  left: 18px;
  z-index: 10000;
  padding: 12px 18px;
  border-radius: var(--fh-radius-md);
  background: var(--fh-panel);
  color: var(--fh-text);
  font: 600 13px/1.3 var(--fh-font-body);
  text-decoration: none;
  transform: translateY(-180%);
}
.fh-skip:focus, .fh-skip:focus-visible {
  top: 12px;
  transform: none;
  outline: 3px solid var(--fh-gold-ink);
  outline-offset: 3px;
}
.fh-site-header, .fh-site-footer { box-sizing: border-box; font-family: var(--fh-font-body); }
.fh-site-header *, .fh-site-header *::before, .fh-site-header *::after,
.fh-site-footer *, .fh-site-footer *::before, .fh-site-footer *::after { box-sizing: border-box; }
.fh-site-header {
  position: relative;
  z-index: 30;
  width: 100%;
  background: var(--fh-navy);
  color: var(--fh-cream);
  border-bottom: 1px solid #2e4651;
}
.fh-header-inner {
  max-width: var(--fh-page-max);
  min-height: var(--fh-header-height);
  margin: 0 auto;
  padding: 0 var(--fh-page-gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 26px;
}
.fh-brand {
  min-width: 0;
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--fh-cream);
  text-decoration: none;
  white-space: nowrap;
  font: 500 26px/1.1 var(--fh-font-display);
  letter-spacing: -.035em;
}
.fh-brand:hover { color: #fffdf7; }
.fh-brand-mark { display: block; width: 28px; height: 36px; flex: none; object-fit: contain; }
.fh-nav { display: flex; align-items: center; justify-content: center; gap: 25px; }
.fh-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  min-height: var(--fh-header-height);
  padding: 12px 0;
  white-space: nowrap;
  text-decoration: none;
  color: var(--fh-quiet-on-navy);
  font: 500 12px/1.3 var(--fh-font-body);
  transition: color var(--fh-fast) ease;
}
.fh-nav a:hover, .fh-nav a[aria-current="page"] { color: var(--fh-cream); }
.fh-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--fh-gold);
}
.fh-header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.fh-header-search {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 0;
  border-radius: var(--fh-radius-md);
  background: transparent;
  color: #d1dde0;
  cursor: pointer;
  transition: background var(--fh-fast) ease;
}
.fh-header-search:hover { background: var(--fh-navy-raised); }
.fh-header-search svg { display: block; width: 18px; height: 18px; }
.fh-lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-left: 13px;
  border-left: 1px solid #38505c;
  white-space: nowrap;
}
.fh-lang-switch button {
  position: relative;
  min-width: 35px;
  min-height: 40px;
  padding: 8px 4px;
  border: 0;
  border-radius: var(--fh-radius-sm);
  background: transparent;
  color: var(--fh-quiet-on-navy);
  font: 500 12px/1 var(--fh-font-body);
  cursor: pointer;
  transition: color var(--fh-fast) ease, background var(--fh-fast) ease;
}
.fh-lang-switch button:hover { color: var(--fh-cream); background: var(--fh-navy-raised); }
.fh-lang-switch button[aria-pressed="true"] { color: var(--fh-cream); }
.fh-lang-switch button[aria-pressed="true"]::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--fh-gold);
}
.fh-lang-divider { color: #80929b; font: 400 11px var(--fh-font-body); }
.fh-site-header :is(a, button):focus-visible, .fh-site-footer a:focus-visible {
  outline: 3px solid var(--fh-gold);
  outline-offset: 3px;
  border-radius: var(--fh-radius-sm);
}

.fh-site-footer { width: 100%; margin: 0; border-top: 1px solid #2e4651; background: var(--fh-navy); color: var(--fh-quiet-on-navy); }
.fh-footer-inner {
  max-width: var(--fh-page-max);
  min-height: 100px;
  margin: 0 auto;
  padding: 20px var(--fh-page-gutter);
  display: grid;
  grid-template-columns: minmax(185px, 1fr) minmax(190px, 2fr) auto;
  gap: var(--fh-space-6);
  align-items: center;
}
.fh-footer-brand { display: flex; flex-direction: column; gap: 4px; }
.fh-footer-brand a { width: max-content; max-width: 100%; font: 500 18px/1.2 var(--fh-font-display); color: var(--fh-cream); text-decoration: none; }
.fh-footer-brand span { font-size: 11px; color: var(--fh-quiet-on-navy); }
.fh-footer-center { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.fh-footer-center p { flex-basis: 100%; margin: 0; color: var(--fh-quiet-on-navy); font: 400 12px/1.55 var(--fh-font-body); }
.fh-footer-center a { color: var(--fh-cream); font: 500 11px/1.5 var(--fh-font-body); text-decoration: none; border-bottom: 1px solid transparent; }
.fh-footer-center a:hover { border-bottom-color: var(--fh-gold); }
.fh-footer-mark { color: var(--fh-gold); font: 400 26px/1 var(--fh-font-display); }

/* Reusable pieces for the two page redesigns. They share the same tokens as
   the timeline but do not affect its existing hero, map, or controls. */
.fh-eyebrow { margin: 0; color: var(--fh-gold); font: 500 10px/1.5 var(--fh-font-body); letter-spacing: .2em; text-transform: uppercase; }
.fh-hero { padding: var(--fh-space-12) var(--fh-page-gutter); background: var(--fh-navy); color: var(--fh-cream); }
.fh-hero h1 { margin: 10px 0 0; max-width: 940px; color: var(--fh-cream); font: 500 clamp(32px, 3.5vw, 52px)/1.08 var(--fh-font-display); letter-spacing: -.045em; }
.fh-hero h1 em { font-style: italic; font-weight: 500; }
.fh-hero p:not(.fh-eyebrow) { max-width: 680px; margin: 12px 0 0; color: #b9c9ce; font: 400 13px/1.7 var(--fh-font-body); }
.fh-ornament { color: var(--fh-gold); font-family: var(--fh-font-display); }
.fh-panel { border: 1px solid var(--fh-rule); border-radius: var(--fh-radius-lg); background: var(--fh-panel); box-shadow: var(--fh-shadow-panel); }
.fh-chip, .fh-button { font: 500 12px/1.3 var(--fh-font-body); cursor: pointer; transition: background var(--fh-fast) ease, border-color var(--fh-fast) ease, color var(--fh-fast) ease; }
.fh-chip { min-height: 36px; padding: 9px 11px; border: 1px solid transparent; border-radius: var(--fh-radius-md); background: transparent; color: var(--fh-muted); }
.fh-chip:hover { background: #f0f1eb; border-color: var(--fh-rule); }
.fh-chip[aria-pressed="true"], .fh-chip[aria-current="true"] { background: var(--fh-navy); border-color: var(--fh-navy); color: var(--fh-cream); }
.fh-button { min-height: 40px; padding: 9px 14px; border: 1px solid var(--fh-navy); border-radius: var(--fh-radius-md); background: var(--fh-navy); color: var(--fh-cream); }
.fh-button:hover { background: var(--fh-navy-raised); }
.fh-button:focus-visible, .fh-chip:focus-visible { outline: 3px solid var(--fh-gold-ink); outline-offset: 3px; }

@media (max-width: 1060px) {
  :root { --fh-header-height: 100px; }
  .fh-header-inner { grid-template-columns: 1fr auto; gap: 0 16px; padding-top: 14px; }
  .fh-nav { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; gap: 24px; }
  .fh-nav a { min-height: 44px; padding: 8px 0 14px; }
  .fh-header-tools { grid-column: 2; grid-row: 1; }
}
@media (max-width: 560px) {
  :root { --fh-header-height: 130px; }
  .fh-header-inner { gap: 7px 6px; padding: 12px var(--fh-page-gutter) 0; }
  .fh-brand { gap: 8px; font-size: clamp(18px, 5.4vw, 24px); }
  .fh-brand-mark { width: 23px; height: 30px; }
  .fh-header-tools { gap: 4px; }
  .fh-header-search { width: 31px; height: 36px; padding: 6px; }
  .fh-lang-switch { gap: 0; padding-left: 5px; }
  .fh-lang-switch button { min-width: 29px; font-size: 11px; }
  .fh-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .fh-nav a { min-height: 35px; padding: 7px 0 8px; font-size: 11px; }
  .fh-footer-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 18px 12px; }
  .fh-footer-center { grid-row: 2; grid-column: 1 / -1; }
  .fh-footer-mark { grid-row: 1; grid-column: 2; }
  .fh-hero { padding: 32px var(--fh-page-gutter); }
}
@media (prefers-reduced-motion: reduce) {
  .fh-site-header *, .fh-site-header *::before, .fh-site-header *::after,
  .fh-site-footer *, .fh-site-footer *::before, .fh-site-footer *::after,
  .fh-chip, .fh-button { transition-duration: 0s !important; animation-duration: 0s !important; }
}
