/* ═══════════════════════════════════════════════════════════════════
   australie.css — Thème : Outback, ocre rouge, eucalyptus, ciel immense
   Polices : Source Sans 3 (corps moderne) + Spectral (titres serif) + Fira Code
   ═══════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=Spectral:ital,opsz,wght@0,6..22,300;0,6..22,400;0,6..22,600;1,6..22,300;1,6..22,400&family=Fira+Code:wght@400;500&display=swap');

:root {
  --earth:    #100800;
  --earth-2:  #1a0e00;
  --surface:  #241400;
  --surface-2:#2e1a00;

  --rust:     #C04020;
  --rust-2:   #d85030;
  --rust-3:   #f07050;
  --rust-pale:rgba(192,64,32,.09);
  --rust-dim: rgba(192,64,32,.35);
  --sand:     #d0a040;
  --sand-pale:rgba(208,160,64,.08);
  --green-au: #4a7a30;
  --green-pale:rgba(74,122,48,.09);
  --sky-au:   #5090c0;
  --sky-pale: rgba(80,144,192,.08);

  --ink:      #f8e8d0;
  --ink-mid:  rgba(248,232,208,.6);
  --ink-dim:  rgba(248,232,208,.26);

  --border:   rgba(192,64,32,.2);
  --border-hi:rgba(192,64,32,.5);

  --fd: 'Spectral', Georgia, serif;
  --fb: 'Source Sans 3', sans-serif;
  --fm: 'Fira Code', monospace;

  --sidebar-w: 272px;
  --radius: 6px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--fb);
  background: var(--earth);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.8;
  background-image:
    radial-gradient(ellipse at 70% 20%, rgba(192,64,32,.13) 0, transparent 45%),
    radial-gradient(ellipse at 20% 80%, rgba(208,160,64,.08) 0, transparent 38%),
    repeating-linear-gradient(135deg, transparent, transparent 59px, rgba(192,64,32,.015) 59px, rgba(192,64,32,.015) 60px);
  background-attachment: fixed;
}

.progress-bar {
  position: fixed; top: 0; left: 0; height: 4px; width: 0%;
  background: linear-gradient(90deg, var(--rust), var(--sand), var(--rust));
  z-index: 200; transition: width .08s linear;
  box-shadow: 0 1px 8px rgba(192,64,32,.4);
}

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

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--earth-2);
  border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto; display: flex; flex-direction: column;
  scrollbar-width: thin; scrollbar-color: var(--surface-2) transparent;
}
.sidebar-header {
  padding: 28px 22px 22px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(192,64,32,.06), transparent);
}
.sidebar-back {
  font-family: var(--fm); font-size: .6rem; letter-spacing: .14em;
  color: var(--ink-dim); text-decoration: none; display: block; margin-bottom: 12px;
}
.sidebar-back:hover { color: var(--rust-3); }
.sidebar-title {
  font-family: var(--fd); font-size: 1.8rem; font-weight: 600;
  color: var(--rust-3); line-height: 1.1; 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(--ink-dim); padding: 8px 22px 4px;
}
.toc-link {
  display: block; padding: 5px 22px 5px 26px;
  font-family: var(--fb); font-size: .84rem; font-weight: 400;
  color: var(--ink-mid); text-decoration: none;
  border-left: 2px solid transparent; transition: all .15s;
}
.toc-link:hover, .toc-link.active {
  color: var(--rust-3); border-left-color: var(--rust); background: var(--rust-pale);
}
.sidebar-nav { padding: 12px 22px; border-top: 1px solid var(--border); }
.sidebar-nav p {
  font-family: var(--fm); font-size: .56rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-dim); margin-bottom: 7px;
}
.sidebar-nav a {
  display: block; font-family: var(--fb); font-size: .82rem;
  color: var(--ink-dim); text-decoration: none; padding: 2px 0;
}
.sidebar-nav a:hover, .sidebar-nav a.current { color: var(--rust-3); }
.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(--border); position: relative;
}
.page-header::after {
  content: ''; position: absolute; bottom: -1px; left: 0;
  width: 130px; height: 2px;
  background: linear-gradient(90deg, var(--rust), var(--sand), transparent);
}
.subject-tag {
  font-family: var(--fm); font-size: .62rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--rust-3); margin-bottom: 12px;
}
h1.page-title {
  font-family: var(--fd); font-size: 3.5rem; font-weight: 600;
  color: var(--ink); line-height: .96; font-style: italic;
}
h1.page-title .sub {
  color: var(--rust-3); font-style: normal; font-size: 1.2rem;
  display: block; margin-top: 6px;
  font-family: var(--fm); letter-spacing: .06em;
}
.page-intro { margin-top: 16px; font-size: 1rem; color: var(--ink-mid); max-width: 520px; }

.section { margin-bottom: 60px; scroll-margin-top: 24px; }

h2.section-title {
  font-family: var(--fd); font-size: 1.85rem; font-weight: 600;
  font-style: italic; color: var(--ink);
  margin-bottom: 18px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: baseline; gap: 14px;
}
h2.section-title .num {
  font-family: var(--fm); font-size: .7rem; font-style: normal;
  color: var(--earth); background: var(--rust);
  padding: 2px 10px; border-radius: 20px; font-weight: 400;
}
h3.sub-title {
  font-family: var(--fd); font-size: 1.2rem; font-weight: 600;
  font-style: italic; color: var(--rust-3); margin: 24px 0 10px;
}
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(--radius); border: 1px solid var(--border); background: rgba(255,255,255,.04); }
.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(--rust-pale); border-color: var(--rust-dim); } .box.def .box-label { color: var(--rust-3); }
.box.histoire  { background: var(--sand-pale); border-left: 4px solid var(--sand); } .box.histoire .box-label { color: var(--sand); }
.box.technique { background: rgba(255,255,255,.05); border-left: 4px solid var(--rust-2); } .box.technique .box-label { color: var(--rust-2); }
.box.conseil   { background: var(--green-pale); border-left: 4px solid var(--green-au); } .box.conseil .box-label { color: #70b050; }
.box.attention { background: rgba(255,60,40,.08); border-left: 4px solid #f05040; } .box.attention .box-label { color: #f07060; }
.box.chiffres  { background: rgba(0,0,0,.35); border-color: var(--border-hi); } .box.chiffres .box-label { color: var(--rust-3); }
.box.remark    { background: transparent; border-left: 3px solid var(--border); padding-left: 20px; } .box.remark .box-label { color: var(--ink-dim); }

.detail-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--fd); font-style: italic; font-size: .9rem;
  color: var(--rust-3); border: 1px solid var(--rust);
  padding: 4px 14px; border-radius: 20px; cursor: pointer;
  background: transparent; margin-top: 8px; transition: all .18s; user-select: none;
}
.detail-toggle:hover { background: var(--rust); color: var(--earth); }
.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(--border); border-radius: var(--radius); color: var(--ink-mid); font-size: .93rem; }

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

code { font-family: var(--fm); font-size: .82em; background: rgba(0,0,0,.3); color: var(--rust-3); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); }
.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(--earth-2); border-bottom: 2px solid var(--rust); padding: 12px 18px; align-items: center; justify-content: space-between; }
.mobile-menu-btn { background: none; border: none; color: var(--rust-3); font-size: 1.3rem; cursor: pointer; }
.mobile-title { font-family: var(--fd); font-size: 1rem; color: var(--rust-3); font-style: italic; }
.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,.75); }
.drawer-panel { position: relative; z-index: 1; width: 272px; background: var(--earth-2); height: 100%; overflow-y: auto; padding: 14px 0; border-right: 1px solid var(--border); }
@media (max-width: 960px) { .sidebar { display: none; } .mobile-header { display: flex; } .main { padding: 0 18px 70px; } h1.page-title { font-size: 2.6rem; } .two-col { grid-template-columns: 1fr; } }
