.nc-calculator {
    max-width: 640px;
    margin: 24px 0;
    font-family: inherit;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 16px 20px;
    background: #fafafa;
}

.nc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

.nc-row td {
    padding: 8px 4px;
    border-bottom: 1px solid #eaeaea;
}

.nc-nom {
    font-weight: 600;
}

.nc-qte-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.nc-btn {
    width: 28px;
    height: 28px;
    line-height: 1;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.nc-btn:hover {
    background: #f0f0f0;
}

.nc-qte {
    width: 60px;
    text-align: center;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 6px;
    -moz-appearance: textfield;
    appearance: textfield;
}

.nc-qte::-webkit-outer-spin-button,
.nc-qte::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.nc-unite {
    color: #888;
    font-size: 0.9em;
}

.nc-row-delete {
    width: 24px;
    height: 24px;
    line-height: 1;
    border: 1px solid #e2b3b3;
    background: #fff;
    color: #b32d2e;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nc-row-delete:hover {
    background: #fdeceb;
}

.nc-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.nc-action-btn {
    border: 1px dashed #bbb;
    background: #fff;
    color: #444;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.15s ease;
}

.nc-action-btn:hover {
    background: #f0f0f0;
}

.nc-search-panel,
.nc-custom-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.nc-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.nc-search-results {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

.nc-search-item {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.nc-search-item:hover {
    background: #f5f5f5;
}

.nc-search-empty {
    color: #999;
    cursor: default;
}

.nc-search-empty:hover {
    background: none;
}

.nc-custom-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.nc-custom-grid label {
    display: flex;
    flex-direction: column;
    font-size: 0.85em;
    color: #555;
    gap: 4px;
}

.nc-custom-grid input {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.nc-custom-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 12px;
}

.nc-totaux {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.nc-total-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 8px 10px;
    text-align: center;
}

.nc-label {
    display: block;
    font-size: 0.75em;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.02em;
}

.nc-value {
    font-size: 1.25em;
    font-weight: 700;
    margin-right: 3px;
}

.nc-u {
    font-size: 0.8em;
    color: #888;
}

@media (max-width: 480px) {
    .nc-totaux {
        grid-template-columns: repeat(2, 1fr);
    }

    .nc-custom-grid {
        grid-template-columns: 1fr;
    }
}
