/* Core palette */
:root{
  --c-bg:#e9eaed;
  --c-dark:#151a28;
  --c-accent:#ff6500;
  --c-teal:#00adaf;
  --c-text:#1b2337;
  --c-muted:#ffffff;
  --radius:12px;
  --shadow:0 6px 24px rgba(21,26,40,0.12);
}

html,body{height:100%;}
body{
  background:var(--c-bg);
  color:var(--c-text);
  font-family: 'Poppins', sans-serif;
  
}

/* Navbar */
.topbar{
  background:var(--c-text)!important;
  height: 80px;
  box-shadow: 0 2px 1px -1px rgba(76, 74, 74, 0.644);
  overflow: visible
}
.topbar .navbar-brand, .topbar .nav-link, .topbar .navbar-text{
  color:#e9edf7!important;
}
.topbar .btn-logout{
  background:transparent;
  border:1px solid rgba(233,237,247,.2);
  color:#e9edf7;
}
.topbar .btn-logout:hover{border-color:rgba(233,237,247,.4);}

/* Layout */
.app-wrapper{display:flex; min-height:100vh;}
.sidebar{
  width:280px; flex:0 0 220px; border-top-right-radius: 5px; margin-top: 15px; background:var(--c-text); color:#eceef5;
}

.sidebar .brand{padding:18px 20px; border-bottom:1px solid rgba(255,255,255,.06);} 
.sidebar .brand .logo{width:28px; height:28px;}
.sidebar .menu{padding:12px;}
.sidebar .menu .nav-link{
  color:#cdd6f4; border-radius:10px; margin:4px 0; display:flex; align-items:center; gap:10px;
}
.sidebar .menu .nav-link.active,
.sidebar .menu .nav-link:hover{
  background:rgba(9, 166, 168, 0.491); color:#fff;
}
.sidebar .badge{background:var(--c-teal);}

.content{flex:1; padding:15px;}
.card{border:0; border-radius:var(--radius); box-shadow:var(--shadow);} 
.card-kpi{overflow:hidden;}
.card-kpi .icon{width:33px; height:33px; display:flex; align-items:center; justify-content:center; border-radius:5px;}
.card-kpi.primary .icon{background:rgba(0,173,175,.15); color:var(--c-teal);} 
.card-kpi.accent .icon{background:rgba(255,101,0,.15); color:var(--c-accent);} 
.card-kpi.dark .icon{background:rgba(21,26,40,.15); color:var(--c-dark);} 

