/* ═══════════════════════════════════════════════════════════════════
   arctique.css — Thème : Banquise, glace cristalline, aurore boréale
   Polices : Raleway ultra-light (titres) + Source Serif 4 (corps) + JetBrains Mono
   ═══════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100;0,200;0,300;0,400;0,600;0,700;1,200;1,300;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;1,8..60,300;1,8..60,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --abyss:    #020c1e;
  --abyss-2:  #040e28;
  --surface:  #071430;
  --surface-2:#0a1a38;

  --ice:      #60c8f8;
  --ice-2:    #a0deff;
  --ice-3:    #d0f0ff;
  --ice-pale: rgba(96,200,248,.08);
  --ice-dim:  rgba(96,200,248,.3);
  --aurora-g: #40d0a0;
  --aurora-v: #9060e0;
  --aurora-pale: rgba(64,208,160,.08);

  --ink:      #d0f0ff;
  --ink-mid:  rgba(208,240,255,.58);
  --ink-dim:  rgba(208,240,255,.25);

  --border:   rgba(96,200,248,.15);
  --border-hi:rgba(96,200,248,.4);

  --fd: 'Raleway', sans-serif;
  --fb: 'Source Serif 4', Georgia, serif;
  --fm: 'JetBrains Mono', monospace;

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

body {
  font-family: var(--fb);
  background: var(--abyss);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.84;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(96,200,248,.14) 0, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(64,208,160,.06) 0, transparent 35%),
    radial-gradient(ellipse at 80% 60%, rgba(144,96,224,.05) 0, transparent 30%),
    linear-gradient(rgba(96,200,248,.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,200,248,.015) 1px, transparent 1px);
  background-size: 100%, 100%, 100%, 60px 60px, 60px 60px;
  background-attachment: fixed;
}

.progress-bar {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--aurora-v), var(--ice), var(--aurora-g), var(--ice), var(--aurora-v));
  z-index: 200; transition: width .08s linear;
  box-shadow: 0 1px 12px rgba(96,200,248,.5);
}

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

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: rgba(4,14,40,.8);
  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;
  backdrop-filter: blur(2px);
}
.sidebar-header { padding: 28px 22px 22px; border-bottom: 1px solid var(--border); }
.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(--ice); }
.sidebar-title {
  font-family: var(--fd); font-size: 1.9rem; font-weight: 200;
  color: var(--ice-3); line-height: 1.1; font-style: normal;
  letter-spacing: .08em;
}
.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(--fd); font-size: .84rem; font-weight: 300; letter-spacing: .04em;
  color: var(--ink-mid); text-decoration: none;
  border-left: 1px solid transparent; transition: all .15s;
}
.toc-link:hover, .toc-link.active {
  color: var(--ice-2); border-left-color: var(--ice); background: var(--ice-pale);
  font-weight: 400;
}
.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(--fd); font-size: .82rem; font-weight: 300;
  color: var(--ink-dim); text-decoration: none; padding: 2px 0;
}
.sidebar-nav a:hover, .sidebar-nav a.current { color: var(--ice); }
.sidebar-nav a.current { font-weight: 600; }

.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: 160px; height: 1px;
  background: linear-gradient(90deg, var(--aurora-v), var(--ice), var(--aurora-g), transparent);
  box-shadow: 0 0 12px rgba(96,200,248,.4);
}
.subject-tag {
  font-family: var(--fm); font-size: .62rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ice); margin-bottom: 12px; opacity: .8;
}
h1.page-title {
  font-family: var(--fd); font-size: 3.6rem; font-weight: 200;
  color: var(--ink); line-height: .95; letter-spacing: .04em;
  text-shadow: 0 0 40px rgba(96,200,248,.25);
}
h1.page-title .sub {
  color: var(--ice); font-size: 1.2rem; display: block; margin-top: 6px;
  font-weight: 300; letter-spacing: .06em;
}
.page-intro {
  margin-top: 16px; font-size: 1rem;
  color: var(--ink-mid); font-style: italic; max-width: 520px;
}

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

h2.section-title {
  font-family: var(--fd); font-size: 1.8rem; font-weight: 300;
  letter-spacing: .04em; color: var(--ink);
  margin-bottom: 18px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
}
h2.section-title .num {
  font-family: var(--fm); font-size: .7rem; font-weight: 400;
  color: var(--abyss); background: var(--ice);
  padding: 2px 10px; border-radius: 3px;
  box-shadow: 0 0 8px rgba(96,200,248,.4);
}
h3.sub-title {
  font-family: var(--fd); font-size: 1.2rem; font-weight: 400;
  color: var(--ice-2); margin: 24px 0 10px; letter-spacing: .03em;
}
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(--ice-pale); border-color: var(--border-hi); } .box.def .box-label { color: var(--ice); }
.box.histoire  { background: rgba(255,255,255,.05); border-left: 3px solid rgba(255,255,255,.4); } .box.histoire .box-label { color: rgba(255,255,255,.5); }
.box.technique { background: rgba(64,208,160,.06); border-left: 3px solid var(--aurora-g); } .box.technique .box-label { color: var(--aurora-g); }
.box.conseil   { background: rgba(144,96,224,.07); border-left: 3px solid var(--aurora-v); } .box.conseil .box-label { color: #b898f0; }
.box.attention { background: rgba(255,80,60,.08); border-left: 3px solid #f07060; } .box.attention .box-label { color: #f07060; }
.box.chiffres  { background: rgba(0,0,0,.4); border-color: var(--border-hi); } .box.chiffres .box-label { color: var(--ice); }
.box.remark    { background: transparent; border-left: 2px 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-size: .82rem; font-weight: 400; letter-spacing: .04em;
  color: var(--ice); border: 1px solid var(--ice);
  padding: 4px 14px; border-radius: 3px; cursor: pointer;
  background: transparent; margin-top: 8px; transition: all .18s; user-select: none;
}
.detail-toggle:hover { background: var(--ice); color: var(--abyss); }
.detail-toggle .arrow { transition: transform .2s; }
.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,.35); 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(--ice); 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(--ice-pale); }
.data-table td:first-child { font-family: var(--fm); font-size: .8rem; color: var(--ice-2); }

code { font-family: var(--fm); font-size: .82em; background: rgba(0,0,0,.35); color: var(--ice); padding: 2px 6px; border-radius: 3px; 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: rgba(4,14,40,.95); border-bottom: 1px solid var(--border); padding: 12px 18px; align-items: center; justify-content: space-between; }
.mobile-menu-btn { background: none; border: none; color: var(--ice); font-size: 1.3rem; cursor: pointer; }
.mobile-title { font-family: var(--fd); font-size: 1.1rem; color: var(--ice); font-weight: 200; letter-spacing: .08em; }
.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,.8); }
.drawer-panel { position: relative; z-index: 1; width: 270px; background: var(--abyss-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; } }
