/* ══════════════════════════════════════════════════
   MBI Medex — Design System v2
   Charte commune : tokens.css (ne pas modifier localement)
   Typo    : Inter auto-hébergée (static/polices/)
   ══════════════════════════════════════════════════ */

/* ── Polices poids supplémentaires (800/900) ────── */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/static/polices/inter-latin-800-normal.woff2) format('woff2');
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(/static/polices/inter-latin-900-normal.woff2) format('woff2');
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Surfaces & navy sombres (spécifiques au site) */
  --dark:      #0D2060;   /* bleu marine visible — was #0C1A3E trop proche du noir */
  --dark-2:    #152878;
  --dark-3:    #1E3490;
  /* Bleu de marque — 5,18:1 sur blanc (WCAG AA ✓) */
  --blue:      #2563EA;
  --blue-h:    #1d55d9;
  --blue-glow: rgba(61,111,255,.25); /* décoratif, pas de texte dessus */
  --white:     #FFFFFF;
  --gray-50:   #F7F8FA;
  --gray-100:  #EDEEF2;
  --gray-400:  #9CA3AF;  /* bordures & déco uniquement — ne pas utiliser comme couleur de texte */
  --gray-500:  #6B7280;  /* = --muted (4,83:1) — plancher pour texte secondaire */
  --gray-700:  #374151;  /* = --ink-2 (10,31:1) */
  --text:      #1A1A28;  /* = --ink */
  --radius:    14px;
  --radius-lg: 22px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── CONTAINER ─────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── NAVIGATION ────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(12,26,62,.30);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background .35s ease, box-shadow .35s ease;
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  flex: 1;
}

.nav-links a,
.nav-links span {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  transition: color .15s, background .15s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links span:hover,
.nav-links a.active { color: var(--white); background: rgba(255,255,255,.07); }

/* Dropdown */
.has-drop { position: relative; padding-bottom: 10px; margin-bottom: -10px; }

.drop {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-2);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
  min-width: 220px;
  padding: 6px;
  z-index: 300;
}

.has-drop:hover .drop { display: block; }

.drop a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: rgba(255,255,255,.7);
  transition: background .15s, color .15s;
}

.drop a:hover { background: rgba(255,255,255,.07); color: var(--white); }

.nav-cta {
  background: var(--blue);
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s, transform .15s;
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--blue-h); transform: translateY(-1px); }

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── BUTTONS ───────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 4px 24px var(--blue-glow);
}
.btn-primary:hover {
  background: var(--blue-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--blue-glow);
}
.btn-primary.large { padding: 16px 36px; font-size: 16px; border-radius: 14px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.7);
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid rgba(255,255,255,.15);
  transition: color .15s, border-color .15s;
}
.btn-ghost:hover { color: var(--white); border-color: rgba(255,255,255,.35); }
.btn-ghost.light { color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.2); }
.btn-ghost.light:hover { color: var(--white); border-color: rgba(255,255,255,.5); }

/* ── HERO ──────────────────────────────────────── */
.hero {
  background: var(--dark);
  min-height: 680px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 100px 32px 80px;
}

.hero-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(61,111,255,.12);
  border: 1px solid rgba(61,111,255,.3);
  color: rgba(255,255,255,.8);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 50px;
  margin-bottom: 32px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--blue);
}

.hero-title {
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

.hero-title-blue { color: var(--blue); }

.hero-sub {
  font-size: 18px;
  color: rgba(255,255,255,.55);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  padding: 20px 40px;
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
  padding: 0 32px;
}

.hero-stat strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.hero-stat span {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  font-weight: 500;
  margin-top: 2px;
  display: block;
}

.hero-stat-sep {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,.1);
  flex-shrink: 0;
}

/* Glow effect */
.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(61,111,255,.18) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

/* ── SOCIAL PROOF ──────────────────────────────── */
.proof-bar {
  background: var(--dark-2);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.proof-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.3);
  white-space: nowrap;
}

.proof-logos {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.proof-logos span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  letter-spacing: .3px;
  white-space: nowrap;
  transition: color .2s;
}

.proof-logos span:hover { color: rgba(255,255,255,.7); }

/* ── SECTIONS ──────────────────────────────────── */
.section { padding: 96px 0; }
.section-light { background: var(--white); }
.section-dark { background: var(--dark); }
.section-gray { background: var(--gray-50); }

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue);
  margin-bottom: 16px;
}
.section-label.light { color: rgba(61,111,255,.8); }

.section-title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}
.section-title.light { color: var(--white); }
.section-title em { font-style: normal; color: var(--blue); }

.section-sub {
  font-size: 17px;
  color: var(--gray-500);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 56px;
}
.section-sub.light { color: rgba(255,255,255,.5); }

/* ── FEATURES GRID ─────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.features-grid--2col { grid-template-columns: repeat(2, 1fr); }

.feat-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.feat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.07);
  border-color: rgba(61,111,255,.2);
}

.feat-icon {
  font-size: 32px;
  margin-bottom: 18px;
}

.feat-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.feat-card p {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.75;
}

/* ── CARMEDEX HIGHLIGHT ────────────────────────── */
.highlight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.highlight-text { padding-top: 8px; }

