/* The Long Table, feuille unique. Vocabulaire de classes : hth- (hearth, household).
   Aucune requête externe : piles système uniquement. */

:root {
  --paper:        #edf0ea;
  --paper-raised: #f9fbf6;
  --paper-recess: #dfe5da;
  --ink:          #1c211d;
  --ink-soft:     #566057;
  --rule:         #c6cec1;
  --accent:       #1f5f7a;
  --accent-deep:  #143f52;
  --ember:        #c25a2b;
  --ember-deep:   #9a4520;
  --gold:         #9a7b1c;
  --select:       #d8e6ec;

  --face-title: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --face-text:  "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", "DejaVu Sans", Verdana, sans-serif;
  --face-mark:  "Franklin Gothic Medium", "Franklin Gothic", "ITC Franklin Gothic", "Liberation Sans Narrow", Tahoma, sans-serif;

  --step:   1.35rem;
  --lead:   1.72;
  --measure: 66ch;
  --rail-w: 15.5rem;
  --page:   74rem;
  --round:  16px;
  --round-s: 10px;

  --t1: clamp(2rem, 1.35rem + 2.5vw, 3.1rem);
  --t2: clamp(1.32rem, 1.1rem + 0.9vw, 1.72rem);
  --t3: clamp(1.06rem, 0.98rem + 0.35vw, 1.22rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--face-text);
  font-size: 16.5px;
  line-height: var(--lead);
}

::selection { background: var(--select); }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-deep); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px;
}

h1, h2, h3, h4 { font-family: var(--face-title); font-weight: 700; line-height: 1.2; margin: 0; }

p { margin: 0 0 var(--step); }

.hth-hush {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.hth-hop {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background: var(--ink); color: var(--paper); padding: .7rem 1.1rem; border-radius: 0 0 var(--round-s) 0;
}
.hth-hop:focus { left: 0; }

.hth-hearth { width: min(100% - 2.2rem, var(--page)); margin-inline: auto; }

/* ---------- linteau (en-tête) ---------- */

.hth-lintel {
  background: var(--paper-raised);
  border-bottom: 1px solid var(--rule);
  position: relative; z-index: 5;
}
.hth-lintel__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem;
  padding: .62rem 0;
}
.hth-sign { display: flex; align-items: baseline; gap: .55rem; text-decoration: none; color: var(--ink); }
.hth-sign__name { font-family: var(--face-title); font-size: 1.34rem; font-weight: 700; letter-spacing: .01em; }
.hth-sign__line {
  font-family: var(--face-mark); font-size: .705rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft);
}
.hth-passage { margin-left: auto; }
.hth-passage ul { list-style: none; display: flex; flex-wrap: wrap; gap: .1rem .35rem; margin: 0; padding: 0; }
.hth-passage a {
  display: inline-block; padding: .34rem .6rem; border-radius: 999px;
  font-family: var(--face-mark); font-size: .795rem; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: none; color: var(--ink-soft);
}
.hth-passage a:hover { background: var(--paper-recess); color: var(--ink); }
.hth-passage a[aria-current="page"] { background: var(--accent); color: #fff; }

/* ---------- fil d'Ariane ---------- */

.hth-crumbs { font-family: var(--face-mark); font-size: .765rem; letter-spacing: .05em; padding: .85rem 0 .1rem; }
.hth-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; color: var(--ink-soft); }
.hth-crumbs li + li::before { content: "›"; margin-right: .35rem; color: var(--rule); }
.hth-crumbs a { text-decoration: none; }
.hth-crumbs a:hover { text-decoration: underline; }

/* ---------- seuil (bande héros) ---------- */

