/* ═══════════════════════════════════════════════════════════
   check-certificat.com — shared stylesheet
   IBM Plex Mono + IBM Plex Sans — dark terminal aesthetic
═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;600;700&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg:        #0a0c10;
  --surface:   #0f1218;
  --surface2:  #151921;
  --surface3:  #1b2030;
  --border:    #1e2535;
  --border2:   #28334a;
  --border3:   #334060;
  --text:      #b8c4d8;
  --text-hi:   #e2e8f4;
  --muted:     #4a5570;
  --muted2:    #38425a;
  --cyan:      #22d3ee;
  --cyan-dim:  #0e4a55;
  --green:     #34d399;
  --green-dim: #0a2e20;
  --amber:     #fbbf24;
  --amber-dim: #2a1e08;
  --red:       #f87171;
  --red-dim:   #2a0f0f;
  --blue:      #60a5fa;
  --blue-dim:  #0d1f3c;
  --mono:      'IBM Plex Mono', monospace;
  --sans:      'IBM Plex Sans', sans-serif;
  --nav-w:     220px;
  --radius:    4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
body { font-family: var(--mono); font-size: 15px; color: var(--text); line-height: 1.75; background: var(--bg); }

/* ── NAV ── */
.sidenav {
  position: fixed; top: 0; left: 0;
  width: var(--nav-w); height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border2);
  display: flex; flex-direction: column;
  z-index: 100; overflow-y: auto;
}
.nav-brand {
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border2);
}
.nav-brand-name {
  font-size: 15px; font-weight: 700;
  color: var(--cyan); letter-spacing: -.02em;
  line-height: 1.2;
}
.nav-brand-ver {
  font-size: 11px; color: var(--muted);
  letter-spacing: .06em; margin-top: 3px;
}
.nav-section {
  font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); padding: 1rem 1.25rem .35rem;
}
.nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: .45rem 1.25rem;
  font-size: 13px; color: var(--text);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all .12s;
}
.nav-link:hover { color: var(--cyan); background: var(--surface2); }
.nav-link.active { color: var(--cyan); border-left-color: var(--cyan); background: var(--surface2); }
.nav-link .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted2); flex-shrink: 0;
  transition: background .12s;
}
.nav-link:hover .dot, .nav-link.active .dot { background: var(--cyan); }
.nav-footer {
  margin-top: auto; padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--muted);
  line-height: 1.6;
}
.nav-ssl {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--green);
  background: var(--green-dim); border: 1px solid #0f3d2a;
  border-radius: 3px; padding: 2px 7px; margin-bottom: 6px;
  letter-spacing: .04em;
}

/* ── MAIN CONTENT ── */
.main {
  margin-left: var(--nav-w);
  min-height: 100vh;
}
.page-content {
  max-width: 1100px;
  padding: 3rem 2.5rem 6rem;
}

/* ── TOPBAR ── */
.topbar {
  border-bottom: 1px solid var(--border);
  padding: .6rem 2.5rem;
  display: flex; align-items: center; gap: .5rem;
  background: var(--surface);
  font-size: 12px; color: var(--muted);
  letter-spacing: .02em;
}
.topbar a { color: var(--muted); text-decoration: none; }
.topbar a:hover { color: var(--cyan); }
.topbar-sep { color: var(--muted2); }