.highlight-checklist {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.check-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.check-icon {
  width: 26px;
  height: 26px;
  background: rgba(61,111,255,.15);
  color: var(--blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.check-item strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.check-item p {
  font-size: 14px;
  color: rgba(255,255,255,.45);
  line-height: 1.7;
}

/* ── WHY GRID ──────────────────────────────────── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.why-card {
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: border-color .2s, transform .2s;
}

.why-card:hover { border-color: rgba(61,111,255,.3); transform: translateY(-3px); }

.why-num {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  background: rgba(61,111,255,.08);
  padding: 4px 10px;
  border-radius: 50px;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.why-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}

.why-card p {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ── CTA SECTION ───────────────────────────────── */
.cta-section {
  background: var(--dark);
  padding: 100px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(61,111,255,.15) 0%, transparent 65%);
  pointer-events: none;
}

.cta-section .container { position: relative; z-index: 2; }

.cta-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  margin: 0 auto 28px;
  object-fit: contain;
}

.cta-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.cta-title em { font-style: normal; color: var(--blue); }

.cta-sub {
  font-size: 17px;
  color: rgba(255,255,255,.5);
  max-width: 440px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── FOOTER ────────────────────────────────────── */
.footer {
  background: var(--dark);
  position: relative;
  padding: 72px 32px 0;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(61,111,255,.55) 35%, rgba(61,111,255,.55) 65%, transparent);
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}

.footer-brand img.footer-logo {
  height: 30px;
  margin-bottom: 20px;
}

.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,.32);
  line-height: 1.75;
  max-width: 260px;
  margin-bottom: 12px;
}

.footer-address {
  font-size: 12px;
  color: rgba(255,255,255,.2) !important;
  line-height: 1.65 !important;
  margin-top: 8px;
}

.footer-contact-inline {
  margin-top: 20px;
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 20px;
}

.footer-phone {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  margin-bottom: 6px;
  transition: color .15s;
}
.footer-phone:hover { color: var(--white); }

.footer-email {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,.4);
  margin-bottom: 0;
  transition: color .15s;
}
.footer-email:hover { color: rgba(255,255,255,.75); }

.footer-col h5 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.28);
  margin-bottom: 18px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,.45);
  margin-bottom: 10px;
  transition: color .15s;
}

.footer-col a:hover { color: var(--white); }

.footer-hours {
  font-size: 12px;
  color: rgba(255,255,255,.22);
  margin-top: 10px;
  line-height: 1.6;
}

.footer-bottom {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,.18);
  flex-wrap: wrap;
  gap: 8px;
}

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 1024px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--dark-2);
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 12px 16px 16px;
    z-index: 300;
  }
  .nav-links.nav-open { display: flex; }
  .nav:has(.nav-open) {
    background: rgba(12,26,62,.92) !important;
  }
  .has-drop { padding-bottom: 0; margin-bottom: 0; }
  .drop {
    display: none;
    position: static;
    transform: none;
    box-shadow: none;
    background: rgba(255,255,255,.04);
    border: none;
    border-radius: 8px;
    min-width: 0;
    padding: 4px 8px;
    margin-top: 4px;
  }
  .drop.drop-open { display: block; }
  .hero { padding: 80px 20px 60px; }
  .hero-stats { padding: 16px 20px; gap: 0; }
  .hero-stat { padding: 12px 16px; }
  .hero-stat-sep { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .highlight-grid { grid-template-columns: 1fr; gap: 48px; }
  .why-grid { grid-template-columns: 1fr; }
  .proof-bar { gap: 20px; }
  .proof-logos { gap: 16px; }
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  .footer-contact-inline { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; }
  .footer-contact-inline .footer-hours { width: 100%; margin-top: 0; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hide-mobile { display: none; }
}

/* ══════════════════════════════════════════════════
   ANIMATIONS & MODERN EFFECTS
══════════════════════════════════════════════════ */

/* ── Scroll Reveal ─────────────────────────────── */
.sr-hidden {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s cubic-bezier(.16,1,.3,1),
              transform .6s cubic-bezier(.16,1,.3,1);
}
.sr-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Nav on scroll ─────────────────────────────── */
.nav-scrolled {
  background: rgba(12,26,62,.70) !important;
  box-shadow: 0 4px 32px rgba(0,0,0,.2);
}

/* ── Button hover lift ─────────────────────────── */
.btn-primary, .btn-secondary {
  transition: transform .18s ease, box-shadow .18s ease,
              background .18s ease, color .18s ease !important;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(61,111,255,.38);
}
.btn-secondary:hover {
  transform: translateY(-2px);
}

/* ── Card hover enhancement ────────────────────── */
.feat-card, .why-card, .module-card {
  transition: border-color .25s, box-shadow .25s, transform .25s !important;
}
.feat-card:hover, .why-card:hover, .module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,.09);
  border-color: rgba(61,111,255,.3);
}

/* ── Back to top button ────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .25s, transform .25s, background .15s, box-shadow .2s;
  z-index: 500;
  box-shadow: 0 4px 20px rgba(61,111,255,.35);
  pointer-events: none;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--blue-h);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(61,111,255,.45);
}

/* ── Reading progress bar (articles) ──────────── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #60a5fa);
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 1001;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(61,111,255,.5);
}

/* ── Hero glow smooth transition ───────────────── */
.hero-glow {
  transition: transform .6s cubic-bezier(.25,.46,.45,.94);
}


/* ── Stat counter glow on reveal ───────────────── */
.hero-stat strong {
  display: block;
  background: linear-gradient(135deg, var(--white) 60%, rgba(61,111,255,.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Focus visible (accessibility) ─────────────── */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }
}
