.hub_scene_runtime {
  width: min(100vw, calc(100vh * var(--scene-frame-ratio-num, 1.7777777778)));
  height: min(100vh, calc(100vw * var(--scene-frame-ratio-inverse-num, 0.5625)));
  min-height: 0;
  position: relative;
  background: transparent;
  overflow: hidden;
}

.hub_scene_runtime .cadre_scene {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.hub_scene_runtime .cadre_scene_principal {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding-right: 0;
}

.hub_scene_runtime .reglages_scene,
.hub_scene_runtime .colonne_droite_scene,
.hub_scene_runtime .poignee_redim_droite,
.hub_scene_runtime .scene-help-floating,
.hub_scene_runtime .overlay_upload_svg {
  display: none !important;
}

.hub_scene_runtime .scene {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  aspect-ratio: var(--scene-frame-ratio, 16 / 9);
  flex: 0 0 auto;
}

.hub_scene_runtime .contenu_svg_scene {
  width: 100%;
  height: 100%;
}

.hub_scene_runtime .scene_fullscreen_runtime {
  width: 100%;
  height: 100%;
  max-width: none;
}

@media (max-width: 720px) {
  .hub_scene_runtime .scene {
    border-radius: 0;
  }
}:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: rgba(255, 255, 255, 0.68);
  --surface-solid: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.48);
  --ink: #1d2939;
  --muted: #5f6d7d;
  --line: rgba(255, 255, 255, 0.72);
  --line-muted: rgba(102, 112, 133, 0.2);
  --accent: #43a834;
  --accent-strong: #338c2b;
  --blue: #285a8f;
  --danger: #b3261e;
  --input-bg: rgba(255, 255, 255, 0.58);
  --soft-blue: rgba(234, 246, 238, 0.72);
  --error-bg: #fff1ef;
  --shadow: 0 20px 42px rgba(16, 24, 40, 0.18);
  --color-bg: var(--bg);
  --color-surface: var(--surface);
  --color-text: var(--ink);
  --color-text-dim: var(--muted);
  --color-primary: var(--accent);
  --cv-divider-color: var(--line);
  --cv-pill-bg: var(--surface-soft);
  --diffusion-browser-bg-current: var(--diffusion-browser-light-bg, var(--bg));
  --diffusion-browser-text-current: var(--diffusion-browser-light-text, var(--ink));
  --diffusion-page-bg-current: var(--diffusion-page-light-bg, var(--bg));
  --diffusion-page-text-current: var(--diffusion-page-light-text, var(--ink));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111417;
    --surface: rgba(28, 35, 42, 0.72);
    --surface-solid: #202832;
    --surface-soft: rgba(255, 255, 255, 0.1);
    --ink: #f4f7f8;
    --muted: #bac5ce;
    --line: rgba(255, 255, 255, 0.16);
    --line-muted: rgba(255, 255, 255, 0.18);
    --accent: #43a834;
    --accent-strong: #55bd45;
    --blue: #9bbff1;
    --danger: #ff8f86;
    --input-bg: rgba(16, 22, 28, 0.56);
    --soft-blue: rgba(67, 168, 52, 0.12);
    --error-bg: #351b1d;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
    --diffusion-browser-bg-current: var(--diffusion-browser-dark-bg, var(--bg));
    --diffusion-browser-text-current: var(--diffusion-browser-dark-text, var(--ink));
    --diffusion-page-bg-current: var(--diffusion-page-dark-bg, var(--bg));
    --diffusion-page-text-current: var(--diffusion-page-dark-text, var(--ink));
  }
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  --reader-viewport-height: 100vh;
  background: var(--diffusion-browser-bg-current);
  color: var(--diffusion-browser-text-current);
}

@supports (height: 100dvh) {
  html {
    --reader-viewport-height: 100dvh;
  }
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: transparent;
  color: var(--diffusion-page-text-current);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: var(--reader-viewport-height);
}

