/* =========================================================================
   VIRTUAL UPSTATE - carnet de bord d'un steamer du lac.
   Squelette de base : colonne-longue (rehabille, prefixe qol-).
   Aucune ressource externe. Toutes couleurs en :root + voile en dur.
   ========================================================================= */

:root {
  --fond: #f4f1e6;
  --fond-creux: #e7e2cf;
  --encre: #1d2b26;
  --encre-douce: #54655e;
  --accent: #14646d;
  --accent-sourd: #0c454c;
  --lisere: #bcc9bd;

  --titre-police: "Iowan Old Style", Charter, Georgia, Cambria, "Times New Roman", serif;
  --texte-police: Charter, "Iowan Old Style", Georgia, Cambria, "Liberation Serif", serif;
  --annexe-police: "Avenir Next", "Segoe UI", Verdana, "DejaVu Sans", sans-serif;

  --mesure: 34rem;
  --marge-large: 8.5rem;
  --respiration: 2.6rem;
  --corps: clamp(1.05rem, 0.99rem + 0.28vw, 1.19rem);
  --interligne: 1.66;

  --epaisseur-filet: 1px;
  --rayon: 0;
}

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

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

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--texte-police);
  font-size: var(--corps);
  line-height: var(--interligne);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--titre-police);
  font-weight: 600;
  line-height: 1.18;
  margin: 0;
  letter-spacing: -0.005em;
}

p, ul, ol, figure, table, blockquote, dl { margin: 0; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-sourd); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

hr { border: 0; }

/* ---- acces clavier ---- */
.qol-evitement {
  position: absolute; left: -9999px; top: 0;
  background: var(--encre); color: var(--fond);
  padding: 0.7rem 1.1rem;
  font-family: var(--annexe-police);
  z-index: 20;
}
.qol-evitement:focus { left: 0.6rem; top: 0.6rem; color: var(--fond); }

/* ---- piste : colonne + quai gauche ---- */
.qol-piste { width: min(100% - 2.4rem, var(--mesure)); margin-inline: auto; position: relative; }

@media (min-width: 64rem) {
  .qol-piste {
    width: min(100% - 4rem, calc(var(--mesure) + var(--marge-large)));
    padding-left: var(--marge-large);
  }
}

.qol-debord { margin-left: 0; }
@media (min-width: 64rem) {
  .qol-debord { margin-left: calc(-1 * var(--marge-large)); }
}

/* ---- proue / manchette ---- */
.qol-proue {
  border-bottom: var(--epaisseur-filet) solid var(--lisere);
  padding: 1.1rem 0 0.9rem;
}
.qol-proue__interieur {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.6rem 1.4rem;
}
.qol-enseigne {
  font-family: var(--titre-police);
  font-size: 1.22rem; letter-spacing: 0.01em;
  color: var(--encre); text-decoration: none;
}
.qol-enseigne:hover { color: var(--accent); }
.qol-enseigne__mention {
  display: block;
  font-family: var(--annexe-police);
  font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--encre-douce); margin-top: 0.25rem;
}
.qol-cap ul {
  list-style: none; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.15rem;
}
.qol-cap a {
  font-family: var(--annexe-police);
  font-size: 0.85rem; letter-spacing: 0.05em;
  color: var(--encre-douce); text-decoration: none;
  padding-bottom: 0.15rem; border-bottom: 2px solid transparent;
}
.qol-cap a:hover { color: var(--accent); border-bottom-color: var(--lisere); }
.qol-cap a[aria-current] { color: var(--encre); border-bottom-color: var(--accent); }

