/* ============================================================
   AFS Analytics 2026 — Main Stylesheet
   ============================================================ */

:root {
  --afs-red:    #e62640;
  --afs-navy:   #212b44;
  --afs-blue:   #526db0;
  --afs-teal:   #2bc9c0;
  --afs-grey:   #5d6973;
  --afs-light:  #eff1f4;
}

/* ---- BASE ---- */
body {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 16px;
  color: #121416;
  padding-top: 60px; /* navbar height */
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Open Sans', Arial, sans-serif;
}

/* ---- BASE FONTS (override Bootstrap) ---- */
body {
  font-family: 'Roboto', Arial, sans-serif !important;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Open Sans', Arial, sans-serif !important;
}

/* ---- NAVBAR ---- */
#mainNav {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: box-shadow 200ms ease;
  height: 60px;
}

#mainNav .navbar-brand img { height: 36px; }

#mainNav .nav-link {
  color: var(--afs-navy);
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  text-transform: capitalize;
  padding: .5rem 1rem;
  border-bottom: 3px solid transparent;
  transition: border-color 300ms ease;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
  border-bottom-color: var(--afs-red);
  color: var(--afs-navy);
}

.btn-outline-nav {
  border: 1.5px solid #405b92;
  color: #405b92;
  font-size: 12px;
  text-transform: uppercase;
  border-radius: 18px;
}

.btn-outline-nav:hover {
  background: #405b92;
  color: white;
}

/* ---- DEMO SELECTOR ---- */
.demo-selector {
  border-radius: 0 0 6px 6px;
  border-top: none;
  border-bottom: 5px solid var(--afs-navy);
  box-shadow: 5px 5px 6px rgba(0,0,0,.2);
  font-size: 14px;
  min-width: 420px;
  padding: 0;
  overflow: hidden;
}

.demo-item {
  display: flex;
  align-items: center;
  padding: 10px 10px 10px 0;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: background 200ms ease;
}
.demo-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--afs-navy);
  opacity: 0;
  transition: opacity 400ms ease;
}
.demo-item:hover::before { opacity: 1; }
.demo-item:hover { background: #fafafa; color: inherit; }

li:last-child .demo-item { border-bottom: none; }

.demo-icon {
  flex: 0 0 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}
.demo-icon .icon       { width: 90px;  height: auto; object-fit: contain; }
.demo-icon .icon.afs   { width: 50px; }

.demo-about {
  flex: 1;
  padding: 10px 10px 10px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.demo-title {
  font: 600 14px 'Open Sans', sans-serif;
  color: var(--afs-navy);
  max-width: 280px;
}
.demo-desc {
  margin: 0;
  font-size: 13px;
  color: var(--afs-grey);
  line-height: 1.5;
  max-width: 280px;
}

/* Language selector — flag dropdown */
.flag-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  vertical-align: middle;
  margin-right: 6px;
  border: 1px solid rgba(0,0,0,.1);
}

.lng-btn {
  background: none;
  border: none;
  padding: 4px 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.lng-btn::after { display: none; } /* masque la flèche Bootstrap */
.lng-btn .flag-icon { margin-right: 0; width: 26px; height: 26px; }

.lng-dropdown {
  min-width: 130px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  border: 1px solid rgba(0,0,0,.08);
}
.lng-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  font-size: 14px;
  padding: 8px 14px;
}
.lng-dropdown .dropdown-item.active,
.lng-dropdown .dropdown-item:active {
  background: var(--afs-light);
  color: var(--afs-navy);
}

/* Read progress indicator */
.read-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--afs-red);
  transition: width 200ms ease;
}

/* ---- HERO ---- */
.hero-banner {
  background: var(--afs-navy);
  color: white;
  padding: 100px 0 60px;
  position: relative;
}
.hero-banner::after {
  content: '';
  position: absolute;
  bottom: -7px; left: 0; right: 0;
  height: 7px;
  background: var(--afs-red);
}
.hero-label {
  font-size: 20px;
  font-weight: 400;
  background: var(--afs-red);
  display: inline-block;
  padding: 6px 16px;
  margin-bottom: 16px;
}
.hero-label b { font-weight: 700; }
.hero-title    { font-size: 42px; font-weight: 700; margin-bottom: 8px; }
.hero-subtitle { font-size: 26px; color: rgba(255,255,255,.75); margin-bottom: 16px; }
.hero-features { font-size: 14px; color: rgba(255,255,255,.5); }
.hero-screenshot { max-width: 560px; }

/* ---- INTRO / EVO LINE ---- */
.section-intro { background: white; }
.section-title { font-size: 30px; font-weight: 400; margin-bottom: 20px; }