.hth-threshold { position: relative; overflow: hidden; border-radius: var(--round); margin-top: .9rem; isolation: isolate; }
.hth-threshold__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hth-threshold__veil { position: absolute; inset: 0; background: rgba(17, 41, 50, 0.79); z-index: 1; }
.hth-threshold__inner { position: relative; z-index: 2; padding: clamp(1.4rem, 2.6vw, 2.1rem) clamp(1.2rem, 3vw, 2.6rem); color: #f2f6f2; }
.hth-threshold__kicker {
  font-family: var(--face-mark); font-size: .77rem; letter-spacing: .17em; text-transform: uppercase;
  color: #f0c58f; margin: 0 0 .5rem;
}
.hth-threshold__title { font-size: var(--t1); color: #fff; max-width: 30ch; }
.hth-threshold__stand { max-width: 58ch; margin: .75rem 0 0; color: #e2ebe6; font-size: 1.03rem; }

.hth-tally { display: flex; flex-wrap: wrap; gap: 1.6rem; margin: 1.05rem 0 0; padding: 0; list-style: none; }
.hth-tally__cell { display: flex; align-items: baseline; gap: .45rem; }
.hth-tally__num { font-family: var(--face-title); font-size: 1.5rem; color: #fff; font-weight: 700; }
.hth-tally__label { font-family: var(--face-mark); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: #cfe0da; }

/* ---------- porte (tuiles de rubrique) ---------- */

.hth-band { margin: 1.7rem 0 0; }
.hth-band__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--ink); padding-bottom: .45rem; margin-bottom: 1rem; }
.hth-band__name { font-size: var(--t2); }
.hth-band__aside { font-family: var(--face-mark); font-size: .77rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }

.hth-doorway { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); list-style: none; margin: 0; padding: 0; }
.hth-doorway__pane {
  background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--round);
  overflow: hidden; display: grid; grid-template-columns: 7.6rem minmax(0, 1fr); align-items: stretch;
}
.hth-doorway__photo { width: 100%; height: 100%; min-height: 7rem; aspect-ratio: 1 / 1; object-fit: cover; }
.hth-doorway__body { padding: .7rem .9rem .75rem; }
.hth-doorway__name { font-size: var(--t3); margin: 0 0 .25rem; }
.hth-doorway__name a { text-decoration: none; }
.hth-doorway__name a:hover { text-decoration: underline; }
.hth-doorway__note { margin: 0; font-size: .845rem; line-height: 1.45; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hth-doorway__mark { font-family: var(--face-mark); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ember-deep); display: block; margin-bottom: .3rem; }

/* ---------- la semaine (flux daté) ---------- */

.hth-week { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.hth-week__entry {
  display: grid; grid-template-columns: 6.6rem 1fr; gap: .8rem; align-items: start;
  background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--round); padding: .65rem;
}
.hth-week__thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--round-s); }
.hth-week__date { font-family: var(--face-mark); font-size: .715rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ember-deep); display: block; margin-bottom: .22rem; }
.hth-week__title { font-size: 1.03rem; margin: 0 0 .28rem; line-height: 1.3; }
.hth-week__title a { text-decoration: none; }
.hth-week__title a:hover { text-decoration: underline; }
.hth-week__blurb { margin: 0; font-size: .85rem; color: var(--ink-soft); }

/* ---------- l'étagère (miniatures serrées) ---------- */

.hth-shelf { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.5rem), 1fr)); }
.hth-shelf__jar { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--round); overflow: hidden; }
.hth-shelf__photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.hth-shelf__body { padding: .6rem .7rem .75rem; }
.hth-shelf__mark { font-family: var(--face-mark); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: .2rem; }
.hth-shelf__title { font-size: .96rem; margin: 0; line-height: 1.28; }
.hth-shelf__title a { text-decoration: none; }
.hth-shelf__title a:hover { text-decoration: underline; }

/* ---------- deux colonnes (plaque de cuisson) ---------- */

.hth-hob { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; align-items: stretch; margin: 1.4rem 0 2.4rem; }
@media (min-width: 62rem) {
  .hth-hob { grid-template-columns: var(--rail-w) minmax(0, 1fr); gap: 2.4rem; }
}

.hth-rail__box { position: sticky; top: 1rem; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--round); padding: 1rem 1rem 1.1rem; }
.hth-rail__key { font-family: var(--face-mark); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 .6rem; }
.hth-rail__list { list-style: none; counter-reset: rail; margin: 0; padding: 0; }
.hth-rail__step { margin-bottom: .42rem; }
.hth-rail__step > a { counter-increment: rail; text-decoration: none; font-size: .9rem; display: block; padding-left: 1.7rem; position: relative; }
.hth-rail__step > a::before {
  content: counter(rail, decimal-leading-zero); position: absolute; left: 0; top: 0;
  font-family: var(--face-mark); font-size: .74rem; color: var(--gold); letter-spacing: .04em;
}
.hth-rail__step > a:hover { text-decoration: underline; }
.hth-rail__step > a[aria-current="true"] { color: var(--ember-deep); font-weight: 700; }
.hth-rail__note { margin: .9rem 0 0; padding-top: .8rem; border-top: 1px solid var(--rule); font-size: .82rem; color: var(--ink-soft); }
.hth-rail__note p { margin: 0 0 .4rem; }

.hth-board { max-width: var(--measure); }
.hth-board > p, .hth-board > ul, .hth-board > ol { font-size: 1rem; }

/* ---------- services (sections numérotées) ---------- */

.hth-course { margin: 0 0 2.2rem; padding-left: 1.15rem; border-left: 3px solid var(--paper-recess); }
.hth-course__step { font-size: var(--t2); margin: 0 0 .65rem; display: flex; gap: .6rem; align-items: baseline; }
.hth-course__rank { font-family: var(--face-mark); font-size: .84rem; color: var(--ember); letter-spacing: .08em; flex: none; }

.hth-keep { background: var(--paper-recess); border-radius: var(--round-s); padding: .85rem 1rem; margin: 1.1rem 0 0; }
.hth-keep__key { font-family: var(--face-mark); font-size: .74rem; letter-spacing: .13em; text-transform: uppercase; color: var(--accent-deep); margin: 0 0 .45rem; }
.hth-keep__points { margin: 0; padding-left: 1.1rem; font-size: .92rem; }
.hth-keep__points li { margin-bottom: .3rem; }