/* ---- bande heros d'accueil : BANDE, jamais un ecran ---- */
.qol-bandehero { position: relative; overflow: hidden; border-bottom: 3px solid var(--encre); }
.qol-bandehero img {
  width: 100%;
  height: clamp(180px, 26vh, 250px);
  object-fit: cover;
}
.qol-voile {
  position: absolute; inset: 0;
  background: rgba(13, 32, 38, 0.78);
}
.qol-bandehero__texte {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 1.1rem 1.2rem 1.2rem;
}
.qol-bandehero__sur {
  font-family: var(--annexe-police);
  font-size: 0.72rem; letter-spacing: 0.17em; text-transform: uppercase;
  color: #cfe4e6; margin: 0 0 0.35rem;
}
.qol-bandehero__titre {
  font-size: clamp(1.55rem, 1.25rem + 1.7vw, 2.3rem);
  line-height: 1.16;
  color: #f6f3ea;
  max-width: 30rem;
  margin: 0 0 0.45rem;
}
.qol-bandehero__chapo {
  font-size: clamp(0.98rem, 0.92rem + 0.3vw, 1.12rem);
  line-height: 1.45;
  color: #dce6df;
  max-width: 33rem;
}
.qol-compteur {
  list-style: none; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem;
  font-family: var(--annexe-police);
  font-size: 0.84rem; color: var(--encre-douce);
  padding: 0.85rem 0;
  border-bottom: var(--epaisseur-filet) solid var(--lisere);
}
.qol-compteur strong { color: var(--encre); font-weight: 600; }

/* ---- sections de page ---- */
.qol-section { margin-top: var(--respiration); }
.qol-section__titre {
  font-family: var(--annexe-police);
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--encre-douce);
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--encre);
  margin-bottom: 1.2rem;
}

/* ---- passex : tuiles de rubrique compactes, visibles sans derouler ---- */
.qol-passex { list-style: none; margin: 0; padding: 0; }
.qol-passex li { border-bottom: var(--epaisseur-filet) dotted var(--lisere); }
.qol-passex li:last-child { border-bottom: 0; }
.qol-tuile {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.95rem;
  align-items: start;
  padding: 0.85rem 0;
}
.qol-tuile img {
  width: 4.6rem; height: 3.45rem; object-fit: cover;
  border: var(--epaisseur-filet) solid var(--lisere);
}
.qol-tuile__titre {
  font-family: var(--titre-police);
  font-size: 1.08rem; line-height: 1.22;
  margin: 0 0 0.18rem;
}
.qol-tuile__titre a { color: var(--encre); text-decoration: none; }
.qol-tuile__titre a:hover { color: var(--accent); text-decoration: underline; }
.qol-tuile__texte { font-size: 0.93rem; color: var(--encre-douce); line-height: 1.42; }

/* ---- fil d'Ariane ---- */
.qol-fil {
  font-family: var(--annexe-police);
  font-size: 0.78rem; letter-spacing: 0.06em;
  color: var(--encre-douce);
  padding: 0.75rem 0 0;
}
.qol-fil ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.55rem; }
.qol-fil li { display: inline-flex; gap: 0.55rem; align-items: baseline; }
.qol-fil li + li::before { content: "\203A"; color: var(--lisere); }
.qol-fil a { color: var(--encre-douce); text-decoration: none; }
.qol-fil a:hover { color: var(--accent); text-decoration: underline; }
.qol-fil [aria-current] { color: var(--encre); }

/* ---- en-tetes ---- */
.qol-liminaire { padding-top: 1.1rem; }
.qol-surtitre {
  font-family: var(--annexe-police);
  font-size: 0.76rem; letter-spacing: 0.17em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.85rem;
}
.qol-surtitre a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--lisere); }
.qol-surtitre a:hover { border-bottom-color: currentColor; }
.qol-marque {
  display: inline-block;
  font-family: var(--annexe-police);
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fond); background: var(--accent);
  padding: 0.14rem 0.5rem; margin-left: 0.55rem;
  vertical-align: 0.14em;
}
.qol-titre-page { font-size: clamp(2rem, 1.5rem + 2.3vw, 3.05rem); margin-bottom: 1rem; }
.qol-chapo {
  font-size: clamp(1.12rem, 1.03rem + 0.42vw, 1.34rem);
  line-height: 1.5; color: var(--encre-douce); margin-bottom: 1.3rem;
}
.qol-signature {
  font-family: var(--annexe-police);
  font-size: 0.82rem; color: var(--encre-douce);
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem;
  padding-bottom: 1.4rem;
  border-bottom: var(--epaisseur-filet) solid var(--lisere);
}
.qol-signature a { color: inherit; }

