/* Variables globales */
:root {
    --primary-color: #4e73df;
    --secondary-color: #1cc88a;
    --danger-color: #e74a3b;
    --warning-color: #f6c23e;
    --dark-color: #5a5c69;
    --light-color: #f8f9fc;
    --border-color: #e3e6f0;
    --shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
  }
  
  /* Reset et styles de base */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
  }
  
  .container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
  }
  
  /* Utilitaires */
  .text-center {
    text-align: center;
  }
  
  .mt-3 {
    margin-top: 1.5rem;
  }
  
  .mb-3 {
    margin-bottom: 1.5rem;
  }
  
  .p-3 {
    padding: 1.5rem;
  }
  
  /* Carte */
  .card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
  }
  
  .card-header {
    padding: 1rem 1.5rem;
    background-color: #f8f9fc;
    border-bottom: 1px solid var(--border-color);
  }
  
  .card-title {
    margin-bottom: 0;
    color: var(--primary-color);
    font-weight: 700;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  /* Formulaires */
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
  }
  
  .form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #6e707e;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: 0.35rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  }
  
  .form-control:focus {
    color: #6e707e;
    background-color: #fff;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
  }
  
  /* Boutons */
  .btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.35rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
  }
  
  .btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
  }
  
  .btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
  }
  
  .btn-success {
    color: #fff;
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
  }
  
  .btn-success:hover {
    background-color: #17a673;
    border-color: #169b6b;
  }
  
  .btn-danger {
    color: #fff;
    background-color: var(--danger-color);
    border-color: var(--danger-color);
  }
  
  .btn-danger:hover {
    background-color: #e02d1b;
    border-color: #d52a1a;
  }
  
  .btn-block {
    display: block;
    width: 100%;
  }
  
  /* Alertes */
  .alert {
    position: relative;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.35rem;
  }
  
  .alert-success {
    color: #0f6848;
    background-color: #d1f0e6;
    border-color: #c0ebdb;
  }
  
  .alert-danger {
    color: #761b18;
    background-color: #f9d6d5;
    border-color: #f7c6c5;
  }
  
  .alert-warning {
    color: #806520;
    background-color: #fdf1d8;
    border-color: #fcebca;
  }
  
  /* Navigation */
  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #fff;
    box-shadow: var(--shadow);
  }
  
  .navbar-brand {
    display: inline-block;
    padding-top: 0.3125rem;
    padding-bottom: 0.3125rem;
    margin-right: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: inherit;
    color: var(--primary-color);
    text-decoration: none;
  }
  
  .navbar-nav {
    display: flex;
    list-style: none;
  }
  
  .nav-item {
    margin-left: 1rem;
  }
  
  .nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
  }
  
  .nav-link:hover {
    color: var(--primary-color);
  }
  
  /* Tableau */
  .table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--dark-color);
    border-collapse: collapse;
  }
  
  .table th,
  .table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid var(--border-color);
  }
  
  .table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid var(--border-color);
    background-color: #f8f9fc;
    color: var(--primary-color);
    font-weight: 700;
  }
  
  .table tbody + tbody {
    border-top: 2px solid var(--border-color);
  }
  
  /* Liens */
  a {
    color: var(--primary-color);
    text-decoration: none;
    background-color: transparent;
  }
  
  a:hover {
    color: #224abe;
    text-decoration: underline;
  }
  
  /* Layout des pages auth */
  .auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 0;
  }
  
  .auth-card {
    width: 100%;
    max-width: 450px;
  }
  
  .auth-logo {
    margin-bottom: 1.5rem;
    text-align: center;
  }
  
  .auth-footer {
    margin-top: 1.5rem;
    text-align: center;
  }

  /* Styles pour le formulaire de connexion */

/* Amélioration des champs de formulaire */
.form-control:focus {
  border-color: #4a6cf7;
  box-shadow: 0 0 0 0.2rem rgba(74, 108, 247, 0.25);
}

.form-control.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Style pour le "Se souvenir de moi" */
.remember-me {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
}

.remember-me input[type="checkbox"] {
  margin-right: 5px;
}

/* Style pour le "Mot de passe oublié" */
.forgot-password {
  float: right;
  color: #4a6cf7;
  text-decoration: none;
  transition: color 0.3s;
}

