/* ═══════════════════════════════════════════════════════════════════
   colombie.css — Thème : Tropiques, café, réalisme magique
   Couleurs drapeau : jaune (or des richesses) + bleu (océans) + rouge (sang de l'indépendance)
   Polices : Lora (littéraire) + DM Sans (moderne tropical) + JetBrains Mono
   ═══════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=DM+Sans:wght@300;400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --sb:     #0a0800;
  --sb2:    #140f02;
  --surf:   #1e1705;
  --surf2:  #2a1f08;

  --amarillo:   #FCD116;    /* jaune du drapeau */
  --amarillo-2: #ffe25a;
  --amarillo-p: rgba(252,209,22,.10);
  --amarillo-d: rgba(252,209,22,.40);
  --azul:       #003893;    /* bleu du drapeau */
  --azul-2:     #2a60c8;
  --azul-p:     rgba(0,56,147,.13);
  --rojo:       #CE1126;    /* rouge du drapeau */
  --rojo-2:     #ff3846;
  --rojo-p:     rgba(206,17,38,.10);
  --esmeralda:  #2e8b57;    /* émeraude colombienne */
  --cafe:       #6f4e37;    /* café colombien */

  --ink:    #faf4e6;
  --ink2:   rgba(250,244,230,.64);
  --ink3:   rgba(250,244,230,.28);

  --brd:    rgba(252,209,22,.18);
  --brdh:   rgba(252,209,22,.50);

  --fd: 'Lora', Georgia, serif;
  --fb: 'DM Sans', sans-serif;
  --fm: 'JetBrains Mono', monospace;

  --sw: 272px;
  --r: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--fb);
  background: var(--sb);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.82;
  background-image:
    radial-gradient(ellipse at 80% 20%, rgba(252,209,22,.10) 0, transparent 40%),
    radial-gradient(ellipse at 20% 85%, rgba(206,17,38,.07) 0, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(0,56,147,.06) 0, transparent 55%);
  background-attachment: fixed;
}

/* Feuillage tropical discret */
body::after {
  content: ''; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(252,209,22,.18), transparent 2px),
    radial-gradient(1px 1px at 78% 35%, rgba(252,209,22,.12), transparent 2px),
    radial-gradient(1px 1px at 42% 78%, rgba(252,209,22,.14), transparent 2px),
    radial-gradient(1px 1px at 88% 82%, rgba(252,209,22,.10), transparent 2px);
}

.progress-bar {
  position: fixed; top: 0; left: 0; height: 4px; width: 0%;
  background: linear-gradient(90deg, var(--amarillo) 0%, var(--amarillo) 50%, var(--azul) 50%, var(--azul) 75%, var(--rojo) 75%);
  z-index: 200; transition: width .08s linear;
  box-shadow: 0 1px 10px rgba(252,209,22,.5);
}

