/* ==========================================================================
   La chambre chinoise, le blog de Babeleur — « Le Carnet » (décembre 2026)

   Le blog ressemble au site sans être le site : même police (Archivo), même
   rouge brique, mêmes quatre fonds et mêmes filets noirs que babeleur.be,
   mais une autre architecture :
   - un fond lin sur toute la page ;
   - une colonne blanche fixe à gauche (titre, à-propos, menu, Tok) ;
   - des billets numérotés ;
   - chaque billet posé sur une feuille blanche.
   Aucune dépendance externe, police auto-hébergée.
   ========================================================================== */

/* === POLICE LOCALE (une seule famille, variable en graisse et en largeur) === */
@font-face {
  font-family: "Archivo";
  src: url("fontes/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fontes/archivo-italique.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

/* === VARIABLES (les couleurs de babeleur.be) === */
:root {
  --noir: #1d1917;
  --gris: #5e5650;
  --blanc: #fff;
  --brique: #b84d48;       /* couleur de contraste ; en texte, sur fond blanc seulement */
  --sauge: #cad6c0;
  --tilleul: #dde3b9;
  --lin: #ede3ce;          /* fond du blog */
  --argile: #e7c5b5;

  --police: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --police-code: ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --filet: 3px solid var(--noir);
  --filet-fin: 1px solid var(--noir);
  --marge-feuille: 3.4rem;   /* marge intérieure de la feuille d'un billet */
  --cote: 21rem;             /* largeur de la colonne de gauche */
}

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

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

body {
  margin: 0;
  background: var(--lin);
  color: var(--noir);
  font: 400 1.125rem/1.55 var(--police);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote, pre { margin: 0; }

img, video { max-width: 100%; height: auto; }

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

:focus-visible {
  outline: 3px solid var(--brique);
  outline-offset: 3px;
}

::selection { background: var(--tilleul); }

.lien-evitement {
  position: absolute;
  left: -999rem;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--noir);
  color: var(--blanc);
  font-size: 0.9rem;
  z-index: 100;
}
.lien-evitement:focus { left: 1rem; top: 1rem; }

/* === STRUCTURE : colonne de gauche + fil des billets === */
.carnet {
  display: grid;
  grid-template-columns: var(--cote) minmax(0, 1fr);
  align-items: start;
  min-height: 100vh;
}

/* === COLONNE DE GAUCHE === */
.cote {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: 2.2rem 2rem;
  background: var(--blanc);
  border-right: var(--filet);
}

.cote-titre {
  display: block;
  font-size: 3.5rem;
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.86;
  text-transform: uppercase;
  text-decoration: none;
}

/* La virgule du titre est lue par les lecteurs d'écran, mais ne s'affiche pas */
.cote-virgule {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.cote-sous-titre {
  display: block;
  margin-top: 0.7rem;
  padding-bottom: 1.4rem;
  border-bottom: var(--filet);
  font-size: 1.1rem;
  font-weight: 600;
}
.cote-sous-titre a { color: var(--brique); font-weight: 800; }
.cote-sous-titre a:hover { color: var(--noir); }

.cote-apropos {
  margin-top: 1.3rem;
  font-size: 0.98rem;
  line-height: 1.5;
}

.cote-menu {
  margin-top: 1.6rem;
  border-top: var(--filet-fin);
}
.cote-menu a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: var(--filet-fin);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}
.cote-menu a:hover { background: var(--lin); box-shadow: 0 0 0 0.5rem var(--lin); position: relative; }
.cote-menu a span { font-style: italic; }
.cote-menu a.cote-menu-brique { color: var(--brique); }

/* Tok */
.vivant {
  position: relative;
  width: 8.6rem;
  aspect-ratio: 286 / 501;
  margin: 2rem auto 0;
  background: url("images/tok-croises.webp") center / contain no-repeat;
  animation: levite 3.33s ease-in-out infinite alternate;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.vivant .yeux {
  position: absolute;
  left: 6.294%;
  top: 16.168%;
  width: 47.203%;
  aspect-ratio: 135 / 73;
  background: url("images/tok-croises-yeux.webp") center / contain no-repeat;
  opacity: 0;
}
.vivant.clin .yeux { opacity: 1; }
@keyframes levite {
  from { transform: translateY(-7px); }
  to { transform: translateY(7px); }
}
@media (prefers-reduced-motion: reduce) {
  .vivant { animation: none; }
}

.cote-note {
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--gris);
}

/* Sur un écran assez haut, la colonne reste en place pendant qu'on lit */
@media (min-width: 60.01rem) and (min-height: 53rem) {
  .cote {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
  }
}

/* === FIL (à droite) === */
.fil {
  max-width: 68rem;
  padding: 2.6rem 3.5rem 4rem;
}

/* === ACCUEIL === */
.accueil-phrase {
  max-width: 38rem;
  margin-bottom: 2.2rem;
  font-size: 2.5rem;
  font-weight: 700;
  font-stretch: 80%;
  line-height: 1.1;
  text-wrap: balance;
}

.billet {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.7rem 0;
  border-top: var(--filet);
  text-decoration: none;
}

.billet-numero span {
  display: block;
  font-size: 4.6rem;
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.8;
  color: var(--brique);
}
.billet-numero time {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.billet-titre {
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
  font-stretch: 72%;
  line-height: 1.08;
  text-wrap: balance;
}
.billet:hover .billet-titre,
.billet:focus-visible .billet-titre {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
}

.billet-desc {
  max-width: 44rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

/* Le billet le plus récent, sur une feuille blanche */
.billet--une {
  padding: 1.8rem;
  background: var(--blanc);
  border: var(--filet);
  box-shadow: 0.6rem 0.6rem 0 var(--argile);
}
.billet--une .billet-titre { font-size: 2.5rem; line-height: 1.02; }
.billet-image {
  display: block;
  grid-column: 1 / -1;
  width: calc(100% + 3.6rem);
  max-width: none;
  margin: -1.8rem -1.8rem 0.3rem;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-bottom: var(--filet);
}
.billet--une + .billet { margin-top: 1rem; border-top: 0; }

/* Tous les billets, par année */
.archives {
  margin-top: 1.2rem;
  padding-top: 2.4rem;
  border-top: var(--filet);
  scroll-margin-top: 1rem;
}
.archives-titre {
  margin-bottom: 1.4rem;
  font-size: 2.5rem;
  font-weight: 800;
  font-stretch: 66%;
  line-height: 0.92;
  text-transform: uppercase;
}
.archives details {
  margin-bottom: 0.8rem;
  background: var(--blanc);
  border: var(--filet);
}
.archives summary {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.8rem 1.2rem;
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 66%;
  cursor: pointer;
  list-style: none;
}
.archives summary::-webkit-details-marker { display: none; }
.archives summary::after {
  content: "+";
  margin-left: auto;
  color: var(--brique);
}
.archives details[open] summary::after { content: "–"; }
.archives details[open] summary { border-bottom: var(--filet-fin); }
.archives summary span {
  font-size: 0.85rem;
  font-weight: 700;
  font-stretch: 100%;
  letter-spacing: 0.06em;
  color: var(--gris);
}
.archives summary span::after { content: " billets"; }
.archives-liste {
  padding: 0.4rem 1.2rem 0.8rem;
  list-style: none;
}
.archives-liste li {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--lin);
  line-height: 1.3;
}
.archives-liste li:last-child { border-bottom: 0; }
.archives-liste time {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--brique);
}
.archives-liste a { font-weight: 600; text-decoration: none; }
.archives-liste a:hover { text-decoration: underline; }

/* === BILLET : LA FEUILLE === */
.feuille {
  max-width: 50rem;
  padding: 3rem var(--marge-feuille);
  background: var(--blanc);
  border: var(--filet);
  box-shadow: 0.6rem 0.6rem 0 var(--sauge);
}

.article-date {
  font-size: 1.1rem;
  font-weight: 800;
  font-stretch: 62%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brique);
}

.article-title {
  margin: 0.8rem 0 1.8rem;
  font-size: 3rem;
  font-weight: 800;
  font-stretch: 70%;
  line-height: 1.03;
  text-wrap: balance;
}

/* === BILLET : TEXTE === */
.content {
  font-size: 1.15rem;
  line-height: 1.6;
}

.content p,
.content ul,
.content ol,
.content blockquote {
  margin-bottom: 1.25rem;
}

.content p.chapo {
  margin-bottom: 1.8rem;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.45;
}

.content h2,
.content h3,
.content h4 {
  font-weight: 800;
  font-stretch: 72%;
  line-height: 1.08;
  text-wrap: balance;
}
.content h2 {
  margin: 2.6rem 0 1rem;
  padding-top: 1.1rem;
  border-top: var(--filet);
  font-size: 2rem;
}
.content h3 { margin: 2.2rem 0 0.8rem; font-size: 1.55rem; }
.content h4 { margin: 1.8rem 0 0.6rem; font-size: 1.25rem; }

/* Liens dans le texte : rouge brique sur blanc, soulignés */
.content a {
  color: var(--brique);
  font-weight: 600;
}
.content a:hover,
.content a:focus-visible { color: var(--noir); }

.content ul,
.content ol { padding-left: 1.4rem; }
.content li { margin-bottom: 0.4rem; }
.content li::marker { color: var(--brique); font-weight: 800; }

.content blockquote {
  padding: 0.2rem 0 0.2rem 1.3rem;
  border-left: 6px solid var(--noir);
  font-size: 1.2rem;
  font-weight: 500;
}
.content blockquote p:last-child { margin-bottom: 0; }

.content hr {
  margin: 2.4rem 0;
  border: 0;
  border-top: var(--filet);
}

.content mark {
  padding: 0 0.12em;
  background: var(--tilleul);
  color: var(--noir);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.content small,
.content p.legende,
.content .legende,
.content figcaption,
.content .median-showcase__legend,
.content .motion-source-credit {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--gris);
}
.content p.legende,
.content .median-showcase__legend,
.content img + p:has(> small:only-child) {
  margin-top: -1.1rem;
  margin-bottom: 1.8rem;
}

.content table {
  width: 100%;
  margin: 1.8rem 0;
  border-collapse: collapse;
  border-top: var(--filet);
  font-size: 0.98rem;
  line-height: 1.4;
}
.content th,
.content td {
  padding: 0.6rem 0.8rem 0.6rem 0;
  border-bottom: var(--filet-fin);
  text-align: left;
  vertical-align: top;
}

/* === BILLET : IMAGES ET VIDÉOS === */
.content img,
.content video,
.content iframe {
  display: block;
  max-width: 100%;
  margin: 2rem auto;
}
.content figure { margin: 2rem 0; }
.content figure video,
.content figure img { margin: 0 auto 0.6rem; }

.illustration-moyenne { width: 75%; }
.illustration-petite { max-width: 60%; }

.video-container {
  position: relative;
  height: 0;
  margin: 2rem auto;
  padding-bottom: 56.25%;
  overflow: hidden;
}
.video-container iframe,
.video-container video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

/* Images carrées habillées par le texte */
.content p:has(> .image-carree) {
  float: left;
  width: 17rem;
  margin: 0.3rem 1.8rem 0.9rem 0;
  line-height: 0;
}
.content p:has(> .image-carree-droite) {
  float: right;
  width: 17rem;
  margin: 0.3rem 0 0.9rem 1.8rem;
  line-height: 0;
}
.content .image-carree,
.content .image-carree-droite {
  width: 17rem;
  height: 17rem;
  margin: 0;
  object-fit: cover;
  border: var(--filet);
}
.content::after {
  content: "";
  display: table;
  clear: both;
}

/* Sur grand écran, les illustrations vont jusqu'aux bords de la feuille */
@media (min-width: 48rem) {
  .content > img.illustration {
    width: calc(100% + 2 * var(--marge-feuille));
    max-width: none;
    margin-left: calc(-1 * var(--marge-feuille));
    margin-right: calc(-1 * var(--marge-feuille));
    border-top: var(--filet);
    border-bottom: var(--filet);
  }
}

/* === BILLET : ENCADRÉS === */
.lire-aussi,
.mise-en-garde,
.edit {
  font-size: 1.05rem;
  line-height: 1.45;
}

.lire-aussi {
  clear: both;
  margin: 1.8rem 0;
  padding: 1rem 1.2rem;
  background: var(--tilleul);
  border-left: 6px solid var(--noir);
}
/* Dans un bloc coloré, texte et liens restent noirs (lisibilité) */
.lire-aussi a,
.content .lire-aussi a,
.content .mise-en-garde a,
.content .edit a {
  color: var(--noir);
  font-weight: 700;
}

.mise-en-garde {
  margin: 0 0 1.8rem;
  padding: 1rem 1.2rem;
  background: var(--argile);
  border: var(--filet);
}

.edit {
  clear: both;
  margin: 2.2rem 0 0;
  padding: 1rem 1.2rem;
  background: var(--lin);
  border-left: 6px solid var(--noir);
}

.content .mise-en-garde p,
.content .edit p { margin: 0; }

.disclaimer-box {
  margin-bottom: 1.8rem;
  padding: 1rem 1.2rem;
  background: var(--tilleul);
  border-left: 6px solid var(--noir);
  font-size: 1.05rem;
  line-height: 1.45;
}

.disclaimer-ia {
  clear: both;
  margin-top: 3rem;
  padding-top: 1.1rem;
  border-top: var(--filet-fin);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--gris);
}
.disclaimer-ia em { font-style: normal; }
.disclaimer-ia strong { font-weight: 700; color: var(--noir); }
.edit + .disclaimer-ia { margin-top: 1.8rem; }

