/* ============================================================
   0xLoucash — Obsidian Publish
   DA répliquée du site InstallClaw (social-impact-capital style)
   Palette : paper #fcfcfc · electric #2a2ecd · ink #000 · muted #b2b2b2
   Typos : Instrument Serif (titres) · Inter (texte)
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;450;500;600&display=swap");

:root {
  --lc-electric: #2a2ecd;
  --lc-electric-light: #e1e7f5;
  --lc-paper: #fcfcfc;
  --lc-ink: #000000;
  --lc-muted: #b2b2b2;
}

/* ---------- Base : fond papier, texte noir, Inter ---------- */
.published-container {
  --background-primary: var(--lc-paper);
  --background-secondary: var(--lc-paper);
  --background-secondary-alt: var(--lc-electric-light);
  --text-normal: var(--lc-ink);
  --text-muted: #555555;
  --text-faint: var(--lc-muted);
  --text-accent: var(--lc-electric);
  --text-accent-hover: #1a1e9e;
  --interactive-accent: var(--lc-electric);
  --link-color: var(--lc-electric);
  --link-external-color: var(--lc-electric);
  --blockquote-border: var(--lc-electric);
  --font-text-theme: "Inter", system-ui, sans-serif;
  --font-monospace-theme: "SF Mono", Menlo, Consolas, monospace;
  font-family: "Inter", system-ui, sans-serif;
}

body {
  background: var(--lc-paper);
}

.markdown-preview-view,
.markdown-rendered {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--lc-ink);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout : colonne centrale seule, lecture confortable ---------- */
.site-body-center-column {
  max-width: 760px;
  margin: 0 auto;
}

/* Étanchéité : jamais de navigation, graphe, backlinks ni recherche */
.site-body-left-column,
.site-body-right-column,
.published-section,
.graph-view-outer,
.search-view-outer,
.backlinks,
.site-footer .theme-toggle {
  display: none !important;
}

/* ---------- Titres : bleu électrique, serif serré (style InstallClaw) ---------- */
.markdown-preview-view h1,
.markdown-rendered h1,
.inline-title {
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-weight: 400;
  color: var(--lc-electric);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: 2.4em;
  margin-top: 0.4em;
}

.markdown-preview-view h2,
.markdown-rendered h2 {
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-weight: 400;
  color: var(--lc-electric);
  letter-spacing: -0.015em;
  line-height: 1.15;
  font-size: 1.7em;
  margin-top: 1.6em;
}

.markdown-preview-view h3,
.markdown-rendered h3,
.markdown-preview-view h4,
.markdown-rendered h4 {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  color: var(--lc-electric);
  letter-spacing: -0.01em;
  font-size: 1.15em;
  margin-top: 1.4em;
}

/* ---------- Liens : bleu électrique, hover soutenu ---------- */
.markdown-preview-view a,
.markdown-rendered a {
  color: var(--lc-electric);
  text-decoration: none;
  border-bottom: 1px solid rgba(42, 46, 205, 0.3);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.markdown-preview-view a:hover,
.markdown-rendered a:hover {
  color: #1a1e9e;
  border-bottom-color: #1a1e9e;
}

/* ---------- Séparateurs fins gris (style SIC) ---------- */
.markdown-preview-view hr,
.markdown-rendered hr {
  border: none;
  border-top: 1px solid #e4e4e4;
  margin: 2.2em 0;
}

/* ---------- Callouts : cartouches bleu clair, libellés électriques ---------- */
.callout {
  background: var(--lc-electric-light);
  border: none;
  border-left: 3px solid var(--lc-electric);
  border-radius: 0;
  padding: 14px 18px;
}
.callout .callout-title,
.callout .callout-title-inner {
  color: var(--lc-electric);
  font-weight: 600;
  font-family: "Inter", system-ui, sans-serif;
}
.callout .callout-icon { color: var(--lc-electric); }
.callout .callout-content { color: var(--lc-ink); }

.callout[data-callout="warning"],
.callout[data-callout="danger"],
.callout[data-callout="bug"] {
  background: #fdf7f4;
  border-left-color: rgba(216, 90, 48, 0.40);
}
.callout[data-callout="warning"] .callout-title,
.callout[data-callout="warning"] .callout-icon,
.callout[data-callout="danger"] .callout-title,
.callout[data-callout="danger"] .callout-icon,
.callout[data-callout="bug"] .callout-title,
.callout[data-callout="bug"] .callout-icon {
  color: #a8613f;
}

/* ---------- Code : blocs sobres bord fin, accent bleu inline ---------- */
.markdown-preview-view pre,
.markdown-rendered pre {
  background: #f4f4f6;
  border: 1px solid #e4e4e8;
  border-radius: 6px;
  padding: 16px 18px;
  font-size: 0.86em;
  line-height: 1.6;
}
.markdown-preview-view code,
.markdown-rendered code {
  background: var(--lc-electric-light);
  color: var(--lc-electric);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.88em;
}
.markdown-preview-view pre code,
.markdown-rendered pre code {
  background: transparent;
  color: var(--lc-ink);
  padding: 0;
}

/* ---------- Tableaux : entêtes bleu plein blanc (style sic-flag) ---------- */
.markdown-preview-view table,
.markdown-rendered table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92em;
}
.markdown-preview-view th,
.markdown-rendered th {
  background: var(--lc-electric);
  color: #ffffff;
  font-weight: 500;
  text-align: left;
  padding: 8px 12px;
  border: none;
}
.markdown-preview-view td,
.markdown-rendered td {
  border: none;
  border-bottom: 1px solid #e4e4e4;
  padding: 8px 12px;
}
.markdown-preview-view tr:hover td,
.markdown-rendered tr:hover td {
  background: var(--lc-electric-light);
  transition: background 0.3s ease;
}

