/* Déclaration des couleurs officielles de Bamana Madou */
:root {
  --primary-blue: #1e3a8a; /* Bleu Royal Profond */
  --accent-red: #dc2626; /* Rouge Action / Alertes */
  --bg-light: #f8fafc; /* Fond de page gris très clair */
  --text-dark: #1e293b; /* Texte principal */
  --sidebar-width: 260px;
}

body {
  background-color: var(--bg-light);
  color: var(--text-dark);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

/* Structure globale Layout avec Sidebar */
.wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
}

#main-content {
  width: calc(100% - var(--sidebar-width));
  padding: 30px;
  min-height: 100vh;
  transition: all 0.3s;
}

/* Style des cartes et conteneurs pour un rendu Ultra-Pro */
.card-custom {
  background: #ffffff;
  border: none;
  border-radius: 8px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
}

/* Version responsive basique */
@media (max-width: 768px) {
  #main-content {
    width: 100%;
    padding: 15px;
  }
}

/* Style pour la gestion de l'élément actif dans le menu */
#sidebar .nav-link.active-menu {
  background-color: var(--accent-red) !important;
  color: #ffffff !important;
  font-weight: bold;
  border-left: 4px solid #ffffff;
}

#sidebar .nav-link:hover:not(.active-menu) {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Ajustements Responsives Stricts pour Mobile */
@media (max-width: 768px){

  .wrapper{
    position: relative;
    overflow-x: hidden;
  }

  #sidebar{
    position: fixed;
    top: 56px;
    left: -260px;
    width: 260px;
    height: calc(100vh - 56px);

    background: #fff;
    z-index: 1040;

    overflow-y: auto;
    overflow-x: hidden;

    padding-bottom: 100px;

    transition: left .3s ease;
    -webkit-overflow-scrolling: touch;

    box-shadow: 0 4px 20px rgba(0,0,0,.08);
  }

  #sidebar.show-sidebar{
    left: 0;
  }

  #main-content{
    width: 100%;
    min-height: 100vh;
    padding: 15px;
  }

  #sidebar::-webkit-scrollbar{
    width: 4px;
  }

  #sidebar::-webkit-scrollbar-thumb{
    background: rgba(0,0,0,.2);
    border-radius: 10px;
  }
}