/* Dictée Autonome — public website: the app's colours (ui/Theme.kt) and a font served by the site. */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson_hyperlegible_next.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #f6f7fc;      /* Papier */
  --surface: #ffffff;
  --ink: #1c2033;        /* Mine */
  --ink-secondary: #4b5066;
  --primary: #23338f;    /* Encre */
  --primary-soft: #dde2f7;
  --lines: #c7cdea;      /* Lignes */
  --margin: #c8303f;     /* Marge */
  --radius: 16px;
  --width: 960px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; color: var(--primary); text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.8rem); font-weight: 800; margin-top: 1.2em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--margin); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 16px; }

.top {
  max-width: var(--width);
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--primary); font-weight: 800; font-size: 1.2rem; text-decoration: none; }
.brand img { border-radius: 10px; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.top nav a { text-decoration: none; font-weight: 600; }

main { max-width: var(--width); margin: 0 auto; padding: 8px 16px 48px; }

.hero { display: grid; gap: 32px; align-items: center; padding: 28px 0 16px; }
@media (min-width: 800px) { .hero { grid-template-columns: 1.3fr 1fr; gap: 48px; } }
.hero-title { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.hero-title h1 { margin: 0; }
.hero-logo { flex: none; border-radius: 20px; }
.lead { font-size: 1.2rem; max-width: 36em; }
.small { font-size: 0.95rem; color: var(--ink-secondary); }
.actions { margin: 20px 0 10px; }
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px;
  background: var(--primary); color: #fff; font-weight: 700; text-decoration: none;
}
.button:hover { background: #101a5c; color: #fff; }
.button svg { fill: currentColor; }
.notice {
  display: inline-block;
  background: var(--primary-soft);
  border-radius: var(--radius);
  padding: 10px 16px;
}

/* The phone of the home page: the app's screens one after the other (css/demo.css, written by
   build.py). Without animation (reduced motion), the first screen and its caption stay. */
.demo { position: relative; margin: 0 auto; width: min(100%, 300px); text-align: center; }
.demo-phone { position: relative; padding: 9px; border-radius: 40px; background: var(--ink); box-shadow: 0 24px 48px -18px rgb(28 32 51 / 0.45); }
.demo-screen { position: relative; overflow: hidden; border-radius: 32px; aspect-ratio: 9 / 19.5; background: var(--paper); }
.demo-shot { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.demo-tap { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgb(35 51 143 / 0.28); box-shadow: 0 0 0 3px rgb(255 255 255 / 0.95), 0 0 0 6px rgb(35 51 143 / 0.4); opacity: 0; pointer-events: none; }
.demo figcaption { display: grid; margin: 16px auto 0; min-height: 3.2em; font-size: 0.98rem; }
.demo-caption { grid-area: 1 / 1; opacity: 0; }
.demo-shot.step-0, .demo-caption.step-0 { opacity: 1; }
.pause-case { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.demo-pause { position: absolute; top: -12px; right: -12px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--margin); color: #fff; fill: currentColor; cursor: pointer; }
.demo-pause span { grid-area: 1 / 1; display: grid; }
.icon-play, .pause-case:checked ~ .hero .icon-pause { display: none; }
.pause-case:checked ~ .hero .icon-play { display: grid; }
.pause-case:focus-visible ~ .hero .demo-pause { outline: 3px solid var(--primary); outline-offset: 3px; }
.pause-case:checked ~ .hero .anime { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .demo-pause { display: none; } }

.video { max-width: 44em; padding: 8px 0 8px; }
.video-frame { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 9; background: var(--ink); box-shadow: 0 18px 40px -22px rgb(28 32 51 / 0.5); }
.video-frame img, .video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-poster { display: block; height: 100%; }
/* Bottom right: the middle of the poster holds its title. */
.video-play { position: absolute; right: 4%; bottom: 7%; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--margin); color: #fff; fill: currentColor; box-shadow: 0 8px 24px -8px rgb(28 32 51 / 0.6); transition: transform 0.15s; }
.video-poster:hover .video-play, .video-poster:focus-visible .video-play { transform: scale(1.08); }
.video .small { margin-top: 10px; }

.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--surface);
  border: 1px solid var(--lines);
  border-left: 4px solid var(--margin);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.card p { margin: 0; }

.prose { max-width: 44em; }
.classes { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 1em; padding: 0; list-style: none; }
.prose .classes { padding: 0; }
.classes a { display: inline-block; min-width: 3.4em; padding: 8px 16px; border: 2px solid var(--primary-soft); border-radius: 999px; background: var(--surface); font-weight: 700; text-align: center; text-decoration: none; }
.classes a:hover { border-color: var(--primary); }
.classes a[aria-current="page"] { border-color: var(--primary); background: var(--primary); color: #fff; }
.par-classe { padding-top: 8px; }
.classe h3 { margin-top: 1.1em; }
.question h2 { font-size: 1.25rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.legal h2 { font-size: 1.35rem; }
.legal hr { border: 0; border-top: 1px solid var(--lines); margin: 1.5em 0; }
blockquote { margin: 0 0 1em; padding: 4px 16px; border-left: 4px solid var(--lines); }

.bottom {
  border-top: 1px solid var(--lines);
  background: var(--surface);
  padding: 24px 16px 32px;
  text-align: center;
  color: var(--ink-secondary);
  font-size: 0.95rem;
}
.bottom-classes { font-size: 0.95rem; }
.bottom nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin-bottom: 10px; }
.bottom p { max-width: var(--width); margin: 0 auto; }
