:root {
  --ink: #171717;
  --ink-soft: #4d4d4d;
  --muted: #747474;
  --line: #d9d9d9;
  --line-strong: #b7b7b7;
  --paper: #ffffff;
  --page-bg: #f2f0ed;
  --brand: #c41e1e;
  --brand-dark: #841313;
  --gold: #b98612;
  --panel: #f8f6f2;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--page-bg);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page-bg);
  font-family: "Barlow", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.print-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
}

.toolbar-link,
.toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}

.toolbar-link {
  color: var(--brand);
  border: 1px solid var(--line);
  background: #fff;
}

.toolbar-button {
  color: #fff;
  border: 1px solid var(--brand);
  background: var(--brand);
  cursor: pointer;
}

.toolbar-button:hover {
  background: var(--brand-dark);
}

.toolbar-status {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.print-page {
  width: min(100%, 210mm);
  min-height: 297mm;
  margin: 24px auto;
  padding: 18mm 16mm;
  background: var(--paper);
  box-shadow: 0 18px 45px rgba(24, 18, 12, 0.14);
}

.loading-state,
.print-error {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  color: var(--muted);
}

.loading-state h1,
.print-error h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 34px;
  line-height: 1;
  text-transform: uppercase;
}

.print-doc-header {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 18px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 3px solid var(--brand);
}

.print-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.print-kicker {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.print-doc-header h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 40px;
  line-height: 0.95;
  text-transform: uppercase;
}

.print-subtitle {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.print-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0 22px;
}

.print-meta-item {
  min-height: 66px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.print-meta-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.print-meta-value {
  color: var(--ink);
  font-weight: 600;
}

.print-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.summary-card {
  padding: 11px 12px;
  border-left: 4px solid var(--brand);
  background: #fbfaf8;
}

.summary-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 13px;
}

.summary-card span {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
}

.print-day {
  page-break-before: always;
  break-before: page;
}

.print-day.first-print-day {
  page-break-before: auto;
  break-before: auto;
}

.day-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  margin: 0 0 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-strong);
}

.day-head h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 25px;
  line-height: 1;
  text-transform: uppercase;
}

.day-theme {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.day-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.sessions-list {
  display: grid;
  gap: 8px;
}

.print-session {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  padding: 10px 0 11px;
  border-bottom: 1px solid var(--line);
  page-break-inside: avoid;
  break-inside: avoid;
}

.session-time {
  padding-top: 2px;
  color: var(--brand);
  font-weight: 700;
  line-height: 1.2;
}

.session-time span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.session-title {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.session-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.type-conference { border-color: #c41e1e; color: #9f1818; }
.type-panel { border-color: #5279c8; color: #315da9; }
.type-masterclass { border-color: #b98612; color: #8a640f; }
.type-networking { border-color: #3e9999; color: #257b7b; }
.type-b2b { border-color: #8e4bad; color: #73358f; }
.type-ceremonie { border-color: #cf741e; color: #a85510; }
.type-accueil { border-color: #3f9141; color: #2b742d; }
.type-pause { border-color: #747474; color: #555; }

.session-description {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.speakers {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.speaker {
  color: var(--ink-soft);
  font-size: 12px;
}

.speaker strong {
  color: var(--ink);
}

.print-footer {
  margin-top: 22px;
  padding-top: 10px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 760px) {
  .print-toolbar {
    flex-wrap: wrap;
  }

  .toolbar-status {
    order: 3;
    flex-basis: 100%;
  }

  .print-page {
    margin: 0;
    padding: 24px 18px;
    width: 100%;
    min-height: 0;
  }

  .print-doc-header,
  .print-meta-grid,
  .print-summary,
  .day-head,
  .print-session {
    grid-template-columns: 1fr;
  }

  .print-doc-header h1 {
    font-size: 34px;
  }
}

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  html,
  body {
    background: #fff !important;
  }

  body {
    font-size: 11.5pt;
    color: #111 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-toolbar {
    display: none !important;
  }

  .print-page {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  .print-doc-header {
    grid-template-columns: 64px 1fr;
    gap: 14px;
    padding-bottom: 12px;
  }

  .print-logo {
    width: 64px;
    height: 64px;
  }

  .print-doc-header h1 {
    font-size: 30pt;
  }

  .print-meta-grid,
  .print-summary {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .print-day {
    margin-top: 0;
  }

  .print-session {
    padding-top: 7px;
    padding-bottom: 8px;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
