/* ============================================================
   NeonFlare -- showcase site (PagePrincipal)
   Same visual language as the app (assets/css/style.css): dark
   cyberpunk wallpaper, neon glow overlay, glass "mat-card" panels,
   dragon branding -- but its own self-contained stylesheet since this
   is a standalone project (landing page, docs, download, donation),
   not a page loaded inside the dashboard's iframe shell.
   ============================================================ */

:root {
  --accent: #48dbfb;
  --accent-glow: rgba(72, 219, 251, 0.25);
  --accent-2: #ff6bcb;
  --accent-2-glow: rgba(255, 107, 203, 0.25);
  --bg: #0a0a0f;
  --bg-alt: #11182a;
  --card-bg: rgba(20, 20, 30, 0.85);
  --text-main: #f5f5f5;
  --text-dim: #a7b0c7;
  --border: #2a2f42;
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-main);
  overflow-x: hidden;
}

a { color: inherit; }

/* Bespoke NeonFlare background, back to front:
     -3  .wallpaper          dark gradient base, no stock photography
     -2  .nf-network-canvas  drifting nodes + connecting lines (js/background.js)
     -1  body::before        the same cyan/pink glow the app itself uses
      0  .particle           floating embers (js/main.js) */
.wallpaper {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(72, 219, 251, 0.12), transparent 60%),
    radial-gradient(ellipse 70% 50% at 105% 105%, rgba(255, 107, 203, 0.10), transparent 60%),
    linear-gradient(160deg, #05060a 0%, #0a0a16 45%, #0b0a18 75%, #05060a 100%);
  z-index: -3;
}

.nf-network-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 15%, var(--accent-glow), transparent 60%),
              radial-gradient(circle at 10% 85%, var(--accent-2-glow), transparent 55%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: fixed;
  background: rgba(72, 219, 251, 0.6);
  border-radius: 50%;
  animation: floatUp linear infinite;
  filter: blur(1px);
  z-index: 0;
  pointer-events: none;
}

@keyframes floatUp {
  0% { transform: translateY(0vh) scale(0.4); opacity: 0.2; }
  50% { opacity: 0.7; }
  100% { transform: translateY(-110vh) scale(1); opacity: 0; }
}

/* ============================================================
   NAV
   ============================================================ */
.nf-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 2rem;
  background: rgba(10, 10, 20, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nf-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-decoration: none;
  color: var(--text-main);
}

.nf-nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nf-lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.nf-lang-btn {
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 1px;
  font-weight: 600;
  background: rgba(8, 10, 16, 0.5);
  color: var(--text-dim);
  border: none;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.nf-lang-btn:hover { color: var(--accent); }

.nf-lang-btn.active {
  background: var(--accent);
  color: #06070c;
}

.nf-logo-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 10px var(--accent-glow), inset 0 0 8px var(--accent-glow);
}

.nf-logo-mark img {
  width: 30px; height: 30px;
  object-fit: contain;
}

.nf-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0; padding: 0;
}

.nf-links a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nf-links a:hover,
.nf-links a.active {
  color: var(--accent);
}

.nf-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  border-radius: 10px;
  padding: 0.75rem 1.4rem;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  border: 1px solid var(--accent);
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #06070c;
  font-weight: 600;
  box-shadow: 0 0 18px var(--accent-glow);
}

.btn-primary:hover { box-shadow: 0 0 28px var(--accent-glow); }

.btn-ghost {
  background: rgba(8, 10, 16, 0.5);
  color: var(--accent);
}

.btn-ghost:hover { background: var(--accent-glow); box-shadow: 0 0 16px var(--accent-glow); }

.btn[disabled], .btn.btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   LAYOUT / SECTIONS
   ============================================================ */
main { position: relative; z-index: 1; }

.nf-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.nf-section-tight { padding-top: 2.5rem; padding-bottom: 2.5rem; }

.nf-eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.nf-section h2 {
  font-size: 1.7rem;
  margin: 0 0 1rem;
}

.nf-section > p.nf-lead {
  color: var(--text-dim);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* ============================================================
   HERO
   ============================================================ */
.nf-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  text-align: center;
}

.nf-hero-tagline {
  font-style: italic;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
}

.nf-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0 0 1.2rem;
  letter-spacing: 1px;
  text-shadow: 0 0 24px var(--accent-glow), 0 0 60px var(--accent-2-glow);
}

.nf-hero h1 span { color: var(--accent); }

.nf-hero-sub {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto 2.2rem;
}

.nf-hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   CARDS / GRID
   ============================================================ */
.nf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.4rem;
}

.nf-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.nf-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.nf-card-icon {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.nf-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
}

.nf-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Compare table (Pourquoi NeonFlare) */
.nf-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

@media (max-width: 700px) {
  .nf-compare { grid-template-columns: 1fr; }
}

.nf-compare .nf-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.8;
}

.nf-compare .nf-card.nf-compare-highlight {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ============================================================
   DOCS LAYOUT
   ============================================================ */
.nf-docs {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  align-items: start;
}

/* Grid items default to a content-based automatic minimum size, so an
   unbreakable line (eg. a long `git clone` URL in a <pre>) forces the
   1fr track -- and with it .nf-toc, which shares the same track once
   the layout collapses to one column -- wider than the viewport. min-
   width: 0 lets the track shrink to the available space instead; the
   long line then just scrolls inside its own <pre overflow-x:auto>. */
.nf-toc, .nf-doc-content {
  min-width: 0;
}

@media (max-width: 860px) {
  .nf-docs { grid-template-columns: 1fr; }
  .nf-toc { position: static !important; }
}

.nf-toc {
  position: sticky;
  top: 5.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  background: var(--card-bg);
}

.nf-toc-title {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.nf-toc ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 0.55rem;
}

.nf-toc a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.82rem;
  transition: color 0.15s ease;
}

