/* Enquête Mindlet — DA « cahier vivant » de la vitrine : une feuille de cahier posée sur
   du papier quadrillé, trait d'encre de 2 px, ombre dure, bouton menthe qui s'enfonce.
   Polices servies depuis /fonts (copiées de apps/www au build), aucune ressource tierce. */
@font-face {
  font-family: "LTSaeada";
  src: url("/fonts/LTSaeada-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "LTSaeada";
  src: url("/fonts/LTSaeada-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito-400-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito-600-latin-ext.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito-700-latin-ext.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lexend";
  src: url("/fonts/Lexend-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lexend";
  src: url("/fonts/Lexend-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/Atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/Atkinson-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "OpenDyslexic";
  src: url("/fonts/OpenDyslexic-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "OpenDyslexic";
  src: url("/fonts/OpenDyslexic-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Mise en page : une feuille de cahier posée sur du papier quadrillé. Une question par
   feuille, trait d'encre de 2 px, ombre dure, bouton menthe qui s'enfonce. */
:root {
  --paper: #fff8f0;
  --paper-mid: #fff0db;
  --surface: #ffffff;
  --ink: #1a1a2e;
  --ink-2: #3d3d5c;
  --ink-3: #63637a;
  --line: #1a1a2e;
  --line-soft: rgba(26, 26, 46, 0.16);
  --shadow: #1a1a2e;
  --grid: rgba(155, 117, 255, 0.1);
  --mint: #1fdb99;
  --mint-ink: #08241a;
  --mint-text: #0a7a55;
  --hl: #9ef0cc;
  --purple: #9b75ff;
  --purple-ink: #160d33;
  --purple-soft: #ede8ff;
  --yellow: #fbbf24;
  --yellow-ink: #2b1d00;
  --ok-bg: #c8f5df;
  --ok-ink: #04412a;
  --no-bg: #ffe1dc;
  --no-ink: #7a0d16;
  --font-display: "LTSaeada", "Quicksand", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14141c;
    --paper-mid: #1c1c28;
    --surface: #1e1e2a;
    --ink: #f2f3f7;
    --ink-2: #cbcdd8;
    --ink-3: #9698ab;
    --line: #9a9bb3;
    --line-soft: rgba(255, 255, 255, 0.14);
    --shadow: #050508;
    --grid: rgba(155, 117, 255, 0.12);
    --mint-text: #36e7ac;
    --hl: rgba(31, 219, 153, 0.32);
    --purple-soft: #201a33;
    --ok-bg: #0f3a2b;
    --ok-ink: #c8f5df;
    --no-bg: #3a1418;
    --no-ink: #ffd0c9;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #14141c;
  --paper-mid: #1c1c28;
  --surface: #1e1e2a;
  --ink: #f2f3f7;
  --ink-2: #cbcdd8;
  --ink-3: #9698ab;
  --line: #9a9bb3;
  --line-soft: rgba(255, 255, 255, 0.14);
  --shadow: #050508;
  --grid: rgba(155, 117, 255, 0.12);
  --mint-text: #36e7ac;
  --hl: rgba(31, 219, 153, 0.32);
  --purple-soft: #201a33;
  --ok-bg: #0f3a2b;
  --ok-ink: #c8f5df;
  --no-bg: #3a1418;
  --no-ink: #ffd0c9;
  color-scheme: dark;
}

/* Réglages de confort : ils re-pointent les jetons, rien d'autre */
:root[data-font="b"] {
  --font-display: "Lexend", system-ui, sans-serif;
  --font-body: "Lexend", system-ui, sans-serif;
}
:root[data-font="c"] {
  --font-display: "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;
}
:root[data-font="d"] {
  --font-display: "OpenDyslexic", system-ui, sans-serif;
  --font-body: "OpenDyslexic", system-ui, sans-serif;
}
:root[data-size="2"] {
  font-size: 112.5%;
}
:root[data-size="3"] {
  font-size: 125%;
}
:root[data-space="wide"] body {
  line-height: 1.9;
  letter-spacing: 0.03em;
  word-spacing: 0.16em;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  padding-block: 20px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
p {
  margin: 0;
}
a {
  color: var(--mint-text);
  text-underline-offset: 3px;
}
button {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--mint) 45%, transparent);
}
h2[tabindex="-1"]:focus {
  outline: none;
  box-shadow: none;
}
.hl {
  background: linear-gradient(transparent 55%, var(--hl) 55%);
  padding-inline: 0.1em;
}
.wrap {
  max-width: 44rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* En-tête */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.wordmark {
  font: 700 1.5rem/1 var(--font-display);
  letter-spacing: -0.03em;
}
.wordmark i {
  font-style: normal;
  color: var(--mint-text);
}
.seg {
  display: inline-flex;
  border: 2px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}
.seg button {
  border: 0;
  background: transparent;
  padding: 10px 14px;
  min-height: 44px;
  font: 600 0.92rem/1.1 var(--font-display);
  cursor: pointer;
}
.seg button + button {
  border-left: 2px solid var(--line);
}
.seg button[aria-pressed="true"] {
  background: var(--mint);
  color: var(--mint-ink);
}
.iconbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font: 600 0.92rem/1.1 var(--font-display);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--shadow);
  transition:
    translate 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}
.iconbtn:active {
  translate: 2px 2px;
  box-shadow: 1px 1px 0 var(--shadow);
}
.iconbtn svg,
.btn svg {
  width: 1.2em;
  height: 1.2em;
  flex: none;
}
.iconbtn[aria-pressed="true"],
.iconbtn[aria-expanded="true"] {
  background: var(--purple-soft);
}

/* Panneau de confort */
.comfort {
  border: 2px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 14px 20px;
}
.comfort fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.comfort legend {
  font: 600 0.9rem/1.2 var(--font-display);
  padding: 0;
  margin-bottom: 8px;
}
.comfort .seg button {
  padding-inline: 12px;
}

/* La feuille */
.sheet {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 24px;
  box-shadow: 5px 5px 0 var(--shadow);
  padding: clamp(20px, 5vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.progress span {
  height: 8px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--mint);
  border-radius: 999px;
  transition: width 0.42s var(--ease);
}
.eyebrow {
  font: 600 0.8rem/1.2 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.sheet h1 {
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 700;
}
.sheet h2 {
  font-size: clamp(1.4rem, 4.6vw, 1.85rem);
  font-weight: 600;
}
.lead {
  font-size: 1.12rem;
  color: var(--ink-2);
  max-width: 34rem;
}
.help {
  color: var(--ink-2);
  max-width: 34rem;
}
.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.facts li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.facts svg {
  width: 1.4em;
  height: 1.4em;
  flex: none;
  margin-top: 0.1em;
  color: var(--mint-text);
}
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.tools .iconbtn {
  box-shadow: none;
  border-color: var(--line-soft);
  font-size: 0.86rem;
  min-height: 40px;
  padding: 6px 12px;
}
.note {
  font-size: 0.9rem;
  color: var(--ink-3);
}

/* Boutons */
.nav {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 22px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  font: 600 1.05rem/1.1 var(--font-display);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--shadow);
  transition:
    translate 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}
.btn:hover {
  translate: -1px -1px;
  box-shadow: 4px 4px 0 var(--shadow);
}
.btn:active {
  translate: 2px 2px;
  box-shadow: 1px 1px 0 var(--shadow);
}
.btn.primary {
  background: var(--mint);
  color: var(--mint-ink);
  margin-left: auto;
}
.btn.quiet {
  box-shadow: none;
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
  padding-inline: 10px;
}
.btn.quiet:hover,
.btn.quiet:active {
  translate: none;
  box-shadow: none;
  text-decoration: underline;
}

/* Options */
.opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.opts.chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr));
}
.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  transition:
    translate 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    background-color 0.18s var(--ease);
}
.opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.opt .mark {
  flex: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  display: grid;
  place-items: center;
}
.opt input[type="radio"] ~ .mark {
  border-radius: 50%;
}
.opt .mark::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2.5px solid var(--mint-ink);
  border-bottom: 2.5px solid var(--mint-ink);
  rotate: -45deg;
  translate: 0 -1px;
  opacity: 0;
}
.opt:has(input:checked) {
  background: color-mix(in oklab, var(--mint) 20%, var(--surface));
  box-shadow: 3px 3px 0 var(--shadow);
  translate: -1px -1px;
}
.opt:has(input:checked) .mark {
  background: var(--mint);
}
.opt:has(input:checked) .mark::after {
  opacity: 1;
}
.opt:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--mint) 45%, transparent);
}
.opt:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}
.opts.chips .opt {
  justify-content: center;
  text-align: center;
  font-weight: 700;
}
.opts.chips .mark {
  display: none;
}
.count {
  font: 600 0.9rem/1.2 var(--font-display);
  color: var(--ink-3);
}

