@font-face {
  font-family: "Geist Sans";
  src: url("/assets/fonts/geist-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Geist Sans", "Geist", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #182229;
  --muted: #56636c;
  --paper: #f5f5f2;
  --surface: #ffffff;
  --line: #dce1e0;
  --line-strong: #9aa6a8;
  --dark: #08121d;
  --dark-panel: #162633;
  --dark-line: rgba(160, 182, 198, 0.15);
  --dark-muted: #aebbc5;
  --acid: #e4f277;
  --acid-soft: rgba(228, 242, 119, 0.18);
}

* { box-sizing: border-box; }

html { background: var(--dark); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--dark);
  color: #f1f1ee;
}

a { color: inherit; }

.site-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem clamp(1.25rem, 5vw, 4rem);
  background:
    linear-gradient(90deg, rgba(59, 91, 119, 0.10), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    var(--dark);
  color: #f1f1ee;
  border-bottom: 1px solid var(--dark-line);
}

.brand {
  display: inline-flex;
  gap: 0.875rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  filter: invert(1);
}

.brand-name {
  font-weight: 650;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.brand-company {
  color: var(--dark-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.accent { color: var(--acid); }

.site-footer {
  padding: 1.25rem clamp(1.25rem, 5vw, 4rem);
  font-size: 0.875rem;
}

.home-page {
  background: var(--dark);
  color: #f1f1ee;
}

.home-main {
  flex: 1;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  padding: clamp(3rem, 6vw, 5rem) clamp(1.25rem, 8vw, 8rem);
  background:
    radial-gradient(circle at 78% 29%, rgba(74, 104, 135, 0.095) 0%, transparent 34%),
    radial-gradient(circle at 73% 62%, rgba(72, 101, 131, 0.085) 0%, transparent 38%),
    linear-gradient(90deg, rgba(48, 78, 105, 0.07), transparent 35%),
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 22%),
    var(--dark);
}

.home-main::before {
  content: none;
}


.home-copy {
  position: relative;
  z-index: 2;
  max-width: min(40rem, 52vw);
}

.home-main h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.home-main h1 .tone {
  color: #d4d7d5;
}

.home-main p.home-description {
  margin: 1.75rem 0 2.2rem;
  color: #c3c9c9;
  font-size: clamp(1rem, 1.8vw, 1.26rem);
  line-height: 1.55;
  max-width: 33rem;
}

.home-side-notes {
  position: absolute;
  top: 6.9rem;
  right: clamp(1.25rem, 4vw, 3rem);
  z-index: 2;
  display: grid;
  gap: 0.2rem;
  justify-items: end;
  color: #b2b7ba;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-art {
  /* Extend the canvas beyond the viewport to avoid a hard right-hand stop.
     Keep the visible artwork origin and watermark at their previous positions. */
  position: absolute;
  z-index: 1;
  top: 0;
  right: -200px;
  bottom: 0;
  width: 1280px;
  pointer-events: none;
  overflow: visible;
}

.home-watermark {
  position: absolute;
  width: auto;
  height: max(135%, 1050px);
  max-width: none;
  right: -30px;
  top: 50%;
  transform: translateY(-50%) rotate(-9deg);
  filter: invert(1);
  opacity: 0.02;
}

.data-flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  mix-blend-mode: screen;
}

@media (max-width: 1700px) {
  /* Preserve the x=620px artwork origin while its right-hand extension
     disappears naturally beyond the viewport (no internal clipping edge). */
  .home-art { right: calc(100vw - 1900px); }
}

@media (max-width: 760px) {
  .home-main { padding-block: 4rem; }
  .home-copy { max-width: 100%; }
  .home-side-notes { display: none; }
}

.accent-rule {
  width: 3.4rem;
  height: 3px;
  background: var(--acid);
  box-shadow: 0 0 18px rgba(228, 242, 119, 0.18);
}

.home-page .site-footer {
  border-top: 1px solid var(--dark-line);
  color: #b2b7ba;
  background: var(--dark);
}

/* All functional views share the B9 dark vocabulary without distracting artwork. */
.form-page {
  background:
    radial-gradient(ellipse 49rem 34rem at 50% 49%, rgba(64, 102, 137, 0.17) 0%, rgba(39, 75, 107, 0.085) 38%, transparent 75%),
    linear-gradient(180deg, #0b1724 0%, #08111b 100%);
  color: #f1f1ee;
}

.form-page .site-header {
  padding-block: 1rem;
}

.form-main {
  width: 100%;
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(2.5rem, 5vw, 4rem) 1.25rem;
}

.form-panel {
  position: relative;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.027), transparent 58%),
    var(--dark-panel);
  border: 1px solid rgba(160, 184, 203, 0.20);
  border-radius: 0.8rem;
  box-shadow:
    0 26px 72px rgba(0, 4, 10, 0.31),
    0 0 70px rgba(65, 105, 140, 0.065);
  width: min(100%, 35rem);
  padding: clamp(1.75rem, 4vw, 3rem);
}

