/* ==========================================================================
   Carnet Santé Romand ,  peau « fch »
   Établi éditorial : fiches posées, notes de marge annotées, sigil carré.
   Polices : Open Sans 700 (titres) + Roboto 400/700 (texte) ,  3 fichiers locaux.
   ========================================================================== */
@font-face {
  font-family: 'FchTitre';
  src: url(/open-sans-latin-700.woff2) format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'FchTexte';
  src: url(/roboto-latin-regular.woff2) format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'FchTexte';
  src: url(/roboto-latin-700.woff2) format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --fch-papier: #faf7f0;
  --fch-papier-clair: #fffdf9;
  --fch-cendre: #ece7db;
  --fch-encre: #16232b;
  --fch-encre-pale: #55636b;
  --fch-olive: #4f6b2a;
  --fch-olive-fonce: #3a4f1f;
  --fch-vert-tendre: #a7c957;
  --fch-bleu: #2f5f80;
  --fch-rouille: #a65141;
  --fch-signature: #6b8f1e;
  --fch-accent: #ffd23f;
  --fch-glauque: #1c3a2f;
  --fch-trait: #d8d2c2;
  --fch-ombre-douce: 0 10px 24px -12px hsl(85 40% 22% / .45);
  --fch-ombre-carte: 0 14px 30px -16px hsl(200 45% 18% / .40);
  --fch-ombre-accent: 0 12px 28px -14px hsl(46 100% 40% / .55);
  --fch-ombre-page: 0 18px 40px -28px hsl(28 60% 25% / .45);
  --fch-rayon: 16px;
  --fch-rayon-petit: 12px;
  --fch-rayon-grand: 20px;
  --fch-ratio-paysage: 4 / 3;
  --fch-ratio-portrait: 3 / 4;
  --fch-ratio-compact: 1 / 1;
  --fch-titre-police: 'FchTitre', 'Georgia', 'Palatino Linotype', serif;
  --fch-texte-police: 'FchTexte', -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --fch-mono-police: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --fch-mesure: 68ch;
  --fch-mesure-large: 84rem;
  --fch-marge-page: clamp(1rem, 1.5vw + .75rem, 2.5rem);
  --fch-gouttiere: clamp(1rem, .6vw + .85rem, 1.75rem);
  --fch-souffle: clamp(2rem, 2vw + 1.2rem, 3.5rem);
  --fch-trait-fin: 1px solid var(--fch-trait);
  color-scheme: light;
}

* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--fch-texte-police);
  font-size: clamp(1rem, .95rem + .25vw, 1.125rem);
  line-height: 1.65;
  color: var(--fch-encre);
  background: var(--fch-papier);
  overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--fch-bleu); }
a:hover { color: var(--fch-olive-fonce); }
h1, h2, h3 {
  font-family: var(--fch-titre-police);
  line-height: 1.12;
  letter-spacing: -.035em;
  margin: 0 0 .5rem;
  text-wrap: balance;
}
h1 { font-size: clamp(1.8rem, 1rem + 3.4vw, 3.1rem); }
h2 { font-size: clamp(1.35rem, 1rem + 1.4vw, 2rem); }
h3 { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); }
p { margin: 0 0 .9rem; }
:focus-visible {
  outline: 3px solid var(--fch-signature);
  outline-offset: 3px;
  border-radius: 4px;
}
.fch-acces-direct {
  position: absolute; left: -999rem; top: 0; z-index: 50;
  background: var(--fch-encre); color: var(--fch-papier-clair);
  padding: .6rem 1rem; border-radius: 0 0 var(--fch-rayon-petit) 0;
}
.fch-acces-direct:focus { left: 0; }

