/* --- BLOCKPILOT DESIGN SYSTEM (Mobile Fix & Final) --- */
:root {
  --bp-bg: #FFFFFF;
  --bp-surface: #FFFFFF;
  --bp-surface-alt: #F8FAFC;
  --bp-border: #E2E8F0;
  --bp-text-main: #0F172A;
  --bp-text-muted: #64748B;
  --bp-primary: #3C756E; 
  --bp-primary-hover: #2E5C56;
  --bp-primary-soft: rgba(60, 117, 110, 0.08);
  
  --bp-radius-card: 12px;
  --bp-radius-ui: 8px;
  
  --bp-shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --bp-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  --bp-shadow-btn: 0 1px 2px rgba(0, 0, 0, 0.05);
  
  --max: 1080px;
}

* { box-sizing: border-box; }
/* FIX MOBILE SCROLL */
html, body { width: 100%; overflow-x: hidden; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background-color: var(--bp-surface-alt); font-family: 'Inter', sans-serif; color: var(--bp-text-main); line-height: 1.5; -webkit-font-smoothing: antialiased; }

/* LAYOUT */
.container, .container-premium { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section--tight { padding: 32px 0; }

/* --- HEADER --- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bp-border); height: 64px; display: flex; align-items: center;
}
.nav { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--bp-text-main); font-weight: 800; }

.nav__links { display: flex; align-items: center; gap: 8px; }
.nav__links a {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--bp-text-muted); font-weight: 500; font-size: 14px;
  padding: 8px 12px; border-radius: var(--bp-radius-ui);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav__links a svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; transition: transform 0.2s; }
.nav__links a:hover { color: var(--bp-text-main); background: var(--bp-surface-alt); }
.nav__links a:hover svg { transform: translateY(-1px); opacity: 1; }
.nav__links a.active { color: var(--bp-primary); background: var(--bp-primary-soft); }

.navToggle { display: none; background: none; border: none; font-weight: 600; color: var(--bp-text-main); cursor: pointer; }

.lang { display: flex; gap: 4px; align-items: center; }
.pill { 
  font-size: 12px; font-weight: 700; color: var(--bp-text-muted); padding: 4px 8px; 
  text-decoration: none; border-radius: 6px; transition: all 0.2s; cursor: pointer;
}
.pill:hover { color: var(--bp-text-main); background: var(--bp-surface-alt); }
.pill.is-active { background: var(--bp-text-main); color: #fff; }

/* --- UI COMPONENTS --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border-radius: var(--bp-radius-ui);
  font-weight: 600; text-decoration: none; font-size: 14px;
  border: 1px solid var(--bp-border); background: #fff; color: var(--bp-text-main); 
  box-shadow: var(--bp-shadow-btn); transition: all 0.2s; cursor: pointer;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.btn--primary { background: var(--bp-primary); border-color: var(--bp-primary); color: #fff; }
.btn--primary:hover { background: var(--bp-primary-hover); }
.btn--text { border: none; background: transparent; shadow: none; padding: 0 16px; }
.btn--text:hover { background: var(--bp-surface-alt); transform: none; box-shadow: none; }

.bp-card {
  background: var(--bp-surface); border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-card); box-shadow: var(--bp-shadow-card);
  padding: 32px; margin-bottom: 32px; transition: all 0.2s;
}
.bp-card:hover { box-shadow: var(--bp-shadow-hover); transform: translateY(-2px); }

/* --- WIDGET FIX --- */
.tv-widget-wrapper { height: 500px; width: 100%; position: relative; }

/* TYPOGRAPHY */
.h1 { font-size: 48px; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 24px; font-weight: 800; }
.lead { font-size: 18px; color: var(--bp-text-muted); margin: 0 0 32px; }

.bp-section-header { text-align: center; margin-bottom: 48px; max-width: 600px; margin-left: auto; margin-right: auto; }
.bp-section-title { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; color: var(--bp-text-main); }
.bp-section-subtitle { font-size: 16px; color: var(--bp-text-muted); }

.cardTitle { font-weight: 700; font-size: 16px; margin-bottom: 8px; color: var(--bp-text-main); }
.cardSub { font-size: 14px; color: var(--bp-text-muted); margin: 0; line-height: 1.5; }
.mini { padding: 16px 0; border-bottom: 1px solid var(--bp-border); }
.mini:last-child { border-bottom: none; }
.mini strong { display: block; font-size: 14px; margin-bottom: 2px; }

/* BULLETS */
.bullets { list-style: none; padding: 0; margin: 0 0 24px; }
.bullets li { position: relative; padding-left: 24px; margin-bottom: 8px; color: var(--bp-text-muted); font-size: 15px; }
.bullets li::before { 
  content: "•"; color: var(--bp-primary); position: absolute; left: 6px; font-weight: bold; font-size: 18px; line-height: 1.4; 
}
.tip { border-bottom: 1px dotted var(--bp-text-muted); cursor: help; }

/* GRIDS */
.hero__grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }

/* FORMS */
.input, .select, textarea {
  width: 100%; padding: 10px 14px; 
  border-radius: var(--bp-radius-ui); border: 1px solid var(--bp-border); 
  background: #fff; color: var(--bp-text-main); font-size: 15px; outline: none;
}
.input:focus { border-color: var(--bp-primary); box-shadow: 0 0 0 3px var(--bp-primary-soft); }

.scenarioChips .chip {
  border: 1px solid var(--bp-border); background: #fff; border-radius: var(--bp-radius-ui);
  padding: 8px 16px; font-size: 13px; font-weight: 500; cursor: pointer;
}
.scenarioChips .chip:hover { border-color: #CBD5E1; background: var(--bp-surface-alt); }
.scenarioChips .chip.active { background: var(--bp-primary-soft); color: var(--bp-primary); border-color: var(--bp-primary); font-weight: 600; }

.yieldCards .ycard { border: 1px solid var(--bp-border); border-radius: 8px; padding: 12px; text-align: center; }
.yieldCards .n { font-weight: 700; font-size: 18px; color: var(--bp-primary); margin-top: 4px; }

/* RESPONSIVE */
@media (max-width: 860px) {
  .hero__grid, .grid2, .grid3 { display: block !important; }
  .grid2 > div, .grid3 > div { margin-bottom: 24px; }
  
  /* Mobile Menu */
  .navToggle { display: block; }
  .nav__links { 
    display: none; position: absolute; top: 64px; left: 0; right: 0; 
    background: rgba(255,255,255,0.98); backdrop-filter: blur(10px);
    flex-direction: column; padding: 24px; border-bottom: 1px solid var(--bp-border);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); align-items: stretch;
  }
  .nav__links a { justify-content: flex-start; padding: 12px; font-size: 16px; }
  
  body.menu-open .nav__links { display: flex; }
  
  .h1 { font-size: 34px; }
  .bp-card { padding: 24px; }
  .tv-widget-wrapper { height: 400px; }
}

.footer { padding: 48px 0; border-top: 1px solid var(--bp-border); color: var(--bp-text-muted); font-size: 14px; text-align: center; margin-top: auto; }

/* DOCS STYLE */
.doc-layout { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; min-height: 80vh; }
.doc-sidebar { position: sticky; top: 100px; padding-right: 24px; border-right: 1px solid var(--bp-border); max-height: calc(100vh - 120px); overflow-y: auto; }
.doc-nav-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bp-text-muted); margin-bottom: 16px; display: block; }
.doc-nav-link { display: block; text-decoration: none; color: var(--bp-text-main); font-size: 14px; padding: 8px 0; border-left: 2px solid transparent; padding-left: 16px; margin-left: -1px; transition: all 0.2s; opacity: 0.8; }
.doc-nav-link:hover { color: var(--bp-primary); opacity: 1; }
.doc-nav-link.active { border-left-color: var(--bp-primary); color: var(--bp-primary); font-weight: 600; opacity: 1; }
.doc-content { max-width: 720px; padding-bottom: 64px; }
.doc-content h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--bp-border); }
.doc-content h2 { font-size: 24px; font-weight: 700; margin-top: 48px; margin-bottom: 16px; color: var(--bp-text-main); scroll-margin-top: 100px; }
.doc-content h3 { font-size: 18px; font-weight: 600; margin-top: 32px; margin-bottom: 12px; }
.doc-content p { font-size: 16px; line-height: 1.7; margin-bottom: 24px; color: #334155; }
.doc-content ul, .doc-content ol { padding-left: 20px; margin-bottom: 24px; }
.doc-content li { margin-bottom: 8px; color: #334155; }
.doc-content a { color: var(--bp-primary); text-decoration: underline; text-underline-offset: 3px; }
.callout { background: var(--bp-surface-alt); border: 1px solid var(--bp-border); border-radius: 8px; padding: 24px; margin: 32px 0; }
@media (max-width: 860px) {
  .doc-layout { display: block; }
  .doc-sidebar { position: relative; top: 0; width: 100%; border-right: none; border-bottom: 1px solid var(--bp-border); margin-bottom: 32px; padding-bottom: 24px; max-height: none; }
}
/* --- TIMELINE (Liste Verticale Connectée) --- */
.timeline { position: relative; padding-left: 8px; }

.tl-item { position: relative; padding-left: 24px; padding-bottom: 32px; }
.tl-item:last-child { padding-bottom: 0; }

/* Le trait vertical fin */
.tl-item::before {
  content: ""; position: absolute; left: 11px; top: 24px; bottom: 0;
  width: 1px; background: #E2E8F0;
}
.tl-item:last-child::before { display: none; }

/* La bulle numéro */
.tl-marker {
  position: absolute; left: 0; top: 0;
  width: 24px; height: 24px;
  background: #F1F5F9; color: #64748B;
  border-radius: 50%; border: 1px solid #E2E8F0;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
/* La bulle verte pour la fin */
.tl-marker.green {
  background: var(--bp-primary-soft); color: var(--bp-primary); border-color: var(--bp-primary);
}

.tl-content strong { display: block; font-size: 14px; margin-bottom: 4px; color: var(--bp-text-main); }
.tl-content p { font-size: 13px; color: var(--bp-text-muted); margin: 0; line-height: 1.5; }