/* ---- corps long ---- */
.qol-corps { counter-reset: qol-intertitre; padding-top: 1.6rem; }
.qol-corps p { margin-bottom: 1.15rem; max-width: var(--mesure); }
.qol-corps > ul, .qol-corps > ol { margin: 0 0 1.5rem; padding-left: 1.3rem; max-width: var(--mesure); }
.qol-corps li { margin-bottom: 0.5rem; }
.qol-corps li::marker { color: var(--accent); }
.qol-corps a { color: var(--accent); text-decoration: underline; }
.qol-lettrine::first-letter {
  float: left;
  font-family: var(--titre-police);
  font-size: 3.5em; line-height: 0.82;
  padding: 0.06em 0.12em 0 0;
  color: var(--accent);
}
.qol-intertitre {
  font-size: clamp(1.32rem, 1.18rem + 0.6vw, 1.66rem);
  margin: 2.5rem 0 0.9rem;
  padding-top: 1.1rem;
  border-top: 2px solid var(--encre);
  position: relative;
  max-width: var(--mesure);
}
.qol-intertitre::before {
  counter-increment: qol-intertitre;
  content: counter(qol-intertitre, decimal-leading-zero);
  display: block;
  font-family: var(--annexe-police);
  font-size: 0.78rem; letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.45rem;
}
@media (min-width: 64rem) {
  .qol-intertitre::before {
    position: absolute;
    left: calc(-1 * var(--marge-large));
    top: 1.35rem;
    width: calc(var(--marge-large) - 1.6rem);
    text-align: right; margin: 0;
  }
}
.qol-exergue {
  margin: 2.1rem 0;
  padding-left: 1.1rem;
  border-left: 4px solid var(--accent);
  font-family: var(--titre-police);
  font-size: clamp(1.2rem, 1.08rem + 0.55vw, 1.5rem);
  line-height: 1.32; color: var(--encre);
}
@media (min-width: 64rem) {
  .qol-exergue {
    margin-left: calc(-1 * var(--marge-large));
    padding-left: 0; border-left: 0;
    border-top: 2px solid var(--accent);
    padding-top: 0.9rem;
  }
}
.qol-exergue p { margin: 0; max-width: none; }
.qol-exergue cite {
  display: block; margin-top: 0.7rem;
  font-family: var(--annexe-police); font-style: normal;
  font-size: 0.8rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--encre-douce);
}
.qol-encart {
  background: var(--fond-creux);
  border-top: 3px solid var(--accent);
  padding: 1.3rem 1.4rem; margin: 2.2rem 0;
}
.qol-encart__titre {
  font-family: var(--annexe-police);
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.6rem;
}
.qol-encart p:last-child { margin-bottom: 0; }

/* ---- planches / figures ---- */
.qol-planche { margin: 2.2rem 0; }
.qol-planche img {
  width: 100%; height: auto;
  border: var(--epaisseur-filet) solid var(--lisere);
}
.qol-planche figcaption {
  font-family: var(--annexe-police);
  font-size: 0.82rem; color: var(--encre-douce);
  margin-top: 0.6rem; padding-left: 0.7rem;
  border-left: 2px solid var(--lisere);
}

/* ---- tableaux ---- */
.qol-tableau {
  overflow-x: auto; margin: 2rem 0;
  border: var(--epaisseur-filet) solid var(--lisere);
  -webkit-overflow-scrolling: touch;
}
.qol-tableau table {
  border-collapse: collapse; min-width: 38rem; width: 100%;
  font-family: var(--annexe-police); font-size: 0.88rem;
}
.qol-tableau th:first-child, .qol-tableau td:first-child { white-space: nowrap; }
.qol-tableau caption {
  caption-side: top; text-align: left;
  padding: 0.8rem 0.9rem;
  font-family: var(--annexe-police);
  font-size: 0.78rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--encre-douce);
  border-bottom: var(--epaisseur-filet) solid var(--lisere);
}
.qol-tableau th, .qol-tableau td {
  text-align: left; padding: 0.62rem 0.9rem;
  border-bottom: var(--epaisseur-filet) solid var(--lisere);
  vertical-align: top;
}
.qol-tableau thead th { background: var(--fond-creux); color: var(--encre); }
.qol-tableau tbody tr:last-child td { border-bottom: 0; }

