:root {
  --fond: #fbfaf7;
  --surface: #ffffff;
  --texte: #1f2328;
  --discret: #5b636d;
  --bord: #e3e0d8;
  --accent: #b4441c;
  --accent-doux: #f6e7df;
  --code: #f2efe8;
  --largeur: 46rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #16181b;
    --surface: #1e2125;
    --texte: #e6e3dd;
    --discret: #a2a8b0;
    --bord: #33373d;
    --accent: #f08a5d;
    --accent-doux: #3a2a22;
    --code: #262a2f;
    color-scheme: dark;
  }
}

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Disposition : contenu, puis colonne des archives (à droite dès 992 px, dessous sinon).
   Pages de lecture (.etroite) : colonne de lecture de --largeur, centrée avec les archives. */
.disposition { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.etroite { grid-template-columns: minmax(0, var(--largeur)); justify-content: center; }
@media (min-width: 992px) {
  .disposition { grid-template-columns: minmax(0, 1fr) 16rem; }
  .etroite { grid-template-columns: minmax(0, var(--largeur)) 16rem; }
}

/* Tuile de l'auteur, au-dessus des archives (même habillage). Sur mobile, l'auteur est
   dans le volet du menu burger : la tuile est masquée. */
.tuile-auteur {
  background: var(--surface); border: 1px solid var(--bord); border-radius: 8px;
  padding: 1.25rem 1.1rem; margin-bottom: 1rem; text-align: center; font-size: .92rem;
}
.tuile-auteur img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); }
.tuile-auteur h2 { margin: .75rem 0 0; font-size: 1.1rem; font-weight: 700; }
.tuile-auteur .role { margin: 0 0 .6rem; color: var(--discret); }
.tuile-auteur .devise { margin: 0 0 .75rem; font-style: italic; }
.tuile-auteur a { font-weight: 600; text-decoration: none; }
.tuile-auteur a:hover { text-decoration: underline; }
@media (max-width: 767.98px) { .tuile-auteur { display: none; } }

/* Archives du blog, à la manière de Blogger : année › mois › titres, repliables. */
.archives {
  background: var(--surface); border: 1px solid var(--bord); border-radius: 8px;
  padding: 1rem 1.1rem; font-size: .92rem;
}
.archives h2 { margin: 0 0 .6rem; font-weight: 700; }
.archives ul { list-style: none; margin: 0; padding: 0; }
.archives ul ul { padding-left: 1.1rem; }
.archives summary { cursor: pointer; padding: .15rem 0; display: flex; align-items: center; gap: .4rem; }
.archives summary::-webkit-details-marker { display: none; }
.archives summary::before { content: "►"; content: "►" / ""; font-size: .65em; color: var(--discret); width: 1em; }
.archives details[open] > summary::before { content: "▼"; content: "▼" / ""; }
.archives summary a { text-decoration: none; font-weight: 600; }
.archives .titres { list-style: disc; padding-left: 2.4rem; }
.archives .titres li::marker { color: var(--accent); }
.archives .titres li { padding: .2rem 0; line-height: 1.35; }
.archives .titres a { color: var(--texte); text-decoration: none; }
.archives a:hover { color: var(--accent); text-decoration: underline; }
.archives a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.archives .compteur {
  min-width: 1.5em; padding: .05em .45em; border-radius: 999px; text-align: center;
  background: var(--accent-doux); color: var(--accent); font-size: .75em; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Bootstrap : cartes, bordures et fond alignés sur la palette du blog. */
:root, [data-bs-theme] {
  --bs-body-bg: var(--fond);
  --bs-body-color: var(--texte);
  --bs-border-color: var(--bord);
}

.evitement { position: absolute; left: -999px; }
.evitement:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 1; }
.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* Bandeau */
.bandeau { border-bottom: 1px solid var(--bord); padding: 2rem 0 1rem; margin-bottom: 2rem; }
.marque { font-size: 1.6rem; font-weight: 700; color: var(--texte); text-decoration: none; letter-spacing: -.01em; }
.marque .icone-tract { width: 1.3em; height: 1.3em; margin-right: .4rem; vertical-align: -.25em; }
.sous-titre { margin: .2rem 0 1rem; color: var(--discret); }
.bandeau nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.bandeau nav a { font-weight: 600; text-decoration: none; }
.lien-flux { display: inline-flex; align-items: center; gap: .35rem; }
.icone { flex: none; }

/* Grille de vignettes */
.entete-liste { margin-bottom: 1.5rem; }
.entete-liste h1 { margin-bottom: .25rem; }
.vide { color: var(--discret); }