/* === BLOCS DE PROMPT (clairs, comme une fiche) === */
pre {
  display: flex;
  flex-direction: column;
  position: relative;
  max-height: 28rem;
  margin: 1.8rem 0;
  padding: 1.2rem 1.3rem;
  overflow-y: auto;
  background: var(--lin);
  border: var(--filet);
  color: var(--noir);
  font-family: var(--police-code);
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  scrollbar-width: thin;
  scrollbar-color: var(--gris) transparent;
}
pre code {
  order: 1;
  padding: 0;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
:not(pre) > code {
  padding: 0.1em 0.35em;
  background: var(--lin);
  font-family: var(--police-code);
  font-size: 0.84em;
}
pre::before {
  content: "Prompt à copier";
  order: 0;
  width: fit-content;
  margin-bottom: 0.9rem;
  font-family: var(--police);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.copy-button {
  order: -1;
  align-self: flex-end;
  position: sticky;
  top: 0;
  z-index: 10;
  margin: -0.2rem -0.2rem -2rem 0;
  padding: 0.5rem 0.9rem;
  background: var(--brique);
  border: 0;
  font-family: var(--police);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  color: var(--blanc);
  cursor: pointer;
}
.copy-button:hover,
.copy-button.est-copie { background: var(--noir); }

/* === APRÈS LE BILLET : RÉACTIONS, VOISINS, FORMATIONS === */
.reactions-container {
  clear: both;
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: var(--filet);
}
.reactions-title {
  margin-bottom: 0.8rem;
  font-weight: 700;
}
.reactions-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.reaction-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: var(--blanc);
  border: 2px solid var(--noir);
  font-family: var(--police);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--noir);
  cursor: pointer;
}
.reaction-btn:hover:not(:disabled) { background: var(--tilleul); }
.reaction-btn:disabled { cursor: default; opacity: 0.6; }
.reaction-btn .count { margin-left: 0.2rem; font-weight: 800; color: var(--brique); }
.reactions-message {
  min-height: 1.4rem;
  margin-top: 0.7rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.blog-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 50rem;
  margin-top: 2.2rem;
}
.blog-navigation a { text-decoration: none; }
.blog-navigation .nav-ancien { grid-column: 2; text-align: right; }
.nav-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-titre {
  display: block;
  font-weight: 700;
  line-height: 1.3;
}
.blog-navigation a:hover .nav-titre { text-decoration: underline; }