/* ---- journal de bord : notes ---- */
.qol-renvoi {
  font-family: var(--annexe-police);
  font-size: 0.68em; vertical-align: super; line-height: 0;
  text-decoration: none; padding: 0 0.12em;
}
.qol-renvoi:hover { text-decoration: underline; }
.qol-journal { margin-top: 3rem; padding-top: 1.2rem; border-top: 2px solid var(--encre); }
.qol-journal__titre {
  font-family: var(--annexe-police);
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--encre-douce); margin-bottom: 1rem;
}
.qol-journal ol { margin: 0; padding-left: 1.35rem; font-size: 0.92rem; color: var(--encre-douce); }
.qol-journal li { margin-bottom: 0.75rem; }
.qol-journal li::marker { font-family: var(--annexe-police); color: var(--accent); }
.qol-retour { font-family: var(--annexe-police); text-decoration: none; margin-left: 0.35rem; }

/* ---- recapitulatif de fin (sommaire) ---- */
.qol-recapitul { margin-top: 2.8rem; padding: 1.4rem 0 0; border-top: var(--epaisseur-filet) solid var(--lisere); }
.qol-recapitul__titre {
  font-family: var(--annexe-police);
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--encre-douce); margin-bottom: 1rem;
}
.qol-recapitul ol { list-style: none; margin: 0; padding: 0; counter-reset: qol-cap-num; }
.qol-recapitul li { margin-bottom: 0.55rem; }
.qol-recapitul a {
  display: grid;
  grid-template-columns: auto minmax(0, auto) minmax(1.5rem, 1fr) auto;
  align-items: baseline; gap: 0.55rem;
  text-decoration: none; color: var(--encre);
  font-family: var(--annexe-police); font-size: 0.94rem;
}
.qol-recapitul a:hover { color: var(--accent); }
.qol-recapitul a::before {
  counter-increment: qol-cap-num;
  content: counter(qol-cap-num, decimal-leading-zero);
  color: var(--accent); font-size: 0.8rem; letter-spacing: 0.08em;
}
.qol-pointille { border-bottom: 1px dotted var(--lisere); transform: translateY(-0.28em); }
.qol-recapitul__repere { color: var(--encre-douce); font-size: 0.82rem; }

/* ---- escales : entrees datees (accueil, rubriques) ---- */
.qol-escales { list-style: none; margin: 0; padding: 0; }
.qol-escale {
  padding: 1.5rem 0;
  border-bottom: var(--epaisseur-filet) solid var(--lisere);
  position: relative;
}
.qol-escale:first-child { padding-top: 0.4rem; }
.qol-escales > .qol-escale:last-child { border-bottom: 0; padding-bottom: 0.8rem; }
.qol-escale__date {
  display: block;
  font-family: var(--annexe-police);
  font-size: 0.76rem; letter-spacing: 0.13em;
  color: var(--encre-douce); margin-bottom: 0.45rem;
}
@media (min-width: 64rem) {
  .qol-escale__date {
    position: absolute;
    left: calc(-1 * var(--marge-large));
    top: 1.75rem;
    width: calc(var(--marge-large) - 1.6rem);
    text-align: right; margin: 0;
  }
  .qol-escale:first-child .qol-escale__date { top: 0.65rem; }
}
.qol-escale__vignette {
  float: right; width: 6.2rem; height: 4.3rem; object-fit: cover;
  border: var(--epaisseur-filet) solid var(--lisere);
  margin: 0.2rem 0 0.7rem 1rem;
}
.qol-escale::after { content: ""; display: block; clear: both; }
.qol-escale__titre { font-size: clamp(1.25rem, 1.12rem + 0.6vw, 1.58rem); margin-bottom: 0.5rem; }
.qol-escale__titre a { color: var(--encre); text-decoration: none; }
.qol-escale__titre a:hover { color: var(--accent); text-decoration: underline; }
.qol-escale__amorce { color: var(--encre-douce); margin-bottom: 0.6rem; }
.qol-escale__pied {
  font-family: var(--annexe-police);
  font-size: 0.8rem; color: var(--encre-douce);
  display: flex; flex-wrap: wrap; gap: 0.25rem 0.8rem;
}
.qol-escale__pied a { color: var(--accent); text-decoration: none; }
.qol-escale__pied a:hover { text-decoration: underline; }

