/* ============================================================
   Quantralux Tools — Shared CSS
   White cards on dark navy gradient, dark text
   Bilingual EN/FR · Québec-first
   ============================================================ */

:root {
  --navy: #0A1A2F;
  --navy-soft: #153A7A;
  --gold: #D4AF37;
  --gold-dark: #B8960F;
  --bg: #0A1A2F;
  --text-main: #F2F4F7;
  --text-muted: #B8C0CC;
  --card-bg: #FFFFFF;
  --card-border: rgba(21, 58, 122, 0.2);
  --btn-primary: #1E4A7A;
  --btn-primary-hover: #1B449B;
  --divider: #153A7A;
}

body.dark-mode {
  --navy: #0a1628;
  --navy-soft: #111d33;
  --gold: #00d4ff;
  --gold-dark: #0099cc;
  --bg: #0a1628;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --card-bg: #f8f9fc;
  --card-border: rgba(0, 212, 255, 0.2);
  --btn-primary: #00d4ff;
  --btn-primary-hover: #0099cc;
  --divider: #153A7A;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }

/* ===== LANGUAGE DISPLAY ===== */
.lang-en, .lang-fr { display: none; }

/* ===== DARK MODE TOGGLE ===== */
.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy-soft);
  border: 2px solid var(--card-border);
  color: var(--gold);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.theme-toggle:hover {
  transform: scale(1.1);
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* ===== HEADER ===== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 7vw;
  background: linear-gradient(135deg, rgba(10, 26, 47, 0.95), rgba(21, 58, 122, 0.98));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 20;
  transition: background 0.4s ease;
}

body.dark-mode .site-header {
  background: linear-gradient(135deg, rgba(10, 22, 40, 0.95), rgba(17, 29, 51, 0.98));
  border-bottom-color: var(--gold);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 8px 18px rgba(212, 175, 55, 0.3);
}

body.dark-mode .logo-mark {
  box-shadow: 0 8px 18px rgba(0, 212, 255, 0.3);
}

.logo-text { display: flex; flex-direction: column; }

.logo-title {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 16px;
  color: var(--text-main);
}

.logo-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.main-nav a {
  color: var(--text-muted);
  margin-left: 24px;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.2s ease;
}

.main-nav a:hover { color: var(--gold); }
.main-nav a:hover::after { width: 100%; }

/* ===== MAIN ===== */
main { flex: 1; }

/* ===== HERO ===== */
.hero {
  padding: 60px 7vw 40px 7vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    180deg,
    #0A1A2F 0%,
    #153A7A 30%,
    #1B449B 50%,
    #153A7A 70%,
    #0A1A2F 100%
  );
}

body.dark-mode .hero {
  background: linear-gradient(
    180deg,
    #0a1628 0%,
    #111d33 30%,
    #0f1f38 50%,
    #111d33 70%,
    #0a1628 100%
  );
}

.hero-content { max-width: 720px; text-align: center; }

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--text-main);
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero p {
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 24px auto;
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--btn-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(27, 68, 155, 0.3);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(27, 68, 155, 0.4);
}

body.dark-mode .btn-primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

body.dark-mode .btn-primary:hover {
  background: var(--gold-dark);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
  background: transparent;
  border-color: var(--card-border);
  color: var(--gold);
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold);
}

body.dark-mode .btn-secondary:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--gold);
}

/* ===== SECTION ===== */
.section {
  padding: 60px 7vw;
  background: linear-gradient(
    180deg,
    #0A1A2F 0%,
    #153A7A 30%,
    #1B449B 50%,
    #153A7A 70%,
    #0A1A2F 100%
  );
}

body.dark-mode .section {
  background: linear-gradient(
    180deg,
    #0a1628 0%,
    #111d33 30%,
    #0f1f38 50%,
    #111d33 70%,
    #0a1628 100%
  );
}

.section h2 {
  font-size: 26px;
  margin-bottom: 20px;
  color: #ffffff;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* ===== TOOL CARDS ===== */
.tools-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 10px;
}

