/* ── EBOOK READER COMPONENT — Dîlan Kılıç © 2026 ── */
/* Conçu pour s'intégrer à style.css existant */

/* ── BOUTON D'OUVERTURE ── */
.pdf-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--black);
  background: none;
  border: 0.5px solid var(--black);
  padding: 10px 18px;
  border-radius: 1px;
  cursor: pointer;
  transition: background var(--t), color var(--t);
  margin-bottom: 2.8rem;
}
.pdf-open-btn:hover {
  background: var(--black);
  color: var(--white);
}
.pdf-open-btn svg { flex-shrink: 0; }

/* ── LIGHTBOX PDF ── */
.pdf-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--white);
  flex-direction: column;
}
.pdf-lightbox.open { display: flex; }

.pdf-lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}
.pdf-lb-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-text);
}
.pdf-lb-close {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--gray-text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  transition: color var(--t);
}
.pdf-lb-close:hover { color: var(--black); }

.pdf-lb-body {
  flex: 1;
  overflow: hidden;
}
.pdf-lb-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.pdf-lb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2rem;
  border-top: 0.5px solid var(--border);
  flex-shrink: 0;
  background: var(--gray-light);
}
.pdf-lb-gate {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 300;
  color: var(--gray-text);
  letter-spacing: 0.06em;
}
.pdf-lb-cta {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--black);
  border-bottom: 0.5px solid var(--black);
  padding-bottom: 1px;
  transition: opacity var(--t);
}
.pdf-lb-cta:hover { opacity: 0.5; }

/* ── ISSUU-STYLE READER ── */
.issuu-reader {
  border: 0.5px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 3rem;
  max-width: 680px;
  background: var(--white);
}

.issuu-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.1rem;
  border-bottom: 0.5px solid var(--border);
  background: var(--gray-light);
}
.issuu-doc-title {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-text);
}
.issuu-page-info {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 300;
  color: var(--gray-mid);
  letter-spacing: 0.06em;
}

.issuu-stage {
  position: relative;
  background: var(--gray-light);
  cursor: pointer;
  aspect-ratio: 3/4;
  overflow: hidden;
}

.issuu-page-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  -webkit-user-drag: none;
}
.issuu-page-img.active { opacity: 1; }

/* Gate — apparaît sur la dernière page */
.issuu-gate {
  position: absolute;
  inset: 0;
  background: rgba(250,249,246,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.issuu-gate.visible {
  opacity: 1;
  pointer-events: all;
}
.issuu-gate-msg {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--gray-dark);
  text-align: center;
  padding: 0 2rem;
}
.issuu-gate-cta {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--black);
  border: 0.5px solid var(--black);
  padding: 9px 20px;
  border-radius: 1px;
  transition: background var(--t), color var(--t);
}
.issuu-gate-cta:hover {
  background: var(--black);
  color: var(--white);
}

/* Barre de navigation du bas */
.issuu-bottombar {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  border-top: 0.5px solid var(--border);
  gap: 0.8rem;
  background: var(--white);
}

.issuu-nav-btn {
  font-size: 14px;
  color: var(--gray-dark);
  background: none;
  border: 0.5px solid var(--border);
  width: 28px;
  height: 28px;
  border-radius: 1px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t), color var(--t);
  line-height: 1;
}
.issuu-nav-btn:hover:not(:disabled) {
  border-color: var(--black);
  color: var(--black);
}
.issuu-nav-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.issuu-thumbnails {
  display: flex;
  gap: 5px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.issuu-thumbnails::-webkit-scrollbar { display: none; }

.issuu-thumb-btn {
  flex-shrink: 0;
  background: none;
  border: 0.5px solid transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 1px;
  overflow: hidden;
  transition: border-color var(--t);
}
.issuu-thumb-btn:hover { border-color: var(--gray-mid); }
.issuu-thumb-btn:has(.issuu-thumb.active) { border-color: var(--black); }

.issuu-thumb {
  width: 32px;
  height: 42px;
  object-fit: cover;
  display: block;
  opacity: 0.5;
  transition: opacity var(--t);
  pointer-events: none;
  -webkit-user-drag: none;
}
.issuu-thumb.active { opacity: 1; }

/* ── BLOC MÉTA THÈSE ── */
.thesis-meta-block {
  border: 0.5px solid var(--border);
  border-radius: 2px;
  padding: 0 0;
  margin-bottom: 3rem;
  max-width: 480px;
}
.thesis-meta-block .cv-row {
  padding: 0.9rem 1.2rem;
  grid-template-columns: 100px 1fr;
}
.thesis-meta-block .cv-row:first-child { border-top: none; }
.thesis-meta-block .cv-row:last-child { border-bottom: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .pdf-lb-bar { padding: 0.9rem 1.2rem; }
  .pdf-lb-footer { padding: 0.8rem 1.2rem; flex-direction: column; align-items: flex-start; gap: 8px; }
  .issuu-reader { max-width: 100%; }
  .issuu-thumb { width: 26px; height: 34px; }
  .thesis-meta-block { max-width: 100%; }
}