.lecture-billet { min-width: 0; }
.marge { max-width: 50rem; }
.marge-derniers { display: none; }   /* visible à droite du billet sur très grand écran */

.se-former {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 2.2rem;
  padding: 1.4rem 1.6rem;
  background: var(--sauge);
  border: var(--filet);
}
.se-former h2 {
  margin-bottom: 0.3rem;
  font-size: 1.6rem;
  font-weight: 800;
  font-stretch: 66%;
  line-height: 0.95;
  text-transform: uppercase;
}
.se-former p { font-size: 1.05rem; }

.bouton {
  display: inline-block;
  padding: 1rem 1.4rem;
  background: var(--brique);
  color: var(--blanc);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.bouton:hover { background: var(--noir); }

/* === PAGE INTROUVABLE === */
.introuvable .article-title { margin-top: 0; }
.introuvable p { font-size: 1.15rem; }
.introuvable a { color: var(--brique); font-weight: 600; }

/* === PIED DE PAGE (les mentions de babeleur.be) === */
.pied {
  padding: 2rem 0 1.4rem;
  background: var(--blanc);
  border-top: var(--filet);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--gris);
}
.pied-page {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr);
  gap: 3rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 2.5rem;
}
.pied-logo {
  display: inline-block;
  margin-bottom: 0.4rem;
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 66%;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--noir);
}
.pied-logo span { color: var(--brique); }
.pied b { color: var(--noir); }
.pied ul { padding: 0; list-style: none; }
.pied-espace { margin-top: 0.8rem; }
.pied-zola {
  max-width: 80rem;
  margin: 1.4rem auto 0;
  padding: 0 2.5rem;
  font-size: 0.8rem;
}