/* ---- enveloppe ---------------------------------------------------------- */
.fch-travee {
  width: min(100% - (var(--fch-marge-page) * 2), var(--fch-mesure-large));
  margin-inline: auto;
  min-width: 0;
}
.fch-fronton {
  background: var(--fch-signature);
  color: var(--fch-papier-clair);
  box-shadow: var(--fch-ombre-carte);
  border-bottom: 4px solid var(--fch-encre);
}
.fch-fronton__interieur {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(1rem, 2vw, 2.5rem);
  justify-content: space-between;
  padding-block: clamp(.9rem, 1.2vw, 1.4rem);
}
.fch-enseigne {
  display: inline-flex; align-items: center; gap: .65rem;
  color: var(--fch-papier-clair);
  text-decoration: none;
  min-width: 0;
  text-shadow: 0 1px 0 hsl(85 40% 12% / .45);
}
.fch-enseigne:hover { color: var(--fch-papier-clair); }
.fch-enseigne__texte { display: flex; flex-direction: column; min-width: 0; }
.fch-enseigne__nom {
  font-family: var(--fch-titre-police);
  font-size: clamp(1.05rem, .9rem + .5vw, 1.3rem);
  letter-spacing: -.03em;
}
.fch-enseigne__devise {
  font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  font-family: var(--fch-mono-police);
  opacity: .92;
}
.fch-sigil {
  display: inline-block; flex: 0 0 auto;
  width: 1.05rem; height: 1.05rem;
  border: .18rem solid currentColor;
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--fch-accent);
  background: transparent;
}
.fch-sigil--grand { width: 1.6rem; height: 1.6rem; border-width: .28rem; }
.fch-sigil--pied { color: var(--fch-accent); }
.fch-parcours ul {
  display: flex; flex-wrap: wrap; gap: .35rem .25rem;
  list-style: none; margin: 0; padding: 0;
}
.fch-parcours__lien {
  display: inline-block;
  padding: .4rem .75rem;
  border-radius: var(--fch-rayon-petit);
  color: var(--fch-papier-clair);
  text-decoration: none;
  font-size: .92rem;
  background: hsl(85 60% 20% / .25);
}
.fch-parcours__lien:hover,
.fch-parcours__lien[aria-current="page"] {
  background: var(--fch-accent);
  color: var(--fch-encre);
}

/* ---- accueil : accroche ------------------------------------------------- */
.fch-accroche {
  width: min(100% - (var(--fch-marge-page) * 2), var(--fch-mesure-large));
  margin: clamp(1.5rem, 3vw, 3rem) auto 0;
  display: grid; gap: var(--fch-gouttiere);
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.fch-accroche__titre { text-shadow: 0 1px 0 hsl(200 40% 95% / .9); }
.fch-accroche__intro {
  max-width: var(--fch-mesure);
  color: var(--fch-encre-pale);
  font-size: 1.05rem;
}
.fch-accroche__piece {
  border-radius: var(--fch-rayon-grand);
  overflow: hidden;
  box-shadow: var(--fch-ombre-page);
  background: var(--fch-papier-clair);
  min-width: 0;
}
.fch-accroche__lien { display: block; color: inherit; text-decoration: none; }
.fch-accroche__vue {
  margin: 0; position: relative;
  aspect-ratio: var(--fch-ratio-paysage);
  width: 100%; max-width: 100%;
  background: var(--fch-cendre);
}
.fch-accroche__vue img { width: 100%; height: 100%; object-fit: cover; }
.fch-accroche__cartel {
  padding: clamp(1rem, 2vw, 1.75rem);
  background: linear-gradient(180deg, var(--fch-papier-clair), var(--fch-cendre));
  border-top: 3px solid var(--fch-accent);
}
.fch-accroche__cote,
.fch-fiche__cote,
.fch-ligne__cote,
.fch-entete-piece__cote {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  margin: 0 0 .5rem;
  font-size: .82rem;
}
.fch-cote {
  font-family: var(--fch-mono-police);
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--fch-encre);
  color: var(--fch-papier-clair);
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .74rem;
}
.fch-mention {
  font-family: var(--fch-mono-police);
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--fch-encre-pale);
  font-size: .74rem;
}
.fch-tampon {
  display: inline-block;
  font-family: var(--fch-mono-police);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .18rem .55rem;
  border: 2px solid currentColor;
  border-radius: 6px;
  color: var(--fch-olive-fonce);
  background: hsl(80 60% 88% / .6);
  box-shadow: 2px 2px 0 hsl(85 40% 25% / .35);
}
.fch-accroche__h2 {
  font-size: clamp(1.6rem, 1rem + 2.6vw, 2.6rem);
  text-shadow: 0 2px 0 hsl(200 30% 96% / .8);
}
.fch-accroche__chapeau { max-width: var(--fch-mesure); color: var(--fch-encre-pale); }
.fch-accroche__date { margin: 0; font-family: var(--fch-mono-police); font-size: .82rem; color: var(--fch-encre-pale); }

