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

.pm-templates-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    text-align: center;
}

.pm-templates-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
    text-align: center;  /* Centrage du texte */
    line-height: 1.4;
}

/* Style pour la colonne des actions */
.actions-td {
    position: relative;
    width: 40px;
    text-align: center; /* Centre uniquement le bouton d'action */
}

.actions-popup {
    position: absolute;
    top: calc(100% + 5px);  /* Ajuster la position pour l'alignement */
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 100;
    min-width: 160px;
    border: 1px solid #eee;
    overflow: hidden;  /* Pour le border-radius */
}

.actions-popup ul {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.actions-popup li {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9em;
    color: #333;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.actions-popup li:hover {
    color: #ed1c24;
    padding-left: 20px;
}

.actions-popup li i {
    font-size: 1.2em;
    width: 20px;
}

.actions-popup li:hover i {
    color: #ed1c24;
}

/* Style pour l'icône d'engrenage */
.btn-icon.action-trigger i {
    font-size: 1.4em;
    color: #666;
    transition: all 0.3s;
    background-color: transparent;
}

.btn-icon.action-trigger:hover i {
    color: #ed1c24;
    transform: rotate(180deg);
}

/* Style amélioré pour les lignes du tableau */
.pm-templates-table tr:hover {
    background-color: #f8f9fa;
}

.pm-templates-table td:first-child {
    font-weight: 500;
    color: #333;
}

.section-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    justify-content: space-between; /* Changed from end to space-between */
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 35px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.9em;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: #ed1c24;
}

.search-box i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.1em;
}

.btn-new-template, .btn-import {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-new-template {
    background: #ed1c24;
    color: white;
}

.btn-import {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
}

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

.btn-import:hover {
    background: #e9ecef;
}

/* Styles for New PM Template popup */
.info-text {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
    margin-top: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    width: auto;
    border-top: none;
}

/* Ajout des styles pour les notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}

.notification.success {
    background-color:rgba(76, 175, 79, 0.18);
    border-radius: 8px;
    color: #4caf50;
}

.notification.error {
    background-color: #f44336;
}

.menu-container {
    position: relative;
    display: inline-block;
}

.btn-menu {
    padding: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    border-radius: 4px;
    font-size: 1.2em;
    justify-content: end;
}

.btn-menu:hover {
    background: #f5f5f5;
}

.btn-menu i {
    font-size: 1.2em;
}

.menu-popup {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 150px;
    z-index: 1000;
    margin-top: 5px;
    border: 1px solid #eee;
}

.menu-popup ul {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.menu-popup li {
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    transition: color 0.2s;
}

.menu-popup li:hover {
    color: #ed1c24;
}

.menu-popup li i {
    font-size: 1.1em;
}

/* Styles pour le popup d'édition */
.popup-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
}

.back-button {
    margin-right: 15px;
    cursor: pointer;
    font-size: 1.5em;
}

.form-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
    padding: 0 20px;
}

.tab {
    padding: 10px 0;
    cursor: pointer;
    position: relative;
    color: #666;
}

.tab.active {
    color: #ed1c24;
    font-weight: 500;
}

.tab.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ed1c24;
}

.form-group.required label:after {
    content: '*';
    color: #ed1c24;
    margin-left: 4px;
}

.tasks-section {
    margin-top: 30px;
}

.tasks-section h3 {
    margin-bottom: 15px;
    font-size: 1.1em;
}

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

.tasks-table th,
.tasks-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.tasks-table th {
    font-weight: 500;
    color: #333;
    background: #f8f9fa;
}

.btn-add-task {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: none;
    border: none;
    color: #ed1c24;
    cursor: pointer;
    font-weight: 500;
}

.btn-add-task i {
    font-size: 1.2em;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.right-actions {
    display: flex;
    gap: 10px;
}

.btn-delete {
    padding: 8px 16px;
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-weight: 500;
}

.btn-delete:hover {
    text-decoration: underline;
}

/* Nouveaux styles pour la page */
.pm-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

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

.pm-header h1 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.pm-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-top: 20px;
}

/* Styles pour la vue dashboard */
.dashboard-container {
    padding: 20px;
   
    margin-top: 60px;  /* Pour la top bar */
}

.header-table {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-table .head {
    font-size: 24px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.pm-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-top: 20px;
}

.pm-templates-list {
    overflow: auto;
    max-height: calc(100vh - 220px);
}

/* PM Template specific styles */
.header-table {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.template-count {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    color: #666;
    margin-left: 8px;
}

.pm-list-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-top: 20px;
}

.pm-list-table {
    width: 100%;
    border-collapse: collapse;
}

.pm-list-table thead th {
    background: #f8f9fa;
    padding: 15px;
    font-weight: 600;
    color: #333;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.pm-list-table tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.pm-list-table tbody tr:hover {
    background: #f8f9fa;
}

/* Action buttons */
.pm-new-btn {
    padding: 8px 16px;
    background: #ed1c24;
    color: white;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

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

.action-button {
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.action-button:hover {
    background: #f0f0f0;
}

.action-button i {
    font-size: 1.2em;
    color: #666;
}

/* Filter buttons */
.filter-btn {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
    min-width: 120px;
    cursor: pointer;
}

.filter-btn:hover {
    border-color: #adb5bd;
}

/* Search input */
.search-input {
    padding: 8px 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    min-width: 200px;
}

.search-input:focus {
    outline: none;
    border-color: #ed1c24;
}

/* Menu trigger */
.menu-trigger {
    font-size: 1.3em;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
}

.menu-trigger:hover {
    background: #f0f0f0;
}

/* Styles pour la section équipement */
.pm-equipment-section {
    padding: 20px 0;
}

.pm-equipment-header {
    margin-bottom: 20px;
}

.pm-search-box {
    position: relative;
    max-width: 300px;
}

.pm-search-box input {
    width: 100%;
    padding: 8px 12px 8px 35px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.pm-search-box i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.pm-equipment-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.pm-equipment-table th,
.pm-equipment-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
}

.pm-equipment-table th {
    background: #f8f9fa;
    font-weight: 500;
}

.pm-equipment-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.pm-btn-add-equipment,
.pm-btn-remove-equipment {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pm-btn-add-equipment {
    background: #ed1c24;
    color: white;
}

.pm-btn-remove-equipment {
    background: #dc3545;
    color: white;
}

.pm-btn-add-equipment:hover,
.pm-btn-remove-equipment:hover {
    opacity: 0.9;
}

/* Responsive styles */
@media (max-width: 1200px) {
    .header-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .filter-btn, .search-input {
        flex: 1;
        min-width: 0;
    }
}

.close-new-popup {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 1.2em;
    color: #ed1c24;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.bx-x:hover {
    color: #871115;
}

.close-new-popup i {
    font-size: 1.6em;
}