/* ---------- Citations ---------- */
.markdown-preview-view blockquote,
.markdown-rendered blockquote {
  border-left: 3px solid var(--lc-electric);
  background: transparent;
  color: #333;
  margin-left: 0;
  padding-left: 18px;
  font-style: normal;
}

/* ---------- En-tête de guide : un seul titre, pas de logo répété ----------
   Obsidian Publish ajoute automatiquement un h1.page-header noir tiré du
   NOM DU FICHIER, au-dessus du vrai titre écrit dans la note. Résultat :
   deux titres qui se doublonnent. On masque celui de Publish et on garde
   le titre rédigé (bleu, Instrument Serif).
   */
.markdown-preview-view .mod-header,
.markdown-rendered .mod-header,
h1.page-header {
  display: none !important;
}

/* Logo rond au-dessus du titre : conservé (demande Lucas 2026-08-07) */
.markdown-preview-view img[src*="logo-0xloucash"],
.markdown-rendered img[src*="logo-0xloucash"] {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 8px 0 4px;
  border: 2px solid var(--lc-electric);
}

/* ---------- Images : coins doux ---------- */
.markdown-preview-view img,
.markdown-rendered img {
  border-radius: 8px;
  max-width: 100%;
}

/* ---------- Header / footer Publish discrets ---------- */
.site-header {
  background: var(--lc-paper);
  border-bottom: 1px solid #e4e4e4;
}
.site-header-text {
  font-family: "Instrument Serif", serif;
  color: var(--lc-electric);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.site-footer {
  color: var(--lc-muted);
  font-size: 13px;
}

/* ---------- Checkbox listes (guides step-by-step) ---------- */
.markdown-preview-view input[type="checkbox"],
.markdown-rendered input[type="checkbox"] {
  accent-color: var(--lc-electric);
}

/* ============================================================
   Tickets CTA (injectés en bas de chaque guide par publish.js)
   Répliques des tickets du linktree 0xloucash.xyz : cadre noir,
   encoches d'angle, timbre vidéo à gauche, badges, survol bleu.
   Préfixe .lcta- pour ne jamais toucher aux classes d'Obsidian.
   ============================================================ */

.lcta {
  /* vit en dernier enfant de .markdown-preview-view (le scrolleur) :
     centré et borné pour suivre la colonne de lecture */
  max-width: 700px;
  margin: 3.5em auto 1.5em;
  padding: 0 20px;
  box-sizing: border-box;
}
.lcta-kicker {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 450;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lc-muted);
  text-align: center;
  margin: 0 0 22px;
}
.lcta-ticket {
  position: relative;
  display: block;
  margin: 0 0 26px;
}
.lcta-ticket > a {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--lc-ink) !important;
  padding: 20px 24px;
  background: var(--lc-paper);
  color: var(--lc-ink);
  text-decoration: none;
  transition: background 0.3s ease;
}
/* neutralise le soulignement des liens de contenu */
.markdown-preview-view .lcta-ticket > a,
.markdown-rendered .lcta-ticket > a {
  border-bottom: 1px solid var(--lc-ink);
}
.lcta-stamp {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  object-fit: cover;
  display: block;
  background: var(--lc-paper);
  border-radius: 0;
}
.lcta-body { flex: 1; min-width: 0; }
.lcta-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.lcta-title {
  font-family: "Instrument Serif", "Times New Roman", serif;
  text-transform: uppercase;
  font-size: 26px;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--lc-ink);
  transition: color 0.3s ease;
}
.lcta-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}
.lcta-badge {
  display: inline-block;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 450;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lc-electric);
  background: var(--lc-electric-light);
  padding: 4px 8px;
  transition: color 0.3s ease, background 0.3s ease;
}
.lcta-desc {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14.5px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--lc-ink);
  margin: 8px 0 0;
  transition: color 0.3s ease;
}
.lcta-icon {
  flex-shrink: 0;
  width: 24px;
  display: flex;
  justify-content: flex-end;
  color: var(--lc-ink);
  transition: color 0.3s ease;
}
/* Encoches d'angle (mêmes découpes que le linktree) */
.lcta-notch {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 1px solid var(--lc-ink);
  border-radius: 50%;
  background: var(--lc-paper);
  z-index: 2;
  box-sizing: border-box;
}
.lcta-notch.c1 { left: -10px; top: -10px; clip-path: polygon(48% 48%, 100% 50%, 100% 100%, 50% 100%); }
.lcta-notch.c2 { right: -10px; top: -10px; clip-path: polygon(0 50%, 52% 48%, 50% 100%, 0 100%); }
.lcta-notch.c3 { right: -10px; bottom: -10px; clip-path: polygon(0 0, 50% 0, 52% 52%, 0 50%); }
.lcta-notch.c4 { left: -10px; bottom: -10px; clip-path: polygon(50% 0, 100% 0, 100% 50%, 48% 52%); }
/* Survol : le ticket se remplit de bleu */
.lcta-ticket > a:hover { background: var(--lc-electric); }
.lcta-ticket > a:hover .lcta-title,
.lcta-ticket > a:hover .lcta-desc,
.lcta-ticket > a:hover .lcta-icon { color: #ffffff; }
.lcta-ticket > a:hover .lcta-badge {
  color: var(--lc-electric);
  background: #ffffff;
}
/* Mobile : contenu empilé, flèche en haut à droite */
@media (max-width: 560px) {
  .lcta-ticket > a {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 18px 20px;
  }
  .lcta-icon { position: absolute; top: 18px; right: 18px; }
  .lcta-head { display: block; }
  .lcta-badges { justify-content: flex-start; margin: 10px 0 0; }
}
