/* Noir & blanc, un peu vintage : papier, encre, machine à écrire. */
:root {
  --paper: #111111;
  --card: #181818;
  --ink: #f2efe9;
  --soft: #b8b5ae;
  --muted: #85827c;
  --line: #f2efe9;
  --display: "Bodoni 72", "Bodoni MT", Didot, "Didot LT STD", "Playfair Display", Georgia, serif;
  --serif: Georgia, "Times New Roman", Times, serif;
  --type: "American Typewriter", "Courier Prime", "Courier New", Courier, monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.75 var(--serif);
  -webkit-font-smoothing: antialiased;
  text-align: center;
}

/* Cadre fin, façon vieille affiche */
body::before {
  content: "";
  position: fixed;
  inset: 12px;
  border: 1px solid var(--line);
  pointer-events: none;
  z-index: 5;
}

h1, h2, p { margin: 0; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.emoji, .btn, .response { filter: grayscale(1); }

/* Sections */
.screen {
  max-width: 560px;
  margin: 0 auto;
  padding: 6rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

/* Petit ornement entre les sections */
.screen:not(.hero)::before {
  content: "— ✦ —";
  font-family: var(--serif);
  font-size: .85rem;
  letter-spacing: .3em;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  justify-content: center;
}

.masthead {
  font: .72rem var(--type);
  text-transform: uppercase;
  letter-spacing: .35em;
  padding: .45rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}

h1 {
  font: 400 clamp(3.25rem, 11vw, 5.5rem)/1 var(--display);
  letter-spacing: -.01em;
}

h2 {
  font: 400 clamp(1.8rem, 5vw, 2.4rem)/1.2 var(--display);
  margin-bottom: .25rem;
}

/* Le "e" d'Alexie et le "i" de Mahdi */
.accent {
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .14em;
}

.tiny {
  margin-top: -.5rem;
  font: .8rem var(--type);
  color: var(--muted);
}
.lead { font-size: clamp(1.25rem, 3vw, 1.5rem); font-style: italic; }
.muted { color: var(--soft); }
.italic { font-style: italic; font-size: 1.1rem; }
.big { font: 400 clamp(1.45rem, 4vw, 1.9rem)/1.4 var(--display); }
.recap { padding-top: 3rem; }
.invite .muted { margin-bottom: 1.25rem; font-style: italic; }

/* Boutons : encre pleine, survol inversé avec ombre imprimée */
.btn {
  margin-top: 1rem;
  padding: .9rem 1.5rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font: .8rem var(--type);
  text-transform: uppercase;
  letter-spacing: .14em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--card);
  color: var(--ink);
}
.btn:active { transform: none; box-shadow: none; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn.is-chosen { box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }

/* Diagnostic : fiche tapée à la machine */
.terminal {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  text-align: left;
}
.terminal__body {
  padding: 1.75rem;
  font: .9rem/1.9 var(--type);
}
.t-title {
  font-weight: 700;
  letter-spacing: .2em;
  padding-bottom: .5rem;
  margin-bottom: .9rem;
  border-bottom: 3px double var(--ink);
}
.t-label { text-transform: uppercase; font-size: .78em; letter-spacing: .08em; color: var(--soft); }
.t-solution .t-value { background: var(--ink); color: var(--paper); padding: 0 .35em; }
.t-note {
  color: var(--muted);
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px dashed var(--muted);
  font-style: italic;
}
.t-cursor {
  display: inline-block;
  width: .5em; height: 1.05em;
  background: var(--ink);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Invitation */
.invite { padding-bottom: 4rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.actions .btn { margin-top: .5rem; }
.response { min-height: 3.5rem; max-width: 26rem; font-style: italic; }
.response:not(:empty) { animation: fadeUp .5s var(--ease) both; }
.response small { display: block; margin-top: .4rem; font: normal .8rem var(--type); color: var(--muted); }

footer {
  max-width: 560px;
  margin: 0 auto;
  padding: 2.5rem 1.75rem 4rem;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-style: italic;
}
.signature {
  font: 400 1.6rem var(--display);
  font-style: normal;
  color: var(--ink);
  margin-bottom: .5rem;
}

/* Apparition */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  body::before { inset: 8px; }
  .screen { padding: 4.5rem 1.5rem; }
  .terminal__body { font-size: .8rem; padding: 1.25rem; }
  .actions { flex-direction: column; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