.evo-line { position: relative; padding-bottom: 20px; }
.evo-line::before {
  content: '';
  position: absolute;
  bottom: 30px; left: 20%; right: 20%;
  border-top: 2px solid var(--afs-red);
}
.evo-step { min-width: 120px; }
.evo-label {
  border: 1px solid var(--afs-red);
  padding: 3px 12px;
  font-size: 14px;
  color: var(--afs-red);
  white-space: nowrap;
  background: white;
  margin-bottom: 12px;
}
.evo-dot { display: flex; justify-content: center; }
.evo-dot > div {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--afs-red);
  border: 4px solid white;
  box-shadow: 0 0 0 2px var(--afs-red);
}

/* ---- FEATURES ---- */
.feature-row { padding: 80px 0; }
.feature-dark { background: var(--afs-light); }

.feature-block h2 {
  font-size: 28px;
  font-weight: 700;
  font-family: 'Open Sans', sans-serif;
  margin-bottom: 12px;
  color: #121416;
}
.feature-img { max-width: 100%; border-radius: 8px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
  border: 1px solid var(--afs-red);
  color: var(--afs-red);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 13px;
}
.tag::before { content: '✓ '; }

/* ---- STEPS ---- */
.section-steps {
  background: var(--afs-navy)
    url('https://www.afsanalytics.com/img/afsa/rocket.blue.png')
    no-repeat -10px bottom / auto 340px;
  padding: 80px 0 100px;
  position: relative;
}
.section-steps::before {
  content: '';
  position: absolute;
  top: -7px; left: 0; right: 0;
  height: 7px;
  background: var(--afs-red);
}
.step-card { text-align: left; }
.step-digit {
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 2px solid var(--afs-blue);
  color: var(--afs-blue);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
}
.step-card h3 { color: rgba(255,255,255,.85); font-size: 18px; }
.step-card p  { color: rgba(255,255,255,.5);  font-size: 15px; line-height: 1.6; }

/* ---- PLATFORMS ---- */
.section-platforms { background: white; }
.platform-card {
  border: 1px solid rgba(33,43,68,.2);
  border-radius: 8px;
  transition: border-color 300ms ease;
  cursor: pointer;
}
.platform-card:hover { border-color: var(--afs-teal); }
.platform-logo img   { max-height: 60px; object-fit: contain; }
.platform-desc small { color: var(--afs-grey); font-size: 12px; line-height: 1.5; }
.platform-others     { display: flex; flex-direction: column; justify-content: center; }

/* ---- DEVELOPERS ---- */
.section-devs { background: var(--afs-light); }
.dev-icon img { width: 60px; height: 60px; object-fit: contain; }
.dev-title    { font-size: 16px; font-weight: 600; color: var(--afs-navy); }
.dev-card a   { color: var(--afs-blue); }

/* ---- CTA ---- */
.section-cta { background: white; }
.section-cta h2 { font-size: 28px; max-width: 600px; margin: 0 auto 32px; }
.section-cta strong { color: var(--afs-blue); font-weight: 400; }

/* ---- INSTALL PANEL ---- */
#install_panel {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: var(--afs-navy);
  background-image: url('https://www.afsanalytics.com/img/afsa/rocket.blue.png');
  background-position: -10px bottom;
  background-repeat: no-repeat;
  background-size: auto 380px;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  border-top: 1px solid white;
  transition: transform 500ms ease, opacity 500ms ease;
}

#install_panel.lostfocus {
  transform: translateY(100%);
  pointer-events: none;
  opacity: 0;
}

#install_panel h1 {
  font: 400 32px 'Open Sans', sans-serif;
  margin: 40px 0 10px;
  text-align: center;
}

.afsa_close {
  position: absolute;
  top: 0;
  right: 10px;
  font: 38px Arial, sans-serif;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
}

.select_menu {
  background: white;
  border-radius: 15px;
  padding: 30px;
  max-width: 900px;
  width: 90%;
}

.select_menu h2 {
  margin: 0 0 10px;
  font: 24px 'Open Sans', sans-serif;
  color: var(--afs-navy);
  text-align: left;
}

