/* ============================
   NOOBS — Terminal Dark Theme
   Palette: GitHub Dark
   Typo: IBM Plex Mono + Sora + Plus Jakarta Sans
   ============================ */

:root {
  --bg: #0d1117;
  --bg2: #161b22;
  --bg3: #21262d;
  --border: #30363d;
  --border-hover: #484f58;
  --text: #e6edf3;
  --text2: #8b949e;
  --text3: #484f58;
  --blue: #58a6ff;
  --blue-hover: #79c0ff;
  --green: #3fb950;
  --green-bg: #238636;
  --red: #f85149;
  --purple: #bc8cff;
  --orange: #d29922;
  --cyan: #39d2c0;
}

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* === BASE === */
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === LINKS === */
a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--blue-hover); }

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', sans-serif;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.3;
}
h1 { font-size: 32px; font-weight: 700; margin-bottom: 16px; }
h2 { font-size: 24px; font-weight: 600; margin: 36px 0 14px; }
h3 { font-size: 18px; font-weight: 600; margin: 28px 0 10px; }
h4 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }

p { margin-bottom: 16px; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

img { max-width: 100%; height: auto; }

/* === NAVIGATION === */
.nav {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.nav-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 20px;
  color: var(--blue);
  text-decoration: none;
}
.logo span {
  color: var(--text2);
  font-weight: 400;
}
.logo:hover { color: var(--blue-hover); }
.menu {
  display: flex;
  gap: 24px;
  list-style: none;
}
.menu a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--text2);
  text-decoration: none;
  transition: color 0.2s;
  padding: 4px 0;
}
.menu a:hover,
.menu a.active {
  color: var(--blue);
}

/* === HERO (page d'accueil) === */
.hero-text {
  padding: 52px 0 36px;
}
.hero-text h1 {
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -1px;
}
.hero-text h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #58a6ff, #79c0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-text p {
  color: var(--text2);
  font-size: 16px;
  max-width: 560px;
  margin-top: 12px;
}

/* === SEARCH === */
.search-box {
  margin: 24px 0 36px;
  display: flex;
  gap: 8px;
}
.search-box input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.search-box input::placeholder { color: var(--text3); }
.search-box input:focus { border-color: var(--blue); }
.search-box button {
  background: var(--green-bg);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
.search-box button:hover { background: #2ea043; }

/* === POST GRID (page d'accueil) === */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.post-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
}
.post-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.post-card .tag {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(88, 166, 255, 0.1);
  color: var(--blue);
  border: 1px solid rgba(88, 166, 255, 0.15);
  margin-bottom: 10px;
}
.post-card .tag.vmware { background: rgba(99, 102, 241, 0.12); color: #818cf8; border-color: rgba(99, 102, 241, 0.2); }
.post-card .tag.windows { background: rgba(56, 189, 248, 0.1); color: #38bdf8; border-color: rgba(56, 189, 248, 0.15); }
.post-card .tag.powershell { background: rgba(52, 211, 153, 0.1); color: #34d399; border-color: rgba(52, 211, 153, 0.15); }
.post-card .tag.linux { background: rgba(251, 146, 60, 0.1); color: #fb923c; border-color: rgba(251, 146, 60, 0.15); }
.post-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.4;
}
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--blue); }
.post-card p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  margin: 0;
}
.post-card .meta {
  margin-top: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text3);
}

/* === SINGLE POST === */
.post-single {
  padding: 48px 0;
}
.post-single h1 {
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -1px;
}
.post-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.post-meta .tag {
  background: rgba(88, 166, 255, 0.1);
  color: var(--blue);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  border: 1px solid rgba(88, 166, 255, 0.15);
}
.post-excerpt {
  color: var(--text2);
  font-size: 17px;
  margin-bottom: 0;
  line-height: 1.6;
}

/* === POST CONTENT === */
.post-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}
.post-content h2 { border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.post-content img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 20px 0;
}
.post-content ul, .post-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.post-content li { margin-bottom: 6px; }
.post-content blockquote {
  border-left: 3px solid var(--blue);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--bg2);
  border-radius: 0 8px 8px 0;
  color: var(--text2);
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.post-content th, .post-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}
.post-content th {
  background: var(--bg3);
  font-weight: 600;
}
.post-content td { background: var(--bg2); }

/* === CODE BLOCKS === */
pre, code {
  font-family: 'IBM Plex Mono', monospace;
}
code {
  background: var(--bg3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--text);
}
pre {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  overflow-x: auto;
  margin: 20px 0;
  line-height: 1.6;
}
pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 13px;
}

/* Rouge syntax highlighting (dark) */
.highlight .c, .highlight .cm, .highlight .c1, .highlight .cs { color: var(--text3); }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt { color: var(--purple); }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sc, .highlight .sd, .highlight .sh, .highlight .sx { color: var(--green); }
.highlight .na, .highlight .nb, .highlight .nc, .highlight .no, .highlight .nd { color: var(--blue); }
.highlight .nf, .highlight .ni { color: var(--cyan); }
.highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo { color: var(--orange); }
.highlight .o, .highlight .ow { color: var(--red); }
.highlight .p { color: var(--text); }

/* === POST FOOTER === */
.post-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.tag-pill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
}
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.post-nav a {
  font-size: 13px;
  color: var(--text2);
  transition: color 0.2s;
}
.post-nav a:hover { color: var(--blue); }
.nav-next { text-align: right; }

/* === PAGE === */
.page-single {
  padding: 48px 0;
}
.page-single h1 {
  margin-bottom: 24px;
}

/* === CATEGORIES PAGE === */
.category-section {
  margin-bottom: 40px;
}
.category-section h2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--blue);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.category-list {
  list-style: none;
}
.category-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(48, 54, 61, 0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.category-list li a { color: var(--text); font-size: 14px; }
.category-list li a:hover { color: var(--blue); }
.category-list li time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text3);
}

/* === PAGINATION === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 32px 0 48px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
}
.pagination a {
  padding: 8px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  transition: all 0.2s;
}
.pagination a:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.pagination .current {
  color: var(--text3);
}

/* === FOOTER === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 56px;
}
.footer-inner {
  text-align: center;
}
.footer-brand {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 16px;
  color: var(--blue);
  margin-bottom: 4px;
}
.footer-brand span { color: var(--text2); font-weight: 400; }
.site-footer p {
  color: var(--text3);
  font-size: 13px;
  margin-bottom: 6px;
}
.footer-links a {
  color: var(--text2);
  font-size: 13px;
}
.footer-links a:hover { color: var(--blue); }
.footer-links .sep {
  color: var(--text3);
  margin: 0 4px;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .hero-text h1 { font-size: 28px; }
  .post-single h1 { font-size: 26px; }
  .post-grid { grid-template-columns: 1fr; }
  .nav-inner { flex-direction: column; gap: 12px; }
  .menu { gap: 16px; }
  .search-box { flex-direction: column; }
  .search-box button { width: 100%; }
  .post-nav { flex-direction: column; }
}

/* Fix URLs qui débordent des cartes */
.post-card p,
.post-card .meta,
.post-content {
  overflow-wrap: break-word;
  word-break: break-word;
}
/* Fix titres page About */
.about-section h2 {
  border-bottom: 1px solid #21262d !important;
  font-size: 20px !important;
}
.about-page .post-content h2 {
  border-bottom: none;
}
/* Fix page About */
.about-page h2 {
  border-bottom: 1px solid #21262d !important;
  padding-bottom: 10px !important;
  margin-top: 0 !important;
}
.about-page .post-content h2 {
  border-bottom: 1px solid #21262d !important;
}
