<?php
// Sidebar spécifique gestion_compagnies (indépendant du reste de l'application)
// Aucune dépendance à des tables dynamiques ici pour rester léger.
?>
<ul class="navbar-nav sidebar sidebar-light accordion" id="accordionSidebar">
  <a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.php">
    <div class="sidebar-brand-icon rotate-n-15">
      <i class="fas fa-database"></i>
    </div>
    <div class="sidebar-brand-text mx-3">Backups</div>
  </a>
  <hr class="sidebar-divider my-0">
  <li class="nav-item <?php echo basename($_SERVER['SCRIPT_NAME'])==='index.php'?'active':''; ?>">
    <a class="nav-link" href="index.php">
      <i class="fas fa-chart-line"></i>
      <span>Dashboard</span>
    </a>
  </li>
  <li class="nav-item <?php echo basename($_SERVER['SCRIPT_NAME'])==='backups.php'?'active':''; ?>">
    <a class="nav-link" href="backups.php">
      <i class="fas fa-database"></i>
      <span>Backups</span>
    </a>
  </li>
  <li class="nav-item <?php echo basename($_SERVER['SCRIPT_NAME'])==='users.php'?'active':''; ?>">
    <a class="nav-link" href="email_config.php">
      <i class="fas fa-envelope"></i>
      <span>SMTP</span>
    </a>
  </li>
  <li class="nav-item <?php echo basename($_SERVER['SCRIPT_NAME'])==='users.php'?'active':''; ?>">
    <a class="nav-link" href="ftp_config.php">
      <i class="fa fa-network-wired"></i>
      <span>FTP</span>
    </a>
  </li>
  <li class="nav-item <?php echo basename($_SERVER['SCRIPT_NAME'])==='companies.php'?'active':''; ?>">
    <a class="nav-link" href="companies.php">
      <i class="fas fa-building"></i>
      <span>Compagnies</span>
    </a>
  </li>
  <li class="nav-item <?php echo basename($_SERVER['SCRIPT_NAME'])==='valider_compagnies.php'?'active':''; ?>">
    <a class="nav-link" href="valider_compagnies.php">
      <i class="fas fa-check-circle"></i>
      <span>Validation</span>
    </a>
  </li>
  <li class="nav-item <?php echo basename($_SERVER['SCRIPT_NAME'])==='utilisateurs_compagnies.php'?'active':''; ?>">
    <a class="nav-link" href="utilisateurs_compagnies.php">
      <i class="fas fa-users-cog"></i>
      <span>Users Compagnies</span>
    </a>
  </li>
  <li class="nav-item <?php echo basename($_SERVER['SCRIPT_NAME'])==='add_user.php'?'active':''; ?>">
    <a class="nav-link" href="add_user.php">
      <i class="fas fa-user-plus"></i>
      <span>Ajouter Utilisateur</span>
    </a>
  </li>
  <li class="nav-item <?php echo basename($_SERVER['SCRIPT_NAME'])==='users.php'?'active':''; ?>">
    <a class="nav-link" href="users.php">
      <i class="fas fa-users"></i>
      <span>Utilisateurs</span>
    </a>
  </li>
  <li class="nav-item <?php echo basename($_SERVER['SCRIPT_NAME'])==='logs_agence.php'?'active':''; ?>">
    <a class="nav-link" href="logs_agence.php">
      <i class="fas fa-clipboard-list"></i>
      <span>Logs Agence</span>
    </a>
  </li>
  <li class="nav-item">
    <a class="nav-link" href="logout.php">
      <i class="fas fa-sign-out-alt"></i>
      <span>Déconnexion</span>
    </a>
  </li>
  <hr class="sidebar-divider">
  <div class="text-center d-none d-md-inline">
    <button class="rounded-circle border-0" id="sidebarToggle"></button>
  </div>
</ul>
