/* Style global */
/* Use a free alternative similar to DraftBot: Poppins from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
html, body {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Poppins', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  color: #333;
}

/* Ensure main/content areas grow so footer stays at the bottom */
main, .container, .docs-container, main.docs-container {
  flex: 1 0 auto;
}

nav {
  background: #222;
  padding: 15px;
  text-align: center;
}

nav a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  color: #aaa;
}

h1, h2 {
  color: #222;
}

/* Container principal de la doc */
.docs-container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Sidebar à gauche */
.docs-sidebar {
  flex: 1;
  position: sticky;
  top: 20px;
  background: #f9f9f9;
  padding: 20px;
  border-right: 1px solid #ddd;
  height: fit-content;
}

.docs-sidebar h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.docs-sidebar input {
  width: 100%;
  padding: 8px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.docs-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-sidebar li {
  margin: 8px 0;
}

.docs-sidebar a {
  text-decoration: none;
  color: #333;
}

/* Contenu principal */
.docs-content {
  flex: 3;
  padding-left: 30px;
}

.module-section {
  margin-bottom: 54px;
  background: #f3f6fd;
  border-radius: 12px;
  box-shadow: 0 1px 8px rgba(35,41,70,0.06);
  padding: 24px 28px 18px 28px;
  border: 1.5px solid #e0e7ff;
}

.module-section h2 {
  border-bottom: 2px solid #eebbc3;
  padding-bottom: 7px;
  margin-bottom: 12px;
  font-size: 1.3em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.module-section code {
  background: #e0e7ff;
  color: #232946;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 1em;
}

/* Pour les autres pages (index, terms, privacy) */
.container {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Spécial: page patchnotes — rendre le container plus large (approx. 2x) */
.patch-page .container {
  min-width: 50%;
  max-width: 1400px; /* wider than default */
  margin: 40px auto;
  padding: 28px 32px;
}

/* Patchnotes specific styles */
.patch-list { display: flex; flex-direction: column; gap: 14px; }
.patch-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
  border: 1px solid rgba(35,41,70,0.06);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(35,41,70,0.06);
  overflow: hidden;
}
.patch-card .patch-toggle {
  display: flex;
  gap: 12px;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: linear-gradient(90deg, rgba(238,187,195,0.04), rgba(224,231,255,0.02));
  border: none;
  cursor: pointer;
  text-align: left;
}
.patch-card .patch-toggle:focus { outline: none; box-shadow: 0 0 0 4px rgba(238,187,195,0.12); }
.patch-meta { display:flex; gap:12px; align-items:baseline; }
.patch-version { background: #232946; color: #fff; padding:6px 10px; border-radius:8px; font-weight:700; font-size:0.95em; }
.patch-title { font-size:1.05em; font-weight:700; color:#232946; }
.patch-date { color:#7b84a9; font-size:0.95em; margin-left:10px; }
.patch-summary { color:#5b647d; margin-left: 12px; flex:1; }
.chevron { margin-left: 12px; color:#7b84a9; font-size:1.2em; transition: transform 220ms ease; }
.patch-body { padding: 18px 22px 22px 22px; border-top: 1px solid rgba(35,41,70,0.03); animation: fadeIn 240ms ease; }
.patch-body[hidden] { display: none; }
.patch-card.open .chevron { transform: rotate(180deg); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }


/* Header modernisé */
.docs-header {
  position: relative;
  background: #232946;
  color: #fff;
  padding: 0 0 10px 0;
  box-shadow: 0 2px 8px rgba(35,41,70,0.08);
}

/* Hamburger button (mobile) — positionné DANS le header, non superposé au titre si top/left ajustés */
.hamburger {
  display: none;
  position: absolute;
  left: 12px;
  top: 14px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  z-index: 60;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
}
.hamburger:focus { outline: none; box-shadow: 0 0 0 3px rgba(238,187,195,0.12); }
.hamburger .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 4px auto;
  transition: transform 0.18s ease, opacity 0.12s ease;
}

/* Animate hamburger when open */
.hamburger.open .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Navigation links wrapper (default desktop behavior) */
.docs-header nav .nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
}

/* MOBILE: hide links by default, show only when nav has .open */
@media (max-width: 900px) {
  .hamburger { display: flex; }
  .lang-switcher { right: 16px; top: 12px; }
  .docs-header nav .nav-links { display: none; }

  .docs-header nav.open .nav-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    background: linear-gradient(180deg, rgba(35,41,70,0.98), rgba(35,41,70,0.96));
    position: absolute;
    left: 0;
    right: 0;
    top: 64px; /* drop-down under header */
    padding: 12px 16px 18px 16px;
    z-index: 55;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
  }
  .docs-header nav.open .nav-links a {
    padding: 10px 12px;
    background: transparent;
    color: #fff;
    border-radius: 8px;
    text-align: left;
  }
  .docs-header nav.open .nav-links a:hover {
    background: rgba(255,255,255,0.06);
  }
}

/* Homepage: use banner as full-page background (header + main) but keep footer distinct */
.home-page {
  background: url('banniere.png') center/cover no-repeat fixed;
}
.home-page .docs-header {
  background: transparent; /* header sits on top of banner */
  box-shadow: none;
}

/* Hero area on homepage */
.home-hero {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1px 1px; /* ensure some spacing above footer */
  color: #fff;
}
.logo-large {
  /* make homepage logo very large and responsive */
  width: 20%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
  max-width: 95%;
}
.home-tagline {
  margin-top: 22px;
  font-size: 1.8rem;
  color: #fff;
  text-shadow: 0 6px 20px rgba(35,41,70,0.6);
}
.btn-cta {
  display: inline-block;
  margin-top: 18px;
  background: linear-gradient(90deg, #5865F2 0%, #7B61FF 100%);
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(91,74,255,0.18);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.btn-cta:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(91,74,255,0.22); }

@media (max-width: 900px) {
  .btn-cta { padding: 12px 18px; font-size: 0.95rem; }
}
.logo-title {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 0 10px 0;
  justify-content: center;
}
.logo-titre {
  width: 48px;
  height: 48px;
  /* display logo as-is in header */
  border-radius: 0;
  box-shadow: none;
}
.docs-header nav {
  background: transparent;
  text-align: center;
  padding: 0 0 10px 0;
}
.docs-header nav a {
  color: #fff;
  margin: 0 18px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.08em;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.docs-header nav a.active, .docs-header nav a:hover {
  background: #eebbc3;
  color: #232946;
}

/* Lang switcher (FR/EN) */
.lang-switcher {
  position: absolute;
  right: 18px;
  top: 18px;
  display: flex;
  gap: 8px;
}
.lang-switcher button {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95em;
  transition: background 0.18s, color 0.18s, transform 0.08s;
}
.lang-switcher button:hover { transform: translateY(-1px); }
.lang-switcher button.active,
.lang-switcher button:hover {
  background: #eebbc3;
  color: #232946;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(238,187,195,0.12);
}
.lang-switcher button:focus { outline: none; box-shadow: 0 0 0 3px rgba(238,187,195,0.14); }

main.docs-container {
  display: flex;
  max-width: 1200px;
  margin: 30px auto 0 auto;
  padding: 30px 20px 40px 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 32px rgba(35,41,70,0.10);
  gap: 32px;
}
.docs-sidebar {
  flex: 1;
  position: sticky;
  top: 30px;
  background: #f3f6fd;
  padding: 28px 20px 28px 20px;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(35,41,70,0.06);
  height: fit-content;
  min-width: 220px;
  border: 1.5px solid #e0e7ff;
}
.docs-sidebar h2 {
  font-size: 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.docs-sidebar input {
  width: 100%;
  box-sizing: border-box; /* ensures padding/border are included in width */
  display: block;
  padding: 10px 12px;
  margin: 0 0 18px 0; /* keep top=0, bottom=18px, aligned with container padding */
  border: 1.5px solid #b8c1ec;
  border-radius: 7px;
  font-size: 1em;
  background: #fff;
  transition: border 0.2s;
}
.docs-sidebar input:focus {
  border: 1.5px solid #eebbc3;
  outline: none;
}
.docs-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.docs-sidebar li {
  margin: 12px 0;
}
.docs-sidebar a {
  text-decoration: none;
  color: #232946;
  font-size: 1.07em;
  padding: 7px 10px;
  border-radius: 6px;
  display: block;
  transition: background 0.18s, color 0.18s;
}
.docs-sidebar a:hover {
  background: #eebbc3;
  color: #232946;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 900px) {
  main.docs-container {
    flex-direction: column;
    padding: 18px 4vw 30px 4vw;
    gap: 18px;
  }
  .docs-sidebar {
    min-width: unset;
    margin-right: 1%;
    margin-bottom: 18px;
    position: static;
  }
  .docs-content {
    padding-left: 0;
  }
}

/* Status page styles */
.status-card {
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  padding: 18px 22px;
  border-radius: 12px;
  border: 1px solid #e6eefc;
  box-shadow: 0 6px 20px rgba(35,41,70,0.06);
  max-width: 720px;
  margin-top: 14px;
}
.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.status-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.status-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d1d5db;
  box-shadow: 0 1px 4px rgba(35,41,70,0.08);
}
.status-online { background: #34d399; box-shadow: 0 4px 14px rgba(52,211,153,0.14); }
.status-offline { background: #ef4444; box-shadow: 0 4px 14px rgba(239,68,68,0.14); }
.status-restarting { background: #f59e0b; box-shadow: 0 4px 14px rgba(245,158,11,0.14); }
.status-unknown { background: #9ca3af; box-shadow: 0 4px 14px rgba(156,163,175,0.14); }

/* Footer styles */
.site-footer {
  background: linear-gradient(180deg, #232946 0%, #1b2033 100%);
  color: #e6eefc;
  padding: 36px 20px;
  margin-top: 40px;
}
.site-footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.footer-brand {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.footer-brand img {
  width: 140px;
  height: auto;
  border-radius: 12px;
  padding: 8px;
}
.footer-brand p {
  margin: 0;
  color: #cbd6ff;
  font-size: 0.95em;
}
.footer-lists {
  display: flex;
  gap: 40px;
  flex: 1 1 auto;
}
.footer-column h4 {
  margin: 0 0 10px 0;
  color: #fff;
}
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column li { margin: 8px 0; }
.footer-column a { color: #cbd6ff; text-decoration: none; }
.footer-column a:hover { color: #fff; }
.footer-bottom { text-align: center; color: #98a0d8; font-size: 0.9em; margin-top: 18px; }

@media (max-width: 900px) {
  .site-footer .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-brand { align-items: center; }
  .footer-lists { flex-direction: column; gap: 18px; }
  .footer-lists .footer-column { width: 100%; }
}
.status-restarting { background: #f59e0b; box-shadow: 0 4px 14px rgba(245,158,11,0.14); }
.status-unknown { background: #9ca3af; box-shadow: 0 4px 14px rgba(156,163,175,0.14); }

/* Footer styles */
.site-footer {
  background: linear-gradient(180deg, #232946 0%, #1b2033 100%);
  color: #e6eefc;
  padding: 36px 20px;
  margin-top: 40px;
}
.site-footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.footer-brand {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.footer-brand img {
  width: 140px;
  height: auto;
  border-radius: 12px;
  padding: 8px;
}
.footer-brand p {
  margin: 0;
  color: #cbd6ff;
  font-size: 0.95em;
}
.footer-lists {
  display: flex;
  gap: 40px;
  flex: 1 1 auto;
}
.footer-column h4 {
  margin: 0 0 10px 0;
  color: #fff;
}
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column li { margin: 8px 0; }
.footer-column a { color: #cbd6ff; text-decoration: none; }
.footer-column a:hover { color: #fff; }
.footer-bottom { text-align: center; color: #98a0d8; font-size: 0.9em; margin-top: 18px; }

@media (max-width: 900px) {
  .site-footer .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-brand { align-items: center; }
  .footer-lists { flex-direction: column; gap: 18px; }
  .footer-lists .footer-column { width: 100%; }
}