/* ---- rayons ------------------------------------------------------------- */
.fch-rayon { margin-block: var(--fch-souffle); }
.fch-rayon__tete {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: .75rem;
  border-bottom: var(--fch-trait-fin);
  padding-bottom: .6rem;
  margin-bottom: var(--fch-gouttiere);
}
.fch-rayon__decompte {
  font-family: var(--fch-mono-police);
  font-size: .8rem; color: var(--fch-encre-pale);
  background: var(--fch-cendre);
  padding: .2rem .6rem; border-radius: 999px;
}
.fch-rayon__phrase { margin: 0; color: var(--fch-encre-pale); max-width: var(--fch-mesure); }

/* ---- mosaïque de fiches ------------------------------------------------- */
.fch-mosaique {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--fch-gouttiere);
}
.fch-mosaique--voisines { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.fch-fiche {
  position: relative;
  border-radius: var(--fch-rayon);
  background: var(--fch-papier-clair);
  box-shadow: var(--fch-ombre-douce);
  overflow: hidden;
  transform: rotate(-.3deg);
  transition: transform .22s ease, box-shadow .22s ease;
  min-width: 0;
}
.fch-fiche:hover, .fch-fiche:focus-within {
  transform: rotate(0);
  box-shadow: var(--fch-ombre-carte);
}
.fch-fiche__lien { display: block; color: inherit; text-decoration: none; }
.fch-fiche__vue {
  margin: 0; position: relative;
  aspect-ratio: var(--fch-ratio-portrait);
  width: 100%; max-width: 100%;
  background: var(--fch-cendre);
}
.fch-fiche__vue--paysage { aspect-ratio: var(--fch-ratio-paysage); }
.fch-fiche__vue img { width: 100%; height: 100%; object-fit: cover; }
.fch-fiche__cartel {
  padding: .9rem 1rem 1.1rem;
  border-top: 3px solid var(--fch-accent);
  background: linear-gradient(180deg, var(--fch-papier-clair), var(--fch-cendre));
}
.fch-fiche__titre { margin-bottom: .35rem; }
.fch-fiche__abrege {
  margin: 0 0 .5rem; color: var(--fch-encre-pale); font-size: .94rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.fch-fiche__date { margin: 0; font-family: var(--fch-mono-police); font-size: .78rem; color: var(--fch-encre-pale); }
.fch-fiche--paysage .fch-fiche__vue { aspect-ratio: var(--fch-ratio-paysage); }

/* ---- linéaire compact --------------------------------------------------- */
.fch-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: .75rem 1.25rem;
  margin-top: var(--fch-gouttiere);
}
.fch-ligne {
  border-radius: var(--fch-rayon-petit);
  background: var(--fch-papier-clair);
  box-shadow: 0 4px 14px -8px hsl(85 35% 22% / .40);
  overflow: hidden;
  min-width: 0;
}
.fch-ligne__lien {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: .75rem; align-items: center;
  padding: .5rem .75rem .5rem .5rem;
  color: inherit; text-decoration: none;
}
.fch-ligne__vue {
  margin: 0; aspect-ratio: var(--fch-ratio-compact);
  width: 100%; max-width: 100%;
  border-radius: var(--fch-rayon-petit);
  overflow: hidden; background: var(--fch-cendre);
}
.fch-ligne__vue img { width: 100%; height: 100%; object-fit: cover; }
.fch-ligne__texte { min-width: 0; }
.fch-ligne__titre { font-size: 1rem; margin-bottom: .2rem; }
.fch-ligne__date { margin: 0; font-family: var(--fch-mono-police); font-size: .74rem; color: var(--fch-encre-pale); }
.fch-ligne__cote { margin-bottom: .25rem; }

/* ---- établi (notes de marge) ------------------------------------------- */
.fch-etabli {
  width: min(100% - (var(--fch-marge-page) * 2), 62rem);
  margin: var(--fch-souffle) auto;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border-radius: var(--fch-rayon-grand);
  background: hsl(85 42% 22% / .08);
  box-shadow: var(--fch-ombre-page);
}
.fch-etabli__tete { max-width: var(--fch-mesure); margin-bottom: var(--fch-gouttiere); }
.fch-etabli__phrase { color: var(--fch-encre-pale); margin: 0; }
.fch-etabli__notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--fch-gouttiere);
}
.fch-note {
  position: relative;
  padding: .25rem 0 .25rem 1.5rem;
  margin: 0;
}
.fch-note::before {
  content: ""; position: absolute; left: 0; top: .1rem; bottom: .1rem;
  width: 2px; background: var(--fch-signature); border-radius: 2px;
}
.fch-note__pastille {
  position: absolute; left: -.4rem; top: .45rem;
  width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--fch-accent); box-shadow: 0 0 0 2px var(--fch-papier-clair);
  margin: 0;
}
.fch-note__titre { font-size: 1.02rem; margin-bottom: .25rem; }
.fch-note__texte { margin: 0; color: var(--fch-encre-pale); font-size: .95rem; }