.nf-toc a:hover, .nf-toc a.active { color: var(--accent); }

.nf-doc-section {
  margin-bottom: 3.2rem;
  scroll-margin-top: 5.5rem;
}

.nf-doc-section h2 {
  font-size: 1.4rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.7rem;
  margin-bottom: 1.2rem;
}

.nf-doc-section h3 {
  font-size: 1.05rem;
  margin: 1.6rem 0 0.6rem;
  color: var(--accent);
}

.nf-doc-section p, .nf-doc-section li {
  color: #d6dbe8;
  line-height: 1.75;
  font-size: 0.92rem;
}

.nf-doc-section ul { padding-left: 1.3rem; }

.nf-note {
  border-left: 3px solid var(--accent);
  background: rgba(72, 219, 251, 0.06);
  padding: 0.9rem 1.1rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 1rem 0;
}

.nf-note-warn {
  border-left-color: var(--accent-2);
  background: rgba(255, 107, 203, 0.06);
}

/* Documentation screenshots -- real app captures, not mockups (see
   docs.*.screenshot* i18n keys for the alt text). width:100%/height:auto
   (no max-height/object-fit) so every image renders at its own natural
   aspect ratio -- a fixed max-height forced a same-shaped box onto every
   screenshot regardless of its real proportions, letterboxing (empty
   space, "gap") whichever axis didn't match. overflow-x on the wrap is
   the safety net if one's ever wider than its column on a narrow
   viewport. */
.nf-doc-figure {
  margin: 1.3rem 0;
  overflow-x: auto;
}

.nf-doc-figure img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #05060a;
}

.nf-doc-figure figcaption {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  line-height: 1.5;
}

.nf-doc-figure-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 1.3rem 0;
}

@media (max-width: 760px) {
  .nf-doc-figure-pair {
    grid-template-columns: 1fr;
  }
}

.nf-doc-figure-pair .nf-doc-figure {
  margin: 0;
}

/* Plain data table (documentation.html "Les fichiers"). Wrapped in
   .nf-table-wrap so a narrow viewport scrolls the table horizontally
   instead of forcing the page wider than the screen. */
.nf-table-wrap {
  overflow-x: auto;
}

.nf-doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.nf-doc-table th, .nf-doc-table td {
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.nf-doc-table td:last-child {
  white-space: normal;
  color: #d6dbe8;
}

.nf-doc-table th {
  color: var(--accent);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

code, pre {
  font-family: "SFMono-Regular", Consolas, monospace;
}

pre {
  background: #05060a;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #8effc1;
}

.nf-doc-section p code, .nf-doc-section li code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Collapsible config blueprints (documentation.html #config-files) */
.nf-blueprint {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0.6rem 0;
  background: rgba(255, 255, 255, 0.02);
}
.nf-blueprint > summary {
  cursor: pointer;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  list-style: none;
}
.nf-blueprint > summary::-webkit-details-marker { display: none; }
.nf-blueprint > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.5rem;
  color: var(--accent, #48dbfb);
  transition: transform 0.15s ease;
}
.nf-blueprint[open] > summary::before { transform: rotate(90deg); }
.nf-blueprint > summary code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}
.nf-blueprint > pre {
  margin: 0 0.9rem 0.9rem;
}

/* ============================================================
   DOWNLOAD PAGE
   ============================================================ */
.nf-download-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.6rem;
  margin-bottom: 1.4rem;
}

.nf-download-card h3 {
  margin: 0 0 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nf-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.nf-download-card p { color: var(--text-dim); font-size: 0.88rem; }

/* ============================================================
   DONATION PAGE
   ============================================================ */
.nf-donate-card {
  text-align: center;
}

.nf-donate-card .nf-card-icon { font-size: 2rem; }

.nf-donate-card .btn { margin-top: 1rem; width: 100%; justify-content: center; }

/* ============================================================
   FOOTER
   ============================================================ */
.nf-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 2.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.nf-footer-sig {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.nf-footer-sig .sig-icon {
  display: inline-flex;
}

.nf-footer-sig .sig-icon img {
  width: 26px; height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px var(--accent-2));
}

.nf-footer-sig .sig-text {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--text-dim);
}

.nf-footer-domain {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: none;
  margin: -0.4rem 0 1rem;
}

.nf-footer-domain:hover {
  color: var(--accent);
}

.nf-footer-line {
  width: 160px;
  height: 2px;
  margin: 0 auto 1.4rem;
  background: linear-gradient(90deg, var(--accent-2), #6a5cff, var(--accent));
  box-shadow: 0 0 10px var(--accent-2), 0 0 20px var(--accent);
  border-radius: 50px;
}

.nf-footer-links {
  display: flex;
  justify-content: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.nf-footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
}

.nf-footer-links a:hover { color: var(--accent); }

.nf-footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.2rem;
}

.nf-social-icon {
  display: inline-flex;
  color: var(--text-dim);
  transition: color 0.2s ease, filter 0.2s ease;
}

.nf-social-icon:hover {
  color: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

/* ============================================================
   RESPONSIVE NAV
   ============================================================ */
@media (max-width: 780px) {
  .nf-nav { padding: 0.8rem 1rem; gap: 0.6rem; }
  .nf-nav-right { gap: 0.6rem; }
  .nf-logo { font-size: 0.95rem; gap: 0.4rem; }
  .nf-lang-btn { padding: 0.35rem 0.5rem; }
  .nf-nav-toggle { display: inline-flex; padding: 0.35rem 0.55rem; }
  .nf-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(10, 10, 20, 0.95);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    gap: 1rem;
    display: none;
  }
  .nf-links.open { display: flex; }
}