/* Grille de fréquence */
.rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.row {
  border: 0;
  margin: 0;
  padding: 0 0 14px;
  border-bottom: 2px dotted var(--line-soft);
  min-width: 0;
}
.row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.row legend {
  padding: 0;
  margin-bottom: 8px;
  font-weight: 700;
}
.pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5.2em, 1fr));
  gap: 6px;
}
.pill {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 6px 4px;
  border: 2px solid var(--line-soft);
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.pill input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.pill:has(input:checked) {
  background: var(--mint);
  color: var(--mint-ink);
  border-color: var(--line);
}
.pill:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Curseur */
.slider {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.slider output {
  font: 700 clamp(2rem, 8vw, 2.8rem)/1 var(--font-display);
  font-variant-numeric: tabular-nums;
}
.slider output small {
  font: 600 1rem/1 var(--font-display);
  color: var(--ink-3);
}
.slider input {
  width: 100%;
  height: 44px;
  accent-color: var(--mint-text);
  cursor: pointer;
}
.ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--ink-3);
}

/* Réponse libre */
textarea,
input[type="email"] {
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
textarea {
  min-height: 8.5rem;
  resize: vertical;
  line-height: inherit;
}
.partial {
  min-height: 1.4em;
  color: var(--ink-3);
}
.mic[aria-pressed="true"] {
  background: var(--no-bg);
  color: var(--no-ink);
  border-color: var(--line);
}

/* L'essai : trois cartes à jouer */
.course {
  background: var(--paper-mid);
  border: 2px solid var(--line-soft);
  border-radius: 16px;
  padding: 16px;
}
.course strong {
  background: linear-gradient(transparent 55%, var(--hl) 55%);
  font-weight: 700;
}
.card {
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  background: var(--surface);
  box-shadow: 5px 5px 0 var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card .kind {
  align-self: flex-start;
  font: 600 0.78rem/1.1 var(--font-display);
  background: var(--purple);
  color: var(--purple-ink);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
}
.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
}
.verso {
  background: var(--ok-bg);
  color: var(--ok-ink);
  border-radius: 14px;
  padding: 14px;
  font-weight: 700;
}
.answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.answers button {
  text-align: left;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
}
.answers button[data-state="ok"] {
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.answers button[data-state="no"] {
  background: var(--no-bg);
  color: var(--no-ink);
}
.answers button:disabled {
  cursor: default;
}
.dots {
  display: flex;
  gap: 6px;
}
.dots i {
  width: 28px;
  height: 6px;
  border-radius: 999px;
  background: var(--line-soft);
}
.dots i.on {
  background: var(--purple);
}

/* Fin */
.summary {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.summary th,
.summary td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--line-soft);
}
.summary th {
  width: 38%;
  font-weight: 700;
  color: var(--ink-2);
}
details {
  border: 2px solid var(--line-soft);
  border-radius: 16px;
  padding: 12px 16px;
}
summary {
  cursor: pointer;
  font: 600 1rem/1.3 var(--font-display);
  min-height: 28px;
}
details[open] summary {
  margin-bottom: 10px;
}
.optin {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--paper-mid);
  border-radius: 16px;
  padding: 16px;
}
.optin label {
  font-weight: 700;
}

@media (max-width: 520px) {
  .nav .btn.primary {
    flex: 1;
  }
  .seg button {
    padding-inline: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Ce que le squelette d'un artifact apportait, et qu'une vraie page doit dire elle-même */
html {
  -webkit-text-size-adjust: 100%;
}
img {
  max-width: 100%;
}

.btn.purple {
  background: var(--purple);
  color: var(--purple-ink);
}
.alerte {
  background: var(--no-bg);
  color: var(--no-ink);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 700;
}
.pied {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--ink-3);
}
.pied a {
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.texte {
  gap: 14px;
}
.texte h1 {
  font-size: clamp(1.8rem, 6vw, 2.5rem);
}
.texte h2 {
  font-size: 1.25rem;
  margin-top: 10px;
}
.texte p,
.texte li {
  max-width: 38rem;
}
.texte ul {
  margin: 0;
  padding-left: 1.3em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
