html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  font-family: 'Inter', sans-serif;
  color: #333;
  padding-top: 56px;
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
  text-align: start;
}

.navbar {
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  background-color: #ffffff;
}

.navbar .nav-link {
  transition: color 0.2s ease;
  font-weight: 500;
}

.navbar .nav-link:hover {
  color: #0056b3;
}

.navbar-brand img {
  filter: grayscale(20%);
  transition: filter 0.3s ease;
}

.navbar-brand img:hover {
  filter: grayscale(0%);
}

.btn-primary {
  background-color: #004E89;
  border-color: #004E89;
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background-color: #003366;
  transform: translateY(-1px);
}

.card {
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

body {
  margin-bottom: 60px;
  line-height: 1.6;
}

.dropdown-menu {
  border: none;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  min-width: 300px;
}

.dropdown-item {
  color: var(--banksync-darkgray);
  font-weight: 500;
  text-decoration: none;
  background-color: transparent;
  transition: text-decoration 0.2s ease;
}

.dropdown-item:hover {
  text-decoration: underline;
  background-color: transparent;
  /* évite tout fond gris/bleu Bootstrap */
  color: var(--banksync-darkgray);
  /* reste gris foncé */
}

.dropdown-menu h6 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #6c757d;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 48px;
  width: 16px;
  height: 16px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: -1px -1px 5px rgba(0, 0, 0, 0.05);
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  color: #1a1a1a;
}