.hth-jar { background: var(--paper-raised); border: 1px solid var(--rule); border-left: 4px solid var(--gold); border-radius: var(--round-s); padding: .9rem 1rem; margin: 0 0 var(--step); }
.hth-jar__key { font-family: var(--face-mark); font-size: .74rem; letter-spacing: .13em; text-transform: uppercase; color: var(--gold); margin: 0 0 .4rem; }
.hth-jar p:last-child { margin-bottom: 0; }

.hth-steps { list-style: none; counter-reset: hob; margin: 0 0 var(--step); padding: 0; }
.hth-steps > li { counter-increment: hob; position: relative; padding-left: 2.3rem; margin-bottom: .65rem; }
.hth-steps > li::before {
  content: counter(hob); position: absolute; left: 0; top: .1rem;
  width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--accent-deep); color: #fff;
  display: grid; place-items: center; font-family: var(--face-mark); font-size: .8rem;
}

.hth-terms { margin: 0 0 var(--step); }
.hth-terms dt { font-family: var(--face-mark); font-size: .84rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep); margin-top: .7rem; }
.hth-terms dd { margin: .2rem 0 0; font-size: .95rem; }

.hth-ledger { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--round-s); margin: 0 0 var(--step); background: var(--paper-raised); }
.hth-ledger table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.hth-ledger caption { text-align: left; padding: .7rem .9rem .1rem; font-family: var(--face-mark); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.hth-ledger th, .hth-ledger td { text-align: left; padding: .55rem .9rem; border-bottom: 1px solid var(--rule); }
.hth-ledger thead th { background: var(--paper-recess); font-family: var(--face-mark); font-size: .8rem; letter-spacing: .05em; }
.hth-ledger tbody tr:last-child td { border-bottom: 0; }

.hth-plate { margin: 1.1rem 0 var(--step); }
.hth-plate img { border-radius: var(--round); width: 100%; aspect-ratio: 8 / 3; object-fit: cover; }
.hth-plate figcaption { font-size: .845rem; color: var(--ink-soft); margin-top: .45rem; padding-left: .1rem; }

.hth-onward { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--round); padding: 1rem 1.1rem; margin: 1.6rem 0 0; }
.hth-onward__key { font-family: var(--face-mark); font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 .55rem; }
.hth-onward ul { margin: 0; padding-left: 1.1rem; font-size: .94rem; }
.hth-onward li { margin-bottom: .4rem; }

/* ---------- liste dense de rubrique ---------- */

.hth-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.hth-list__item {
  display: grid; grid-template-columns: 8.2rem minmax(0, 1fr); gap: 1rem;
  background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--round); padding: .7rem;
}
@media (max-width: 34rem) { .hth-list__item { grid-template-columns: 5.4rem minmax(0, 1fr); } }
.hth-list__photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--round-s); }
.hth-list__mark { font-family: var(--face-mark); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ember-deep); display: block; margin-bottom: .22rem; }
.hth-list__title { font-size: 1.08rem; margin: 0 0 .3rem; line-height: 1.28; }
.hth-list__title a { text-decoration: none; }
.hth-list__title a:hover { text-decoration: underline; }
.hth-list__blurb { margin: 0; font-size: .89rem; color: var(--ink-soft); }

/* ---------- entrée de page ---------- */

.hth-entry { padding: .3rem 0 .2rem; }
.hth-entry__title { font-size: var(--t1); max-width: 30ch; margin: .35rem 0 0; }
.hth-entry__stand { max-width: 62ch; font-size: 1.06rem; color: var(--ink-soft); margin: .7rem 0 0; }
.hth-entry__marks { font-family: var(--face-mark); font-size: .765rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin: .8rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; list-style: none; padding: 0; }
.hth-entry__marks a { text-decoration: none; }

/* ---------- pied de page ---------- */

.hth-sill { background: var(--paper-raised); border-top: 1px solid var(--rule); margin-top: 2.4rem; }
.hth-sill__row { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); padding: 1.7rem 0 1.2rem; }
.hth-sill__key { font-family: var(--face-mark); font-size: .74rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 .5rem; }
.hth-sill ul { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.hth-sill li { margin-bottom: .32rem; }
.hth-sill a { text-decoration: none; }
.hth-sill a:hover { text-decoration: underline; }
.hth-sill__base { border-top: 1px solid var(--rule); padding: .85rem 0 1.4rem; font-family: var(--face-mark); font-size: .755rem; letter-spacing: .06em; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }

/* ---------- réglages fins ---------- */

@media (max-width: 62rem) {
  .hth-rail__box { position: static; }
  .hth-week__entry { grid-template-columns: 5.6rem 1fr; }
}
@media (max-width: 48rem) {
  .hth-plate img { aspect-ratio: 3 / 2; }
}
@media (max-width: 34rem) {
  .hth-course { padding-left: 0; border-left: 0; }
  .hth-passage a { padding: .3rem .45rem; font-size: .745rem; }
}

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

@media print {
  .hth-lintel, .hth-passage, .hth-rail, .hth-sill, .hth-onward { display: none; }
  .hth-hob { display: block; }
  body { background: #fff; }
}
