/*
 * La feuille du guide : le papier, l'encre, le bleu de tracé.
 *
 * Le guide est fait de pages HTML statiques, servies telles quelles depuis
 * `public/` — elles doivent être lisibles par un moteur de recherche sans que
 * rien ne s'exécute. D'où une feuille unique, partagée, plutôt que du style
 * inline recopié de page en page.
 */

:root {
  --papier: #f6f7f9;
  --carte: #ffffff;
  --encre: #12161b;
  --encre-douce: #4d5661;
  --mine: #6b7480;
  --trait: #d8dce2;
  --trait-fin: #e6e9ee;
  --bleu: #1f5fd0;
  --bleu-pale: #e8effb;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* Le thème suit le réglage du système : la présentation du produit est
   sombre, le guide doit pouvoir l'être aussi sans changer de peau. */
@media (prefers-color-scheme: dark) {
  :root {
    --papier: #0d1014;
    --carte: #151a20;
    --encre: #eef1f5;
    --encre-douce: #b4bcc6;
    --mine: #8c95a1;
    --trait: #2a323b;
    --trait-fin: #1e252c;
    --bleu: #7aa5f0;
    --bleu-pale: #172233;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.largeur {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

header.bandeau {
  border-bottom: 1px solid var(--trait);
  background: var(--carte);
}

header.bandeau .largeur {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.marque {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.marque a {
  color: inherit;
  text-decoration: none;
}

nav.sommaire {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}

a {
  color: var(--bleu);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

main {
  padding: 40px 0 64px;
}

.fil {
  margin: 0 0 20px;
  font-size: 13.5px;
  color: var(--mine);
}

.fil a {
  color: var(--mine);
}

h1 {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

h2 {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.25;
  margin: 44px 0 12px;
  padding-top: 4px;
  border-top: 1px solid var(--trait-fin);
}

h3 {
  font-size: 17px;
  margin: 28px 0 8px;
}

p,
li {
  color: var(--encre-douce);
}

.chapeau {
  font-size: 18.5px;
  color: var(--encre);
  margin: 0 0 8px;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bleu-pale);
  color: var(--encre);
  padding: 1px 5px;
  border-radius: 4px;
}

kbd {
  border: 1px solid var(--trait);
  background: var(--carte);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--trait-fin);
  color: var(--encre-douce);
}

th {
  color: var(--encre);
  font-weight: 600;
  white-space: nowrap;
}

/* Les tableaux du guide listent des contraintes et des formats : sur un
   téléphone ils débordent, et c'est au tableau de défiler, pas à la page. */
.defilant {
  overflow-x: auto;
}

.encadre {
  border: 1px solid var(--trait);
  border-left: 3px solid var(--bleu);
  background: var(--carte);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 24px 0;
}

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

.encadre p:first-child {
  margin-top: 0;
}

.bouton {
  display: inline-block;
  background: var(--bleu);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 11px 20px;
  border-radius: 8px;
}

.cartes {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.cartes li {
  border: 1px solid var(--trait);
  border-radius: 10px;
  background: var(--carte);
  padding: 16px 18px;
}

.cartes h2,
.cartes h3 {
  border: 0;
  margin: 0 0 6px;
  padding: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  font-weight: 600;
}

.cartes p {
  margin: 0;
  font-size: 14.5px;
}

footer.pied {
  border-top: 1px solid var(--trait);
  background: var(--carte);
  padding: 26px 0;
  font-size: 14px;
}

footer.pied p {
  margin: 0 0 8px;
}

.suite {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--trait-fin);
  font-size: 15px;
}