.page-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sw); flex-shrink: 0;
  background: var(--sb2);
  border-right: 1px solid var(--brd);
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto; display: flex; flex-direction: column;
  scrollbar-width: thin; scrollbar-color: var(--surf2) transparent;
}
.sidebar-header {
  padding: 28px 22px 22px;
  border-bottom: 1px solid var(--brd);
  position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(252,209,22,.06) 0%, transparent 100%);
}
.sidebar-header::after {
  content: '✦'; position: absolute; right: 12px; bottom: 4px;
  font-size: 2.5rem; color: rgba(252,209,22,.10); pointer-events: none;
}
.sidebar-back {
  font-family: var(--fm); font-size: .6rem; letter-spacing: .14em;
  color: var(--ink3); text-decoration: none; display: block; margin-bottom: 12px;
}
.sidebar-back:hover { color: var(--amarillo-2); }
.sidebar-title {
  font-family: var(--fd); font-size: 1.95rem; font-weight: 700;
  color: var(--amarillo-2); line-height: 1.0; font-style: italic;
}
.toc-nav { padding: 10px 0 14px; flex: 1; }
.toc-section-label {
  font-family: var(--fm); font-size: .58rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink3); padding: 8px 22px 4px;
}
.toc-link {
  display: block; padding: 5px 22px 5px 26px;
  font-family: var(--fb); font-size: .83rem;
  color: var(--ink2); text-decoration: none;
  border-left: 2px solid transparent; transition: all .15s;
}
.toc-link:hover, .toc-link.active {
  color: var(--amarillo-2); border-left-color: var(--amarillo); background: var(--amarillo-p);
}
.sidebar-nav { padding: 12px 22px; border-top: 1px solid var(--brd); }
.sidebar-nav p {
  font-family: var(--fm); font-size: .56rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink3); margin-bottom: 7px;
}
.sidebar-nav a {
  display: block; font-family: var(--fb); font-size: .8rem;
  color: var(--ink3); text-decoration: none; padding: 2px 0;
}
.sidebar-nav a:hover, .sidebar-nav a.current { color: var(--amarillo-2); }
.sidebar-nav a.current { font-weight: 700; }

.main { flex: 1; min-width: 0; padding: 0 58px 100px; max-width: 840px; }

.page-header {
  padding: 54px 0 36px; margin-bottom: 50px;
  border-bottom: 1px solid var(--brd); position: relative;
}
.page-header::before {
  content: '';
  position: absolute; top: 10px; right: 0;
  width: 3px; height: 70px;
  background: linear-gradient(180deg, var(--amarillo) 0%, var(--amarillo) 50%, var(--azul) 50%, var(--azul) 75%, var(--rojo) 75%);
  border-radius: 2px;
  opacity: .7;
}
.page-header::after {
  content: ''; position: absolute; bottom: -1px; left: 0;
  width: 160px; height: 2px;
  background: linear-gradient(90deg, var(--amarillo), var(--rojo), transparent);
  box-shadow: 0 0 12px rgba(252,209,22,.45);
}
.subject-tag {
  font-family: var(--fm); font-size: .62rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--amarillo-2); margin-bottom: 12px;
}
h1.page-title {
  font-family: var(--fd); font-size: 3.7rem; font-weight: 700;
  color: var(--ink); line-height: .95; font-style: italic;
  letter-spacing: -.015em;
}
h1.page-title .sub {
  color: var(--amarillo); font-style: normal; font-size: 1.15rem;
  display: block; margin-top: 8px;
  font-family: var(--fm); letter-spacing: .08em; font-weight: 400;
}
.page-intro { margin-top: 18px; font-size: 1.02rem; color: var(--ink2); font-style: italic; max-width: 570px; }

.section { margin-bottom: 60px; scroll-margin-top: 26px; }
h2.section-title {
  font-family: var(--fd); font-size: 2rem; font-weight: 700; font-style: italic;
  color: var(--ink); margin-bottom: 20px; padding-bottom: 8px;
  border-bottom: 1px solid var(--brd);
  display: flex; align-items: baseline; gap: 14px;
}
h2.section-title .num {
  font-family: var(--fm); font-size: .7rem; font-style: normal;
  color: var(--sb); background: var(--amarillo);
  padding: 3px 11px; border-radius: 20px; font-weight: 500;
  box-shadow: 0 0 10px rgba(252,209,22,.5);
}
h3.sub-title {
  font-family: var(--fd); font-size: 1.2rem; font-style: italic;
  color: var(--amarillo-2); margin: 26px 0 11px;
}
p { margin-bottom: .9em; } ul, ol { padding-left: 1.4em; margin-bottom: .9em; } li { margin-bottom: .3em; }

