/* Projo for Wizarr: the invitation page and the guide that follows, in Projo's mauve neumorphism, light or dark.
   Wizarr takes no custom CSS: the projo-front-skin relay adds this file to its pages, served at /projo-skin/wizarr.css.
   Wizarr picks light or dark itself (html.dark: the visitor's system, or its own switch); both are covered here.
   Its colours are Tailwind variables, set again below; the pages' own layers are then reshaped by element. */

@font-face { font-family: "DM Serif Display"; font-weight: 400; font-display: swap;
  src: url("/projo-fonts/dm-serif-display-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 500; font-display: swap;
  src: url("/projo-fonts/nunito-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap;
  src: url("/projo-fonts/nunito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap;
  src: url("/projo-fonts/nunito-latin-800-normal.woff2") format("woff2"); }

/* ---------- Palette ----------
   html:root outranks the :root that the invitation page writes in its body with the server's gradient colours */
html:root {
  --projo-bg: #ECE6F5;
  --projo-dark: #CDC2DF;
  --projo-light: #FFFFFF;
  --projo-text: #2B1F3D;
  --projo-muted: #5A4D6E;
  --projo-accent: #6B3FC4;
  --projo-on-accent: #FFFFFF;
  --projo-raised: 8px 8px 16px var(--projo-dark), -8px -8px 16px var(--projo-light);
  --projo-raised-sm: 4px 4px 8px var(--projo-dark), -4px -4px 8px var(--projo-light);
  --projo-inset: inset 5px 5px 10px var(--projo-dark), inset -5px -5px 10px var(--projo-light);
  --projo-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 48'%3E%3Ccircle cx='13' cy='13' r='7' fill='%23C9A3FF'/%3E%3Ccircle cx='22' cy='9' r='8' fill='%23C9A3FF'/%3E%3Ccircle cx='31' cy='13' r='7' fill='%23C9A3FF'/%3E%3Cpath d='M6 16h32l-4 30H10z' fill='%236B3FC4'/%3E%3Cpath d='M16 16l1 30M28 16l-1 30' stroke='%23ECE6F5' stroke-width='3'/%3E%3C/svg%3E");

  /* Wizarr's accent, and its gradients reduced to one colour */
  --color-primary: var(--projo-accent) !important;
  --color-primary_hover: var(--projo-accent) !important;
  --color-secondary: var(--projo-muted) !important;
  --color-secondary_hover: var(--projo-text) !important;

  /* Tailwind's greys and slates, tinted mauve (light pages use the low numbers, dark pages the high ones) */
  --color-gray-50: #F6F2FB;  --color-slate-50: #F6F2FB;
  --color-gray-100: #ECE6F5; --color-slate-100: #ECE6F5;
  --color-gray-200: #DDD3EC; --color-slate-200: #DDD3EC;
  --color-gray-300: #CDC2DF; --color-slate-300: #CDC2DF;
  --color-gray-400: #A396B8; --color-slate-400: #A396B8;
  --color-gray-500: #7A6D90; --color-slate-500: #7A6D90;
  --color-gray-600: #5A4D6E; --color-slate-600: #5A4D6E;
  --color-gray-700: #45395A; --color-slate-700: #45395A;
  --color-gray-800: #2B2038; --color-slate-800: #2B2038;
  --color-gray-900: #21182D; --color-slate-900: #21182D;
  --color-gray-950: #16101E; --color-slate-950: #16101E;
}
html.dark:root {
  --projo-bg: #2B2038;
  --projo-dark: #1C1426;
  --projo-light: #3C2D4E;
  --projo-text: #F3ECFF;
  --projo-muted: #C4B5DA;
  --projo-accent: #C9A3FF;
  --projo-on-accent: #24163A;
  --projo-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 48'%3E%3Ccircle cx='13' cy='13' r='7' fill='%23F3E1FF'/%3E%3Ccircle cx='22' cy='9' r='8' fill='%23F3E1FF'/%3E%3Ccircle cx='31' cy='13' r='7' fill='%23F3E1FF'/%3E%3Cpath d='M6 16h32l-4 30H10z' fill='%23C9A3FF'/%3E%3Cpath d='M16 16l1 30M28 16l-1 30' stroke='%232B2038' stroke-width='3'/%3E%3C/svg%3E");
}

html, body, button, input, select, textarea {
  font-family: "Nunito", system-ui, sans-serif !important;
}
body { background: var(--projo-bg) !important; color: var(--projo-text); }

/* ---------- Invitation page (/j/<code>) ---------- */
#invite-section { background: var(--projo-bg) !important; }
/* The blurred colour blobs, their veil and the twinkling stars: one calm surface instead */
#invite-section > .absolute.inset-0,
#invite-section .shimmer-particles { display: none !important; }

#page-header h1 {
  background: none !important;
  -webkit-text-fill-color: currentColor;
  color: var(--projo-text) !important;
  font-family: "DM Serif Display", serif !important;
  font-weight: 400 !important;
}
#page-header p { color: var(--projo-muted) !important; }
/* The server's name, with the popcorn mark in front */
#page-header p.font-bold {
  color: var(--projo-text) !important;
  font-family: "DM Serif Display", serif !important;
  font-weight: 400 !important;
}
#page-header p.font-bold::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 1em;
  margin-right: 0.35em;
  vertical-align: -0.1em;
  background: var(--projo-mark) center / contain no-repeat;
}

