:root {
  --door-ink: #121314;
  --door-muted: #646a70;
  --door-paper: #f7f6f2;
  --door-panel: #ffffff;
  --door-line: rgba(18, 19, 20, 0.11);
  --door-action: #A57C52;
  --door-action-strong: #8a6543;
  --door-action-focus: #7d5c3d;
  --door-alert: #9f2d20;
  --door-field: #f4f2ec;
  --door-shadow: 0 34px 110px rgba(18, 19, 20, 0.1), 0 8px 28px rgba(18, 19, 20, 0.055);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--door-paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--door-ink);
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.92), rgba(247, 246, 242, 0) 46rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 246, 242, 0)),
    var(--door-paper);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, Segoe UI, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

body:has(.wnia-shell) .entry-header,
body:has(.wnia-shell) .page-header,
body:has(.wnia-shell) .entry-title,
body:has(.wnia-shell) .page-title {
  display: none;
}

.wnia-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 40px);
}

.wnia-card {
  width: min(100%, 500px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(34px, 7vw, 46px);
  padding: clamp(28px, 7vw, 44px);
  border: 1px solid var(--door-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.84)),
    var(--door-panel);
  box-shadow: var(--door-shadow);
}

.wnia-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--door-muted);
  font-size: 13px;
  font-weight: 650;
}

.wnia-brand-mark {
  width: 11px;
  height: 24px;
  border: 1px solid rgba(18, 19, 20, 0.28);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #ece7dc, #ffffff);
  position: relative;
}

.wnia-brand-mark::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 11px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--door-action);
}

.wnia-state {
  margin-top: 0;
}

