/* ==========================================================================
   site.css — le blog (accueil, articles, pages)
   --------------------------------------------------------------------------
   Remplace le thème de 2019 (main.css + scss/). Les pages d'app gardent
   tokens.css et app.css, qui ne dépendent pas de ce fichier.

   Polices : Inter Tight pour les titres, Inter pour le texte, JetBrains Mono
   pour les métadonnées (dates, sujets, petits titres) et le code.
   Contrastes : chaque couleur de texte passe AA (4,5:1) sur son fond.
   ========================================================================== */

:root {
  --bg:          #f8fafc;
  --surface:     #ffffff;
  --surface-alt: #f1f5f9;
  --border:      #e2e8f0;
  --ink:         #0f172a;   /* titres, 17,8:1 sur --surface        */
  --text:        #334155;   /* texte courant, 10,4:1               */
  --text-strong: #1e293b;   /* corps d'article                     */
  --muted:       #64748b;   /* métadonnées, 4,8:1 sur --surface    */
  --accent:      #4f46e5;   /* 6,3:1 sur --surface                 */
  --accent-soft: #eef2ff;
  --accent-ink:  #3730a3;   /* liens, pastilles : 8,9:1 sur --accent-soft */
  --night:       #0f172a;   /* bandeaux sombres, blocs de code     */
  --night-text:  #e2e8f0;
  --night-muted: #94a3b8;
  --text-soft:   #475569;   /* extraits, liens secondaires, 7,6:1  */
  --border-strong: #cbd5e1; /* bordure au survol                   */
  --surface-sunken: #eef2f6; /* filtre, code en ligne              */
  --on-ink:      #ffffff;   /* texte posé sur --ink (bouton plein) */
  --ink-hover:   #1e293b;
  --live-bg:     #d1fae5;
  --live-ink:    #065f46;
  --night-edge:  transparent; /* contour des blocs sombres         */
  --shadow-sm:    0 1px 2px rgba(15, 23, 42, 0.1);
  --shadow-hover: 0 4px 16px rgba(15, 23, 42, 0.06);

  color-scheme: light dark;

  --font-display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --radius:    14px;
  --radius-lg: 18px;
  --wrap:      1120px;
  --gutter:    24px;
}

/* Thème sombre : suit le réglage du système. Contrastes AA vérifiés :
   texte 11,6:1, extraits 7,7:1, métadonnées 5,8:1 sur --surface. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0b1120;
    --surface:     #131b2e;
    --surface-alt: #1c2639;
    --surface-sunken: #0e1525;
    --border:      #263248;
    --border-strong: #3a4863;
    --ink:         #f1f5f9;
    --text:        #cbd5e1;
    --text-strong: #e2e8f0;
    --text-soft:   #a3afc2;
    --muted:       #8b97ab;
    --accent:      #a5b4fc;
    --accent-soft: #252a5c;
    --accent-ink:  #c7d2fe;
    --night:       #070b16;
    --night-edge:  #263248;
    --on-ink:      #0f172a;
    --ink-hover:   #cbd5e1;
    --live-bg:     #064e3b;
    --live-ink:    #a7f3d0;
    --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.35);
  }
  /* Les blocs sombres se détachent du fond par un contour */
  .apps-banner, .panel--dark, .app-teaser { box-shadow: inset 0 0 0 1px var(--night-edge); }
  .prose pre { border: 1px solid var(--night-edge); }
  /* Les photos et captures, un peu moins éclatantes la nuit */
  .prose img, .article-cover img { filter: brightness(0.92); }
}