.box { padding: 15px 18px 13px; margin: 16px 0; border-radius: var(--r); border: 1px solid var(--brd); background: rgba(255,255,255,.03); }
.box-label { font-family: var(--fm); font-size: .62rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; display: block; margin-bottom: 8px; }
.box.def       { background: var(--amarillo-p); border-color: var(--brdh); } .box.def .box-label { color: var(--amarillo-2); }
.box.histoire  { background: var(--azul-p); border-left: 4px solid var(--azul-2); } .box.histoire .box-label { color: var(--azul-2); }
.box.technique { background: rgba(46,139,87,.08); border-left: 4px solid var(--esmeralda); } .box.technique .box-label { color: #60bf85; }
.box.conseil   { background: rgba(255,255,255,.05); border-left: 4px solid var(--amarillo-2); } .box.conseil .box-label { color: var(--amarillo-2); }
.box.attention { background: var(--rojo-p); border-left: 4px solid var(--rojo); } .box.attention .box-label { color: var(--rojo-2); }
.box.chiffres  { background: rgba(0,0,0,.4); border-color: var(--brdh); } .box.chiffres .box-label { color: var(--amarillo-2); }
.box.remark    { background: transparent; border-left: 3px solid var(--brd); padding-left: 20px; } .box.remark .box-label { color: var(--ink3); }

.detail-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--fd); font-style: italic; font-size: .9rem; font-weight: 600;
  color: var(--amarillo-2); border: 1px solid var(--amarillo);
  padding: 4px 14px; border-radius: 20px; cursor: pointer;
  background: transparent; margin-top: 8px; transition: all .18s; user-select: none;
}
.detail-toggle:hover { background: var(--amarillo); color: var(--sb); }
.detail-toggle .arrow { transition: transform .2s; font-style: normal; }
.detail-toggle.open .arrow { transform: rotate(90deg); }
.detail-content { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.detail-content.open { max-height: 900px; }
.detail-inner { margin-top: 10px; padding: 13px 18px; background: rgba(0,0,0,.3); border: 1px dashed var(--brd); border-radius: var(--r); color: var(--ink2); font-size: .93rem; }

.data-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .89rem; border-radius: var(--r); overflow: hidden; border: 1px solid var(--brd); }
.data-table th { background: rgba(0,0,0,.5); color: var(--amarillo-2); padding: 9px 14px; text-align: left; font-family: var(--fm); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; border-bottom: 1px solid var(--brdh); }
.data-table td { padding: 8px 14px; border-bottom: 1px solid var(--brd); vertical-align: top; }
.data-table tr:hover td { background: var(--amarillo-p); }
.data-table td:first-child { font-family: var(--fm); font-size: .8rem; color: var(--amarillo-2); }

code { font-family: var(--fm); font-size: .82em; background: rgba(0,0,0,.3); color: var(--amarillo-2); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--brd); }
em { color: var(--amarillo-2); font-style: italic; }
strong { color: var(--ink); font-weight: 600; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; } .two-col .box { margin: 0; }

.mobile-header { display: none; position: sticky; top: 0; z-index: 50; background: var(--sb2); border-bottom: 2px solid var(--amarillo); padding: 12px 18px; align-items: center; justify-content: space-between; }
.mobile-menu-btn { background: none; border: none; color: var(--amarillo-2); font-size: 1.3rem; cursor: pointer; }
.mobile-title { font-family: var(--fd); font-size: 1.05rem; color: var(--amarillo-2); font-style: italic; font-weight: 700; }
.mobile-drawer { display: none; position: fixed; inset: 0; z-index: 100; } .mobile-drawer.open { display: flex; }
.drawer-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.78); }
.drawer-panel { position: relative; z-index: 1; width: 272px; background: var(--sb2); height: 100%; overflow-y: auto; padding: 14px 0; border-right: 1px solid var(--brd); }

@media (max-width: 960px) {
  .sidebar { display: none; }
  .mobile-header { display: flex; }
  .main { padding: 0 20px 70px; }
  h1.page-title { font-size: 2.6rem; }
  .two-col { grid-template-columns: 1fr; }
  .page-header::before { display: none; }
}
