/* fiche-viewer.css — lecteur de fiches PDF (hodari/js/pdf-viewer.js) et liens « fiche technique » du parolier */
.yk-pdf { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; background: var(--yk-dk-bg); color: var(--white); }
.yk-pdf[hidden] { display: none; }
html.yk-pdf-lock, html.yk-pdf-lock body { overflow: hidden; }
.yk-pdf-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 0.5rem; padding: calc(0.45rem + env(safe-area-inset-top, 0px)) calc(0.6rem + env(safe-area-inset-right, 0px)) 0.45rem calc(0.6rem + env(safe-area-inset-left, 0px)); background: var(--yk-brand); box-shadow: 0 2px 10px var(--yk-k30); }
.yk-pdf-title { flex: 1 1 auto; min-width: 0; font-family: var(--font-serif, serif); font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yk-pdf-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 0.15rem; }
.yk-pdf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; min-width: 2.4rem; height: 2.4rem; padding: 0 0.5rem; border: none; border-radius: 999px; background: transparent; color: var(--white); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.yk-pdf-btn:hover, .yk-pdf-btn:focus-visible { background: var(--yk-w22); outline: none; }
.yk-pdf-btn:disabled { opacity: 0.35; cursor: default; background: transparent; }
.yk-pdf-btn[hidden] { display: none; }
.yk-pdf-btn svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.yk-pdf-body { flex: 1 1 auto; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0.6rem 0 1.2rem; }
.yk-pdf-pages { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; width: max-content; min-width: 100%; }
.yk-pdf-page { position: relative; flex: 0 0 auto; margin: 0 auto; background: var(--white); box-shadow: 0 2px 10px var(--yk-k40); }
.yk-pdf-page canvas { display: block; }
.yk-pdf-msg { text-align: center; padding: 2rem 1.2rem; margin: 0; font-size: 0.95rem; line-height: 1.5; }
.yk-pdf-msg[hidden] { display: none; }
.yk-pdf-msg a { color: var(--yk-yellow); }
.yk-pdf-spin { display: inline-block; width: 0.9em; height: 0.9em; border: 2px solid var(--yk-w30); border-top-color: var(--white); border-radius: 50%; vertical-align: -0.1em; animation: yk-pdf-rot 0.8s linear infinite; }
@keyframes yk-pdf-rot { to { transform: rotate(360deg); } }
@media (max-width: 520px) { .yk-pdf-back span { display: none; } .yk-pdf-btn { min-width: 2rem; height: 2.2rem; padding: 0 0.3rem; } .yk-pdf-bar { gap: 0.25rem; } .yk-pdf-title { font-size: 0.92rem; } }

/* Thème sombre : en-tête brun comme la barre du haut sombre de Hodari (#491514) */
body.yk-dark .yk-pdf-bar { background: var(--yk-brown); }
body.yk-dark .yk-pdf { background: var(--yk-pdf-dk); }
/* Impression : seul le bloc #yk-pdf-print (pages du PDF en images) est imprimé */
#yk-pdf-print { display: none; }
@media print {
  @page { margin: 8mm; }
  html.yk-pdf-printing body > *:not(#yk-pdf-print) { display: none !important; }
  html.yk-pdf-printing, html.yk-pdf-printing body { background: #fff !important; overflow: visible !important; height: auto !important; }
  html.yk-pdf-printing #yk-pdf-print { display: block; }
  #yk-pdf-print img { display: block; width: auto; height: auto; max-width: 100%; max-height: 245mm; margin: 0 auto;   /* 245 mm : tient sur A4 comme sur Letter (marges de 8 mm) */ break-after: page; page-break-after: always; }
  #yk-pdf-print img:last-child { break-after: auto; page-break-after: auto; }
}

/* Parolier : ligne « Fiche technique » de la fiche d'un chant */
.yk-fiche-row { align-items: center !important; }
.yk-fiche-row .detail-row-val { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.yk-fiche-btn { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.12rem 0.65rem 0.12rem 0.45rem; line-height: 1.4; border-radius: 999px; border: 1px solid var(--yk-gold); background: var(--yk-chip); color: var(--yk-brown); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; text-align: left; }
.yk-fiche-btn svg { width: 0.9rem; height: 0.9rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.yk-fiche-btn:hover, .yk-fiche-btn:focus-visible { background: var(--yk-chip-hover); border-color: var(--yk-hl); outline: none; }
body.yk-dark .yk-fiche-btn { background: var(--yk-chip-dk); border-color: var(--yk-gold); color: var(--yk-yellow); }