/* --- Base ---------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

[hidden] { display: none !important; }

a { color: var(--accent-ink); }
a:hover { color: var(--ink); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 10;
  background: var(--ink);
  color: var(--on-ink);
  padding: 10px 14px;
  border-radius: 8px;
}
.skip-link:focus { left: 8px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* --- En-tête et pied de page ---------------------------------------------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.site-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.site-brand img { width: 32px; height: 32px; border-radius: 50%; }
.site-brand:hover { color: var(--ink); }

.site-nav { display: flex; gap: 4px; font-size: 15px; font-weight: 500; }
.site-nav a {
  color: var(--text-soft);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-alt); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-alt); }

.site-footer {
  margin-top: 72px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  align-items: center;
  padding-top: 16px;
  padding-bottom: 16px;
}
.site-footer a { color: var(--text-soft); text-decoration: none; padding: 10px 0; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

.site-main { padding-top: 56px; }

/* --- Accueil ------------------------------------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
  margin-bottom: 48px;
}
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(31px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.hero p { margin: 0; font-size: 17px; color: var(--text-soft); }

.section-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.post-card:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}
.post-card__img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: var(--surface-alt);
}
.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  padding: 22px;
}
.post-card__meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.post-card__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}
.post-card__excerpt { font-size: 15px; line-height: 1.55; color: var(--text-soft); }
.post-card .chips { margin-top: auto; padding-top: 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  background: var(--accent-soft);
  color: var(--accent-ink);
  text-decoration: none;
}
.chip--app { background: var(--surface-alt); color: var(--text); padding-left: 2px; }
.chip--app img { width: 18px; height: 18px; border-radius: 4px; }

.apps-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  margin-top: 48px;
  padding: 28px 32px;
  background: var(--night);
  border-radius: var(--radius-lg);
  color: #ffffff;
  text-decoration: none;
}
.apps-banner:hover { color: #ffffff; }
.apps-banner__icons { display: flex; gap: 8px; }
.apps-banner__icons img { width: 44px; height: 44px; border-radius: 11px; }
.apps-banner__text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; }
.apps-banner__title { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.apps-banner__sub { margin: 0; font-size: 14px; color: #cbd5e1; }
.apps-banner__cta { font-weight: 600; }

.more { display: flex; justify-content: center; margin: 28px 0 0; }
.more .button { background: var(--surface); color: var(--accent-ink); font-weight: 600; }

/* Article à la une */
.featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  margin-bottom: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
}
.featured:hover { color: var(--ink); border-color: var(--border-strong); box-shadow: var(--shadow-hover); }
.featured__visual {
  position: relative;
  min-height: 300px;
  background: var(--night);
  overflow: hidden;
}
/* Par défaut, l'image remplit le panneau, recadrée au centre. D'où la règle
   des bannières d'articles : jamais de texte, un sujet centré sur des
   marges unies, pour que le recadrage ne coupe rien d'utile. */
.featured__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* featured-style: capture — pour une capture d'écran, qui elle porte du
   texte : posée en biais du coin haut gauche, coupée par le cadre. */