a {
  color: var(--bs-link-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul.navbar-nav,
ul.list-unstyled,
ul.dropdown-menu {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

/* Corrige les points dans les menus */
.navbar-nav li {
  list-style: none !important;
}


/* Couleur de base des liens de nav */
.navbar .nav-link {
  color: #6c757d;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

/* Hover en bleu avec soulignement */
.navbar .nav-link:hover,
.navbar .dropdown-item:hover {
  color: #004E89;
  text-decoration: underline;
}

/* Pour éviter tout soulignement du logo */
.navbar-brand {
  text-decoration: none !important;
}

/* Couleurs */
:root {
  --banksync-blue: #57B0E8;
  --banksync-darkgray: #2f2f2f;
}

/* Nav links : gris foncé par défaut, pas de changement de couleur au hover */
.navbar .nav-link {
  color: var(--banksync-darkgray);
  font-weight: 500;
  text-decoration: none;
  transition: text-decoration 0.2s ease;
}

.navbar .nav-link:hover {
  text-decoration: underline;
  color: var(--banksync-darkgray);
  /* ne change pas */
}

/* Dropdown items : même style que nav-link */
.dropdown-item {
  color: var(--banksync-darkgray);
  font-weight: 500;
  text-decoration: none;
  transition: text-decoration 0.2s ease;
}

.dropdown-item:hover {
  text-decoration: underline;
  color: var(--banksync-darkgray);
  /* ne change pas */
}

/* Bouton Login (fond blanc, texte bleu clair) */
.banksync-btn-2 {
  color: var(--banksync-blue);
  background-color: white;
  border: 1px solid var(--banksync-blue);
}

.banksync-btn-2:hover {
  background-color: #f0f9ff;
  border-color: var(--banksync-blue);
}

/* Bouton Register (fond bleu clair, texte blanc) */
.banksync-btn-1 {
  background-color: var(--banksync-blue);
  color: white;
  border: 1px solid var(--banksync-blue);
}

.banksync-btn-1:hover {
  background-color: #3295cf;
  border-color: #3295cf;
}

.navbar-nav {
  display: flex;
  justify-content: center;
  align-items: center;
}

.navbar-nav>.nav-item {
  margin: 0;
}

.navbar-nav>.nav-item>.nav-link {
  padding-left: 1rem;
  padding-right: 1rem;
}

.hero-btn-primary {
  background-color: #57B0E8;
  color: white;
  border: 1px solid #57B0E8;
}

.hero-btn-primary:hover {
  background-color: #3295cf;
  border-color: #3295cf;
}

.hero-btn-outline {
  background-color: white;
  color: #57B0E8;
  border: 1px solid #57B0E8;
}

.hero-btn-outline:hover {
  background-color: #f0f9ff;
  color: #3295cf;
  transform: translateY(-1px);
}

.banksync-word {
  font-weight: bold;
}

.sync {
  color: #57B0E8;
}

.bank {
  color: #2f2f2f;
}

.full-width-bg {
  background-color: #f8f9fa;
  /* ou #f5f5f5, selon ton rendu préféré */
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.section-tight {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.btn,
.btn:hover,
.btn:focus {
  text-decoration: none !important;
}

.btn-outline-primary {
  background-color: white;
  color: #57B0E8;
  border: 1px solid #57B0E8;
}

.btn-outline-primary:hover {
  background-color: #f0f9ff;
  color: #3295cf;
  transform: translateY(-1px);
}

.banksync-big-btn {
  font-size: 1.125rem;
  /* légèrement plus grand que le standard */
  padding: 0.75rem 2rem;
  /* hauteur et largeur plus confortables */
  font-weight: 500;
  border-radius: 0.375rem;
}

a.link-inline {
  color: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  transition: all 0.2s ease;
}

a.link-inline:hover {
  color: #0d6efd;
  /* Bootstrap Primary */
  text-decoration: underline solid;
}

.nav-pills .nav-link.active {
  background-color: #0d6efd;
  /* BankSync blue */
  color: white;
  border-radius: 6px;
  font-weight: 500;
}

.nav-pills .nav-link {
  color: #0d6efd;
  transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
  background-color: #e6f0ff;
  border-radius: 6px;
}

.breadcrumb {
  background-color: transparent;
  font-size: 0.95rem;
}

.breadcrumb .breadcrumb-item+.breadcrumb-item::before {
  color: #999;
}

.breadcrumb-link {
  color: #57B0E8;
  /* bleu BankSync */
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-link:hover {
  color: #57B0E8;
  text-decoration: underline;
}

.login-link {
  color: #2f2f2f;
  text-decoration: none;
  font-weight: 400;
}

.login-link:hover {
  color: #2f2f2f;
  text-decoration: underline;
}

.footer-links-muted a {
  color: #2f2f2f !important;
  text-decoration: none;
}

.footer-links-muted a:hover {
  color: #2f2f2f !important;
  text-decoration: underline;
}

@media (min-width: 992px) {

  /* Apply auto-width to all mega-menus except Resources */
  .navbar .dropdown-menu:not([aria-labelledby="resourcesDropdown"]) {
    width: auto !important;
    min-width: 600px !important;
  }
}

@media (max-width: 991.98px) {

  .navbar.fixed-top {
    position: static !important;
  }

  body {
    padding-top: 0 !important;
  }

  .collapse,
  .collapsing {
    transition: none !important;
  }

  .navbar-collapse {
    position: absolute;
    top: 56px;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 1020;
  }

  .navbar-collapse.show {
    position: static;
    background: #fff;
  }

  .dropdown-menu.show {
    box-shadow: none !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  /* Logo on left */
  .navbar-brand.order-1 {
    position: relative;
    z-index: 1040;
    margin-left: 1rem;
  }

  /* Burger on right */
  .navbar-toggler.order-3 {
    position: absolute;
    right: 1rem;
    top: 0.75rem;
    z-index: 1040;
  }

  .dropdown-menu {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  .navbar-nav {
    text-align: left;
    justify-content: flex-start !important;
    align-items: flex-start !important;
  }

  /* Mobile: uniform padding for mega-menu columns */
  .dropdown-menu .row>.col-12.col-lg-6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Mobile: remove border and add spacing for second column */
  .dropdown-menu .row>.col-12.col-lg-6.border-start {
    border-left: none !important;
    /* ensure same left padding, override ps-4 */
    padding-left: 1rem !important;
    margin-top: 2rem;
  }

  .navbar-nav {
    text-align: left;
    justify-content: flex-start !important;
    align-items: flex-start !important;
  }

  .dropdown-menu {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  /* Mobile: remove indentation and add spacing between mega menu sections */
  .dropdown-menu .row>.col-12.col-lg-6.border-start {
    border-left: none !important;
    margin-top: 2rem;
  }

  .dropdown-menu {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  .navbar-nav {
    text-align: left;
    justify-content: flex-start !important;
    align-items: flex-start !important;
  }
}

/* Burger on right */
.navbar-toggler.order-3 {
  position: absolute;
  right: 1rem;
  top: 0.75rem;
  z-index: 1040;
}

.me-10 {
  margin-right: 10px !important;
}

.balance-column {
  white-space: nowrap;
  min-width: 120px;
  text-align: right;
}