/* ================================================
   NEXFINANZ — main.css
   Version optimisée — zéro duplication
   ================================================ */

/* ---- VARIABLES -------------------------------- */
:root {
  --primary:    #1a73e8;
  --primary-dk: #0d47a1;
  --accent:     #f39c12;
  --dark:       #0d2137;
  --text:       #2c3e50;
  --text-light: #6c757d;
  --bg-light:   #f8faff;
  --white:      #ffffff;
  --radius-md:  0.75rem;
  --radius-lg:  1rem;
  --radius-xl:  1.5rem;
  --shadow-sm:  0 2px 12px rgba(0,0,0,.06);
  --shadow-md:  0 8px 30px rgba(0,0,0,.10);
  --shadow-lg:  0 20px 60px rgba(0,0,0,.13);
  --transition: all .3s cubic-bezier(.4,0,.2,1);
}

/* ---- RESET & BASE ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  color: var(--text);
  background: var(--white);
  padding-top: 72px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

p {
  font-size: 17px;
  line-height: 1.75;
}

small, .small { font-size: 14px; }
.text-muted   { font-size: 16px; }

.py-6 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
.pt-6 { padding-top: 6rem !important; }
.mb-6 { margin-bottom: 5rem !important; }

/* ---- NAVBAR ----------------------------------- */
#mainNav {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0,0,0,.08);
  transition: var(--transition);
  padding: 12px 0;
}
#mainNav.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,.12);
}

.brand-logo {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-n {
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
}
.brand-name {
  font-weight: 800;
  font-size: 22px;
  color: var(--dark);
  letter-spacing: .5px;
}

#mainNav .nav-link {
  font-weight: 500;
  font-size: 16px;
  color: var(--text);
  padding: 6px 12px !important;
  border-radius: 8px;
  transition: var(--transition);
}
#mainNav .nav-link:hover {
  background: var(--bg-light);
  color: var(--primary);
}

#mainNav .dropdown-menu {
  border: none;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  padding: 8px;
}
#mainNav .dropdown-item {
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
}
#mainNav .dropdown-item:hover {
  background: var(--bg-light);
  color: var(--primary);
}

/* ---- LANGUAGE SWITCHER ------------------------ */
.lang-btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  border-radius: 4px;
  opacity: .45;
  transition: var(--transition);
  line-height: 1;
}
.lang-btn:hover { opacity: 1; }
.lang-btn.active {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--accent);
}
.lang-btn img {
  display: block;
  border-radius: 2px;
}

/* ---- SECTION HEADERS -------------------------- */
.section-tag {
  display: inline-block;
  background: rgba(26,115,232,.1);
  color: var(--primary);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
}
.section-sub {
  color: var(--text-light);
  font-size: 18px;
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto;
}

/* ---- PAGE HEADER (toutes pages sauf home) ----- */
.page-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
  padding: 120px 0 60px;
}
.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}
.page-header p { font-size: 19px; }

/* ---- HERO SECTION ----------------------------- */
.hero-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dark) 0%, #1565c0 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.hero-eyebrow {
  color: rgba(255,255,255,.7);
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: .5px;
}
.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  color: #fff;
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 20px;
}
.text-accent { color: var(--accent); }

.hero-subtitle {
  color: rgba(255,255,255,.8);
  font-size: 19px;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 550px;
}
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  line-height: 0;
  z-index: 1;
}
.hero-wave svg { display: block; }

/* ---- HERO IMAGE ------------------------------- */
.hero-image-wrapper {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 1.5rem;
  padding: 1rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  max-width: 520px;
  width: 100%;
}
.hero-image {
  max-height: 420px;
  width: 100%;
  object-fit: cover;
  border-radius: 1rem;
  display: block;
}

/* ---- LOAN TABS (home) ------------------------- */
.loan-tabs { gap: .5rem; }
.loan-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-light);
  border: 2px solid transparent;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
}
.loan-tab-btn:hover,
.loan-tab-btn.active {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.loan-tab-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.loan-tab-icon { font-size: 18px; }

/* ---- OFFER STATS ------------------------------ */
.offer-stat {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}
.offer-stat-label {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.offer-stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark);
}

/* ---- SVG ILLUSTRATIONS (offres) --------------- */
.offer-svg-container {
  background: var(--bg-light);
  border-radius: 1.5rem;
  padding: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.offer-svg-container:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.offer-svg-img {
  width: 100%;
  max-width: 380px;
  height: auto;
  min-height: 240px;
}

/* ---- OFFER ICON DISPLAY (services page) ------- */
.offer-icon-display {
  font-size: 8rem;
  background: var(--bg-light);
  border-radius: var(--radius-xl);
  padding: 3rem;
  display: inline-block;
}

/* ---- STATS SECTION ---------------------------- */
.stats-section {
  background: linear-gradient(135deg, var(--dark), #1565c0);
}
.stat-card {
  padding: 2rem;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}
.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 16px;
  color: rgba(255,255,255,.7);
  font-weight: 500;
}

/* ---- LOAN TYPE CARDS (select type) ------------ */
.loan-type-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: var(--transition);
}
.loan-type-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.ltc-icon  { font-size: 3.5rem; }
.ltc-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
}
.ltc-desc {
  color: var(--text-light);
  font-size: 14px;
}

