/* ==========================================================
   TRACTS — Version premium moderne 2026
   ========================================================== */

/* INTRO */
.section-intro {
  margin-top: 12px;
  font-size: 17px;
  color: var(--ink-dim);
  max-width: 600px;
}

/* GRID */
.tracts-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}

/* CARD */
.tract-card {
  background: linear-gradient(145deg, #ffffff, #f7f7f7);
  border-radius: 22px;
  padding: 22px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 12px 40px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all .3s ease;
}
.tract-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0,0,0,.15);
}

/* THUMBNAIL */
.tract-thumb {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1 / 1.414; /* A-series ratio */
  max-height: 380px;
  margin: 0 auto;
  width: 100%;
  background: #fff;
  position: relative;
}

.tract-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.tract-card:hover .tract-preview {
  transform: scale(1.05);
}

/* TITLE & META */
.tract-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--violet);
  margin: 4px 0 0 0;
}
.tract-meta {
  margin: 0;
  font-size: 14px;
  color: var(--ink-dim);
}

/* ACTIONS */
.tract-actions {
  margin-top: auto;
  display: flex;
  gap: 16px;
}

/* BOUTON PRINCIPAL */
.btn-view {
  flex: 1;
  background: linear-gradient(90deg, var(--rose), var(--violet));
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.btn-view:hover,
.btn-view:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
  outline: none;
}

/* BOUTON SECONDAIRE */
.btn-download {
  flex: 1;
  background: #f1f2f4;
  padding: 14px;
  border-radius: 14px;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
  transition: all .25s ease;
}
.btn-download:hover,
.btn-download:focus-visible {
  background: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  outline: none;
}

/* MODALE */
.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.pdf-modal.show {
  display: block;
}
.pdf-modal[hidden] {
  display: none !important;
}
.pdf-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(8px);
}
.pdf-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1000px, 92%);
  height: min(90%, 800px);
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,.35);
}
.pdf-close {
  border: none;
  background: transparent;
  font-size: 30px;
  cursor: pointer;
  padding: 12px 20px;
  align-self: flex-end;
  color: var(--violet);
  transition: transform .2s ease;
}
.pdf-close:hover,
.pdf-close:focus-visible {
  transform: scale(1.12);
  outline: none;
}
#pdfViewer {
  flex: 1;
  width: 100%;
  border: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .tracts-grid {
    gap: 28px;
  }
  .section-intro {
    font-size: 16px;
  }
}