/**
 * apex/index.html — styles.
 *
 * Spécifique à cette page (topnav dark-mode, hero, drawer mobile). Couleurs et
 * police viennent des tokens _shared/styles/tokens.generated.css (lien
 * tokens.generated.css placé avant ce fichier, décision Board FULA-5983) ; les valeurs
 * en dur ne sont que des replis si ce fichier n'est pas servi. Le layout
 * (topnav/hero/dark-mode) reste propre à apex, distinct de homepage.css.
 */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { color-scheme: dark; }
body {
  font-family: var(--fontFamily, 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif);
  background: var(--brandDark, #102A43);
  color: var(--bgTertiary, #E8EDF0);
  line-height: 1.6;
  transition: background .2s, color .2s;
}
body.light {
  color-scheme: light;
  background: var(--bgSecondary, #F7F9FA);
  color: var(--textPrimary, #102A43);
}
a { color: inherit; }

/* ── Topnav ── */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13, 17, 35, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: 0 24px;
}
.topnav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; gap: 16px;
}
.topnav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.topnav-logo img { width: 32px; height: 32px; border-radius: 8px; }
.topnav-logo span { color: #fff; font-weight: 700; font-size: 16px; }
.topnav-links { display: flex; align-items: center; gap: 14px; }
.topnav-link { color: rgba(255,255,255,.7); text-decoration: none; font-size: 14px; transition: color .15s; }
.topnav-link:hover { color: #fff; }
.topnav-theme { background: none; border: none; cursor: pointer; font-size: 17px; color: rgba(255,255,255,.7); padding: 4px 8px; border-radius: 8px; }
.topnav-theme:hover { background: rgba(255,255,255,.07); }
.btn-nav-primary {
  background: var(--accent, #06B6D4); color: #fff;
  padding: 8px 18px; border-radius: 999px;
  text-decoration: none; font-size: 13px; font-weight: 700;
  transition: background .15s;
}
.btn-nav-primary:hover { background: #0891b2; }
.btn-nav-outline {
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.85);
  padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18);
  font-size: 13px; cursor: pointer; transition: background .15s;
}
.btn-nav-outline:hover { background: rgba(255,255,255,.13); }

/* ── Mobile hamburger ── */
.topnav-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.8); padding: 6px; border-radius: 8px;
  transition: background .15s;
}
.topnav-hamburger:hover { background: rgba(255,255,255,.08); }
.topnav-hamburger svg { display: block; }

/* Mobile drawer */
.mobile-drawer-backdrop {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
}
.mobile-drawer-backdrop.open { display: block; }
.mobile-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 260px;
  max-width: 85vw;
  background: #0d1123; border-left: 1px solid rgba(255,255,255,.1);
  z-index: 201; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; height: 56px; border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.mobile-drawer-header span { color: #fff; font-weight: 600; font-size: 15px; }
.drawer-close {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.6); padding: 6px; border-radius: 8px;
  transition: background .15s;
}
.drawer-close:hover { background: rgba(255,255,255,.08); color: #fff; }
.mobile-drawer-body { flex: 1; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.drawer-link {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: 12px;
  color: rgba(255,255,255,.75); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: background .15s, color .15s;
}
.drawer-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.drawer-link-icon { font-size: 18px; width: 24px; text-align: center; }
.drawer-divider { height: 1px; background: rgba(255,255,255,.08); margin: 8px 0; }
.drawer-btn-primary {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: 12px;
  background: var(--accent, #06B6D4); color: #fff; text-decoration: none;
  font-size: 15px; font-weight: 700; transition: background .15s;
  border: none; cursor: pointer; width: 100%; text-align: left;
}
.drawer-btn-primary:hover { background: #0891b2; }
.drawer-btn-outline {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(6,182,212,.12); color: #67e8f9;
  border: 1px solid rgba(6,182,212,.3);
  font-size: 15px; font-weight: 500; cursor: pointer; width: 100%;
  text-align: left; transition: background .15s;
}
.drawer-btn-outline:hover { background: rgba(6,182,212,.2); }

@media (max-width: 640px) {
  .topnav-links { display: none; }
  .topnav-hamburger { display: flex; align-items: center; }
}
body.light .topnav { background: rgba(15,22,41,.95); }

/* ── HERO ── */
.hero {
  background: var(--brandDark, #102A43);
  padding: 64px 24px 72px;
  text-align: center;
}
body.light .hero { background: var(--bgSecondary, #F7F9FA); }
.hero-logo { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 20px; display: block; }
.hero-badge {
  display: inline-flex; align-items: center; gap-8px;
  padding: 5px 14px; border-radius: 999px;
  background: rgba(6,182,212,.12); border: 1px solid rgba(6,182,212,.28);
  font-size: 13px; font-weight: 700; color: #67e8f9;
  margin-bottom: 20px; letter-spacing: .05em;
}
.hero h1 {
  font-size: clamp(22px, 4.5vw, 48px);
  font-weight: 800; line-height: 1.15;
  color: #fff; max-width: 780px; margin: 0 auto 16px;
}
body.light .hero h1 { color: #0f172a; }
.hero p {
  font-size: 16px; color: #94a3b8;
  max-width: 640px; margin: 0 auto 12px;
}
body.light .hero p { color: #475569; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 32px; }
.btn-hero-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 14px;
  background: var(--accent, #06B6D4); color: #fff; font-size: 17px; font-weight: 700;
  text-decoration: none; transition: background .15s;
  box-shadow: 0 4px 20px rgba(6,182,212,.3);
}
.btn-hero-primary:hover { background: #0891b2; }
.btn-hero-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 14px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  color: var(--bgTertiary, #E8EDF0); font-size: 17px; font-weight: 600;
  text-decoration: none; transition: background .15s;
}
.btn-hero-secondary:hover { background: rgba(255,255,255,.13); }
body.light .btn-hero-secondary {
  background: rgba(0,0,0,.04); border: 1px solid #cbd5e1;
  color: #1e293b;
}
body.light .btn-hero-secondary:hover { background: rgba(0,0,0,.08); }

/* ── Pillars ── */
.pillars {
  background: #111827;
  padding: 56px 24px;
  border-top: 1px solid rgba(255,255,255,.05);
}
body.light .pillars { background: #fff; border-top: 1px solid var(--border, #E8EDF0); }
.pillars-grid { max-width: 900px; margin: 0 auto; display: grid; gap: 32px; }
@media(min-width: 640px) { .pillars-grid { grid-template-columns: repeat(3, 1fr); } }
.pillar { text-align: center; }
.pillar-icon {
  width: 60px; height: 60px; border-radius: 18px;
  background: rgba(6,182,212,.1);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.pillar-icon svg {
  width: 32px; height: 32px; stroke: #22d3ee; stroke-width: 1.75;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.pillar h3 { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 8px; }
body.light .pillar h3 { color: #0f172a; }
.pillar p { font-size: 14px; color: #64748b; line-height: 1.6; }

/* ── Section card ── */
.section-wrap { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.content-section { padding: 56px 24px; border-top: 1px solid rgba(255,255,255,.05); }
body.light .content-section { border-top: 1px solid var(--border, #E8EDF0); }
.section-card {
  background: #161b27;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  padding: 32px;
}
body.light .section-card { background: #f8fafc; border-color: var(--border, #E8EDF0); }
.section-card h2 {
  font-size: clamp(20px, 3vw, 28px); font-weight: 700;
  color: #fff; margin-bottom: 16px;
}
body.light .section-card h2 { color: #0f172a; }
.section-card h3 {
  font-size: clamp(16px, 2.2vw, 20px); font-weight: 700;
  color: #22d3ee; margin: 20px 0 10px;
}
body.light .section-card h3 { color: #0891b2; }
.section-card p { font-size: 15px; color: #94a3b8; margin-bottom: 12px; }
body.light .section-card p { color: #475569; }
.section-card ul { padding-left: 20px; color: #94a3b8; }
body.light .section-card ul { color: #475569; }
.section-card li { margin-bottom: 6px; font-size: 15px; }

/* ── App download ── */
.app-section {
  background: var(--brandDark, #102A43);
  padding: 56px 24px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.05);
}
body.light .app-section { background: var(--bgSecondary, #F7F9FA); border-top: 1px solid var(--border, #E8EDF0); }
.app-section h2 { font-size: clamp(20px, 3vw, 28px); font-weight: 700; color: #fff; margin-bottom: 8px; }
body.light .app-section h2 { color: #0f172a; }
.app-section p { font-size: 15px; color: #64748b; margin-bottom: 6px; }
.store-btns { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 28px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-radius: 14px;
  background: #111827; border: 1px solid rgba(255,255,255,.1);
  color: #fff; text-decoration: none; min-width: 170px;
  transition: background .15s;
}
.store-btn:hover { background: #1e2533; }
.store-btn-label { text-align: left; }
.store-btn-sub { font-size: 10px; color: #64748b; line-height: 1; }
.store-btn-name { font-size: 14px; font-weight: 600; line-height: 1.3; }

/* ── Footer ── */
.footer {
  text-align: center; padding: 24px;
  font-size: 13px; color: #475569;
  border-top: 1px solid rgba(255,255,255,.05);
  background: #0d1117;
}
body.light .footer { background: #f1f5f9; border-top: 1px solid var(--border, #E8EDF0); }
.footer a { color: #64748b; text-decoration: underline; }
.footer a:hover { color: #94a3b8; }
body.light .footer a { color: #64748b; }
body.light .footer a:hover { color: #475569; }
