/* ============================================
   Documentation Technique – Zabbix
   Feuille de styles principale
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600&family=Lato:wght@300;400;700&display=swap');

/* ---- Variables ---- */
:root {
  --violet-h2:    #9B2FC9;        /* violet de la photo Zabbix          */
  --bg-dark:      #1a1c23;
  --bg-panel:     #22252f;
  --bg-card:      #2b2f3a;
  --border-color: #3a3f50;
  --text-main:    #d4d8e8;
  --text-muted:   #8890aa;
  --accent-red:   #e45c4a;
  --accent-orange:#e8964a;
  --accent-green: #5cc98b;
  --accent-blue:  #4ab0e8;
  --font-body:    'Lato', sans-serif;
  --font-code:    'Source Code Pro', monospace;
  --font-title:   'Times New Roman', Times, serif;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
}

/* ---- Header ---- */
header {
  background: linear-gradient(135deg, #12131a 0%, #1f2130 100%);
  border-bottom: 2px solid var(--accent-red);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-badge {
  background: var(--accent-red);
  color: #fff;
  font-family: var(--font-code);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
}

.logo-title {
  font-family: var(--font-code);
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 0.05em;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  margin-left: 1.8rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

nav a:hover { color: #fff; }

/* ---- Layout ---- */
.page-wrapper {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}

/* ---- Sidebar ---- */
aside {
  background: var(--bg-panel);
  border-right: 1px solid var(--border-color);
  padding: 2rem 1.25rem;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

aside h1 {
  font-family: var(--font-code);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-red);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

aside ul { list-style: none; }

aside ul li { margin: 0.15rem 0; }

aside ul li a {
  display: block;
  padding: 0.45rem 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  border-radius: 5px;
  transition: background 0.15s, color 0.15s;
}

aside ul li a:hover,
aside ul li a.active {
  background: var(--bg-card);
  color: #fff;
}

aside ul li a.active {
  border-left: 3px solid var(--violet-h2);
  padding-left: calc(0.75rem - 3px);
}

/* ---- Main content ---- */
main {
  padding: 3rem 3.5rem;
  max-width: 960px;
}

/* ---- Headings ---- */
h1 {
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

/* H2 : violet + Times */
h2 {
  font-family: 'Times New Roman', Times, serif !important;
  font-size: 1.55rem;
  color: var(--violet-h2) !important;
  margin: 2.5rem 0 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
  letter-spacing: 0.01em;
}

h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-orange);
  margin: 1.8rem 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
}

/* ---- Paragraphs & text ---- */
p {
  color: var(--text-main);
  margin-bottom: 1rem;
  max-width: 72ch;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

a:hover { border-bottom-color: var(--accent-blue); }

/* ---- Intro badge ---- */
.intro-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.badge {
  font-family: var(--font-code);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.badge-version { background: #2e3a28; color: var(--accent-green); }
.badge-type    { background: #2a2240; color: #b08ef5; }
.badge-updated { background: #1e2838; color: var(--accent-blue); }

/* ---- Image block ---- */
.img-block {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.img-block img {
  width: 100%;
  display: block;
}

.img-caption {
  background: var(--bg-panel);
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-code);
}

/* ---- Info / Warning boxes ---- */
.callout {
  border-left: 4px solid;
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.93rem;
}

.callout-info    { border-color: var(--accent-blue);   background: rgba(74,176,232,0.07); }
.callout-warning { border-color: var(--accent-orange); background: rgba(232,150,74,0.07); }
.callout-success { border-color: var(--accent-green);  background: rgba(92,201,139,0.07); }

.callout-label {
  font-family: var(--font-code);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.callout-info    .callout-label { color: var(--accent-blue);   }
.callout-warning .callout-label { color: var(--accent-orange); }
.callout-success .callout-label { color: var(--accent-green);  }

/* ---- Feature grid ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--violet-h2);
  transform: translateY(-2px);
}

.feature-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.feature-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.feature-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* ---- Code blocks ---- */
code {
  font-family: var(--font-code);
  font-size: 0.85em;
  background: var(--bg-card);
  color: var(--accent-green);
  padding: 2px 6px;
  border-radius: 3px;
}

pre {
  background: #0f1117;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--font-code);
  font-size: 0.85rem;
  line-height: 1.65;
  color: #c8d0e8;
}

/* ---- Stats bar (JS-animated) ---- */
.stat-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.6rem 0;
  font-size: 0.88rem;
}

.stat-label { width: 150px; color: var(--text-muted); flex-shrink: 0; }

.stat-bar-bg {
  flex: 1;
  height: 8px;
  background: var(--bg-card);
  border-radius: 100px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 100px;
  width: 0;                    /* starts at 0, animated by JS */
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-val { width: 36px; text-align: right; color: #fff; font-family: var(--font-code); }

/* ---- Footer ---- */
footer {
  grid-column: 1 / -1;
  background: var(--bg-panel);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 3.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer a { color: var(--accent-blue); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .page-wrapper { grid-template-columns: 1fr; }
  aside { display: none; }
  main  { padding: 2rem 1.25rem; }
  footer{ flex-direction: column; gap: 0.5rem; }
}
