:root {
  --hub-navy: #10255f;
  --hub-blue: #2458d3;
  --hub-aqua: #69e5e0;
  --hub-bg: #f5f7fb;
  --hub-border: #dce3f0;
}

body.hub-auth-pending > *:not(#hubAuthRoot):not(#hubModalRoot) {
  visibility: hidden !important;
}

#hubAuthRoot,
#hubModalRoot {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hub-auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 15% 10%, rgba(105, 229, 224, .34), transparent 34%),
    linear-gradient(145deg, #f7fbff, #edf1fb);
  color: #17213f;
}

.hub-auth-card {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 30px;
  border: 1px solid rgba(36, 88, 211, .14);
  border-radius: 24px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 24px 70px rgba(22, 40, 89, .18);
}

.hub-brand {
  margin-bottom: 22px;
}

.hub-brand strong {
  display: block;
  color: var(--hub-navy);
  font-size: 1.55rem;
}

.hub-brand span {
  color: #64708b;
  font-size: .92rem;
}

.hub-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 18px 0;
  padding: 5px;
  border-radius: 14px;
  background: #edf1f8;
}

.hub-tabs button,
.hub-button {
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 750;
}

.hub-tabs button {
  padding: 10px;
  color: #66718d;
  background: transparent;
}

.hub-tabs button.active {
  color: var(--hub-navy);
  background: white;
  box-shadow: 0 2px 8px rgba(20, 38, 81, .1);
}

.hub-form {
  display: grid;
  gap: 14px;
}

.hub-field {
  display: grid;
  gap: 6px;
}

.hub-field label {
  color: #35405d;
  font-size: .88rem;
  font-weight: 720;
}

.hub-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 13px;
  border: 1px solid #cfd7e7;
  border-radius: 11px;
  background: white;
  color: #17213f;
  font: inherit;
}

.hub-check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  color: #49536d;
  font-size: .84rem;
  line-height: 1.45;
}

.hub-check input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
}

.hub-button {
  padding: 12px 16px;
  background: var(--hub-blue);
  color: white;
  font-size: .95rem;
}

.hub-button.secondary {
  border: 1px solid var(--hub-border);
  background: white;
  color: var(--hub-navy);
}

.hub-button.danger {
  border-color: #b42318 !important;
  background: #b42318 !important;
  color: #fff !important;
}

.hub-button.danger:hover,
.hub-button.danger:focus-visible {
  border-color: #8f1d17 !important;
  background: #8f1d17 !important;
  color: #fff !important;
}

.hub-error,
.hub-success,
.hub-info {
  display: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .86rem;
}

.hub-error.visible {
  display: block;
  color: #8f1d17;
  background: #fff0ee;
}

.hub-success.visible {
  display: block;
  color: #12613b;
  background: #eaf8f0;
}

.hub-info.visible {
  display: block;
  color: #27416f;
  background: #edf4ff;
}

.hub-small {
  color: #707a91;
  font-size: .78rem;
  line-height: 1.45;
}

.hub-toolbar {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 9000;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--hub-border);
  border-radius: 14px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 8px 28px rgba(29, 47, 89, .14);
  backdrop-filter: blur(8px);
}

.hub-toolbar button {
  padding: 8px 10px;
  border: 1px solid var(--hub-border);
  border-radius: 9px;
  cursor: pointer;
  color: var(--hub-navy);
  background: white;
  font-weight: 700;
}

.hub-user {
  max-width: 180px;
  overflow: hidden;
  color: #52607e;
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-sync {
  color: #13734a;
  font-size: .75rem;
  font-weight: 720;
}

.hub-sync.error {
  color: #b42318;
}

.hub-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 28, 61, .54);
}

