/* MSK Morand : fiches high yield (bibliothèque et fiche). Chargé après crds.css et locomoteur.css.
   Planche d'atlas : papier ivoire, double filet, intertitres en petites capitales rouges ; l'accent reste sur le texte. */
:root { --hy-papier: #f7f1e4; --hy-case: #efe6d3; --hy-rouge: #9b3a2a; --hy-encre: #2a2620; --hy-filet: #c9b998; }
@media (prefers-color-scheme: dark) { :root { --hy-papier: #1d1913; --hy-case: #26211a; --hy-rouge: #e3947c; --hy-encre: #eee4d2; --hy-filet: #54493a; } }

.hy-page { width: min(900px, 100% - 32px); margin: 0 auto; padding: 18px 0 40px; }
.hy-fil { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 4px 0 18px; font: 500 0.8rem/1.4 var(--sans); color: var(--discret); }
.hy-fil a { color: var(--or-texte); text-decoration: none; }
.hy-fil a:hover { text-decoration: underline; }

/* Fiche */
.hy-fiche { padding: clamp(14px, 3.5vw, 30px); border: 3px double var(--hy-encre); background: var(--hy-papier); color: var(--hy-encre); }
.hy-tete { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding-bottom: 6px; border-bottom: 2px solid var(--hy-encre); }
.hy-tete p { margin: 0; font: 600 0.74rem/1.4 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
.hy-no { color: var(--hy-rouge); }
.hy-tags { color: var(--hy-encre); opacity: 0.75; font-weight: 500; }
.hy-titre { margin: 14px 0 16px; text-align: center; font: 600 clamp(1.35rem, 4.2vw, 2rem)/1.15 var(--serif); letter-spacing: 0.05em; text-transform: uppercase; text-wrap: balance; }
.hy-planche { margin: 0 auto 18px; width: min(240px, 62%); }
.hy-planche img { display: block; width: 100%; height: auto; padding: 6px; border: 1px solid var(--hy-filet); background: #fbf6ea; }
.hy-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.hy-case { padding: 8px 12px 11px; border-top: 2px solid var(--hy-rouge); border-bottom: 1px solid var(--hy-filet); background: var(--hy-case); }
.hy-case h2 { margin: 0 0 4px; font: 700 0.78rem/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--hy-rouge); }
.hy-case p { margin: 0; font: 400 1.02rem/1.45 var(--serif); }
.hy-appel { margin-left: 2px; font: 700 0.68em/1 var(--sans); }
.hy-appel a { color: var(--hy-rouge); text-decoration: none; }
.hy-appel a:hover { text-decoration: underline; }
.hy-signature { margin: 14px 0 4px; text-align: right; }
.hy-signature img { width: 150px; height: auto; }
.hy-refs { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--hy-encre); }
.hy-refs h2 { margin: 0 0 6px; font: 700 0.78rem/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }
.hy-refs ol { margin: 0; padding-left: 2.4em; font: 400 0.84rem/1.45 var(--sans); }
.hy-refs li { margin: 2px 0; overflow-wrap: anywhere; }
.hy-refs li:target { background: var(--or-fond); }
.hy-refs a { color: var(--hy-rouge); }
.hy-actions { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: center; margin: 18px 0 0; }
.hy-suite { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; font: 400 0.9rem/1.35 var(--sans); }
.hy-suite a { padding: 10px 12px; border: 1px solid var(--filet); border-radius: 12px; color: var(--encre); text-decoration: none; background: var(--carte); }
.hy-suite a:hover { border-color: var(--or); }
.hy-suite a[rel="next"] { text-align: right; }
.hy-suite span { color: var(--hy-rouge); font-weight: 700; }

.hy-grille-renvoi { grid-template-columns: 1fr; }
.hy-renvoi p a { color: var(--hy-rouge); font-weight: 600; }

/* Bibliothèque */
.hy-serie { margin-top: 28px; }
.hy-intro .cr-devise { color: var(--hy-rouge); }
.hy-biblio { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.hy-carte { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; height: 100%; box-sizing: border-box; padding: 10px; border: 1px solid var(--hy-filet);
  background: var(--hy-papier); color: var(--hy-encre); text-decoration: none; }
.hy-carte:hover { border-color: var(--hy-rouge); }
.hy-carte img { width: 64px; height: 86px; object-fit: cover; border: 1px solid var(--hy-filet); }
.hy-carte-texte { display: grid; gap: 3px; min-width: 0; }
.hy-carte-no { display: flex; gap: 8px; align-items: center; font: 700 0.74rem/1.3 var(--sans); letter-spacing: 0.1em; color: var(--hy-rouge); }
.hy-carte-renvoi { padding: 1px 7px; border-radius: 999px; border: 1px solid var(--hy-filet); color: var(--hy-encre); font-weight: 600; letter-spacing: 0.02em; text-transform: none; }
.hy-carte-titre { font: 600 1.02rem/1.25 var(--serif); }
.hy-carte-tags { font: 500 0.72rem/1.35 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
.hy-note { margin-top: 18px; text-align: center; }
.hy-patients { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.hy-patients a { display: grid; gap: 4px; height: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--hy-filet); border-radius: 12px; background: var(--hy-papier); color: var(--hy-encre); text-decoration: none; }
.hy-patients a:hover { border-color: var(--hy-rouge); }

@media (max-width: 640px) { .hy-grille { grid-template-columns: 1fr; } .hy-suite { grid-template-columns: 1fr; } .hy-suite a[rel="next"] { text-align: left; } }
@media (prefers-color-scheme: dark) { .hy-signature img { filter: invert(1) brightness(0.92); } .hy-planche img, .hy-carte img { filter: brightness(0.9); } }
@media print { .cr-tete, .cr-pied, .hy-fil, .hy-actions, .hy-suite { display: none; } .hy-page { width: 100%; padding: 0; } }
