/* ═══════════════════════════════════════════════════════════════════
   ukraine.css — Thème : bleu ciel / jaune blé, vyshyvanka, résistance
   ═══════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  --ink:#1a1a1a;
  --paper:#fdfcf8;              /* blanc crème légèrement doré */
  --paper-2:#f4efdf;            /* jaune blé pâle */
  --ua-blue:#0057b7;            /* bleu drapeau */
  --ua-blue-d:#003870;
  --ua-yellow:#ffd700;           /* jaune blé */
  --ua-yellow-d:#d4a015;
  --red-accent:#b5261a;          /* rouge vyshyvanka */
  --line:rgba(26,26,26,.12);
  --muted:#5a5a5a;
  --fd:'Cormorant Garamond',Georgia,serif;
  --fb:'IBM Plex Sans',system-ui,sans-serif;
  --fm:'IBM Plex Mono',monospace;
  --sw:280px;--r:2px;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--fb);background:var(--paper);color:var(--ink);font-size:16.5px;line-height:1.78;
  background-image:
    linear-gradient(180deg,rgba(0,87,183,.04) 0%,transparent 50%,rgba(255,215,0,.06) 100%);
  background-attachment:fixed;
}
/* Motif vyshyvanka (broderie ukrainienne) en bordure */
body::before{
  content:'';position:fixed;top:0;left:0;right:0;height:10px;z-index:10;opacity:.9;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 10'><g fill='%23b5261a'><rect x='0' y='0' width='3' height='3'/><rect x='6' y='0' width='3' height='3'/><rect x='3' y='3' width='3' height='3'/><rect x='9' y='3' width='3' height='3'/><rect x='0' y='6' width='3' height='3'/><rect x='6' y='6' width='3' height='3'/><rect x='20' y='0' width='3' height='3'/><rect x='26' y='0' width='3' height='3'/><rect x='23' y='3' width='3' height='3'/><rect x='29' y='3' width='3' height='3'/><rect x='20' y='6' width='3' height='3'/><rect x='26' y='6' width='3' height='3'/></g></svg>");
  background-repeat:repeat-x;background-size:40px 10px;
}

.progress-bar{position:fixed;top:10px;left:0;height:4px;width:0;z-index:200;
  background:linear-gradient(90deg,var(--ua-blue) 50%,var(--ua-yellow) 50%)}

.page-layout{display:flex;min-height:100vh;padding-top:10px}
.sidebar{width:var(--sw);flex-shrink:0;background:#fff;border-right:1px solid var(--line);
  position:sticky;top:10px;height:calc(100vh - 10px);overflow-y:auto;display:flex;flex-direction:column;
  box-shadow:inset 0 -50vh 0 var(--ua-yellow);background-clip:content-box}