/* ---- SIMULATOR RESULT PANEL ------------------- */
.sim-result-panel {
  background: linear-gradient(160deg, var(--dark) 0%, var(--primary) 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 30px;
}
.sim-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.sim-row.last { border-bottom: none; }
.sim-row.highlight {
  background: rgba(255,255,255,.1);
  margin: 6px -10px;
  padding: 12px 10px;
  border-radius: 8px;
  border: none;
}
.sim-row span          { font-size: 15px; opacity: .85; }
.sim-row strong        { font-size: 16px; }
.sim-row.highlight strong { font-size: 1.3rem; }

/* Tableau d'amortissement */
.schedule-preview { font-size: 11px; }
.sp-header,
.sp-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.5fr 1.5fr;
  gap: 4px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sp-header { opacity: .65; font-weight: 600; }
.sp-row    { opacity: .85; }

/* ---- CARDS GENERIQUES ------------------------- */
.sc-title { font-size: 1.3rem; }
.sc-desc  { font-size: 16px; }

/* ---- TESTIMONIALS ----------------------------- */
.testimonial-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,.04);
  transition: var(--transition);
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.tc-stars   { font-size: 16px; }
.tc-content {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.7;
  font-style: italic;
}
.tc-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

/* ---- CTA BOX ---------------------------------- */
.cta-box {
  background: linear-gradient(135deg, var(--dark), var(--primary));
  border-radius: var(--radius-xl);
  padding: 60px 40px;
}

/* ---- VALUE CARDS (about) ---------------------- */
.value-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,.04);
  height: 100%;
}
.vc-icon { font-size: 2rem; margin-bottom: 12px; }

/* ---- CONTACT ICON BOX ------------------------- */
.contact-icon-box {
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* ---- CONFIRMATION ----------------------------- */
.ref-badge {
  display: inline-block;
  font-family: monospace;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  background: rgba(26,115,232,.08);
  padding: 10px 28px;
  border-radius: 12px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: var(--transition);
}
.ref-badge:hover {
  background: rgba(26,115,232,.15);
}

/* ---- DASHBOARD LOAN CARDS --------------------- */
.loan-card-dash { transition: var(--transition); }
.loan-card-dash:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md) !important;
}

/* ---- DASHBOARD STATS -------------------------- */
.display-6 { font-size: 3rem !important; }

/* ---- FOOTER ----------------------------------- */
.site-footer   { background: var(--dark); }
.footer-top    { padding: 60px 0 40px; }
.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 12px;
  font-size: 15px;
  color: rgba(255,255,255,.6);
}
.footer-links a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--accent); }

.social-link {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  text-decoration: none;
  transition: var(--transition);
}
.social-link:hover {
  background: var(--primary);
  color: #fff;
}

/* ---- WHATSAPP FLOAT --------------------------- */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  left: 24px;
  z-index: 9000;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  transition: var(--transition);
}
.whatsapp-float:hover {
  transform: scale(1.1);
  color: #fff;
  background: #20b558;
}

/* ---- BUTTONS ---------------------------------- */
.btn {
  font-size: 16px;
}
.btn-lg {
  font-size: 17px;
  padding: 14px 28px;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dk);
  border-color: var(--primary-dk);
}
.btn-warning {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-warning:hover {
  background: #e08e0b;
  border-color: #e08e0b;
  color: #fff;
}

/* ---- FORMS ------------------------------------ */
.form-label {
  font-size: 15px;
  font-weight: 600;
}
.form-control,
.form-select {
  font-size: 16px;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,.12);
}

/* ---- LEGAL CONTENT ---------------------------- */
.col-lg-8 h4 { color: var(--dark); }

/* ---- ANIMATIONS ------------------------------- */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.4); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp .6s ease both; }
.animate-in:nth-child(2) { animation-delay: .1s; }
.animate-in:nth-child(3) { animation-delay: .2s; }
.animate-in:nth-child(4) { animation-delay: .3s; }
.animate-in:nth-child(5) { animation-delay: .4s; }

/* ---- RESPONSIVE ------------------------------- */
@media (max-width: 991px) {
  #mainNav .navbar-collapse {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 16px;
    margin-top: 12px;
  }
}

@media (max-width: 768px) {
  body                 { font-size: 16px; padding-top: 64px; }
  .hero-title          { font-size: 2.2rem; }
  .cta-box             { padding: 40px 24px; }
  .sim-result-panel    { margin-bottom: 20px; }
  .offer-icon-display  { font-size: 5rem; padding: 2rem; }
  .offer-svg-container { max-width: 100%; }
  .btn-lg              { font-size: 16px; padding: 12px 24px; }

  /* IMAGE HERO MOBILE */
  .hero-image-wrapper {
    max-width: 100%;
    margin-top: 2rem;
    padding: 0.6rem;
  }
  .hero-image {
    max-height: 260px;
    border-radius: 0.75rem;
  }

  /* Centrer le contenu hero sur mobile */
  .hero-section .row {
    text-align: center;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-section .d-flex.flex-wrap {
    justify-content: center;
  }
}

/* Tablette */
@media (min-width: 769px) and (max-width: 991px) {
  .hero-image-wrapper {
    max-width: 380px;
    margin-top: 1.5rem;
  }
  .hero-image {
    max-height: 320px;
  }
}