.diffusion_toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2200;
  width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--accent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.08);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  animation: diffusion_toast_lifecycle var(--diffusion-toast-duration-ms, 4500ms) ease both;
}

.diffusion_toast_erreur {
  border-color: rgba(179, 38, 30, 0.3);
  background: var(--error-bg);
  color: var(--danger);
}

@keyframes diffusion_toast_lifecycle {
  0% { opacity: 0; transform: translate(-50%, calc(-50% - 8px)); }
  8% { opacity: 1; transform: translate(-50%, -50%); }
  82% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, calc(-50% - 8px)); }
}

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

button,
input {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1.05;
}

h2 {
  margin-bottom: 6px;
  font-size: 1.2rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

p {
  color: var(--muted);
  line-height: 1.45;
}

.app_shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 48px;
}

.app_shell_lecteur {
  width: 100vw;
  min-height: var(--reader-viewport-height);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--diffusion-page-bg-current);
  color: var(--diffusion-page-text-current);
  overflow: hidden;
}

.app_shell_compte {
  width: min(720px, calc(100% - 32px));
  min-height: 100vh;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--diffusion-page-bg-current);
  color: var(--diffusion-page-text-current);
}

.account_route_shell {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.btn:hover {
  filter: brightness(1.04);
}

.btn:focus-visible {
  outline: 3px solid rgba(67, 168, 52, 0.22);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(1px);
  filter: brightness(0.96);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.16);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(67, 168, 52, 0.22);
}

.btn-secondary {
  border-color: var(--line-muted);
  background: var(--surface-soft);
  color: var(--ink);
  backdrop-filter: blur(12px) saturate(1.04);
}

.btn-link {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn:disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.62;
  filter: none;
}

.catalogue_section,
.reader {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.catalogue_section {
  min-height: calc(var(--reader-viewport-height) - 90px);
  justify-content: center;
  align-items: center;
}

.app_shell_lecteur .reader {
  width: 100vw;
  height: var(--reader-viewport-height);
  min-width: 0;
  min-height: 0;
  gap: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.section_bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section_bar p {
  margin-bottom: 0;
}

.versions_grid {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 14px;
  justify-content: center;
  align-content: center;
}

.version_card,
.empty_state,
.access_panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.08);
}

.version_card {
  --catalogue-diapos-scale: 1;
  display: flex;
  flex-direction: column;
  width: calc(310px * var(--catalogue-diapos-scale));
  min-width: calc(260px * var(--catalogue-diapos-scale));
  min-height: calc(210px * var(--catalogue-diapos-scale));
  padding: calc(16px * var(--catalogue-diapos-scale));
  gap: calc(14px * var(--catalogue-diapos-scale));
  font-size: calc(1rem * var(--catalogue-diapos-scale));
}

.version_vignette {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface-soft);
}

.version_vignette img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.version_card_main {
  flex: 1;
}

.version_meta,
.version_stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.version_meta span,
.version_stats span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.version_stats span {
  background: var(--soft-blue);
  color: var(--accent-strong);
}

.version_card h3 {
  margin: 0;
  font-size: calc(1.28rem * var(--catalogue-diapos-scale));
  line-height: 1.16;
}

.version_card p {
  margin-bottom: 0;
}

.version_actions {
  display: flex;
  justify-content: flex-end;
}

.version_actions .btn {
  min-height: calc(40px * var(--catalogue-diapos-scale));
  padding:
    calc(0.46rem * var(--catalogue-diapos-scale))
    calc(1.08rem * var(--catalogue-diapos-scale));
  font-size: calc(1rem * var(--catalogue-diapos-scale));
  line-height: 1.1;
}

.empty_state,
.access_panel,
.login_panel,
.account_panel {
  padding: 28px;
}

.empty_state_silent {
  display: none;
}

.catalogue_loading_state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 42px;
}

.catalogue_loading_svg {
  display: block;
  width: 54px;
  height: 18px;
  color: var(--accent);
}

