/* ============================================================
   Parc de Chalin — Carte PDF + visionneuse modale
   Partagé par la FAQ et le forum. Réutilise les variables de styles.css.
   ============================================================ */

/* ── Carte cliquable annonçant un PDF ────────────────────── */
.pdf-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .7rem 0;
  padding: .7rem .9rem;
  max-width: 32rem;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .1s, box-shadow .15s;
}
.pdf-card:hover, .pdf-card:focus-visible {
  border-color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.pdf-card-ico {
  flex: 0 0 auto;
  background: #c0392b;
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: .4rem .45rem;
  border-radius: 4px;
}
.pdf-card-txt {
  display: block;
  min-width: 0;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
.pdf-card-txt small {
  display: block;
  font-weight: 400;
  font-size: .8rem;
  color: var(--muted);
  margin-top: .15rem;
}

/* ── Visionneuse modale ──────────────────────────────────── */
.pdfview {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 2vh 2vw;
}
.pdfview.open { display: flex; }
.pdfview .pdfview-box {
  display: flex;
  flex-direction: column;
  width: min(1000px, 96vw);
  height: 96vh;
  background: var(--bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 10px 50px rgba(0,0,0,.6);
}
.pdfview .pdfview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .5rem .55rem .9rem;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.pdfview .pdfview-title {
  font-size: .95rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdfview .pdfview-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex: 0 0 auto;
}
.pdfview .pdfview-open {
  font-size: .85rem;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.pdfview .pdfview-open:hover { text-decoration: underline; }
.pdfview .pdfview-close {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.pdfview .pdfview-close:hover { border-color: var(--primary); color: var(--primary); }
.pdfview iframe {
  flex: 1 1 auto;
  width: 100%;
  border: none;
  background: #525659;   /* gris des visionneuses PDF natives */
}

/* Plein écran sous 600px : chaque pixel compte pour lire un PDF */
@media (max-width: 600px) {
  .pdfview { padding: 0; }
  .pdfview .pdfview-box { width: 100vw; height: 100vh; border-radius: 0; }
  .pdfview .pdfview-open { font-size: 0; }
  .pdfview .pdfview-open::after { content: '↗'; font-size: 1.15rem; }
}
