/*
 * ═══════════════════════════════════════════════════════════════════════════════════════════════
 * NOCLIA — SITE OFFICIEL
 * Feuille unique, aucune dépendance, aucune police distante.
 * ═══════════════════════════════════════════════════════════════════════════════════════════════
 *
 * POURQUOI AUCUNE POLICE GOOGLE — un webfont distant est une requête vers un tiers sur des pages
 * qui expliquent précisément qu'on ne dépose rien chez des tiers. La pile système est déjà
 * élégante sur iPhone (SF Pro / New York) et coûte zéro octet.
 *
 * LES COULEURS SONT CELLES DE L'APPLICATION — copiées depuis `noclia/src/ui/theme/palette.ts`.
 * Deux dessins pour une identité divergeraient ; ceux-ci sont volontairement identiques.
 */

:root {
  --nuit: #0b0e28;
  --nuit-haute: #151a3d;
  --surface: #161b3e;
  --surface-bord: rgba(186, 183, 245, 0.14);
  --surface-bord-fort: rgba(186, 183, 245, 0.24);

  --texte: #f2f1fb;
  --texte-doux: #c9c7d6;
  --texte-discret: #b8b4d8;

  --lavande: #c9c4f7;
  --lavande-vive: #d6d2fb;
  --pervenche: #b3acef;
  --champagne: #efd09b;

  --mesure: 42rem;
  --rythme: 1.7;
}

/* ───────────────────────────────────────────────────────────────────────────────────────────── */
/* Base                                                                                          */
/* ───────────────────────────────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--nuit);
  /* Un seul dégradé, très haut, très bas en opacité. Aucun halo diffus. */
  background-image: radial-gradient(120% 70% at 50% -10%, var(--nuit-haute) 0%, var(--nuit) 62%);
  background-attachment: fixed;
  color: var(--texte);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: var(--rythme);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: var(--mesure);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

@media (min-width: 40rem) {
  .page {
    padding: 3.5rem 2rem 6rem;
  }
}

/* ───────────────────────────────────────────────────────────────────────────────────────────── */
/* Typographie                                                                                   */
/* ───────────────────────────────────────────────────────────────────────────────────────────── */

h1,
h2,
h3 {
  font-family: 'New York', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--texte);
  text-wrap: balance;
}

h1 {
  font-size: 1.9rem;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.28rem;
  margin: 2.75rem 0 0.6rem;
  color: var(--lavande-vive);
}

h3 {
  font-size: 1.05rem;
  margin: 1.75rem 0 0.4rem;
  color: var(--lavande);
}

@media (min-width: 40rem) {
  h1 {
    font-size: 2.4rem;
  }
}

p {
  margin: 0 0 1.05rem;
  color: var(--texte-doux);
}

strong {
  color: var(--texte);
  font-weight: 600;
}

ul {
  margin: 0 0 1.05rem;
  padding-left: 1.15rem;
  color: var(--texte-doux);
}

li {
  margin-bottom: 0.4rem;
}

li::marker {
  color: var(--pervenche);
}

/* ───────────────────────────────────────────────────────────────────────────────────────────── */
/* Liens — toujours soulignés, jamais devinables à la seule couleur                              */
/* ───────────────────────────────────────────────────────────────────────────────────────────── */

a {
  color: var(--lavande-vive);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(214, 210, 251, 0.45);
}

a:hover,
a:focus-visible {
  color: #fff;
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--champagne);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ───────────────────────────────────────────────────────────────────────────────────────────── */
/* En-tête                                                                                       */
/* ───────────────────────────────────────────────────────────────────────────────────────────── */

.marque {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 2.5rem;
  text-decoration: none;
  color: inherit;
  width: fit-content;
}

.marque img {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: block;
}

.marque span {
  font-family: 'New York', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.marque:hover span,
.marque:focus-visible span {
  color: var(--lavande-vive);
}

/* ───────────────────────────────────────────────────────────────────────────────────────────── */
/* Accueil                                                                                       */
/* ───────────────────────────────────────────────────────────────────────────────────────────── */

.heros {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.heros img {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  margin-bottom: 1.4rem;
}

.accroche {
  font-size: 1.12rem;
  color: var(--texte-discret);
  max-width: 30rem;
  margin: 0 auto 2.25rem;
}

.carte {
  background: var(--surface);
  border: 1px solid var(--surface-bord);
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  margin: 0 0 1rem;
}

.carte h3 {
  margin-top: 0;
}

.carte p:last-child {
  margin-bottom: 0;
}

/* Le seul or de la page : un filet, pas une surface. */
.carte--premium {
  border-color: rgba(239, 208, 155, 0.28);
}

.carte--premium h3 {
  color: var(--champagne);
}

.liens-legaux {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--surface-bord);
}

/* ───────────────────────────────────────────────────────────────────────────────────────────── */
/* Pages de texte                                                                                */
/* ───────────────────────────────────────────────────────────────────────────────────────────── */

.dateline {
  color: var(--texte-discret);
  font-size: 0.92rem;
  margin-bottom: 2rem;
}

.avis {
  background: rgba(179, 172, 239, 0.09);
  border-left: 3px solid var(--pervenche);
  border-radius: 0 10px 10px 0;
  padding: 0.9rem 1.1rem;
  margin: 0 0 1.5rem;
}

.avis p:last-child {
  margin-bottom: 0;
}

/*
 * ██ PLUS AUCUNE PAGE NE L'UTILISE — ET LA RÈGLE RESTE ██  (§376, 2026-09-08)
 *
 * Cette classe rendait les champs manquants impossibles à manquer, en jaune, tant que l'identité
 * de l'éditeur n'était pas connue. ██ Elle l'est : les quatre pages sont complètes ██, et
 * `check.mjs` fait désormais ÉCHOUER toute marque `[À …]` qui réapparaîtrait.
 *
 * ██ ON LA GARDE MALGRÉ TOUT ██ — le prochain document en chantier en aura besoin, et sa règle de
 * coupure porte une leçon mesurée : voir `white-space` ci-dessous.
 */
.afournir {
  background: rgba(239, 208, 155, 0.16);
  color: var(--champagne);
  border: 1px dashed rgba(239, 208, 155, 0.5);
  border-radius: 5px;
  padding: 0.05em 0.4em;
  font-size: 0.94em;
  font-weight: 600;
  /*
   * JAMAIS `nowrap` — la première version le portait, et sur un iPhone de 375 pt un libellé
   * long poussait la page à 778 pt de large. Le corps du texte tenait ; c'est le badge qui
   * débordait, et la page entière défilait latéralement. `clone` redessine la bordure et le
   * fond sur chaque ligne, pour que le badge coupé reste un badge.
   */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  overflow-wrap: break-word;
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--surface-bord);
  font-size: 0.92rem;
  color: var(--texte-discret);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-bottom: 0.9rem;
}

/* ───────────────────────────────────────────────────────────────────────────────────────────── */
/* Préférences système                                                                           */
/* ───────────────────────────────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  a {
    color: #000;
  }
}
