:root {
    --history-bg: #ffffff;
    --history-border: #e6e9ed;
    --history-hover: #f8f9fa;
    --tab-active: #ed1c24;
    --tab-hover: rgba(237, 28, 36, 0.1);
}

/* Styles spécifiques pour le popup de détails */
.popup-overlay[data-popup="equipment-details-popup"] .popup-content {
    width: 80%;
    height: 100vh;
    max-width: 1200px;
    float: right;
    display: flex;
    flex-direction: column;
}

.popup-overlay[data-popup="equipment-details-popup"] .popup-body {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    overflow: hidden;
    padding: 0;
    height: calc(100% - 60px);
}

.details-left-panel {
    padding: 20px;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.details-right-panel {
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* background-color: red; */
}

.details-header {
    padding: 15px;
    border-radius: 8px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 15px;
}

.equipment-image {
    width: 60px;
    height: 60px;
}

.details-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.tab-btn {
    padding: 8px 12px;
    font-size: 0.85em;
}

.details-section {
    background: #ffffff; /* Couleur de fond blanche */
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid #ddd; /* Bordure subtile */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* Ombre subtile */
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* Animation au survol */
}



.details-section h3 {
    font-size: 1.3em;
    color: #222; /* Texte plus sombre */
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #ddd; /* Ligne de séparation plus visible */
    font-weight: 700; /* Texte plus gras */
}

.details-section .details-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Grille responsive */
    gap: 16px; /* Espacement entre les éléments */
}

.details-section .details-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.details-section .details-item strong {
    font-size: 0.95em;
    color: #555; /* Couleur légèrement plus sombre */
    font-weight: 700; /* Texte plus gras */
}

.details-section .details-item span {
    font-size: 0.9em;
    color: #333; /* Couleur de texte plus sombre */
    line-height: 1.5; /* Espacement des lignes */
}

.details-section a {
    color: #007bff; /* Couleur bleue moderne */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease; /* Animation au survol */
}

.details-section a:hover {
    color: #0056b3; /* Couleur bleue plus foncée au survol */
    text-decoration: underline;
}

.cost-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px;
    margin: 0;
}

.cost-item {
    padding: 8px;
    text-align: center;
}

.cost-item h4 {
    font-size: 1.1em;
}

.cost-filter {
    grid-column: 1 / -1;
    margin-bottom: 8px;
}

.chart-section {
    padding: 15px;
    border-radius: 8px;
    height: auto;
}

.chart-container {
    height: 200px;
    padding: 0;
    box-shadow: none;
}

/* Styles pour le graphique et les coûts */
.costs-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cost-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.cost-filter label {
    font-weight: 500;
    color: var(--color2);
}

.cost-filter select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9em;
    outline: none;
    cursor: pointer;
}

.cost-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.cost-item {
    background: var(--bg-color);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chart-header h3 {
    font-size: 1em;
    color: var(--color2);
    margin: 0;
}

.chart-legend {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85em;
    color: var(--icon-color);
}

/* Styles pour l'onglet Tasks */
.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.task-filter {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.task-search {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    width: 200px;
    outline: none;
}

.new-task-btn {
    background: var(--color-hover);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.new-task-btn:hover {
    background: #d41920;
}

.tasks-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.tasks-table th, .tasks-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.tasks-table th {
    background: var(--menu-bg);
    color: var(--color2);
    font-weight: 600;
    font-size: 0.8em;
}

.tasks-table tbody tr:hover {
    background: var(--popup-hover);
}

.tasks-pagination {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: var(--icon-color);
}

/* Styles pour l'onglet History */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-tabs {
    display: flex;
    gap: 10px;
}

.history-tab {
    background: white;
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.history-tab.active {
    background: var(--color-hover);
    color: white;
    border-color: var(--color-hover);
}

.history-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-filter {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.history-search {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    width: 200px;
    outline: none;
}

.new-history-btn {
    background: var(--color-hover);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.new-history-btn:hover {
    background: #d41920;
}

.history-summary {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    font-size: 14px;
    color: var(--color2);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.history-table th, .history-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.history-table th {
    background: var(--menu-bg);
    color: var(--color2);
    font-weight: 600;
}

.history-table .no-records {
    text-align: center;
    color: var(--icon-color);
    font-size: 14px;
}

.history-pagination {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: var(--icon-color);
}

/* Styles pour l'onglet History */
.history-header {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-tabs {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.history-tab {
    padding: 6px 8px;
    border: 1px solid var(--history-border);
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    background: var(--history-bg);
}

.history-tab:hover {
    background: var(--history-hover);
    border-color: var(--tab-active);
}

.history-tab.active {
    background: var(--tab-active);
    color: white;
    border-color: var(--tab-active);
}

.history-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.history-filter {
    padding: 8px 16px;
    border: 1px solid var(--history-border);
    border-radius: 20px;
    outline: none;
    min-width: 150px;
}

.history-search {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid var(--history-border);
    border-radius: 20px;
    outline: none;
}

.new-history-btn {
    background: var(--tab-active);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-summary {
    display: flex;
    gap: 30px;
    padding: 15px 20px;
    background: var(--history-hover);
    border-radius: 10px;
    margin: 20px 0;
}

.history-summary span {
    font-weight: 500;
}

.history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.history-table th {
    padding: 12px 20px;
    text-align: left;
    color: #666;
    font-weight: 500;
    border-bottom: 2px solid var(--history-border);
}

.history-table td {
    padding: 15px 20px;
    background: var(--history-bg);
    border-top: 1px solid var(--history-border);
    border-bottom: 1px solid var(--history-border);
}

.history-table tr td:first-child {
    border-left: 1px solid var(--history-border);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.history-table tr td:last-child {
    border-right: 1px solid var(--history-border);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.history-table tbody tr:hover td {
    background: var(--history-hover);
}

.history-pagination {
    margin-top: 20px;
    padding: 15px;
    text-align: center;
    color: #666;
}
.details-content{
    padding: 0px 20px;
}


.chart-controls select {
    padding: 6px 8px; /* Espacement interne */
    border: 1px solid #ddd; /* Bordure subtile */
    border-radius: 6px; /* Coins arrondis */
    font-size: 0.9em; /* Taille de police */
    color: #333; /* Couleur du texte */
    background: #fff; /* Couleur de fond */
    outline: none; /* Supprime le contour par défaut */
    cursor: pointer; /* Curseur pointeur */
    transition: all 0.3s ease; /* Animation fluide */
}