/* === HUIT SYNOPSIS IA : démonstration « médiane statistique » === */
.median-showcase { margin: 2rem 0 2.2rem; }
.median-showcase__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.median-card {
  min-width: 0;
  height: 270px;
  overflow: hidden;
  background: var(--blanc);
  border: var(--filet);
}
.median-card__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  background: var(--lin);
  border-bottom: var(--filet-fin);
  font-size: 0.75rem;
  line-height: 1;
  color: var(--gris);
}
.median-card__dots { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.median-card__dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brique);
}
.median-card__source {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--noir);
  font-weight: 700;
}
.median-card__type {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 3px 7px;
  background: var(--blanc);
  border: var(--filet-fin);
  font-size: 0.68rem;
  color: var(--noir);
}
.median-card__content {
  height: calc(100% - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.9rem 1rem 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
  scrollbar-width: thin;
}
/* Le billet annonce « en orange » et « en texte orange foncé » : on garde ces deux teintes ici */
.median-card__content mark { background: #f6d2ad; font-weight: 600; }
.median-name { color: #a4541a; font-weight: 700; }
.content .median-showcase__legend { margin-top: 0.7rem; }

/* === TRÈS GRANDS ÉCRANS : on occupe la largeur ===
   Accueil : les billets sur deux colonnes, le premier en grand avec son image à gauche.
   Billet : les derniers billets et les formations viennent à droite de la feuille. */
@media (min-width: 100rem) {
  .fil { max-width: 104rem; }

  .billets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 3.5rem;
  }
  .billet { align-content: start; }
  .billet--une {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) 7.5rem minmax(0, 1fr);
    align-items: center;
    margin-bottom: 1.6rem;
  }
  .billet--une:not(:has(.billet-image)) { grid-template-columns: 7.5rem minmax(0, 1fr); }
  .billet--une .billet-image {
    grid-column: auto;
    width: calc(100% + 1.8rem);
    height: calc(100% + 3.6rem);
    min-height: 19rem;
    margin: -1.8rem 0 -1.8rem -1.8rem;
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: var(--filet);
  }
  .billet--une .billet-numero { align-self: start; padding-left: 1rem; }
  .billet--une > div { align-self: start; }
  .billet--une .billet-titre { font-size: 2.9rem; }
  .billet--une .billet-desc { font-size: 1.2rem; }
  .billet--une + .billet,
  .billet--une + .billet + .billet { margin-top: 0; border-top: var(--filet); }

  .lecture {
    display: grid;
    grid-template-columns: minmax(0, 54rem) minmax(0, 21rem);
    gap: 3.5rem;
    align-items: start;
  }
  .feuille, .blog-navigation { max-width: none; }
  .marge { position: sticky; top: 2.6rem; }
  .marge-derniers {
    display: block;
    padding: 1.4rem 1.6rem 1.5rem;
    background: var(--blanc);
    border: var(--filet);
  }
  .marge-derniers h2 {
    margin-bottom: 0.4rem;
    font-size: 1.6rem;
    font-weight: 800;
    font-stretch: 66%;
    line-height: 0.95;
    text-transform: uppercase;
  }
  .marge-derniers ul { padding: 0; list-style: none; }
  .marge-derniers li { padding: 0.75rem 0; border-bottom: var(--filet-fin); line-height: 1.3; }
  .marge-derniers li a { display: block; font-weight: 700; text-decoration: none; }
  .marge-derniers li a:hover { text-decoration: underline; }
  .marge-derniers time { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; color: var(--brique); }
  .marge-derniers p { margin-top: 0.9rem; font-size: 0.95rem; font-weight: 700; }
  .marge .se-former { margin-top: 1.5rem; }
}

/* === ÉCRANS MOYENS ET PETITS : la colonne devient un en-tête === */
@media (max-width: 60rem) {
  .carnet { display: block; min-height: 0; }

  .cote {
    padding: 1.2rem 1.1rem;
    border-right: 0;
    border-bottom: var(--filet);
  }
  .cote-titre { font-size: 2.6rem; }
  .cote-sous-titre { margin-top: 0.4rem; padding-bottom: 0; border: 0; }
  .cote-apropos,
  .cote-note { display: none; }
  /* Tok se glisse à droite du titre */
  .cote { position: relative; padding-right: 6.2rem; }
  .cote-titre { max-width: 6.5em; }
  .vivant { position: absolute; right: 1.2rem; top: 0.9rem; width: 3.9rem; margin: 0; }
  .cote-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1.2rem;
    margin-top: 0.9rem;
    border: 0;
  }
  .cote-menu a { padding: 0.2rem 0; border: 0; font-size: 0.92rem; }
  .cote-menu a:hover { background: none; box-shadow: none; text-decoration: underline; }
  .cote-menu a span { display: none; }

  .fil { max-width: 52rem; margin: 0 auto; padding: 1.6rem 1.1rem 3rem; }
  .accueil-phrase { font-size: 1.7rem; margin-bottom: 1.6rem; }

  .pied-page { grid-template-columns: 1fr; gap: 1.4rem; padding: 0 1.1rem; }
  .pied-zola { padding: 0 1.1rem; }
}