/* ---- rubriques ---------------------------------------------------------- */
.fch-bande--rubriques {
  width: 100%; padding-block: var(--fch-souffle);
  background: var(--fch-glauque);
  color: var(--fch-papier-clair);
  border-block: 4px solid var(--fch-accent);
}
.fch-bande--rubriques > .fch-rayon__tete,
.fch-bande--rubriques > .fch-rubriques {
  width: min(100% - (var(--fch-marge-page) * 2), var(--fch-mesure-large));
  margin-inline: auto;
}
.fch-bande--rubriques .fch-rayon__tete { border-bottom-color: hsl(80 50% 60% / .35); }
.fch-rubriques {
  display: grid; gap: var(--fch-gouttiere);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  margin-top: var(--fch-gouttiere);
}
.fch-rubrique-fiche {
  background: hsl(150 20% 96% / .08);
  border: 1px solid hsl(80 50% 70% / .35);
  border-radius: var(--fch-rayon);
  padding: 1rem 1rem 1.2rem;
  min-width: 0;
  box-shadow: 0 10px 26px -18px hsl(0 0% 0% / .7);
}
.fch-rubrique-fiche__titre { margin-bottom: .35rem; }
.fch-rubrique-fiche__lien {
  color: var(--fch-accent); text-decoration: none;
  text-shadow: 0 1px 0 hsl(150 40% 10% / .5);
}
.fch-rubrique-fiche__lien:hover { color: var(--fch-papier-clair); }
.fch-rubrique-fiche__intro { color: hsl(80 30% 90%); font-size: .92rem; }
.fch-rubrique-fiche__liste {
  list-style: none; margin: .75rem 0 0; padding: 0;
  display: grid; gap: .5rem;
}
.fch-rubrique-fiche__liste .fch-ligne { background: hsl(150 20% 96% / .96); }
.fch-rubrique-fiche__liste .fch-ligne__titre { font-size: .95rem; }

/* ---- rubrique / liste --------------------------------------------------- */
.fch-preambule { margin-block: clamp(1.25rem, 2.5vw, 2.5rem) var(--fch-souffle); max-width: var(--fch-mesure); }
.fch-preambule__cote { margin-bottom: .5rem; }
.fch-preambule__intro { color: var(--fch-encre-pale); font-size: 1.05rem; }
.fch-onglets {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: var(--fch-souffle);
}
.fch-onglet {
  padding: .45rem .9rem;
  border-radius: 999px;
  background: var(--fch-cendre);
  color: var(--fch-encre);
  text-decoration: none;
  font-size: .9rem;
  box-shadow: 0 3px 10px -6px hsl(85 35% 25% / .55);
}
.fch-onglet:hover { background: var(--fch-vert-tendre); color: var(--fch-encre); }
.fch-onglet--courant { background: var(--fch-accent); color: var(--fch-encre); }

