/* GRILLE 2x2 PRINCIPALE */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 colonnes égales */
  grid-template-rows: auto 1fr;
  gap: 24px; /* Espacement entre les cellules */
  height: calc(100vh - 200px); /* Hauteur totale moins header */
  max-width: 100%;
  width: 100%; /* ✅ AJOUT CRUCIAL */
}

.grid-item {
  display: flex;
  flex-direction: column;
  min-height: 0; /* Important pour éviter le débordement */
  min-width: 0; /* ✅ AJOUT CRUCIAL pour forcer le redimensionnement */
  width: 100%;
}

.grid-item h2 {
  color: #1A1A47 !important;
  font-family: 'Jost', sans-serif !important;
  font-weight: 600 !important;
  font-size: 22px !important;
  margin-bottom: 16px;
  margin-top: 0;
  flex-shrink: 0; /* Empêche le titre de rétrécir */
}

.grid-item .card {
  flex: 1; /* Prend tout l'espace restant */
  background-color: #F9F9FF;
  border-radius: 12px;
  border: 0.7px solid #CACAE8;
  padding: 24px;
  box-shadow: 0px 5px 14px rgba(26, 26, 71, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%; /* ✅ FORCE la largeur */
  min-width: 0; /* ✅ PERMET le redimensionnement */
  max-width: 100%; /* ✅ ÉVITE le débordement */
}

.grid-item .card-body {
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  width: 100%; /* ✅ FORCE la largeur */
  min-width: 0; /* ✅ PERMET le redimensionnement */
}

/* ✅ NOTIFICATION ITEMS - RESPONSIVE */
.notification-item {
  padding: 8px !important;
  border: 1px solid #CACAE8 !important;
  border-radius: 6px !important;
  background-color: #E5E5F9 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.notification-item > div:first-child {
  flex: 1 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  margin-right: 8px !important;
  min-width: 0 !important; /* ✅ CRUCIAL pour le text-overflow */
}

.notification-item p {
  margin: 0 !important;
  color: #51518F !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 18px !important;
  max-width: 100% !important;
}

.notification-item a {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  color: #51518F !important;
  font-family: 'Jost', sans-serif !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}


/* POUR LES SECTIONS 3 ET 4 - GRILLE PARFAITE 1x2 */
.status-cards-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  gap: 16px;
  height: 100%;
  min-height: 0; /* ✅ AJOUT */
  overflow: hidden; /* ✅ AJOUT */
}

.status-cards-wrapper .card {
  min-height: 0; /* ✅ AJOUT CRUCIAL */
  min-width: 0; /* ✅ AJOUT CRUCIAL */
  display: flex;
  flex-direction: column;
  overflow: hidden; /* ✅ AJOUT */
}

.status-cards-wrapper .card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0; /* Vous l'avez déjà */
  overflow-y: auto; /* ✅ AJOUT pour le scroll */
  min-height: 0; /* ✅ AJOUT */
}

.inactive-screen-item h5 {
  color: #51518F !important;
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  font-size: 16px !important;
  margin-bottom: 4px;
  margin-top: 0;
}

.inactive-screen-item p {
  color: #51518F !important;
  margin-bottom: 0;
  font-size: 14px;
  opacity: 0.8;
}

.sidebar a:hover {
  color: #F9F9FF !important;
  text-decoration: none;
}


/* STYLES EXISTANTS - RESTAURÉS */

.fleet-management.container-fluid {
  overflow: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none
}

/* Chrome, Edge, Safari */
&::-webkit-scrollbar {
  display: none;
}

.fleet-management.container-fluid {
  padding: 0 !important;
  height: 100%;
  min-height: 100%;
}

.fleet-management.card-body {
  padding: 0;
  height: 100%;
  min-height: 100%;
}

.welcome-text {
  font-size: 1rem;
  color: #5A5A9A;
  margin-bottom: 1rem;
}

/* FLEX - RESTAURÉS ET PRÉSERVÉS */
.disconnected-screen-flex {
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  padding: 0 24px;
}

.total-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stats-section {
  display: flex;
  gap: 64px;
}

