/* Site famille-d-horrer.com — same look as the canvas pages (colours, fonts, layout). */
:root {
  --bg: #F7F7F4; --paper: #FFFFFF; --ink: #22262B; --ink-2: #33383E; --muted: #5A5F66; --muted-2: #4A4F55;
  --blue: #1F3A5F; --blue-dark: #0F2440; --gold: #C9A24A; --line: #DCDAD2; --cream: #F3EFE3;
  --serif: 'Source Serif 4', Georgia, serif; --display: 'Cormorant Garamond', Georgia, serif; --sans: 'IBM Plex Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--serif); }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
kbd { font-family: var(--sans); font-size: .9em; padding: 0 4px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: var(--paper); padding: 8px 12px; }

/* header + menu */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 10; }
.bar { padding-top: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--blue); }
.brand img { width: 40px; height: auto; display: block; }
.brand span { font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: .01em; }
.langs { display: flex; gap: 4px; font-family: var(--sans); font-size: 14px; }
.langs a { text-decoration: none; padding: 12px 6px; color: var(--muted); }
.langs a[aria-current] { font-weight: 500; color: var(--blue-dark); }
.menu { padding-top: 4px; }
.menu > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 4px; font-family: var(--sans); font-size: 15px; }
.menu > ul > li { position: relative; }
.menu summary, .menu > ul > li > a { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; cursor: pointer;
  color: var(--blue); text-decoration: none; border-bottom: 3px solid transparent; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.menu details[open] > summary, .menu details.cur > summary { border-bottom-color: var(--gold); color: var(--blue-dark); font-weight: 500; }
.menu details ul { list-style: none; margin: 0; padding: 8px 0; position: absolute; z-index: 20; left: 0; top: 100%; min-width: 300px; max-width: calc(100vw - 32px);
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 8px 24px rgba(15, 36, 64, .12); }
.menu details a { display: flex; align-items: center; min-height: 40px; padding: 4px 18px; text-decoration: none; font-size: 15px; color: var(--ink); }
.menu details a.sub { padding-left: 34px; font-style: italic; color: var(--muted-2); }
.menu details a:hover { background: var(--bg); }
.menu details a[aria-current] { font-weight: 600; background: var(--cream); color: var(--blue-dark); }

/* crumbs + page marks */
.crumbs { border-bottom: 1px solid var(--line); background: var(--paper); }
.crumbs .row { padding-top: 14px; padding-bottom: 14px; font-family: var(--sans); font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.marks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.marks a { display: block; width: 28px; height: 6px; border-radius: 3px; background: var(--line); }
.marks a[aria-current] { background: var(--blue); }
.marks a.paren { width: 14px; background: transparent; border: 1px dashed #8D8A80; }
.marks a.paren[aria-current] { background: #8D8A80; }

/* hero */
.hero { background: var(--bg) center bottom / cover no-repeat; }
.hero .wrap { padding-top: 72px; padding-bottom: 56px; }
.kicker { margin: 0; font-family: var(--sans); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); }
.hero h1 { margin: 10px 0 0; font-family: var(--display); font-weight: 600; font-size: clamp(34px, 5vw, 56px); line-height: 1.08; color: var(--blue); max-width: 880px; }
.hero.paren h1 { font-style: italic; color: var(--muted-2); }

/* text pages */
.content { padding-bottom: 48px; }
.block { display: flex; flex-wrap: wrap; gap: 24px 64px; margin-top: 48px; }
.block .text { flex: 999 1 560px; min-width: 0; max-width: 680px; }
.block aside, .block .aside-empty { flex: 1 1 240px; max-width: 300px; }
.block h2 { margin: 0 0 16px; font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1.15; color: var(--blue); }
.block p, .block .list { margin: 0 0 18px; font-size: 19px; line-height: 1.75; overflow-wrap: anywhere; }
.block .list ul, .block .list ol { margin: 0; padding-left: 1.3em; }
.block p img { vertical-align: middle; }
figure { margin: 0 0 22px; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: #E9E7E0; }
figure.wide { margin: 8px 0 26px; }
figcaption { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted-2); }
a.doc { font-family: var(--sans); font-size: 14px; font-weight: 500; text-decoration: none; padding: 1px 7px; border: 1px solid var(--gold); border-radius: 3px; white-space: nowrap; }
sup.fn a, sup a[href^="#s"] { font-family: var(--sans); font-size: 13px; text-decoration: none; padding: 0 2px; }
sup a[href^="#s"] { font-style: italic; }
.notes { margin-top: 56px; max-width: 680px; padding-top: 24px; border-top: 1px solid var(--line); }
.notes + .notes { margin-top: 24px; }
.notes h2 { margin: 0 0 14px; font-family: var(--sans); font-weight: 500; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.notes ol, .notes ul { margin: 0; padding-left: 26px; font-size: 16px; line-height: 1.6; color: var(--ink-2); display: flex; flex-direction: column; gap: 10px; overflow-wrap: anywhere; }
.notes ul.centuries { padding: 0; gap: 6px; list-style: none; }
.centuries span { font-family: var(--sans); font-size: 13px; font-style: italic; color: var(--muted); margin-right: 8px; }
.paren-note { margin-top: 32px; max-width: 680px; padding: 16px 20px; background: #F7F5EE; border: 1px dashed #A8A496; border-radius: 4px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.sync-note { margin: 0 0 28px; max-width: 680px; padding: 12px 16px; background: #F7F5EE; border-left: 3px solid #A8A496; border-radius: 2px;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.sync-note a { font-family: var(--sans); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.paren-note a { font-family: var(--sans); font-size: 14px; font-weight: 500; text-decoration: none; }
.minitree { margin: 0 0 24px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; font-family: var(--sans); font-size: 13px; line-height: 1.4; }
.minitree summary { cursor: pointer; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.minitree > div { margin-top: 10px; }
.minitree > a { display: inline-block; margin-top: 10px; }

/* prev / next */
.prevnext { border-top: 1px solid var(--line); background: var(--paper); }
.prevnext .row { padding-top: 28px; padding-bottom: 40px; align-items: flex-start; gap: 16px; }
.pn { display: flex; flex-direction: column; gap: 4px; min-height: 48px; text-decoration: none; max-width: 46%; }
.pn.right { align-items: flex-end; text-align: right; margin-left: auto; }
.pn span { font-family: var(--sans); font-size: 13px; color: var(--muted); }
.pn strong { font-size: 19px; font-weight: 600; }
.skipparen { align-self: center; font-family: var(--sans); font-size: 14px; color: var(--muted-2); }

/* lists of pages */
.seq, .toc { list-style: none; margin: 40px 0 0; padding: 0; max-width: 760px; }
.seq li a { display: flex; gap: 16px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line); text-decoration: none; font-size: 21px; }
.seq li:last-child a { border-bottom: 1px solid var(--line); }
.seq li a span { font-family: var(--sans); font-size: 14px; color: var(--muted); min-width: 24px; }
.toc { margin-top: 12px; }
.toc li a { display: block; padding: 8px 0; font-size: 19px; text-decoration: none; }
.toc-sec { margin-top: 44px; }
.toc-sec h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 32px; color: var(--blue); }
.toc-sec h3 { margin: 24px 0 0; font-family: var(--sans); font-weight: 500; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* footer */
.foot { border-top: 1px solid var(--line); background: #F1EFE8; font-family: var(--sans); font-size: 14px; color: var(--muted-2); }
.foot .row { padding-top: 24px; padding-bottom: 8px; }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot p { margin: 0 auto; padding-top: 8px; padding-bottom: 28px; line-height: 1.6; }

/* pages made for the canvas keep their inline styles; make them fit narrow screens */
.extra { overflow-wrap: anywhere; overflow-x: auto; }
.extra svg { max-width: 100%; height: auto; }
.extra table { display: block; max-width: 100%; overflow-x: auto; }
.home img { max-width: 100%; height: auto; }
.home { overflow-wrap: anywhere; }
.home [style*="flex: 0 0 auto"] { flex-shrink: 1 !important; max-width: 100%; }

@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hero .wrap { padding-top: 40px; padding-bottom: 32px; }
  .block { margin-top: 32px; }
  .block p, .block .list { font-size: 18px; line-height: 1.7; }
  .block aside { max-width: none; }
  .block .aside-empty { display: none; }
  .menu summary, .menu > ul > li > a { padding: 0 10px; }
  .menu > ul > li { position: static; }
  .menu details ul { left: 16px; right: 16px; min-width: 0; }
  .pn { max-width: 100%; }
  .marks { display: none; }
  a.doc { white-space: normal; }
  .menu { position: relative; }
}
@media print {
  .top, .crumbs, .prevnext, .foot { display: none; }
  .hero { background: none !important; }
}

/* home: Yves's welcome text */
.welcome { border-top: 1px solid var(--line); background: var(--bg); }
.welcome .wrap { padding-top: 56px; padding-bottom: 56px; }
.welcome h2 { margin: 0 0 20px; font-family: var(--display); font-weight: 600; font-size: 34px; color: var(--blue); }
.welcome-text { max-width: 720px; font-size: 19px; line-height: 1.75; color: var(--ink-2); }
.welcome-text p { margin: 0 0 16px; }

/* contact page */
.lead { margin: 40px 0 8px; max-width: 720px; font-size: 19px; line-height: 1.7; color: var(--ink-2); }
form.contact { margin-top: 24px; max-width: 640px; display: flex; flex-direction: column; gap: 18px; font-family: var(--sans); }
form.contact label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted-2); }
form.contact input, form.contact textarea { font: 17px/1.5 var(--serif); color: var(--ink); padding: 10px 12px; border: 1px solid #C9C5B8; border-radius: 4px; background: var(--paper); }
form.contact input:focus, form.contact textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
form.contact .hp { position: absolute; left: -9999px; }
form.contact button { align-self: flex-start; min-height: 48px; padding: 0 26px; border: 0; border-radius: 4px; background: var(--blue); color: #fff; font: 500 15px var(--sans); cursor: pointer; }
form.contact button:disabled { opacity: .6; cursor: wait; }
form.contact .status { margin: 0; font-size: 15px; }
form.contact .status.ok { color: #2F6B3A; }
form.contact .status.err { color: #8B3A3A; }
.direct { margin-top: 28px; font-family: var(--sans); font-size: 15px; color: var(--muted-2); }

/* a document waiting for the family's agreement: no link yet */
.attente { font-style: italic; color: var(--muted-2); }

/* menu: new sections (« new: true » in menu.yaml) */
.menu .new { margin-left: 10px; padding: 2px 8px; border-radius: 10px; background: #F3E9CF; color: #6B4E0E; font-size: 12px; font-weight: 500; white-space: nowrap; }

/* cookie consent banner (assets/consent.js) */
.consent{position:fixed;left:16px;right:16px;bottom:16px;z-index:50;max-width:620px;margin:0 auto;padding:16px 18px;
  background:#fff;border:1px solid #DCDAD2;border-radius:6px;box-shadow:0 6px 24px rgba(15,36,64,.18);
  font:15px/1.5 "IBM Plex Sans",system-ui,sans-serif;color:#22262B}
.consent p{margin:0 0 12px}
.consent-row{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
.consent button{min-height:44px;padding:0 18px;border-radius:22px;font:inherit;cursor:pointer;border:1px solid #1F3A5F}
.consent .go{background:#1F3A5F;color:#fff}
.consent .no{background:#fff;color:#1F3A5F}

/* header on phones: short language codes and a « Menu » button that opens the menu as a panel */
.menu-toggle, .langs .short, .arbre .gen { display: none; }
@media (max-width: 760px) {
  .bar { flex-wrap: nowrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .brand { flex: 1 1 auto; min-width: 0; gap: 10px; }
  .brand img { width: 32px; }
  .brand span { font-size: 20px; line-height: 1.15; }
  .langs { gap: 0; font-size: 13px; flex: 0 0 auto; }
  .langs a { padding: 10px 5px; }
  .langs .full { display: none; }
  .langs .short { display: inline; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; min-height: 40px; padding: 0 14px;
    border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--blue-dark);
    font: 500 14px var(--sans); cursor: pointer; }
  .menu-toggle::before { content: ''; width: 16px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
  .top.open .menu-toggle::before { content: '✕'; width: 16px; height: auto; background: none; box-shadow: none; font-size: 15px; line-height: 1; text-align: center; }
  .top.open .menu-toggle { background: var(--cream); }
  .js .menu { display: none; }
  .js .top.open .menu { display: block; max-height: calc(100vh - 64px); overflow-y: auto; padding: 0 0 16px; }
  .menu > ul { flex-direction: column; gap: 0; font-size: 17px; }
  .menu > ul > li { position: static; border-bottom: 1px solid var(--line); }
  .menu summary, .menu > ul > li > a { justify-content: space-between; min-height: 52px; padding: 0 4px; border-bottom: 0; }
  .menu details[open] > summary { color: var(--blue-dark); font-weight: 600; }
  .menu details[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
  .menu details ul { position: static; min-width: 0; max-width: none; margin: 0 0 10px; padding: 0; border: 0; box-shadow: none; background: transparent; }
  .menu details a { min-height: 44px; padding: 4px 8px 4px 16px; font-size: 16px; border-radius: 4px; }
  .menu details a.sub { padding-left: 32px; }
}
@media (max-width: 380px) {
  .brand span { font-size: 17px; }
  .menu-toggle { padding: 0 10px; }
}

/* family tree on phones: small steps, and no more indentation after the 6th level (a « gén. N » label instead) */
@media (max-width: 640px) {
  .arbre ul { margin-left: 0 !important; padding-left: 9px !important; }
  .arbre ul ul ul ul ul ul ul { padding-left: 0 !important; border-left: 0 !important; }
  .arbre li { overflow-wrap: break-word; }
  .arbre [style*="font-size: 17px"] { font-size: 16px !important; }
  .arbre .gen { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 9px; background: var(--cream);
    font: 500 11px/18px var(--sans); color: var(--muted); vertical-align: 2px; }
}

/* the header stays at the top of the screen (phones and computers); anchors are not hidden under it */
.top { position: sticky; top: 0; z-index: 30; transition: box-shadow .2s; }
.top.scrolled { box-shadow: 0 2px 12px rgba(15, 36, 64, .10); }
html { scroll-padding-top: var(--header-h, 140px); }
@media (min-width: 761px) {
  .top.scrolled .bar { padding-top: 8px; }
  .top.scrolled .brand img { width: 30px; }
  .top.scrolled .brand span { font-size: 20px; }
}