.catalogue_loading_dot {
  fill: currentColor;
  opacity: 0.34;
  transform-box: fill-box;
  transform-origin: center;
  animation: catalogue_loading_dot_pulse 1.05s ease-in-out infinite;
}

.catalogue_loading_dot_2 {
  animation-delay: 0.14s;
}

.catalogue_loading_dot_3 {
  animation-delay: 0.28s;
}

@keyframes catalogue_loading_dot_pulse {
  0%,
  80%,
  100% {
    opacity: 0.34;
    transform: scale(0.74);
  }

  40% {
    opacity: 0.9;
    transform: scale(1);
  }
}

.empty_state p,
.access_panel p,
.login_panel p {
  margin-bottom: 0;
}

.access_panel,
.login_panel,
.account_panel {
  position: relative;
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.08);
}

.account_panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.diffusion_dialog_top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 46px;
  margin-bottom: 16px;
  gap: 12px;
  padding-right: 42px;
  overflow: hidden;
}

.diffusion_dialog_logo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(210px, calc(100% - 50px));
  max-height: 46px;
  object-fit: contain;
}

.diffusion_dialog_logo_empty {
  min-width: 1px;
  min-height: 1px;
}

.diffusion_dialog_close {
  position: absolute;
  top: 14px;
  right: 14px;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.diffusion_dialog_close::before,
.diffusion_dialog_close::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.diffusion_dialog_close::before {
  transform: rotate(45deg);
}

.diffusion_dialog_close::after {
  transform: rotate(-45deg);
}

.diffusion_dialog_close:hover {
  background: rgba(255, 255, 255, 0.28);
  color: var(--ink);
}

.diffusion_dialog_close:active {
  transform: translateY(1px) scale(0.96);
  background: rgba(102, 112, 133, 0.18);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.14);
}

.diffusion_dialog_close:focus-visible {
  outline: 3px solid rgba(67, 168, 52, 0.22);
  outline-offset: 2px;
}

.account_panel > h2 {
  margin-bottom: 18px;
}

.account_email {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.account_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.account_password_prompt {
  margin: 10px 0 12px;
  color: var(--muted);
  font-weight: 700;
}

.account_password_heading {
  margin: 10px 0 12px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.25;
}

.account_password_form {
  margin-top: 4px;
}

.login_panel {
  margin-top: 0;
}

.login_intro {
  margin-bottom: 16px;
}

.access_form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.access_form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.access_input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(102, 112, 133, 0.28);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.access_input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(67, 168, 52, 0.18);
}

.form_error {
  padding: 10px 12px;
  border: 1px solid rgba(179, 38, 30, 0.3);
  border-radius: 7px;
  background: var(--error-bg);
  color: var(--danger);
  font-weight: 700;
  white-space: pre-line;
}

.form_success {
  padding: 10px 12px;
  border: 1px solid rgba(67, 168, 52, 0.25);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--accent);
  font-weight: 700;
  white-space: pre-line;
}

.login_hint {
  margin: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(14, 18, 22, 0.34);
  backdrop-filter: blur(10px);
}

.passwordless_sent_backdrop {
  z-index: 1040;
}

.passwordless_sent_dialog {
  position: relative;
  width: min(460px, 100%);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.08);
  animation: diffusion_panel_fade_in 260ms ease both;
}

.passwordless_sent_dialog h2 {
  margin-bottom: 12px;
}

.passwordless_sent_content p {
  margin-bottom: 20px;
  line-height: 1.45;
}

.passwordless_sent_content > :first-child {
  margin-top: 0;
}

.passwordless_sent_content > :last-child {
  margin-bottom: 0;
}

@keyframes diffusion_overlay_fade_in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes diffusion_panel_fade_in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.access_gate_backdrop {
  opacity: 0;
  transition: opacity 420ms ease;
}

.access_gate_backdrop.is-open {
  opacity: 1;
  animation: diffusion_overlay_fade_in 420ms ease both;
}

.access_gate_backdrop.is-closing {
  opacity: 0;
}