@media (max-width: 40rem) {
  :root { --marge-feuille: 1.2rem; }

  .billet { grid-template-columns: 3.6rem minmax(0, 1fr); gap: 0.9rem; padding: 1.4rem 0; }
  .billet-numero span { font-size: 2.8rem; }
  .billet-numero time { margin-top: 0.5rem; font-size: 0.6rem; letter-spacing: 0; }
  .billet-titre { font-size: 1.35rem; }
  .billet-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
    font-size: 1rem;
  }
  .cote-menu a[href$="atom.xml"] { display: none; }   /* le flux reste dans le pied de page */
  .billet--une { padding: 1.1rem; box-shadow: 0.4rem 0.4rem 0 var(--argile); }
  .billet-image { width: calc(100% + 2.2rem); margin: -1.1rem -1.1rem 0.2rem; }
  .billet--une .billet-titre { font-size: 1.7rem; }

  .archives-titre { font-size: 2rem; }

  .feuille { padding: 1.4rem var(--marge-feuille) 1.6rem; box-shadow: 0.4rem 0.4rem 0 var(--sauge); }
  .article-date { font-size: 1rem; }
  .article-title { font-size: 2rem; margin-bottom: 1.3rem; }
  .content { font-size: 1.08rem; }
  .content p.chapo { font-size: 1.2rem; }
  .content h2 { font-size: 1.6rem; }
  .content h3 { font-size: 1.35rem; }

  .content p:has(> .image-carree),
  .content p:has(> .image-carree-droite) {
    float: none;
    width: auto;
    margin: 1.6rem 0;
  }
  .content .image-carree,
  .content .image-carree-droite { width: 100%; height: auto; aspect-ratio: 1; }

  .median-showcase__grid { grid-template-columns: 1fr; }

  .blog-navigation { grid-template-columns: 1fr; gap: 1.2rem; }
  .blog-navigation .nav-ancien { grid-column: auto; text-align: left; }
  .reaction-btn { padding: 0.45rem 0.7rem; font-size: 0.9rem; }
}

/* === IMPRESSION === */
@media print {
  body { background: #fff; }
  .carnet { display: block; }
  .cote, .pied, .reactions-container, .blog-navigation, .marge, .copy-button { display: none; }
  .fil { max-width: none; padding: 0; }
  .feuille { max-width: none; padding: 0; border: 0; box-shadow: none; }
  pre { max-height: none; }
}
