/* jaCCepte.Ca — le blogue de Daniel Allaire.
   Un habit de lecture : fond papier, encre chaude, colonne étroite, Source Serif 4 (dessinée pour
   l'écran) pour le texte, Inter pour les titres. Les pilules bleue et rouge ne sont plus qu'un accent.
   Aucun script, aucune ressource de tiers. */

@font-face { font-family: "Source Serif 4"; src: url("../polices/sourceserif4-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../polices/sourceserif4-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../polices/inter.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  color-scheme: light;
  --fond: #faf8f3;
  --surface: #ffffff;
  --encre: #24211d;
  --doux: #6b655c;
  --trait: #e6e1d6;
  --bleu: #2c5cc5;
  --rouge: #d0393f;
  --vert: #2e8a57;
  --lien: #2c5cc5;
  --lecture: 39rem;
  --large: 68rem;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 1.2rem/1.75 var(--serif);
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
.cadre { width: min(var(--large), 100% - 2.5rem); margin-inline: auto; }
::selection { background: #f6d6d3; }

.evitement { position: absolute; left: -999px; top: .5rem; }
.evitement:focus { left: .5rem; z-index: 99; background: var(--encre); color: var(--fond); padding: .5rem .8rem; border-radius: .4rem; }

/* En-tête */
.entete {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 248, 243, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--trait);
  font-family: var(--sans);
}
.entete-dedans { display: flex; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; flex-wrap: wrap; padding: .8rem 0; }
.marque { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--encre); }
.nom { font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.nom b { color: var(--rouge); font-weight: 800; }
.nom .point { color: var(--bleu); }
.pilules { display: inline-flex; transform: rotate(-30deg); }
.pilules span { width: 11px; height: 22px; display: block; }
.pilules .bleue { background: var(--bleu); border-radius: 11px 0 0 11px; }
.pilules .rouge { background: var(--rouge); border-radius: 0 11px 11px 0; }
.entete nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; flex-wrap: wrap; }
.entete nav a {
  display: block; padding: .35rem .7rem; border-radius: .4rem;
  color: var(--doux); text-decoration: none; font-weight: 500; font-size: .92rem;
}
.entete nav a:hover { color: var(--encre); }
.entete nav a[aria-current="page"] { color: var(--encre); font-weight: 650; box-shadow: inset 0 -2px 0 var(--rouge); border-radius: 0; }

/* La colonne de lecture */
main { padding: 4rem 0 5rem; }
.texte { max-width: var(--lecture); margin-inline: auto; overflow-wrap: break-word; hyphens: manual; }
.texte h1, .texte h2, .texte h3, .texte h4 {
  font-family: var(--sans); color: var(--encre); line-height: 1.2; letter-spacing: -.015em;
}
.texte h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.1rem); font-weight: 800; letter-spacing: -.03em; margin: 0 0 .9rem; text-wrap: balance; }
.texte h2 { font-size: 1.45rem; font-weight: 700; margin: 2.8rem 0 .9rem; }
.texte h3 { font-size: 1.15rem; font-weight: 700; margin: 2rem 0 .5rem; }
.texte h4 { font-size: 1.05rem; font-weight: 700; margin: 1.6rem 0 .4rem; }
.texte p, .texte ul, .texte ol, .texte blockquote, .texte figure, .texte table, .texte pre { margin: 0 0 1.25em; }
.texte ul, .texte ol { padding-left: 1.3em; }
.texte li { margin: .45em 0; padding-left: .2em; }
.texte li::marker { color: var(--rouge); }
.texte a { color: var(--lien); text-decoration-color: rgba(44, 92, 197, .35); text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.texte a:hover { text-decoration-color: currentColor; }
.texte strong { font-weight: 650; }
.texte em { font-style: italic; }
.texte hr { border: 0; text-align: center; margin: 3rem 0; }
.texte hr::after { content: "• • •"; color: var(--doux); letter-spacing: .6em; }

/* Citation mise en exergue : de l'air, pas une boîte */
.texte blockquote {
  margin: 2.5rem 0; padding: 0 0 0 1.4rem; border-left: 3px solid var(--rouge);
  font-size: 1.4rem; line-height: 1.5; font-style: italic; color: var(--encre);
}
.texte blockquote p:last-child { margin-bottom: 0; }

.texte img { max-width: 100%; height: auto; border-radius: .4rem; display: block; margin-inline: auto; }
.texte figcaption { font: .9rem/1.5 var(--sans); color: var(--doux); text-align: center; margin-top: .5em; }
.texte table { display: block; overflow-x: auto; border-collapse: collapse; font: .95rem/1.5 var(--sans); max-width: 100%; }
.texte th, .texte td { border-bottom: 1px solid var(--trait); padding: .5em .7em; vertical-align: top; text-align: left; }

/* En-tête d'article : surtitre, titre, chapeau */
.surtitre {
  font: 650 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--rouge); margin: 0 0 1.1rem;
}
.chapeau {
  font-size: 1.4rem; line-height: 1.5; color: var(--doux);
  margin: 0 0 2.8rem; padding-bottom: 2rem; border-bottom: 1px solid var(--trait);
}