.vignette {
  background: var(--surface); border-color: var(--bord); overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.vignette:hover, .vignette:focus-within { transform: translateY(-3px); box-shadow: 0 .5rem 1.25rem rgb(0 0 0 / .12); }
.vignette .ratio img { object-fit: cover; background: var(--code); }
.vignette .card-title { line-height: 1.35; margin-bottom: .4rem; font-weight: 600; }
.vignette .card-footer .tag { font-size: .78rem; }
.vignette .card-title a { color: var(--texte); text-decoration: none; }
.vignette .card-title a:hover { color: var(--accent); }
.vignette .card-footer { background: none; border-color: var(--bord); position: relative; z-index: 2; }
.resume-court {
  font-size: .9rem; color: var(--discret);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* Vignette par défaut : dégradé dont la teinte dérive du slug, initiale du titre. */
.vignette-vide {
  background: linear-gradient(135deg, hsl(var(--teinte) 55% 45%), hsl(calc(var(--teinte) + 45) 60% 32%));
}
.vignette-vide span {
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 2.6rem; font-weight: 700; opacity: .9;
}
@media (prefers-reduced-motion: reduce) { .vignette { transition: none; } .vignette:hover { transform: none; } }

.meta { color: var(--discret); font-size: .92rem; display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; }
.tag {
  display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; padding: .05rem .3rem .05rem .6rem;
  border-radius: 999px; background: var(--accent-doux); color: var(--accent); font-size: .85rem; text-decoration: none;
}
.tag .libelle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Badge du nombre d'articles : pastille pleine, contraste AA (4,5:1) dans les deux thèmes. */
.tag .compteur {
  flex: none; min-width: 1.5em; padding: .05em .45em; border-radius: 999px; text-align: center;
  background: var(--accent); color: var(--fond); font-size: .78em; font-weight: 700; line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

/* Filtres par tag, dans le bandeau (sélecteurs .bandeau : priment sur « .bandeau nav »). */
.bandeau .filtres { gap: .4rem; margin-top: 1rem; }
.bandeau .filtres .tag { font-weight: 400; padding: .2rem .3rem .2rem .75rem; font-size: .9rem; border: 1px solid transparent; }
.bandeau .filtres .tag:hover { border-color: var(--accent); }
.bandeau .filtres .tag.actif { background: var(--accent); color: var(--fond); font-weight: 600; }
.bandeau .filtres .tag.actif .compteur { background: var(--fond); color: var(--accent); }

/* Menu mobile : sous 768 px, les catégories et l'auteur passent dans un volet ouvert par
   le bouton burger. Sans JavaScript (pas de classe « js »), le volet reste déplié. */
.tete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.burger {
  display: none; flex: none; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem;
  padding: 0; border: 1px solid var(--bord); border-radius: 8px; background: var(--surface); color: var(--texte);
}
.burger:hover { border-color: var(--accent); color: var(--accent); }
.burger .i-fermer, .burger[aria-expanded="true"] .i-ouvrir { display: none; }
.burger[aria-expanded="true"] .i-fermer { display: inline; }
.auteur-volet, .volet-titre { display: none; }
@media (max-width: 767.98px) {
  .bandeau { padding: 1rem 0 .75rem; margin-bottom: 1.25rem; }
  .sous-titre { font-size: .9rem; margin-bottom: .75rem; }
  .js .burger { display: inline-flex; }
  .js .volet:not(.ouvert) { display: none; }
  .volet { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--bord); }
  .auteur-volet { display: flex; align-items: center; gap: .9rem; color: var(--texte); text-decoration: none; }
  .auteur-volet img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
  .auteur-volet .discret { color: var(--discret); font-size: .9rem; }
  .volet-titre {
    display: block; margin: 1.1rem 0 0; color: var(--discret); font-size: .78rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
  }
  .bandeau .volet .filtres { margin-top: .5rem; }
}

/* Article */
.article h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.015em; }
.couverture { width: 100%; height: auto; border-radius: 8px; margin-top: 1rem; }
.contenu { margin: 2rem 0; overflow-wrap: break-word; }
.contenu h2 { margin-top: 2.2rem; line-height: 1.3; }
.contenu img, .contenu video, .contenu iframe { max-width: 100%; height: auto; border-radius: 6px; }
.contenu figure { margin: 1.5rem 0; }
.contenu figcaption { color: var(--discret); font-size: .9rem; text-align: center; }
.contenu blockquote { margin: 1.5rem 0; padding: .25rem 1rem; border-left: 3px solid var(--accent); color: var(--discret); }
.contenu code { background: var(--code); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.contenu pre { background: var(--code); padding: 1rem; border-radius: 6px; overflow-x: auto; }
.contenu pre code { background: none; padding: 0; }
.contenu table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.contenu th, .contenu td { border: 1px solid var(--bord); padding: .4rem .7rem; text-align: left; }

/* Sources de l'article */
.sources { margin: 2.5rem 0 1.5rem; }
.sources .list-group-item { background: var(--surface); border-color: var(--bord); color: var(--texte); }
.source { display: flex; gap: .75rem; align-items: flex-start; }
.source .badge {
  flex: none; min-width: 5.5rem; margin-top: .2rem; font-weight: 600;
  background: var(--accent-doux); color: var(--accent);
}
.source-corps { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.source-corps > a { font-weight: 600; }
.source-corps p { font-size: .92rem; color: var(--discret); }
.source-video   { --accent-doux: #fde2e1; --accent: #b42318; }
.source-podcast { --accent-doux: #ede4fb; --accent: #6b3fb5; }
.source-livre   { --accent-doux: #e1f0e6; --accent: #24713f; }
.source-document{ --accent-doux: #e2ecf8; --accent: #1f5b9e; }
@media (prefers-color-scheme: dark) {
  .source-video   { --accent-doux: #3d1f1d; --accent: #f3958c; }
  .source-podcast { --accent-doux: #2e2540; --accent: #c3a6f2; }
  .source-livre   { --accent-doux: #1d3325; --accent: #8fd3a5; }
  .source-document{ --accent-doux: #1e2c3d; --accent: #92bcef; }
}
@media (max-width: 480px) {
  .source { flex-direction: column; align-items: stretch; gap: .35rem; }
  .source .badge { align-self: flex-start; }
}

/* Lecteur vidéo plein écran, ouvert au clic sur l'URL d'une source vidéo. */
/* Symbole décoratif : texte alternatif vide, les lecteurs d'écran ne le lisent pas. */
a[data-video]::before { content: "▶ "; content: "▶ " / ""; font-size: .8em; }
.lecteur-video {
  /* dvh : hauteur réellement visible sur mobile, barre d'adresse comprise. */
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: #000;
}
.lecteur-video::backdrop { background: rgb(0 0 0 / .92); }
.lecteur-video iframe, .lecteur-video video { width: 100%; height: 100%; border: 0; display: block; }
.lecteur-fermer {
  position: absolute; top: .75rem; right: .75rem; z-index: 1;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0;
  background: rgb(0 0 0 / .65); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.lecteur-fermer:hover, .lecteur-fermer:focus-visible { background: var(--accent); }

/* Page de bienvenue */
.chapeau { font-size: 1.15rem; color: var(--discret); margin: .25rem 0 0; }
.derniers {
  background: var(--surface); border: 1px solid var(--bord); border-radius: 8px;
  padding: 1rem 1.25rem; margin: 2rem 0;
}
.derniers ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.derniers li { padding: .45rem 0; border-bottom: 1px solid var(--bord); }
.derniers li:last-child { border-bottom: 0; }
.derniers li .meta { display: block; font-size: .85rem; }
.derniers .actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
.bouton {
  display: inline-block; padding: .45rem 1rem; border-radius: 6px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--fond); font-weight: 600; text-decoration: none;
}
.bouton:hover, .bouton:focus-visible { filter: brightness(1.08); color: var(--fond); }
.bouton.secondaire { background: none; color: var(--accent); }
.bouton.secondaire:hover, .bouton.secondaire:focus-visible { background: var(--accent-doux); }
.bandeau nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .3em; }

.encart-abonnement {
  background: var(--surface); border: 1px solid var(--bord); border-radius: 8px;
  padding: .25rem 1.25rem; margin: 2rem 0;
}

/* Mentions légales */
.mentions .sommaire { background: var(--surface); border: 1px solid var(--bord); border-radius: 8px; padding: .75rem 1.25rem; margin: 1.5rem 0; }
.mentions .sommaire ol { margin: 0; padding-left: 1.25rem; }
.mentions h2 { font-size: 1.3rem; margin-top: 2.2rem; scroll-margin-top: 1rem; }
.mentions .fiche { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: .5rem 1.25rem; }
.mentions .fiche dt { font-weight: 600; }
.mentions .fiche dd { margin: 0; }
.mentions li { margin-bottom: .6rem; }
@media (max-width: 560px) { .mentions .fiche { grid-template-columns: 1fr; } .mentions .fiche dd { margin-bottom: .75rem; } }

/* Page d'abonnement */
.flux { list-style: none; padding: 0; }
.flux li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .6rem; }
.flux li span { min-width: 7rem; font-weight: 600; }
.flux input {
  flex: 1 1 16rem; min-width: 0; font: inherit; font-size: .9rem; padding: .35rem .5rem;
  border: 1px solid var(--bord); border-radius: 6px; background: var(--surface); color: var(--texte);
}
.aide { color: var(--discret); font-size: .95rem; }

/* Pagination */
.pagination-blog { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 2rem 0; }
.pagination-blog span { color: var(--discret); }

/* Pied */
.pied { border-top: 1px solid var(--bord); margin-top: 3rem; padding: 1.5rem 0 2.5rem; color: var(--discret); font-size: .92rem; }

