/* Readme : « sans couleur », sa propre paire de gris (#EDEDEA / #0B0B0B) ; le nom en Bricolage 800.
   Accueil : /_shared/app.css, puis ses parties plus bas ; en-tête, pied de page et pages de texte : /_shared/doc.css. */
:root {
  --clair: #EDEDEA; --sombre: #0B0B0B; --accent: var(--ink);
  --trait: color-mix(in oklab, var(--ink) 34%, var(--bg));
  --cadre: #161615;   /* le cadre des téléphones, neutre et sans marque, le même en clair et en sombre */
}
/* L'anneau de focus est à l'encre, comme le texte : plus épais pour s'en détacher. */
:focus-visible { outline-width: 3px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* L'en-tête : à gauche « Helianthe » sur l'accueil, « Readme » sur /cgu et /assistance (qui ont « Helianthe » dans le
   menu). Quand le menu ne tient plus à côté, sur téléphone, il passe dessous, sur sa propre ligne. */
.top { flex-wrap: wrap; row-gap: 10px; }

/* Le haut de page : la phrase, l'essai, la sortie. */
.intro .actions { margin: 10px 0 18px; }
.cta { display: inline-block; padding: 14px 22px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 600 16px/1 var(--f-body); text-decoration: none; transition: background-color .2s; }
.cta:hover { background: color-mix(in oklab, var(--ink) 84%, var(--bg)); }

/* Sous le haut de page, des parties séparées par de l'air : le texte d'un côté, les captures de l'autre. */
.partie { position: relative; z-index: 1; max-width: 76rem; margin: 0 auto; padding: clamp(96px, 12vw, 176px) var(--gutter) 0; }
.partie h2 { font-size: clamp(38px, 5.2vw, 68px); font-weight: 800; margin-bottom: 22px; text-wrap: balance; }
.partie p { margin: 0 0 14px; max-width: 34rem; font-size: clamp(17px, 1.35vw, 19px); text-wrap: pretty; }
.partie .lien { margin-top: 26px; font-weight: 500; }
.points { list-style: none; margin: 10px 0 0; padding: 0; max-width: 34rem; }
.points li { padding: 14px 0; border-top: 1px solid var(--line); font-size: clamp(17px, 1.35vw, 19px); text-wrap: pretty; }
.points li:last-child { border-bottom: 1px solid var(--line); }
.duo { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) {
  .duo { grid-template-columns: minmax(0, 1fr) auto; gap: clamp(48px, 6vw, 112px); }
  .duo.inverse .texte { order: 2; }
}

/* Un choix en pastilles (le Bloc de l'essai) : des boutons radio, au clavier comme à la souris. */
.choix { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 26px; }
.choix-titre { margin-right: 6px; font: 500 12px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.choix label { position: relative; display: block; }
.choix input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choix label span { display: block; padding: 11px 17px; border: 1px solid var(--line); border-radius: 999px; font: 500 15px/1 var(--f-body); color: var(--muted); transition: background-color .2s, border-color .2s, color .2s; }
.choix label:hover span { color: var(--ink); border-color: var(--trait); }
.choix input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.choix input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }

/* L'essai. Sans JavaScript (ou en mouvement réduit), l'extrait se lit tel quel, en colonne. Vivant (essai.js), il
   passe dans un écran de l'app et se lit au doigt, à la souris ou à la barre d'espace ; le texte reste lisible par
   les lecteurs d'écran. L'écran tient dans la fenêtre, avec l'indice dessous. */
.essai .note { color: var(--muted); font-size: 16px; }
.essai:not(.vivant) .extrait { margin-top: 30px; max-width: 36rem; }
.essai:not(.vivant) .extrait p { font-size: 17px; }
.essai.vivant .extrait { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.essai.vivant .liseuse {
  position: relative; margin: 40px auto 0;
  width: min(100%, 21rem, max(13rem, calc((100vh - 170px) * 393 / 852)));
  width: min(100%, 21rem, max(13rem, calc((100svh - 170px) * 393 / 852)));
}
@media (min-width: 900px) {
  /* La colonne de l'écran a une largeur à elle : son contenu, tout en position absolue, n'en donne aucune. */
  .essai.vivant { display: grid; grid-template-columns: minmax(0, 1fr) min(21rem, 38vw); gap: clamp(48px, 6vw, 112px); align-items: center; }
  .essai.vivant .liseuse {
    margin: 0; justify-self: center;
    width: min(100%, max(13rem, calc((100vh - 170px) * 393 / 852)));
    width: min(100%, max(13rem, calc((100svh - 170px) * 393 / 852)));
  }
}

/* Un écran de l'app (essai.js) : un iPhone (393 × 852) dans un cadre neutre, au fond noir de l'app par défaut quel
   que soit le thème de la page, avec ses gris de lecture et de libellé (src/ui/theme.ts). */
.telephone { position: relative; display: block; aspect-ratio: 393 / 852; border: 8px solid var(--cadre); border-radius: 44px; overflow: hidden; background: #0B0B0B; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -34px rgb(0 0 0 / .6); cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.telephone:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.ecran { --mot: #FFFFFF; --contexte: #6E6E6E; --attente: #424242; --libelle: #8A8A8A; --rail: #3A3A3A; position: absolute; inset: 0; background: #0B0B0B url("/_shared/grain.png") 0 0 / 256px 256px; }
.champ { position: absolute; inset: 0; overflow: hidden; }
.colonne { position: absolute; top: 0; font-family: var(--f-head); color: var(--contexte); overflow-wrap: normal; hyphens: none; }
.colonne p { margin: 0; }
.colonne .suivante { color: var(--attente); }
.colonne .lu { color: var(--mot); transition: color 80ms; }
.colonne .cache { visibility: hidden; }
.colonne .mot { display: flex; align-items: baseline; justify-content: center; white-space: nowrap; }
.mesure { visibility: hidden; overflow: hidden; }
/* Dans l'écran, rien des paragraphes de la page : les lignes se coupent comme dans l'app, au plus tôt. */
.ecran p { max-width: none; margin: 0; text-wrap: wrap; }
/* Le bas de l'écran : « N min avant la fin » à l'arrêt, du côté opposé au pouce, et la barre du chapitre. */
.temps { position: absolute; margin: 0; white-space: nowrap; font-family: var(--f-body); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--libelle); opacity: 0; transition: opacity 90ms; }
.temps.vu { opacity: 1; transition-duration: 220ms; }
.barre { position: absolute; overflow: hidden; background: var(--rail); }
.barre i { position: absolute; inset: 0; background: var(--mot); transform: scaleX(0); transform-origin: left; transition: transform 200ms linear; }
/* Sous l'écran (ou les trois), ce que fait le doigt. */
.partie .indice { max-width: none; margin: 18px 0 0; text-align: center; font: 500 12px/1.4 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Le geste, en six schémas : l'écran, l'arc du pouce (centré là où pivote sa base, hors de l'écran), le pouce. */
.gestes { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 40px clamp(24px, 3vw, 48px); }
.gestes li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0 20px; }
.gestes svg { grid-row: span 2; width: 100%; height: auto; }
.gestes h3 { font-size: 21px; margin: 8px 0 6px; }
.gestes p { margin: 0; font-size: 16px; color: var(--muted); }
.geste .aparte { margin-top: 40px; color: var(--muted); }
.g-tel { fill: none; stroke: var(--trait); stroke-width: 1.5; }
.g-texte { fill: none; stroke: var(--line); stroke-width: 4; stroke-linecap: round; }
.g-arc { fill: none; stroke: var(--trait); stroke-width: 1.5; stroke-dasharray: .5 4.5; stroke-linecap: round; }
.g-contact { fill: none; stroke: var(--trait); stroke-width: 1.5; }
.g-pouce { fill: var(--ink); }
.g-trace { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-leve { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 2.5 2.5; }
.g-piste { fill: none; stroke: var(--line); stroke-width: 3; }
.g-anneau { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }

/* Les trois façons, côte à côte sur une même lecture (essai.js) ; sans JavaScript, ou en mouvement réduit, leurs
   captures. Les noms s'alignent sous les écrans. */
.trio { width: max-content; max-width: 100%; margin-top: 36px; }
.trio-ecrans, .trio-noms { display: grid; grid-template-columns: repeat(3, 15rem); gap: clamp(24px, 3vw, 44px); }
.trio-ecrans { border-radius: 36px; }
.trio-ecrans:focus-visible { outline: 3px solid var(--ink); outline-offset: 10px; }
.trio .tel, .trio .telephone { width: 100%; border-width: 7px; border-radius: 36px; box-shadow: 0 0 0 1px var(--line), 0 24px 48px -28px rgb(0 0 0 / .55); }
.trio-noms { list-style: none; margin: 18px 0 0; padding: 0; }
.trio-noms li { font-size: 15px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.trio-noms b { display: block; margin-bottom: 3px; color: var(--ink); font: 700 20px/1.2 var(--f-head); letter-spacing: -.02em; }
.partie .trio .indice { margin-top: 26px; }
@media (max-width: 899px) {
  .trio { width: auto; }
  .trio-ecrans, .trio-noms { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 2.6vw, 24px); }
  .trio-ecrans, .trio .tel, .trio .telephone { border-radius: 26px; }
  .trio .tel, .trio .telephone { border-width: 5px; }
  .trio-noms li { font-size: 13px; }
  .trio-noms b { font-size: 16px; }
}
@media (max-width: 599px) {
  .trio-ecrans, .trio .tel, .trio .telephone { border-radius: 18px; }
  .trio .tel, .trio .telephone { border-width: 4px; }
}

/* Les captures de l'app, sur iPhone, dans un cadre de téléphone neutre. Sur téléphone, elles défilent de côté. */
.captures { display: flex; flex-wrap: wrap; gap: clamp(24px, 3vw, 44px); margin-top: 36px; }
.duo .captures { margin-top: 0; justify-content: center; }
.capture { margin: 0; width: min-content; }
.tel { display: block; flex: none; width: 15rem; border: 7px solid var(--cadre); border-radius: 36px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line), 0 24px 48px -28px rgb(0 0 0 / .55); }
.tel img { display: block; width: 100%; height: auto; }
.capture figcaption { margin-top: 16px; font-size: 15px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.capture figcaption b { display: block; margin-bottom: 3px; color: var(--ink); font: 700 20px/1.2 var(--f-head); letter-spacing: -.02em; }
@media (max-width: 899px) {
  .captures, .duo .captures { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 16px; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .captures::-webkit-scrollbar { display: none; }
  .capture { flex: none; scroll-snap-align: start; }
  .tel { width: min(58vw, 15rem); border-width: 6px; border-radius: 30px; }
}

/* La fiche du livre de la Bibliothèque : son titre, son auteur, ses crédits et ses pays. */
.fiche { max-width: 34rem; margin: 26px 0 24px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; }
.fiche .livre { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 16px; }
.fiche .livre cite { font: 800 44px/1 var(--f-head); letter-spacing: -.03em; }
.fiche .livre span { font-weight: 500; }
.fiche dl { display: grid; gap: 8px; margin: 0; }
.fiche dl div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 12px; }
.fiche dt { color: var(--muted); font-size: 15px; }
.fiche dd { margin: 0; font-size: 15px; }

.fin h2 { margin-bottom: 26px; }