/* ---- recueil de rubriques vers le bas de page ---- */
.qol-registre-des-rubriques { list-style: none; margin: 0; padding: 0; }
.qol-registre-des-rubriques li {
  padding: 0.95rem 0;
  border-bottom: var(--epaisseur-filet) dotted var(--lisere);
}
.qol-registre-des-rubriques li:last-child { border-bottom: 0; }
.qol-registre-des-rubriques a {
  font-family: var(--titre-police);
  font-size: 1.1rem; color: var(--encre); text-decoration: none;
  border-bottom: 2px solid var(--accent);
}
.qol-registre-des-rubriques a:hover { color: var(--accent); }
.qol-registre-des-rubriques p { margin: 0.4rem 0 0; font-size: 0.95rem; color: var(--encre-douce); }

/* ---- suites, jalons, suite de lecture ---- */
.qol-suite { margin-top: 2.6rem; }
.qol-suite ul { list-style: none; margin: 0; padding: 0; }
.qol-suite li { padding: 0.7rem 0; border-bottom: var(--epaisseur-filet) dotted var(--lisere); }
.qol-suite a { font-family: var(--titre-police); font-size: 1.05rem; color: var(--encre); text-decoration: none; }
.qol-suite a:hover { color: var(--accent); text-decoration: underline; }
.qol-suite span {
  display: block;
  font-family: var(--annexe-police);
  font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--encre-douce); margin-bottom: 0.2rem;
}
.qol-pas {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem 1.2rem;
  margin-top: 2rem; padding-top: 1.1rem;
  border-top: var(--epaisseur-filet) solid var(--lisere);
  font-family: var(--annexe-police); font-size: 0.88rem;
}
.qol-pas a { text-decoration: none; border-bottom: 1px solid var(--lisere); }
.qol-pas a:hover { border-bottom-color: var(--accent); }

/* ---- cartouche document patrimoine restaure ---- */
.qol-cartouche {
  background: var(--fond-creux);
  border: var(--epaisseur-filet) solid var(--lisere);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.2rem; margin: 1.8rem 0 0;
  font-family: var(--annexe-police);
  font-size: 0.86rem; color: var(--encre-douce);
}
.qol-cartouche strong { color: var(--encre); font-weight: 600; }

/* ---- ours ---- */
.qol-ours {
  margin-top: calc(var(--respiration) * 1.6);
  border-top: 3px solid var(--encre);
  padding: 1.6rem 0 3rem;
  font-family: var(--annexe-police);
  font-size: 0.87rem; color: var(--encre-douce);
}
.qol-ours__nom {
  font-family: var(--titre-police);
  font-size: 1.05rem; color: var(--encre); margin-bottom: 0.5rem;
}
.qol-ours p { margin-bottom: 0.9rem; max-width: var(--mesure); }
.qol-ours ul {
  list-style: none; margin: 0 0 1rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem;
}
.qol-ours a { color: var(--encre-douce); text-decoration: none; border-bottom: 1px solid var(--lisere); }
.qol-ours a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.qol-mention { font-size: 0.78rem; letter-spacing: 0.03em; }

/* ---- impression ---- */
@media print {
  :root { --fond: #ffffff; --fond-creux: #f2f2f2; --encre: #000000; --accent: #000000; }
  .qol-cap, .qol-suite, .qol-pas, .qol-evitement, .qol-bandehero img { display: none; }
  .qol-piste { width: auto; padding-left: 0; }
  .qol-exergue, .qol-intertitre::before, .qol-escale__date { margin-left: 0; position: static; text-align: left; }
  a { text-decoration: none; }
}

/* ---- hook supplementaires (GABARIT section 3) ---- */
.qol-article { display: block; }
.qol-hero-planche img { height: auto; }
.qol-home-corps { margin-top: 0; }
.qol-404 { padding-top: 4rem; }