.plugin_select_menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.plugin_select {
  background: white;
  border-radius: 15px;
  padding: 15px 10px;
  width: 160px;
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid #a1ccca;
  text-decoration: none;
  color: var(--afs-navy);
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.plugin_select:hover {
  border-color: var(--afs-teal);
  box-shadow: 0 4px 16px rgba(43,201,192,.25);
  color: var(--afs-navy);
}

.plugin_select.dont_know {
  background: #e91e63;
  border-color: #e91e63;
}

.plugin_select.dont_know:hover {
  box-shadow: 0 4px 16px rgba(233,30,99,.35);
}

.plugin_select.dont_know .cms_title { color: white; }

.plugin_select_item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.plugin_select img.logo       { width: 110px; height: auto; object-fit: contain; }
.plugin_select img.logo.shopify    { width: 70px; }
.plugin_select img.logo.prestashop { width: 80px; }
.plugin_select img.logo.other      { width: 90px; }

.cms_title {
  font: bold 16px 'Roboto', Arial, sans-serif;
  color: var(--afs-navy);
  text-align: center;
}

@media (max-width: 600px) {
  .plugin_select { width: 130px; height: 120px; }
  .plugin_select img.logo { width: 80px; }
  #install_panel { background-size: auto 180px; }
}

/* ---- FOOTER ---- */
.footer-main {
  background: var(--afs-navy);
  color: rgba(255,255,255,.65);
}

.footer-logo { filter: brightness(0) invert(1); }

.footer-heading {
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  color: rgba(255,255,255,1);
  margin-bottom: 12px;
}

.footer-links li { margin-bottom: 6px; }

.footer-links a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: 13px;
  transition: color 250ms ease;
}

.footer-links a:hover { color: white; }

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: 16px;
  transition: background 400ms ease, border-color 400ms ease;
}

.social-btn:hover {
  background: var(--afs-red);
  border-color: var(--afs-red);
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 13px;
  color: rgba(255,255,255,.45);
}

/* ============================================================
   PRICING PAGE
   ============================================================ */

/* --- Hero --- */
.pricing-hero {
  background: var(--afs-navy);
  padding: 90px 0 60px;
  position: relative;
}
.pricing-hero::after {
  content: '';
  position: absolute;
  bottom: -7px; left: 0; right: 0;
  height: 7px;
  background: var(--afs-red);
}
.pricing-hero h1 {
  font-size: 38px;
  font-weight: 700;
  color: white;
}
.pricing-hero .lead {
  font-size: 18px;
}

/* --- Plan cards grid --- */
.pricing-plans {
  background: var(--afs-light);
}

.plan-card {
  background: white;
  border-radius: 12px;
  border: 2px solid #e0e4ee;
  padding: 0 0 24px;
  transition: box-shadow 300ms ease, border-color 300ms ease;
  overflow: hidden;
}
.plan-card:hover {
  box-shadow: 0 8px 32px rgba(33,43,68,.15);
  border-color: var(--afs-blue);
}