.form-panel::before {
  display: block;
  margin-bottom: 1.15rem;
  color: #a5b0b5;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

html[lang="fr"] body[data-view="access"] .form-panel::before { content: "Accès"; }
html[lang="fr"] body[data-view="verification"] .form-panel::before { content: "Vérification"; }
html[lang="fr"] body[data-view="ready"] .form-panel::before { content: "Téléchargement"; }
html[lang="fr"] body[data-view="unavailable"] .form-panel::before { content: "Indisponible"; }
html[lang="en"] body[data-view="access"] .form-panel::before { content: "Access"; }
html[lang="en"] body[data-view="verification"] .form-panel::before { content: "Verification"; }
html[lang="en"] body[data-view="ready"] .form-panel::before { content: "Download"; }
html[lang="en"] body[data-view="unavailable"] .form-panel::before { content: "Unavailable"; }

.form-panel h1 {
  color: #f1f1ee;
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.form-panel p {
  color: #b8c1c4;
  line-height: 1.6;
}

.form-panel form {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.75rem;
}

.form-panel label {
  color: #dce2e3;
  display: grid;
  gap: 0.4rem;
  font-weight: 560;
  font-size: 0.9rem;
}

.form-panel input {
  font: inherit;
  width: 100%;
  min-height: 3rem;
  border: 1px solid #526777;
  border-radius: 0.4rem;
  padding: 0.68rem 0.85rem;
  color: #f1f1ee;
  background: #0a1723;
  color-scheme: dark;
}

.form-panel input:hover { border-color: #91a7b7; }
.form-panel input:focus { border-color: var(--acid); }

/* The existing input border is the focus indicator; avoid a second ring.
   Keep the visible focus outline on buttons, links and other controls. */
.form-panel input:focus-visible { outline: none; }


.form-panel input[name="code"] {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
}

.form-panel button {
  min-height: 3rem;
  padding: 0.78rem 1.25rem;
  border: 1px solid var(--acid);
  border-radius: 0.4rem;
  background: var(--acid);
  color: #08121d;
  font: inherit;
  font-weight: 620;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

.form-panel button:hover,
.download-action:hover {
  background: #f0f8a7;
  border-color: #f0f8a7;
}

.form-panel button:active,
.download-action:active {
  transform: translateY(1px);
}

:focus-visible {
  outline: 3px solid var(--acid);
  outline-offset: 3px;
}

.form-page .site-footer {
  text-align: center;
  color: #a5b0b5;
  border-top: 1px solid var(--dark-line);
  background: var(--dark);
}

.form-note {
  font-size: 0.85rem;
}

.secondary-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--acid);
  text-underline-offset: 0.2em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  color: var(--dark-muted);
  text-decoration: none;
  font-size: 0.78rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.language-switch a:hover {
  background: rgba(255, 255, 255, 0.045);
  color: #f1f1ee;
}

.language-switch a[aria-current="true"] {
  color: #f1f1ee;
  border-color: rgba(228, 242, 119, 0.65);
  background: rgba(228, 242, 119, 0.065);
}

.download-action {
  display: block;
  margin-top: 1.75rem;
  text-align: center;
  text-decoration: none;
  min-height: 3rem;
  padding: 0.78rem 1.25rem;
  border: 1px solid var(--acid);
  border-radius: 0.4rem;
  background: var(--acid);
  color: #08121d;
  font-weight: 620;
  transition: background 120ms ease, transform 120ms ease;
}

@media (max-width: 420px) {
  .brand-company { display: none; }
  .site-header { padding-inline: 1.25rem; }
  .brand-mark { width: 40px; height: 40px; }
  .header-actions { gap: 0.5rem; }
  .language-switch { gap: 0.15rem; }
}
