/* Styles pour la gestion des couches */

.layers-management {
    padding: 0px;
}

/* Styles pour le tableau hiérarchique */
.layers-table.hierarchical .group-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 2px solid var(--accent-color);
    border-bottom: 1px solid #dee2e6;
}

.layers-table.hierarchical .group-header-cell {
    padding: 0;
    border: none;
}

.layers-table.hierarchical .group-child td {
    font-size: 0.7rem;
}

.group-header-content {
    display: flex;
    /* justify-content: space-between; */
    align-items: center;
}

.group-info-layers {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 5px 10px;
}

.group-name {
    margin: 0;
}

.group-type {
    background: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.group-count {
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.group-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-toggle-group {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle-group:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.btn-toggle-group i {
    transition: transform 0.2s ease;
}

.btn-toggle-group.collapsed i {
    transform: rotate(-90deg);
}

.group-color-picker {
    width: 32px;
    height: 32px;
    border: 2px solid var(--accent-color);
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.group-color-picker:hover {
    border-color: #0056b3;
    transform: scale(1.05);
}

.group-child {
    background: #f8f9fa;
    border-left: 4px solid var(--accent-color);
}

.group-child:hover {
    background: #e9ecef;
}

.group-child td {
    padding-left: 30px;
    font-size: 0.9rem;
}

/* Animation pour l'ouverture/fermeture des groupes */
.group-children {
    transition: all 0.3s ease;
    overflow: hidden;
}

.group-children.collapsed {
    max-height: 0;
    opacity: 0;
}

.group-children.expanded {
    max-height: 1000px;
    opacity: 1;
}

.cards-layers {
    display: flex;
    width: 100%;
    justify-content: space-between;
    text-align: center;
}

.stats-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    flex: 1;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stats-card i {
    font-size: 2rem;
    color: var(--accent-color);
}

.stats-value {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.stats-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-container {
    background: #fff;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.layers-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
}

.layers-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.layers-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.layers-table tr:hover {
    background: #f8f9fa;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-field input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-field label {
    margin: 0;
    font-weight: normal;
}

/* Styles pour les groupes fermés */
.group-child.collapsed {
    display: none;
}

.group-chevron.collapsed {
    transform: rotate(0deg);
}

/* Cursor pointer pour le header de groupe */
.group-header {
    cursor: pointer;
}

.group-header:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Styles pour les lignes de couches cliquables */
.layer-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.layer-row:hover {
    background-color: #f8f9fa !important;
}

.layer-row:hover td {
    background-color: transparent;
}

/* Responsive */
@media (max-width: 768px) {
    .cards-layers {
        grid-template-columns: 1fr;
    }
    
    .layers-table {
        font-size: 0.9rem;
    }
    
    .layers-table th,
    .layers-table td {
        padding: 10px;
    }
    
    .data-form {
        padding: 10px;
    }
}
