/* Site de Chuchote. La page chuchote : une colonne, beaucoup de nuit,
   peu de choses mais exactes. Couleurs de l'app (android/app/src/messagerie/
   app/Theme.kt) : graphite, blanc, gris doux, et le bleu électrique sur une
   seule chose par écran. Ni dégradé, ni ombre, ni verre : les surfaces se
   distinguent par un pas de ton. */
:root {
  --fond: #0b0b0e;
  --surface: #18181c;
  --surface-haute: #26262c;
  --encre: #fff;
  --douce: #a8a8b0;
  --bleu: #3c48ea;
  --marge: 24px;
  --colonne: 560px;
  --t-titre: clamp(2rem, 5.4vw, 4.75rem);
  --t-section: clamp(1.75rem, 2.6vw, 2.25rem);
  --t-chapo: 1.1875rem;
  --t-texte: 1.0625rem;
  --t-petit: .875rem;
}
* { box-sizing: border-box; }
html { background: var(--fond); color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--encre); background: var(--fond);
  font: 400 var(--t-texte)/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--encre); outline-offset: 3px; }

/* Barre : le nom, deux liens. */
.barre {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 22px var(--marge); font-size: var(--t-petit);
}
.barre a { text-decoration: none; }
.barre .nom { font-size: var(--t-texte); font-weight: 600; }
.barre nav { display: flex; gap: 24px; }
.barre nav a { color: var(--douce); transition: color .2s; }
.barre nav a:hover, .barre nav a[aria-current="page"] { color: var(--encre); }

/* La colonne, au centre, du haut en bas. */
.colonne { width: min(var(--colonne), 100% - 2 * var(--marge)); margin-inline: auto; }
section { margin-top: clamp(112px, 14vw, 180px); }

h1 {
  font-size: var(--t-titre); font-weight: 500; line-height: 1.02; letter-spacing: -.035em;
  margin: 0 0 28px;
}
h2 { font-size: var(--t-section); font-weight: 500; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 20px; }
.chapo { font-size: var(--t-chapo); line-height: 1.5; }
.douce { color: var(--douce); }
p + p { margin-top: 14px; }

