/* ============================================================
   Quantralux Tool Style — Education Design System v4.0
   ============================================================ */

: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; }
body::before { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse at center, #1B449B 0%, #153A7A 40%, #0A1A2F 100%); z-index: -1; pointer-events: none; }
body.dark-mode::before { background: radial-gradient(ellipse at center, #0f1f38 0%, #111d33 40%, #0a1628 100%); }
a { color: inherit; text-decoration: none; } img { max-width: 100%; height: auto; } button { cursor: pointer; font-family: inherit; }
.lang-en, .lang-fr { display: none; }
.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); }
.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); border-bottom: 2px solid var(--gold); position: sticky; top: 0; z-index: 20; }
body.dark-mode .site-header { background: linear-gradient(135deg, rgba(10,22,40,0.95), rgba(17,29,51,0.98)); }
.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 { flex: 1; }
.hero { padding: 60px 7vw 40px 7vw; display: flex; align-items: center; justify-content: center; background: transparent; }
.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; }
.section { padding: 60px 7vw; background: transparent; }
.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; }
.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; }
.btn-primary { background: var(--btn-primary); color: #FFF; box-shadow: 0 4px 15px rgba(27,68,155,0.3); }
.btn-primary:hover { background: var(--btn-primary-hover); transform: translateY(-2px); }
body.dark-mode .btn-primary { background: var(--gold); color: var(--navy); }
body.dark-mode .btn-primary:hover { background: var(--gold-dark); }
.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); }
.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); }
.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); }
.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); }
.lang-switcher:hover { transform: scale(1.05); background: rgba(212,175,55,0.15); }
body.dark-mode .lang-switcher { box-shadow: 0 2px 10px rgba(0,212,255,0.2); }
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 { 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; }
.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 { 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; }


.instructions { background: rgba(212,175,55,0.08); border: 1px solid rgba(212,175,55,0.2); border-radius: 12px; padding: 16px; margin-bottom: 20px; }
.instructions h3 { font-size: 14px; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.instructions p { font-size: 13px; line-height: 1.7; color: #0A1A2F; }
body.dark-mode .instructions p { color: var(--text-main); }

/* ===== TOOL-SPECIFIC ===== */
.tool-container { max-width: 800px; background: var(--card-bg); border-radius: 18px; padding: 32px; border: 3px solid var(--gold); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 14px; font-weight: 600; color: #0A1A2F; margin-bottom: 6px; }
body.dark-mode .input-group label { color: var(--text-main); }
.input-group input, .input-group textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--card-border); border-radius: 12px; font-family: inherit; font-size: 15px; background: #fff; color: #1a1a2e; transition: border-color 0.2s; }
body.dark-mode .input-group input, body.dark-mode .input-group textarea { background: #1a2332; color: var(--text-main); }
.input-group input:focus, .input-group textarea:focus { outline: none; border-color: var(--gold); }
.input-group input::placeholder, .input-group textarea::placeholder { color: #9ca3af; }

.results-panel {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 24px;
}
.result-item {
  background: linear-gradient(135deg, var(--btn-primary), var(--btn-primary-hover));
  border-radius: 14px; padding: 20px; text-align: center; color: #fff;
}
body.dark-mode .result-item { background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(0,153,204,0.15)); color: var(--text-main); border: 1px solid var(--card-border); }
.result-item.highlight { background: linear-gradient(135deg, #D4AF37, #B8960F); }
body.dark-mode .result-item.highlight { background: linear-gradient(135deg, rgba(0,212,255,0.25), rgba(0,153,204,0.25)); }
.result-label { display: block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.9; margin-bottom: 6px; }
.result-value { display: block; font-size: 1.6rem; font-weight: 800; }
.result-item.highlight .result-value { color: var(--navy); }
body.dark-mode .result-item.highlight .result-value { color: var(--gold); }

@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; }
  .tool-container { padding: 20px; }
  .results-panel { 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; }
}