.wnia-state-ready {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.wnia-kicker {
  margin: 0 0 14px;
  color: var(--door-action);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.wnia-card h1,
.wnia-card h2,
.wnia-card p {
  margin-top: 0;
}

.wnia-card h1 {
  max-width: 12ch;
  margin-bottom: 20px;
  font-size: clamp(38px, 12vw, 48px);
  line-height: 1.08;
  font-weight: 400;
}

.wnia-card h2 {
  margin-bottom: 12px;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 740;
}

.wnia-copy,
.wnia-state-loading p,
.wnia-state-error p,
.wnia-validity {
  color: var(--door-muted);
  font-size: 16px;
  line-height: 1.62;
}

.wnia-form {
  display: grid;
  gap: 12px;
  width: 100%;
  margin-top: clamp(28px, 8vw, 40px);
  padding: 0;
}

.wnia-label {
  color: var(--door-muted);
  font-size: 13px;
  font-weight: 620;
}

.wnia-input {
  width: 100%;
  min-height: 60px;
  padding: 0 17px;
  border: 2px solid rgba(18, 19, 20, 0.18);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, 0.94);
  color: var(--door-ink);
  font-size: 16px;
  box-shadow: inset 0 1px 2px rgba(18, 19, 20, 0.035), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.wnia-input:focus {
  border-color: var(--door-action-focus);
  background: #ffffff;
  box-shadow: inset 0 2px 8px rgba(165, 124, 82, 0.08), 0 0 0 5px rgba(165, 124, 82, 0.11);
}

.wnia-input::placeholder {
  color: rgba(100, 106, 112, 0.82);
}

.wnia-button,
.wnia-copy-button,
.wnia-secondary-button {
  min-height: 60px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 760;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.wnia-button,
.wnia-copy-button {
  background: var(--door-action);
  color: #fff;
  padding-inline: 24px;
  box-shadow: 0 12px 28px rgba(165, 124, 82, 0.22);
}

.wnia-button:active,
.wnia-copy-button:active,
.wnia-secondary-button:active {
  transform: scale(0.985);
}

.wnia-button:hover,
.wnia-copy-button:hover {
  background: #b58a5f;
  box-shadow: 0 16px 34px rgba(138, 101, 67, 0.24);
}

.wnia-button:focus-visible,
.wnia-copy-button:focus-visible,
.wnia-secondary-button:focus-visible {
  outline: 3px solid rgba(165, 124, 82, 0.24);
  outline-offset: 3px;
}

.wnia-secondary-button {
  width: 100%;
  margin-top: 22px;
  background: rgba(18, 19, 20, 0.07);
  color: var(--door-ink);
}

.wnia-loader {
  width: 144px;
  height: 144px;
  display: grid;
  place-items: center;
  margin: 0 0 34px;
  position: relative;
}

.wnia-loader span {
  position: absolute;
  width: 92px;
  height: 92px;
  border: 2px solid rgba(165, 124, 82, 0.2);
  border-top-color: var(--door-action);
  border-radius: 44% 56% 48% 52%;
  animation: wnia-spin 1.4s linear infinite, wnia-morph 2.8s ease-in-out infinite;
}

.wnia-loader span:nth-child(2) {
  width: 116px;
  height: 116px;
  animation-duration: 2s, 3.3s;
  animation-direction: reverse, normal;
}

.wnia-loader span:nth-child(3) {
  width: 142px;
  height: 142px;
  opacity: 0.48;
  animation-duration: 2.8s, 4s;
}

.wnia-code {
  margin: 12px 0 24px;
  color: var(--door-ink);
  font-size: 68px;
  line-height: 0.95;
  font-weight: 820;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.wnia-code-block h2,
.wnia-machine-code-block h2 {
  margin-bottom: 8px;
}

.wnia-machine-code-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--door-line);
}

.wnia-machine-code-block .wnia-kicker {
  color: var(--door-alert);
}

.wnia-machine-code {
  margin-bottom: 0;
  color: var(--door-alert);
  overflow-wrap: anywhere;
}

.wnia-state-error .wnia-kicker {
  color: var(--door-alert);
}

.wnia-booking-details {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(18, 19, 20, 0.1);
  border-radius: 8px;
  background: rgba(18, 19, 20, 0.035);
}

.wnia-booking-details h3 {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.25;
}

.wnia-booking-details dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.wnia-booking-details div {
  display: grid;
  grid-template-columns: minmax(86px, 0.38fr) 1fr;
  gap: 12px;
}

.wnia-booking-details dt,
.wnia-booking-details dd {
  min-width: 0;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.wnia-booking-details dt {
  color: var(--door-muted);
  font-weight: 720;
}

.wnia-booking-details dd {
  color: var(--door-ink);
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

@keyframes wnia-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes wnia-morph {
  0%,
  100% {
    border-radius: 44% 56% 48% 52%;
  }
  50% {
    border-radius: 58% 42% 54% 46%;
  }
}

@media (min-width: 680px) {
  .wnia-shell {
    min-height: 72svh;
    padding: 48px 24px;
  }

  .wnia-card {
    width: min(100%, 500px);
    padding: 42px;
  }

  .wnia-card h1 {
    max-width: 12ch;
    font-size: 44px;
  }

  .wnia-form {
    gap: 14px;
  }

  .wnia-label {
    grid-column: auto;
  }

  .wnia-button {
    width: 100%;
    padding: 0 28px;
    white-space: nowrap;
  }
}

@media (min-width: 980px) {
  .wnia-card {
    width: min(100%, 520px);
    padding: 46px;
  }
}

@media (max-width: 420px) {
  .wnia-card {
    min-height: calc(100svh - 24px);
  }

  .wnia-code {
    font-size: 58px;
  }
}

/* Hide brand + H1, and reduce ready-state copy to "Entrez votre email" only */
.wnia-brand {
  display: none;
}

.wnia-state-ready h1,
.wnia-state-ready .wnia-kicker,
.wnia-state-ready .wnia-copy {
  display: none;
}

.wnia-state-ready .wnia-label {
  font-size: 0;
}

.wnia-state-ready .wnia-label::before {
  content: "Entrez votre email";
  font-size: 13px;
  font-weight: 620;
}