.btn-accent{background:var(--c-accent); border-color:var(--c-accent); color:#fff;}
.btn-accent:hover{filter:brightness(.95); color:#00adaf;}
.btn-teal{background:var(--c-teal); border-color:var(--c-teal); color:#0b1c1d;}
.btn-teal:hover{filter:brightness(.95); color:#071113;}
.link-teal{color:var(--c-teal);} 

/* Liens */
.sidebar .nav-link {
  display: flex;
  align-items: center;      /* 🔑 alignement icône / texte */
  gap: 12px;                /* espace icône ↔ texte */
  padding: 10px 14px;
  color: #ffffff;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
}


/* Icônes */
.sidebar .nav-link i {
  width: 20px;              /* 🔑 largeur fixe pour aligner toutes les icônes */
  text-align: center;
  font-size: 1rem;
}

.card-kpi {
  position: relative;
  overflow: hidden;
}

.after-nav {
  background-color: var(--c-text);
  color: var(--c-muted);

}

.card-kpi::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;   
  border-radius: 8px;              /* aligné à gauche */
  width: 3px;              /* épaisseur du bandeau */
  height: 90%;
  margin-top: 5px;
  background-color: #ff6500; /* orange */
}



.table thead th{color:#55607a; text-transform:uppercase; font-size:.78rem; letter-spacing:.04em;}
.badge-teal{background:rgba(0,173,175,.15); color:var(--c-teal);} 
.badge-accent{background:rgba(255,101,0,.15); color:var(--c-accent);} 
.badge-warning{background:#109ef0f1; color:#109ef0f1;}

/* Login */
.login-wrapper{min-height:100vh; display:grid; place-items:center; background:radial-gradient(1200px 600px at 20% -10%, rgba(0,173,175,.15), transparent 60%), radial-gradient(1200px 600px at 120% 110%, rgba(255,101,0,.12), transparent 60%), var(--c-bg);} 
.login-card{max-width:440px; width:100%;}
.login-logo{width:48px; height:48px;}

/* Utilities */
.separator{height:1px; background:#e8edf5; margin:8px 0 4px;}
.separator-drop{height:1px; background:#77797c; margin:8px 0 4px;}



@media (max-width: 992px) { 
  .sidebar { display: none; } 
  .app-wrapper { margin-left: 0 !important; } 
  .content-wrapper { width: 100% !important; } 
}

.logo {
  width: 60px;
  height: 60px;
  margin-left: 40px;  
  border-radius: 50%;   /* rend l'image circulaire */
  object-fit: cover;    /* ajuste l'image à l'intérieur du cercle */
}

.logo_login {
  width: 70px;
  height: 70px; 
  border-radius: 50%;   /* rend l'image circulaire */
  object-fit: cover;    /* ajuste l'image à l'intérieur du cercle */
}


.filter-form {
    margin-bottom: 20px;
}

.filter-form select {             
    border-bottom: 1px solid #0a0707b0;
    border-right: 1px solid #413535b0;
    border-left: 1px solid #413535b0;
    padding: 6px 10px;
    margin-right: 10px;
    border-radius: 4px;
}


#empTable {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    letter-spacing: 0.5px;
}

#empTable th {
    text-transform: uppercase;
    font-weight: 600;
    color: #1b2337;
}

#empTable tbody td {
    text-transform: uppercase;
    font-weight: 500;
    color: #495057;
}

#empTable tbody td span{
    text-transform: lowercase;
    font-weight: 500;
    color: #495057;
}


.icon-bg {
    border: none;            /* supprime le contour */
    background: transparent;  /* supprime le fond */
    padding: 0;               /* supprime le padding si tu veux juste l’icône */
    cursor: pointer;          /* curseur main */
    font-size: 16px;          /* taille de l’icône */
    color: var(--c-muted);
    text-decoration: none;         /* couleur de l’icône */
}

.icon-verte {
    border: none;            /* supprime le contour */
    background: transparent;  /* supprime le fond */
    padding: 0;               /* supprime le padding si tu veux juste l’icône */
    cursor: pointer;          /* curseur main */
    font-size: 16px;          /* taille de l’icône */
    color: #02adb0;  
    text-decoration: none;         /* couleur de l’icône */
}

.icon-verte:focus {
    outline: none;
    text-decoration: none;            /* supprime le focus par défaut */
}

.icon-verte:hover {
    color: #02adb0;           /* couleur au survol si tu veux */
}

.icon-secondaire {
    border: none;            /* supprime le contour */
    background: transparent;  /* supprime le fond */
    padding: 0;               /* supprime le padding si tu veux juste l’icône */
    cursor: pointer;          /* curseur main */
    font-size: 16px;          /* taille de l’icône */
    color:#fc7328; 
    text-decoration: none;          /* couleur de l’icône */
}

.icon-secondaire:focus {
    outline: none;            /* supprime le focus par défaut */
}

.icon-secondaire:hover {
    color: #fc7328;           /* couleur au survol si tu veux */
}



.icon-dark {
    border: none;            /* supprime le contour */
    background: transparent;  /* supprime le fond */
    padding: 0;               /* supprime le padding si tu veux juste l’icône */
    cursor: pointer;          /* curseur main */
    font-size: 16px;          /* taille de l’icône */
    color: #343534;           /* couleur de l’icône */
}

.icon-dark:focus {
    outline: none;            /* supprime le focus par défaut */
}

.icon-dark:hover {
    color: #02adb0;           /* couleur au survol si tu veux */
}


.custom-pagination .page-link {
    border: none;
    padding: 2px 6px;
}

.custom-pagination .page-item.disabled .page-link {
    color: #fa7507;
    pointer-events: none;
}

.custom-pagination .page-link:focus {
    box-shadow: none;
}

.custom-pagination .page-link {
    border: none;                /* pas de contour */
    border-bottom: 2px solid transparent;
    padding: 4px 4px;            /* très mince */
    font-size: 10px;
    color: #000000;              /* teal */
    /* background: transparent; */
}




/* Bar de progression*/

.progress-thin {
    height: 8px;
    background-color: #a3a9a9;
    border-radius: 999px;
}

.progress-bar {
    border-radius: 999px;
    width: 20px;
}

.progress-text {
    font-size: 12px;
    white-space: nowrap;
    color: #374151;
}

.bg-accent {
    background-color: #41413e; /* orange élégant */
}

.bg-teal {
  background-color: #02adb0;

}



.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background:#ffffff;
  /* background: var(--c-bg); */
  padding: 10px 15px;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  min-width: 160px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
  margin-right: 14px;
  height: 55px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ff7f11;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
}

.user-info {
  flex: 1;
  line-height: 1.2;
}

.user-name {
  font-weight: 600;
  font-size: 16px;
}

.user-role {
  font-size: 12px;
  opacity: 0.8;
}

.user-toggle i {
  transition: transform 0.3s ease;
}

/* Dropdown */
.user-dropdown {
  position: absolute;
  right: 0;
  top: 110%;
  background: var(--c-bg);
  width: 100%;
  border-radius: 10px;
  padding: 8px;
  display: none;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.user-dropdown .logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px;
  padding-left: 10px;
  border-radius: 8px;
  color: #ff6500;
  text-decoration: none;
  font-weight: 500;
  

}

.user-dropdown .text{
  font-weight: 600;
  font-size: 14px;
}


.user-dropdown .logout-btn:hover {
  background: rgba(255,255,255,0.08);
}


.user-card.open .user-dropdown {
  display: block;
}

.user-card.open .user-toggle i {
  transform: rotate(180deg);
}
.user-dropdown {
  z-index: 9999; /* TRÈS IMPORTANT */
}


/* comportement des sous tables*/
.toggle-icon {
  transition: transform 0.3s ease;
}

a[aria-expanded="true"] .toggle-icon {
  transform: rotate(90deg);
}

/* Lignes enfants plus discrètes */
tr.collapse td {
  background-color: #fafafa;
}


.card {
  border-radius: 8px;
}

.input-group-text {
  border-right: 0;
}

.input-group .form-control,
.input-group .form-select {
  border-left: 0;
}

.btn {
  border-radius: 6px;
}

.form-v2{
  font-size: 0.85rem;
  color: #ffffff;
}

.card h5 {
  font-size: 1.1rem;
}

.btn-search-icon {
  background: transparent;
  border: none;
  padding: 8px 8px;
  font-size: 1.1rem;
  cursor: pointer;

  
}

.btn-search-icon:hover {
  transform: scale(1.1);
}

.btn-search-icon:focus {
  outline: none;
  box-shadow: none;
}

.label {
  color: var(--c-muted);
}



.form-label-secondaire {
  font-size: 0.85rem;
  color: #475569;
}

.form-control,
.form-select {
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-control:focus,
.form-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.15);
}


/* gestion des scroll */
/* Fixe la topbar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

/* Structure générale */
.app-wrapper {
  display: flex;
  margin-top: 70px; /* hauteur de la topbar */
  height: calc(100vh - 70px);
  overflow: hidden;
}

/* Sidebar fixe */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  height: 100%;
  overflow-y: auto;
  position: sticky;
  top: 70px;
}

/* Zone scrollable */
.content-wrapper {
  flex-grow: 1;
  height: 100%;
  overflow-y: auto;
  padding-top: 20px;
  background: #f8f9fa;
}

/* Scrollbar stylée (optionnel) */
.content-wrapper::-webkit-scrollbar {
  width: 8px;
}

.content-wrapper::-webkit-scrollbar-thumb {
  background: #58595a;
  border-radius: 4px;
}





/* Sur mobile, réduire la largeur */
@media (max-width: 576px) {
  .login-card {
    max-width: 320px; /* plus étroite sur mobile */
    padding: 20px !important; /* réduit le padding interne */
  }
  h1.h4 {
    font-size: 1.4rem; /* texte lisible mais pas trop grand */
  }
  .form-control-lg {
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
  }
  .btn-lg {
    font-size: 1rem;
    padding: 0.8rem;
  }
}


#loader-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px; height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}




