/* ═══════════════════════════════════════════════════════════
   HELIX GLOBAL — Feuille de style commune
   Toutes les pages incluent ce fichier.
   Les variables :root et styles spécifiques restent dans
   chaque <style> de page (elles écrasent ces bases).
   ═══════════════════════════════════════════════════════════ */

/* ── Variables par défaut (écrasées par chaque page) ──── */
:root {
  --bg:    #0b0d14;
  --bg2:   #111420;
  --bg3:   #181c2e;
  --bg4:   #1e2336;
  --border:  rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --txt:   #dde3f5;
  --txt2:  #8890b0;
  --txt3:  #4a5070;
  --accent:  #5b6af5;
  --accent2: #7b88ff;
  --adim:    rgba(91,106,245,0.12);
  --ok:    #22c55e;  --okdim:   rgba(34,197,94,0.12);
  --err:   #ef4444;  --errdim:  rgba(239,68,68,0.12);
  --warn:  #f59e0b;  --warndim: rgba(245,158,11,0.12);
  --info:  #60a5fa;  --infodim: rgba(96,165,250,0.12);
  --lock:  #a78bfa;  --lockdim: rgba(167,139,250,0.12);
  --r:  10px;
  --r2:  6px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { max-width: 100%; overflow-x: hidden; }

/* ── Base ───────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--txt);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Utilitaires ────────────────────────────────────────── */
.hidden { display: none !important; }
.mono   { font-family: 'JetBrains Mono', 'Courier New', monospace; }
.small  { font-size: 12px; }
.txt2   { color: var(--txt2); }
.txt3   { color: var(--txt3); }
.mt12   { margin-top: 12px; }
.mt16   { margin-top: 16px; }

/* ── Navbar ─────────────────────────────────────────────── */
.nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  height: 54px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav-brand {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--accent2);
  text-decoration: none;
  letter-spacing: .8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links { display: flex; gap: 2px; }
.nav-link {
  color: var(--txt2);
  text-decoration: none;
  padding: 6px 11px;
  border-radius: var(--r2);
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
  border-left: 3px solid transparent;
}
.nav-link:hover  { color: var(--txt); background: rgba(91,106,245,0.09); }
.nav-link.active {
  color: var(--accent2);
  background: var(--adim);
  border-left-color: var(--accent);
  border-radius: 0 var(--r2) var(--r2) 0;
}
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-time  { font-size: 12px; color: var(--txt3); font-family: 'JetBrains Mono', monospace; }
.nav-dot   { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: .3rem .5rem;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── Boutons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--r2);
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled)  { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(91,106,245,.3); }
.btn-ghost    { background: var(--bg3); color: var(--txt2); border: 1px solid var(--border2); }
.btn-ghost:hover:not(:disabled)    { background: var(--bg4); color: var(--txt); }
.btn-ok       { background: var(--okdim);   color: var(--ok);   border: 1px solid rgba(34,197,94,.25); }
.btn-ok:hover:not(:disabled)       { background: rgba(34,197,94,.18); }
.btn-warn     { background: var(--warndim); color: var(--warn); border: 1px solid rgba(245,158,11,.25); }
.btn-err      { background: var(--errdim);  color: var(--err);  border: 1px solid rgba(239,68,68,.25); }
.btn-lock     { background: var(--lockdim); color: var(--lock); border: 1px solid rgba(167,139,250,.25); }
.btn-sm  { padding: 6px 12px;  font-size: 12px; }
.btn-xs  { padding: 3px 8px;   font-size: 11px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* ── Modals ─────────────────────────────────────────────── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  width: 100%;
  max-width: 600px;
  max-height: 92vh;
  overflow-y: auto;
  word-break: break-word;
}
.modal-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 { font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-body   { padding: 20px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 14px;
}
.card-title {
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--txt2);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* ── Inputs / selects ───────────────────────────────────── */
input[type="text"], input[type="number"], input[type="date"],
input[type="email"], input[type="search"], select, textarea {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  color: var(--txt);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

/* ── Footer ─────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.35);
  font-size: 12px;
}
footer a { color: rgba(255,255,255,0.4); text-decoration: underline; }

/* ── Onboarding overlay ─────────────────────────────────── */
#onboarding-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.92);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

/* ── Assistant IA widget ────────────────────────────────── */
#assistant-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #6c63ff, #4ecdc4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  box-shadow: 0 4px 20px rgba(108,99,255,0.4);
  font-size: 24px;
  transition: transform .2s;
}
#assistant-btn:hover { transform: scale(1.1); }
#assistant-panel {
  display: none;
  position: fixed;
  bottom: 90px;
  right: 16px;
  width: calc(100% - 32px);
  max-width: 380px;
  background: #1a1f35;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 9997;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  overflow: hidden;
}

/* ── Responsive mobile ──────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: absolute;
    top: 54px;
    left: 0; right: 0;
    background: var(--bg2);
    padding: 1rem;
    z-index: 999;
    gap: .5rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-hamburger  { display: flex; }
  .nav-link {
    border-radius: 4px 4px 4px 0 !important;
    border-left: 3px solid transparent;
  }
  .nav-link.active { border-left-color: var(--accent) !important; }
}
@media (min-width: 769px) {
  .nav-hamburger { display: none; }
}
@media (max-width: 768px) {
  .wrap, .container, main, section, .card, .hero { max-width: 100%; overflow-x: hidden; }
}

/* ── Wrap conteneur ─────────────────────────────────────── */
.wrap { margin: 0 auto; padding: 28px 20px 60px; overflow-x: hidden; }