.featured__visual--capture img {
  inset: auto;
  top: 28px;
  left: 28px;
  width: 640px;
  height: auto;
  max-width: none;
  object-fit: initial;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.featured__visual--icon { display: flex; align-items: center; justify-content: center; }
.featured__visual--icon img { position: static; width: 120px; height: 120px; border-radius: 28px; }
.featured__body { display: flex; flex-direction: column; gap: 14px; justify-content: center; padding: 36px; }
.featured__body .eyebrow { font-size: 12px; }
.featured__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.featured__excerpt { font-size: 16px; line-height: 1.6; color: var(--text-soft); }
.featured--text { grid-template-columns: 1fr; }

/* En-tête de section avec le filtre à droite */
.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-head .section-title { margin: 0; }

.filter {
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px;
  background: var(--surface-sunken);
  border-radius: 10px;
}
.filter button {
  flex: none;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.filter button:hover { color: var(--ink); }
.filter button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* Page /articles/ */
.filter-bar { margin-bottom: 32px; }
.archive__year { margin-bottom: 36px; }
.archive__title {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--accent-ink);
}
.archive__list { margin: 0; padding: 0; list-style: none; max-width: 860px; }
.archive__list > li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.archive__list > li > time { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.archive__list > li > a { color: var(--ink); font-weight: 500; text-decoration: none; }
.archive__list > li > a:hover { text-decoration: underline; }

/* --- Page /apps/ --------------------------------------------------------- */
/* Les couleurs de fond viennent de _data/apps.yml (couleur de l'icône) ;
   tout texte posé dessus est blanc ou color_soft. */

.apps-section { margin-bottom: 48px; }
.apps-section .section-title { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.status {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  padding: 3px 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.status--live { background: var(--live-bg); color: var(--live-ink); }

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-tile {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.app-tile__head {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 28px;
  color: #ffffff;
}
.app-tile__head img {
  width: 84px;
  height: 84px;
  flex: none;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.app-tile__name { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.app-tile__meta { margin: 4px 0 0; font-family: var(--font-mono); font-size: 12px; }
.app-tile__body { display: flex; flex-direction: column; gap: 18px; flex: 1 1 auto; padding: 24px 28px; }
.app-tile__tagline { margin: 0; font-size: 17px; line-height: 1.5; color: var(--ink); }
.app-tile__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.app-tile__more {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--surface-alt);
  font-size: 14px;
  color: var(--text-soft);
  text-decoration: none;
}
.app-tile__more:hover { color: var(--ink); text-decoration: underline; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.button:hover { color: var(--ink); border-color: var(--border-strong); }
.button--primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); font-weight: 600; }
.button--primary:hover { color: var(--on-ink); background: var(--ink-hover); }

.app-teaser {
  display: flex;
  gap: 20px;
  align-items: center;
  height: 100%;
  padding: 24px;
  border-radius: var(--radius-lg);
  color: #ffffff;
  text-decoration: none;
}
.app-teaser:hover { color: #ffffff; }
.app-teaser img { width: 72px; height: 72px; flex: none; border-radius: 17px; }
.app-teaser__text { display: flex; flex-direction: column; gap: 6px; }
.app-teaser__name { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.app-teaser__tagline { font-size: 15px; line-height: 1.45; }
.app-teaser__cta { font-size: 14px; font-weight: 600; }

.apps-contact { margin: 0; font-size: 15px; color: var(--muted); }

/* --- Article et pages ----------------------------------------------------- */

.article { max-width: 720px; }
.article-header { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.article-back {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  padding: 6px 0;
}
.article-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.article-meta time,
.article-meta .reading-time { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.article-cover { margin: 0 0 32px; }
.article-cover img { display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.article-cover figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* Article sur deux colonnes : le texte, puis sommaire et auteur à droite.
   En dessous de 960 px, la colonne passe sous l'article et le sommaire
   devient un bloc repliable en tête de texte. */
.article-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 56px;
  align-items: flex-start;
}
.article-layout .article { flex: 999 1 600px; min-width: 0; }
.article-aside { flex: 1 1 240px; display: flex; flex-direction: column; gap: 28px; }

.toc__title {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.toc__list { margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.4; }
.toc__list a {
  display: block;
  padding: 6px 0 6px 12px;
  border-left: 2px solid var(--border);
  color: var(--text-soft);
  text-decoration: none;
}
.toc__list a:hover { color: var(--ink); border-left-color: var(--accent); }

.toc--inline {
  display: none;
  margin-bottom: 28px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.toc--inline summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-soft);
  cursor: pointer;
}
.toc--inline .toc__list { padding-bottom: 12px; }

@media (max-width: 959px) {
  .toc--inline { display: block; }
  .article-aside .toc { display: none; }
}

.article-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.related__title { margin: 0 0 14px; font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--ink); }
.related__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.related__card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}
.related__card:hover { color: var(--ink); border-color: var(--border-strong); }
.related__card time { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--muted); }

/* Page À propos */
.about { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.about__main { flex: 999 1 560px; min-width: 0; max-width: 720px; display: flex; flex-direction: column; gap: 36px; }
.about__aside { flex: 1 1 280px; display: flex; flex-direction: column; gap: 16px; }
.about__head { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }
.about__head img {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 4px solid var(--surface);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}
.about__head h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.about .prose p:last-child { margin-bottom: 0; }

.timeline h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--ink); }
.timeline ol { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--border); }
.timeline li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 4px 20px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.timeline__when { font-family: var(--font-mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.timeline__what { font-weight: 500; color: var(--ink); }

.panel {
  display: flex;
  flex-direction: column;
  padding: 8px 20px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.panel__title { margin: 12px 0 4px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--muted); }
.panel a {
  padding: 10px 0;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.panel a + a { border-top: 1px solid var(--surface-alt); }
.panel a:hover { text-decoration: underline; }
.panel--dark { background: var(--night); border-color: var(--night); }
.panel--dark .panel__title { color: #cbd5e1; }
.panel--dark a { color: #ffffff; font-weight: 600; }
.author-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.author-card img { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.author-card strong { display: block; color: var(--ink); font-size: 15px; }

/* Texte long : articles, pages, politiques de confidentialité */
.prose {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-strong);
  overflow-wrap: break-word;
}
.prose > :first-child { margin-top: 0; }
/* Politiques des apps : liens vers les autres langues, au-dessus du titre */
.prose .prose__langs { margin: 0 0 12px; }
.prose p.prose__lang { margin: 0; font-size: 15px; color: var(--muted); }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre,
.prose table, .prose figure, .prose .highlighter-rouge { margin: 0 0 22px; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.25;
  margin: 40px 0 14px;
}
.prose h1 { font-size: 34px; letter-spacing: -0.02em; }
.prose h2 { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
.prose h3 { font-size: 22px; font-weight: 600; }
.prose h4 { font-size: 18px; font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.prose img { border-radius: 10px; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.prose blockquote {
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--accent);
  color: var(--text);
  font-style: italic;
}
.prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.5;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-alt); color: var(--ink); font-weight: 600; }
.prose tr + tr td, .prose tbody tr td { border-top: 1px solid var(--border); }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-sunken);
  border-radius: 5px;
  padding: 2px 6px;
}
.prose pre,
.prose .highlight {
  background: var(--night);
  color: var(--night-text);
  border-radius: 12px;
}
.prose pre {
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.prose .highlight pre { margin: 0; background: none; }

/* Coloration Rouge, thème sombre */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs, .highlight .cp { color: var(--night-muted); font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt, .highlight .kc { color: #c4b5fd; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sc, .highlight .sd,
.highlight .se, .highlight .sh, .highlight .si, .highlight .sx, .highlight .sr { color: #86efac; }
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo, .highlight .il { color: #fdba74; }
.highlight .na, .highlight .nb, .highlight .bp { color: #7dd3fc; }
.highlight .nf, .highlight .fm, .highlight .nc, .highlight .nn { color: #a5b4fc; }
.highlight .nt { color: #f9a8d4; }
.highlight .nv, .highlight .vi, .highlight .vg, .highlight .vc { color: #fcd34d; }
.highlight .o, .highlight .ow, .highlight .p { color: #cbd5e1; }
.highlight .gd { color: #fca5a5; }
.highlight .gi { color: #86efac; }
.highlight .err { color: #fca5a5; background: none; }

/* --- Page des tags ------------------------------------------------------- */

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 40px; padding: 0; list-style: none; }
.tag-group { margin-bottom: 32px; }
.tag-group h2 { font-family: var(--font-mono); font-size: 15px; font-weight: 500; color: var(--accent-ink); margin: 0 0 8px; }
.tag-group ul { margin: 0; padding: 0; list-style: none; }
.tag-group li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.tag-group li a { color: var(--ink); text-decoration: none; font-weight: 500; }
.tag-group li a:hover { text-decoration: underline; }
.tag-group time { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* --- Petits écrans ------------------------------------------------------- */

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .site-main { padding-top: 28px; }
  .site-nav a { padding: 10px 8px; }
  .hero { margin-bottom: 32px; }
  .hero p { font-size: 16px; }
  .post-card__body { padding: 18px; }
  /* Une bannière par carte allonge vite la liste : plus basse sur téléphone */
  .post-card__img { height: 110px; }
  .apps-banner { padding: 20px; }
  .app-tile__head { padding: 18px; gap: 14px; }
  .app-tile__head img { width: 60px; height: 60px; border-radius: 14px; }
  .app-tile__name { font-size: 22px; }
  .app-tile__body { padding: 16px 18px 18px; }
  .app-tile__actions .button { flex: 1 1 0; justify-content: center; }
  .app-teaser { padding: 16px; gap: 14px; }
  .app-teaser img { width: 52px; height: 52px; border-radius: 12px; }
  .app-teaser__name { font-size: 19px; }
  .prose { font-size: 17px; line-height: 1.7; }
  .prose h2 { font-size: 23px; }
  /* Sur téléphone, un tableau large défile au lieu d'élargir la page */
  .prose table { display: block; overflow-x: auto; }
  .prose pre { margin-left: -4px; margin-right: -4px; font-size: 13px; }
  .featured { margin-bottom: 36px; }
  .featured__visual { min-height: 170px; }
  .featured__visual--capture img { top: 18px; left: 18px; width: 460px; }
  .featured__body { padding: 20px; gap: 10px; }
  .archive__list > li { grid-template-columns: 48px minmax(0, 1fr); }
  .archive__list .chips { grid-column: 2; }
  .timeline li { grid-template-columns: 1fr; }
  .about__head img { width: 96px; height: 96px; }
}