/* ---- article ------------------------------------------------------------ */
.fch-piece { margin-bottom: var(--fch-souffle); }
.fch-entete-piece { max-width: var(--fch-mesure); margin-block: clamp(1rem, 2vw, 2rem) var(--fch-gouttiere); }
.fch-chapeau {
  font-size: 1.15rem; color: var(--fch-encre-pale);
  font-family: var(--fch-titre-police); letter-spacing: -.01em;
  max-width: var(--fch-mesure);
}
.fch-datation { font-family: var(--fch-mono-police); font-size: .82rem; color: var(--fch-encre-pale); }
.fch-planche {
  margin: 0 auto var(--fch-souffle);
  width: min(100% - (var(--fch-marge-page) * 2), var(--fch-mesure-large));
  border-radius: var(--fch-rayon-grand);
  overflow: hidden;
  box-shadow: var(--fch-ombre-page);
  background: var(--fch-cendre);
}
.fch-planche img { width: 100%; height: auto; aspect-ratio: var(--fch-ratio-paysage); object-fit: cover; }
.fch-planche figcaption {
  padding: .65rem 1rem; font-size: .82rem;
  font-family: var(--fch-mono-police); color: var(--fch-encre-pale);
  background: var(--fch-cendre);
}
.fch-duo {
  display: grid; gap: var(--fch-souffle);
  grid-template-columns: minmax(0, 1fr);
}
.fch-corps { max-width: var(--fch-mesure); min-width: 0; }
.fch-corps > * + * { margin-top: .9rem; }
.fch-corps h2 { margin-top: 2rem; }
.fch-corps h3 { margin-top: 1.5rem; }
.fch-corps p { text-shadow: none; }
.fch-corps figure { margin: 1.5rem 0; }
.fch-corps figure img { border-radius: var(--fch-rayon); box-shadow: var(--fch-ombre-carte); }
.fch-corps figcaption { font-size: .85rem; color: var(--fch-encre-pale); margin-top: .4rem; }
.fch-corps table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.fch-corps th, .fch-corps td { padding: .5rem .6rem; border-bottom: var(--fch-trait-fin); text-align: left; }
.fch-corps dl { display: grid; gap: .5rem; }
.fch-corps dt { font-weight: 700; }
.fch-corps dd { margin: 0 0 .5rem 1rem; color: var(--fch-encre-pale); }
.fch-defil { overflow-x: auto; max-width: 100%; }
.fch-releve {
  min-width: 0; align-self: start;
  padding: 1rem 1.1rem;
  border-radius: var(--fch-rayon);
  background: var(--fch-cendre);
  box-shadow: 0 8px 22px -16px hsl(85 35% 22% / .65);
}
.fch-releve__titre { font-size: 1rem; margin-bottom: .4rem; }
.fch-releve__sommaire { padding-left: 1.1rem; margin: 0 0 1rem; font-size: .92rem; }
.fch-releve__sources { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.fch-releve__sources li { margin-bottom: .3rem; }
.fch-releve__sources a { color: var(--fch-bleu); }

/* ---- ailleurs ----------------------------------------------------------- */
.fch-ailleurs {
  margin-top: var(--fch-souffle);
  padding-top: var(--fch-gouttiere);
  border-top: var(--fch-trait-fin);
}
.fch-ailleurs__liste {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
.fch-ailleurs__item p { margin: 0; }
.fch-ailleurs__item .fch-note { font-size: .95rem; }

/* ---- pied --------------------------------------------------------------- */
.fch-pied {
  margin-top: var(--fch-souffle);
  background: var(--fch-glauque);
  color: var(--fch-papier-clair);
  border-top: 4px solid var(--fch-accent);
  box-shadow: 0 -10px 30px -22px hsl(0 0% 0% / .8);
}
.fch-pied__colonnes {
  display: grid; gap: var(--fch-gouttiere);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  padding-block: var(--fch-souffle) var(--fch-gouttiere);
}
.fch-pied__colonne { min-width: 0; }
.fch-pied h2 { color: var(--fch-accent); font-size: 1.05rem; text-shadow: 0 1px 0 hsl(150 40% 10% / .55); }
.fch-pied p { color: hsl(80 25% 90%); font-size: .92rem; }
.fch-pied__note { font-style: italic; color: hsl(80 25% 92%); }
.fch-pied ul { list-style: none; padding: 0; margin: 0; }
.fch-pied li { margin-bottom: .35rem; }
.fch-pied a { color: var(--fch-papier-clair); text-decoration: none; }
.fch-pied a:hover { color: var(--fch-accent); text-decoration: underline; }
.fch-pied__ligne {
  padding-block: .85rem;
  border-top: 1px solid hsl(80 30% 60% / .3);
  font-family: var(--fch-mono-police);
  font-size: .78rem; color: hsl(80 25% 88%);
}

/* ---- remontée ----------------------------------------------------------- */
.fch-remontee ol {
  list-style: none; padding: 0; margin: clamp(.75rem, 1.5vw, 1.25rem) 0 0;
  display: flex; flex-wrap: wrap; gap: .35rem;
  font-size: .85rem;
}
.fch-remontee li + li::before { content: "/"; margin-right: .35rem; color: var(--fch-encre-pale); }
.fch-remontee a { color: var(--fch-bleu); }

/* ---- responsive --------------------------------------------------------- */
@media (min-width: 52rem) {
  .fch-accroche {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
    align-items: start;
  }
  .fch-accroche__piece { grid-column: 1 / -1; }
  .fch-duo { grid-template-columns: minmax(0, 1fr) 18rem; }
}
@media (max-width: 26rem) {
  .fch-ligne__lien { grid-template-columns: 76px minmax(0, 1fr); }
  .fch-fronton__interieur { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .fch-fiche { transform: none; transition: none; }
}