#card-container {
  background: var(--projo-bg) !important;
  border: 0 !important;
  border-radius: 24px !important;
  box-shadow: var(--projo-raised) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
#card-container h2 { color: var(--projo-text) !important; }
#card-container p:not(.text-red-400):not(.text-red-600),
#card-container label { color: var(--projo-muted) !important; }
#card-container #back-btn { color: var(--projo-muted) !important; }

/* The round check icon: a raised disc around a filled one */
#welcome-screen .rounded-full {
  background: var(--projo-accent) !important;
  box-shadow: 0 0 0 8px var(--projo-bg), var(--projo-raised-sm) !important;
}
#welcome-screen .rounded-full svg { color: var(--projo-on-accent) !important; }

/* Main buttons: filled with the accent, the one solid thing on the page */
#invite-section button.bg-gradient-to-r,
#invite-section button[type="submit"],
#invite-section input[type="submit"] {
  background: var(--projo-accent) !important;
  color: var(--projo-on-accent) !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: var(--projo-raised-sm) !important;
  transform: none !important;
  transition: filter 0.2s ease !important;
}
#invite-section button.bg-gradient-to-r:hover,
#invite-section button[type="submit"]:hover,
#invite-section input[type="submit"]:hover { filter: brightness(1.08); }

/* Fields: hollowed into the surface */
#invite-section input:not([type="hidden"]):not([type="checkbox"]):not([type="submit"]) {
  background: var(--projo-bg) !important;
  color: var(--projo-text) !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: var(--projo-inset) !important;
  backdrop-filter: none !important;
}
#invite-section input::placeholder { color: var(--projo-muted) !important; opacity: 0.8; }
#invite-section input:focus { outline: 2px solid var(--projo-accent) !important; outline-offset: 2px; }

/* "Secure invitation system powered by Wizarr" */
#invite-section p.text-sm { color: var(--projo-muted) !important; }

/* ---------- The guide after the invitation (/wizard/...) ---------- */
.wizard-content {
  background: var(--projo-bg) !important;
  border: 0 !important;
  border-radius: 24px !important;
  box-shadow: var(--projo-raised) !important;
}
@media (max-width: 768px) {
  .wizard-content { box-shadow: none !important; border-radius: 0 !important; }
}
.wizard-content .prose {
  color: var(--projo-text) !important;
  --tw-prose-body: var(--projo-text);
  --tw-prose-headings: var(--projo-text);
  --tw-prose-bold: var(--projo-text);
  --tw-prose-links: var(--projo-accent);
  --tw-prose-bullets: var(--projo-accent);
  --tw-prose-counters: var(--projo-accent);
  --tw-prose-quotes: var(--projo-muted);
  --tw-prose-hr: var(--projo-dark);
  --tw-prose-invert-body: var(--projo-text);
  --tw-prose-invert-headings: var(--projo-text);
  --tw-prose-invert-bold: var(--projo-text);
  --tw-prose-invert-links: var(--projo-accent);
  --tw-prose-invert-bullets: var(--projo-accent);
  --tw-prose-invert-counters: var(--projo-accent);
}
.wizard-content .prose h1,
.wizard-content .prose h2 {
  font-family: "DM Serif Display", serif !important;
  font-weight: 400 !important;
}
.wizard-content .prose h3 { font-weight: 800 !important; }

/* The ||| cards: hollowed panels inside the raised one */
.wizard-content .card-widget {
  background: var(--projo-bg) !important;
  border: 0 !important;
  border-radius: 18px !important;
  box-shadow: var(--projo-inset) !important;
}

/* Buttons inside the steps ("Ouvrir la page Projo", "Aller sur Jellyfin") */
.wizard-content a.bg-primary,
.wizard-content a[class*="bg-primary"] {
  background: var(--projo-accent) !important;
  color: var(--projo-on-accent) !important;
  border-radius: 999px !important;
  box-shadow: var(--projo-raised-sm) !important;
  transition: filter 0.2s ease !important;
}
.wizard-content a.bg-primary:hover { filter: brightness(1.08); }

/* Previous / next */
.btn-nav {
  background: var(--projo-bg) !important;
  color: var(--projo-text) !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: var(--projo-raised-sm) !important;
  transition: box-shadow 0.2s ease !important;
}
.btn-nav:hover { box-shadow: var(--projo-inset) !important; }
.wizard-btn-mobile {
  background: var(--projo-accent) !important;
  color: var(--projo-on-accent) !important;
  box-shadow: var(--projo-raised-sm) !important;
  backdrop-filter: none !important;
}

/* Progress: the accent on a hollow track */
#progress-bar-mobile,
#progress-bar-desktop {
  background: var(--projo-accent) !important;
  box-shadow: none !important;
}
div:has(> #progress-bar-mobile),
div:has(> #progress-bar-desktop) {
  background: var(--projo-bg) !important;
  box-shadow: var(--projo-inset) !important;
}
.wizard-glass-container {
  background: var(--projo-bg) !important;
  box-shadow: var(--projo-raised-sm) !important;
  backdrop-filter: none !important;
}
