HomeMAL' // MANUFACTORUM
datacrypt
blog / style.css
style.css6.1 KB
/* =========================
   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;
}

iframe {
  width: 100%;
  border:none; 
  display:block; 
  position:relative; 
}


/* =========================
   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;
  gap: 2em;                      /* lateral space between title and date */
  margin: 0.5em 0;               /* vertical rhythm between rows */
}

/* Title cell: single line, truncate with ellipsis, takes all available space */
.post-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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


.post-meta {
  display: flex;
  align-items: baseline;
  gap: 1em;
  white-space: nowrap;
}

.post-date {
  font-size: 0.8em;
  opacity: 0.7;
}

.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;
}

/* Figures with captions */
figure {
  margin: 2em 0;
}

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

figcaption {
  font-size: 0.8em;
  opacity: 0.6;
  margin-top: 0.4em;
}

/* 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;
}


/* =========================
   Tables
   ========================= */
.markdown-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5em 0;
}

.markdown-body th,
.markdown-body td {
  text-align: left;
  padding: 0.5em 1em;
  border-bottom: 1px solid #ccc;
}

.markdown-body th {
  border-bottom: 2px solid black;
  font-weight: bold;
}

.markdown-body tr:last-child td {
  border-bottom: none;
}

.markdown-body tr:nth-child(odd) td {
  background: #f5f5f5;
}


/* =========================
   Callout boxes
   ========================= */
.callout {
  padding: 0.8em 1.2em;
  margin: 1.5em 0;
  border-left: 4px solid;
}
.callout p { margin: 0.4em 0; }
.callout-info    { background: #EFF6FF; border-color: #3B82F6; }
.callout-warning { background: #FFFBEB; border-color: #F59E0B; }
.callout-danger  { background: #FEF2F2; border-color: #EF4444; }


/* =========================
   Mermaid diagrams
   ========================= */
.mermaid {
  margin: 2em 0;
  overflow-x: auto;
  cursor: zoom-in;
}

.mermaid svg {
  height: auto;
  font-size: 14px;
  display: block;
}

/* Full-screen overlay */
.mermaid-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: white;
  z-index: 9999;
  overflow: auto;
  cursor: zoom-out;
  padding: 2em;
}

.mermaid-overlay.active {
  display: block;
}

.mermaid-overlay svg {
  display: block;
  font-size: 14px;
}

.mermaid ol {
  margin: 0;
  padding-left: 1.2em;
  text-align: left;
}

.mermaid li {
  margin: 2px 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-fullwidth {
  position: relative;
  width: min(1200px, 100vw);
  left: 50%;
  transform: translateX(-50%);
  padding: 0 1em;
  box-sizing: border-box;
}

.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; 
}

#app {
  overflow: visible;
}