/* ========================================================================= */
/* TERADEEP SOLUTIONS — SYSTÈME DE NAVIGATION UNIFIÉ & MODALES               */
/* ========================================================================= */

:root {
  --nav-bg: rgba(15, 23, 42, 0.92);
  --nav-border: rgba(148, 174, 209, 0.18);
  --accent-emerald: #10b981;
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --pill-bg: rgba(30, 41, 59, 0.75);
}

/* ── 1. BANDEAU SUPÉRIEUR D'ANNONCE (TOP BAR M1) ───────────────────────── */
.top-bar-m1 {
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 50%, #0f172a 100%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.25);
  color: #f1f5f9;
  font-size: 12.5px;
  line-height: 1.4;
  padding: 6px 12px;
  text-align: center;
  position: relative;
  z-index: 60;
}

.top-bar-m1__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.top-bar-m1__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fef08a;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 2px 8px;
  border-radius: 6px;
}

.top-bar-m1__link:hover {
  color: #ffffff;
  background: rgba(254, 240, 138, 0.15);
  transform: translateY(-1px);
}

.top-bar-m1__sub {
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ── 2. BARRE DE NAVIGATION PRINCIPALE ──────────────────────────────────── */
.main-nav-bar {
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
  position: relative;
  z-index: 55;
  transition: all 0.25s ease;
}

.main-nav-bar__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ── LOGO OFFICIEL ──────────────────────────────────────────────────────── */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  flex-shrink: 0;
}

.nav-brand__logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.3);
  background: #0f172a;
}

.nav-brand__text {
  display: flex;
  flex-direction: column;
}

.nav-brand__name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.1;
}

.nav-brand__name span {
  color: #38bdf8;
  font-weight: 600;
}

.nav-brand__tag {
  font-size: 9.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── COMMUTATEUR D'UNIVERS (PILL SWITCHER) ──────────────────────────────── */
.nav-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 174, 209, 0.25);
  border-radius: 9999px;
  padding: 3px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-switcher__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.nav-switcher__tab:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}

/* Tab Sur-Mesure Active */
.nav-switcher__tab--custom.is-active {
  background: linear-gradient(135deg, #1e3a8a 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
  font-weight: 700;
}

/* Tab Bibliothèques Active */
.nav-switcher__tab--libs.is-active {
  background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
  font-weight: 700;
}

.nav-switcher__badge {
  background: #10b981;
  color: #022c22;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulse-soft 2.5s infinite;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.88; transform: scale(0.97); }
}

/* ── BOUTON ESSAI GRATUIT ───────────────────────────────────────────────── */
.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  color: #022c22;
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.4);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-cta-btn:hover {
  background: linear-gradient(135deg, #6ee7b7 0%, #34d399 100%);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.55);
  transform: translateY(-1px);
}

/* ── MODALE TÉLÉCHARGEMENT DÉMO (WINDOWS & ANDROID) ─────────────────────── */
.td-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.td-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.td-modal-card {
  background: #0f172a;
  border: 1px solid rgba(148, 174, 209, 0.25);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f1f5f9;
}

.td-modal-backdrop.is-open .td-modal-card {
  transform: scale(1);
}

.td-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(148, 174, 209, 0.15);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: rgba(30, 41, 59, 0.4);
}

.td-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.td-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.td-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.td-download-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 174, 209, 0.2);
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.td-download-option:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.4);
}

.td-download-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.td-download-icon--windows {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #38bdf8;
}

.td-download-icon--android {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

/* ── RESPONSIVE MOBILE ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .top-bar-m1 { font-size: 11px; padding: 4px 8px; }
  .top-bar-m1__sub { display: none; }
  .main-nav-bar__container { padding: 8px 12px; gap: 8px; }
  .nav-brand__name { font-size: 14px; }
  .nav-brand__tag { display: none; }
  .nav-switcher__tab { padding: 5px 10px; font-size: 11.5px; gap: 4px; }
  .nav-switcher__badge { font-size: 9px; padding: 1px 5px; }
  .nav-cta-btn { padding: 6px 12px; font-size: 11.5px; }
}

@media (max-width: 480px) {
  .nav-brand__name span { display: none; }
  .nav-switcher__tab { padding: 4px 8px; font-size: 11px; }
  .nav-cta-btn span { display: none; }
  .nav-cta-btn::after { content: "Démo"; }
}