/* Les cinq questions */
.texte .questions { list-style: none; padding: 0; margin: 1.5rem 0 1.8rem; }
.texte .questions li {
  font: 600 1.12rem/1.4 var(--sans); margin: 0; padding: .7rem 0 .7rem 1rem;
  border-left: 3px solid var(--bleu); border-bottom: 1px solid var(--trait);
}
.texte .questions li:first-child { border-top: 1px solid var(--trait); }

/* Les trois piliers */
.piliers { display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); gap: 1rem; margin: 1.8rem 0 2.5rem; }
.texte a.pilier {
  display: block; padding: 1.3rem 1.2rem 1.2rem; border-radius: .7rem;
  background: var(--surface); color: var(--encre); text-decoration: none;
  box-shadow: 0 1px 2px rgba(60, 50, 30, .06), 0 4px 16px rgba(60, 50, 30, .06);
  border-top: 3px solid var(--rouge);
  transition: transform .15s ease, box-shadow .15s ease;
}
.texte a.pilier:nth-child(2) { border-top-color: var(--bleu); }
.texte a.pilier:nth-child(3) { border-top-color: var(--vert); }
.texte a.pilier:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(60, 50, 30, .08), 0 10px 28px rgba(60, 50, 30, .10); }
.pilier span { font: 700 .78rem/1 var(--sans); color: var(--doux); letter-spacing: .1em; }
.texte .pilier h3 { margin: .55rem 0 .45rem; font-size: 1.2rem; }
.pilier p { margin: 0; font-size: 1.02rem; line-height: 1.55; color: var(--doux); }
.suite { font: 600 1rem/1.5 var(--sans); margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--trait); }
.texte .suite a { text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .texte a.pilier { transition: none; } .texte a.pilier:hover { transform: none; } }

/* Les billets */
.texte .date { font: 500 .92rem/1.4 var(--sans); color: var(--doux); margin: -.2rem 0 2rem; }
.texte .billets { list-style: none; padding: 0; margin: 0 0 2.5rem; }
.texte .billets li { margin: 0; padding: 0; border-bottom: 1px solid var(--trait); }
.texte .billets a { display: block; padding: 1.3rem 0; color: var(--encre); text-decoration: none; }
.texte .billets time { display: block; font: 500 .82rem/1.4 var(--sans); color: var(--doux); letter-spacing: .02em; }
.titre-billet { display: block; font: 700 1.3rem/1.3 var(--sans); letter-spacing: -.01em; margin: .3rem 0 .4rem; }
.texte .billets a:hover .titre-billet { color: var(--rouge); }
.resume { display: block; font-size: 1.05rem; line-height: 1.55; color: var(--doux); }
.texte .flux { font: .9rem/1.5 var(--sans); color: var(--doux); }

/* Pied */
.pied { border-top: 1px solid var(--trait); padding: 2.5rem 0 3rem; font: .9rem/1.6 var(--sans); color: var(--doux); text-align: center; }
.pied p { margin: .3rem 0; }
.pied a { color: inherit; }
.pied .devise { font-weight: 650; color: var(--encre); font-size: 1rem; margin-bottom: .9rem; }
.pied .b { color: var(--bleu); }
.pied .v { color: var(--vert); }
.pied .r { color: var(--rouge); }
.pied .petit { font-size: .82rem; }

@media (max-width: 40rem) {
  body { font-size: 1.12rem; line-height: 1.7; }
  main { padding: 2.2rem 0 3.5rem; }
  .entete-dedans { justify-content: center; }
  .chapeau { font-size: 1.22rem; }
  .texte blockquote { font-size: 1.22rem; }
}
@media print {
  .entete, .pied { display: none; }
  body { background: #fff; color: #000; }
}
