@font-face {
  font-family: 'Eurostile Round';
  src: url('/fonts/EurostileRound-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Eurostile Round';
  src: url('/fonts/EurostileRound-Italic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Eurostile Round';
  src: url('/fonts/EurostileRound-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Eurostile Round';
  src: url('/fonts/EurostileRound-MediumItalic.woff') format('woff');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Eurostile Round';
  src: url('/fonts/EurostileRound-Black.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

:root {
  --browser-height: 32vh;
  --rose-hover: #fbf3f7;   /* survol : rose à peine visible */
  --rose-selected: #f4e5ee; /* ligne sélectionnée : rose léger */
  --muted: #9a9a9a;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Eurostile Round', Helvetica, Arial, sans-serif;
  font-weight: 400;
  background: #ffffff;
  color: #111111;
  height: 100vh;
  overflow: hidden;          /* pas de scroll de page : tout tient dans la fenêtre */
  display: flex;
  flex-direction: column;
}

/* Top area (title + viewer) : fills the space above the fixed-height browser. */
.page {
  flex: 1;
  min-height: 0;             /* autorise le viewer à rétrécir sans déborder */
  display: flex;
  flex-direction: column;
  padding: 28px 24px 20px;
}

.title {
  flex: 0 0 auto;
  text-align: center;
  font-size: 18px;
  letter-spacing: -0.4px;
  font-weight: 900;
  margin-bottom: 24px;
  cursor: pointer;
  user-select: none;
}

/* ---------- About view (toggled by clicking the title) ---------- */
.about {
  display: none;
}

body.about-open .viewer,
body.about-open .browser {
  display: none;
}

body.about-open .about {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.about-inner {
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: #111111;
}

.about-name {
  font-weight: 500;
  font-size: 18px;
  margin: 0;
}

.about-tagline {
  margin: 2px 0 0;
  color: #555555;
}

.about-block {
  margin: 28px 0 0;
}

.about-block p {
  margin: 0;
}

.about-inner a {
  color: #111111;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-inner a:hover {
  color: #c07aa0;
}

/* ---------- Viewer / slideshow ---------- */
.viewer {
  position: relative;
  flex: 1;                   /* occupe tout l'espace entre le titre et le tableau */
  min-height: 0;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.stage {
  width: 700px;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.viewer-empty {
  color: #999999;
  font-size: 13px;
}

.stage img,
.stage video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.stage .audio-block,
.stage .text-block,
.stage .link-block {
  width: 100%;
  padding: 40px;
  text-align: center;
}

.stage .text-block {
  text-align: left;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.6;
  max-height: 100%;
  overflow-y: auto;
}

.stage .media-label {
  margin-bottom: 20px;
  font-size: 13px;
  color: #555555;
}

.stage audio {
  width: 100%;
  max-width: 480px;
}

/* ---- Plyr player sizing inside the viewer ---- */
.stage .plyr {
  width: 100%;
  max-width: 700px;
}
.stage .plyr--video {
  max-height: 100%;
}
.stage .plyr--video .plyr__video-wrapper {
  max-height: 100%;
}
.stage .plyr--video video {
  max-height: 100%;
  object-fit: contain;
}
.stage .audio-block .plyr--audio {
  max-width: 480px;
  margin: 0 auto;
}
/* neutral, on-brand accent for the player controls */
.stage .plyr {
  --plyr-color-main: #c07aa0;
}

.stage .link-block a {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 0;
  color: #111111;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 15px;
}

.stage .link-block a:hover {
  color: #c07aa0;
}

.stage .link-url {
  margin-top: 12px;
  font-size: 12px;
  color: #999999;
  word-break: break-all;
}

/* Slideshow controls — flanking the content, not over it */
.nav-arrow {
  flex: 0 0 auto;
  width: 32px;
  height: 40px;
  border: none;
  background: none;
  color: #bbbbbb;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-arrow:hover {
  color: #111111;
}

/* [hidden] must win over display:flex above (single slide = no chevrons) */
.nav-arrow[hidden] {
  display: none;
}

/* ---------- Fixed-height browser at the bottom (flex child, no page scroll) ---------- */
.browser {
  flex: 0 0 var(--browser-height);
  height: var(--browser-height);
  background: #ffffff;
  display: flex;
  justify-content: center;
}

.browser-inner {
  width: 900px;
  max-width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 0 24px 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  position: sticky;
  top: 0;
  text-align: left;
  padding: 8px 12px 6px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  border-top: 1px dotted #999999;
  border-bottom: 1px dotted #999999;
}

thead th:nth-child(4) {
  text-align: right;
}

.arrow {
  display: inline-block;
  width: 8px;
}

tbody td {
  padding: 4px 12px;
  color: #222222;
}

tbody td:last-child {
  text-align: right;
  color: var(--muted);
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: var(--rose-hover);
}

tbody tr.selected {
  background: var(--rose-selected);
}

tbody tr.selected td,
tbody tr.selected td:last-child {
  color: #b06e93;
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  :root {
    --browser-height: 40vh;   /* liste plus généreuse sur écran haut */
  }

  .page {
    padding: 18px 14px 10px;
  }

  .title {
    font-size: 15px;
    margin-bottom: 14px;
  }

  /* viewer : laisser plus de place au média, chevrons discrets */
  .viewer {
    gap: 2px;
  }
  .nav-arrow {
    width: 22px;
    font-size: 26px;
  }
  .stage .text-block {
    font-size: 12px;
    line-height: 1.5;
    padding: 8px 6px;
  }
  .stage .audio-block,
  .stage .link-block {
    padding: 20px 8px;
  }
  .stage .media-label {
    font-size: 12px;
  }

  /* tableau : plus compact pour tenir 4 colonnes sur ~360px */
  .browser-inner {
    padding: 0 12px 10px;
  }
  table {
    font-size: 11px;
  }
  thead th {
    font-size: 10px;
    letter-spacing: 0.3px;
    padding: 6px 6px 5px;
  }
  tbody td {
    padding: 6px 6px;
  }
  /* la date ne se coupe pas et reste sur une ligne */
  thead th:nth-child(4),
  tbody td:last-child {
    white-space: nowrap;
  }

  .about-inner {
    font-size: 13px;
    padding: 0 16px;
  }
}