/* Ouverture : le haut de la colonne vers le tiers de l'écran. */
.ouverture { padding-top: clamp(64px, 18vh, 180px); }
.tirage { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.bouton {
  font: inherit; font-weight: 600; color: #fff; background: var(--bleu); border: 0; cursor: pointer;
  min-height: 44px; padding: 0 22px; border-radius: 999px; transition: transform .12s, filter .2s;
}
.bouton:hover { filter: brightness(1.12); }
.bouton:active { transform: scale(.96); }
.tirage output { font-size: var(--t-chapo); font-weight: 500; overflow-wrap: anywhere; }
.tirage .douce { flex-basis: 100%; font-size: var(--t-petit); }

/* Images : à la largeur de la colonne, coins nets, légende dessous. */
figure { margin: 0; }
figcaption { margin-top: 10px; font-size: var(--t-petit); color: var(--douce); }
.portrait .cadre { position: relative; aspect-ratio: 1000 / 490; overflow: hidden; background: var(--surface); }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ouverture .portrait { margin-top: 64px; }
.devise + p { margin-top: 28px; }

/* Sur le terrain : un panneau de l'app au milieu, ses notes dans les marges,
   chaque note au niveau de la ligne qu'elle explique. */
.terrain {
  display: grid; grid-template-columns: 1fr minmax(0, 380px) 1fr; column-gap: 48px;
  width: min(1080px, 100% - 2 * var(--marge)); margin-inline: auto;
}
.terrain h2 { grid-column: 1 / -1; width: min(var(--colonne), 100%); margin-inline: auto; }
.terrain .intro { grid-column: 1 / -1; width: min(var(--colonne), 100%); margin: 0 auto 40px; }
.note { padding: 14px 0; align-self: center; }
.note.g { grid-column: 1; text-align: right; }
.note.d { grid-column: 3; }
.p1 { grid-row: 3; } .p2 { grid-row: 4; } .p3 { grid-row: 5; }
.p4 { grid-row: 6; } .p5 { grid-row: 7; } .p6 { grid-row: 8; }
.note strong { display: block; font-weight: 500; }
.note span { display: block; color: var(--douce); font-size: .9375rem; }
.ligne {
  grid-column: 2; display: flex; align-items: center; gap: 12px; min-height: 68px;
  padding: 12px 18px; background: var(--surface);
}
.ligne.premiere { border-radius: 20px 20px 0 0; }
.ligne.derniere { border-radius: 0 0 20px 20px; }
.ligne + .ligne:not(.premiere) { background: var(--surface); }
.ligne div { flex: 1; }
.ligne b { font-weight: 500; display: block; }
.ligne small { color: var(--douce); font-size: var(--t-petit); display: block; }
.carre { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.c-bleu { background: #0a7af0; } .c-vert { background: #30b056; } .c-or { background: #d6a014; }
.c-rouge { background: #d6303a; } .c-gris { background: #6e6e76; } .c-violet { background: #9646eb; }
.inter { width: 46px; height: 28px; border-radius: 14px; background: #46464e; position: relative; flex: none; }
.inter::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; }
.inter.on { background: var(--bleu); }
.inter.on::after { left: 21px; }
.chevron { color: var(--douce); }

/* Ajouter quelqu'un : ce qu'on fait, ce qui revient. */
.echange + .echange { margin-top: 64px; }
.echange > p { font-size: 1.25rem; font-weight: 500; line-height: 1.35; }
.appel { margin-top: 16px; padding: 16px 18px; background: var(--surface); border-radius: 20px; display: flex; align-items: center; gap: 14px; }
.reponse { margin: 12px 0 0 56px; padding: 14px 18px; background: var(--surface-haute); border-radius: 20px; display: flex; align-items: center; gap: 12px; }
.reponse small { display: block; color: var(--douce); font-size: var(--t-petit); }
.champ { flex: 1; padding: 11px 16px; border-radius: 999px; background: var(--surface-haute); overflow-wrap: anywhere; }
.qr { width: 56px; height: 56px; border-radius: 6px; flex: none; }
.final { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.fil { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--surface); border-radius: 22px; }
.entete-fil { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.entete-fil small { display: block; color: var(--douce); font-size: .8125rem; }
.sphere { width: 40px; height: 40px; border-radius: 50%; background: #3a3a42; display: grid; place-items: center; font-weight: 600; flex: none; }
.bulle { max-width: 82%; padding: 8px 13px 6px; border-radius: 18px; background: #28282d; font-size: .9375rem; line-height: 1.4; }
.bulle.moi { align-self: flex-end; background: var(--bleu); }
.bulle small { display: block; text-align: right; font-size: .75rem; color: rgba(255, 255, 255, .78); margin-top: 2px; }
.service { align-self: center; font-size: .8125rem; padding: 2px 12px; border-radius: 999px; background: #24242a; color: var(--douce); }

/* Questions : du texte à lire, la question en tête de paragraphe. */
.questions figure { margin-bottom: 44px; }
.questions .reponses p + p { margin-top: 20px; }
.questions strong { font-weight: 600; }

/* Pied : une ligne, après un temps de nuit. */
.credits { margin-top: clamp(96px, 12vw, 140px); font-size: var(--t-petit); color: var(--douce); }
.pied {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: baseline;
  margin-top: 40px; padding: 0 var(--marge) 30px; font-size: var(--t-petit); color: var(--douce);
}
.pied nav { display: flex; gap: 24px; }
.pied nav a { color: var(--encre); }
.pied .fin { text-align: right; }

/* Pages de lecture (assistance, confidentialité). */
.lecture h1 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); }
.lecture.ouverture { padding-top: clamp(48px, 10vh, 112px); }
.lecture section { margin-top: 72px; }
.lecture ul { margin: 0; padding-left: 1.1em; }
.lecture li + li { margin-top: 10px; }

@media (max-width: 960px) {
  .terrain { grid-template-columns: minmax(0, 1fr); width: min(var(--colonne), 100% - 2 * var(--marge)); }
  .note.g, .note.d { grid-column: 1; text-align: left; padding: 10px 4px 26px; }
  .note strong { display: none; }
  .ligne { grid-column: 1; border-radius: 20px; }
  .p1, .p2, .p3, .p4, .p5, .p6 { grid-row: auto; }
  .ligne.premiere, .ligne.derniere { border-radius: 20px; }
  .final { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  :root { --marge: 20px; }
  .barre nav { gap: 16px; }
  .reponse { margin-left: 0; }
  .pied { grid-template-columns: 1fr; gap: 8px; }
  .pied .fin { text-align: left; }
}

/* Mouvement. Le portrait change de visage lentement, comme la lumière dans
   une pièce ; les parties de chaque section entrent l'une après l'autre au
   défilement. Rien n'est caché si le navigateur ne sait pas le faire. */
@media (prefers-reduced-motion: no-preference) {
  .portrait img { animation: visage 24s infinite both; }
  .portrait img:nth-child(2) { animation-delay: 8s; }
  .portrait img:nth-child(3) { animation-delay: 16s; }
  .portrait img:nth-child(n+2) { opacity: 0; }
  @keyframes visage { 0%, 100% { opacity: 0; } 7%, 33% { opacity: 1; } 40% { opacity: 0; } }
  .portrait img:first-child { animation-name: visage-premier; }
  @keyframes visage-premier { 0%, 33% { opacity: 1; } 40%, 93% { opacity: 0; } 100% { opacity: 1; } }
  .ouverture > * { animation: monte .7s cubic-bezier(.2, .8, .2, 1) both; }
  .ouverture > :nth-child(2) { animation-delay: .08s; }
  .ouverture > :nth-child(3) { animation-delay: .16s; }
  .ouverture > :nth-child(4) { animation-delay: .24s; }
  @keyframes monte { from { opacity: 0; transform: translateY(24px); } }
  .js [data-entree] {
    opacity: 0; transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.22, 1, .36, 1), transform .9s cubic-bezier(.22, 1, .36, 1);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js [data-entree].vu { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .portrait img:not(:first-child) { display: none; }
}