/* ── PAGE HEADER ── */
.page-header { margin-bottom: 2.5rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--border2); }
.page-eyebrow { font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: .5rem; }
.page-title { font-size: 23px; font-weight: 700; color: var(--text-hi); letter-spacing: -.025em; line-height: 1.2; }
.page-title span { color: var(--cyan); }
.page-subtitle { margin-top: .5rem; font-size: 14px; color: var(--muted); font-family: var(--sans); font-weight: 300; }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  padding: 2px 8px; border-radius: 3px; letter-spacing: .04em; white-space: nowrap;
}
.b-cyan   { background: var(--cyan-dim);  color: var(--cyan);  border: 1px solid #1a5565; }
.b-green  { background: var(--green-dim); color: var(--green); border: 1px solid #1a3d2a; }
.b-amber  { background: var(--amber-dim); color: var(--amber); border: 1px solid #3d2a0a; }
.b-red    { background: var(--red-dim);   color: var(--red);   border: 1px solid #3d1515; }
.b-blue   { background: var(--blue-dim);  color: var(--blue);  border: 1px solid #1a2f52; }
.b-gray   { background: var(--surface3);  color: var(--muted); border: 1px solid var(--border2); }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.card-title { font-size: 13px; font-weight: 600; color: var(--text-hi); margin-bottom: .35rem; }
.card-body  { font-size: 13px; color: var(--text); font-family: var(--sans); line-height: 1.6; }

/* ── SECTION LABELS ── */
.sec { margin-bottom: 2.25rem; }
.sec-label {
  font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: .85rem;
  display: flex; align-items: center; gap: .6rem;
}
.sec-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── CODE ── */
code {
  font-family: var(--mono); font-size: 12px;
  background: var(--surface3); color: var(--cyan);
  padding: 1px 6px; border-radius: 3px;
  border: 1px solid var(--border2);
}
pre {
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 1rem 1.1rem;
  font-family: var(--mono); font-size: 13px; color: var(--text);
  line-height: 1.65; overflow-x: auto;
}
pre code { background: none; border: none; padding: 0; font-size: inherit; }

/* ── DOWNLOAD BUTTON ── */
.btn-dl {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: var(--bg); background: var(--cyan);
  border: none; border-radius: var(--radius);
  padding: .55rem 1.1rem; cursor: pointer;
  text-decoration: none; transition: opacity .12s;
  letter-spacing: .02em;
}
.btn-dl:hover { opacity: .85; }
.btn-outline {
  background: transparent; color: var(--cyan);
  border: 1px solid var(--cyan-dim);
}
.btn-outline:hover { background: var(--cyan-dim); opacity: 1; }

/* ── TABLE ── */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { background: var(--surface3); color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: .5rem .75rem; border-bottom: 1px solid var(--border2); text-align: left; font-weight: 500; }
.tbl td { padding: .55rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tr:hover td { background: var(--surface2); }

/* ── ALERT ── */
.alert {
  border-radius: var(--radius); padding: .75rem 1rem;
  font-size: 13px; font-family: var(--sans); line-height: 1.6;
  border-left: 3px solid;
}
.alert-info  { background: var(--blue-dim);  color: var(--blue);  border-color: var(--blue); }
.alert-ok    { background: var(--green-dim); color: var(--green); border-color: var(--green); }
.alert-warn  { background: var(--amber-dim); color: var(--amber); border-color: var(--amber); }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border); padding: 1.5rem 2.5rem;
  font-size: 11px; color: var(--muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  font-family: var(--mono);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  :root { --nav-w: 0px; }
  .sidenav { transform: translateX(-220px); transition: transform .2s; }
  .sidenav.open { transform: translateX(0); width: 220px; }
  .main { margin-left: 0; }
  .page-content { padding: 1.5rem 1rem 4rem; }
}

/* ── LANG SWITCHER ── */
.lang-switch {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex; align-items: center; gap: 2px;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 6px; padding: 3px;
  box-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.lang-btn {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 4px; border: none; cursor: pointer;
  background: transparent; color: var(--muted);
  letter-spacing: .05em; transition: all .15s;
}
.lang-btn.active { background: var(--blue); color: #fff; }
.lang-btn:not(.active):hover { color: var(--text-hi); background: var(--surface3); }

/* ── i18n visibility ── */
[data-lang]:not(.lang-btn) { display: none; }
.lang-fr [data-lang="fr"] { display: revert; }
.lang-en [data-lang="en"] { display: revert; }
/* inline elements need inline display */
span[data-lang], a[data-lang], strong[data-lang], code[data-lang] {
  display: none;
}
.lang-fr span[data-lang="fr"],
.lang-fr a[data-lang="fr"],
.lang-fr strong[data-lang="fr"],
.lang-fr code[data-lang="fr"] { display: inline; }
.lang-en span[data-lang="en"],
.lang-en a[data-lang="en"],
.lang-en strong[data-lang="en"],
.lang-en code[data-lang="en"] { display: inline; }

/* ── PREV / NEXT PAGE BUTTON ── */
.btn-prev {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--muted); background: var(--surface2);
  border: 1px solid var(--border2); border-radius: var(--radius);
  padding: .35rem .8rem; cursor: pointer;
  text-decoration: none; transition: all .15s;
  letter-spacing: .02em; white-space: nowrap;
}
.btn-prev:hover { color: var(--cyan); border-color: var(--cyan-dim); background: var(--surface3); }
.btn-prev::before { content: '←'; font-size: 13px; }

/* Sticky prev-button in topbar */
.topbar-prev {
  margin-left: auto;
}

/* ── REPORT PAGES — font normalization ── */
/* Override rem-based sizes from legacy report styles */
.report-body h1  { font-size: 1.6rem !important; color: var(--cyan); }
.report-body h2  { font-size: 1.1rem !important; color: var(--text-hi); margin-top: 1.5rem; }
.report-body h3  { font-size: 0.95rem !important; color: var(--blue); margin-top: 1rem; }
.report-body p,
.report-body li,
.report-body td,
.report-body th  { font-size: 14px !important; }
.report-body code { font-size: 13px !important; }
.report-body table { font-size: 14px !important; }
.report-body .num  { font-size: 1.4rem !important; }
.report-body .label{ font-size: 13px !important; }
.report-body .meta { font-size: 12px !important; }

/* ── PAGE WIDTH — harmonized ── */
.page-content {
  max-width: 1100px !important;
  width: 100%;
}

/* ── div[data-lang] for report pages ── */
div[data-lang]  { display: none; }
.lang-fr div[data-lang="fr"] { display: block; }
.lang-en div[data-lang="en"] { display: block; }

/* ── NAV PREV BUTTON (left sidebar) ── */
.nav-prev-section {
  padding: .6rem 1.25rem .4rem;
  border-bottom: 1px solid var(--border);
}
.btn-prev-nav {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--muted); text-decoration: none;
  transition: color .12s;
  letter-spacing: .02em;
}
.btn-prev-nav:hover { color: var(--cyan); }

/* div[data-lang] for report pages */
div[data-lang]  { display: none; }
.lang-fr div[data-lang="fr"] { display: block; }
.lang-en div[data-lang="en"] { display: block; }

/* ══════════════════════════════════════════════════════════
   FONT NORMALIZATION — canonical scale (ref: rapport_technique)
   Applies site-wide; overrides legacy rem/hardcoded sizes
══════════════════════════════════════════════════════════ */
h1 { font-family: var(--sans); font-size: 26px; font-weight: 800;
     color: var(--text-hi); letter-spacing: -.02em; line-height: 1.2; margin-bottom: 1rem; }
h2 { font-family: var(--sans); font-size: 18px; font-weight: 700;
     color: var(--text-hi); margin-bottom: 1.2rem; margin-top: 1.6rem; }
h3 { font-family: var(--sans); font-size: 15px; font-weight: 700;
     color: var(--blue);    margin: 1.4rem 0 .6rem; }
h4 { font-family: var(--sans); font-size: 13px; font-weight: 600;
     color: var(--text-hi); margin: 1rem 0 .4rem; }
p  { font-family: var(--mono); font-size: 13px; line-height: 1.75; color: var(--text);
     margin-bottom: .75rem; }
li { font-family: var(--mono); font-size: 13px; line-height: 1.75; }
table { font-family: var(--mono); font-size: 12px; width: 100%; border-collapse: collapse; }
th    { font-family: var(--mono); font-size: 11px; font-weight: 500;
        letter-spacing: .06em; text-transform: uppercase;
        background: var(--surface2); color: var(--muted);
        padding: .5rem .85rem; text-align: left;
        border-bottom: 1px solid var(--border2); }
td    { font-family: var(--mono); font-size: 12px; padding: .45rem .85rem;
        border-bottom: 1px solid var(--border); vertical-align: top; }
tr:hover td { background: var(--surface2); }
code  { font-family: var(--mono); font-size: 12px; color: var(--cyan);
        background: var(--surface2); padding: 1px 5px; border-radius: 3px;
        border: 1px solid var(--border2); }
pre   { font-family: var(--mono); font-size: 12px; line-height: 1.65;
        background: var(--bg); border: 1px solid var(--border);
        border-radius: 6px; padding: 1rem 1.2rem; overflow-x: auto;
        color: var(--text); margin-bottom: 1rem; }