.access_gate_dialog {
  position: relative;
  width: min(520px, 100%);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.08);
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transition: opacity 420ms ease, transform 420ms ease;
}

.access_gate_backdrop.is-open .access_gate_dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: diffusion_panel_fade_in 420ms ease both;
}

.access_gate_backdrop.is-closing .access_gate_dialog {
  opacity: 0;
  transform: translateY(10px) scale(0.985);
}

.diffusion_welcome_overlay {
  position: fixed;
  inset: 0;
  z-index: 920;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 13, 16, 0.26);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 420ms ease;
}

.diffusion_welcome_overlay.is-open {
  opacity: 1;
  animation: diffusion_overlay_fade_in 420ms ease both;
}

.diffusion_welcome_overlay.is-closing {
  opacity: 0;
}

.diffusion_welcome_overlay_panel {
  position: relative;
  width: min(480px, 100%);
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.08);
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transition: opacity 420ms ease, transform 420ms ease;
}

.diffusion_welcome_overlay.is-open .diffusion_welcome_overlay_panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: diffusion_panel_fade_in 420ms ease both;
}

.diffusion_welcome_overlay.is-closing .diffusion_welcome_overlay_panel {
  opacity: 0;
  transform: translateY(10px) scale(0.985);
}

.diffusion_welcome_overlay_content > :first-child {
  margin-top: 0;
}

.diffusion_welcome_overlay_content > :last-child {
  margin-bottom: 0;
}

.access_gate_dialog h2 {
  margin-bottom: 16px;
}

.access_gate_dialog h2.access_gate_title_expired {
  color: var(--danger);
}

.access_gate_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reader_runtime_bridge {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

.reader_fullscreen_shell {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.reader_fullscreen_shell:fullscreen,
.reader_fullscreen_shell:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  background: #000000;
  overflow: hidden;
}

.reader_runtime_bridge .hub_scene_runtime {
  width: min(100vw, calc(var(--reader-viewport-height) * var(--scene-frame-ratio-num, 1.7777777778)));
  height: min(var(--reader-viewport-height), calc(100vw * var(--scene-frame-ratio-inverse-num, 0.5625)));
  flex: 0 0 auto;
  background: transparent;
}

.reader_runtime_pending {
  width: 100vw;
  height: var(--reader-viewport-height);
  background: transparent;
}

.reader_scene_transition {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 10;
  width: 100%;
  height: 100%;
  background: var(--reader-scene-transition-bg, var(--color-bg, #f2f2f2));
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity var(--reader-scene-transition-ms, 400ms) ease-in-out;
}

.reader_scene_transition.is-active {
  opacity: 1;
}

.account_scene_overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 13, 16, 0.3);
  backdrop-filter: blur(10px);
  opacity: 0;
  cursor: pointer;
  transition: opacity 560ms ease;
}

.account_scene_overlay.is-open {
  opacity: 1;
  animation: diffusion_overlay_fade_in 560ms ease both;
}

.account_scene_overlay.is-closing {
  opacity: 0;
}

.account_scene_overlay_panel {
  width: min(520px, 100%);
  cursor: default;
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: opacity 560ms ease, transform 560ms ease;
}

.account_scene_overlay.is-open .account_scene_overlay_panel {
  opacity: 1;
  animation: diffusion_panel_fade_in 560ms ease both;
  transform: translateY(0) scale(1);
}

.account_scene_overlay.is-closing .account_scene_overlay_panel {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

.account_scene_overlay .account_panel {
  width: 100%;
}

@media (max-width: 720px) {
  .app_shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .app_shell_lecteur {
    width: 100vw;
    padding: 0;
  }

  .app_shell_compte {
    width: min(100% - 20px, 720px);
    padding: 10px 0;
  }

  .section_bar {
    flex-direction: column;
    align-items: stretch;
  }

  .version_actions {
    justify-content: flex-start;
  }

  h1 {
    font-size: 1.9rem;
  }
}