/* DaltoTest — page vitrine.
   Palette et typographie reprises telles quelles du theme "Plaque d'essai"
   de l'app (lib/theme/app_theme.dart) : papier / encre / laiton, Instrument
   Serif pour l'expression, Inter pour le corps. Aucune police ni image ne
   vient d'un CDN externe, coherent avec l'engagement de confidentialite
   affiche plus bas sur cette meme page. */

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Variable.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #eeeae0;
  --paper-raised: #f7f4ec;
  --ink: #1c1a16;
  --ink-soft: #726b5c;
  --graphite: #3a3f42;
  --graphite-soft: #e3e1dc;
  --brass: #a8793b;
  --brass-soft: #f1e4d0;
  --line: #ddd6c7;
  --outline: #c9bfa9;

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --max: 760px;
  --max-wide: 1080px;
  --header-h: 68px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-wide {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(238, 234, 224, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

header.is-scrolled {
  border-bottom-color: var(--line);
}

header .wrap-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  width: fit-content;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.brand span {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-toggle {
  display: flex;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
}

.lang-toggle button {
  background: none;
  border: none;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 600;
}

.lang-toggle button.is-active {
  background: var(--paper-raised);
  color: var(--ink);
}

.header-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 16px;
  border: 1px solid var(--outline);
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 92px 0 96px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-icon {
  width: 132px;
  height: 132px;
  margin: 0 auto 30px;
  border-radius: 30px;
  box-shadow: 0 1px 0 rgba(28, 26, 22, 0.06);
  animation: hero-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 7.5vw, 68px);
  line-height: 1.04;
  margin: 0 0 20px;
  text-wrap: balance;
}

.hero h1 em {
  font-style: italic;
  color: var(--brass);
}

.hero p.lead {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto;
  text-wrap: balance;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  padding: 9px 18px;
  border: 1px solid var(--outline);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink-soft);
  background: rgba(247, 244, 236, 0.85);
  backdrop-filter: blur(6px);
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- arc divider ---------- */

.arc-divider {
  display: flex;
  justify-content: center;
  padding: 4px 0 8px;
}

.arc-divider svg {
  width: 84px;
  height: 18px;
}

/* ---------- sections ---------- */

section {
  padding: 76px 0;
}

section + section {
  border-top: 1px solid var(--line);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 10px;
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 4.5vw, 40px);
  margin: 0 0 20px;
  text-wrap: balance;
}

.section-intro {
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 17px;
}

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- test cards ---------- */

.tests-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

.test-card {
  flex: 1 1 300px;
  max-width: 330px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.test-card:hover {
  border-color: var(--outline);
  transform: translateY(-2px);
}

.test-card .dot-glyph {
  margin-bottom: 12px;
}

.test-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  margin: 0 0 8px;
}

.test-card p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- privacy checklist ---------- */

.privacy-list {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 52ch;
}

.privacy-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
}

.privacy-list svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--brass);
}

/* ---------- disclaimer ---------- */

.disclaimer {
  background: var(--graphite-soft);
  border-radius: 14px;
  padding: 26px 28px;
}

.disclaimer p {
  margin: 0;
  color: var(--graphite);
  font-size: 14px;
}

.disclaimer strong {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 6px;
}

/* ---------- footer ---------- */

footer {
  background: var(--ink);
  color: var(--paper-raised);
  padding: 56px 0 32px;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 26px;
  text-align: center;
  margin: 0 0 14px;
  color: var(--paper-raised);
}

.footer-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14px;
  color: rgba(247, 244, 236, 0.75);
}

.footer-line img {
  width: 15px;
  height: 15px;
}

.footer-line svg {
  width: 15px;
  height: 15px;
  color: #b3453a;
}

.footer-rule {
  border: none;
  border-top: 1px solid rgba(247, 244, 236, 0.14);
  margin: 28px 0 20px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(247, 244, 236, 0.6);
}

.footer-bottom a,
.footer-bottom button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--brass-soft);
  cursor: pointer;
  text-decoration: none;
}

.footer-bottom a:hover,
.footer-bottom button:hover {
  text-decoration: underline;
}

.footer-bottom .sep {
  color: rgba(247, 244, 236, 0.3);
}

/* ---------- legal modal ---------- */

dialog.legal-modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: 640px;
  width: calc(100% - 48px);
  max-height: 82vh;
  color: var(--ink);
  background: var(--paper-raised);
}

dialog.legal-modal::backdrop {
  background: rgba(28, 26, 22, 0.55);
}

.legal-modal-inner {
  padding: 28px 30px 32px;
  overflow-y: auto;
  max-height: calc(82vh - 4px);
}

.legal-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--brass);
}

.legal-modal-head h2 {
  margin: 0;
  font-size: 24px;
}

.legal-modal-head button {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px;
}

.legal-section {
  margin-bottom: 20px;
}

.legal-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
}

.legal-section h3::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
}

.legal-section p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--graphite);
}

.legal-section a {
  color: var(--brass);
}

.optout-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 10px;
}

.optout-row input {
  margin-top: 3px;
}

.optout-row .optout-status {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 2px;
}

.optout-row .optout-hint {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- motion & small screens ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero-icon,
  .status-pill .dot {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 640px) {
  .header-cta {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 64px 0 64px;
  }
  section {
    padding: 56px 0;
  }
}