.number-text-align-flex {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.number-text-align-flex a {
  display: inline-block;
  padding-bottom: 8px;
}

/* ✅ Pour la section inactive screens */
.fleet-management {
  display: flex;
  flex-wrap: wrap;
  overflow-y: auto; /* ✅ AJOUT */
  max-height: 100%; /* ✅ AJOUT */
}

.fleet-management .col-12.col-sm-6.mb-3 {
  display: flex;
  padding: 0 !important;
}

.inactive-grid {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* ✅ Changé de center à flex-start */
  height: 100%;
}

/* TEXT */
.fleet-management.container-fluid h1 {
  margin-bottom: 8px;
  color: #1A1A47 !important;
  font-family: 'Jost', sans-serif !important;
  font-weight: 600 !important;
  font-size: 30px !important;
}

.welcome-text {
  color: #1A1A47;
  font-family: "Jost", sans-serif;
  font-size: 20px;
  margin-top: 0;
  margin-bottom: -24px;
}

.fleet-management.container-fluid h2 {
  color: #1A1A47 !important;
  font-family: 'Jost', sans-serif !important;
  font-weight: 600 !important;
  font-size: 22px !important;
  margin-bottom: 16px;
  margin-top: 24px;
}

.fleet-management h4 {
  color: #51518F !important;
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  font-size: 20px !important;
  margin-bottom: 24px;
}

.special-text-management {
  color: #51518F !important;
  margin-bottom: 0;
  font-size: 18px;
}

.special-text-management-bold {
  font-size: 20px;
  color: #51518F !important;
  margin-bottom: 8px;
  font-family: 'Jost', sans-serif;
  font-weight: 600;
}

.special-text-management-primary {
  color: #0C7BFD !important;
  font-size: 18px;
}

.inactive-grid p {
  color: #51518F !important;
  margin-bottom: 0;
  font-size: 18px;
}

.text-red {
  color: #EC4540;
}

.text-orange {
  color: #FDB013;
}

.text-green {
  color: #0ACF97;
}

/* BUTTONS */

.page-container a:hover {
  text-decoration: none;
  color: #51518F;
}

/* RESPONSIVE DESIGN - MOBILE */
@media (max-width: 767px) {

  .sidebar-content {
    margin: 0 !important;
  }

  /* ✅ Container principal */
  .fleet-management.container-fluid {
    padding: 16px !important;
    height: auto !important;
    min-height: auto !important;
  }

  /* ✅ Header mobile optimisé */
  .fleet-management.col-12 h1 {
    font-size: 24px !important;
    margin-bottom: 8px;
  }

  .welcome-text {
    font-size: 16px !important;
    margin-bottom: 24px !important;
  }

  /* ✅ Grille mobile - 1 colonne */
  .dashboard-grid {
    grid-template-columns: 1fr !important; /* Force 1 colonne */
    grid-template-rows: auto auto auto auto !important; /* 4 lignes auto */
    gap: 16px !important;
    height: auto !important; /* Hauteur automatique */
    padding: 0 !important;
    max-width: 100%;
  }

  /* ✅ Chaque item de grille */
  .grid-item {
    min-height: auto !important;
    width: 100%;
  }

  .grid-item h2 {
    font-size: 20px !important;
    margin-bottom: 12px !important;
  }

  .grid-item .card {
    padding: 16px !important;
    min-height: auto !important;
  }

  /* ✅ Cartes status empilées sur mobile */
  .status-cards-wrapper {
    grid-template-columns: 1fr !important; /* Force 1 colonne */
    grid-template-rows: auto auto !important; /* 2 lignes automatiques */
    gap: 12px !important;
    height: auto !important;
  }

  .status-cards-wrapper .card {
    min-height: auto !important;
    overflow: visible !important;
  }

  .status-cards-wrapper .card .card-body {
    overflow: visible !important;
    height: auto !important;
  }

  /* ✅ Section déconnectée mobile */
  .disconnected-screen-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 20px !important;
    padding: 0 !important;
  }

  .total-section {
    width: 100%;
    text-align: center;
  }

  .stats-section {
    flex-direction: column !important;
    gap: 16px !important;
    width: 100%;
  }

  /* ✅ Inactive screens mobile */
  .inactive-screens-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    gap: 8px !important;
  }

  .fleet-management .col-12.col-sm-6.mb-3 {
    width: 100% !important;
    margin-bottom: 8px !important;
  }

  /* ✅ Textes et boutons mobile */
  .special-text-management {
    font-size: 16px !important;
  }

  .special-text-management-bold {
    font-size: 20px !important;
  }

  .fleet-management h4 {
    font-size: 18px !important;
    margin-bottom: 16px !important;
  }

  .btn-see-all-notif {
    font-size: 14px !important;
    padding: 6px 12px !important;
  }

  /* ✅ Player alerts mobile */
  .number-text-align-flex {
    flex-direction: row !important;
    gap: 12px !important;
  }

  .number-text-align-flex a {
    padding-bottom: 4px !important;
  }

  /* ✅ Fix pour les notifications - CORRIGÉ */
  .notification-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    width: 100% !important; /* ✅ AJOUT */
    box-sizing: border-box !important; /* ✅ AJOUT */
  }

  .notification-item div:first-child {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    width: 100% !important; /* ✅ CRUCIAL */
    max-width: 100% !important; /* ✅ CRUCIAL */
    word-wrap: break-word !important; /* ✅ FORCE la coupure des mots */
    overflow-wrap: break-word !important; /* ✅ Support moderne */
    hyphens: auto !important; /* ✅ Césure automatique */
  }

  .notification-item p {
    width: 100% !important; /* ✅ AJOUT */
    max-width: 100% !important; /* ✅ AJOUT */
    word-wrap: break-word !important; /* ✅ FORCE la coupure */
    overflow-wrap: break-word !important; /* ✅ Support moderne */
    white-space: normal !important; /* ✅ Permet les retours à la ligne */
    margin: 0 !important;
    color: #51518F !important;
    font-size: 16px !important;
    line-height: 1.4 !important; /* ✅ Meilleure lisibilité */
  }

  .notification-item a {
    align-self: flex-end !important;
    font-size: 14px !important;
    flex-shrink: 0 !important; /* ✅ Empêche le lien de rétrécir */
    max-width: 100% !important; /* ✅ Au cas où le lien serait long */
    word-wrap: break-word !important; /* ✅ Au cas où */
  }
}



    .special-text-management-primary:hover {
      text-decoration: none !important;
      color: #51518F !important;
    }

    .sidebar-content a:hover {
      text-decoration: none !important;
      color: #51518F;
    }

    .btn-notif {
      background-color: #8787BF;
      color: #F9F9FF;
      border: 1px solid #CACAE8;
      font-size: 16px;
    }

    .btn-notif:disabled {
      background-color: #aeaedc;
      color: #F9F9FF;
      border: 1px solid #CACAE8;
      font-size: 16px;
    }


    .btn-notif:hover {
      background-color: #7575af;
      color: #F9F9FF!important;
      border: 1px solid #CACAE8;
      font-size: 16px;
    }
