/* ==========================================================
   Paradigmatiks · Le Labyrinthe au miroir
   Styles du fichier d'origine d'Antoine, repris tels quels.
   Cette page n'utilise pas main.css : le Labyrinthe occupe tout l'écran.
   ========================================================== */
html{box-sizing:border-box;padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px)}
/* Un seul écran, deux moitiés : le labyrinthe (canvas) et la voix (texte et choix). Sur téléphone, le labyrinthe passe au-dessus. */
:root {
  --ink: #0D0B09;      /* fond, nuit du labyrinthe */
  --ink-2: #171411;
  --line: #2A2520;
  --line-2: #3A332C;
  --edge: #6F6A62;     /* contour des choix et des champs */
  --paper: #F4EFE6;    /* texte principal, murs éclairés */
  --soft: #D8D0C3;
  --muted: #B3AA9C;
  --ver: #D9452B;      /* réservé à l'angle mort */
  --emb: #E5622E;
  --amb: #EC8A30;
  --gold: #E6AF47;     /* le fil du parcours */
  --sans: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.app {
  height: 100%;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.bar {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  max-width: 1180px;
  width: 100%;
  margin-inline: auto;
  font: 500 12px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); }
.brand::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.bar__r { display: inline-flex; align-items: center; gap: 18px; font-variant-numeric: tabular-nums; }
.back {
  background: none; border: 0; padding: 10px 0; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--muted);
}
.back:hover { color: var(--paper); }

.stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: center;
  max-width: 1180px;
  width: 100%;
  margin-inline: auto;
}
.viz { min-width: 0; min-height: 0; height: 100%; display: flex; align-items: center; justify-content: center; }
.viz canvas { display: block; -webkit-mask-image: radial-gradient(circle closest-side, #000 88%, transparent 100%); mask-image: radial-gradient(circle closest-side, #000 88%, transparent 100%); }
.panel { min-width: 0; max-height: 100%; overflow-y: auto; padding-block: 8px 28px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

.panel > * { opacity: 0; transform: translateY(10px); }
.panel.is-in > * { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
.panel.is-in > *:nth-child(2) { transition-delay: .06s; }
.panel.is-in > *:nth-child(3) { transition-delay: .12s; }
.panel.is-in > *:nth-child(4) { transition-delay: .18s; }
.panel.is-in > *:nth-child(n+5) { transition-delay: .24s; }
.panel.is-out > * { opacity: 0; transform: translateY(-6px); transition: opacity .25s ease, transform .25s ease; }

.eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  margin: 0 0 16px;
  font: 500 12px/1.3 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow b { font-weight: 500; color: var(--gold); }
.h1 {
  margin: 0 0 22px;
  font-weight: 800;
  font-size: clamp(40px, 6vw, 70px);
  line-height: .98;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.h2 {
  margin: 0 0 22px;
  font-weight: 800;
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.h1 em, .h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.015em; }
.lead { margin: 0 0 30px; max-width: 30em; font-size: 19px; color: var(--soft); text-wrap: pretty; }
.echo { margin: 0 0 14px; max-width: 26em; font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.25; color: var(--gold); text-wrap: pretty; }
.scene { margin: 0 0 16px; max-width: 34em; color: var(--soft); text-wrap: pretty; }
.prompt {
  margin: 0 0 24px;
  max-width: 19em;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(27px, 3.2vw, 38px);
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.prompt:focus { outline: none; }
.note { margin: 18px 0 0; font: 400 11px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 54px; padding: 0 28px;
  border: 1.5px solid var(--paper); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-weight: 600; font-size: 17px; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: #fff; border-color: #fff; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn--line { background: transparent; color: var(--paper); }
.btn--line:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: var(--emb); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.linkish { background: none; border: 0; padding: 12px 0; cursor: pointer; color: var(--soft); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); font-size: 15px; }
.linkish:hover { color: var(--paper); text-decoration-color: var(--paper); }

.opts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; max-width: 34em; }
.opt {
  width: 100%; min-height: 56px;
  display: flex; align-items: center; gap: 14px;
  padding: 13px 20px;
  border: 1.5px solid var(--edge); border-radius: 18px;
  background: transparent; color: var(--paper);
  font-weight: 500; font-size: 16.5px; line-height: 1.3; text-align: left; cursor: pointer;
  transition: border-color .18s, background .18s, color .18s;
}
.opt:hover { border-color: var(--paper); background: var(--ink-2); }
.opt svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linejoin: round; }
.opt[aria-pressed="true"] { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.opt[aria-pressed="true"] svg { stroke: var(--ink); }
.opts--dense { gap: 8px; }
.opts--dense .opt { min-height: 48px; padding-block: 9px; }
.opts--doors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opts--doors .opt { justify-content: center; text-align: center; padding-inline: 8px; border-radius: 999px; font-weight: 600; font-size: 17px; }

.field { display: grid; gap: 10px; margin: 26px 0 24px; max-width: 26em; }
.field label { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.15; text-wrap: balance; }
.field input {
  width: 100%; min-height: 54px; padding: 0 20px;
  border: 1.5px solid var(--edge); border-radius: 999px;
  background: transparent; color: var(--paper); font-size: 17px;
}
.field input::placeholder { color: var(--muted); opacity: .8; }
.field input:focus { border-color: var(--paper); outline: none; }
.err { margin: 0 0 16px; color: var(--amb); font-size: 15px; }

.reads { display: grid; gap: 16px; margin: 0 0 26px; max-width: 34em; }
.read { display: grid; gap: 5px; padding-left: 16px; border-left: 1.5px solid var(--line-2); }
.read span { font: 500 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.read p { margin: 0; color: var(--soft); text-wrap: pretty; }
.read span b { font-weight: 500; color: var(--amb); margin-left: 6px; }
.read--gold { border-left-color: var(--gold); }
.read--gold span { color: var(--gold); }
.read--blind { border-left-color: var(--ver); }
.read--blind span { color: var(--ver); }
.read--ecart { border-left-color: var(--amb); }
.read--ecart span { color: var(--amb); }

.take { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; margin: 0 0 30px; max-width: 34em; }
.thumb { flex: none; width: 104px; aspect-ratio: 595 / 842; border: 1px solid var(--line-2); border-radius: 6px; background: var(--ink-2); display: block; }
.take__txt { flex: 1 1 220px; min-width: 0; display: grid; gap: 14px; justify-items: start; }
.take__txt p { margin: 0; color: var(--soft); font-size: 15.5px; }
.take .btn { max-width: 100%; white-space: normal; text-align: left; padding-block: 10px; }
.gate { display: grid; gap: 10px; width: 100%; max-width: 26em; justify-items: start; }
.gate label { font: 500 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.gate input {
  width: 100%; min-height: 52px; padding: 0 20px;
  border: 1.5px solid var(--edge); border-radius: 999px;
  background: transparent; color: var(--paper); font-size: 16.5px;
}
.gate input::placeholder { color: var(--muted); opacity: .75; }
.gate input:focus { border-color: var(--paper); outline: none; }
.gate input[aria-invalid="true"] { border-color: var(--amb); }
.gate .err { margin: 0; font-size: 14.5px; color: var(--amb); }
.gate .consent { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.gate .demo { margin: 0; font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--amb); }
.note--cta { margin-top: 12px; }
.status { min-height: 1.4em; margin: 0; font-size: 14.5px; color: var(--muted); }

.enigma { margin: 0 0 22px; padding-top: 26px; border-top: 1px solid var(--line); max-width: 20em; font-family: var(--serif); font-style: italic; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; }
.enigma span { color: var(--muted); }
.fine { margin: 26px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-size: 14px; color: var(--muted); }

.pro { display: grid; gap: 22px; max-width: 36em; margin-top: 34px; }
.pro h3 { margin: 0 0 8px; font: 500 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.pro table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 15px; }
.pro th, .pro td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-weight: 400; color: var(--soft); }
.pro th { color: var(--muted); font-size: 13px; }
.pro td:last-child, .pro th:last-child { padding-right: 0; }
.pro td.num { font-variant-numeric: tabular-nums; color: var(--paper); }
.pro .flag { color: var(--ver); }
.pro ol { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; font-size: 14.5px; color: var(--soft); }
.pro ol b { font-weight: 500; color: var(--paper); }

@media (max-width: 720px) {
  body { font-size: 16px; }
  /* le texte prend la place dont il a besoin, le labyrinthe occupe le reste */
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(118px, 1fr) minmax(0, auto); gap: 6px; align-items: stretch; }
  .app[data-screen="result"] .stage, .app[data-screen="pro"] .stage { grid-template-rows: minmax(150px, 1fr) minmax(0, auto); }
  .panel { max-height: none; }
  .thumb { width: 76px; }
  .take { gap: 14px 16px; }
  .take__txt { flex-basis: 180px; }
  .take .btn { padding-inline: 20px; font-size: 16px; }
  .panel { padding-block: 6px 24px; }
  .lead { font-size: 17.5px; margin-bottom: 24px; }
  .opt { min-height: 52px; padding: 11px 16px; font-size: 16px; }
  .eyebrow { margin-bottom: 12px; }
  .prompt { margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .panel > *, .panel.is-in > *, .panel.is-out > * { opacity: 1; transform: none; transition: none; }
}

/* Sur le site : le nom en haut à gauche est un lien vers l'accueil */
a.brand { text-decoration: none; cursor: pointer; }
a.brand:hover { color: #fff; }