.tool-card {
  background: var(--card-bg);
  color: #1a1a2e;
  border-radius: 18px;
  padding: 28px;
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  opacity: 0;
  transition: opacity 0.3s;
}

.tool-card:hover {
  border-color: var(--btn-primary-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

body.dark-mode .tool-card:hover {
  border-color: var(--gold);
}

.tool-card:hover::before { opacity: 1; }

.tool-card .tool-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

.tool-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #0A1A2F;
}

.tool-card p {
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 12px;
  line-height: 1.6;
}

.tool-card .tool-status {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  margin-top: 8px;
}

.tool-card .tool-status.live {
  background: #dcfce7;
  color: #166534;
}

.tool-card .tool-status.coming {
  background: #fef3c7;
  color: #92400e;
}

body.dark-mode .tool-card .tool-status.live {
  background: rgba(0, 212, 255, 0.15);
  color: #00d4ff;
}

body.dark-mode .tool-card .tool-status.coming {
  background: rgba(212, 175, 55, 0.15);
  color: #D4AF37;
}

/* ===== BACK LINK ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  transition: all 0.3s;
}

.back-link:hover { transform: translateX(-3px); }

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 16px 7vw 20px 7vw;
  border-top: 1px solid var(--card-border);
  background: var(--navy);
}

body.dark-mode .site-footer {
  background: linear-gradient(135deg, rgba(17, 29, 51, 0.95), rgba(10, 22, 40, 0.98));
}

.site-footer a { color: var(--gold); text-decoration: none; }

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--navy-soft);
  color: var(--gold);
  border: 2px solid var(--gold);
  padding: 10px 15px;
  border-radius: 25px;
  cursor: pointer;
  z-index: 1001;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

body.dark-mode .lang-switcher {
  box-shadow: 0 2px 10px rgba(0, 212, 255, 0.2);
}

.lang-switcher:hover {
  transform: scale(1.05);
  background: rgba(212, 175, 55, 0.15);
}

body.dark-mode .lang-switcher:hover {
  background: rgba(0, 212, 255, 0.15);
}

.lang-btn-en, .lang-btn-fr { display: none; }
[lang="en"] .lang-btn-fr { display: inline; }
[lang="fr"] .lang-btn-en { display: inline; }

/* ===== HAMBURGER MENU ===== */
.hamburger-menu {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 35px;
  height: 30px;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease;
}

.hamburger-menu:hover { transform: scale(1.1); }

.hamburger-menu span {
  display: block;
  height: 4px;
  background: var(--gold);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ===== SIDEBAR MENU ===== */
.sidebar-menu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, var(--navy), var(--navy-soft));
  box-shadow: 2px 0 15px rgba(0,0,0,0.5);
  transition: left 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
  padding: 130px 20px 20px 20px;
}

body.dark-mode .sidebar-menu {
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.98), rgba(15, 31, 56, 0.98));
}

.sidebar-menu.active { left: 0; }

.sidebar-menu h3 {
  color: var(--gold);
  font-size: 1em;
  margin: 25px 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-menu h3:first-child { margin-top: 0; }

.sidebar-menu a {
  display: block;
  color: var(--text-main);
  text-decoration: none;
  padding: 12px 15px;
  margin: 5px 0;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 1.05em;
}

.sidebar-menu a:hover {
  background: rgba(212, 175, 55, 0.15);
  transform: translateX(8px);
  color: var(--gold);
}

body.dark-mode .sidebar-menu a:hover {
  background: rgba(0, 212, 255, 0.15);
}

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active { opacity: 1; visibility: visible; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .main-nav {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .main-nav a { margin: 4px 16px 0 0; }
  .hero h1 { font-size: 24px; }
  .tools-grid { grid-template-columns: 1fr; }
  .hamburger-menu { top: 15px; left: 15px; }
  .sidebar-menu { width: 85%; max-width: 300px; }
  .lang-switcher { top: auto; bottom: 80px; right: 20px; }
}