/* Styles généraux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #333;
    overflow: hidden;
    height: 100vh;
}

.header {
    background-color: #a7adaf;
    color: #232D4B;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.buttons-container {
    display: flex;
    gap: 5px;
    margin-right: 20px;
}

/* Boutons principaux avec icônes */
.main-button {
    background-color: #d11313;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.main-button:hover {
    background-color: #b80f0f;
}

.main-button i {
    font-size: 24px;
}

#btn-interventions {
    color: #ffffff; /* Rouge pour l'icône feu */
}

#btn-engins {
    color: #ffffff; /* Bleu pour l'icône camion */
}

/* Fenêtres */
.window {
    position: absolute;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 300px;
    min-height: 200px;
    resize: both;
}

.window-header {
    background-color: #CBD2D5;
    color: #232D4B;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
}

.window-title i {
    margin-right: 8px;
}

.window-title.interventions-title i {
    color: #d11313;
}

.window-title.engins-title i {
    color: #d11313;
}

.window-controls {
    display: flex;
    gap: 5px;
}

.window-control {
    background: none;
    border: none;
    color: #ff0000;
    cursor: pointer;
    font-size: 20px;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

.window-control:hover {
    background-color: rgba(255,255,255,0.2);
}

.window-content {
    padding: 15px;
    overflow: auto;
    flex-grow: 1;
}

.window-minimized {
    height: auto !important;
}

.window-minimized .window-content {
    display: none;
}

/* Tableaux */
.table-container {
    overflow-x: auto;
    margin-top: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f5f5f5;
    font-weight: bold;
    position: sticky;
    top: 0;
}

tr:hover {
    background-color: #f9f9f9;
}

/* style.css - Modifications pour l'affichage des centres et engins */
.centre-section {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.centre-header {
    font-weight: bold;
    min-width: 120px;
    color: #232D4B;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
}

.centre-header i {
    font-size: 20px;
    margin-bottom: 5px;
    color: #232D4B;
}

.engins-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.engin-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    /*font-weight: bold;*/
    text-align: center;
    min-width: 80px;
}


/* Services externes */
.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.service-item {
    background-color: #43ee00;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* Centres et engins */
.centre-section {
    margin-bottom: 15px;
}

.centre-header {
    font-weight: bold;
    margin-bottom: 5px;
    color: #000000;
}

.engins-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

/* Statistiques */
.stats-container {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.stat-item {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    min-width: 120px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #232D4B;
}

.stat-label {
    font-size: 12px;
    color: #666;
}

.no-interventions {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #666;
}

/* Container des onglets */
.tabs-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #EEEEEE;
    border-top: 1px solid #ddd;
    display: flex;
    padding: 5px;
    gap: 5px;
    overflow-x: auto;
    z-index: 1000;
}

/* Onglets individuels */
.tab {
    background-color: #e0e0e0;
    padding: 8px 15px;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #ccc;
    border-bottom: none;
    /*max-width: 150px;*/
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab i {
    margin-right: 5px;
}

.tab:hover {
    background-color: #d0d0d0;
}

.tab.active {
    background-color: #d11313;
    color: white;
    font-weight: bold;
}

.tab-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.tab.active .tab-close {
    color: white;
}

.tab-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.tab.interventions-tab i {
    color: #ffffff;
}

.tab.engins-tab i {
    color: #ffffff;
}



/* style.css - Ajouter ces styles pour le tableau des engins */
.engins-cell {
    min-width: 120px;
}

.engins-table {
    align-items: center;
}

/* Ajuster la largeur des colonnes du tableau des engins */
#engins-table th:nth-child(1) { width: 120px; } /* Centre */
#engins-table th:nth-child(2) { width: 120px; } /* Sanitaire */
#engins-table th:nth-child(3) { width: 120px; } /* Incendie */
#engins-table th:nth-child(4) { width: 120px; } /* Liaison */
#engins-table th:nth-child(5) { width: 120px; } /* Spécialisé */
#engins-table th:nth-child(6) { width: 120px; } /* Sec-Routier */
#engins-table th:nth-child(7) { width: 120px; } /* Nautique */
#engins-table th:nth-child(8) { width: 120px; } /* Divers */




/* Header user info */
.user-info {
    display: flex;
    align-items: center;
}

.user-button {
    background-color: #232D4B;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.user-button:hover {
    background-color: #1a2340;
}

.user-name {
    font-weight: bold;
}

/* Profile window */
.profile-content {
    padding: 20px;
}

.profile-info {
    margin-bottom: 20px;
}

.profile-info-item {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.profile-info-label {
    font-weight: bold;
    color: #666;
}

.profile-info-value {
    color: #333;
}

.btn-logout {
    background-color: #d11313;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

.btn-logout:hover {
    background-color: #b80f0f;
}


.btn-ctacodis {
    background-color: #232D4B;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin: 10px 0;
    text-align: center;
}

.btn-ctacodis:hover {
    background-color: #1a2340;
}

/* Badges pour les centres */
.centre-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    min-width: 80px;
    height: 45px; /* Même hauteur que les badges d'engins */
    margin-bottom: 5px;
}

.centres-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}


/* Supprimer les bordures pour les lignes des centres et engins */
#interventions-table tr.centre-row td,
#interventions-table tr.engins-row td {
    border-bottom: none;
    padding: 5px 12px;
}

/* Style spécifique pour les lignes de services externes */
#interventions-table tr.services-row td {
    border-bottom: none;
    padding: 10px 12px 5px 12px;
}

/* Conserver les bordures uniquement pour les lignes d'intervention principales */
#interventions-table tr:not(.services-row):not(.centre-row):not(.engins-row) td {
    border-bottom: 1px solid #ddd;
}