.forgot-password:hover {
  color: #2f55e3;
  text-decoration: underline;
}

/* Amélioration du bouton de connexion */
.btn-primary {
  position: relative;
  transition: all 0.3s ease;
  min-height: 44px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Message d'erreur */
#form-errors {
  margin-bottom: 15px;
  border-radius: 4px;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Adaptation mobile */
@media (max-width: 768px) {
  .auth-card {
    width: 95%;
    max-width: 450px;
    margin: 20px auto;
  }
  
  .form-group {
    margin-bottom: 15px;
  }
  
  .remember-me, .forgot-password {
    display: block;
    float: none;
    margin-bottom: 10px;
  }
}

.password-strength {
  margin-top: 5px;
  font-size: 0.85rem;
}

.password-strength.weak {
  color: #e74a3b;
}

.password-strength.medium {
  color: #f6c23e;
}

.password-strength.strong {
  color: #1cc88a;
}

.password-match {
  margin-top: 5px;
  font-size: 0.85rem;
}

.password-match.match {
  color: #1cc88a;
}

.password-match.no-match {
  color: #e74a3b;
}

.session-item {
  background-color: #f8f9fc;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 10px;
  border-left: 4px solid #4e73df;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.session-item.current {
  background-color: #eaecf4;
  border-left: 4px solid #1cc88a;
}

.session-info {
  flex: 1;
}

.device-icon {
  font-size: 1.5rem;
  margin-right: 15px;
  color: #4e73df;
}

.session-actions {
  display: flex;
  align-items: center;
}

.revoke-all-btn {
  margin-top: 15px;
}

.history-table td {
  vertical-align: middle;
}

.badge {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
}

.badge-success {
  color: #fff;
  background-color: #1cc88a;
}

.badge-danger {
  color: #fff;
  background-color: #e74a3b;
}

.info-text {
  font-size: 0.875rem;
  color: #6c757d;
}

.alert-warning {
  background-color: #fff3cd;
  border-color: #ffeeba;
  color: #856404;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}


/* Drow */
/* Styles pour le dropdown de l'utilisateur */
/* Styles pour le dropdown utilisateur */
/* Styles dropdown ajustés */
.navbar-user {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px;
  user-select: none;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 1000;
  min-width: 10rem;
  padding: 0.5rem 0;
  margin: 0.125rem 0 0;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.25rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
  display: none;
}

/* Important: assurez-vous que cette règle est prioritaire */
.dropdown-menu.show {
  display: block !important;
}


/*  Suppresion d'actualite*/
/* Styles pour le modal */
.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 0 !important;
}

.modal-dialog {
  margin: 0 auto;
  max-width: 500px;
  width: 100%;
}

.modal-content {
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.modal-header {
  border-bottom: 1px solid #e9ecef;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid #e9ecef;
  padding: 1rem;
  display: flex;
  justify-content: flex-end;
}

.text-center {
  text-align: center !important;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
}

/* Edit Team */
/* Styles pour améliorer les modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  overflow: auto;
  padding: 20px;
}

.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 800px; /* Plus large */
  margin: 1.75rem auto;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 0.3rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem;
  border-top: 1px solid #dee2e6;
}

/* Ajouter un effet lorsque le modal s'affiche */
@keyframes modalFadeIn {
  from {opacity: 0; transform: translateY(-50px);}
  to {opacity: 1; transform: translateY(0);}
}

.modal.show .modal-content {
  animation: modalFadeIn 0.3s ease-out;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.col-md-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

/* Rendre le modal responsive sur mobile */
@media (max-width: 768px) {
  .modal-dialog {
    margin: 0.5rem;
  }
  
  .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .modal-body {
    max-height: 60vh;
  }
}

/*Contact delete*/
/* Styles pour le modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  overflow: auto;
}

.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 1.75rem auto;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 0.3rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem;
  border-top: 1px solid #dee2e6;
}

/* Animation pour le modal */
@keyframes modalFadeIn {
  from {opacity: 0; transform: translateY(-50px);}
  to {opacity: 1; transform: translateY(0);}
}

.modal.show .modal-content {
  animation: modalFadeIn 0.3s ease-out;
}

/* Styles pour le modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  overflow: auto;
}

.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 1.75rem auto;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 0.3rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.5);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
}