/* plan-specific accent colors */
.plan-card.silver { border-top: 4px solid #a8aaad; }
.plan-card.gold   { border-top: 4px solid #c8a820; }
.plan-card.diamond{ border-top: 4px solid #7c6fcd; }
.plan-card.free   { border-top: 4px solid #526db0; }

/* --- Badge (Gold / Diamond) --- */
.plan-badge {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 7px 14px;
  border-radius: 0;
  margin-bottom: 0;
  text-align: center;
}
.plan-badge.gold    { background: #fff3cd; color: #856404; }
.plan-badge.diamond { background: #ede9fa; color: #4d3fc8; }

/* --- Header block --- */
.plan-header {
  background: var(--afs-light);
  padding: 20px 16px 16px;
  border-bottom: 1px solid #e0e4ee;
}
.plan-label {
  font-family: 'Open Sans', sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-transform: capitalize;
  color: var(--afs-navy);
  margin-bottom: 8px;
}
.plan-card.silver .plan-label { color: #6e6e6e; }
.plan-card.gold   .plan-label { color: #9a7d10; }
.plan-card.diamond .plan-label { color: #4d3fc8; }

.plan-sep {
  width: 40px;
  height: 3px;
  background: var(--afs-red);
  margin: 0 auto 12px;
}

.plan-from {
  font-size: 12px;
  color: var(--afs-grey);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 2px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  color: var(--afs-navy);
}
.plan-amount {
  font-family: 'Open Sans', sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}
.plan-currency { font-size: 20px; font-weight: 600; align-self: flex-start; margin-top: 4px; }
.plan-sep-price { font-size: 18px; color: var(--afs-grey); margin: 0 2px; }
.plan-period  { font-size: 14px; color: var(--afs-grey); }

/* --- Scope line --- */
.plan-scope {
  padding: 10px 16px 6px;
  font-size: 13px;
  color: var(--afs-grey);
  font-style: italic;
}

/* --- Pageviews --- */
.plan-pv {
  padding: 8px 16px 10px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  background: white;
  border-top: 1px solid #f0f2f6;
}
.pv-label { font-size: 12px; color: var(--afs-grey); }
.pv-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--afs-navy);
  font-family: 'Open Sans', sans-serif;
}
.pv-unit  { font-size: 12px; color: var(--afs-grey); }

/* --- CMS logos --- */
.plan-cms {
  padding: 10px 16px;
  border-bottom: 1px solid #f0f2f6;
}
.cms-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--afs-grey);
  margin-bottom: 6px;
}
.cms-list li img {
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: grayscale(30%);
  opacity: .85;
}

/* --- Features list --- */
.plan-features {
  padding: 14px 16px 0;
  flex-grow: 1;
}
.plan-feature {
  font-size: 13px;
  color: var(--afs-grey);
  padding: 5px 0 5px 20px;
  border-bottom: 1px solid #f5f6f9;
  position: relative;
  line-height: 1.45;
}
.plan-feature:last-child { border-bottom: none; }
.plan-feature .check {
  position: absolute;
  left: 0;
  color: var(--afs-teal);
  font-weight: 700;
}
.plan-feature.summary {
  color: var(--afs-navy);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #f0f4ff;
  margin: 0 -16px;
  padding: 6px 16px;
  border-bottom: 1px solid #dde3f0;
}
.plan-feature.muted {
  color: #a0a8b5;
  padding-left: 4px;
}
.plan-feature.special {
  font-size: 12.5px;
  color: #5a5a6e;
  padding-left: 4px;
  font-style: italic;
}
.plan-feature.unavailable {
  color: var(--afs-red);
  font-weight: 600;
  padding-left: 4px;
  font-size: 13px;
}

/* --- CTA button --- */
.plan-footer {
  padding: 20px 20px 0;
}
.btn-silver {
  background: #888;
  border-color: #888;
  color: white;
}
.btn-silver:hover { background: #6e6e6e; border-color: #6e6e6e; color: white; }

.btn-gold {
  background: #c8a820;
  border-color: #c8a820;
  color: white;
}
.btn-gold:hover { background: #a8880e; border-color: #a8880e; color: white; }

/* ============================================================
   COMPARE TABLE
   ============================================================ */
.pricing-compare {
  background: white;
}
.pricing-compare h2 {
  font-size: 28px;
  color: var(--afs-navy);
}

.compare-table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e0e4ee;
  border-radius: 10px;
  overflow: hidden;
  font-size: 14px;
}
.compare-table thead th {
  background: var(--afs-light);
  padding: 14px 10px;
  text-align: center;
  font-weight: 700;
  border-bottom: 2px solid #d0d5e0;
}
.compare-table thead th:first-child { text-align: left; padding-left: 20px; }

.ct-label {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}
.ct-label.free    { background: #e8edf8; color: var(--afs-blue); }
.ct-label.silver  { background: #f0f0f0; color: #555; }
.ct-label.gold    { background: #fff8e1; color: #9a7d10; }

.compare-table tbody tr:nth-child(even) td { background: #fafbfd; }
.compare-table tbody tr:hover td { background: #f0f4ff; }

.ct-feature {
  padding: 10px 10px 10px 20px;
  color: var(--afs-navy);
  border-bottom: 1px solid #eaecf2;
}
.ct-val {
  text-align: center;
  padding: 10px;
  color: #c8cdd8;
  font-size: 16px;
  border-bottom: 1px solid #eaecf2;
}
.ct-val.enabled {
  color: var(--afs-teal);
  font-weight: 700;
  font-size: 18px;
}

@media (max-width: 991px) {
  .plan-amount { font-size: 28px; }
  .pricing-hero h1 { font-size: 28px; }
}
@media (max-width: 767px) {
  .pricing-plans .row { flex-direction: column; }
  .compare-table { font-size: 12px; }
  .ct-feature { padding-left: 10px; }
}

/* ---- MOBILE MENU ---- */
@media (max-width: 991px) {
  #navbarContent {
    background: #fff;
    border: 2px solid var(--afs-red);
    border-radius: 6px;
    margin-top: 8px;
    padding: 12px 16px;
  }

  #mainNav .nav-link {
    border-bottom: none;
    padding: .5rem 0;
  }

  #mainNav .nav-link:hover,
  #mainNav .nav-link.active {
    border-bottom: none;
    color: var(--afs-red);
  }

  /* Language selector : reste dans le flux, pas de dropdown hors-écran */
  #navbarContent .d-flex {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
  }

  #navbarContent .lng-selector .dropdown-menu {
    position: static !important;
    transform: none !important;
    box-shadow: none;
    border: 1px solid #dee2e6;
    margin-top: 4px;
  }
}