.sidebar{background:linear-gradient(180deg,#fff 0%,#fff 48%,var(--ua-yellow-d) 48%,var(--ua-yellow-d) 50%,var(--ua-yellow) 50%,var(--ua-yellow) 100%)}
.sidebar-header{padding:30px 24px 22px;background:var(--ua-blue);color:#fff;position:relative}
.sidebar-header::after{content:'';position:absolute;bottom:0;left:0;right:0;height:3px;background:var(--ua-yellow-d)}
.sidebar-back{display:block;font-family:var(--fm);font-size:.6rem;letter-spacing:.2em;
  text-decoration:none;color:rgba(255,215,0,.85);margin-bottom:12px;text-transform:uppercase;font-weight:500}
.sidebar-back:hover{color:#fff}
.sidebar-title{font-family:var(--fd);font-size:2.2rem;line-height:1;color:var(--ua-yellow);font-weight:700;letter-spacing:-.01em}
.toc-nav{padding:14px 0;flex:1;background:#fff}
.toc-section-label{font-family:var(--fm);font-size:.58rem;letter-spacing:.22em;text-transform:uppercase;
  color:var(--muted);padding:10px 24px 6px;font-weight:600}
.toc-link{display:block;padding:7px 24px;color:var(--ink);text-decoration:none;
  font-size:.9rem;font-weight:400;border-left:3px solid transparent;transition:all .18s}
.toc-link:hover,.toc-link.active{background:rgba(0,87,183,.06);border-left-color:var(--ua-blue);color:var(--ua-blue);font-weight:600}
.sidebar-nav{padding:16px 24px 22px;background:#fff;border-top:1px solid var(--line)}
.sidebar-nav p{font-family:var(--fm);font-size:.58rem;letter-spacing:.2em;text-transform:uppercase;
  color:var(--muted);margin:10px 0 8px;font-weight:600}
.sidebar-nav a{display:block;text-decoration:none;color:var(--ink);padding:3px 0;font-size:.88rem}
.sidebar-nav a:hover{color:var(--ua-blue)}
.sidebar-nav a.current{color:var(--ua-blue);font-weight:700}

.main{flex:1;min-width:0;max-width:900px;padding:0 62px 100px}
.page-header{padding:58px 0 38px;margin-bottom:44px;position:relative;
  background:linear-gradient(180deg,rgba(0,87,183,.06) 0%,rgba(0,87,183,.06) 50%,rgba(255,215,0,.12) 50%,rgba(255,215,0,.12) 100%);
  padding-left:26px;padding-right:26px;border-left:4px solid var(--ua-blue);border-right:4px solid var(--ua-yellow-d)}
.subject-tag{font-family:var(--fm);font-size:.62rem;letter-spacing:.22em;text-transform:uppercase;
  color:var(--ua-blue);margin-bottom:14px;font-weight:600}
.page-title{font-family:var(--fd);font-size:4.3rem;line-height:.96;color:var(--ink);font-weight:700;letter-spacing:-.02em}
.page-title .sub{display:block;font-size:1.08rem;font-family:var(--fm);letter-spacing:.06em;
  color:var(--ua-blue-d);margin-top:12px;font-weight:500}
.page-intro{margin-top:18px;max-width:640px;color:var(--muted);font-size:1.05rem;line-height:1.7}

.section{margin-bottom:58px;scroll-margin-top:24px}
.section-title{display:flex;align-items:baseline;gap:14px;font-family:var(--fd);font-size:2.2rem;
  font-weight:700;padding-bottom:10px;margin-bottom:20px;border-bottom:2px solid var(--ua-blue);color:var(--ink)}
.section-title .num{font-family:var(--fm);font-size:.66rem;color:var(--ua-blue-d);font-weight:700;
  background:var(--ua-yellow);padding:4px 11px;letter-spacing:.12em;border-radius:2px}

.box{margin:16px 0;padding:18px 20px 16px;background:#fff;border:1px solid var(--line);border-radius:var(--r)}
.box-label{display:block;font-family:var(--fm);font-size:.6rem;letter-spacing:.18em;
  text-transform:uppercase;margin-bottom:9px;font-weight:700}
.box.def{background:#fff;border-left:4px solid var(--ua-blue)}
.box.def .box-label{color:var(--ua-blue)}
.box.histoire{background:var(--paper-2);border-left:4px solid var(--ua-yellow-d)}
.box.histoire .box-label{color:var(--ua-yellow-d)}
.box.technique{background:#f2f2f2;border-left:4px solid var(--muted)}
.box.technique .box-label{color:var(--muted)}
.box.attention{background:#fbe8e6;border-left:4px solid var(--red-accent)}
.box.attention .box-label{color:var(--red-accent)}
.box.remark{background:transparent;border:none;border-left:3px solid var(--ua-yellow-d);padding-left:20px}
.box.remark .box-label{color:var(--ua-blue-d)}
.box.chiffres{background:var(--ua-blue-d);color:#fff;border:none;border-top:6px solid var(--ua-yellow)}
.box.chiffres .box-label{color:var(--ua-yellow)}
.box.chiffres p,.box.chiffres li{color:rgba(255,255,255,.9)}
.box p:last-child,.box ul:last-child{margin-bottom:0}
p{margin-bottom:.9em}ul{padding-left:1.35em;margin-bottom:.9em}li{margin-bottom:.3em}
strong{color:var(--ua-blue-d);font-weight:700}

.data-table{width:100%;border-collapse:collapse;margin:14px 0;font-size:.88rem;background:#fff}
.data-table th{background:var(--ua-blue);color:var(--ua-yellow);padding:10px 14px;text-align:left;
  font-family:var(--fm);font-size:.66rem;letter-spacing:.12em;text-transform:uppercase;font-weight:600}
.data-table td{padding:9px 14px;border-bottom:1px solid var(--line);vertical-align:top}
.data-table tr:last-child td{border-bottom:none}
.data-table td:first-child{font-weight:600;color:var(--ua-blue-d)}
.box.chiffres .data-table th{background:rgba(255,215,0,.15)}
.box.chiffres .data-table td{border-color:rgba(255,255,255,.14);color:rgba(255,255,255,.9)}
.box.chiffres .data-table td:first-child{color:var(--ua-yellow)}

.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:10px;z-index:50;background:var(--ua-blue);color:#fff;
  padding:12px 18px;align-items:center;justify-content:space-between;border-bottom:4px solid var(--ua-yellow)}
.mobile-menu-btn{background:none;border:none;color:var(--ua-yellow);font-size:1.3rem;cursor:pointer}
.mobile-title{font-family:var(--fd);font-size:1.15rem;color:var(--ua-yellow);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,.7)}
.drawer-panel{position:relative;z-index:1;width:280px;background:#fff;height:100%;
  overflow-y:auto;padding:14px 0;border-right:4px solid var(--ua-blue)}
@media(max-width:960px){
  .sidebar{display:none}.mobile-header{display:flex}.main{padding:0 20px 72px}
  .page-title{font-size:2.7rem}.two-col{grid-template-columns:1fr}
}
