body {
    height: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
}

.container1 {
   
    padding: 20px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    display: inline-block;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: -1;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 10px;
    width: auto;
}

button:hover {
    background-color: #0056b3;
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    font-size: 18px;
    z-index: 1050;
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid white;
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.orientation-icon {
    text-align: center;
    vertical-align: middle;
    color: crimson;
}

#map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
}

#trackingForm {
  

    width: 100%;
    padding: 5px 20px;
    box-sizing: border-box;
    /* border: 1px solid #ddd;  Bordure de la carte */
    /* border-radius: 8px;  Coins arrondis */
    /* background-color: #fff;  Fond blanc */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);  Ombre douce */
     margin-top: 5px; /* Espacement au-dessus */
}

#trackingContainer {

    max-width: 50vw;
    max-height: 50vh;
    overflow: hidden;
    background-color: white;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

#trackingTableContainer {
    overflow-x: auto;
    max-height: 40vh;
}

.d-flex {
    /* margin-top: 10px; */
    justify-content: center;
}

.pagination {
    margin-bottom: 0;
}

.page-item {
    margin: 0 5px;
}

.page-link {
    cursor: pointer;
}

.table-dark {
    background-color: #0d6efd !important;
    color: white;
}

.btn {
    border-radius: 0px !important;
}

input,
select,
button {
    border-radius: 0px !important;
}

/* Navbar transparente avec effet de flou */
.navbar {
    position: fixed;
    top: 0!important;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8) !important; /* Légère transparence */
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px);
    box-shadow: none;
    z-index: 1000; /* S'assurer qu'elle reste au-dessus des autres éléments */
}

.container {
    background-color: transparent !important;
}

thead {
    background: #0d6efd !important;
}

.animation-controls {
    position: fixed;
    display: none;
    bottom: 20px;
    max-width: 400px;
    width: 90%;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    gap: 10px;
    background: transparent;
    padding: 10px 15px;
    border-radius: 10px;
}

.animation-controls button {
    padding: 8px 12px;
    border: none;
    background-color: #007bff;
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.animation-controls button:hover {
    background-color: #0056b3;
}

/* Media Queries Responsives */
@media (max-width: 768px) {
    #trackingForm {
        width: 100%;
        max-width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;
    }

    #trackingContainer {
        max-width: 100%;
        width: 100%;
        left: 0;
        right: 0;
        bottom: 10px;
    }

    .container {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }

    button {
        width: 100%;
        padding: 12px;
    }

    #trackingTableContainer {
        max-height: 30vh;
    }

    .animation-controls {
        width: 100%;
        max-width: 100%;
        bottom: 15px;
        padding: 8px 15px;
        border-radius: 5px;
    }

    .animation-controls button {
        padding: 8px;
        font-size: 14px;
    }
    .navbar-toggler {
        border-color: #0d6efd; /* Définir la couleur de la bordure du bouton */
        width: 50px;
        border-radius: 5px;
    }
    
 
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    button {
        font-size: 14px;
        padding: 8px 16px;
    }

    #trackingForm {
        bottom: 10px;
        left: 0;
    }

    #trackingContainer {
        width: 100%;
        max-height: 35vh;
        bottom: 5px;
    }
    .navbar-toggler {
        border-color: #0d6efd; /* Définir la couleur de la bordure du bouton */
        width: 50px;
        border-radius: 5px!important;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    

}

.custom-marker {
    background-color: #0d6efd;
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 30px;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
#toggleTableBtn {
    position: fixed;
    bottom: 250px;
    right: -30px;
    z-index: 1000;
    padding: 10px 20px 10px 0px;
    width: 50px; /* Ajustez la largeur pour que le texte soit visible */
    border-radius: 50%!important; /* Assurez-vous que le border-radius soit plus grand que la moitié de la largeur */
    background-color: #007bff;
    color: white;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.toast-container {
    z-index: 9999 !important; /* Assure-toi que le toast est au-dessus des autres éléments */
    position: fixed;
    top: 60px;  /* Ajuste cette valeur pour changer la distance du haut */
    right: 0;
    padding: 10px;  /* Optionnel : ajoute un peu de padding pour espacer le toast */
}
#content{
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    width: 400px;
    max-height: 50vh;
    overflow: hidden;
    background-color: white;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  
}
.custom-select {
    position: relative;
    width: 100%;
}

.select-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 0.375rem 0.75rem; /* Padding standard de Bootstrap pour les input */
    border: 1px solid #ccc;
    cursor: pointer;
    transition: 0.3s;
  
    height: 2.5rem; /* Hauteur similaire à un input Bootstrap */
   
}

.select-box:hover {
    border-color: #007bff;
}

.options-container {
    position: absolute;
    top: 100%;
    left: 10px;
    width: 85%;
    max-height: 0;
    overflow: hidden;
    background: white;
   
    transition: max-height 0.3s ease-out;
    z-index: 10;
}

.options-container.active {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-box {
    width: 100%;
    padding: 8px;
    border: none;
    border-bottom: 1px solid #ddd;
    outline: none;
}

.option {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: 0.3s;
    gap: 10px;
}

.option:hover {
    background: #007bff;
    color: white;
}

/* Couleurs des états */
.status-online { color: green; }
.status-offline { color: red; }
.status-idle { color: gray; }

@media (max-width: 400px) {
    .custom-select {
        width: 100%;
    }
}
/* Conteneur latéral */
.content {
    position: fixed;
    top: 100px;
    left: -30%; /* Caché au départ */
    width: 30%;
    height: 100vh;
    overflow-y:auto;
    background: white !important;
    padding: 20px;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease-in-out;
    z-index: 999;
}

.content.active {
    left: 0;
}

.toggle-btn.active {
    left: 30%; /* Se déplace avec la sidebar */
}
.toggle-btn {
    position: fixed; /* Remplace absolute par fixed */
    left: 0; /* Toujours collé au bord gauche de l'écran */
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 50px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0 !important; /* Demi-cercle */
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 1000; /* S'assurer qu'il est au-dessus de tout */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-btn:hover {
    opacity: 0.8;
}

.btn-group {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    width: 100%;
}

.btn {
    padding: 10px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: 0.3s;
    flex: 1;
    margin: 0 5px;
}

.btn.stop {
    background: #dc3545;
    color: white;
}
.btn.stop:hover{
    border: 1px solid #dc3545;
    color: #dc3545;
}

.btn.trace {
    background: #007bff;
    color: white;
}
.btn.trace:hover{
    border: 1px solid #007bff;
    color: #007bff;
}
.btn:hover {
    opacity: 0.8;
}

.table-container {
    display: none;
    transition: opacity 0.3s ease-in-out;
}

.table-container.active {
    display: block;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

th {
    background: #007bff;
    color: white;
}

.stop-table th {
    background: #dc3545;
}

@media (max-width: 768px) {
    .content {
        width: 80%;
        left: -80%;
    }
    .toggle-btn {
        right: -25px;
        width: 35px;
    }
}
@media (max-width: 480px) {
    .content {
        width: 90%;
        left: -90%;
    }
}