.hub-modal {
  width: min(900px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 24px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 24px 90px rgba(0,0,0,.28);
}

.hub-modal-head {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.hub-modal-head h2 {
  margin: 0;
  color: var(--hub-navy);
}

.hub-close {
  border: 0;
  cursor: pointer;
  color: #59647f;
  background: transparent;
  font-size: 1.5rem;
}

.hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.hub-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .86rem;
}

.hub-admin-table th,
.hub-admin-table td {
  padding: 9px 7px;
  border-bottom: 1px solid var(--hub-border);
  text-align: left;
}

.hub-admin-table button {
  padding: 6px 8px;
  border: 1px solid var(--hub-border);
  border-radius: 8px;
  cursor: pointer;
  background: white;
}

.hub-json {
  max-height: 52vh;
  overflow: auto;
  padding: 14px;
  border-radius: 12px;
  background: #10182e;
  color: #eaf0ff;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

.hub-admin-notice {
  display: grid;
  gap: 3px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #cfe0fb;
  border-radius: 12px;
  background: #f1f7ff;
  color: #405273;
  font-size: .86rem;
}

.hub-admin-notice strong {
  color: var(--hub-navy);
}

.hub-admin-seminars {
  display: grid;
  gap: 14px;
}

.hub-admin-seminar {
  overflow: hidden;
  border: 1px solid var(--hub-border);
  border-radius: 16px;
  background: #fff;
}

.hub-admin-seminar > summary {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  background: #f8faff;
}

.hub-admin-seminar > summary::-webkit-details-marker {
  display: none;
}

.hub-admin-seminar > summary h3 {
  margin: 2px 0 4px;
  color: var(--hub-navy);
  font-size: 1.05rem;
}

.hub-admin-seminar > summary p {
  margin: 0;
  color: #65708a;
  font-size: .8rem;
}

.hub-admin-kicker {
  color: var(--hub-blue);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hub-admin-open-label {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #cfdaf0;
  border-radius: 999px;
  color: var(--hub-navy);
  background: #fff;
  font-size: .78rem;
  font-weight: 750;
}

.hub-admin-seminar[open] .hub-admin-open-label {
  color: #fff;
  background: var(--hub-blue);
}

.hub-admin-seminar-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.hub-admin-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hub-admin-facts > div {
  display: grid;
  gap: 4px;
  padding: 11px;
  border-radius: 11px;
  background: #f5f7fb;
}

.hub-admin-facts span {
  color: #6c7690;
  font-size: .72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.hub-admin-facts strong {
  overflow-wrap: anywhere;
  color: var(--hub-navy);
  font-size: .86rem;
}

.hub-admin-objectives {
  padding: 13px 15px;
  border-left: 4px solid var(--hub-aqua);
  border-radius: 10px;
  background: #f4fcfc;
}

.hub-admin-objectives h4,
.hub-admin-day h4,
.hub-admin-block h5 {
  margin: 0;
  color: var(--hub-navy);
}

.hub-admin-objectives ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.hub-admin-days {
  display: grid;
  gap: 14px;
}

.hub-admin-day {
  padding: 14px;
  border: 1px solid #dce5f4;
  border-radius: 14px;
  background: #fbfcff;
}

.hub-admin-day-head,
.hub-admin-block-head,
.hub-admin-step-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.hub-admin-day-head {
  margin-bottom: 11px;
}

.hub-admin-day-head span {
  color: #68738d;
  font-size: .78rem;
}

.hub-admin-block {
  margin-top: 10px;
  padding: 13px;
  border: 1px solid #e0e7f2;
  border-radius: 12px;
  background: #fff;
}

.hub-admin-block:first-of-type {
  margin-top: 0;
}

.hub-admin-block h5 {
  margin-top: 3px;
  font-size: .94rem;
}

.hub-admin-block p,
.hub-admin-step p {
  margin: 8px 0 0;
  color: #46526e;
  font-size: .82rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.hub-admin-time {
  color: var(--hub-blue);
  font-size: .75rem;
  font-weight: 800;
}

.hub-admin-duration {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--hub-navy);
  background: #eaf1ff;
  font-size: .75rem;
  font-weight: 800;
}

.hub-admin-steps {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.hub-admin-step {
  padding: 10px;
  border-radius: 10px;
  background: #f6f8fc;
}

.hub-admin-step-head {
  justify-content: flex-start;
  color: #69748e;
  font-size: .74rem;
}

.hub-admin-step-head strong {
  color: var(--hub-navy);
}

.hub-admin-facilitator {
  padding-top: 8px;
  border-top: 1px dashed #d7dfec;
}

.hub-admin-empty {
  padding: 28px;
  border: 1px dashed #cfd9ea;
  border-radius: 14px;
  color: #65708a;
  text-align: center;
  background: #f8faff;
}

.hub-client-hint {
  display: block;
  margin-top: 5px;
  color: #53627e;
  font-size: .72rem;
  line-height: 1.35;
}

/*
 * La barre de compte est fixe en haut de l'écran. On réserve sa propre ligne
 * dans l'en-tête de l'application afin qu'elle ne recouvre jamais les exports
 * PDF, même lorsque la fenêtre est moins large.
 */
@media (min-width: 761px) {
  body:not(.hub-auth-pending) > header {
    padding-top: 82px;
  }

  .hub-toolbar {
    max-width: calc(100vw - 28px);
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  body:not(.hub-auth-pending) > header {
    padding-top: 122px;
  }
}

@media (max-width: 760px) {
  .hub-toolbar {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    justify-content: center;
  }

  .hub-user {
    display: none;
  }

  .hub-auth-card,
  .hub-modal {
    padding: 19px;
    border-radius: 16px;
  }

  .hub-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hub-actions .hub-button {
    width: 100%;
  }

  .hub-admin-seminar > summary,
  .hub-admin-day-head,
  .hub-admin-block-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hub-admin-facts {
    grid-template-columns: 1fr;
  }

  .hub-admin-open-label {
    align-self: flex-start;
  }
}
