/* =========================
   Base layout & typography
   ========================= */
body {
  font-family: Menlo, Courier, monospace;
  background: white;
  color: black;
  max-width: 750px;     /* readable line length */
  margin: auto;         /* center the column */
  padding: 1em;         /* breathing room left/right */
}

a {
  color: black;
  text-decoration: underline;
}


/* =========================
   Headings (document-level)
   ========================= */
h1 { 
  font-size: 2em;
  margin: 0 0 1.5em 0;  /* space below page title */
}
h2 { 
  font-size: 1.5em;
  margin-top: 1.2em;    /* space above section title */
}
h3 { 
  font-size: 1.2em;
  margin-top: 1em;      /* space above subsection title */
}


/* =========================
   App containers & layout
   ========================= */
#view article {
  margin-top: 2em;      /* push article away from the header/toolbar */
}

/* Post list (home view) */
#post-list {
  list-style: none;     /* clean list bullets */
  padding: 0;
  margin: 2em 0 0 0;    /* vertical gap from language switcher */
}

#post-list li {
  display: flex;                 /* title left, tags right */
  justify-content: space-between;
  align-items: baseline;
  margin: 0.5em 0;               /* vertical rhythm between rows */
}

/* Title cell: truncate long titles with ellipsis */
.post-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tag cell (inline, compact) */
.post-tags {
  white-space: nowrap;
}

.tag {
  display: inline;
  margin-left: 0.4em;
  font-size: 0.75em;
}

/* Remove underline for internal nav links in list & back link */
#post-list a,
#view > p > a {
  text-decoration: none;
}


/* =========================
   Markdown content styling
   ========================= */

/* Images produced by Markdown: responsive, centered */
#view article.markdown-body p > img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 1em auto !important;
}

/* Section spacing inside Markdown articles */
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin-top: 2.5em;   /* extra space before headings */
  margin-bottom: 1em;  /* and after headings */
}

/* Paragraph spacing */
.markdown-body p {
  margin: 1.2em 0;
}

/* Lists spacing + indent */
.markdown-body ul,
.markdown-body ol {
  margin: 1.2em 0 1.2em 2em;
}

/* Space between list items */
.markdown-body li {
  margin: 0.6em 0;
}


/* =========================
   Header logo
   ========================= */
#blog-logo {
  height: 80px;               /* small, title-like height */
  width: auto;
  display: block;
  margin: 2em 0 4em -4em;     /* top | right | bottom | left
                                 pull slightly left to offset body padding */
}


/* =========================
   Language switchers
   ========================= */

/* Global menu switch (list view) */
.lang-toggle {
  display: block;
  margin-bottom: 1.5em;
}

#view .lang-toggle a {
  text-decoration: none !important;     /* not underlined by default */
}

#view .lang-toggle a:hover {
  text-decoration: underline !important;  /* underline only on hover */
}

/* Article-level toolbar */
.toolbar {
  display: flex;
  align-items: baseline;
  gap: .6em;
  margin: 0 0 1em 0;
}

/* Article-level switch (FR · EN) */
.lang-switch { display: inline-flex; gap: .4em; }
.lang-switch .dot { opacity: .6; }
.lang-switch a { text-decoration: none !important; }
.lang-switch .active { text-decoration: underline !important; }
.lang-switch .disabled { color: #999 !important; text-decoration: none !important; cursor: default !important; }

/* MENU: langue active soulignée, l'autre non (sauf hover) */
#view .lang-toggle .active { 
  text-decoration: underline !important;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 2px;
}
#view .lang-toggle a { 
  text-decoration: none !important; 
}
#view .lang-toggle a:hover { 
  text-decoration: underline !important; 
}